function ME(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Yi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var ub={exports:{}},Yu={},cb={exports:{}},_e={};/** * @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 _a=Symbol.for("react.element"),DE=Symbol.for("react.portal"),zE=Symbol.for("react.fragment"),jE=Symbol.for("react.strict_mode"),BE=Symbol.for("react.profiler"),FE=Symbol.for("react.provider"),VE=Symbol.for("react.context"),UE=Symbol.for("react.forward_ref"),HE=Symbol.for("react.suspense"),WE=Symbol.for("react.memo"),KE=Symbol.for("react.lazy"),Vg=Symbol.iterator;function qE(e){return e===null||typeof e!="object"?null:(e=Vg&&e[Vg]||e["@@iterator"],typeof e=="function"?e:null)}var fb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},db=Object.assign,pb={};function jo(e,t,n){this.props=e,this.context=t,this.refs=pb,this.updater=n||fb}jo.prototype.isReactComponent={};jo.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")};jo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function hb(){}hb.prototype=jo.prototype;function Nh(e,t,n){this.props=e,this.context=t,this.refs=pb,this.updater=n||fb}var Oh=Nh.prototype=new hb;Oh.constructor=Nh;db(Oh,jo.prototype);Oh.isPureReactComponent=!0;var Ug=Array.isArray,mb=Object.prototype.hasOwnProperty,$h={current:null},gb={key:!0,ref:!0,__self:!0,__source:!0};function yb(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)mb.call(t,r)&&!gb.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,C=z[le];if(0>>1;lei(Y,x))Fi(oe,Y)?(z[le]=oe,z[F]=x,le=F):(z[le]=Y,z[I]=x,le=I);else if(Fi(oe,x))z[le]=oe,z[F]=x,le=F;else break e}}return G}function i(z,G){var x=z.sortIndex-G.sortIndex;return x!==0?x:z.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,f=null,d=3,p=!1,h=!1,g=!1,E=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(z){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=z)r(u),G.sortIndex=G.expirationTime,t(l,G);else break;G=n(u)}}function S(z){if(g=!1,v(z),!h)if(n(l)!==null)h=!0,K(k);else{var G=n(u);G!==null&&Z(S,G.startTime-z)}}function k(z,G){h=!1,g&&(g=!1,y(T),T=-1),p=!0;var x=d;try{for(v(G),f=n(l);f!==null&&(!(f.expirationTime>G)||z&&!M());){var le=f.callback;if(typeof le=="function"){f.callback=null,d=f.priorityLevel;var C=le(f.expirationTime<=G);G=e.unstable_now(),typeof C=="function"?f.callback=C:f===n(l)&&r(l),v(G)}else r(l);f=n(l)}if(f!==null)var b=!0;else{var I=n(u);I!==null&&Z(S,I.startTime-G),b=!1}return b}finally{f=null,d=x,p=!1}}var w=!1,_=null,T=-1,N=5,$=-1;function M(){return!(e.unstable_now()-$z||125le?(z.sortIndex=x,t(u,z),n(l)===null&&z===n(u)&&(g?(y(T),T=-1):g=!0,Z(S,x-le))):(z.sortIndex=C,t(l,z),h||p||(h=!0,K(k))),z},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(z){var G=d;return function(){var x=d;d=G;try{return z.apply(this,arguments)}finally{d=x}}}})(xb);wb.exports=xb;var i2=wb.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 Sb=A,on=i2;function U(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"),jd=Object.prototype.hasOwnProperty,o2=/^[: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]*$/,Kg={},qg={};function s2(e){return jd.call(qg,e)?!0:jd.call(Kg,e)?!1:o2.test(e)?qg[e]=!0:(Kg[e]=!0,!1)}function a2(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 l2(e,t,n,r){if(t===null||typeof t>"u"||a2(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 zt(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Et[e]=new zt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Et[t]=new zt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Et[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Et[e]=new zt(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){Et[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Et[e]=new zt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Et[e]=new zt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Et[e]=new zt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Et[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ih=/[\-:]([a-z])/g;function Mh(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(Ih,Mh);Et[t]=new zt(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(Ih,Mh);Et[t]=new zt(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(Ih,Mh);Et[t]=new zt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Et[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});Et.xlinkHref=new zt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Et[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dh(e,t,n,r){var i=Et.hasOwnProperty(t)?Et[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` `+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Pf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Rs(e):""}function u2(e){switch(e.tag){case 5:return Rs(e.type);case 16:return Rs("Lazy");case 13:return Rs("Suspense");case 19:return Rs("SuspenseList");case 0:case 2:case 15:return e=Nf(e.type,!1),e;case 11:return e=Nf(e.type.render,!1),e;case 1:return e=Nf(e.type,!0),e;default:return""}}function Ud(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 Xi:return"Fragment";case Qi:return"Portal";case Bd:return"Profiler";case zh:return"StrictMode";case Fd:return"Suspense";case Vd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Eb:return(e.displayName||"Context")+".Consumer";case kb:return(e._context.displayName||"Context")+".Provider";case jh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bh:return t=e.displayName||null,t!==null?t:Ud(e.type)||"Memo";case Pr:t=e._payload,e=e._init;try{return Ud(e(t))}catch{}}return null}function c2(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 Ud(t);case 8:return t===zh?"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 Gr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function f2(e){var t=Rb(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 i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.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 Ya(e){e._valueTracker||(e._valueTracker=f2(e))}function Cb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Rb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function su(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 Hd(e,t){var n=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Gr(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 Ab(e,t){t=t.checked,t!=null&&Dh(e,"checked",t,!1)}function Wd(e,t){Ab(e,t);var n=Gr(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")?Kd(e,t.type,n):t.hasOwnProperty("defaultValue")&&Kd(e,t.type,Gr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qg(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 Kd(e,t,n){(t!=="number"||su(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Cs=Array.isArray;function fo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Qa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Is={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},d2=["Webkit","ms","Moz","O"];Object.keys(Is).forEach(function(e){d2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Is[t]=Is[e]})});function $b(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Is.hasOwnProperty(e)&&Is[e]?(""+t).trim():t+"px"}function Lb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=$b(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var p2=Je({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 Yd(e,t){if(t){if(p2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function Qd(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 Xd=null;function Fh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zd=null,po=null,ho=null;function Jg(e){if(e=Ta(e)){if(typeof Zd!="function")throw Error(U(280));var t=e.stateNode;t&&(t=ec(t),Zd(e.stateNode,e.type,t))}}function Ib(e){po?ho?ho.push(e):ho=[e]:po=e}function Mb(){if(po){var e=po,t=ho;if(ho=po=null,Jg(e),t)for(e=0;e>>=0,e===0?32:31-(k2(e)/E2|0)|0}var Xa=64,Za=4194304;function As(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 cu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=As(a):(o&=s,o!==0&&(r=As(o)))}else s=n&~i,s!==0?r=As(s):o!==0&&(r=As(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&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 ka(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zn(t),e[t]=n}function A2(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=Ds),ly=String.fromCharCode(32),uy=!1;function nw(e,t){switch(e){case"keyup":return rT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function oT(e,t){switch(e){case"compositionend":return rw(t);case"keypress":return t.which!==32?null:(uy=!0,ly);case"textInput":return e=t.data,e===ly&&uy?null:e;default:return null}}function sT(e,t){if(Zi)return e==="compositionend"||!Yh&&nw(e,t)?(e=ew(),Dl=Kh=Dr=null,Zi=!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=py(n)}}function aw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?aw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lw(){for(var e=window,t=su();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=su(e.document)}return t}function Qh(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 mT(e){var t=lw(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&aw(n.ownerDocument.documentElement,n)){if(r!==null&&Qh(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 i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=hy(n,o);var s=hy(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>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,Ji=null,ip=null,js=null,op=!1;function my(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;op||Ji==null||Ji!==su(r)||(r=Ji,"selectionStart"in r&&Qh(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}),js&&ia(js,r)||(js=r,r=pu(ip,"onSelect"),0no||(e.current=fp[no],fp[no]=null,no--)}function De(e,t){no++,fp[no]=e.current,e.current=t}var Yr={},Ot=Zr(Yr),Ht=Zr(!1),Si=Yr;function ko(e,t){var n=e.type.contextTypes;if(!n)return Yr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Wt(e){return e=e.childContextTypes,e!=null}function mu(){Ue(Ht),Ue(Ot)}function Sy(e,t,n){if(Ot.current!==Yr)throw Error(U(168));De(Ot,t),De(Ht,n)}function yw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(U(108,c2(e)||"Unknown",i));return Je({},n,r)}function gu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yr,Si=Ot.current,De(Ot,e),De(Ht,Ht.current),!0}function _y(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=yw(e,t,Si),r.__reactInternalMemoizedMergedChildContext=e,Ue(Ht),Ue(Ot),De(Ot,e)):Ue(Ht),De(Ht,n)}var fr=null,tc=!1,Wf=!1;function vw(e){fr===null?fr=[e]:fr.push(e)}function RT(e){tc=!0,vw(e)}function Jr(){if(!Wf&&fr!==null){Wf=!0;var e=0,t=Ae;try{var n=fr;for(Ae=1;e>=s,i-=s,dr=1<<32-zn(t)+i|n<T?(N=_,_=null):N=_.sibling;var $=d(y,_,v[T],S);if($===null){_===null&&(_=N);break}e&&_&&$.alternate===null&&t(y,_),m=o($,m,T),w===null?k=$:w.sibling=$,w=$,_=N}if(T===v.length)return n(y,_),Ke&&ai(y,T),k;if(_===null){for(;TT?(N=_,_=null):N=_.sibling;var M=d(y,_,$.value,S);if(M===null){_===null&&(_=N);break}e&&_&&M.alternate===null&&t(y,_),m=o(M,m,T),w===null?k=M:w.sibling=M,w=M,_=N}if($.done)return n(y,_),Ke&&ai(y,T),k;if(_===null){for(;!$.done;T++,$=v.next())$=f(y,$.value,S),$!==null&&(m=o($,m,T),w===null?k=$:w.sibling=$,w=$);return Ke&&ai(y,T),k}for(_=r(y,_);!$.done;T++,$=v.next())$=p(_,y,T,$.value,S),$!==null&&(e&&$.alternate!==null&&_.delete($.key===null?T:$.key),m=o($,m,T),w===null?k=$:w.sibling=$,w=$);return e&&_.forEach(function(L){return t(y,L)}),Ke&&ai(y,T),k}function E(y,m,v,S){if(typeof v=="object"&&v!==null&&v.type===Xi&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ga:e:{for(var k=v.key,w=m;w!==null;){if(w.key===k){if(k=v.type,k===Xi){if(w.tag===7){n(y,w.sibling),m=i(w,v.props.children),m.return=y,y=m;break e}}else if(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Pr&&Py(k)===w.type){n(y,w.sibling),m=i(w,v.props),m.ref=fs(y,w,v),m.return=y,y=m;break e}n(y,w);break}else t(y,w);w=w.sibling}v.type===Xi?(m=xi(v.props.children,y.mode,S,v.key),m.return=y,y=m):(S=Wl(v.type,v.key,v.props,null,y.mode,S),S.ref=fs(y,m,v),S.return=y,y=S)}return s(y);case Qi:e:{for(w=v.key;m!==null;){if(m.key===w)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(y,m.sibling),m=i(m,v.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=Jf(v,y.mode,S),m.return=y,y=m}return s(y);case Pr:return w=v._init,E(y,m,w(v._payload),S)}if(Cs(v))return h(y,m,v,S);if(ss(v))return g(y,m,v,S);ol(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(y,m.sibling),m=i(m,v),m.return=y,y=m):(n(y,m),m=Zf(v,y.mode,S),m.return=y,y=m),s(y)):n(y,m)}return E}var To=Tw(!0),Rw=Tw(!1),Ra={},Yn=Zr(Ra),la=Zr(Ra),ua=Zr(Ra);function yi(e){if(e===Ra)throw Error(U(174));return e}function om(e,t){switch(De(ua,t),De(la,e),De(Yn,Ra),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gd(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gd(t,e)}Ue(Yn),De(Yn,t)}function Ro(){Ue(Yn),Ue(la),Ue(ua)}function Cw(e){yi(ua.current);var t=yi(Yn.current),n=Gd(t,e.type);t!==n&&(De(la,e),De(Yn,n))}function sm(e){la.current===e&&(Ue(Yn),Ue(la))}var Qe=Zr(0);function Su(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 Kf=[];function am(){for(var e=0;en?n:4,e(!0);var r=qf.transition;qf.transition={};try{e(!1),t()}finally{Ae=n,qf.transition=r}}function Hw(){return Sn().memoizedState}function NT(e,t,n){var r=Kr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ww(e))Kw(t,n);else if(n=Sw(e,t,n,r),n!==null){var i=Mt();jn(n,e,r,i),qw(n,t,r)}}function OT(e,t,n){var r=Kr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ww(e))Kw(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Bn(a,s)){var l=t.interleaved;l===null?(i.next=i,rm(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Sw(e,t,i,r),n!==null&&(i=Mt(),jn(n,e,r,i),qw(n,t,r))}}function Ww(e){var t=e.alternate;return e===Xe||t!==null&&t===Xe}function Kw(e,t){Bs=_u=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uh(e,n)}}var ku={readContext:xn,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},$T={readContext:xn,useCallback:function(e,t){return Vn().memoizedState=[e,t===void 0?null:t],e},useContext:xn,useEffect:Oy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Fl(4194308,4,jw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fl(4,2,e,t)},useMemo:function(e,t){var n=Vn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vn();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=NT.bind(null,Xe,e),[r.memoizedState,e]},useRef:function(e){var t=Vn();return e={current:e},t.memoizedState=e},useState:Ny,useDebugValue:dm,useDeferredValue:function(e){return Vn().memoizedState=e},useTransition:function(){var e=Ny(!1),t=e[0];return e=PT.bind(null,e[1]),Vn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Xe,i=Vn();if(Ke){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),yt===null)throw Error(U(349));ki&30||Nw(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Oy($w.bind(null,r,o,e),[e]),r.flags|=2048,da(9,Ow.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Vn(),t=yt.identifierPrefix;if(Ke){var n=pr,r=dr;n=(r&~(1<<32-zn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ca++,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[Kn]=t,e[aa]=r,nx(e,t,!1,!1),t.stateNode=e;e:{switch(s=Qd(n,r),n){case"dialog":Be("cancel",e),Be("close",e),i=r;break;case"iframe":case"object":case"embed":Be("load",e),i=r;break;case"video":case"audio":for(i=0;iAo&&(t.flags|=128,r=!0,ds(o,!1),t.lanes=4194304)}else{if(!r)if(e=Su(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ds(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ke)return At(t),null}else 2*ot()-o.renderingStartTime>Ao&&n!==1073741824&&(t.flags|=128,r=!0,ds(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ot(),t.sibling=null,n=Qe.current,De(Qe,r?n&1|2:n&1),t):(At(t),null);case 22:case 23:return vm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Zt&1073741824&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function FT(e,t){switch(Zh(t),t.tag){case 1:return Wt(t.type)&&mu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ro(),Ue(Ht),Ue(Ot),am(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sm(t),null;case 13:if(Ue(Qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Eo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Qe),null;case 4:return Ro(),null;case 10:return nm(t.type._context),null;case 22:case 23:return vm(),null;case 24:return null;default:return null}}var al=!1,Nt=!1,VT=typeof WeakSet=="function"?WeakSet:Set,re=null;function so(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){rt(e,t,r)}else n.current=null}function _p(e,t,n){try{n()}catch(r){rt(e,t,r)}}var Fy=!1;function UT(e,t){if(sp=fu,e=lw(),Qh(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 i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===i&&(a=s),d===o&&++c===r&&(l=s),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ap={focusedElem:e,selectionRange:n},fu=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,E=h.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:$n(t.type,g),E);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(S){rt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return h=Fy,Fy=!1,h}function Fs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&_p(t,n,o)}i=i.next}while(i!==r)}}function ic(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 kp(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 ox(e){var t=e.alternate;t!==null&&(e.alternate=null,ox(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Kn],delete t[aa],delete t[cp],delete t[ET],delete t[TT])),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 sx(e){return e.tag===5||e.tag===3||e.tag===4}function Vy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sx(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 Ep(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=hu));else if(r!==4&&(e=e.child,e!==null))for(Ep(e,t,n),e=e.sibling;e!==null;)Ep(e,t,n),e=e.sibling}function Tp(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(Tp(e,t,n),e=e.sibling;e!==null;)Tp(e,t,n),e=e.sibling}var xt=null,Ln=!1;function Tr(e,t,n){for(n=n.child;n!==null;)ax(e,t,n),n=n.sibling}function ax(e,t,n){if(Gn&&typeof Gn.onCommitFiberUnmount=="function")try{Gn.onCommitFiberUnmount(Qu,n)}catch{}switch(n.tag){case 5:Nt||so(n,t);case 6:var r=xt,i=Ln;xt=null,Tr(e,t,n),xt=r,Ln=i,xt!==null&&(Ln?(e=xt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xt.removeChild(n.stateNode));break;case 18:xt!==null&&(Ln?(e=xt,n=n.stateNode,e.nodeType===8?Hf(e.parentNode,n):e.nodeType===1&&Hf(e,n),na(e)):Hf(xt,n.stateNode));break;case 4:r=xt,i=Ln,xt=n.stateNode.containerInfo,Ln=!0,Tr(e,t,n),xt=r,Ln=i;break;case 0:case 11:case 14:case 15:if(!Nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&_p(n,t,s),i=i.next}while(i!==r)}Tr(e,t,n);break;case 1:if(!Nt&&(so(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){rt(n,t,a)}Tr(e,t,n);break;case 21:Tr(e,t,n);break;case 22:n.mode&1?(Nt=(r=Nt)||n.memoizedState!==null,Tr(e,t,n),Nt=r):Tr(e,t,n);break;default:Tr(e,t,n)}}function Uy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VT),t.forEach(function(r){var i=ZT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Nn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=ot()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*WT(r/1960))-r,10e?16:e,zr===null)var r=!1;else{if(e=zr,zr=null,Ru=0,Ee&6)throw Error(U(331));var i=Ee;for(Ee|=4,re=e.current;re!==null;){var o=re,s=o.child;if(re.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lot()-gm?wi(e,0):mm|=n),Kt(e,t)}function mx(e,t){t===0&&(e.mode&1?(t=Za,Za<<=1,!(Za&130023424)&&(Za=4194304)):t=1);var n=Mt();e=vr(e,t),e!==null&&(ka(e,t,n),Kt(e,n))}function XT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mx(e,n)}function ZT(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(U(314))}r!==null&&r.delete(t),mx(e,n)}var gx;gx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ht.current)Ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ut=!1,jT(e,t,n);Ut=!!(e.flags&131072)}else Ut=!1,Ke&&t.flags&1048576&&bw(t,vu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vl(e,t),e=t.pendingProps;var i=ko(t,Ot.current);go(t,n),i=um(null,t,r,e,i,n);var o=cm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Wt(r)?(o=!0,gu(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,im(t),i.updater=nc,t.stateNode=i,i._reactInternals=t,gp(t,r,e,n),t=bp(null,t,r,!0,o,n)):(t.tag=0,Ke&&o&&Xh(t),It(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=eR(r),e=$n(r,e),i){case 0:t=vp(null,t,r,e,n);break e;case 1:t=zy(null,t,r,e,n);break e;case 11:t=My(null,t,r,e,n);break e;case 14:t=Dy(null,t,r,$n(r.type,e),n);break e}throw Error(U(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$n(r,i),vp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$n(r,i),zy(e,t,r,i,n);case 3:e:{if(Jw(t),e===null)throw Error(U(387));r=t.pendingProps,o=t.memoizedState,i=o.element,_w(e,t),xu(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Co(Error(U(423)),t),t=jy(e,t,r,n,i);break e}else if(r!==i){i=Co(Error(U(424)),t),t=jy(e,t,r,n,i);break e}else for(en=Ur(t.stateNode.containerInfo.firstChild),nn=t,Ke=!0,Mn=null,n=Rw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Eo(),r===i){t=br(e,t,n);break e}It(e,t,r,n)}t=t.child}return t;case 5:return Cw(t),e===null&&pp(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,lp(r,i)?s=null:o!==null&&lp(r,o)&&(t.flags|=32),Zw(e,t),It(e,t,s,n),t.child;case 6:return e===null&&pp(t),null;case 13:return ex(e,t,n);case 4:return om(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=To(t,null,r,n):It(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$n(r,i),My(e,t,r,i,n);case 7:return It(e,t,t.pendingProps,n),t.child;case 8:return It(e,t,t.pendingProps.children,n),t.child;case 12:return It(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,De(bu,r._currentValue),r._currentValue=s,o!==null)if(Bn(o.value,s)){if(o.children===i.children&&!Ht.current){t=br(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=mr(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),hp(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(U(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),hp(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}It(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,go(t,n),i=xn(i),r=r(i),t.flags|=1,It(e,t,r,n),t.child;case 14:return r=t.type,i=$n(r,t.pendingProps),i=$n(r.type,i),Dy(e,t,r,i,n);case 15:return Qw(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:$n(r,i),Vl(e,t),t.tag=1,Wt(r)?(e=!0,gu(t)):e=!1,go(t,n),Ew(t,r,i),gp(t,r,i,n),bp(null,t,r,!0,e,n);case 19:return tx(e,t,n);case 22:return Xw(e,t,n)}throw Error(U(156,t.tag))};function yx(e,t){return Ub(e,t)}function JT(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 bn(e,t,n,r){return new JT(e,t,n,r)}function wm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eR(e){if(typeof e=="function")return wm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jh)return 11;if(e===Bh)return 14}return 2}function qr(e,t){var n=e.alternate;return n===null?(n=bn(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 Wl(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")wm(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Xi:return xi(n.children,i,o,t);case zh:s=8,i|=8;break;case Bd:return e=bn(12,n,t,i|2),e.elementType=Bd,e.lanes=o,e;case Fd:return e=bn(13,n,t,i),e.elementType=Fd,e.lanes=o,e;case Vd:return e=bn(19,n,t,i),e.elementType=Vd,e.lanes=o,e;case Tb:return sc(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case kb:s=10;break e;case Eb:s=9;break e;case jh:s=11;break e;case Bh:s=14;break e;case Pr:s=16,r=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=bn(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function xi(e,t,n,r){return e=bn(7,e,r,t),e.lanes=n,e}function sc(e,t,n,r){return e=bn(22,e,r,t),e.elementType=Tb,e.lanes=n,e.stateNode={isHidden:!1},e}function Zf(e,t,n){return e=bn(6,e,null,t),e.lanes=n,e}function Jf(e,t,n){return t=bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tR(e,t,n,r,i){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=$f(0),this.expirationTimes=$f(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$f(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xm(e,t,n,r,i,o,s,a,l){return e=new tR(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=bn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},im(o),e}function nR(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xx)}catch(e){console.error(e)}}xx(),bb.exports=sn;var Em=bb.exports;const Ns=Sa(Em);var Xy=Em;zd.createRoot=Xy.createRoot,zd.hydrateRoot=Xy.hydrateRoot;function aR(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var lR=aR,ve=lR;function uR(e){return!!e&&typeof e.then=="function"}var Ve=uR;function cR(e,t){if(e!=null)return e;throw ve(t??"Got unexpected null or undefined")}var qe=cR;function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class fc{getValue(){throw ve("BaseLoadable")}toPromise(){throw ve("BaseLoadable")}valueMaybe(){throw ve("BaseLoadable")}valueOrThrow(){throw ve(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw ve("BaseLoadable")}promiseOrThrow(){throw ve(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw ve("BaseLoadable")}errorOrThrow(){throw ve(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw ve("BaseLoadable")}}class fR extends fc{constructor(t){super(),he(this,"state","hasValue"),he(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 Ve(n)?Ri(n):Po(n)?n:Ca(n)}catch(n){return Ve(n)?Ri(n.next(()=>this.map(t))):dc(n)}}}class dR extends fc{constructor(t){super(),he(this,"state","hasError"),he(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 Sx extends fc{constructor(t){super(),he(this,"state","loading"),he(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 Ri(this.contents.then(n=>{const r=t(n);if(Po(r)){const i=r;switch(i.state){case"hasValue":return i.contents;case"hasError":throw i.contents;case"loading":return i.contents}}return r}).catch(n=>{if(Ve(n))return n.then(()=>this.map(t).contents);throw n}))}}function Ca(e){return Object.freeze(new fR(e))}function dc(e){return Object.freeze(new dR(e))}function Ri(e){return Object.freeze(new Sx(e))}function _x(){return Object.freeze(new Sx(new Promise(()=>{})))}function pR(e){return e.every(t=>t.state==="hasValue")?Ca(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?dc(qe(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):Ri(Promise.all(e.map(t=>t.contents)))}function kx(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(i=>e[i])).map(i=>Po(i)?i:Ve(i)?Ri(i):Ca(i)),r=pR(n);return Array.isArray(e)?r:r.map(i=>Object.getOwnPropertyNames(e).reduce((o,s,a)=>({...o,[s]:i[a]}),{}))}function Po(e){return e instanceof fc}const hR={of:e=>Ve(e)?Ri(e):Po(e)?e:Ca(e),error:e=>dc(e),loading:()=>_x(),all:kx,isLoadable:Po};var Oi={loadableWithValue:Ca,loadableWithError:dc,loadableWithPromise:Ri,loadableLoading:_x,loadableAll:kx,isLoadable:Po,RecoilLoadable:hR},mR=Oi.loadableWithValue,gR=Oi.loadableWithError,yR=Oi.loadableWithPromise,vR=Oi.loadableLoading,bR=Oi.loadableAll,wR=Oi.isLoadable,xR=Oi.RecoilLoadable,Aa=Object.freeze({__proto__:null,loadableWithValue:mR,loadableWithError:gR,loadableWithPromise:yR,loadableLoading:vR,loadableAll:bR,isLoadable:wR,RecoilLoadable:xR});const Np={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 SR(e,t){var n,r;const i=(n=process.env[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(i==null||i==="")return;if(!["true","false"].includes(i))throw ve(`({}).${e} value must be 'true', 'false', or empty: ${i}`);t(i==="true")}function _R(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 kR(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(SR("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{Np.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),_R("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{Np.RECOIL_GKS_ENABLED.add(n)})}))}kR();var Vo=Np;function pc(e){return Vo.RECOIL_GKS_ENABLED.has(e)}pc.setPass=e=>{Vo.RECOIL_GKS_ENABLED.add(e)};pc.setFail=e=>{Vo.RECOIL_GKS_ENABLED.delete(e)};pc.clear=()=>{Vo.RECOIL_GKS_ENABLED.clear()};var Ie=pc;function ER(e,t,{error:n}={}){return null}var TR=ER,Tm=TR,ed,td,nd;const RR=(ed=X.createMutableSource)!==null&&ed!==void 0?ed:X.unstable_createMutableSource,Ex=(td=X.useMutableSource)!==null&&td!==void 0?td:X.unstable_useMutableSource,Tx=(nd=X.useSyncExternalStore)!==null&&nd!==void 0?nd:X.unstable_useSyncExternalStore;function CR(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=X.__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 AR(){return Ie("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Ie("recoil_sync_external_store")&&Tx!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Ie("recoil_mutable_source")&&Ex!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Ie("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Ie("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function PR(){return!1}var Pa={createMutableSource:RR,useMutableSource:Ex,useSyncExternalStore:Tx,currentRendererSupportsUseSyncExternalStore:CR,reactMode:AR,isFastRefreshEnabled:PR};class Rm{constructor(t){he(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class Rx extends Rm{}class Cx extends Rm{}function NR(e){return e instanceof Rx||e instanceof Cx}var hc={AbstractRecoilValue:Rm,RecoilState:Rx,RecoilValueReadOnly:Cx,isRecoilValue:NR},OR=hc.AbstractRecoilValue,$R=hc.RecoilState,LR=hc.RecoilValueReadOnly,IR=hc.isRecoilValue,No=Object.freeze({__proto__:null,AbstractRecoilValue:OR,RecoilState:$R,RecoilValueReadOnly:LR,isRecoilValue:IR});function MR(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var mc=MR;class Ax{}const DR=new Ax,Ci=new Map,Cm=new Map;function zR(e){return mc(e,t=>qe(Cm.get(t)))}function jR(e){if(Ci.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 BR(e){Vo.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&jR(e.key),Ci.set(e.key,e);const t=e.set==null?new No.RecoilValueReadOnly(e.key):new No.RecoilState(e.key);return Cm.set(e.key,t),t}class Px extends Error{}function FR(e){const t=Ci.get(e);if(t==null)throw new Px(`Missing definition for RecoilValue: "${e}""`);return t}function VR(e){return Ci.get(e)}const Pu=new Map;function UR(e){var t;if(!Ie("recoil_memory_managament_2020"))return;const n=Ci.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Ci.delete(e),(r=Nx(e))===null||r===void 0||r(),Pu.delete(e)}}function HR(e,t){Ie("recoil_memory_managament_2020")&&(t===void 0?Pu.delete(e):Pu.set(e,t))}function Nx(e){return Pu.get(e)}var Qt={nodes:Ci,recoilValues:Cm,registerNode:BR,getNode:FR,getNodeMaybe:VR,deleteNodeConfigIfPossible:UR,setConfigDeletionHandler:HR,getConfigDeletionHandler:Nx,recoilValuesForKeys:zR,NodeMissingError:Px,DefaultValue:Ax,DEFAULT_VALUE:DR};function WR(e,t){t()}var KR={enqueueExecution:WR};function qR(e,t){return t={exports:{}},e(t,t.exports),t.exports}var GR=qR(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},n={},r=5,i=Math.pow(2,r),o=i-1,s=i/2,a=i/4,l={},u=function(R){return function(){return R}},c=n.hash=function(P){var R=typeof P>"u"?"undefined":t(P);if(R==="number")return P;R!=="string"&&(P+="");for(var B=0,ee=0,te=P.length;ee>1&1431655765,R=(R&858993459)+(R>>2&858993459),R=R+(R>>4)&252645135,R+=R>>8,R+=R>>16,R&127},d=function(R,B){return B>>>R&o},p=function(R){return 1<=B;)te[de--]=te[de];return te[B]=ee,te}for(var ce=0,fe=0,xe=new Array(ie+1);ce>>=1;return de[B]=ee,M(R,fe+1,de)},H=function(R,B,ee,te){for(var ie=new Array(B-1),de=0,ce=0,fe=0,xe=te.length;fe1?N(R,this.hash,xe):xe[0]}var He=te();return He===l?this:(++ce.value,V(R,ee,this.hash,this,ie,T(R,ie,de,He)))},x=function(R,B,ee,te,ie,de,ce){var fe=this.mask,xe=this.children,He=d(ee,ie),jt=p(He),mt=h(fe,jt),cn=fe&jt,Pn=cn?xe[mt]:w,Di=Pn._modify(R,B,ee+r,te,ie,de,ce);if(Pn===Di)return this;var Ka=Z(R,this),is=fe,os=void 0;if(cn&&_(Di)){if(is&=~jt,!is)return w;if(xe.length<=2&&L(xe[mt^1]))return xe[mt^1];os=E(Ka,mt,xe)}else if(!cn&&!_(Di)){if(xe.length>=s)return j(R,He,Di,fe,xe);is|=jt,os=y(Ka,mt,Di,xe)}else os=g(Ka,mt,Di,xe);return Ka?(this.mask=is,this.children=os,this):$(R,is,os)},le=function(R,B,ee,te,ie,de,ce){var fe=this.size,xe=this.children,He=d(ee,ie),jt=xe[He],mt=(jt||w)._modify(R,B,ee+r,te,ie,de,ce);if(jt===mt)return this;var cn=Z(R,this),Pn=void 0;if(_(jt)&&!_(mt))++fe,Pn=g(cn,He,mt,xe);else if(!_(jt)&&_(mt)){if(--fe,fe<=a)return H(R,fe,He,xe);Pn=g(cn,He,w,xe)}else Pn=g(cn,He,mt,xe);return cn?(this.size=fe,this.children=Pn,this):M(R,fe,Pn)};w._modify=function(P,R,B,ee,te,ie,de){var ce=ee();return ce===l?w:(++de.value,T(P,te,ie,ce))};function C(P,R,B,ee,te){this._editable=P,this._edit=R,this._config=B,this._root=ee,this._size=te}C.prototype.setTree=function(P,R){return this._editable?(this._root=P,this._size=R,this):P===this._root?this:new C(this._editable,this._edit,this._config,P,R)};var b=n.tryGetHash=function(P,R,B,ee){for(var te=ee._root,ie=0,de=ee._config.keyEq;;)switch(te.type){case m:return de(B,te.key)?te.value:P;case v:{if(R===te.hash)for(var ce=te.children,fe=0,xe=ce.length;fe{n.set(i,t(r,i))}),n}var Nu=eC;function tC(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function nC(e){return{nodeDeps:Nu(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:Nu(e.nodeToNodeSubscriptions,t=>new Set(t))}}function rd(e,t,n,r){const{nodeDeps:i,nodeToNodeSubscriptions:o}=n,s=i.get(e);if(s&&r&&s!==r.nodeDeps.get(e))return;i.set(e,t);const a=s==null?t:Hs(t,s);for(const l of a)o.has(l)||o.set(l,new Set),qe(o.get(l)).add(e);if(s){const l=Hs(s,t);for(const u of l){if(!o.has(u))return;const c=qe(o.get(u));c.delete(e),c.size===0&&o.delete(u)}}}function rC(e,t,n,r){var i,o,s,a;const l=n.getState();r===l.currentTree.version||r===((i=l.nextTree)===null||i===void 0?void 0:i.version)||((o=l.previousTree)===null||o===void 0||o.version);const u=n.getGraph(r);if(rd(e,t,u),r===((s=l.previousTree)===null||s===void 0?void 0:s.version)){const f=n.getGraph(l.currentTree.version);rd(e,t,f,u)}if(r===((a=l.previousTree)===null||a===void 0?void 0:a.version)||r===l.currentTree.version){var c;const f=(c=l.nextTree)===null||c===void 0?void 0:c.version;if(f!==void 0){const d=n.getGraph(f);rd(e,t,d,u)}}}var Na={cloneGraph:nC,graph:tC,saveDepsToStore:rC};let iC=0;const oC=()=>iC++;let sC=0;const aC=()=>sC++;let lC=0;const uC=()=>lC++;var gc={getNextTreeStateVersion:oC,getNextStoreID:aC,getNextComponentID:uC};const{persistentMap:Zy}=ZR,{graph:cC}=Na,{getNextTreeStateVersion:Ox}=gc;function $x(){const e=Ox();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Zy(),nonvalidatedAtoms:Zy()}}function fC(){const e=$x();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,cC()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var Lx={makeEmptyTreeState:$x,makeEmptyStoreState:fC,getNextTreeStateVersion:Ox};class Ix{}function dC(){return new Ix}var yc={RetentionZone:Ix,retentionZone:dC};function pC(e,t){const n=new Set(e);return n.add(t),n}function hC(e,t){const n=new Set(e);return n.delete(t),n}function mC(e,t,n){const r=new Map(e);return r.set(t,n),r}function gC(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function yC(e,t){const n=new Map(e);return n.delete(t),n}function vC(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var Mx={setByAddingToSet:pC,setByDeletingFromSet:hC,mapBySettingInMap:mC,mapByUpdatingInMap:gC,mapByDeletingFromMap:yC,mapByDeletingMultipleFromMap:vC};function*bC(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var Nm=bC;function wC(e,t){return new Proxy(e,{get:(r,i)=>(!(i in r)&&i in t&&(r[i]=t[i]()),r[i]),ownKeys:r=>Object.keys(r)})}var Dx=wC;const{getNode:Oa,getNodeMaybe:xC,recoilValuesForKeys:Jy}=Qt,{RetentionZone:ev}=yc,{setByAddingToSet:SC}=Mx,_C=Object.freeze(new Set);class kC extends Error{}function EC(e,t,n){if(!Ie("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function i(o){let s=r.get(o);s||r.set(o,s=new Set),s.add(t)}if(n instanceof ev)i(n);else if(Array.isArray(n))for(const o of n)i(o);return()=>{if(!Ie("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function s(a){const l=o.nodesRetainedByZone.get(a);l==null||l.delete(t),l&&l.size===0&&o.nodesRetainedByZone.delete(a)}if(n instanceof ev)s(n);else if(Array.isArray(n))for(const a of n)s(a)}}function Om(e,t,n,r){const i=e.getState();if(i.nodeCleanupFunctions.has(n))return;const o=Oa(n),s=EC(e,n,o.retainedBy),a=o.init(e,t,r);i.nodeCleanupFunctions.set(n,()=>{a(),s()})}function TC(e,t,n){Om(e,e.getState().currentTree,t,n)}function RC(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function CC(e,t,n){return Om(e,t,n,"get"),Oa(n).get(e,t)}function zx(e,t,n){return Oa(n).peek(e,t)}function AC(e,t,n){var r;const i=xC(t);return i==null||(r=i.invalidate)===null||r===void 0||r.call(i,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:SC(e.dirtyAtoms,t)}}function PC(e,t,n,r){const i=Oa(n);if(i.set==null)throw new kC(`Attempt to set read-only RecoilValue: ${n}`);const o=i.set;return Om(e,t,n,"set"),o(e,t,r)}function NC(e,t,n){const r=e.getState(),i=e.getGraph(t.version),o=Oa(n).nodeType;return Dx({type:o},{loadable:()=>zx(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>o==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var s;return Jy((s=i.nodeDeps.get(n))!==null&&s!==void 0?s:[])},subscribers:()=>{var s,a;return{nodes:Jy(Nm(jx(e,t,new Set([n])),l=>l!==n)),components:mc((s=(a=r.nodeToComponentSubscriptions.get(n))===null||a===void 0?void 0:a.values())!==null&&s!==void 0?s:[],([l])=>({name:l}))}}})}function jx(e,t,n){const r=new Set,i=Array.from(n),o=e.getGraph(t.version);for(let a=i.pop();a;a=i.pop()){var s;r.add(a);const l=(s=o.nodeToNodeSubscriptions.get(a))!==null&&s!==void 0?s:_C;for(const u of l)r.has(u)||i.push(u)}return r}var ei={getNodeLoadable:CC,peekNodeLoadable:zx,setNodeValue:PC,initializeNode:TC,cleanUpNode:RC,setUnvalidatedAtomValue_DEPRECATED:AC,peekNodeInfo:NC,getDownstreamNodes:jx};let Bx=null;function OC(e){Bx=e}function $C(){var e;(e=Bx)===null||e===void 0||e()}var Fx={setInvalidateMemoizedSnapshot:OC,invalidateMemoizedSnapshot:$C};const{getDownstreamNodes:LC,getNodeLoadable:Vx,setNodeValue:IC}=ei,{getNextComponentID:MC}=gc,{getNode:DC,getNodeMaybe:Ux}=Qt,{DefaultValue:$m}=Qt,{reactMode:zC}=Pa,{AbstractRecoilValue:jC,RecoilState:BC,RecoilValueReadOnly:FC,isRecoilValue:VC}=No,{invalidateMemoizedSnapshot:UC}=Fx;function HC(e,{key:t},n=e.getState().currentTree){var r,i;const o=e.getState();n.version===o.currentTree.version||n.version===((r=o.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(i=o.previousTree)===null||i===void 0||i.version);const s=Vx(e,n,t);return s.state==="loading"&&s.contents.catch(()=>{}),s}function WC(e,t){const n=e.clone();return t.forEach((r,i)=>{r.state==="hasValue"&&r.contents instanceof $m?n.delete(i):n.set(i,r)}),n}function KC(e,t,{key:n},r){if(typeof r=="function"){const i=Vx(e,t,n);if(i.state==="loading"){const o=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw ve(o)}else if(i.state==="hasError")throw i.contents;return r(i.contents)}else return r}function qC(e,t,n){if(n.type==="set"){const{recoilValue:i,valueOrUpdater:o}=n,s=KC(e,t,i,o),a=IC(e,t,i.key,s);for(const[l,u]of a.entries())Op(t,l,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:i},loadable:o}=n;Op(t,i,o)}else if(n.type==="markModified"){const{recoilValue:{key:i}}=n;t.dirtyAtoms.add(i)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:i},unvalidatedValue:o}=n,s=Ux(i);s==null||(r=s.invalidate)===null||r===void 0||r.call(s,t),t.atomValues.delete(i),t.nonvalidatedAtoms.set(i,o),t.dirtyAtoms.add(i)}else Tm(`Unknown action ${n.type}`)}function Op(e,t,n){n.state==="hasValue"&&n.contents instanceof $m?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function Hx(e,t){e.replaceState(n=>{const r=Wx(n);for(const i of t)qC(e,r,i);return Kx(e,r),UC(),r})}function vc(e,t){if(Ws.length){const n=Ws[Ws.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else Hx(e,[t])}const Ws=[];function GC(){const e=new Map;return Ws.push(e),()=>{for(const[t,n]of e)Hx(t,n);Ws.pop()}}function Wx(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function Kx(e,t){const n=LC(e,t,t.dirtyAtoms);for(const o of n){var r,i;(r=Ux(o))===null||r===void 0||(i=r.invalidate)===null||i===void 0||i.call(r,t)}}function qx(e,t,n){vc(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function YC(e,t,n){if(n instanceof $m)return qx(e,t,n);vc(e,{type:"setLoadable",recoilValue:t,loadable:n})}function QC(e,t){vc(e,{type:"markModified",recoilValue:t})}function XC(e,t,n){vc(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function ZC(e,{key:t},n,r=null){const i=MC(),o=e.getState();o.nodeToComponentSubscriptions.has(t)||o.nodeToComponentSubscriptions.set(t,new Map),qe(o.nodeToComponentSubscriptions.get(t)).set(i,[r??"",n]);const s=zC();if(s.early&&(s.mode==="LEGACY"||s.mode==="MUTABLE_SOURCE")){const a=e.getState().nextTree;a&&a.dirtyAtoms.has(t)&&n(a)}return{release:()=>{const a=e.getState(),l=a.nodeToComponentSubscriptions.get(t);l===void 0||!l.has(i)||(l.delete(i),l.size===0&&a.nodeToComponentSubscriptions.delete(t))}}}function JC(e,t){var n;const{currentTree:r}=e.getState(),i=DC(t.key);(n=i.clearCache)===null||n===void 0||n.call(i,e,r)}var ir={RecoilValueReadOnly:FC,AbstractRecoilValue:jC,RecoilState:BC,getRecoilValueAsLoadable:HC,setRecoilValue:qx,setRecoilValueLoadable:YC,markRecoilValueModified:QC,setUnvalidatedRecoilValue:XC,subscribeToRecoilValue:ZC,isRecoilValue:VC,applyAtomValueWrites:WC,batchStart:GC,writeLoadableToTreeState:Op,invalidateDownstreams:Kx,copyTreeState:Wx,refreshRecoilValue:JC};function eA(e,t,n){const r=e.entries();let i=r.next();for(;!i.done;){const o=i.value;if(t.call(n,o[1],o[0],e))return!0;i=r.next()}return!1}var tA=eA;const{cleanUpNode:nA}=ei,{deleteNodeConfigIfPossible:rA,getNode:Gx}=Qt,{RetentionZone:Yx}=yc,iA=12e4,Qx=new Set;function Xx(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const i=new Set;for(const s of t)if(s instanceof Yx)for(const a of lA(n,s))i.add(a);else i.add(s);const o=oA(e,i);for(const s of o)aA(e,r,s)}function oA(e,t){const n=e.getState(),r=n.currentTree,i=e.getGraph(r.version),o=new Set,s=new Set;return a(t),o;function a(l){const u=new Set,c=sA(e,r,l,o,s);for(const h of c){var f;if(Gx(h).retainedBy==="recoilRoot"){s.add(h);continue}if(((f=n.retention.referenceCounts.get(h))!==null&&f!==void 0?f:0)>0){s.add(h);continue}if(Zx(h).some(E=>n.retention.referenceCounts.get(E))){s.add(h);continue}const g=i.nodeToNodeSubscriptions.get(h);if(g&&tA(g,E=>s.has(E))){s.add(h);continue}o.add(h),u.add(h)}const d=new Set;for(const h of u)for(const g of(p=i.nodeDeps.get(h))!==null&&p!==void 0?p:Qx){var p;o.has(g)||d.add(g)}d.size&&a(d)}}function sA(e,t,n,r,i){const o=e.getGraph(t.version),s=[],a=new Set;for(;n.size>0;)l(qe(n.values().next().value));return s;function l(u){if(r.has(u)||i.has(u)){n.delete(u);return}if(a.has(u))return;const c=o.nodeToNodeSubscriptions.get(u);if(c)for(const f of c)l(f);a.add(u),n.delete(u),s.push(u)}}function aA(e,t,n){if(!Ie("recoil_memory_managament_2020"))return;nA(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const i=Zx(n);for(const l of i){var o;(o=r.retention.nodesRetainedByZone.get(l))===null||o===void 0||o.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const s=r.graphsByVersion.get(t.version);if(s){const l=s.nodeDeps.get(n);if(l!==void 0){s.nodeDeps.delete(n);for(const u of l){var a;(a=s.nodeToNodeSubscriptions.get(u))===null||a===void 0||a.delete(n)}}s.nodeToNodeSubscriptions.delete(n)}rA(n)}function lA(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:Qx}function Zx(e){const t=Gx(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof Yx?[t]:t}function uA(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):Xx(e,new Set([t]))}function cA(e,t,n){var r;if(!Ie("recoil_memory_managament_2020"))return;const i=e.getState().retention.referenceCounts,o=((r=i.get(t))!==null&&r!==void 0?r:0)+n;o===0?Jx(e,t):i.set(t,o)}function Jx(e,t){if(!Ie("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),uA(e,t)}function fA(e){if(!Ie("recoil_memory_managament_2020"))return;const t=e.getState();Xx(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function dA(e){return e===void 0?"recoilRoot":e}var $i={SUSPENSE_TIMEOUT_MS:iA,updateRetainCount:cA,updateRetainCountToZero:Jx,releaseScheduledRetainablesNow:fA,retainedByOptionWithDefault:dA};const{unstable_batchedUpdates:pA}=Ns;var hA={unstable_batchedUpdates:pA};const{unstable_batchedUpdates:mA}=hA;var gA={unstable_batchedUpdates:mA};const{batchStart:yA}=ir,{unstable_batchedUpdates:vA}=gA;let Lm=vA||(e=>e());const bA=e=>{Lm=e},wA=()=>Lm,xA=e=>{Lm(()=>{let t=()=>{};try{t=yA(),e()}finally{t()}})};var bc={getBatcher:wA,setBatcher:bA,batchUpdates:xA};function*SA(e){for(const t of e)for(const n of t)yield n}var eS=SA;const tS=typeof Window>"u"||typeof window>"u",_A=e=>!tS&&(e===window||e instanceof Window),kA=typeof navigator<"u"&&navigator.product==="ReactNative";var wc={isSSR:tS,isReactNative:kA,isWindow:_A};function EA(e,t){let n;return(...r)=>{n||(n={});const i=t(...r);return Object.hasOwnProperty.call(n,i)||(n[i]=e(...r)),n[i]}}function TA(e,t){let n,r;return(...i)=>{const o=t(...i);return n===o||(n=o,r=e(...i)),r}}function RA(e,t){let n,r;return[(...s)=>{const a=t(...s);return n===a||(n=a,r=e(...s)),r},()=>{n=null}]}var CA={memoizeWithArgsHash:EA,memoizeOneWithArgsHash:TA,memoizeOneWithArgsHashAndInvalidation:RA};const{batchUpdates:$p}=bc,{initializeNode:AA,peekNodeInfo:PA}=ei,{graph:NA}=Na,{getNextStoreID:OA}=gc,{DEFAULT_VALUE:$A,recoilValues:tv,recoilValuesForKeys:nv}=Qt,{AbstractRecoilValue:LA,getRecoilValueAsLoadable:IA,setRecoilValue:rv,setUnvalidatedRecoilValue:MA}=ir,{updateRetainCount:Kl}=$i,{setInvalidateMemoizedSnapshot:DA}=Fx,{getNextTreeStateVersion:zA,makeEmptyStoreState:jA}=Lx,{isSSR:BA}=wc,{memoizeOneWithArgsHashAndInvalidation:FA}=CA;class xc{constructor(t,n){he(this,"_store",void 0),he(this,"_refCount",1),he(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),IA(this._store,r))),he(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),he(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 nv(s.dirtyAtoms)}const i=this._store.getState().knownAtoms,o=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?tv.values():r.isInitialized===!0?nv(eS([i,o])):Nm(tv.values(),({key:s})=>!i.has(s)&&!o.has(s))}),he(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),PA(this._store,this._store.getState().currentTree,r))),he(this,"map",r=>{this.checkRefCount_INTERNAL();const i=new Lp(this,$p);return r(i),i}),he(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const i=new Lp(this,$p);return i.retain(),await r(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:OA(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const i=t.graphsByVersion;if(i.has(r))return qe(i.get(r));const o=NA();return i.set(r,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw ve("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)AA(this._store,r,"get"),Kl(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){BA||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(),!Ie("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Ie("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 nS(e,t,n=!1){const r=e.getState(),i=n?zA():t.version;return{currentTree:{version:n?i:t.version,stateID:n?i: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(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(mc(r.nodeCleanupFunctions.entries(),([o])=>[o,()=>{}]))}}function VA(e){const t=new xc(jA());return e!=null?t.map(e):t}const[iv,rS]=FA((e,t)=>{var n;const r=e.getState(),i=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:qe(r.previousTree);return new xc(nS(e,i),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)});DA(rS);function UA(e,t="latest"){const n=iv(e,t);return n.isRetained()?n:(rS(),iv(e,t))}class Lp extends xc{constructor(t,n){super(nS(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),he(this,"_batch",void 0),he(this,"set",(r,i)=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{Kl(o,r.key,1),rv(this.getStore_INTERNAL(),r,i)})}),he(this,"reset",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{Kl(i,r.key,1),rv(this.getStore_INTERNAL(),r,$A)})}),he(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();$p(()=>{for(const[o,s]of r.entries())Kl(i,o,1),MA(i,new LA(o),s)})}),this._batch=n}}var Sc={Snapshot:xc,MutableSnapshot:Lp,freshSnapshot:VA,cloneSnapshot:UA},HA=Sc.Snapshot,WA=Sc.MutableSnapshot,KA=Sc.freshSnapshot,qA=Sc.cloneSnapshot,_c=Object.freeze({__proto__:null,Snapshot:HA,MutableSnapshot:WA,freshSnapshot:KA,cloneSnapshot:qA});function GA(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var YA=GA;const{useRef:QA}=X;function XA(e){const t=QA(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var ov=XA;const{getNextTreeStateVersion:ZA,makeEmptyStoreState:iS}=Lx,{cleanUpNode:JA,getDownstreamNodes:eP,initializeNode:tP,setNodeValue:nP,setUnvalidatedAtomValue_DEPRECATED:rP}=ei,{graph:iP}=Na,{cloneGraph:oP}=Na,{getNextStoreID:oS}=gc,{createMutableSource:id,reactMode:sS}=Pa,{applyAtomValueWrites:sP}=ir,{releaseScheduledRetainablesNow:aS}=$i,{freshSnapshot:aP}=_c,{useCallback:lP,useContext:lS,useEffect:Ip,useMemo:uP,useRef:cP,useState:fP}=X;function hs(){throw ve("This component must be used inside a component.")}const uS=Object.freeze({storeID:oS(),getState:hs,replaceState:hs,getGraph:hs,subscribeToTransactions:hs,addTransactionMetadata:hs});let Mp=!1;function sv(e){if(Mp)throw ve("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){Ie("recoil_memory_managament_2020")&&Ie("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&aS(e);const n=t.currentTree.version,r=ZA();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,oP(qe(t.graphsByVersion.get(n))))}}const cS=X.createContext({current:uS}),kc=()=>lS(cS),fS=X.createContext(null);function dP(){return lS(fS)}function Im(e,t,n){const r=eP(e,n,n.dirtyAtoms);for(const i of r){const o=t.nodeToComponentSubscriptions.get(i);if(o)for(const[s,[a,l]]of o)l(n)}}function dS(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[i,o]of t.nodeTransactionSubscriptions)if(r.has(i))for(const[s,a]of o)a(e);for(const[i,o]of t.transactionSubscriptions)o(e);(!sS().early||t.suspendedComponentResolvers.size>0)&&(Im(e,t,n),t.suspendedComponentResolvers.forEach(i=>i()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function pP(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,dS(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):Tm("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Ie("recoil_memory_managament_2020")&&n==null&&aS(e)}finally{t.commitDepth--}}function hP({setNotifyBatcherOfChange:e}){const t=kc(),[,n]=fP([]);return e(()=>n({})),Ip(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),Ip(()=>{KR.enqueueExecution("Batcher",()=>{pP(t.current)})}),null}function mP(e,t){const n=iS();return t({set:(r,i)=>{const o=n.currentTree,s=nP(e,o,r.key,i),a=new Set(s.keys()),l=o.nonvalidatedAtoms.clone();for(const u of a)l.delete(u);n.currentTree={...o,dirtyAtoms:YA(o.dirtyAtoms,a),atomValues:sP(o.atomValues,s),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((i,o)=>{n.currentTree=rP(n.currentTree,o,i)})}}),n}function gP(e){const t=aP(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let av=0;function yP({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let i;const o=p=>{const h=i.current.graphsByVersion;if(h.has(p))return qe(h.get(p));const g=iP();return h.set(p,g),g},s=(p,h)=>{if(h==null){const{transactionSubscriptions:g}=f.current.getState(),E=av++;return g.set(E,p),{release:()=>{g.delete(E)}}}else{const{nodeTransactionSubscriptions:g}=f.current.getState();g.has(h)||g.set(h,new Map);const E=av++;return qe(g.get(h)).set(E,p),{release:()=>{const y=g.get(h);y&&(y.delete(E),y.size===0&&g.delete(h))}}}},a=p=>{sv(f.current);for(const h of Object.keys(p))qe(f.current.getState().nextTree).transactionMetadata[h]=p[h]},l=p=>{sv(f.current);const h=qe(i.current.nextTree);let g;try{Mp=!0,g=p(h)}finally{Mp=!1}g!==h&&(i.current.nextTree=g,sS().early&&Im(f.current,i.current,g),qe(u.current)())},u=cP(null),c=lP(p=>{u.current=p},[u]),f=ov(()=>n??{storeID:oS(),getState:()=>i.current,replaceState:l,getGraph:o,subscribeToTransactions:s,addTransactionMetadata:a});n!=null&&(f.current=n),i=ov(()=>e!=null?mP(f.current,e):t!=null?gP(t):iS());const d=uP(()=>id==null?void 0:id(i,()=>i.current.currentTree.version),[i]);return Ip(()=>{const p=f.current;for(const h of new Set(p.getState().knownAtoms))tP(p,h,"get");return()=>{for(const h of p.getState().knownAtoms)JA(p,h)}},[f]),X.createElement(cS.Provider,{value:f},X.createElement(fS.Provider,{value:d},X.createElement(hP,{setNotifyBatcherOfChange:c}),r))}function vP(e){const{override:t,...n}=e,r=kc();return t===!1&&r.current!==uS?e.children:X.createElement(yP,n)}function bP(){return kc().current.storeID}var Sr={RecoilRoot:vP,useStoreRef:kc,useRecoilMutableSource:dP,useRecoilStoreID:bP,notifyComponents_FOR_TESTING:Im,sendEndOfBatchNotifications_FOR_TESTING:dS};function wP(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 pS=kP;const{useStoreRef:EP}=Sr,{SUSPENSE_TIMEOUT_MS:TP}=$i,{updateRetainCount:ms}=$i,{RetentionZone:RP}=yc,{useEffect:CP,useRef:AP}=X,{isSSR:lv}=wc;function PP(e){if(Ie("recoil_memory_managament_2020"))return NP(e)}function NP(e){const n=(Array.isArray(e)?e:[e]).map(s=>s instanceof RP?s:s.key),r=EP();CP(()=>{if(!Ie("recoil_memory_managament_2020"))return;const s=r.current;if(i.current&&!lv)window.clearTimeout(i.current),i.current=null;else for(const a of n)ms(s,a,1);return()=>{for(const a of n)ms(s,a,-1)}},[r,...n]);const i=AP(),o=pS(n);if(!lv&&(o===void 0||!xP(o,n))){const s=r.current;for(const a of n)ms(s,a,1);if(o)for(const a of o)ms(s,a,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const a of n)ms(s,a,-1)},TP)}}var Mm=PP;function OP(){return""}var $a=OP;const{batchUpdates:$P}=bc,{DEFAULT_VALUE:hS}=Qt,{currentRendererSupportsUseSyncExternalStore:LP,reactMode:Uo,useMutableSource:IP,useSyncExternalStore:MP}=Pa,{useRecoilMutableSource:DP,useStoreRef:or}=Sr,{AbstractRecoilValue:Dp,getRecoilValueAsLoadable:La,setRecoilValue:Ou,setUnvalidatedRecoilValue:zP,subscribeToRecoilValue:Oo}=ir,{useCallback:qt,useEffect:$o,useMemo:mS,useRef:Ks,useState:Dm}=X,{setByAddingToSet:jP}=Mx,{isSSR:BP}=wc;function zm(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(i=>{const o=n.current.getState().suspendedComponentResolvers;o.add(i),BP&&Ve(e.contents)&&e.contents.finally(()=>{o.delete(i)})}):e.state==="hasError"?e.contents:ve(`Invalid value of loadable atom "${t.key}"`)}function FP(){const e=$a(),t=or(),[,n]=Dm([]),r=Ks(new Set);r.current=new Set;const i=Ks(new Set),o=Ks(new Map),s=qt(l=>{const u=o.current.get(l);u&&(u.release(),o.current.delete(l))},[o]),a=qt((l,u)=>{o.current.has(u)&&n([])},[]);return $o(()=>{const l=t.current;Hs(r.current,i.current).forEach(u=>{if(o.current.has(u))return;const c=Oo(l,new Dp(u),d=>a(d,u),e);o.current.set(u,c),l.getState().nextTree?l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a(l.getState(),u)}):a(l.getState(),u)}),Hs(i.current,r.current).forEach(u=>{s(u)}),i.current=r.current}),$o(()=>{const l=o.current;return Hs(r.current,new Set(l.keys())).forEach(u=>{const c=Oo(t.current,new Dp(u),f=>a(f,u),e);l.set(u,c)}),()=>l.forEach((u,c)=>s(c))},[e,t,s,a]),mS(()=>{function l(h){return g=>{Ou(t.current,h,g)}}function u(h){return()=>Ou(t.current,h,hS)}function c(h){var g;r.current.has(h.key)||(r.current=jP(r.current,h.key));const E=t.current.getState();return La(t.current,h,Uo().early&&(g=E.nextTree)!==null&&g!==void 0?g:E.currentTree)}function f(h){const g=c(h);return zm(g,h,t)}function d(h){return[f(h),l(h)]}function p(h){return[c(h),l(h)]}return{getRecoilValue:f,getRecoilValueLoadable:c,getRecoilState:d,getRecoilStateLoadable:p,getSetRecoilState:l,getResetRecoilState:u}},[r,t])}const VP={current:0};function UP(e){const t=or(),n=$a(),r=qt(()=>{var a;const l=t.current,u=l.getState(),c=Uo().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return{loadable:La(l,e,c),key:e.key}},[t,e]),i=qt(a=>{let l;return()=>{var u,c;const f=a();return(u=l)!==null&&u!==void 0&&u.loadable.is(f.loadable)&&((c=l)===null||c===void 0?void 0:c.key)===f.key?l:(l=f,f)}},[]),o=mS(()=>i(r),[r,i]),s=qt(a=>{const l=t.current;return Oo(l,e,a,n).release},[t,e,n]);return MP(s,o,o).loadable}function HP(e){const t=or(),n=qt(()=>{var u;const c=t.current,f=c.getState(),d=Uo().early&&(u=f.nextTree)!==null&&u!==void 0?u:f.currentTree;return La(c,e,d)},[t,e]),r=qt(()=>n(),[n]),i=$a(),o=qt((u,c)=>{const f=t.current;return Oo(f,e,()=>{if(!Ie("recoil_suppress_rerender_in_callback"))return c();const p=n();l.current.is(p)||c(),l.current=p},i).release},[t,e,i,n]),s=DP();if(s==null)throw ve("Recoil hooks must be used in components contained within a component.");const a=IP(s,r,o),l=Ks(a);return $o(()=>{l.current=a}),a}function zp(e){const t=or(),n=$a(),r=qt(()=>{var l;const u=t.current,c=u.getState(),f=Uo().early&&(l=c.nextTree)!==null&&l!==void 0?l:c.currentTree;return La(u,e,f)},[t,e]),i=qt(()=>({loadable:r(),key:e.key}),[r,e.key]),o=qt(l=>{const u=i();return l.loadable.is(u.loadable)&&l.key===u.key?l:u},[i]);$o(()=>{const l=Oo(t.current,e,u=>{a(o)},n);return a(o),l.release},[n,e,t,o]);const[s,a]=Dm(i);return s.key!==e.key?i().loadable:s.loadable}function WP(e){const t=or(),[,n]=Dm([]),r=$a(),i=qt(()=>{var a;const l=t.current,u=l.getState(),c=Uo().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return La(l,e,c)},[t,e]),o=i(),s=Ks(o);return $o(()=>{s.current=o}),$o(()=>{const a=t.current,l=a.getState(),u=Oo(a,e,f=>{var d;if(!Ie("recoil_suppress_rerender_in_callback"))return n([]);const p=i();(d=s.current)!==null&&d!==void 0&&d.is(p)||n(p),s.current=p},r);if(l.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{s.current=null,n([])});else{var c;if(!Ie("recoil_suppress_rerender_in_callback"))return n([]);const f=i();(c=s.current)!==null&&c!==void 0&&c.is(f)||n(f),s.current=f}return u.release},[r,i,e,t]),o}function jm(e){return Ie("recoil_memory_managament_2020")&&Mm(e),{TRANSITION_SUPPORT:zp,SYNC_EXTERNAL_STORE:LP()?UP:zp,MUTABLE_SOURCE:HP,LEGACY:WP}[Uo().mode](e)}function gS(e){const t=or(),n=jm(e);return zm(n,e,t)}function Ec(e){const t=or();return qt(n=>{Ou(t.current,e,n)},[t,e])}function KP(e){const t=or();return qt(()=>{Ou(t.current,e,hS)},[t,e])}function qP(e){return[gS(e),Ec(e)]}function GP(e){return[jm(e),Ec(e)]}function YP(){const e=or();return(t,n={})=>{$P(()=>{e.current.addTransactionMetadata(n),t.forEach((r,i)=>zP(e.current,new Dp(i),r))})}}function yS(e){return Ie("recoil_memory_managament_2020")&&Mm(e),zp(e)}function vS(e){const t=or(),n=yS(e);return zm(n,e,t)}function QP(e){return[vS(e),Ec(e)]}var XP={recoilComponentGetRecoilValueCount_FOR_TESTING:VP,useRecoilInterface:FP,useRecoilState:qP,useRecoilStateLoadable:GP,useRecoilValue:gS,useRecoilValueLoadable:jm,useResetRecoilState:KP,useSetRecoilState:Ec,useSetUnvalidatedAtomValues:YP,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:yS,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:vS,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:QP};function ZP(e,t){const n=new Map;for(const[r,i]of e)t(i,r)&&n.set(r,i);return n}var JP=ZP;function eN(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var tN=eN;function nN(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function fv(e){const t=e.atomValues.toMap(),n=Nu(JP(t,(r,i)=>{const s=bS(i).persistence_UNSTABLE;return s!=null&&s.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return rN(e.nonvalidatedAtoms.toMap(),n)}function fN(e){Rc(Tc(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const i=fv(r),o=fv(n),s=Nu(sN,l=>{var u,c,f,d;return{persistence_UNSTABLE:{type:(u=(c=l.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(f=(d=l.persistence_UNSTABLE)===null||d===void 0?void 0:d.backButton)!==null&&f!==void 0?f:!1}}}),a=tN(r.dirtyAtoms,l=>i.has(l)||o.has(l));e({atomValues:i,previousAtomValues:o,atomInfo:s,modifiedAtoms:a,transactionMetadata:{...r.transactionMetadata}})},[e]))}function dN(e){Rc(Tc(t=>{const n=$u(t,"latest"),r=$u(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function pN(){const e=Bm(),[t,n]=cN(()=>$u(e.current)),r=pS(t),i=uv(),o=uv();if(Rc(Tc(a=>n($u(a)),[])),wS(()=>{const a=t.retain();if(i.current&&!cv){var l;window.clearTimeout(i.current),i.current=null,(l=o.current)===null||l===void 0||l.call(o),o.current=null}return()=>{window.setTimeout(a,10)}},[t]),r!==t&&!cv){if(i.current){var s;window.clearTimeout(i.current),i.current=null,(s=o.current)===null||s===void 0||s.call(o),o.current=null}o.current=t.retain(),i.current=window.setTimeout(()=>{var a;i.current=null,(a=o.current)===null||a===void 0||a.call(o),o.current=null},uN)}return t}function xS(e,t){var n;const r=e.getState(),i=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,o=t.getStore_INTERNAL().getState().currentTree;iN(()=>{const s=new Set;for(const u of[i.atomValues.keys(),o.atomValues.keys()])for(const c of u){var a,l;((a=i.atomValues.get(c))===null||a===void 0?void 0:a.contents)!==((l=o.atomValues.get(c))===null||l===void 0?void 0:l.contents)&&bS(c).shouldRestoreFromSnapshots&&s.add(c)}s.forEach(u=>{lN(e,new aN(u),o.atomValues.has(u)?qe(o.atomValues.get(u)):oN)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function hN(){const e=Bm();return Tc(t=>xS(e.current,t),[e])}var SS={useRecoilSnapshot:pN,gotoSnapshot:xS,useGotoRecoilSnapshot:hN,useRecoilTransactionObserver:dN,useTransactionObservation_DEPRECATED:fN,useTransactionSubscription_DEPRECATED:Rc};const{peekNodeInfo:mN}=ei,{useStoreRef:gN}=Sr;function yN(){const e=gN();return({key:t})=>mN(e.current,e.current.getState().currentTree,t)}var vN=yN;const{reactMode:bN}=Pa,{RecoilRoot:wN,useStoreRef:xN}=Sr,{useMemo:SN}=X;function _N(){bN().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=xN().current;return SN(()=>{function t({children:n}){return X.createElement(wN,{store_INTERNAL:e},n)}return t},[e])}var kN=_N;const{loadableWithValue:EN}=Aa,{initializeNode:TN}=ei,{DEFAULT_VALUE:RN,getNode:CN}=Qt,{copyTreeState:AN,getRecoilValueAsLoadable:PN,invalidateDownstreams:NN,writeLoadableToTreeState:ON}=ir;function dv(e){return CN(e.key).nodeType==="atom"}class $N{constructor(t,n){he(this,"_store",void 0),he(this,"_treeState",void 0),he(this,"_changes",void 0),he(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!dv(r))throw ve("Reading selectors within atomicUpdate is not supported");const i=PN(this._store,r,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:ve(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),he(this,"set",(r,i)=>{if(!dv(r))throw ve("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const o=this.get(r);this._changes.set(r.key,i(o))}else TN(this._store,r.key,"set"),this._changes.set(r.key,i)}),he(this,"reset",r=>{this.set(r,RN)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=AN(this._treeState);for(const[n,r]of this._changes)ON(t,n,EN(r));return NN(this._store,t),t}}function LN(e){return t=>{e.replaceState(n=>{const r=new $N(e,n);return t(r),r.newTreeState_INTERNAL()})}}var IN={atomicUpdater:LN},MN=IN.atomicUpdater,_S=Object.freeze({__proto__:null,atomicUpdater:MN});function DN(e,t){if(!e)throw new Error(t)}var zN=DN,Os=zN;const{atomicUpdater:jN}=_S,{batchUpdates:BN}=bc,{DEFAULT_VALUE:FN}=Qt,{useStoreRef:VN}=Sr,{refreshRecoilValue:UN,setRecoilValue:pv}=ir,{cloneSnapshot:HN}=_c,{gotoSnapshot:WN}=SS,{useCallback:KN}=X;class kS{}const qN=new kS;function ES(e,t,n,r){let i=qN,o;if(BN(()=>{const a="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 ve(a);const l=Dx({...r??{},set:(c,f)=>pv(e,c,f),reset:c=>pv(e,c,FN),refresh:c=>UN(e,c),gotoSnapshot:c=>WN(e,c),transact_UNSTABLE:c=>jN(e)(c)},{snapshot:()=>{const c=HN(e);return o=c.retain(),c}}),u=t(l);if(typeof u!="function")throw ve(a);i=u(...n)}),i instanceof kS&&Os(!1),Ve(i))i=i.finally(()=>{var a;(a=o)===null||a===void 0||a()});else{var s;(s=o)===null||s===void 0||s()}return i}function GN(e,t){const n=VN();return KN((...r)=>ES(n.current,e,r),t!=null?[...t,n]:void 0)}var TS={recoilCallback:ES,useRecoilCallback:GN};const{useStoreRef:YN}=Sr,{refreshRecoilValue:QN}=ir,{useCallback:XN}=X;function ZN(e){const t=YN();return XN(()=>{const n=t.current;QN(n,e)},[e,t])}var JN=ZN;const{atomicUpdater:eO}=_S,{useStoreRef:tO}=Sr,{useMemo:nO}=X;function rO(e,t){const n=tO();return nO(()=>(...r)=>{eO(n.current)(o=>{e(o)(...r)})},t!=null?[...t,n]:void 0)}var iO=rO;class oO{constructor(t){he(this,"value",void 0),this.value=t}}var sO={WrappedValue:oO},aO=sO.WrappedValue,RS=Object.freeze({__proto__:null,WrappedValue:aO});const{isFastRefreshEnabled:lO}=Pa;class hv extends Error{}class uO{constructor(t){var n,r,i;he(this,"_name",void 0),he(this,"_numLeafs",void 0),he(this,"_root",void 0),he(this,"_onHit",void 0),he(this,"_onSet",void 0),he(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=(i=t==null?void 0:t.mapNodeValue)!==null&&i!==void 0?i:o=>o}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 i=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(i)}}set(t,n,r){const i=()=>{var o,s,a,l;let u,c;for(const[E,y]of t){var f,d,p;const m=this._root;if((m==null?void 0:m.type)==="leaf")throw this.invalidCacheError();const v=u;if(u=v?v.branches.get(c):m,u=(f=u)!==null&&f!==void 0?f:{type:"branch",nodeKey:E,parent:v,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==E)throw this.invalidCacheError();v==null||v.branches.set(c,u),r==null||(d=r.onNodeVisit)===null||d===void 0||d.call(r,u),c=this._mapNodeValue(y),this._root=(p=this._root)!==null&&p!==void 0?p:u}const h=u?(o=u)===null||o===void 0?void 0:o.branches.get(c):this._root;if(h!=null&&(h.type!=="leaf"||h.branchKey!==c))throw this.invalidCacheError();const g={type:"leaf",value:n,parent:u,branchKey:c};(s=u)===null||s===void 0||s.branches.set(c,g),this._root=(a=this._root)!==null&&a!==void 0?a:g,this._numLeafs++,this._onSet(g),r==null||(l=r.onNodeVisit)===null||l===void 0||l.call(r,g)};try{i()}catch(o){if(o instanceof hv)this.clear(),i();else throw o}}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,i=t.branchKey;for(;r;){var o;if(r.branches.delete(i),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;i=(o=r)===null||o===void 0?void 0:o.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=lO()?"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 Tm(t+(this._name!=null?` - ${this._name}`:"")),new hv}}var cO={TreeCache:uO},fO=cO.TreeCache,CS=Object.freeze({__proto__:null,TreeCache:fO});class dO{constructor(t){var n;he(this,"_maxSize",void 0),he(this,"_size",void 0),he(this,"_head",void 0),he(this,"_tail",void 0),he(this,"_map",void 0),he(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 o=this.head(),s={key:t,right:o,left:null,value:n};o?o.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=qe(this._map.get(n)),i=r.right,o=r.left;i&&(i.left=r.left),o&&(o.right=r.right),r===this.head()&&(this._head=i),r===this.tail()&&(this._tail=o),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var pO={LRUCache:dO},hO=pO.LRUCache,AS=Object.freeze({__proto__:null,LRUCache:hO});const{LRUCache:mO}=AS,{TreeCache:gO}=CS;function yO({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new mO({maxSize:t}),i=new gO({name:e,mapNodeValue:n,onHit:o=>{r.set(o,!0)},onSet:o=>{const s=r.tail();r.set(o,!0),s&&i.size()>t&&i.delete(s.key)}});return i}var mv=yO;function On(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 ve("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(Ve(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((i,o)=>On(i,t,o.toString()))}]`;if(typeof e.toJSON=="function")return On(e.toJSON(n),t,n);if(e instanceof Map){const i={};for(const[o,s]of e)i[typeof o=="string"?o:On(o,t)]=s;return On(i,t,n)}return e instanceof Set?On(Array.from(e).sort((i,o)=>On(i,t).localeCompare(On(o,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?On(Array.from(e),t,n):`{${Object.keys(e).filter(i=>e[i]!==void 0).sort().map(i=>`${On(i,t)}:${On(e[i],t,i)}`).join(",")}}`}function vO(e,t={allowFunctions:!1}){return On(e,t)}var Cc=vO;const{TreeCache:bO}=CS,cl={equality:"reference",eviction:"keep-all",maxSize:1/0};function wO({equality:e=cl.equality,eviction:t=cl.eviction,maxSize:n=cl.maxSize}=cl,r){const i=xO(e);return SO(t,n,i,r)}function xO(e){switch(e){case"reference":return t=>t;case"value":return t=>Cc(t)}throw ve(`Unrecognized equality policy ${e}`)}function SO(e,t,n,r){switch(e){case"keep-all":return new bO({name:r,mapNodeValue:n});case"lru":return mv({name:r,maxSize:qe(t),mapNodeValue:n});case"most-recent":return mv({name:r,maxSize:1,mapNodeValue:n})}throw ve(`Unrecognized eviction policy ${e}`)}var _O=wO;function kO(e){return()=>null}var EO={startPerfBlock:kO};const{isLoadable:TO,loadableWithError:fl,loadableWithPromise:RO,loadableWithValue:od}=Aa,{WrappedValue:PS}=RS,{getNodeLoadable:dl,peekNodeLoadable:CO,setNodeValue:AO}=ei,{saveDepsToStore:PO}=Na,{DEFAULT_VALUE:NO,getConfigDeletionHandler:OO,getNode:$O,registerNode:gv}=Qt,{isRecoilValue:LO}=No,{markRecoilValueModified:yv}=ir,{retainedByOptionWithDefault:IO}=$i,{recoilCallback:MO}=TS,{startPerfBlock:DO}=EO;class NS{}const gs=new NS,ys=[],pl=new Map,zO=(()=>{let e=0;return()=>e++})();function OS(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:i}=e,o=e.set!=null?e.set:void 0,s=new Set,a=_O(i??{equality:"reference",eviction:"keep-all"},n),l=IO(e.retainedBy_UNSTABLE),u=new Map;let c=0;function f(){return!Ie("recoil_memory_managament_2020")||c>0}function d(C){return C.getState().knownSelectors.add(n),c++,()=>{c--}}function p(){return OO(n)!==void 0&&!f()}function h(C,b,I,Y,F){K(b,Y,F),g(C,I)}function g(C,b){H(C,b)&&j(C),y(b,!0)}function E(C,b){H(C,b)&&(qe($(C)).stateVersions.clear(),y(b,!1))}function y(C,b){const I=pl.get(C);if(I!=null){for(const Y of I)yv(Y,qe(t));b&&pl.delete(C)}}function m(C,b){let I=pl.get(b);I==null&&pl.set(b,I=new Set),I.add(C)}function v(C,b,I,Y,F,oe){return b.then(ae=>{if(!f())throw j(C),gs;const J=od(ae);return h(C,I,F,J,Y),ae}).catch(ae=>{if(!f())throw j(C),gs;if(Ve(ae))return S(C,ae,I,Y,F,oe);const J=fl(ae);throw h(C,I,F,J,Y),ae})}function S(C,b,I,Y,F,oe){return b.then(ae=>{if(!f())throw j(C),gs;oe.loadingDepKey!=null&&oe.loadingDepPromise===b?I.atomValues.set(oe.loadingDepKey,od(ae)):C.getState().knownSelectors.forEach(Se=>{I.atomValues.delete(Se)});const J=_(C,I);if(J&&J.state!=="loading"){if((H(C,F)||$(C)==null)&&g(C,F),J.state==="hasValue")return J.contents;throw J.contents}if(!H(C,F)){const Se=N(C,I);if(Se!=null)return Se.loadingLoadable.contents}const[me,Oe]=w(C,I,F);if(me.state!=="loading"&&h(C,I,F,me,Oe),me.state==="hasError")throw me.contents;return me.contents}).catch(ae=>{if(ae instanceof NS)throw gs;if(!f())throw j(C),gs;const J=fl(ae);throw h(C,I,F,J,Y),ae})}function k(C,b,I,Y){var F,oe,ae,J;if(H(C,Y)||b.version===((F=C.getState())===null||F===void 0||(oe=F.currentTree)===null||oe===void 0?void 0:oe.version)||b.version===((ae=C.getState())===null||ae===void 0||(J=ae.nextTree)===null||J===void 0?void 0:J.version)){var me,Oe,Se;PO(n,I,C,(me=(Oe=C.getState())===null||Oe===void 0||(Se=Oe.nextTree)===null||Se===void 0?void 0:Se.version)!==null&&me!==void 0?me:C.getState().currentTree.version)}for(const se of I)s.add(se)}function w(C,b,I){const Y=DO(n);let F=!0,oe=!0;const ae=()=>{Y(),oe=!1};let J,me=!1,Oe;const Se={loadingDepKey:null,loadingDepPromise:null},se=new Map;function we({key:Ye}){const Le=dl(C,b,Ye);switch(se.set(Ye,Le),F||(k(C,b,new Set(se.keys()),I),E(C,I)),Le.state){case"hasValue":return Le.contents;case"hasError":throw Le.contents;case"loading":throw Se.loadingDepKey=Ye,Se.loadingDepPromise=Le.contents,Le.contents}throw ve("Invalid Loadable state")}const $e=Ye=>(...Le)=>{if(oe)throw ve("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&&Os(!1),MO(C,Ye,Le,{node:t})};try{J=r({get:we,getCallback:$e}),J=LO(J)?we(J):J,TO(J)&&(J.state==="hasError"&&(me=!0),J=J.contents),Ve(J)?J=v(C,J,b,se,I,Se).finally(ae):ae(),J=J instanceof PS?J.value:J}catch(Ye){J=Ye,Ve(J)?J=S(C,J,b,se,I,Se).finally(ae):(me=!0,ae())}return me?Oe=fl(J):Ve(J)?Oe=RO(J):Oe=od(J),F=!1,L(C,I,se),k(C,b,new Set(se.keys()),I),[Oe,se]}function _(C,b){let I=b.atomValues.get(n);if(I!=null)return I;const Y=new Set;try{I=a.get(oe=>(typeof oe!="string"&&Os(!1),dl(C,b,oe).contents),{onNodeVisit:oe=>{oe.type==="branch"&&oe.nodeKey!==n&&Y.add(oe.nodeKey)}})}catch(oe){throw ve(`Problem with cache lookup for selector "${n}": ${oe.message}`)}if(I){var F;b.atomValues.set(n,I),k(C,b,Y,(F=$(C))===null||F===void 0?void 0:F.executionID)}return I}function T(C,b){const I=_(C,b);if(I!=null)return j(C),I;const Y=N(C,b);if(Y!=null){var F;return((F=Y.loadingLoadable)===null||F===void 0?void 0:F.state)==="loading"&&m(C,Y.executionID),Y.loadingLoadable}const oe=zO(),[ae,J]=w(C,b,oe);return ae.state==="loading"?(M(C,oe,ae,J,b),m(C,oe)):(j(C),K(b,ae,J)),ae}function N(C,b){const I=eS([u.has(C)?[qe(u.get(C))]:[],mc(Nm(u,([F])=>F!==C),([,F])=>F)]);function Y(F){for(const[oe,ae]of F)if(!dl(C,b,oe).is(ae))return!0;return!1}for(const F of I){if(F.stateVersions.get(b.version)||!Y(F.depValuesDiscoveredSoFarDuringAsyncWork))return F.stateVersions.set(b.version,!0),F;F.stateVersions.set(b.version,!1)}}function $(C){return u.get(C)}function M(C,b,I,Y,F){u.set(C,{depValuesDiscoveredSoFarDuringAsyncWork:Y,executionID:b,loadingLoadable:I,stateVersions:new Map([[F.version,!0]])})}function L(C,b,I){if(H(C,b)){const Y=$(C);Y!=null&&(Y.depValuesDiscoveredSoFarDuringAsyncWork=I)}}function j(C){u.delete(C)}function H(C,b){var I;return b===((I=$(C))===null||I===void 0?void 0:I.executionID)}function V(C){return Array.from(C.entries()).map(([b,I])=>[b,I.contents])}function K(C,b,I){C.atomValues.set(n,b);try{a.set(V(I),b)}catch(Y){throw ve(`Problem with setting cache for selector "${n}": ${Y.message}`)}}function Z(C){if(ys.includes(n)){const b=`Recoil selector has circular dependencies: ${ys.slice(ys.indexOf(n)).join(" → ")}`;return fl(ve(b))}ys.push(n);try{return C()}finally{ys.pop()}}function z(C,b){const I=b.atomValues.get(n);return I??a.get(Y=>{var F;return typeof Y!="string"&&Os(!1),(F=CO(C,b,Y))===null||F===void 0?void 0:F.contents})}function G(C,b){return Z(()=>T(C,b))}function x(C){C.atomValues.delete(n)}function le(C,b){t==null&&Os(!1);for(const Y of s){var I;const F=$O(Y);(I=F.clearCache)===null||I===void 0||I.call(F,C,b)}s.clear(),x(b),a.clear(),yv(C,t)}return o!=null?t=gv({key:n,nodeType:"selector",peek:z,get:G,set:(b,I,Y)=>{let F=!1;const oe=new Map;function ae({key:Se}){if(F)throw ve("Recoil: Async selector sets are not currently supported.");const se=dl(b,I,Se);if(se.state==="hasValue")return se.contents;if(se.state==="loading"){const we=`Getting value of asynchronous atom or selector "${Se}" in a pending state while setting selector "${n}" is not yet supported.`;throw ve(we)}else throw se.contents}function J(Se,se){if(F)throw ve("Recoil: Async selector sets are not currently supported.");const we=typeof se=="function"?se(ae(Se)):se;AO(b,I,Se.key,we).forEach((Ye,Le)=>oe.set(Le,Ye))}function me(Se){J(Se,NO)}const Oe=o({set:J,get:ae,reset:me},Y);if(Oe!==void 0)throw Ve(Oe)?ve("Recoil: Async selector sets are not currently supported."):ve("Recoil: selector set should be a void function.");return F=!0,oe},init:d,invalidate:x,clearCache:le,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):t=gv({key:n,nodeType:"selector",peek:z,get:G,init:d,invalidate:x,clearCache:le,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}OS.value=e=>new PS(e);var Lo=OS;const{isLoadable:jO,loadableWithError:sd,loadableWithPromise:ad,loadableWithValue:ji}=Aa,{WrappedValue:$S}=RS,{peekNodeInfo:BO}=ei,{DEFAULT_VALUE:di,DefaultValue:Or,getConfigDeletionHandler:LS,registerNode:FO,setConfigDeletionHandler:VO}=Qt,{isRecoilValue:UO}=No,{getRecoilValueAsLoadable:HO,markRecoilValueModified:WO,setRecoilValue:vv,setRecoilValueLoadable:KO}=ir,{retainedByOptionWithDefault:qO}=$i,vs=e=>e instanceof $S?e.value:e;function GO(e){const{key:t,persistence_UNSTABLE:n}=e,r=qO(e.retainedBy_UNSTABLE);let i=0;function o(m){return ad(m.then(v=>(s=ji(v),v)).catch(v=>{throw s=sd(v),v}))}let s=Ve(e.default)?o(e.default):jO(e.default)?e.default.state==="loading"?o(e.default.contents):e.default:ji(vs(e.default));s.contents;let a;const l=new Map;function u(m){return m}function c(m,v){const S=v.then(k=>{var w,_;return((_=((w=m.getState().nextTree)!==null&&w!==void 0?w:m.getState().currentTree).atomValues.get(t))===null||_===void 0?void 0:_.contents)===S&&vv(m,y,k),k}).catch(k=>{var w,_;throw((_=((w=m.getState().nextTree)!==null&&w!==void 0?w:m.getState().currentTree).atomValues.get(t))===null||_===void 0?void 0:_.contents)===S&&KO(m,y,sd(k)),k});return S}function f(m,v,S){var k;i++;const w=()=>{var j;i--,(j=l.get(m))===null||j===void 0||j.forEach(H=>H()),l.delete(m)};if(m.getState().knownAtoms.add(t),s.state==="loading"){const j=()=>{var H;((H=m.getState().nextTree)!==null&&H!==void 0?H:m.getState().currentTree).atomValues.has(t)||WO(m,y)};s.contents.finally(j)}const _=(k=e.effects)!==null&&k!==void 0?k:e.effects_UNSTABLE;if(_!=null){let Z=function(b){if(H&&b.key===t){const I=j;return I instanceof Or?d(m,v):Ve(I)?ad(I.then(Y=>Y instanceof Or?s.toPromise():Y)):ji(I)}return HO(m,b)},z=function(b){return Z(b).toPromise()},G=function(b){var I;const Y=BO(m,(I=m.getState().nextTree)!==null&&I!==void 0?I:m.getState().currentTree,b.key);return H&&b.key===t&&!(j instanceof Or)?{...Y,isSet:!0,loadable:Z(b)}:Y};var $=Z,M=z,L=G;let j=di,H=!0,V=!1,K=null;const x=b=>I=>{if(H){const Y=Z(y),F=Y.state==="hasValue"?Y.contents:di;j=typeof I=="function"?I(F):I,Ve(j)&&(j=j.then(oe=>(K={effect:b,value:oe},oe)))}else{if(Ve(I))throw ve("Setting atoms to async values is not implemented.");typeof I!="function"&&(K={effect:b,value:vs(I)}),vv(m,y,typeof I=="function"?Y=>{const F=vs(I(Y));return K={effect:b,value:F},F}:vs(I))}},le=b=>()=>x(b)(di),C=b=>I=>{var Y;const{release:F}=m.subscribeToTransactions(oe=>{var ae;let{currentTree:J,previousTree:me}=oe.getState();me||(me=J);const Oe=(ae=J.atomValues.get(t))!==null&&ae!==void 0?ae:s;if(Oe.state==="hasValue"){var Se,se,we,$e;const Ye=Oe.contents,Le=(Se=me.atomValues.get(t))!==null&&Se!==void 0?Se:s,Tt=Le.state==="hasValue"?Le.contents:di;((se=K)===null||se===void 0?void 0:se.effect)!==b||((we=K)===null||we===void 0?void 0:we.value)!==Ye?I(Ye,Tt,!J.atomValues.has(t)):(($e=K)===null||$e===void 0?void 0:$e.effect)===b&&(K=null)}},t);l.set(m,[...(Y=l.get(m))!==null&&Y!==void 0?Y:[],F])};for(const b of _)try{const I=b({node:y,storeID:m.storeID,parentStoreID_UNSTABLE:m.parentStoreID,trigger:S,setSelf:x(b),resetSelf:le(b),onSet:C(b),getPromise:z,getLoadable:Z,getInfo_UNSTABLE:G});if(I!=null){var T;l.set(m,[...(T=l.get(m))!==null&&T!==void 0?T:[],I])}}catch(I){j=I,V=!0}if(H=!1,!(j instanceof Or)){var N;const b=V?sd(j):Ve(j)?ad(c(m,j)):ji(vs(j));b.contents,v.atomValues.set(t,b),(N=m.getState().nextTree)===null||N===void 0||N.atomValues.set(t,b)}}return w}function d(m,v){var S,k;return(S=(k=v.atomValues.get(t))!==null&&k!==void 0?k:a)!==null&&S!==void 0?S:s}function p(m,v){if(v.atomValues.has(t))return qe(v.atomValues.get(t));if(v.nonvalidatedAtoms.has(t)){if(a!=null)return a;if(n==null)return s;const S=v.nonvalidatedAtoms.get(t),k=n.validator(S,di);return a=k instanceof Or?s:ji(k),a}else return s}function h(){a=void 0}function g(m,v,S){if(v.atomValues.has(t)){const k=qe(v.atomValues.get(t));if(k.state==="hasValue"&&S===k.contents)return new Map}else if(!v.nonvalidatedAtoms.has(t)&&S instanceof Or)return new Map;return a=void 0,new Map().set(t,ji(S))}function E(){return LS(t)!==void 0&&i<=0}const y=FO({key:t,nodeType:"atom",peek:d,get:p,set:g,init:f,invalidate:h,shouldDeleteConfigOnRelease:E,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 y}function Fm(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return UO(n)?YO({...t,default:n}):GO({...t,default:n})}function YO(e){const t=Fm({...e,default:di,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof Or?r:qe(e.persistence_UNSTABLE).validator(r,di)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Lo({key:`${e.key}__withFallback`,get:({get:r})=>{const i=r(t);return i instanceof Or?e.default:i},set:({set:r},i)=>r(t,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return VO(n.key,LS(e.key)),n}Fm.value=e=>new $S(e);var IS=Fm;let QO=class{constructor(t){var n;he(this,"_map",void 0),he(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 XO={MapCache:QO},ZO=XO.MapCache,JO=Object.freeze({__proto__:null,MapCache:ZO});const{LRUCache:bv}=AS,{MapCache:e$}=JO,hl={equality:"reference",eviction:"none",maxSize:1/0};function t$({equality:e=hl.equality,eviction:t=hl.eviction,maxSize:n=hl.maxSize}=hl){const r=n$(e);return r$(t,n,r)}function n$(e){switch(e){case"reference":return t=>t;case"value":return t=>Cc(t)}throw ve(`Unrecognized equality policy ${e}`)}function r$(e,t,n){switch(e){case"keep-all":return new e$({mapKey:n});case"lru":return new bv({mapKey:n,maxSize:qe(t)});case"most-recent":return new bv({mapKey:n,maxSize:1})}throw ve(`Unrecognized eviction policy ${e}`)}var MS=t$;const{setConfigDeletionHandler:i$}=Qt;function o$(e){var t,n;const r=MS({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o,s;const a=r.get(i);if(a!=null)return a;const{cachePolicyForParams_UNSTABLE:l,...u}=e,c="default"in e?e.default:new Promise(()=>{}),f=IS({...u,key:`${e.key}__${(o=Cc(i))!==null&&o!==void 0?o:"void"}`,default:typeof c=="function"?c(i):c,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(i):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(i):(s=e.effects)!==null&&s!==void 0?s:e.effects_UNSTABLE});return r.set(i,f),i$(f.key,()=>{r.delete(i)}),f}}var s$=o$;const{setConfigDeletionHandler:a$}=Qt;let l$=0;function u$(e){var t,n;const r=MS({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o;let s;try{s=r.get(i)}catch(d){throw ve(`Problem with cache lookup for selector ${e.key}: ${d.message}`)}if(s!=null)return s;const a=`${e.key}__selectorFamily/${(o=Cc(i,{allowFunctions:!0}))!==null&&o!==void 0?o:"void"}/${l$++}`,l=d=>e.get(i)(d),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE;let f;if(e.set!=null){const d=e.set;f=Lo({key:a,get:l,set:(h,g)=>d(i)(h,g),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else f=Lo({key:a,get:l,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(i,f),a$(f.key,()=>{r.delete(i)}),f}}var ti=u$;const c$=ti({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function f$(e){return c$(e)}var d$=f$;const p$=ti({key:"__error",get:e=>()=>{throw ve(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function h$(e){return p$(e)}var m$=h$;function g$(e){return e}var y$=g$;const{loadableWithError:DS,loadableWithPromise:zS,loadableWithValue:jS}=Aa;function Ac(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[i,o]of t.entries())try{n[i]=e(o)}catch(s){r[i]=s}return[n,r]}function v$(e){return e!=null&&!Ve(e)}function Pc(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function jp(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,i)=>({...n,[r]:t[i]}),{})}function vo(e,t,n){const r=n.map((i,o)=>i==null?jS(t[o]):Ve(i)?zS(i):DS(i));return jp(e,r)}function b$(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const w$=ti({key:"__waitForNone",get:e=>({get:t})=>{const n=Pc(e),[r,i]=Ac(t,n);return vo(e,r,i)},dangerouslyAllowMutability:!0}),x$=ti({key:"__waitForAny",get:e=>({get:t})=>{const n=Pc(e),[r,i]=Ac(t,n);return i.some(o=>!Ve(o))?vo(e,r,i):new Promise(o=>{for(const[s,a]of i.entries())Ve(a)&&a.then(l=>{r[s]=l,i[s]=void 0,o(vo(e,r,i))}).catch(l=>{i[s]=l,o(vo(e,r,i))})})},dangerouslyAllowMutability:!0}),S$=ti({key:"__waitForAll",get:e=>({get:t})=>{const n=Pc(e),[r,i]=Ac(t,n);if(i.every(s=>s==null))return jp(e,r);const o=i.find(v$);if(o!=null)throw o;return Promise.all(i).then(s=>jp(e,b$(r,s)))},dangerouslyAllowMutability:!0}),_$=ti({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Pc(e),[r,i]=Ac(t,n);return i.every(o=>!Ve(o))?vo(e,r,i):Promise.all(i.map((o,s)=>Ve(o)?o.then(a=>{r[s]=a,i[s]=void 0}).catch(a=>{r[s]=void 0,i[s]=a}):null)).then(()=>vo(e,r,i))},dangerouslyAllowMutability:!0}),k$=ti({key:"__noWait",get:e=>({get:t})=>{try{return Lo.value(jS(t(e)))}catch(n){return Lo.value(Ve(n)?zS(n):DS(n))}},dangerouslyAllowMutability:!0});var E$={waitForNone:w$,waitForAny:x$,waitForAll:S$,waitForAllSettled:_$,noWait:k$};const{RecoilLoadable:T$}=Aa,{DefaultValue:R$}=Qt,{RecoilRoot:C$,useRecoilStoreID:A$}=Sr,{isRecoilValue:P$}=No,{retentionZone:N$}=yc,{freshSnapshot:O$}=_c,{useRecoilState:$$,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:L$,useRecoilStateLoadable:I$,useRecoilValue:M$,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:D$,useRecoilValueLoadable:z$,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:j$,useResetRecoilState:B$,useSetRecoilState:F$}=XP,{useGotoRecoilSnapshot:V$,useRecoilSnapshot:U$,useRecoilTransactionObserver:H$}=SS,{useRecoilCallback:W$}=TS,{noWait:K$,waitForAll:q$,waitForAllSettled:G$,waitForAny:Y$,waitForNone:Q$}=E$;var ni={DefaultValue:R$,isRecoilValue:P$,RecoilLoadable:T$,RecoilEnv:Vo,RecoilRoot:C$,useRecoilStoreID:A$,useRecoilBridgeAcrossReactRoots_UNSTABLE:kN,atom:IS,selector:Lo,atomFamily:s$,selectorFamily:ti,constSelector:d$,errorSelector:m$,readOnlySelector:y$,noWait:K$,waitForNone:Q$,waitForAny:Y$,waitForAll:q$,waitForAllSettled:G$,useRecoilValue:M$,useRecoilValueLoadable:z$,useRecoilState:$$,useRecoilStateLoadable:I$,useSetRecoilState:F$,useResetRecoilState:B$,useGetRecoilValueInfo_UNSTABLE:vN,useRecoilRefresher_UNSTABLE:JN,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:j$,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:D$,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:L$,useRecoilCallback:W$,useRecoilTransaction_UNSTABLE:iO,useGotoRecoilSnapshot:V$,useRecoilSnapshot:U$,useRecoilTransactionObserver_UNSTABLE:H$,snapshot_UNSTABLE:O$,useRetain:Mm,retentionZone:N$},X$=ni.DefaultValue,Z$=ni.RecoilRoot,vt=ni.atom,BS=ni.selector,hr=ni.useRecoilValue,wv=ni.useRecoilState,dt=ni.useSetRecoilState,ql=ni.useResetRecoilState;function J$(){this.__data__=[],this.size=0}var e4=J$;function t4(e,t){return e===t||e!==e&&t!==t}var FS=t4,n4=FS;function r4(e,t){for(var n=e.length;n--;)if(n4(e[n][0],t))return n;return-1}var Nc=r4,i4=Nc,o4=Array.prototype,s4=o4.splice;function a4(e){var t=this.__data__,n=i4(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():s4.call(t,n,1),--this.size,!0}var l4=a4,u4=Nc;function c4(e){var t=this.__data__,n=u4(t,e);return n<0?void 0:t[n][1]}var f4=c4,d4=Nc;function p4(e){return d4(this.__data__,e)>-1}var h4=p4,m4=Nc;function g4(e,t){var n=this.__data__,r=m4(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var y4=g4,v4=e4,b4=l4,w4=f4,x4=h4,S4=y4;function Ho(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ta))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=n&lM?new iM:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=v3}var QS=b3,w3=Ia,x3=QS,S3=Ma,_3="[object Arguments]",k3="[object Array]",E3="[object Boolean]",T3="[object Date]",R3="[object Error]",C3="[object Function]",A3="[object Map]",P3="[object Number]",N3="[object Object]",O3="[object RegExp]",$3="[object Set]",L3="[object String]",I3="[object WeakMap]",M3="[object ArrayBuffer]",D3="[object DataView]",z3="[object Float32Array]",j3="[object Float64Array]",B3="[object Int8Array]",F3="[object Int16Array]",V3="[object Int32Array]",U3="[object Uint8Array]",H3="[object Uint8ClampedArray]",W3="[object Uint16Array]",K3="[object Uint32Array]",Fe={};Fe[z3]=Fe[j3]=Fe[B3]=Fe[F3]=Fe[V3]=Fe[U3]=Fe[H3]=Fe[W3]=Fe[K3]=!0;Fe[_3]=Fe[k3]=Fe[M3]=Fe[E3]=Fe[D3]=Fe[T3]=Fe[R3]=Fe[C3]=Fe[A3]=Fe[P3]=Fe[N3]=Fe[O3]=Fe[$3]=Fe[L3]=Fe[I3]=!1;function q3(e){return S3(e)&&x3(e.length)&&!!Fe[w3(e)]}var G3=q3;function Y3(e){return function(t){return e(t)}}var Q3=Y3,Mu={exports:{}};Mu.exports;(function(e,t){var n=VS,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(Mu,Mu.exports);var X3=Mu.exports,Z3=G3,J3=Q3,Ov=X3,$v=Ov&&Ov.isTypedArray,e5=$v?J3($v):Z3,XS=e5,t5=e3,n5=f3,r5=Hm,i5=YS,o5=y3,s5=XS,a5=Object.prototype,l5=a5.hasOwnProperty;function u5(e,t){var n=r5(e),r=!n&&n5(e),i=!n&&!r&&i5(e),o=!n&&!r&&!i&&s5(e),s=n||r||i||o,a=s?t5(e.length,String):[],l=a.length;for(var u in e)(t||l5.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||o5(u,l)))&&a.push(u);return a}var c5=u5,f5=Object.prototype;function d5(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||f5;return e===n}var p5=d5;function h5(e,t){return function(n){return e(t(n))}}var m5=h5,g5=m5,y5=g5(Object.keys,Object),v5=y5,b5=p5,w5=v5,x5=Object.prototype,S5=x5.hasOwnProperty;function _5(e){if(!b5(e))return w5(e);var t=[];for(var n in Object(e))S5.call(e,n)&&n!="constructor"&&t.push(n);return t}var k5=_5,E5=HS,T5=QS;function R5(e){return e!=null&&T5(e.length)&&!E5(e)}var C5=R5,A5=c5,P5=k5,N5=C5;function O5(e){return N5(e)?A5(e):P5(e)}var $5=O5,L5=VM,I5=ZM,M5=$5;function D5(e){return L5(e,M5,I5)}var z5=D5,Lv=z5,j5=1,B5=Object.prototype,F5=B5.hasOwnProperty;function V5(e,t,n,r,i,o){var s=n&j5,a=Lv(e),l=a.length,u=Lv(t),c=u.length;if(l!=c&&!s)return!1;for(var f=l;f--;){var d=a[f];if(!(s?d in t:F5.call(t,d)))return!1}var p=o.get(e),h=o.get(t);if(p&&h)return p==t&&h==e;var g=!0;o.set(e,t),o.set(t,e);for(var E=s;++f=t||_<0||f&&T>=o}function y(){var w=fd();if(E(w))return m(w);a=setTimeout(y,g(w))}function m(w){return a=void 0,d&&r?p(w):(r=i=void 0,s)}function v(){a!==void 0&&clearTimeout(a),u=0,r=l=i=a=void 0}function S(){return a===void 0?s:m(fd())}function k(){var w=fd(),_=E(w);if(r=arguments,i=this,l=w,_){if(a===void 0)return h(l);if(f)return clearTimeout(a),a=setTimeout(y,t),p(l)}return a===void 0&&(a=setTimeout(y,t)),s}return k.cancel=v,k.flush=S,k}var iD=rD;const oD=Sa(iD),tr=Object.create(null);tr.open="0";tr.close="1";tr.ping="2";tr.pong="3";tr.message="4";tr.upgrade="5";tr.noop="6";const Gl=Object.create(null);Object.keys(tr).forEach(e=>{Gl[tr[e]]=e});const Wp={type:"error",data:"parser error"},e_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",t_=typeof ArrayBuffer=="function",n_=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Wm=({type:e,data:t},n,r)=>e_&&t instanceof Blob?n?r(t):Xv(t,r):t_&&(t instanceof ArrayBuffer||n_(t))?n?r(t):Xv(new Blob([t]),r):r(tr[e]+(t||"")),Xv=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Zv(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let dd;function sD(e,t){if(e_&&e.data instanceof Blob)return e.data.arrayBuffer().then(Zv).then(t);if(t_&&(e.data instanceof ArrayBuffer||n_(e.data)))return t(Zv(e.data));Wm(e,!1,n=>{dd||(dd=new TextEncoder),t(dd.encode(n))})}const Jv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$s=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,s,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u},lD=typeof ArrayBuffer=="function",Km=(e,t)=>{if(typeof e!="string")return{type:"message",data:r_(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:uD(e.substring(1),t)}:Gl[n]?e.length>1?{type:Gl[n],data:e.substring(1)}:{type:Gl[n]}:Wp},uD=(e,t)=>{if(lD){const n=aD(e);return r_(n,t)}else return{base64:!0,data:e}},r_=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},i_=String.fromCharCode(30),cD=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{Wm(o,!1,a=>{r[s]=a,++i===n&&t(r.join(i_))})})},fD=(e,t)=>{const n=e.split(i_),r=[];for(let i=0;i{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let pd;function yl(e){return e.reduce((t,n)=>t+n.length,0)}function vl(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;iMath.pow(2,53-32)-1){a.enqueue(Wp);break}i=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(yl(n)e){a.enqueue(Wp);break}}}})}const o_=4;function ft(e){if(e)return hD(e)}function hD(e){for(var t in ft.prototype)e[t]=ft.prototype[t];return e}ft.prototype.on=ft.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ft.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ft.prototype.off=ft.prototype.removeListener=ft.prototype.removeAllListeners=ft.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,i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function s_(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const mD=mn.setTimeout,gD=mn.clearTimeout;function Dc(e,t){t.useNativeTimers?(e.setTimeoutFn=mD.bind(mn),e.clearTimeoutFn=gD.bind(mn)):(e.setTimeoutFn=mn.setTimeout.bind(mn),e.clearTimeoutFn=mn.clearTimeout.bind(mn))}const yD=1.33;function vD(e){return typeof e=="string"?bD(e):Math.ceil((e.byteLength||e.size)*yD)}function bD(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}function wD(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function xD(e){let t={},n=e.split("&");for(let r=0,i=n.length;r0);return t}function l_(){const e=n0(+new Date);return e!==t0?(e0=0,t0=e):e+"."+n0(e0++)}for(;bl{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)};fD(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,cD(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]=l_()),!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 Qn(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}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 Qn extends ft{constructor(t,n){super(),Dc(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=s_(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new c_(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}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 i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.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(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Qn.requestsCount++,Qn.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=ED,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Qn.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()}}Qn.requestsCount=0;Qn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",r0);else if(typeof addEventListener=="function"){const e="onpagehide"in mn?"pagehide":"unload";addEventListener(e,r0,!1)}}function r0(){for(let e in Qn.requests)Qn.requests.hasOwnProperty(e)&&Qn.requests[e].abort()}const Gm=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),wl=mn.WebSocket||mn.MozWebSocket,i0=!0,CD="arraybuffer",o0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class AD extends qm{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=o0?{}:s_(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=i0&&!o0?n?new wl(t,n):new wl(t):new wl(t,n,r)}catch(i){return this.emitReserved("error",i)}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{i0&&this.ws.send(o)}catch{}i&&Gm(()=>{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]=l_()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!wl}}class PD extends qm{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=pD(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=dD();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();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{i&&Gm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const ND={websocket:AD,webtransport:PD,polling:RD},OD=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$D=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function qp(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 i=OD.exec(e||""),o={},s=14;for(;s--;)o[$D[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=LD(o,o.path),o.queryKey=ID(o,o.query),o}function LD(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 ID(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let f_=class qi extends ft{constructor(t,n={}){super(),this.binaryType=CD,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=qp(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=qp(n.host).host),Dc(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=xD(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=o_,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 ND[t](r)}open(){let t;if(this.opts.rememberUpgrade&&qi.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;qi.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;qi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=f=>{const d=new Error("probe error: "+f);d.transport=n.name,o(),this.emitReserved("upgradeError",d)};function a(){s("transport closed")}function l(){s("socket closed")}function u(f){n&&f.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",qi.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,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),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){qi.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 i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,d_=Object.prototype.toString,jD=typeof Blob=="function"||typeof Blob<"u"&&d_.call(Blob)==="[object BlobConstructor]",BD=typeof File=="function"||typeof File<"u"&&d_.call(File)==="[object FileConstructor]";function Ym(e){return DD&&(e instanceof ArrayBuffer||zD(e))||jD&&e instanceof Blob||BD&&e instanceof File}function Yl(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(o),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,o)=>{n.push((s,a)=>r?s?o(s):i(a):i(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((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),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:ke.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 ke.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 ke.EVENT:case ke.BINARY_EVENT:this.onevent(t);break;case ke.ACK:case ke.BINARY_ACK:this.onack(t);break;case ke.DISCONNECT:this.ondisconnect();break;case ke.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(...i){r||(r=!0,n.packet({type:ke.ACK,id:t,data:i}))}}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:ke.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}Qo.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};Qo.prototype.reset=function(){this.attempts=0};Qo.prototype.setMin=function(e){this.ms=e};Qo.prototype.setMax=function(e){this.max=e};Qo.prototype.setJitter=function(e){this.jitter=e};class Qp extends ft{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,Dc(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 Qo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||qD;this.encoder=new i.Encoder,this.decoder=new i.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 f_(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=In(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=In(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),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(In(t,"ping",this.onping.bind(this)),In(t,"data",this.ondata.bind(this)),In(t,"error",this.onerror.bind(this)),In(t,"close",this.onclose.bind(this)),In(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){Gm(()=>{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 p_(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(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):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 ws={};function Ql(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=MD(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=ws[i]&&o in ws[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let l;return a?l=new Qp(r,t):(ws[i]||(ws[i]=new Qp(r,t)),l=ws[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Ql,{Manager:Qp,Socket:p_,io:Ql,connect:Ql});function Xp(e){this.message=e}Xp.prototype=new Error,Xp.prototype.name="InvalidCharacterError";typeof window<"u"&&window.atob&&window.atob.bind(window);function a0(e){this.message=e}a0.prototype=new Error,a0.prototype.name="InvalidTokenError";var YD={};/** * @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 Io=A;function QD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var XD=typeof Object.is=="function"?Object.is:QD,ZD=Io.useState,JD=Io.useEffect,ez=Io.useLayoutEffect,tz=Io.useDebugValue;function nz(e,t){var n=t(),r=ZD({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return ez(function(){i.value=n,i.getSnapshot=t,hd(i)&&o({inst:i})},[e,n,t]),JD(function(){return hd(i)&&o({inst:i}),e(function(){hd(i)&&o({inst:i})})},[e]),tz(n),n}function hd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!XD(e,n)}catch{return!0}}function rz(e,t){return t()}var iz=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rz:nz;YD.useSyncExternalStore=Io.useSyncExternalStore!==void 0?Io.useSyncExternalStore:iz;const jr=()=>{},gn=jr(),md=Object,Dn=e=>e===gn,pi=e=>typeof e=="function",zc=(e,t)=>({...e,...t}),oz=e=>pi(e.then),xl=new WeakMap;let sz=0;const ha=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,o;if(md(e)===e&&!r&&n!=RegExp){if(i=xl.get(e),i)return i;if(i=++sz+"~",xl.set(e,i),n==Array){for(i="@",o=0;o{const n=Ir.get(e);return[()=>!Dn(t)&&e.get(t)||gd,r=>{if(!Dn(t)){const i=e.get(t);t in Sl||(Sl[t]=i),n[5](t,zc(i,r),i||gd)}},n[6],()=>!Dn(t)&&t in Sl?Sl[t]:!Dn(t)&&e.get(t)||gd]};let Jp=!0;const lz=()=>Jp,[eh,th]=Xm&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[jr,jr],uz=()=>{const e=Zp&&document.visibilityState;return Dn(e)||e!=="hidden"},cz=e=>(Zp&&document.addEventListener("visibilitychange",e),eh("focus",e),()=>{Zp&&document.removeEventListener("visibilitychange",e),th("focus",e)}),fz=e=>{const t=()=>{Jp=!0,e()},n=()=>{Jp=!1};return eh("online",t),eh("offline",n),()=>{th("online",t),th("offline",n)}},dz={isOnline:lz,isVisible:uz},pz={initFocus:cz,initReconnect:fz};X.useId;const m_=!Xm||"Deno"in window,yd=typeof navigator<"u"&&navigator.connection,l0=!m_&&yd&&(["slow-2g","2g"].includes(yd.effectiveType)||yd.saveData),g_=e=>{if(pi(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ha(e):"",[e,t]};let hz=0;const u0=()=>++hz,mz=0,gz=1,yz=2;async function vz(...e){const[t,n,r,i]=e,o=zc({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let s=o.populateCache;const a=o.rollbackOnError;let l=o.optimisticData;const u=d=>typeof a=="function"?a(d):a!==!1,c=o.throwOnError;if(pi(n)){const d=n,p=[],h=t.keys();for(const g of h)!/^\$(inf|sub)\$/.test(g)&&d(t.get(g)._k)&&p.push(g);return Promise.all(p.map(f))}return f(n);async function f(d){const[p]=g_(d);if(!p)return;const[h,g]=az(t,p),[E,y,m,v]=Ir.get(t),S=()=>{const j=E[p];return(pi(o.revalidate)?o.revalidate(h().data,d):o.revalidate!==!1)&&(delete m[p],delete v[p],j&&j[0])?j[0](yz).then(()=>h().data):h().data};if(e.length<3)return S();let k=r,w;const _=u0();y[p]=[_,0];const T=!Dn(l),N=h(),$=N.data,M=N._c,L=Dn(M)?$:M;if(T&&(l=pi(l)?l(L,$):l,g({data:l,_c:L})),pi(k))try{k=k(L)}catch(j){w=j}if(k&&oz(k))if(k=await k.catch(j=>{w=j}),_!==y[p][0]){if(w)throw w;return k}else w&&T&&u(w)&&(s=!0,g({data:L,_c:gn}));if(s&&!w)if(pi(s)){const j=s(k,L);g({data:j,error:gn,_c:gn})}else g({data:k,error:gn,_c:gn});if(y[p][1]=u0(),Promise.resolve(S()).then(()=>{g({_c:gn})}),w){if(c)throw w;return}return k}}const c0=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},bz=(e,t)=>{if(!Ir.has(e)){const n=zc(pz,t),r={},i=vz.bind(gn,e);let o=jr;const s={},a=(c,f)=>{const d=s[c]||[];return s[c]=d,d.push(f),()=>d.splice(d.indexOf(f),1)},l=(c,f,d)=>{e.set(c,f);const p=s[c];if(p)for(const h of p)h(f,d)},u=()=>{if(!Ir.has(e)&&(Ir.set(e,[r,{},{},{},i,l,a]),!m_)){const c=n.initFocus(setTimeout.bind(gn,c0.bind(gn,r,mz))),f=n.initReconnect(setTimeout.bind(gn,c0.bind(gn,r,gz)));o=()=>{c&&c(),f&&f(),Ir.delete(e)}}};return u(),[e,i,u,o]}return[e,Ir.get(e)[4]]},wz=(e,t,n,r,i)=>{const o=n.errorRetryCount,s=i.retryCount,a=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!Dn(o)&&s>o||setTimeout(r,a,i)},xz=(e,t)=>ha(e)==ha(t),[y_,Sz]=bz(new Map);zc({onLoadingSlow:jr,onSuccess:jr,onError:jr,onErrorRetry:wz,onDiscarded:jr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:l0?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:l0?5e3:3e3,compare:xz,isPaused:()=>!1,cache:y_,mutate:Sz,fallback:{}},dz);A.createContext({});const _z="$inf$",v_=Xm&&window.__SWR_DEVTOOLS_USE__,kz=v_?window.__SWR_DEVTOOLS_USE__:[],Ez=()=>{v_&&(window.__SWR_DEVTOOLS_REACT__=X)},Tz=e=>(t,n,r)=>e(t,n&&((...o)=>{const[s]=g_(t),[,,,a]=Ir.get(y_);if(s.startsWith(_z))return n(...o);const l=a[s];return Dn(l)?n(...o):(delete a[s],l)}),r);kz.concat(Tz);Ez();X.use;var Rz=e=>{let t={},n=new Date,r=new Date;r.setDate(n.getDate()-1);let i=new Date;i.setDate(n.getDate()-7);let o=new Date;return o.setDate(n.getDate()-30),e.forEach(s=>{let a=new Date(s.createdAt),l=a.toDateString()===n.toDateString(),u=a.toDateString()===r.toDateString(),c=a>=i,f=a>=o,d;l?d="Today":u?d="Yesterday":c?d="Previous 7 days":f?d="Previous 30 days":d=a.toLocaleString("default",{month:"long",year:"numeric"}).split(" ").slice(0,1).join(" "),t[d]||(t[d]=[]),t[d].push(s)}),t},b_=vt({key:"ThreadIdToResume",default:void 0}),Cz=vt({key:"ChatProfile",default:void 0}),f0=vt({key:"SessionId",default:Mc()}),nh=BS({key:"SessionIdSelector",get:({get:e})=>e(f0),set:({set:e},t)=>e(f0,t instanceof X$?Mc():t)}),Zm=vt({key:"Session",dangerouslyAllowMutability:!0,default:void 0}),w_=vt({key:"Actions",default:[]}),Jm=vt({key:"Messages",dangerouslyAllowMutability:!0,default:[]}),x_=vt({key:"TokenCount",default:0}),S_=vt({key:"Loading",default:!1}),__=vt({key:"AskUser",default:void 0}),eg=vt({key:"ChatSettings",default:[]}),Az=BS({key:"ChatSettingsValue/Default",get:({get:e})=>e(eg).reduce((t,n)=>(t[n.id]=n.initial,t),{})}),k_=vt({key:"ChatSettingsValue",default:Az}),E_=vt({key:"DisplayElements",default:[]}),T_=vt({key:"AvatarElements",default:[]}),R_=vt({key:"TasklistElements",default:[]}),tg=vt({key:"FirstUserMessage",default:void 0}),Pz=vt({key:"AccessToken",default:void 0});vt({key:"User",default:null});vt({key:"ThreadHistory",default:{threads:void 0,currentThreadId:void 0,timeGroupedThreads:void 0,pageInfo:void 0},effects:[({setSelf:e,onSet:t})=>{t((n,r)=>{let i=n==null?void 0:n.timeGroupedThreads;n!=null&&n.threads&&!Da(n.threads,r==null?void 0:r.timeGroupedThreads)&&(i=Rz(n.threads)),e({...n,timeGroupedThreads:i})})}]});var lo=(e,t)=>za(e,t.id)?ng(e,t.id,t):"parentId"in t&&t.parentId?A_(e,t.parentId,t):"indent"in t&&t.indent&&t.indent>0?C_(e,t.indent,t):[...e,t],C_=(e,t,n,r=0)=>{let i=[...e];if(i.length===0)return[...i,n];{let o=i.length-1,s=i[o];return s.steps=s.steps||[],r+1===t?(s.steps=[...s.steps,n],i[o]={...s},i):(s.steps=C_(s.steps,t,n,r+1),i[o]={...s},i)}},A_=(e,t,n)=>{let r=[...e];for(let i=0;i{for(let n of e)if(Da(n.id,t)||n.steps&&n.steps.length>0&&za(n.steps,t))return!0;return!1},ng=(e,t,n)=>{let r=[...e];for(let i=0;i{let n=[...e];for(let r=0;r{let i=[...e];for(let o=0;o{let e=hr(Pz),t=hr(Zm),n=hr(__),r=hr(nh),i=ql(eg),o=ql(nh),s=ql(k_),a=dt(tg),l=dt(S_),u=dt(Jm),c=dt(E_),f=dt(T_),d=dt(R_),p=dt(w_),h=dt(x_),g=dt(b_),E=A.useCallback(()=>{t==null||t.socket.emit("clear_session"),t==null||t.socket.disconnect(),g(void 0),o(),a(void 0),u([]),c([]),f([]),d([]),p([]),h(0),i(),s()},[t]),y=A.useCallback((w,_)=>{u(T=>lo(T,w)),t==null||t.socket.emit("ui_message",{message:w,fileReferences:_})},[t==null?void 0:t.socket]),m=A.useCallback(w=>{n&&(u(_=>lo(_,w)),n.callback(w))},[n]),v=A.useCallback(w=>{t==null||t.socket.emit("chat_settings_change",w)},[t==null?void 0:t.socket]),S=A.useCallback(()=>{l(!1),t==null||t.socket.emit("stop")},[t==null?void 0:t.socket]),k=A.useCallback(w=>{let _=t==null?void 0:t.socket;if(!_)return;let T=new Promise((N,$)=>{_.once("action_response",M=>{M.status?N(M):$(M)})});return _.emit("action_call",w),T},[t==null?void 0:t.socket]);return{uploadFile:A.useCallback((w,_,T)=>w.uploadFile(_,T,r,e),[r,e]),callAction:k,clear:E,replyMessage:m,sendMessage:y,stopTask:S,setIdToResume:g,updateChatSettings:v}},Nz=()=>{let e=hr(Jm),t=hr(tg);return{messages:e,firstUserMessage:t}},Oz=()=>{let e=hr(nh),[t,n]=wv(Zm),r=ql(k_),i=dt(tg),o=dt(S_),s=dt(Jm),a=dt(__),l=dt(E_),u=dt(T_),c=dt(R_),f=dt(w_),d=dt(eg),p=dt(x_),[h,g]=wv(Cz),E=hr(b_),y=A.useCallback(({client:S,userEnv:k,accessToken:w})=>{let _=Ql(S.httpEndpoint,{path:"/ws/socket.io",extraHeaders:{Authorization:w||"","X-Chainlit-Session-Id":e,"X-Chainlit-Thread-Id":E||"","user-env":JSON.stringify(k),"X-Chainlit-Chat-Profile":h||""}});n(T=>{var N,$;return(N=T==null?void 0:T.socket)==null||N.removeAllListeners(),($=T==null?void 0:T.socket)==null||$.close(),{socket:_}}),_.on("connect",()=>{_.emit("connection_successful"),n(T=>({...T,error:!1}))}),_.on("connect_error",T=>{n(N=>({...N,error:!0}))}),_.on("task_start",()=>{o(!0)}),_.on("task_end",()=>{o(!1)}),_.on("reload",()=>{_.emit("clear_session"),window.location.reload()}),_.on("resume_thread",T=>{var M,L;let N=[];for(let j of T.steps)N=lo(N,j);(M=T.metadata)!=null&&M.chat_profile&&g((L=T.metadata)==null?void 0:L.chat_profile),s(N);let $=T.elements||[];u($.filter(j=>j.type==="avatar")),c($.filter(j=>j.type==="tasklist")),l($.filter(j=>["avatar","tasklist"].indexOf(j.type)===-1))}),_.on("new_message",T=>{s(N=>lo(N,T))}),_.on("init_thread",T=>{i(T)}),_.on("update_message",T=>{s(N=>ng(N,T.id,T))}),_.on("delete_message",T=>{s(N=>P_(N,T.id))}),_.on("stream_start",T=>{s(N=>lo(N,T))}),_.on("stream_token",({id:T,token:N,isSequence:$})=>{s(M=>N_(M,T,N,$))}),_.on("ask",({msg:T,spec:N},$)=>{a({spec:N,callback:$}),s(M=>lo(M,T)),o(!1)}),_.on("ask_timeout",()=>{a(void 0),o(!1)}),_.on("clear_ask",()=>{a(void 0)}),_.on("chat_settings",T=>{d(T),r()}),_.on("element",T=>{!T.url&&T.chainlitKey&&(T.url=S.getElementUrl(T.chainlitKey,e,w)),T.type==="avatar"?u(N=>{let $=N.findIndex(M=>M.id===T.id);return $===-1?[...N,T]:[...N.slice(0,$),T,...N.slice($+1)]}):T.type==="tasklist"?c(N=>{let $=N.findIndex(M=>M.id===T.id);return $===-1?[...N,T]:[...N.slice(0,$),T,...N.slice($+1)]}):l(N=>{let $=N.findIndex(M=>M.id===T.id);return $===-1?[...N,T]:[...N.slice(0,$),T,...N.slice($+1)]})}),_.on("remove_element",T=>{l(N=>N.filter($=>$.id!==T.id)),c(N=>N.filter($=>$.id!==T.id)),u(N=>N.filter($=>$.id!==T.id))}),_.on("action",T=>{f(N=>[...N,T])}),_.on("remove_action",T=>{f(N=>{let $=N.findIndex(M=>M.id===T.id);return $===-1?N:[...N.slice(0,$),...N.slice($+1)]})}),_.on("token_usage",T=>{p(N=>N+T)})},[n,e,h]),m=A.useCallback(oD(y,200),[y]),v=A.useCallback(()=>{t!=null&&t.socket&&(t.socket.removeAllListeners(),t.socket.close())},[t]);return{connect:m,disconnect:v,chatProfile:h,idToResume:E,setChatProfile:g}},$z="token";function Lz(){try{return localStorage.removeItem($z)}catch{return}}var d0=class extends Error{constructor(e,t){super(e),this.detail=t}toString(){return this.detail?`${this.message}: ${this.detail}`:this.message}},Iz=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,i){try{let o={};n&&(o.Authorization=this.checkToken(n));let s;r instanceof FormData?s=r:(o["Content-Type"]="application/json",s=r?JSON.stringify(r):null);let a=await fetch(this.buildEndpoint(t),{method:e,headers:o,signal:i,body:s});if(!a.ok){let l=await a.json();throw a.status===401&&this.on401&&(Lz(),this.on401()),new d0(a.statusText,l.detail)}return a}catch(o){throw o instanceof d0&&this.onError&&this.onError(o),console.error(o),o}}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)}},Mz=class extends Iz{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,i){var a,l;let o={userEnv:t};e.type==="CHAT"?o.chatGeneration=e:o.completionGeneration=e;let s=(l=(a=await this.post("/generation",o,r,n.signal))==null?void 0:a.body)==null?void 0:l.getReader();return new ReadableStream({start(u){function c(){s.read().then(({done:f,value:d})=>{if(f){u.close(),i&&i(f,"");return}let p=new TextDecoder("utf-8").decode(d);i&&i(f,p),u.enqueue(d),c()}).catch(f=>{u.close(),i&&i(!0,""),console.error(f)})}c()}})}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 i=new XMLHttpRequest,o=new Promise((s,a)=>{let l=new FormData;l.append("file",e),i.open("POST",this.buildEndpoint(`/project/file?session_id=${n}`),!0),r&&i.setRequestHeader("Authorization",this.checkToken(r)),i.upload.onprogress=function(u){if(u.lengthComputable){let c=u.loaded/u.total*100;t(c)}},i.onload=function(){if(i.status===200){let u=JSON.parse(i.responseText);s(u)}else a("Upload failed")},i.onerror=function(){a("Upload error")},i.send(l)});return{xhr:i,promise:o}}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 $_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ta(o)))==null?void 0:s.classGroupId}const p0=/^\[(.+)\]$/;function zz(e){if(p0.test(e)){const t=p0.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function jz(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Fz(Object.entries(e.classGroups),n).forEach(([o,s])=>{rh(s,r,o,t)}),r}function rh(e,t,n,r){e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:h0(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Bz(i)){rh(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{rh(s,h0(t,o),n,r)})})}function h0(e,t){let n=e;return t.split(rg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Bz(e){return e.isThemeGetter}function Fz(e,t){return t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[t+s,a])):o);return[n,i]}):e}function Vz(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function i(o,s){n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}}const I_="!";function Uz(e){const t=e.separator,n=t.length===1,r=t[0],i=t.length;return function(s){const a=[];let l=0,u=0,c;for(let g=0;gu?c-u:void 0;return{modifiers:a,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}}}function Hz(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 Wz(e){return{cache:Vz(e.cacheSize),splitModifiers:Uz(e),...Dz(e)}}const Kz=/\s+/;function qz(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=new Set;return e.trim().split(Kz).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:c}=n(s);let f=r(c?u.substring(0,c):u),d=!!c;if(!f){if(!c)return{isTailwindClass:!1,originalClassName:s};if(f=r(u),!f)return{isTailwindClass:!1,originalClassName:s};d=!1}const p=Hz(a).join(":");return{isTailwindClass:!0,modifierId:l?p+I_:p,classGroupId:f,originalClassName:s,hasPostfixModifier:d}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=s,c=a+l;return o.has(c)?!1:(o.add(c),i(l,u).forEach(f=>o.add(a+f)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function Gz(){let e=0,t,n,r="";for(;ef(c),e());return n=Wz(u),r=n.cache.get,i=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=qz(l,n);return i(l,c),c}return function(){return o(Gz.apply(null,arguments))}}function je(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const D_=/^\[(?:([a-z-]+):)?(.+)\]$/i,Qz=/^\d+\/\d+$/,Xz=new Set(["px","full","screen"]),Zz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jz=/\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$/,ej=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,tj=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function ur(e){return vi(e)||Xz.has(e)||Qz.test(e)}function Rr(e){return Xo(e,"length",cj)}function vi(e){return!!e&&!Number.isNaN(Number(e))}function _l(e){return Xo(e,"number",vi)}function xs(e){return!!e&&Number.isInteger(Number(e))}function rj(e){return e.endsWith("%")&&vi(e.slice(0,-1))}function ge(e){return D_.test(e)}function Cr(e){return Zz.test(e)}const ij=new Set(["length","size","percentage"]);function oj(e){return Xo(e,ij,z_)}function sj(e){return Xo(e,"position",z_)}const aj=new Set(["image","url"]);function lj(e){return Xo(e,aj,dj)}function uj(e){return Xo(e,"",fj)}function Ss(){return!0}function Xo(e,t,n){const r=D_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function cj(e){return Jz.test(e)&&!ej.test(e)}function z_(){return!1}function fj(e){return tj.test(e)}function dj(e){return nj.test(e)}function pj(){const e=je("colors"),t=je("spacing"),n=je("blur"),r=je("brightness"),i=je("borderColor"),o=je("borderRadius"),s=je("borderSpacing"),a=je("borderWidth"),l=je("contrast"),u=je("grayscale"),c=je("hueRotate"),f=je("invert"),d=je("gap"),p=je("gradientColorStops"),h=je("gradientColorStopPositions"),g=je("inset"),E=je("margin"),y=je("opacity"),m=je("padding"),v=je("saturate"),S=je("scale"),k=je("sepia"),w=je("skew"),_=je("space"),T=je("translate"),N=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",ge,t],L=()=>[ge,t],j=()=>["",ur,Rr],H=()=>["auto",vi,ge],V=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],K=()=>["solid","dashed","dotted","double","none"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],z=()=>["start","end","center","between","around","evenly","stretch"],G=()=>["","0",ge],x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[vi,_l],C=()=>[vi,ge];return{cacheSize:500,separator:":",theme:{colors:[Ss],spacing:[ur,Rr],blur:["none","",Cr,ge],brightness:le(),borderColor:[e],borderRadius:["none","","full",Cr,ge],borderSpacing:L(),borderWidth:j(),contrast:le(),grayscale:G(),hueRotate:C(),invert:G(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[rj,Rr],inset:M(),margin:M(),opacity:le(),padding:L(),saturate:le(),scale:le(),sepia:G(),skew:C(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[Cr]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:[...V(),ge]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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",xs,ge]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",xs,ge]}],"grid-cols":[{"grid-cols":[Ss]}],"col-start-end":[{col:["auto",{span:["full",xs,ge]},ge]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Ss]}],"row-start-end":[{row:["auto",{span:[xs,ge]},ge]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[E]}],mx:[{mx:[E]}],my:[{my:[E]}],ms:[{ms:[E]}],me:[{me:[E]}],mt:[{mt:[E]}],mr:[{mr:[E]}],mb:[{mb:[E]}],ml:[{ml:[E]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,t]}],"min-w":[{"min-w":[ge,t,"min","max","fit"]}],"max-w":[{"max-w":[ge,t,"none","full","min","max","fit","prose",{screen:[Cr]},Cr]}],h:[{h:[ge,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Cr,Rr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_l]}],"font-family":[{font:[Ss]}],"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",ge]}],"line-clamp":[{"line-clamp":["none",vi,_l]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ur,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ur,Rr]}],"underline-offset":[{"underline-offset":["auto",ur,ge]}],"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:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],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",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...V(),sj]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",oj]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},lj]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...K(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:K()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...K()]}],"outline-offset":[{"outline-offset":[ur,ge]}],"outline-w":[{outline:[ur,Rr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ur,Rr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cr,uj]}],"shadow-color":[{shadow:[Ss]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":Z()}],"bg-blend":[{"bg-blend":Z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Cr,ge]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[v]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[v]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"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",ge]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[xs,ge]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],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",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ur,Rr,_l]}],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 hj=Yz(pj);function j_(...e){return hj(it(e))}const B_=A.forwardRef(({className:e,type:t,...n},r)=>O.jsx("input",{type:t,className:j_("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}));B_.displayName="Input";function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>mj(n,t))}const F_=A.forwardRef((e,t)=>{const{children:n,...r}=e,i=A.Children.toArray(n),o=i.find(vj);if(o){const s=o.props.children,a=i.map(l=>l===o?A.Children.count(s)>1?A.Children.only(null):A.isValidElement(s)?s.props.children:null:l);return A.createElement(ih,q({},r,{ref:t}),A.isValidElement(s)?A.cloneElement(s,void 0,a):null)}return A.createElement(ih,q({},r,{ref:t}),n)});F_.displayName="Slot";const ih=A.forwardRef((e,t)=>{const{children:n,...r}=e;return A.isValidElement(n)?A.cloneElement(n,{...bj(r,n.props),ref:t?gj(t,n.ref):n.ref}):A.Children.count(n)>1?A.Children.only(null):null});ih.displayName="SlotClone";const yj=({children:e})=>A.createElement(A.Fragment,null,e);function vj(e){return A.isValidElement(e)&&e.type===yj}function bj(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function V_(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,g0=wj,xj=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return g0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],f=o==null?void 0:o[u];if(c===null)return null;const d=m0(c)||m0(f);return i[u][d]}),a=n&&Object.entries(n).reduce((u,c)=>{let[f,d]=c;return d===void 0||(u[f]=d),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:d,...p}=c;return Object.entries(p).every(h=>{let[g,E]=h;return Array.isArray(E)?E.includes({...o,...a}[g]):{...o,...a}[g]===E})?[...u,f,d]:u},[]);return g0(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Sj=xj("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"}}),Du=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const s=r?F_:"button";return O.jsx(s,{className:j_(Sj({variant:t,size:n,className:e})),ref:o,...i})});Du.displayName="Button";function _j(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kj=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ej=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tj={};function y0(e,t){return((t||Tj).jsx?Ej:kj).test(e)}const Rj=/[ \t\n\f\r]/g;function Cj(e){return typeof e=="object"?e.type==="text"?v0(e.value):!1:v0(e)}function v0(e){return e.replace(Rj,"")===""}class ja{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ja.prototype.property={};ja.prototype.normal={};ja.prototype.space=null;function U_(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&$j.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(w0,Dj);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!w0.test(o)){let s=o.replace(Lj,Mj);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ig}return new i(r,t)}function Mj(e){return"-"+e.toLowerCase()}function Dj(e){return e.charAt(1).toUpperCase()}const zj={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},jj=U_([K_,W_,Y_,Q_,Nj],"html"),og=U_([K_,W_,Y_,Q_,Oj],"svg");function Bj(e){return e.join(" ").trim()}var X_={},x0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Fj=/\n/g,Vj=/^\s*/,Uj=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Hj=/^:\s*/,Wj=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Kj=/^[;\s]*/,qj=/^\s+|\s+$/g,Gj=` `,S0="/",_0="*",hi="",Yj="comment",Qj="declaration",Xj=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(h){var g=h.match(Fj);g&&(n+=g.length);var E=h.lastIndexOf(Gj);r=~E?h.length-E:r+h.length}function o(){var h={line:n,column:r};return function(g){return g.position=new s(h),u(),g}}function s(h){this.start=h,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(h){var g=new Error(t.source+":"+n+":"+r+": "+h);if(g.reason=h,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function l(h){var g=h.exec(e);if(g){var E=g[0];return i(E),e=e.slice(E.length),g}}function u(){l(Vj)}function c(h){var g;for(h=h||[];g=f();)g!==!1&&h.push(g);return h}function f(){var h=o();if(!(S0!=e.charAt(0)||_0!=e.charAt(1))){for(var g=2;hi!=e.charAt(g)&&(_0!=e.charAt(g)||S0!=e.charAt(g+1));)++g;if(g+=2,hi===e.charAt(g-1))return a("End of comment missing");var E=e.slice(2,g-2);return r+=2,i(E),e=e.slice(g),r+=2,h({type:Yj,comment:E})}}function d(){var h=o(),g=l(Uj);if(g){if(f(),!l(Hj))return a("property missing ':'");var E=l(Wj),y=h({type:Qj,property:k0(g[0].replace(x0,hi)),value:E?k0(E[0].replace(x0,hi)):hi});return l(Kj),y}}function p(){var h=[];c(h);for(var g;g=d();)g!==!1&&(h.push(g),c(h));return h}return u(),p()};function k0(e){return e?e.replace(qj,hi):hi}var Zj=Yi&&Yi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X_,"__esModule",{value:!0});var Jj=Zj(Xj);function eB(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Jj.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var s=o.property,a=o.value;i?t(s,a,o):a&&(n=n||{},n[s]=a)}}),n}var E0=X_.default=eB;const tB=E0.default||E0,Z_=J_("end"),sg=J_("start");function J_(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function nB(e){const t=sg(e),n=Z_(e);if(t&&n)return{start:t,end:n}}function qs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?T0(e.position):"start"in e||"end"in e?T0(e):"line"in e||"column"in e?ah(e):""}function ah(e){return R0(e&&e.line)+":"+R0(e&&e.column)}function T0(e){return ah(e&&e.start)+"-"+ah(e&&e.end)}function R0(e){return e&&typeof e=="number"?e:1}class $t extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=qs(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;const ag={}.hasOwnProperty,rB=new Map,iB=/[A-Z]/g,oB=/-([a-z])/g,sB=new Set(["table","tbody","thead","tfoot","tr"]),aB=new Set(["td","th"]),ek="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function lB(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=gB(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=mB(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?og:jj,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=tk(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function tk(e,t,n){if(t.type==="element")return uB(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return cB(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return dB(e,t,n);if(t.type==="mdxjsEsm")return fB(e,t);if(t.type==="root")return pB(e,t,n);if(t.type==="text")return hB(e,t)}function uB(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=og,e.schema=i),e.ancestors.push(t);const o=rk(e,t.tagName,!1),s=yB(e,t);let a=ug(e,t);return sB.has(t.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Cj(l):!0})),nk(e,s,o,t),lg(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function cB(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ma(e,t.position)}function fB(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ma(e,t.position)}function dB(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=og,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:rk(e,t.name,!0),s=vB(e,t),a=ug(e,t);return nk(e,s,o,t),lg(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function pB(e,t,n){const r={};return lg(r,ug(e,t)),e.create(t,e.Fragment,r,n)}function hB(e,t){return t.value}function nk(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function lg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mB(e,t,n){return r;function r(i,o,s,a){const u=Array.isArray(s.children)?n:t;return a?u(o,s,a):u(o,s)}}function gB(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),l=sg(r);return t(i,o,s,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function yB(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&ag.call(t.properties,i)){const o=bB(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&aB.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function vB(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ma(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else ma(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function ug(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:rB;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o0?(nr(e,e.length,0,t),e):t}const P0={}.hasOwnProperty;function CB(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function wo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const qn=ri(/[A-Za-z]/),tn=ri(/[\dA-Za-z]/),NB=ri(/[#-'*+\--9=?A-Z^-~]/);function lh(e){return e!==null&&(e<32||e===127)}const uh=ri(/\d/),OB=ri(/[\dA-Fa-f]/),$B=ri(/[!-/:-@[-`{-~]/);function pe(e){return e!==null&&e<-2}function Gt(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const LB=ri(/\p{P}|\p{S}/u),IB=ri(/\s/);function ri(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Jo(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ze(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(l){return Ce(l)?(e.enter(n),a(l)):t(l)}function a(l){return Ce(l)&&o++s))return;const _=t.events.length;let T=_,N,$;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(N){$=t.events[T][1].end;break}N=!0}for(y(r),w=_;wv;){const k=n[S];t.containerState=k[1],k[0].exit.call(t,e)}n.length=v}function m(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function BB(e,t,n){return ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function O0(e){if(e===null||Gt(e)||IB(e))return 1;if(LB(e))return 2}function fg(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);$0(f,-l),$0(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=yn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=yn(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=yn(u,fg(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=yn(u,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=yn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,nr(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&Ce(w)?ze(e,m,"linePrefix",o+1)(w):m(w)}function m(w){return w===null||pe(w)?e.check(L0,g,S)(w):(e.enter("codeFlowValue"),v(w))}function v(w){return w===null||pe(w)?(e.exit("codeFlowValue"),m(w)):(e.consume(w),v)}function S(w){return e.exit("codeFenced"),t(w)}function k(w,_,T){let N=0;return $;function $(V){return w.enter("lineEnding"),w.consume(V),w.exit("lineEnding"),M}function M(V){return w.enter("codeFencedFence"),Ce(V)?ze(w,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):L(V)}function L(V){return V===a?(w.enter("codeFencedFenceSequence"),j(V)):T(V)}function j(V){return V===a?(N++,w.consume(V),j):N>=s?(w.exit("codeFencedFenceSequence"),Ce(V)?ze(w,H,"whitespace")(V):H(V)):T(V)}function H(V){return V===null||pe(V)?(w.exit("codeFencedFence"),_(V)):T(V)}}}function ZB(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const wd={name:"codeIndented",tokenize:e8},JB={tokenize:t8,partial:!0};function e8(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),ze(e,o,"linePrefix",4+1)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?l(u):pe(u)?e.attempt(JB,s,l)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||pe(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),a)}function l(u){return e.exit("codeIndented"),t(u)}}function t8(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):pe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ze(e,o,"linePrefix",4+1)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):pe(s)?i(s):n(s)}}const n8={name:"codeText",tokenize:o8,resolve:r8,previous:i8};function r8(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function ck(e,t,n,r,i,o,s,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),d):y===null||y===32||y===41||lh(y)?n(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),g(y))}function d(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(a),d(y)):y===null||y===60||pe(y)?n(y):(e.consume(y),y===92?h:p)}function h(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function g(y){return!c&&(y===null||y===41||Gt(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(y)):c999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):pe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||pe(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),l||(l=!Ce(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function dk(e,t,n,r,i,o){let s;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),s=d===40?41:d,l):n(d)}function l(d){return d===s?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===s?(e.exit(o),l(s)):d===null?n(d):pe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ze(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===s||d===null||pe(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===s||d===92?(e.consume(d),c):c(d)}}function Gs(e,t){let n;return r;function r(i){return pe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ce(i)?ze(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const d8={name:"definition",tokenize:h8},p8={tokenize:m8,partial:!0};function h8(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),s(p)}function s(p){return fk.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=wo(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return Gt(p)?Gs(e,u)(p):u(p)}function u(p){return ck(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(p8,f,f)(p)}function f(p){return Ce(p)?ze(e,d,"whitespace")(p):d(p)}function d(p){return p===null||pe(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function m8(e,t,n){return r;function r(a){return Gt(a)?Gs(e,i)(a):n(a)}function i(a){return dk(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Ce(a)?ze(e,s,"whitespace")(a):s(a)}function s(a){return a===null||pe(a)?t(a):n(a)}}const g8={name:"hardBreakEscape",tokenize:y8};function y8(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return pe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const v8={name:"headingAtx",tokenize:w8,resolve:b8};function b8(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},nr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function w8(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||Gt(c)?(e.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||pe(c)?(e.exit("atxHeading"),t(c)):Ce(c)?ze(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Gt(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const x8=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],M0=["pre","script","style","textarea"],S8={name:"htmlFlow",tokenize:T8,resolveTo:E8,concrete:!0},_8={tokenize:C8,partial:!0},k8={tokenize:R8,partial:!0};function E8(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function T8(e,t,n){const r=this;let i,o,s,a,l;return u;function u(b){return c(b)}function c(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),f}function f(b){return b===33?(e.consume(b),d):b===47?(e.consume(b),o=!0,g):b===63?(e.consume(b),i=3,r.interrupt?t:x):qn(b)?(e.consume(b),s=String.fromCharCode(b),E):n(b)}function d(b){return b===45?(e.consume(b),i=2,p):b===91?(e.consume(b),i=5,a=0,h):qn(b)?(e.consume(b),i=4,r.interrupt?t:x):n(b)}function p(b){return b===45?(e.consume(b),r.interrupt?t:x):n(b)}function h(b){const I="CDATA[";return b===I.charCodeAt(a++)?(e.consume(b),a===I.length?r.interrupt?t:L:h):n(b)}function g(b){return qn(b)?(e.consume(b),s=String.fromCharCode(b),E):n(b)}function E(b){if(b===null||b===47||b===62||Gt(b)){const I=b===47,Y=s.toLowerCase();return!I&&!o&&M0.includes(Y)?(i=1,r.interrupt?t(b):L(b)):x8.includes(s.toLowerCase())?(i=6,I?(e.consume(b),y):r.interrupt?t(b):L(b)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(b):o?m(b):v(b))}return b===45||tn(b)?(e.consume(b),s+=String.fromCharCode(b),E):n(b)}function y(b){return b===62?(e.consume(b),r.interrupt?t:L):n(b)}function m(b){return Ce(b)?(e.consume(b),m):$(b)}function v(b){return b===47?(e.consume(b),$):b===58||b===95||qn(b)?(e.consume(b),S):Ce(b)?(e.consume(b),v):$(b)}function S(b){return b===45||b===46||b===58||b===95||tn(b)?(e.consume(b),S):k(b)}function k(b){return b===61?(e.consume(b),w):Ce(b)?(e.consume(b),k):v(b)}function w(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),l=b,_):Ce(b)?(e.consume(b),w):T(b)}function _(b){return b===l?(e.consume(b),l=null,N):b===null||pe(b)?n(b):(e.consume(b),_)}function T(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||Gt(b)?k(b):(e.consume(b),T)}function N(b){return b===47||b===62||Ce(b)?v(b):n(b)}function $(b){return b===62?(e.consume(b),M):n(b)}function M(b){return b===null||pe(b)?L(b):Ce(b)?(e.consume(b),M):n(b)}function L(b){return b===45&&i===2?(e.consume(b),K):b===60&&i===1?(e.consume(b),Z):b===62&&i===4?(e.consume(b),le):b===63&&i===3?(e.consume(b),x):b===93&&i===5?(e.consume(b),G):pe(b)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(_8,C,j)(b)):b===null||pe(b)?(e.exit("htmlFlowData"),j(b)):(e.consume(b),L)}function j(b){return e.check(k8,H,C)(b)}function H(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),V}function V(b){return b===null||pe(b)?j(b):(e.enter("htmlFlowData"),L(b))}function K(b){return b===45?(e.consume(b),x):L(b)}function Z(b){return b===47?(e.consume(b),s="",z):L(b)}function z(b){if(b===62){const I=s.toLowerCase();return M0.includes(I)?(e.consume(b),le):L(b)}return qn(b)&&s.length<8?(e.consume(b),s+=String.fromCharCode(b),z):L(b)}function G(b){return b===93?(e.consume(b),x):L(b)}function x(b){return b===62?(e.consume(b),le):b===45&&i===2?(e.consume(b),x):L(b)}function le(b){return b===null||pe(b)?(e.exit("htmlFlowData"),C(b)):(e.consume(b),le)}function C(b){return e.exit("htmlFlow"),t(b)}}function R8(e,t,n){const r=this;return i;function i(s){return pe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function C8(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(jc,t,n)}}const A8={name:"htmlText",tokenize:P8};function P8(e,t,n){const r=this;let i,o,s;return a;function a(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),u):x===47?(e.consume(x),k):x===63?(e.consume(x),v):qn(x)?(e.consume(x),T):n(x)}function u(x){return x===45?(e.consume(x),c):x===91?(e.consume(x),o=0,h):qn(x)?(e.consume(x),m):n(x)}function c(x){return x===45?(e.consume(x),p):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),d):pe(x)?(s=f,Z(x)):(e.consume(x),f)}function d(x){return x===45?(e.consume(x),p):f(x)}function p(x){return x===62?K(x):x===45?d(x):f(x)}function h(x){const le="CDATA[";return x===le.charCodeAt(o++)?(e.consume(x),o===le.length?g:h):n(x)}function g(x){return x===null?n(x):x===93?(e.consume(x),E):pe(x)?(s=g,Z(x)):(e.consume(x),g)}function E(x){return x===93?(e.consume(x),y):g(x)}function y(x){return x===62?K(x):x===93?(e.consume(x),y):g(x)}function m(x){return x===null||x===62?K(x):pe(x)?(s=m,Z(x)):(e.consume(x),m)}function v(x){return x===null?n(x):x===63?(e.consume(x),S):pe(x)?(s=v,Z(x)):(e.consume(x),v)}function S(x){return x===62?K(x):v(x)}function k(x){return qn(x)?(e.consume(x),w):n(x)}function w(x){return x===45||tn(x)?(e.consume(x),w):_(x)}function _(x){return pe(x)?(s=_,Z(x)):Ce(x)?(e.consume(x),_):K(x)}function T(x){return x===45||tn(x)?(e.consume(x),T):x===47||x===62||Gt(x)?N(x):n(x)}function N(x){return x===47?(e.consume(x),K):x===58||x===95||qn(x)?(e.consume(x),$):pe(x)?(s=N,Z(x)):Ce(x)?(e.consume(x),N):K(x)}function $(x){return x===45||x===46||x===58||x===95||tn(x)?(e.consume(x),$):M(x)}function M(x){return x===61?(e.consume(x),L):pe(x)?(s=M,Z(x)):Ce(x)?(e.consume(x),M):N(x)}function L(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,j):pe(x)?(s=L,Z(x)):Ce(x)?(e.consume(x),L):(e.consume(x),H)}function j(x){return x===i?(e.consume(x),i=void 0,V):x===null?n(x):pe(x)?(s=j,Z(x)):(e.consume(x),j)}function H(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||Gt(x)?N(x):(e.consume(x),H)}function V(x){return x===47||x===62||Gt(x)?N(x):n(x)}function K(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function Z(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),z}function z(x){return Ce(x)?ze(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):G(x)}function G(x){return e.enter("htmlTextData"),s(x)}}const dg={name:"labelEnd",tokenize:M8,resolveTo:I8,resolveAll:L8},N8={tokenize:D8},O8={tokenize:z8},$8={tokenize:j8};function L8(e){let t=-1;for(;++t=3&&(u===null||pe(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),Ce(u)?ze(e,a,"whitespace")(u):a(u))}}const Bt={name:"list",tokenize:G8,continuation:{tokenize:Y8},exit:X8},K8={tokenize:Z8,partial:!0},q8={tokenize:Q8,partial:!0};function G8(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(p){const h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:uh(p)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Xl,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return uh(p)&&++s<10?(e.consume(p),l):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(jc,r.interrupt?n:c,e.attempt(K8,d,f))}function c(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function f(p){return Ce(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function Y8(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(jc,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ze(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!Ce(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(q8,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ze(e,e.attempt(Bt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function Q8(e,t,n){const r=this;return ze(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function X8(e){e.exit(this.containerState.type)}function Z8(e,t,n){const r=this;return ze(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const s=r.events[r.events.length-1];return!Ce(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const D0={name:"setextUnderline",tokenize:eF,resolveTo:J8};function J8(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=s,e.push(["exit",s,t]),e}function eF(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),Ce(u)?ze(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||pe(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const tF={tokenize:nF};function nF(e){const t=this,n=e.attempt(jc,r,e.attempt(this.parser.constructs.flowInitial,i,ze(e,e.attempt(this.parser.constructs.flow,i,e.attempt(a8,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const rF={resolveAll:hk()},iF=pk("string"),oF=pk("text");function pk(e){return{tokenize:t,resolveAll:hk(e==="text"?sF:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function uF(e,t){let n=-1;const r=[];let i;for(;++n0){const Rt=ue.tokenStack[ue.tokenStack.length-1];(Rt[1]||j0).call(ue,void 0,Rt[0])}for(Q.position={start:Ar(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:Ar(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function MF(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DF(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function yk(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function zF(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yk(e,t);const i={src:Jo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function jF(e,t){const n={src:Jo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function BF(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function FF(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yk(e,t);const i={href:Jo(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function VF(e,t){const n={href:Jo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function UF(e,t,n){const r=e.all(t),i=n?HF(n):vk(t),o={},s=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1}function WF(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=sg(t.children[1]),l=Z_(t.children[t.children.length-1]);a&&l&&(s.position={start:a,end:l}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function QF(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(V0(t.slice(i),i>0,!1)),o.join("")}function V0(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===B0||o===F0;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===B0||o===F0;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function JF(e,t){const n={type:"text",value:ZF(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function eV(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const tV={blockquote:PF,break:NF,code:OF,delete:$F,emphasis:LF,footnoteReference:IF,heading:MF,html:DF,imageReference:zF,image:jF,inlineCode:BF,linkReference:FF,link:VF,listItem:UF,list:WF,paragraph:KF,root:qF,strong:GF,table:YF,tableCell:XF,tableRow:QF,text:JF,thematicBreak:eV,toml:kl,yaml:kl,definition:kl,footnoteDefinition:kl};function kl(){}const bk=-1,Bc=0,zu=1,ju=2,pg=3,hg=4,mg=5,gg=6,wk=7,xk=8,U0=typeof self=="object"?self:globalThis,nV=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case Bc:case bk:return n(s,i);case zu:{const a=n([],i);for(const l of s)a.push(r(l));return a}case ju:{const a=n({},i);for(const[l,u]of s)a[r(l)]=r(u);return a}case pg:return n(new Date(s),i);case hg:{const{source:a,flags:l}=s;return n(new RegExp(a,l),i)}case mg:{const a=n(new Map,i);for(const[l,u]of s)a.set(r(l),r(u));return a}case gg:{const a=n(new Set,i);for(const l of s)a.add(r(l));return a}case wk:{const{name:a,message:l}=s;return n(new U0[a](l),i)}case xk:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i)}return n(new U0[o](s),i)};return r},H0=e=>nV(new Map,e)(0),Bi="",{toString:rV}={},{keys:iV}=Object,_s=e=>{const t=typeof e;if(t!=="object"||!e)return[Bc,t];const n=rV.call(e).slice(8,-1);switch(n){case"Array":return[zu,Bi];case"Object":return[ju,Bi];case"Date":return[pg,Bi];case"RegExp":return[hg,Bi];case"Map":return[mg,Bi];case"Set":return[gg,Bi]}return n.includes("Array")?[zu,n]:n.includes("Error")?[wk,n]:[ju,n]},El=([e,t])=>e===Bc&&(t==="function"||t==="symbol"),oV=(e,t,n,r)=>{const i=(s,a)=>{const l=r.push(s)-1;return n.set(a,l),l},o=s=>{if(n.has(s))return n.get(s);let[a,l]=_s(s);switch(a){case Bc:{let c=s;switch(l){case"bigint":a=xk,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([bk],s)}return i([a,c],s)}case zu:{if(l)return i([l,[...s]],s);const c=[],f=i([a,c],s);for(const d of s)c.push(o(d));return f}case ju:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const c=[],f=i([a,c],s);for(const d of iV(s))(e||!El(_s(s[d])))&&c.push([o(d),o(s[d])]);return f}case pg:return i([a,s.toISOString()],s);case hg:{const{source:c,flags:f}=s;return i([a,{source:c,flags:f}],s)}case mg:{const c=[],f=i([a,c],s);for(const[d,p]of s)(e||!(El(_s(d))||El(_s(p))))&&c.push([o(d),o(p)]);return f}case gg:{const c=[],f=i([a,c],s);for(const d of s)(e||!El(_s(d)))&&c.push(o(d));return f}}const{message:u}=s;return i([a,{name:l,message:u}],s)};return o},W0=(e,{json:t,lossy:n}={})=>{const r=[];return oV(!(t||n),!!t,new Map,r)(e),r},Bu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?H0(W0(e,t)):structuredClone(e):(e,t)=>H0(W0(e,t));function sV(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function aV(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function lV(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||sV,r=e.options.footnoteBackLabel||aV,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let l=-1;for(;++l0&&h.push({type:"text",value:" "});let m=typeof n=="string"?n:n(l,p);typeof m=="string"&&(m={type:"text",value:m}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const E=c[c.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const m=E.children[E.children.length-1];m&&m.type==="text"?m.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...h)}else c.push(...h);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Bu(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` `}]}}const Sk=function(e){if(e==null)return dV;if(typeof e=="function")return Fc(e);if(typeof e=="object")return Array.isArray(e)?uV(e):cV(e);if(typeof e=="string")return fV(e);throw new Error("Expected function, string, or object as test")};function uV(e){const t=[];let n=-1;for(;++n":""))+")"})}return d;function d(){let p=_k,h,g,E;if((!t||o(l,u,c[c.length-1]||void 0))&&(p=yV(n(l,c)),p[0]===K0))return p;if("children"in l&&l.children){const y=l;if(y.children&&p[0]!==mV)for(g=(r?y.children.length:-1)+s,E=c.concat(y);g>-1&&g0&&n.push({type:"text",value:` `}),n}function q0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function G0(e,t){const n=bV(e,t),r=n.one(e,void 0),i=lV(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` `},i),o}function kV(e,t){return e&&"run"in e?async function(n,r){const i=G0(n,{file:r,...t});await e.run(i,r)}:function(n,r){return G0(n,{file:r,...t||e})}}function Y0(e){if(e)throw e}var Zl=Object.prototype.hasOwnProperty,Ek=Object.prototype.toString,Q0=Object.defineProperty,X0=Object.getOwnPropertyDescriptor,Z0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ek.call(t)==="[object Array]"},J0=function(t){if(!t||Ek.call(t)!=="[object Object]")return!1;var n=Zl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Zl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Zl.call(t,i)},e1=function(t,n){Q0&&n.name==="__proto__"?Q0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},t1=function(t,n){if(n==="__proto__")if(Zl.call(t,n)){if(X0)return X0(t,n).value}else return;return t[n]},EV=function e(){var t,n,r,i,o,s,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});ls.length;let l;a&&s.push(i);try{l=e.apply(this,s)}catch(u){const c=u;if(a&&n)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const Un={basename:CV,dirname:AV,extname:PV,join:NV,sep:"/"};function CV(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ba(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function AV(e){if(Ba(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function PV(e){Ba(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function NV(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function $V(e,t){let n="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function Ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const LV={cwd:IV};function IV(){return"/"}function ph(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function MV(e){if(typeof e=="string")e=new URL(e);else if(!ph(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return DV(e)}function DV(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[p,...h]=c;const g=r[d][1];dh(g)&&dh(p)&&(p=Sd(!0,g,p)),r[d]=[u,p,...h]}}}}const FV=new yg().freeze();function Td(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Rd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function r1(e){if(!dh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function i1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Tl(e){return VV(e)?e:new Tk(e)}function VV(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function UV(e){return typeof e=="string"||HV(e)}function HV(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WV="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",o1=[],s1={allowDangerousHtml:!0},KV=/^(https?|ircs?|mailto|xmpp)$/i,qV=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function GV(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,s=e.disallowedElements,a=e.rehypePlugins||o1,l=e.remarkPlugins||o1,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...s1}:s1,c=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||YV,p=FV().use(AF).use(l).use(kV,u).use(a),h=new Tk;typeof r=="string"&&(h.value=r);for(const m of qV)Object.hasOwn(e,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+WV+m.id,void 0);const g=p.parse(h);let E=p.runSync(g,h);return i&&(E={type:"element",tagName:"div",properties:{className:i},children:E.type==="root"?E.children:[E]}),kk(E,y),lB(E,{Fragment:O.Fragment,components:o,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function y(m,v,S){if(m.type==="raw"&&S&&typeof v=="number")return c?S.children.splice(v,1):S.children[v]={type:"text",value:m.value},v;if(m.type==="element"){let k;for(k in bd)if(Object.hasOwn(bd,k)&&Object.hasOwn(m.properties,k)){const w=m.properties[k],_=bd[k];(_===null||_.includes(m.tagName))&&(m.properties[k]=d(String(w||""),k,m))}}if(m.type==="element"){let k=t?!t.includes(m.tagName):s?s.includes(m.tagName):!1;if(!k&&n&&typeof v=="number"&&(k=!n(m,v,S)),k&&S&&typeof v=="number")return f&&m.children?S.children.splice(v,1,...m.children):S.children.splice(v,1),v}}}function YV(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||KV.test(e.slice(0,t))?e:""}const QV=A.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1});var XV=Object.defineProperty,Fu=Object.getOwnPropertySymbols,Rk=Object.prototype.hasOwnProperty,Ck=Object.prototype.propertyIsEnumerable,a1=(e,t,n)=>t in e?XV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,l1=(e,t)=>{for(var n in t||(t={}))Rk.call(t,n)&&a1(e,n,t[n]);if(Fu)for(var n of Fu(t))Ck.call(t,n)&&a1(e,n,t[n]);return e},u1=(e,t)=>{var n={};for(var r in e)Rk.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fu)for(var r of Fu(e))t.indexOf(r)<0&&Ck.call(e,r)&&(n[r]=e[r]);return n};const vg=A.forwardRef((e,t)=>{const n=e,{alt:r,color:i,size:o,weight:s,mirrored:a,children:l,weights:u}=n,c=u1(n,["alt","color","size","weight","mirrored","children","weights"]),f=A.useContext(QV),{color:d="currentColor",size:p,weight:h="regular",mirrored:g=!1}=f,E=u1(f,["color","size","weight","mirrored"]);return X.createElement("svg",l1(l1({ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??p,height:o??p,fill:i??d,viewBox:"0 0 256 256",transform:a||g?"scale(-1, 1)":void 0},E),c),!!r&&X.createElement("title",null,r),l,u.get(s??h))});vg.displayName="IconBase";const ZV=new Map([["bold",X.createElement(X.Fragment,null,X.createElement("path",{d:"M243.78,156.53l-12-96A28,28,0,0,0,204,36H32A20,20,0,0,0,12,56v88a20,20,0,0,0,20,20H72.58l36.69,73.37A12,12,0,0,0,120,244a44.05,44.05,0,0,0,44-44V188h52a28,28,0,0,0,27.78-31.47ZM68,140H36V60H68Zm151,22.65a4,4,0,0,1-3,1.35H152a12,12,0,0,0-12,12v24a20,20,0,0,1-13.18,18.8L92,149.17V60H204a4,4,0,0,1,4,3.5l12,96A4,4,0,0,1,219,162.65Z"}))],["duotone",X.createElement(X.Fragment,null,X.createElement("path",{d:"M80,48V152H32a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z",opacity:"0.2"}),X.createElement("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"}))],["fill",X.createElement(X.Fragment,null,X.createElement("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z"}))],["light",X.createElement(X.Fragment,null,X.createElement("path",{d:"M237.83,157.27l-12-96A22,22,0,0,0,204,42H32A14,14,0,0,0,18,56v88a14,14,0,0,0,14,14H76.29l38.34,76.68A6,6,0,0,0,120,238a38,38,0,0,0,38-38V182h58a22,22,0,0,0,21.83-24.73ZM74,146H32a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H74Zm149.5,20.62A9.89,9.89,0,0,1,216,170H152a6,6,0,0,0-6,6v24a26,26,0,0,1-22.42,25.75L86,150.58V54H204a10,10,0,0,1,9.92,8.76l12,96A9.89,9.89,0,0,1,223.5,166.62Z"}))],["regular",X.createElement(X.Fragment,null,X.createElement("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"}))],["thin",X.createElement(X.Fragment,null,X.createElement("path",{d:"M235.85,157.52l-12-96A20,20,0,0,0,204,44H32A12,12,0,0,0,20,56v88a12,12,0,0,0,12,12H77.53l38.89,77.79A4,4,0,0,0,120,236a36,36,0,0,0,36-36V180h60a20,20,0,0,0,19.85-22.48ZM76,148H32a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H76Zm149,19.94a12,12,0,0,1-9,4.06H152a4,4,0,0,0-4,4v24a28,28,0,0,1-25.58,27.9L84,151.06V52H204a12,12,0,0,1,11.91,10.51l12,96A12,12,0,0,1,225,167.94Z"}))]]),JV=new Map([["bold",X.createElement(X.Fragment,null,X.createElement("path",{d:"M237,77.47A28,28,0,0,0,216,68H164V56a44.05,44.05,0,0,0-44-44,12,12,0,0,0-10.73,6.63L72.58,92H32a20,20,0,0,0-20,20v88a20,20,0,0,0,20,20H204a28,28,0,0,0,27.78-24.53l12-96A28,28,0,0,0,237,77.47ZM36,116H68v80H36ZM220,96.5l-12,96a4,4,0,0,1-4,3.5H92V106.83L126.82,37.2A20,20,0,0,1,140,56V80a12,12,0,0,0,12,12h64a4,4,0,0,1,4,4.5Z"}))],["duotone",X.createElement(X.Fragment,null,X.createElement("path",{d:"M80,104V208H32a8,8,0,0,1-8-8V112a8,8,0,0,1,8-8Z",opacity:"0.2"}),X.createElement("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"}))],["fill",X.createElement(X.Fragment,null,X.createElement("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z"}))],["light",X.createElement(X.Fragment,null,X.createElement("path",{d:"M232.49,81.44A22,22,0,0,0,216,74H158V56a38,38,0,0,0-38-38,6,6,0,0,0-5.37,3.32L76.29,98H32a14,14,0,0,0-14,14v88a14,14,0,0,0,14,14H204a22,22,0,0,0,21.83-19.27l12-96A22,22,0,0,0,232.49,81.44ZM30,200V112a2,2,0,0,1,2-2H74v92H32A2,2,0,0,1,30,200ZM225.92,97.24l-12,96A10,10,0,0,1,204,202H86V105.42l37.58-75.17A26,26,0,0,1,146,56V80a6,6,0,0,0,6,6h64a10,10,0,0,1,9.92,11.24Z"}))],["regular",X.createElement(X.Fragment,null,X.createElement("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"}))],["thin",X.createElement(X.Fragment,null,X.createElement("path",{d:"M231,82.76A20,20,0,0,0,216,76H156V56a36,36,0,0,0-36-36,4,4,0,0,0-3.58,2.21L77.53,100H32a12,12,0,0,0-12,12v88a12,12,0,0,0,12,12H204a20,20,0,0,0,19.85-17.52l12-96A20,20,0,0,0,231,82.76ZM76,204H32a4,4,0,0,1-4-4V112a4,4,0,0,1,4-4H76ZM227.91,97.49l-12,96A12,12,0,0,1,204,204H84V104.94L122.42,28.1A28,28,0,0,1,148,56V80a4,4,0,0,0,4,4h64a12,12,0,0,1,11.91,13.49Z"}))]]);var eU=Object.defineProperty,tU=Object.defineProperties,nU=Object.getOwnPropertyDescriptors,c1=Object.getOwnPropertySymbols,rU=Object.prototype.hasOwnProperty,iU=Object.prototype.propertyIsEnumerable,f1=(e,t,n)=>t in e?eU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oU=(e,t)=>{for(var n in t||(t={}))rU.call(t,n)&&f1(e,n,t[n]);if(c1)for(var n of c1(t))iU.call(t,n)&&f1(e,n,t[n]);return e},sU=(e,t)=>tU(e,nU(t));const Ak=A.forwardRef((e,t)=>X.createElement(vg,sU(oU({ref:t},e),{weights:ZV})));Ak.displayName="ThumbsDown";var aU=Object.defineProperty,lU=Object.defineProperties,uU=Object.getOwnPropertyDescriptors,d1=Object.getOwnPropertySymbols,cU=Object.prototype.hasOwnProperty,fU=Object.prototype.propertyIsEnumerable,p1=(e,t,n)=>t in e?aU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dU=(e,t)=>{for(var n in t||(t={}))cU.call(t,n)&&p1(e,n,t[n]);if(d1)for(var n of d1(t))fU.call(t,n)&&p1(e,n,t[n]);return e},pU=(e,t)=>lU(e,uU(t));const Pk=A.forwardRef((e,t)=>X.createElement(vg,pU(dU({ref:t},e),{weights:JV})));Pk.displayName="ThumbsUp";function Ze(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Mr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Nk(e){if(!Mr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Nk(e[n])}),t}function Xn(e,t,n={clone:!0}){const r=n.clone?q({},e):e;return Mr(e)&&Mr(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Mr(t[i])&&i in e&&Mr(e[i])?r[i]=Xn(e[i],t[i],n):n.clone?r[i]=Mr(t[i])?Nk(t[i]):t[i]:r[i]=t[i])}),r}const hU=Object.freeze(Object.defineProperty({__proto__:null,default:Xn,isPlainObject:Mr},Symbol.toStringTag,{value:"Module"}));function ga(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nn==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function Mk(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function Zn(e){return e&&e.ownerDocument||document}function Ai(e){return Zn(e).defaultView||window}function hh(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const SU=typeof window<"u"?A.useLayoutEffect:A.useEffect,ya=SU;function uo(e){const t=A.useRef(e);return ya(()=>{t.current=e}),A.useRef((...n)=>(0,t.current)(...n)).current}function rr(...e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{hh(n,t)})},e)}const y1={};function _U(e,t){const n=A.useRef(y1);return n.current===y1&&(n.current=e(t)),n}const kU=[];function EU(e){A.useEffect(e,kU)}class Zc{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Zc}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Dk(){const e=_U(Zc.create).current;return EU(e.disposeEffect),e}let Jc=!0,mh=!1;const TU=new Zc,RU={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function CU(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&RU[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function AU(e){e.metaKey||e.altKey||e.ctrlKey||(Jc=!0)}function Ad(){Jc=!1}function PU(){this.visibilityState==="hidden"&&mh&&(Jc=!0)}function NU(e){e.addEventListener("keydown",AU,!0),e.addEventListener("mousedown",Ad,!0),e.addEventListener("pointerdown",Ad,!0),e.addEventListener("touchstart",Ad,!0),e.addEventListener("visibilitychange",PU,!0)}function OU(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Jc||CU(t)}function $U(){const e=A.useCallback(i=>{i!=null&&NU(i.ownerDocument)},[]),t=A.useRef(!1);function n(){return t.current?(mh=!0,TU.start(100,()=>{mh=!1}),t.current=!1,!0):!1}function r(i){return OU(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function LU(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function xg(e,t){const n=q({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=q({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=q({},o),Object.keys(i).forEach(s=>{n[r][s]=xg(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function es(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const v1=e=>e,IU=()=>{let e=v1;return{configure(t){e=t},generate(t){return e(t)},reset(){e=v1}}},MU=IU(),zk=MU,DU={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ii(e,t,n="Mui"){const r=DU[t];return r?`${n}-${r}`:`${zk.generate(e)}-${t}`}function ii(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Ii(e,i,n)}),r}function zU(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const jU=Object.freeze(Object.defineProperty({__proto__:null,default:zU},Symbol.toStringTag,{value:"Module"})),BU=["onChange","maxRows","minRows","style","value"];function Rl(e){return parseInt(e,10)||0}const FU={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function VU(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const b1=A.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a}=t,l=Ze(t,BU),{current:u}=A.useRef(a!=null),c=A.useRef(null),f=rr(n,c),d=A.useRef(null),p=A.useCallback(()=>{const E=c.current,m=Ai(E).getComputedStyle(E);if(m.width==="0px")return{outerHeightStyle:0,overflowing:!1};const v=d.current;v.style.width=m.width,v.value=E.value||t.placeholder||"x",v.value.slice(-1)===` `&&(v.value+=" ");const S=m.boxSizing,k=Rl(m.paddingBottom)+Rl(m.paddingTop),w=Rl(m.borderBottomWidth)+Rl(m.borderTopWidth),_=v.scrollHeight;v.value="x";const T=v.scrollHeight;let N=_;o&&(N=Math.max(Number(o)*T,N)),i&&(N=Math.min(Number(i)*T,N)),N=Math.max(N,T);const $=N+(S==="border-box"?k+w:0),M=Math.abs(N-_)<=1;return{outerHeightStyle:$,overflowing:M}},[i,o,t.placeholder]),h=A.useCallback(()=>{const E=p();if(VU(E))return;const y=c.current;y.style.height=`${E.outerHeightStyle}px`,y.style.overflow=E.overflowing?"hidden":""},[p]);ya(()=>{const E=()=>{h()};let y;const m=Mk(E),v=c.current,S=Ai(v);S.addEventListener("resize",m);let k;return typeof ResizeObserver<"u"&&(k=new ResizeObserver(E),k.observe(v)),()=>{m.clear(),cancelAnimationFrame(y),S.removeEventListener("resize",m),k&&k.disconnect()}},[p,h]),ya(()=>{h()});const g=E=>{u||h(),r&&r(E)};return O.jsxs(A.Fragment,{children:[O.jsx("textarea",q({value:a,onChange:g,ref:f,rows:o},l)),O.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:d,tabIndex:-1,style:q({},FU.shadow,s,{paddingTop:0,paddingBottom:0})})]})});function jk(e){return typeof e=="string"}function UU(e,t,n){return e===void 0||jk(e)?t:q({},t,{ownerState:q({},t.ownerState,n)})}function Bk(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function HU(e,t,n){return typeof e=="function"?e(t,n):e}function w1(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function WU(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=it(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=q({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=q({},n,i,r);return p.length>0&&(g.className=p),Object.keys(h).length>0&&(g.style=h),{props:g,internalRef:void 0}}const s=Bk(q({},i,r)),a=w1(r),l=w1(i),u=t(s),c=it(u==null?void 0:u.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=q({},u==null?void 0:u.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),d=q({},u,n,l,a);return c.length>0&&(d.className=c),Object.keys(f).length>0&&(d.style=f),{props:d,internalRef:u.ref}}const KU=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Vu(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Ze(e,KU),a=o?{}:HU(r,i),{props:l,internalRef:u}=WU(q({},s,{externalSlotProps:a})),c=rr(u,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return UU(n,q({},l,{ref:c}),i)}var Fa={},Fk={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Fk);var Vk=Fk.exports,Pd={exports:{}},x1;function Uk(){return x1||(x1=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var r=1;r=0)&&(i[s]=n[s]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Nd)),Nd.exports}function Hk(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var GU=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,YU=Hk(function(e){return GU.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function QU(e){if(e.sheet)return e.sheet;for(var t=0;t0?St(ts,--Yt):0,Mo--,ut===10&&(Mo=1,tf--),ut}function rn(){return ut=Yt2||ba(ut)>3?"":" "}function u9(e,t){for(;--t&&rn()&&!(ut<48||ut>102||ut>57&&ut<65||ut>70&&ut<97););return Va(e,Jl()+(t<6&&Jn()==32&&rn()==32))}function yh(e){for(;rn();)switch(ut){case e:return Yt;case 34:case 39:e!==34&&e!==39&&yh(ut);break;case 40:e===41&&yh(e);break;case 92:rn();break}return Yt}function c9(e,t){for(;rn()&&e+ut!==47+10;)if(e+ut===42+42&&Jn()===47)break;return"/*"+Va(t,Yt-1)+"*"+ef(e===47?e:rn())}function f9(e){for(;!ba(Jn());)rn();return Va(e,Yt)}function d9(e){return Qk(tu("",null,null,null,[""],e=Yk(e),0,[0],e))}function tu(e,t,n,r,i,o,s,a,l){for(var u=0,c=0,f=s,d=0,p=0,h=0,g=1,E=1,y=1,m=0,v="",S=i,k=o,w=r,_=v;E;)switch(h=m,m=rn()){case 40:if(h!=108&&St(_,f-1)==58){gh(_+=Re(eu(m),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:_+=eu(m);break;case 9:case 10:case 13:case 32:_+=l9(h);break;case 92:_+=u9(Jl()-1,7);continue;case 47:switch(Jn()){case 42:case 47:Cl(p9(c9(rn(),Jl()),t,n),l);break;default:_+="/"}break;case 123*g:a[u++]=Hn(_)*y;case 125*g:case 59:case 0:switch(m){case 0:case 125:E=0;case 59+c:y==-1&&(_=Re(_,/\f/g,"")),p>0&&Hn(_)-f&&Cl(p>32?k1(_+";",r,n,f-1):k1(Re(_," ","")+";",r,n,f-2),l);break;case 59:_+=";";default:if(Cl(w=_1(_,t,n,u,c,i,a,v,S=[],k=[],f),o),m===123)if(c===0)tu(_,t,w,w,S,o,f,a,k);else switch(d===99&&St(_,3)===110?100:d){case 100:case 108:case 109:case 115:tu(e,w,w,r&&Cl(_1(e,w,w,0,0,i,a,v,i,S=[],f),k),i,k,f,a,r?S:k);break;default:tu(_,w,w,w,[""],k,0,a,k)}}u=c=p=0,g=y=1,v=_="",f=s;break;case 58:f=1+Hn(_),p=h;default:if(g<1){if(m==123)--g;else if(m==125&&g++==0&&a9()==125)continue}switch(_+=ef(m),m*g){case 38:y=c>0?1:(_+="\f",-1);break;case 44:a[u++]=(Hn(_)-1)*y,y=1;break;case 64:Jn()===45&&(_+=eu(rn())),d=Jn(),c=f=Hn(v=_+=f9(Jl())),m++;break;case 45:h===45&&Hn(_)==2&&(g=0)}}return o}function _1(e,t,n,r,i,o,s,a,l,u,c){for(var f=i-1,d=i===0?o:[""],p=kg(d),h=0,g=0,E=0;h0?d[y]+" "+m:Re(m,/&\f/g,d[y])))&&(l[E++]=v);return nf(e,t,n,i===0?Sg:a,l,u,c)}function p9(e,t,n){return nf(e,t,n,Wk,ef(s9()),va(e,2,-2),0)}function k1(e,t,n,r){return nf(e,t,n,_g,va(e,0,r),va(e,r+1,-1),r)}function xo(e,t){for(var n="",r=kg(e),i=0;i6)switch(St(e,t+1)){case 109:if(St(e,t+4)!==45)break;case 102:return Re(e,/(.+:)(.+)-([^]+)/,"$1"+Te+"$2-$3$1"+Uu+(St(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~gh(e,"stretch")?Xk(Re(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(St(e,t+1)!==115)break;case 6444:switch(St(e,Hn(e)-3-(~gh(e,"!important")&&10))){case 107:return Re(e,":",":"+Te)+e;case 101:return Re(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Te+(St(e,14)===45?"inline-":"")+"box$3$1"+Te+"$2$3$1"+Pt+"$2box$3")+e}break;case 5936:switch(St(e,t+11)){case 114:return Te+e+Pt+Re(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Te+e+Pt+Re(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Te+e+Pt+Re(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Te+e+Pt+e+e}return e}var S9=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case _g:t.return=Xk(t.value,t.length);break;case Kk:return xo([ks(t,{value:Re(t.value,"@","@"+Te)})],i);case Sg:if(t.length)return o9(t.props,function(o){switch(i9(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xo([ks(t,{props:[Re(o,/:(read-\w+)/,":"+Uu+"$1")]})],i);case"::placeholder":return xo([ks(t,{props:[Re(o,/:(plac\w+)/,":"+Te+"input-$1")]}),ks(t,{props:[Re(o,/:(plac\w+)/,":"+Uu+"$1")]}),ks(t,{props:[Re(o,/:(plac\w+)/,Pt+"input-$1")]})],i)}return""})}},_9=[S9],Zk=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var E=g.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||_9,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var E=g.getAttribute("data-emotion").split(" "),y=1;y=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var I9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},M9=/[A-Z]|^ms/g,D9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,oE=function(t){return t.charCodeAt(1)===45},T1=function(t){return t!=null&&typeof t!="boolean"},Od=Hk(function(e){return oE(e)?e:e.replace(M9,"-$&").toLowerCase()}),R1=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(D9,function(r,i,o){return Wn={name:i,styles:o,next:Wn},i})}return I9[t]!==1&&!oE(t)&&typeof n=="number"&&n!==0?n+"px":n};function wa(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Wn={name:n.name,styles:n.styles,next:Wn},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Wn={name:r.name,styles:r.styles,next:Wn},r=r.next;var i=n.styles+";";return i}return z9(e,t,n)}case"function":{if(e!==void 0){var o=Wn,s=n(e);return Wn=o,wa(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function z9(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?U9:H9},N1=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},W9=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return rE(n,r,i),B9(function(){return iE(n,r,i)}),null},K9=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=N1(t,n,r),l=a||P1(i),u=!l("as");return function(){var c=arguments,f=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&f.push("label:"+o+";"),c[0]==null||c[0].raw===void 0)f.push.apply(f,c);else{f.push(c[0][0]);for(var d=c.length,p=1;pt(Y9(i)?n:i):t;return O.jsx(V9,{styles:r})}/** * @mui/styled-engine v5.15.11 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function cE(e,t){return vh(e,t)}const X9=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Z9=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:Q9,StyledEngineProvider:G9,ThemeContext:hf,css:uE,default:cE,internal_processStyles:X9,keyframes:mf},Symbol.toStringTag,{value:"Module"})),J9=Qr(Z9),e7=Qr(hU),t7=Qr(xU),n7=Qr(wU),r7=["values","unit","step"],i7=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>q({},n,{[r.key]:r.val}),{})};function fE(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Ze(e,r7),o=i7(t),s=Object.keys(o);function a(d){return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${n})`}function l(d){return`@media (max-width:${(typeof t[d]=="number"?t[d]:d)-r/100}${n})`}function u(d,p){const h=s.indexOf(p);return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${n}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:p)-r/100}${n})`}function c(d){return s.indexOf(d)+1`@media (min-width:${Ag[e]}px)`};function wr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||O1;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||O1;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||Ag).indexOf(a)!==-1){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function a7(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function l7(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function gf(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Hu(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=gf(e,n)||r,t&&(i=t(i,r,e)),i}function st(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,u=gf(l,r)||{};return wr(s,a,f=>{let d=Hu(u,i,f);return f===d&&typeof f=="string"&&(d=Hu(u,i,`${t}${f==="default"?"":Vt(f)}`,f)),n===!1?d:{[n]:d}})};return o.propTypes={},o.filterProps=[t],o}function u7(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const c7={m:"margin",p:"padding"},f7={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},$1={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},d7=u7(e=>{if(e.length>2)if($1[e])e=$1[e];else return[e];const[t,n]=e.split(""),r=c7[t],i=f7[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Pg=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ng=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Pg,...Ng];function Ua(e,t,n,r){var i;const o=(i=gf(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function dE(e){return Ua(e,"spacing",8)}function Ha(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function p7(e,t){return n=>e.reduce((r,i)=>(r[i]=Ha(t,n),r),{})}function h7(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=d7(n),o=p7(i,r),s=e[n];return wr(e,s,o)}function pE(e,t){const n=dE(e.theme);return Object.keys(e).map(r=>h7(e,t,r,n)).reduce(Ys,{})}function tt(e){return pE(e,Pg)}tt.propTypes={};tt.filterProps=Pg;function nt(e){return pE(e,Ng)}nt.propTypes={};nt.filterProps=Ng;function m7(e=8){if(e.mui)return e;const t=dE({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function yf(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Ys(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function vn(e){return typeof e!="number"?e:`${e}px solid`}function Tn(e,t){return st({prop:e,themeKey:"borders",transform:t})}const g7=Tn("border",vn),y7=Tn("borderTop",vn),v7=Tn("borderRight",vn),b7=Tn("borderBottom",vn),w7=Tn("borderLeft",vn),x7=Tn("borderColor"),S7=Tn("borderTopColor"),_7=Tn("borderRightColor"),k7=Tn("borderBottomColor"),E7=Tn("borderLeftColor"),T7=Tn("outline",vn),R7=Tn("outlineColor"),vf=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ua(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ha(t,r)});return wr(e,e.borderRadius,n)}return null};vf.propTypes={};vf.filterProps=["borderRadius"];yf(g7,y7,v7,b7,w7,x7,S7,_7,k7,E7,vf,T7,R7);const bf=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ua(e.theme,"spacing",8),n=r=>({gap:Ha(t,r)});return wr(e,e.gap,n)}return null};bf.propTypes={};bf.filterProps=["gap"];const wf=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ua(e.theme,"spacing",8),n=r=>({columnGap:Ha(t,r)});return wr(e,e.columnGap,n)}return null};wf.propTypes={};wf.filterProps=["columnGap"];const xf=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ua(e.theme,"spacing",8),n=r=>({rowGap:Ha(t,r)});return wr(e,e.rowGap,n)}return null};xf.propTypes={};xf.filterProps=["rowGap"];const C7=st({prop:"gridColumn"}),A7=st({prop:"gridRow"}),P7=st({prop:"gridAutoFlow"}),N7=st({prop:"gridAutoColumns"}),O7=st({prop:"gridAutoRows"}),$7=st({prop:"gridTemplateColumns"}),L7=st({prop:"gridTemplateRows"}),I7=st({prop:"gridTemplateAreas"}),M7=st({prop:"gridArea"});yf(bf,wf,xf,C7,A7,P7,N7,O7,$7,L7,I7,M7);function So(e,t){return t==="grey"?t:e}const D7=st({prop:"color",themeKey:"palette",transform:So}),z7=st({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:So}),j7=st({prop:"backgroundColor",themeKey:"palette",transform:So});yf(D7,z7,j7);function Jt(e){return e<=1&&e!==0?`${e*100}%`:e}const B7=st({prop:"width",transform:Jt}),Og=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Ag[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Jt(n)}};return wr(e,e.maxWidth,t)}return null};Og.filterProps=["maxWidth"];const F7=st({prop:"minWidth",transform:Jt}),V7=st({prop:"height",transform:Jt}),U7=st({prop:"maxHeight",transform:Jt}),H7=st({prop:"minHeight",transform:Jt});st({prop:"size",cssProperty:"width",transform:Jt});st({prop:"size",cssProperty:"height",transform:Jt});const W7=st({prop:"boxSizing"});yf(B7,Og,F7,V7,U7,H7,W7);const K7={border:{themeKey:"borders",transform:vn},borderTop:{themeKey:"borders",transform:vn},borderRight:{themeKey:"borders",transform:vn},borderBottom:{themeKey:"borders",transform:vn},borderLeft:{themeKey:"borders",transform:vn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:vn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:vf},color:{themeKey:"palette",transform:So},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:So},backgroundColor:{themeKey:"palette",transform:So},p:{style:nt},pt:{style:nt},pr:{style:nt},pb:{style:nt},pl:{style:nt},px:{style:nt},py:{style:nt},padding:{style:nt},paddingTop:{style:nt},paddingRight:{style:nt},paddingBottom:{style:nt},paddingLeft:{style:nt},paddingX:{style:nt},paddingY:{style:nt},paddingInline:{style:nt},paddingInlineStart:{style:nt},paddingInlineEnd:{style:nt},paddingBlock:{style:nt},paddingBlockStart:{style:nt},paddingBlockEnd:{style:nt},m:{style:tt},mt:{style:tt},mr:{style:tt},mb:{style:tt},ml:{style:tt},mx:{style:tt},my:{style:tt},margin:{style:tt},marginTop:{style:tt},marginRight:{style:tt},marginBottom:{style:tt},marginLeft:{style:tt},marginX:{style:tt},marginY:{style:tt},marginInline:{style:tt},marginInlineStart:{style:tt},marginInlineEnd:{style:tt},marginBlock:{style:tt},marginBlockStart:{style:tt},marginBlockEnd:{style:tt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:bf},rowGap:{style:xf},columnGap:{style:wf},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Jt},maxWidth:{style:Og},minWidth:{transform:Jt},height:{transform:Jt},maxHeight:{transform:Jt},minHeight:{transform:Jt},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Wa=K7;function q7(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function G7(e,t){return typeof e=="function"?e(t):e}function hE(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:u,transform:c,style:f}=a;if(r==null)return null;if(u==="typography"&&r==="inherit")return{[n]:r};const d=gf(i,u)||{};return f?f(s):wr(s,r,h=>{let g=Hu(d,c,h);return h===g&&typeof h=="string"&&(g=Hu(d,c,`${n}${h==="default"?"":Vt(h)}`,h)),l===!1?g:{[l]:g}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:Wa;function a(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const c=a7(o.breakpoints),f=Object.keys(c);let d=c;return Object.keys(u).forEach(p=>{const h=G7(u[p],o);if(h!=null)if(typeof h=="object")if(s[p])d=Ys(d,e(p,h,o,s));else{const g=wr({theme:o},h,E=>({[p]:E}));q7(g,h)?d[p]=t({sx:h,theme:o}):d=Ys(d,g)}else d=Ys(d,e(p,h,o,s))}),l7(f,d)}return Array.isArray(i)?i.map(a):a(i)}return t}const mE=hE();mE.filterProps=["sx"];const Sf=mE;function gE(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const Y7=["breakpoints","palette","spacing","shape"];function $g(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Ze(e,Y7),a=fE(n),l=m7(i);let u=Xn({breakpoints:a,direction:"ltr",components:{},palette:q({mode:"light"},r),spacing:l,shape:q({},s7,o)},s);return u.applyStyles=gE,u=t.reduce((c,f)=>Xn(c,f),u),u.unstable_sxConfig=q({},Wa,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(f){return Sf({sx:f,theme:this})},u}const Q7=Object.freeze(Object.defineProperty({__proto__:null,default:$g,private_createBreakpoints:fE,unstable_applyStyles:gE},Symbol.toStringTag,{value:"Module"})),X7=Qr(Q7),Z7=["sx"],J7=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Wa;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function yE(e){const{sx:t}=e,n=Ze(e,Z7),{systemProps:r,otherProps:i}=J7(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return Mr(a)?q({},r,a):r}:o=q({},r,t),q({},i,{sx:o})}const eH=Object.freeze(Object.defineProperty({__proto__:null,default:Sf,extendSxProp:yE,unstable_createStyleFunctionSx:hE,unstable_defaultSxConfig:Wa},Symbol.toStringTag,{value:"Module"})),tH=Qr(eH);var ns=Vk;Object.defineProperty(Fa,"__esModule",{value:!0});var nH=Fa.default=gH,rH=Fa.shouldForwardProp=nu;Fa.systemDefaultTheme=void 0;var fn=ns(Uk()),wh=ns(qU()),L1=cH(J9),iH=e7;ns(t7);ns(n7);var oH=ns(X7),sH=ns(tH);const aH=["ownerState"],lH=["variants"],uH=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function vE(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(vE=function(r){return r?n:t})(e)}function cH(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=vE(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function fH(e){return Object.keys(e).length===0}function dH(e){return typeof e=="string"&&e.charCodeAt(0)>96}function nu(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const pH=Fa.systemDefaultTheme=(0,oH.default)(),hH=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function Al({defaultTheme:e,theme:t,themeId:n}){return fH(t)?e:t[n]||t}function mH(e){return e?(t,n)=>n[e]:null}function ru(e,t){let{ownerState:n}=t,r=(0,wh.default)(t,aH);const i=typeof e=="function"?e((0,fn.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>ru(o,(0,fn.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,wh.default)(i,lH);return o.forEach(l=>{let u=!0;typeof l.props=="function"?u=l.props((0,fn.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(c=>{(n==null?void 0:n[c])!==l.props[c]&&r[c]!==l.props[c]&&(u=!1)}),u&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,fn.default)({ownerState:n},r,n)):l.style))}),a}return i}function gH(e={}){const{themeId:t,defaultTheme:n=pH,rootShouldForwardProp:r=nu,slotShouldForwardProp:i=nu}=e,o=s=>(0,sH.default)((0,fn.default)({},s,{theme:Al((0,fn.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,L1.internal_processStyles)(s,k=>k.filter(w=>!(w!=null&&w.__mui_systemSx)));const{name:l,slot:u,skipVariantsResolver:c,skipSx:f,overridesResolver:d=mH(hH(u))}=a,p=(0,wh.default)(a,uH),h=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,g=f||!1;let E,y=nu;u==="Root"||u==="root"?y=r:u?y=i:dH(s)&&(y=void 0);const m=(0,L1.default)(s,(0,fn.default)({shouldForwardProp:y,label:E},p)),v=k=>typeof k=="function"&&k.__emotion_real!==k||(0,iH.isPlainObject)(k)?w=>ru(k,(0,fn.default)({},w,{theme:Al({theme:w.theme,defaultTheme:n,themeId:t})})):k,S=(k,...w)=>{let _=v(k);const T=w?w.map(v):[];l&&d&&T.push(M=>{const L=Al((0,fn.default)({},M,{defaultTheme:n,themeId:t}));if(!L.components||!L.components[l]||!L.components[l].styleOverrides)return null;const j=L.components[l].styleOverrides,H={};return Object.entries(j).forEach(([V,K])=>{H[V]=ru(K,(0,fn.default)({},M,{theme:L}))}),d(M,H)}),l&&!h&&T.push(M=>{var L;const j=Al((0,fn.default)({},M,{defaultTheme:n,themeId:t})),H=j==null||(L=j.components)==null||(L=L[l])==null?void 0:L.variants;return ru({variants:H},(0,fn.default)({},M,{theme:j}))}),g||T.push(o);const N=T.length-w.length;if(Array.isArray(k)&&N>0){const M=new Array(N).fill("");_=[...k,...M],_.raw=[...k.raw,...M]}const $=m(_,...T);return s.muiName&&($.muiName=s.muiName),$};return m.withConfig&&(S.withConfig=m.withConfig),S}}function yH(e,t){return q({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var at={};const vH=Qr(mU),bH=Qr(jU);var bE=Vk;Object.defineProperty(at,"__esModule",{value:!0});var co=at.alpha=_E;at.blend=OH;at.colorChannel=void 0;var wH=at.darken=Ig;at.decomposeColor=_n;at.emphasize=NH;var xH=at.getContrastRatio=RH;at.getLuminance=Wu;at.hexToRgb=wE;at.hslToRgb=SE;var SH=at.lighten=Mg;at.private_safeAlpha=CH;at.private_safeColorChannel=void 0;at.private_safeDarken=AH;at.private_safeEmphasize=kE;at.private_safeLighten=PH;at.recomposeColor=rs;at.rgbToHex=TH;var I1=bE(vH),_H=bE(bH);function Lg(e,t=0,n=1){return(0,_H.default)(e,t,n)}function wE(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function kH(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function _n(e){if(e.type)return e;if(e.charAt(0)==="#")return _n(wE(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,I1.default)(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,I1.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const xE=e=>{const t=_n(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};at.colorChannel=xE;const EH=(e,t)=>{try{return xE(e)}catch{return e}};at.private_safeColorChannel=EH;function rs(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function TH(e){if(e.indexOf("#")===0)return e;const{values:t}=_n(e);return`#${t.map((n,r)=>kH(r===3?Math.round(255*n):n)).join("")}`}function SE(e){e=_n(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(u,c=(u+n/30)%12)=>i-o*Math.max(Math.min(c-3,9-c,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),rs({type:a,values:l})}function Wu(e){e=_n(e);let t=e.type==="hsl"||e.type==="hsla"?_n(SE(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function RH(e,t){const n=Wu(e),r=Wu(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function _E(e,t){return e=_n(e),t=Lg(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,rs(e)}function CH(e,t,n){try{return _E(e,t)}catch{return e}}function Ig(e,t){if(e=_n(e),t=Lg(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return rs(e)}function AH(e,t,n){try{return Ig(e,t)}catch{return e}}function Mg(e,t){if(e=_n(e),t=Lg(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return rs(e)}function PH(e,t,n){try{return Mg(e,t)}catch{return e}}function NH(e,t=.15){return Wu(e)>.5?Ig(e,t):Mg(e,t)}function kE(e,t,n){try{return kE(e,t)}catch{return e}}function OH(e,t,n,r=1){const i=(l,u)=>Math.round((l**(1/r)*(1-n)+u**(1/r)*n)**r),o=_n(e),s=_n(t),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return rs({type:"rgb",values:a})}const $H={black:"#000",white:"#fff"},xa=$H,LH={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},IH=LH,MH={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Fi=MH,DH={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Vi=DH,zH={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Es=zH,jH={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ui=jH,BH={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Hi=BH,FH={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Wi=FH,VH=["mode","contrastThreshold","tonalOffset"],M1={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:xa.white,default:xa.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},$d={text:{primary:xa.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:xa.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function D1(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=SH(e.main,i):t==="dark"&&(e.dark=wH(e.main,o)))}function UH(e="light"){return e==="dark"?{main:Ui[200],light:Ui[50],dark:Ui[400]}:{main:Ui[700],light:Ui[400],dark:Ui[800]}}function HH(e="light"){return e==="dark"?{main:Fi[200],light:Fi[50],dark:Fi[400]}:{main:Fi[500],light:Fi[300],dark:Fi[700]}}function WH(e="light"){return e==="dark"?{main:Vi[500],light:Vi[300],dark:Vi[700]}:{main:Vi[700],light:Vi[400],dark:Vi[800]}}function KH(e="light"){return e==="dark"?{main:Hi[400],light:Hi[300],dark:Hi[700]}:{main:Hi[700],light:Hi[500],dark:Hi[900]}}function qH(e="light"){return e==="dark"?{main:Wi[400],light:Wi[300],dark:Wi[700]}:{main:Wi[800],light:Wi[500],dark:Wi[900]}}function GH(e="light"){return e==="dark"?{main:Es[400],light:Es[300],dark:Es[700]}:{main:"#ed6c02",light:Es[500],dark:Es[900]}}function YH(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Ze(e,VH),o=e.primary||UH(t),s=e.secondary||HH(t),a=e.error||WH(t),l=e.info||KH(t),u=e.success||qH(t),c=e.warning||GH(t);function f(g){return xH(g,$d.text.primary)>=n?$d.text.primary:M1.text.primary}const d=({color:g,name:E,mainShade:y=500,lightShade:m=300,darkShade:v=700})=>{if(g=q({},g),!g.main&&g[y]&&(g.main=g[y]),!g.hasOwnProperty("main"))throw new Error(ga(11,E?` (${E})`:"",y));if(typeof g.main!="string")throw new Error(ga(12,E?` (${E})`:"",JSON.stringify(g.main)));return D1(g,"light",m,r),D1(g,"dark",v,r),g.contrastText||(g.contrastText=f(g.main)),g},p={dark:$d,light:M1};return Xn(q({common:q({},xa),mode:t,primary:d({color:o,name:"primary"}),secondary:d({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:d({color:a,name:"error"}),warning:d({color:c,name:"warning"}),info:d({color:l,name:"info"}),success:d({color:u,name:"success"}),grey:IH,contrastThreshold:n,getContrastText:f,augmentColor:d,tonalOffset:r},p[t]),i)}const QH=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function XH(e){return Math.round(e*1e5)/1e5}const z1={textTransform:"uppercase"},j1='"Roboto", "Helvetica", "Arial", sans-serif';function ZH(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=j1,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:c,pxToRem:f}=n,d=Ze(n,QH),p=i/14,h=f||(y=>`${y/u*p}rem`),g=(y,m,v,S,k)=>q({fontFamily:r,fontWeight:y,fontSize:h(m),lineHeight:v},r===j1?{letterSpacing:`${XH(S/m)}em`}:{},k,c),E={h1:g(o,96,1.167,-1.5),h2:g(o,60,1.2,-.5),h3:g(s,48,1.167,0),h4:g(s,34,1.235,.25),h5:g(s,24,1.334,0),h6:g(a,20,1.6,.15),subtitle1:g(s,16,1.75,.15),subtitle2:g(a,14,1.57,.1),body1:g(s,16,1.5,.15),body2:g(s,14,1.43,.15),button:g(a,14,1.75,.4,z1),caption:g(s,12,1.66,.4),overline:g(s,12,2.66,1,z1),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Xn(q({htmlFontSize:u,pxToRem:h,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},E),d,{clone:!1})}const JH=.2,eW=.14,tW=.12;function We(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${JH})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${eW})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${tW})`].join(",")}const nW=["none",We(0,2,1,-1,0,1,1,0,0,1,3,0),We(0,3,1,-2,0,2,2,0,0,1,5,0),We(0,3,3,-2,0,3,4,0,0,1,8,0),We(0,2,4,-1,0,4,5,0,0,1,10,0),We(0,3,5,-1,0,5,8,0,0,1,14,0),We(0,3,5,-1,0,6,10,0,0,1,18,0),We(0,4,5,-2,0,7,10,1,0,2,16,1),We(0,5,5,-3,0,8,10,1,0,3,14,2),We(0,5,6,-3,0,9,12,1,0,3,16,2),We(0,6,6,-3,0,10,14,1,0,4,18,3),We(0,6,7,-4,0,11,15,1,0,4,20,3),We(0,7,8,-4,0,12,17,2,0,5,22,4),We(0,7,8,-4,0,13,19,2,0,5,24,4),We(0,7,9,-4,0,14,21,2,0,5,26,4),We(0,8,9,-5,0,15,22,2,0,6,28,5),We(0,8,10,-5,0,16,24,2,0,6,30,5),We(0,8,11,-5,0,17,26,2,0,6,32,5),We(0,9,11,-5,0,18,28,2,0,7,34,6),We(0,9,12,-6,0,19,29,2,0,7,36,6),We(0,10,13,-6,0,20,31,3,0,8,38,7),We(0,10,13,-6,0,21,33,3,0,8,40,7),We(0,10,14,-6,0,22,35,3,0,8,42,7),We(0,11,14,-7,0,23,36,3,0,9,44,8),We(0,11,15,-7,0,24,38,3,0,9,46,8)],rW=nW,iW=["duration","easing","delay"],oW={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},sW={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function B1(e){return`${Math.round(e)}ms`}function aW(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function lW(e){const t=q({},oW,e.easing),n=q({},sW,e.duration);return q({getAutoHeightDuration:aW,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=o;return Ze(o,iW),(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof s=="string"?s:B1(s)} ${a} ${typeof l=="string"?l:B1(l)}`).join(",")}},e,{easing:t,duration:n})}const uW={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},cW=uW,fW=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function EE(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Ze(e,fW);if(e.vars)throw new Error(ga(18));const a=YH(r),l=$g(e);let u=Xn(l,{mixins:yH(l.breakpoints,n),palette:a,shadows:rW.slice(),typography:ZH(a,o),transitions:lW(i),zIndex:q({},cW)});return u=Xn(u,s),u=t.reduce((c,f)=>Xn(c,f),u),u.unstable_sxConfig=q({},Wa,s==null?void 0:s.unstable_sxConfig),u.unstable_sx=function(f){return Sf({sx:f,theme:this})},u}const dW=EE(),Dg=dW,_f="$$material",TE=e=>rH(e)&&e!=="classes",pW=nH({themeId:_f,defaultTheme:Dg,rootShouldForwardProp:TE}),Rn=pW;function hW(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:xg(t.components[n].defaultProps,r)}function mW(e){return Object.keys(e).length===0}function gW(e=null){const t=A.useContext(hf);return!t||mW(t)?e:t}const yW=$g();function zg(e=yW){return gW(e)}function vW({props:e,name:t,defaultTheme:n,themeId:r}){let i=zg(n);return r&&(i=i[r]||i),hW({theme:i,name:t,props:e})}function Mi({props:e,name:t}){return vW({props:e,name:t,defaultTheme:Dg,themeId:_f})}function xh(e,t){return xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xh(e,t)}function RE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,xh(e,t)}const F1={disabled:!1},Ku=X.createContext(null);var bW=function(t){return t.scrollTop},Ls="unmounted",ci="exited",fi="entering",Gi="entered",Sh="exiting",_r=function(e){RE(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=ci,o.appearStatus=fi):l=Gi:r.unmountOnExit||r.mountOnEnter?l=Ls:l=ci,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Ls?{status:ci}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==fi&&s!==Gi&&(o=fi):(s===fi||s===Gi)&&(o=Sh)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===fi){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Ns.findDOMNode(this);s&&bW(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ci&&this.setState({status:Ls})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Ns.findDOMNode(this),a],u=l[0],c=l[1],f=this.getTimeouts(),d=a?f.appear:f.enter;if(!i&&!s||F1.disabled){this.safeSetState({status:Gi},function(){o.props.onEntered(u)});return}this.props.onEnter(u,c),this.safeSetState({status:fi},function(){o.props.onEntering(u,c),o.onTransitionEnd(d,function(){o.safeSetState({status:Gi},function(){o.props.onEntered(u,c)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Ns.findDOMNode(this);if(!o||F1.disabled){this.safeSetState({status:ci},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Sh},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ci},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Ns.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],u=l[0],c=l[1];this.props.addEndListener(u,c)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Ls)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Ze(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return X.createElement(Ku.Provider,{value:null},typeof s=="function"?s(i,a):X.cloneElement(X.Children.only(s),a))},t}(X.Component);_r.contextType=Ku;_r.propTypes={};function Ki(){}_r.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ki,onEntering:Ki,onEntered:Ki,onExit:Ki,onExiting:Ki,onExited:Ki};_r.UNMOUNTED=Ls;_r.EXITED=ci;_r.ENTERING=fi;_r.ENTERED=Gi;_r.EXITING=Sh;const CE=_r;function wW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jg(e,t){var n=function(o){return t&&A.isValidElement(o)?t(o):o},r=Object.create(null);return e&&A.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function xW(e,t){e=e||{},t=t||{};function n(c){return c in t?t[c]:e[c]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in t){if(r[l])for(s=0;sa!=="theme"&&a!=="sx"&&a!=="as"})(Sf);return A.forwardRef(function(l,u){const c=zg(n),f=yE(l),{className:d,component:p="div"}=f,h=Ze(f,RW);return O.jsx(o,q({as:p,ref:u,className:it(d,i?i(r):r),theme:t&&c[t]||c},h))})}function AE(){const e=zg(Dg);return e[_f]||e}const PE=e=>e.scrollTop;function qu(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}const AW=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function _h(e){return`scale(${e}, ${e**2})`}const PW={entering:{opacity:1,transform:_h(1)},entered:{opacity:1,transform:"none"}},Ld=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),NE=A.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:u,onEntering:c,onExit:f,onExited:d,onExiting:p,style:h,timeout:g="auto",TransitionComponent:E=CE}=t,y=Ze(t,AW),m=Dk(),v=A.useRef(),S=AE(),k=A.useRef(null),w=rr(k,o.ref,n),_=V=>K=>{if(V){const Z=k.current;K===void 0?V(Z):V(Z,K)}},T=_(c),N=_((V,K)=>{PE(V);const{duration:Z,delay:z,easing:G}=qu({style:h,timeout:g,easing:s},{mode:"enter"});let x;g==="auto"?(x=S.transitions.getAutoHeightDuration(V.clientHeight),v.current=x):x=Z,V.style.transition=[S.transitions.create("opacity",{duration:x,delay:z}),S.transitions.create("transform",{duration:Ld?x:x*.666,delay:z,easing:G})].join(","),l&&l(V,K)}),$=_(u),M=_(p),L=_(V=>{const{duration:K,delay:Z,easing:z}=qu({style:h,timeout:g,easing:s},{mode:"exit"});let G;g==="auto"?(G=S.transitions.getAutoHeightDuration(V.clientHeight),v.current=G):G=K,V.style.transition=[S.transitions.create("opacity",{duration:G,delay:Z}),S.transitions.create("transform",{duration:Ld?G:G*.666,delay:Ld?Z:Z||G*.333,easing:z})].join(","),V.style.opacity=0,V.style.transform=_h(.75),f&&f(V)}),j=_(d),H=V=>{g==="auto"&&m.start(v.current||0,V),r&&r(k.current,V)};return O.jsx(E,q({appear:i,in:a,nodeRef:k,onEnter:N,onEntered:$,onEntering:T,onExit:L,onExited:j,onExiting:M,addEndListener:H,timeout:g==="auto"?null:g},y,{children:(V,K)=>A.cloneElement(o,q({style:q({opacity:0,transform:_h(.75),visibility:V==="exited"&&!a?"hidden":void 0},PW[V],h,o.props.style),ref:w},K))}))});NE.muiSupportAuto=!0;const NW=NE;function OW(e){const t=Zn(e);return t.body===e?Ai(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Qs(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function V1(e){return parseInt(Ai(e).getComputedStyle(e).paddingRight,10)||0}function $W(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function U1(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,l=!$W(s);a&&l&&Qs(s,i)})}function Id(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function LW(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(OW(r)){const s=LU(Zn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${V1(r)+s}px`;const a=Zn(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${V1(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Zn(r).body;else{const s=r.parentElement,a=Ai(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function IW(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class MW{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Qs(t.modalRef,!1);const i=IW(n);U1(n,t.mount,t.modalRef,i,!0);const o=Id(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=Id(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=LW(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=Id(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Qs(t.modalRef,n),U1(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Qs(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function DW(e){return typeof e=="function"?e():e}function zW(e){return e?e.props.hasOwnProperty("in"):!1}const jW=new MW;function BW(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=jW,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:u,open:c,rootRef:f}=e,d=A.useRef({}),p=A.useRef(null),h=A.useRef(null),g=rr(h,f),[E,y]=A.useState(!c),m=zW(l);let v=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(v=!1);const S=()=>Zn(p.current),k=()=>(d.current.modalRef=h.current,d.current.mount=p.current,d.current),w=()=>{i.mount(k(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},_=uo(()=>{const K=DW(t)||S().body;i.add(k(),K),h.current&&w()}),T=A.useCallback(()=>i.isTopModal(k()),[i]),N=uo(K=>{p.current=K,K&&(c&&T()?w():h.current&&Qs(h.current,v))}),$=A.useCallback(()=>{i.remove(k(),v)},[v,i]);A.useEffect(()=>()=>{$()},[$]),A.useEffect(()=>{c?_():(!m||!o)&&$()},[c,$,m,o,_]);const M=K=>Z=>{var z;(z=K.onKeyDown)==null||z.call(K,Z),!(Z.key!=="Escape"||Z.which===229||!T())&&(n||(Z.stopPropagation(),u&&u(Z,"escapeKeyDown")))},L=K=>Z=>{var z;(z=K.onClick)==null||z.call(K,Z),Z.target===Z.currentTarget&&u&&u(Z,"backdropClick")};return{getRootProps:(K={})=>{const Z=Bk(e);delete Z.onTransitionEnter,delete Z.onTransitionExited;const z=q({},Z,K);return q({role:"presentation"},z,{onKeyDown:M(z),ref:g})},getBackdropProps:(K={})=>{const Z=K;return q({"aria-hidden":!0},Z,{onClick:L(Z),open:c})},getTransitionProps:()=>{const K=()=>{y(!1),s&&s()},Z=()=>{y(!0),a&&a(),o&&$()};return{onEnter:g1(K,l==null?void 0:l.props.onEnter),onExited:g1(Z,l==null?void 0:l.props.onExited)}},rootRef:g,portalRef:N,isTopModal:T,exited:E,hasTransition:m}}const FW=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function VW(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function UW(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function HW(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||UW(e))}function WW(e){const t=[],n=[];return Array.from(e.querySelectorAll(FW)).forEach((r,i)=>{const o=VW(r);o===-1||!HW(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function KW(){return!0}function qW(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=WW,isEnabled:s=KW,open:a}=e,l=A.useRef(!1),u=A.useRef(null),c=A.useRef(null),f=A.useRef(null),d=A.useRef(null),p=A.useRef(!1),h=A.useRef(null),g=rr(t.ref,h),E=A.useRef(null);A.useEffect(()=>{!a||!h.current||(p.current=!n)},[n,a]),A.useEffect(()=>{if(!a||!h.current)return;const v=Zn(h.current);return h.current.contains(v.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),p.current&&h.current.focus()),()=>{i||(f.current&&f.current.focus&&(l.current=!0,f.current.focus()),f.current=null)}},[a]),A.useEffect(()=>{if(!a||!h.current)return;const v=Zn(h.current),S=_=>{E.current=_,!(r||!s()||_.key!=="Tab")&&v.activeElement===h.current&&_.shiftKey&&(l.current=!0,c.current&&c.current.focus())},k=()=>{const _=h.current;if(_===null)return;if(!v.hasFocus()||!s()||l.current){l.current=!1;return}if(_.contains(v.activeElement)||r&&v.activeElement!==u.current&&v.activeElement!==c.current)return;if(v.activeElement!==d.current)d.current=null;else if(d.current!==null)return;if(!p.current)return;let T=[];if((v.activeElement===u.current||v.activeElement===c.current)&&(T=o(h.current)),T.length>0){var N,$;const M=!!((N=E.current)!=null&&N.shiftKey&&(($=E.current)==null?void 0:$.key)==="Tab"),L=T[0],j=T[T.length-1];typeof L!="string"&&typeof j!="string"&&(M?j.focus():L.focus())}else _.focus()};v.addEventListener("focusin",k),v.addEventListener("keydown",S,!0);const w=setInterval(()=>{v.activeElement&&v.activeElement.tagName==="BODY"&&k()},50);return()=>{clearInterval(w),v.removeEventListener("focusin",k),v.removeEventListener("keydown",S,!0)}},[n,r,i,s,a,o]);const y=v=>{f.current===null&&(f.current=v.relatedTarget),p.current=!0,d.current=v.target;const S=t.props.onFocus;S&&S(v)},m=v=>{f.current===null&&(f.current=v.relatedTarget),p.current=!0};return O.jsxs(A.Fragment,{children:[O.jsx("div",{tabIndex:a?0:-1,onFocus:m,ref:u,"data-testid":"sentinelStart"}),A.cloneElement(t,{ref:g,onFocus:y}),O.jsx("div",{tabIndex:a?0:-1,onFocus:m,ref:c,"data-testid":"sentinelEnd"})]})}function GW(e){return typeof e=="function"?e():e}const YW=A.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[s,a]=A.useState(null),l=rr(A.isValidElement(r)?r.ref:null,n);if(ya(()=>{o||a(GW(i)||document.body)},[i,o]),ya(()=>{if(s&&!o)return hh(n,s),()=>{hh(n,null)}},[n,s,o]),o){if(A.isValidElement(r)){const u={ref:l};return A.cloneElement(r,u)}return O.jsx(A.Fragment,{children:r})}return O.jsx(A.Fragment,{children:s&&Em.createPortal(r,s)})}),QW=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],XW={entering:{opacity:1},entered:{opacity:1}},ZW=A.forwardRef(function(t,n){const r=AE(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:u,onEnter:c,onEntered:f,onEntering:d,onExit:p,onExited:h,onExiting:g,style:E,timeout:y=i,TransitionComponent:m=CE}=t,v=Ze(t,QW),S=A.useRef(null),k=rr(S,a.ref,n),w=H=>V=>{if(H){const K=S.current;V===void 0?H(K):H(K,V)}},_=w(d),T=w((H,V)=>{PE(H);const K=qu({style:E,timeout:y,easing:l},{mode:"enter"});H.style.webkitTransition=r.transitions.create("opacity",K),H.style.transition=r.transitions.create("opacity",K),c&&c(H,V)}),N=w(f),$=w(g),M=w(H=>{const V=qu({style:E,timeout:y,easing:l},{mode:"exit"});H.style.webkitTransition=r.transitions.create("opacity",V),H.style.transition=r.transitions.create("opacity",V),p&&p(H)}),L=w(h),j=H=>{o&&o(S.current,H)};return O.jsx(m,q({appear:s,in:u,nodeRef:S,onEnter:T,onEntered:N,onEntering:_,onExit:M,onExited:L,onExiting:$,addEndListener:j,timeout:y},v,{children:(H,V)=>A.cloneElement(a,q({style:q({opacity:0,visibility:H==="exited"&&!u?"hidden":void 0},XW[H],E,a.props.style),ref:k},V))}))}),JW=ZW;function eK(e){return Ii("MuiBackdrop",e)}ii("MuiBackdrop",["root","invisible"]);const tK=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],nK=e=>{const{classes:t,invisible:n}=e;return es({root:["root",n&&"invisible"]},eK,t)},rK=Rn("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>q({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),iK=A.forwardRef(function(t,n){var r,i,o;const s=Mi({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:u="div",components:c={},componentsProps:f={},invisible:d=!1,open:p,slotProps:h={},slots:g={},TransitionComponent:E=JW,transitionDuration:y}=s,m=Ze(s,tK),v=q({},s,{component:u,invisible:d}),S=nK(v),k=(r=h.root)!=null?r:f.root;return O.jsx(E,q({in:p,timeout:y},m,{children:O.jsx(rK,q({"aria-hidden":!0},k,{as:(i=(o=g.root)!=null?o:c.Root)!=null?i:u,className:it(S.root,l,k==null?void 0:k.className),ownerState:q({},v,k==null?void 0:k.ownerState),classes:S,ref:n,children:a}))}))}),oK=iK;function sK(e){return Ii("MuiModal",e)}ii("MuiModal",["root","hidden","backdrop"]);const aK=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],lK=e=>{const{open:t,exited:n,classes:r}=e;return es({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},sK,r)},uK=Rn("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>q({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),cK=Rn(oK,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),fK=A.forwardRef(function(t,n){var r,i,o,s,a,l;const u=Mi({name:"MuiModal",props:t}),{BackdropComponent:c=cK,BackdropProps:f,className:d,closeAfterTransition:p=!1,children:h,container:g,component:E,components:y={},componentsProps:m={},disableAutoFocus:v=!1,disableEnforceFocus:S=!1,disableEscapeKeyDown:k=!1,disablePortal:w=!1,disableRestoreFocus:_=!1,disableScrollLock:T=!1,hideBackdrop:N=!1,keepMounted:$=!1,onBackdropClick:M,open:L,slotProps:j,slots:H}=u,V=Ze(u,aK),K=q({},u,{closeAfterTransition:p,disableAutoFocus:v,disableEnforceFocus:S,disableEscapeKeyDown:k,disablePortal:w,disableRestoreFocus:_,disableScrollLock:T,hideBackdrop:N,keepMounted:$}),{getRootProps:Z,getBackdropProps:z,getTransitionProps:G,portalRef:x,isTopModal:le,exited:C,hasTransition:b}=BW(q({},K,{rootRef:n})),I=q({},K,{exited:C}),Y=lK(I),F={};if(h.props.tabIndex===void 0&&(F.tabIndex="-1"),b){const{onEnter:se,onExited:we}=G();F.onEnter=se,F.onExited=we}const oe=(r=(i=H==null?void 0:H.root)!=null?i:y.Root)!=null?r:uK,ae=(o=(s=H==null?void 0:H.backdrop)!=null?s:y.Backdrop)!=null?o:c,J=(a=j==null?void 0:j.root)!=null?a:m.root,me=(l=j==null?void 0:j.backdrop)!=null?l:m.backdrop,Oe=Vu({elementType:oe,externalSlotProps:J,externalForwardedProps:V,getSlotProps:Z,additionalProps:{ref:n,as:E},ownerState:I,className:it(d,J==null?void 0:J.className,Y==null?void 0:Y.root,!I.open&&I.exited&&(Y==null?void 0:Y.hidden))}),Se=Vu({elementType:ae,externalSlotProps:me,additionalProps:f,getSlotProps:se=>z(q({},se,{onClick:we=>{M&&M(we),se!=null&&se.onClick&&se.onClick(we)}})),className:it(me==null?void 0:me.className,f==null?void 0:f.className,Y==null?void 0:Y.backdrop),ownerState:I});return!$&&!L&&(!b||C)?null:O.jsx(YW,{ref:x,container:g,disablePortal:w,children:O.jsxs(oe,q({},Oe,{children:[!N&&c?O.jsx(ae,q({},Se)):null,O.jsx(qW,{disableEnforceFocus:S,disableAutoFocus:v,disableRestoreFocus:_,isEnabled:le,open:L,children:A.cloneElement(h,F)})]}))})}),dK=fK,pK=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},H1=pK;function hK(e){return Ii("MuiPaper",e)}ii("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const mK=["className","component","elevation","square","variant"],gK=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return es(o,hK,i)},yK=Rn("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return q({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&q({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${co("#fff",H1(t.elevation))}, ${co("#fff",H1(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),vK=A.forwardRef(function(t,n){const r=Mi({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,u=Ze(r,mK),c=q({},r,{component:o,elevation:s,square:a,variant:l}),f=gK(c);return O.jsx(yK,q({as:o,ownerState:c,className:it(f.root,i),ref:n},u))}),bK=vK;function wK(e){return Ii("MuiPopover",e)}ii("MuiPopover",["root","paper"]);const xK=["onEntering"],SK=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_K=["slotProps"];function W1(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function K1(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function q1(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Md(e){return typeof e=="function"?e():e}const kK=e=>{const{classes:t}=e;return es({root:["root"],paper:["paper"]},wK,t)},EK=Rn(dK,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),TK=Rn(bK,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),RK=A.forwardRef(function(t,n){var r,i,o;const s=Mi({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:f="anchorEl",children:d,className:p,container:h,elevation:g=8,marginThreshold:E=16,open:y,PaperProps:m={},slots:v,slotProps:S,transformOrigin:k={vertical:"top",horizontal:"left"},TransitionComponent:w=NW,transitionDuration:_="auto",TransitionProps:{onEntering:T}={},disableScrollLock:N=!1}=s,$=Ze(s.TransitionProps,xK),M=Ze(s,SK),L=(r=S==null?void 0:S.paper)!=null?r:m,j=A.useRef(),H=rr(j,L.ref),V=q({},s,{anchorOrigin:u,anchorReference:f,elevation:g,marginThreshold:E,externalPaperSlotProps:L,transformOrigin:k,TransitionComponent:w,transitionDuration:_,TransitionProps:$}),K=kK(V),Z=A.useCallback(()=>{if(f==="anchorPosition")return c;const se=Md(l),$e=(se&&se.nodeType===1?se:Zn(j.current).body).getBoundingClientRect();return{top:$e.top+W1($e,u.vertical),left:$e.left+K1($e,u.horizontal)}},[l,u.horizontal,u.vertical,c,f]),z=A.useCallback(se=>({vertical:W1(se,k.vertical),horizontal:K1(se,k.horizontal)}),[k.horizontal,k.vertical]),G=A.useCallback(se=>{const we={width:se.offsetWidth,height:se.offsetHeight},$e=z(we);if(f==="none")return{top:null,left:null,transformOrigin:q1($e)};const Ye=Z();let Le=Ye.top-$e.vertical,Tt=Ye.left-$e.horizontal;const ar=Le+we.height,un=Tt+we.width,Cn=Ai(Md(l)),lr=Cn.innerHeight-E,kr=Cn.innerWidth-E;if(E!==null&&Lelr){const et=ar-lr;Le-=et,$e.vertical+=et}if(E!==null&&Ttkr){const et=un-kr;Tt-=et,$e.horizontal+=et}return{top:`${Math.round(Le)}px`,left:`${Math.round(Tt)}px`,transformOrigin:q1($e)}},[l,f,Z,z,E]),[x,le]=A.useState(y),C=A.useCallback(()=>{const se=j.current;if(!se)return;const we=G(se);we.top!==null&&(se.style.top=we.top),we.left!==null&&(se.style.left=we.left),se.style.transformOrigin=we.transformOrigin,le(!0)},[G]);A.useEffect(()=>(N&&window.addEventListener("scroll",C),()=>window.removeEventListener("scroll",C)),[l,N,C]);const b=(se,we)=>{T&&T(se,we),C()},I=()=>{le(!1)};A.useEffect(()=>{y&&C()}),A.useImperativeHandle(a,()=>y?{updatePosition:()=>{C()}}:null,[y,C]),A.useEffect(()=>{if(!y)return;const se=Mk(()=>{C()}),we=Ai(l);return we.addEventListener("resize",se),()=>{se.clear(),we.removeEventListener("resize",se)}},[l,y,C]);let Y=_;_==="auto"&&!w.muiSupportAuto&&(Y=void 0);const F=h||(l?Zn(Md(l)).body:void 0),oe=(i=v==null?void 0:v.root)!=null?i:EK,ae=(o=v==null?void 0:v.paper)!=null?o:TK,J=Vu({elementType:ae,externalSlotProps:q({},L,{style:x?L.style:q({},L.style,{opacity:0})}),additionalProps:{elevation:g,ref:H},ownerState:V,className:it(K.paper,L==null?void 0:L.className)}),me=Vu({elementType:oe,externalSlotProps:(S==null?void 0:S.root)||{},externalForwardedProps:M,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:F,open:y},ownerState:V,className:it(K.root,p)}),{slotProps:Oe}=me,Se=Ze(me,_K);return O.jsx(oe,q({},Se,!jk(oe)&&{slotProps:Oe,disableScrollLock:N},{children:O.jsx(w,q({appear:!0,in:y,onEntering:b,onExited:I,timeout:Y},$,{children:O.jsx(ae,q({},J,{children:d}))}))}))}),G1=RK;function CK(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:l,timeout:u}=e,[c,f]=A.useState(!1),d=it(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},h=it(n.child,c&&n.childLeaving,r&&n.childPulsate);return!a&&!c&&f(!0),A.useEffect(()=>{if(!a&&l!=null){const g=setTimeout(l,u);return()=>{clearTimeout(g)}}},[l,a,u]),O.jsx("span",{className:d,style:p,children:O.jsx("span",{className:h})})}const AK=ii("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),dn=AK,PK=["center","classes","className"];let kf=e=>e,Y1,Q1,X1,Z1;const kh=550,NK=80,OK=mf(Y1||(Y1=kf` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `)),$K=mf(Q1||(Q1=kf` 0% { opacity: 1; } 100% { opacity: 0; } `)),LK=mf(X1||(X1=kf` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `)),IK=Rn("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),MK=Rn(CK,{name:"MuiTouchRipple",slot:"Ripple"})(Z1||(Z1=kf` opacity: 0; position: absolute; &.${0} { opacity: 0.3; transform: scale(1); animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } &.${0} { animation-duration: ${0}ms; } & .${0} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${0} { opacity: 0; animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } & .${0} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${0}; animation-duration: 2500ms; animation-timing-function: ${0}; animation-iteration-count: infinite; animation-delay: 200ms; } `),dn.rippleVisible,OK,kh,({theme:e})=>e.transitions.easing.easeInOut,dn.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,dn.child,dn.childLeaving,$K,kh,({theme:e})=>e.transitions.easing.easeInOut,dn.childPulsate,LK,({theme:e})=>e.transitions.easing.easeInOut),DK=A.forwardRef(function(t,n){const r=Mi({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Ze(r,PK),[l,u]=A.useState([]),c=A.useRef(0),f=A.useRef(null);A.useEffect(()=>{f.current&&(f.current(),f.current=null)},[l]);const d=A.useRef(!1),p=Dk(),h=A.useRef(null),g=A.useRef(null),E=A.useCallback(S=>{const{pulsate:k,rippleX:w,rippleY:_,rippleSize:T,cb:N}=S;u($=>[...$,O.jsx(MK,{classes:{ripple:it(o.ripple,dn.ripple),rippleVisible:it(o.rippleVisible,dn.rippleVisible),ripplePulsate:it(o.ripplePulsate,dn.ripplePulsate),child:it(o.child,dn.child),childLeaving:it(o.childLeaving,dn.childLeaving),childPulsate:it(o.childPulsate,dn.childPulsate)},timeout:kh,pulsate:k,rippleX:w,rippleY:_,rippleSize:T},c.current)]),c.current+=1,f.current=N},[o]),y=A.useCallback((S={},k={},w=()=>{})=>{const{pulsate:_=!1,center:T=i||k.pulsate,fakeElement:N=!1}=k;if((S==null?void 0:S.type)==="mousedown"&&d.current){d.current=!1;return}(S==null?void 0:S.type)==="touchstart"&&(d.current=!0);const $=N?null:g.current,M=$?$.getBoundingClientRect():{width:0,height:0,left:0,top:0};let L,j,H;if(T||S===void 0||S.clientX===0&&S.clientY===0||!S.clientX&&!S.touches)L=Math.round(M.width/2),j=Math.round(M.height/2);else{const{clientX:V,clientY:K}=S.touches&&S.touches.length>0?S.touches[0]:S;L=Math.round(V-M.left),j=Math.round(K-M.top)}if(T)H=Math.sqrt((2*M.width**2+M.height**2)/3),H%2===0&&(H+=1);else{const V=Math.max(Math.abs(($?$.clientWidth:0)-L),L)*2+2,K=Math.max(Math.abs(($?$.clientHeight:0)-j),j)*2+2;H=Math.sqrt(V**2+K**2)}S!=null&&S.touches?h.current===null&&(h.current=()=>{E({pulsate:_,rippleX:L,rippleY:j,rippleSize:H,cb:w})},p.start(NK,()=>{h.current&&(h.current(),h.current=null)})):E({pulsate:_,rippleX:L,rippleY:j,rippleSize:H,cb:w})},[i,E,p]),m=A.useCallback(()=>{y({},{pulsate:!0})},[y]),v=A.useCallback((S,k)=>{if(p.clear(),(S==null?void 0:S.type)==="touchend"&&h.current){h.current(),h.current=null,p.start(0,()=>{v(S,k)});return}h.current=null,u(w=>w.length>0?w.slice(1):w),f.current=k},[p]);return A.useImperativeHandle(n,()=>({pulsate:m,start:y,stop:v}),[m,y,v]),O.jsx(IK,q({className:it(dn.root,o.root,s),ref:g},a,{children:O.jsx(TW,{component:null,exit:!0,children:l})}))}),zK=DK;function jK(e){return Ii("MuiButtonBase",e)}const BK=ii("MuiButtonBase",["root","disabled","focusVisible"]),FK=BK,VK=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],UK=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=es({root:["root",t&&"disabled",n&&"focusVisible"]},jK,i);return n&&r&&(s.root+=` ${r}`),s},HK=Rn("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${FK.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),WK=A.forwardRef(function(t,n){const r=Mi({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:f=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:h,onClick:g,onContextMenu:E,onDragLeave:y,onFocus:m,onFocusVisible:v,onKeyDown:S,onKeyUp:k,onMouseDown:w,onMouseLeave:_,onMouseUp:T,onTouchEnd:N,onTouchMove:$,onTouchStart:M,tabIndex:L=0,TouchRippleProps:j,touchRippleRef:H,type:V}=r,K=Ze(r,VK),Z=A.useRef(null),z=A.useRef(null),G=rr(z,H),{isFocusVisibleRef:x,onFocus:le,onBlur:C,ref:b}=$U(),[I,Y]=A.useState(!1);u&&I&&Y(!1),A.useImperativeHandle(i,()=>({focusVisible:()=>{Y(!0),Z.current.focus()}}),[]);const[F,oe]=A.useState(!1);A.useEffect(()=>{oe(!0)},[]);const ae=F&&!c&&!u;A.useEffect(()=>{I&&d&&!c&&F&&z.current.pulsate()},[c,d,I,F]);function J(ne,Rt,An=f){return uo(Lt=>(Rt&&Rt(Lt),!An&&z.current&&z.current[ne](Lt),!0))}const me=J("start",w),Oe=J("stop",E),Se=J("stop",y),se=J("stop",T),we=J("stop",ne=>{I&&ne.preventDefault(),_&&_(ne)}),$e=J("start",M),Ye=J("stop",N),Le=J("stop",$),Tt=J("stop",ne=>{C(ne),x.current===!1&&Y(!1),h&&h(ne)},!1),ar=uo(ne=>{Z.current||(Z.current=ne.currentTarget),le(ne),x.current===!0&&(Y(!0),v&&v(ne)),m&&m(ne)}),un=()=>{const ne=Z.current;return l&&l!=="button"&&!(ne.tagName==="A"&&ne.href)},Cn=A.useRef(!1),lr=uo(ne=>{d&&!Cn.current&&I&&z.current&&ne.key===" "&&(Cn.current=!0,z.current.stop(ne,()=>{z.current.start(ne)})),ne.target===ne.currentTarget&&un()&&ne.key===" "&&ne.preventDefault(),S&&S(ne),ne.target===ne.currentTarget&&un()&&ne.key==="Enter"&&!u&&(ne.preventDefault(),g&&g(ne))}),kr=uo(ne=>{d&&ne.key===" "&&z.current&&I&&!ne.defaultPrevented&&(Cn.current=!1,z.current.stop(ne,()=>{z.current.pulsate(ne)})),k&&k(ne),g&&ne.target===ne.currentTarget&&un()&&ne.key===" "&&!ne.defaultPrevented&&g(ne)});let et=l;et==="button"&&(K.href||K.to)&&(et=p);const D={};et==="button"?(D.type=V===void 0?"button":V,D.disabled=u):(!K.href&&!K.to&&(D.role="button"),u&&(D["aria-disabled"]=u));const Q=rr(n,b,Z),ue=q({},r,{centerRipple:o,component:l,disabled:u,disableRipple:c,disableTouchRipple:f,focusRipple:d,tabIndex:L,focusVisible:I}),be=UK(ue);return O.jsxs(HK,q({as:et,className:it(be.root,a),ownerState:ue,onBlur:Tt,onClick:g,onContextMenu:Oe,onFocus:ar,onKeyDown:lr,onKeyUp:kr,onMouseDown:me,onMouseLeave:we,onMouseUp:se,onDragLeave:Se,onTouchEnd:Ye,onTouchMove:Le,onTouchStart:$e,ref:Q,tabIndex:u?-1:L,type:V},D,K,{children:[s,ae?O.jsx(zK,q({ref:G,center:o},j)):null]}))}),KK=WK;function qK(e){return Ii("MuiButton",e)}const GK=ii("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Pl=GK,YK=A.createContext({}),QK=YK,XK=A.createContext(void 0),ZK=XK,JK=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],eq=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,a={root:["root",o,`${o}${Vt(t)}`,`size${Vt(i)}`,`${o}Size${Vt(i)}`,`color${Vt(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Vt(i)}`],endIcon:["icon","endIcon",`iconSize${Vt(i)}`]},l=es(a,qK,s);return q({},s,l)},OE=e=>q({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),tq=Rn(KK,{shouldForwardProp:e=>TE(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Vt(n.color)}`],t[`size${Vt(n.size)}`],t[`${n.variant}Size${Vt(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],o=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return q({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":q({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:co(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:co(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:co(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":q({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Pl.focusVisible}`]:q({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Pl.disabled}`]:q({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${co(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Pl.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Pl.disabled}`]:{boxShadow:"none"}}),nq=Rn("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Vt(n.size)}`]]}})(({ownerState:e})=>q({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},OE(e))),rq=Rn("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Vt(n.size)}`]]}})(({ownerState:e})=>q({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},OE(e))),iq=A.forwardRef(function(t,n){const r=A.useContext(QK),i=A.useContext(ZK),o=xg(r,t),s=Mi({props:o,name:"MuiButton"}),{children:a,color:l="primary",component:u="button",className:c,disabled:f=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:g,fullWidth:E=!1,size:y="medium",startIcon:m,type:v,variant:S="text"}=s,k=Ze(s,JK),w=q({},s,{color:l,component:u,disabled:f,disableElevation:d,disableFocusRipple:p,fullWidth:E,size:y,type:v,variant:S}),_=eq(w),T=m&&O.jsx(nq,{className:_.startIcon,ownerState:w,children:m}),N=h&&O.jsx(rq,{className:_.endIcon,ownerState:w,children:h}),$=i||"";return O.jsxs(tq,q({ownerState:w,className:it(r.className,_.root,c,$),component:u,disabled:f,focusRipple:!p,focusVisibleClassName:it(_.focusVisible,g),ref:n,type:v},k,{classes:_,children:[T,a,N]}))}),Nl=iq,oq=ii("MuiBox",["root"]),sq=oq,aq=EE(),lq=CW({themeId:_f,defaultTheme:aq,defaultClassName:sq.root,generateClassName:zk.generate}),J1=lq,uq=({message:e})=>{const[t,n]=A.useState(null),[r,i]=A.useState(null),[o,s]=A.useState(""),[a,l]=A.useState(""),u=(d,p)=>{p==="Positive"?n(t?null:d.currentTarget):i(r?null:d.currentTarget)},c=d=>{d==="Positive"?n(null):i(null)},f=async d=>{const h={label:d,reason:d==="Positive"?o:a,messageId:e.id,messageContent:e.output};try{(await fetch("http://localhost:8000/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)})).ok?(console.log("Feedback submitted successfully"),d==="Positive"?s(""):l(""),c(d)):console.error("Failed to submit feedback")}catch(g){console.error("Error submitting feedback:",g)}};return O.jsxs("div",{style:{display:"flex",gap:"10px"},children:[O.jsx(Nl,{onClick:d=>u(d,"Positive"),variant:"text",children:O.jsx(Pk,{size:24,color:"#0a0a0a",weight:"thin"})}),O.jsx(G1,{open:!!t,anchorEl:t,onClose:()=>c("Positive"),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:O.jsxs(J1,{p:2,children:[O.jsx(b1,{minRows:3,style:{width:200},placeholder:"Positive feedback...",value:o,onChange:d=>s(d.target.value)}),O.jsx(Nl,{onClick:()=>f("Positive"),style:{fontSize:"0.875rem",backgroundColor:"#fff",color:"#000",borderRadius:"20px",padding:"6px 12px",border:"1px solid #000",marginTop:"10px"},children:"Submit"})]})}),O.jsx(Nl,{onClick:d=>u(d,"Negative"),variant:"text",children:O.jsx(Ak,{size:24,color:"#0a0a0a",weight:"thin"})}),O.jsx(G1,{open:!!r,anchorEl:r,onClose:()=>c("Negative"),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:O.jsxs(J1,{p:2,children:[O.jsx(b1,{minRows:3,style:{width:200},placeholder:"Negative feedback...",value:a,onChange:d=>l(d.target.value)}),O.jsx(Nl,{onClick:()=>f("Negative"),style:{fontSize:"0.875rem",backgroundColor:"#fff",color:"#000",borderRadius:"20px",padding:"4px 8px",border:"1px solid #000",marginTop:"10px"},children:"Submit"})]})})]})},cq=({message:e,backgroundColor:t,index:n})=>{console.log("Message name:",e.name);const r={hour:"2-digit",minute:"2-digit"},i=new Date(e.createdAt).toLocaleTimeString(void 0,r);if(!e.output.trim())return null;if(e.type==="custom_message")return console.log("Skipping message with custom_message type:",e),null;const o=n===0;return O.jsx("div",{className:"flex items-start space-x-2",children:O.jsxs("div",{className:`flex-1 rounded-lg p-4 shadow-md transition duration-200 hover:shadow-lg ${t}`,children:[O.jsx(GV,{className:"text-black dark:text-white leading-relaxed",components:{p:({node:s,...a})=>O.jsx("p",{className:"mb-4",...a}),h1:({node:s,...a})=>O.jsx("h1",{className:"text-2xl font-bold mb-4 mt-8",...a}),h2:({node:s,...a})=>O.jsx("h2",{className:"text-xl font-bold mb-4 mt-6",...a}),h3:({node:s,...a})=>O.jsx("h3",{className:"text-lg font-bold mb-4 mt-4",...a}),h4:({node:s,...a})=>O.jsx("h4",{className:"text-base font-bold mb-2 mt-4",...a}),h5:({node:s,...a})=>O.jsx("h5",{className:"text-sm font-bold mb-2 mt-4",...a}),h6:({node:s,...a})=>O.jsx("h6",{className:"text-xs font-bold mb-2 mt-4",...a}),ul:({node:s,...a})=>O.jsx("ul",{className:"list-disc pl-6 mb-4",...a}),ol:({node:s,...a})=>O.jsx("ol",{className:"list-decimal pl-6 mb-4",...a}),li:({node:s,...a})=>O.jsx("li",{className:"mb-2",...a}),strong:({node:s,...a})=>O.jsx("strong",{className:"font-bold",...a}),em:({node:s,...a})=>O.jsx("em",{className:"italic",...a}),del:({node:s,...a})=>O.jsx("del",{className:"line-through",...a}),blockquote:({node:s,...a})=>O.jsx("blockquote",{className:"border-l-4 border-gray-300 pl-4 mb-4 italic",...a}),br:({node:s,...a})=>O.jsx("br",{...a})},children:e.output}),o&&O.jsx("div",{className:"mt-4",children:O.jsxs("div",{className:"flex gap-2",children:[O.jsx(Du,{className:"text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-600",size:"sm",children:"Yes"}),O.jsx(Du,{className:"border-gray-300 dark:border-gray-700 text-gray-600 dark:text-gray-200",size:"sm",variant:"outline",children:"No"})]})}),O.jsxs("div",{className:"flex justify-between mt-2",children:[O.jsx("small",{className:"text-xs text-gray-500",children:i}),O.jsx(uq,{message:e})]})]})},e.id)};function fq(){const[e,t]=A.useState(""),{sendMessage:n}=O_(),{messages:r}=Nz(),i=()=>{const s=e.trim();if(s){const a={id:Mc(),name:"user",type:"user_message",output:s,createdAt:new Date().toISOString()};n(a,[]),t("")}},o=s=>s.name==="user"||s.name===" user"||s.name===" (LLM 🧠 gpt-4-turbo-preview )"||s.name==="(LLM 🧠 gpt-4-turbo-preview )"?"bg-[#ECECEC]":"bg-[#FCD4D4]";return O.jsxs("div",{className:"min-w-[800px] overflow-y-auto h-72 relative max-w-sm mx-auto bg-white dark:bg-slate-800 dark:highlight-white/5 shadow-lg ring-1 ring-black/5 rounded-xl flex flex-col divide-y dark:divide-slate-200",style:{height:"70vh"},children:[O.jsx("div",{className:"bg-red-600 h-16 flex justify-center items-center",children:O.jsxs("header",{className:"bg-red-600 h-16 flex justify-center items-center gap-3",children:[O.jsx("img",{src:"https://cdn.builder.io/api/v1/image/assets/TEMP/b77033b93d7a5a37bf2da62718463039fd1b16c2fdab4a50833633bdd216950f?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alt:"logo",loading:"lazy",className:"w-11 aspect-square"}),O.jsx("span",{className:"flex-auto my-auto text-3xl font-bold leading-9 text-center text-white",children:"Amy"})]})}),O.jsx("div",{className:"flex-1 overflow-auto p-6 md:p-8",children:O.jsx("div",{className:"space-y-5",children:r.map((s,a)=>{const l=o(s);return console.log("Background color for message:",s.name,l),cq({message:s,backgroundColor:l,index:a})})})}),O.jsx("div",{className:"border-t p-6 bg-white dark:bg-gray-800",children:O.jsxs("div",{className:"flex items-center space-x-3",children:[O.jsx(B_,{autoFocus:!0,className:"flex-1 text-lg",id:"message-input",placeholder:"Let's chat",value:e,onChange:s=>t(s.target.value),onKeyUp:s=>{s.key==="Enter"&&i()}}),O.jsx(Du,{onClick:i,type:"submit",className:"text-lg",children:"Send"})]})})]})}const dq=()=>O.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:O.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:""})});/*! * Glide.js v3.6.0 * (c) 2013-2022 Jędrzej Chałubek (https://github.com/jedrzejchalubek/) * Released under the MIT License. */function iu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?iu=function(t){return typeof t}:iu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(e)}function Ef(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eb(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mq(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gq(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mq(e)}function yq(e){var t=hq();return function(){var r=Do(e),i;if(t){var o=Do(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return gq(this,i)}}function vq(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Do(e),e!==null););return e}function ou(){return typeof Reflect<"u"&&Reflect.get?ou=Reflect.get:ou=function(t,n,r){var i=vq(t,n);if(i){var o=Object.getOwnPropertyDescriptor(i,n);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ou.apply(this,arguments)}var bq={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,cloningRatio:1,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};function er(e){console.error("[Glide warn]: ".concat(e))}function _t(e){return parseInt(e)}function wq(e){return parseFloat(e)}function Th(e){return typeof e=="string"}function zo(e){var t=iu(e);return t==="function"||t==="object"&&!!e}function Gu(e){return typeof e=="function"}function $E(e){return typeof e>"u"}function Rh(e){return e.constructor===Array}function xq(e,t,n){var r={};for(var i in t)Gu(t[i])?r[i]=t[i](e,r,n):er("Extension must be a function");for(var o in r)Gu(r[o].mount)&&r[o].mount();return r}function Ge(e,t,n){Object.defineProperty(e,t,n)}function Sq(e){return Object.keys(e).sort().reduce(function(t,n){return t[n]=e[n],t[n],t},{})}function Ch(e,t){var n=Object.assign({},e,t);return t.hasOwnProperty("classes")&&(n.classes=Object.assign({},e.classes,t.classes),t.classes.hasOwnProperty("direction")&&(n.classes.direction=Object.assign({},e.classes.direction,t.classes.direction)),t.classes.hasOwnProperty("type")&&(n.classes.type=Object.assign({},e.classes.type,t.classes.type)),t.classes.hasOwnProperty("slide")&&(n.classes.slide=Object.assign({},e.classes.slide,t.classes.slide)),t.classes.hasOwnProperty("arrow")&&(n.classes.arrow=Object.assign({},e.classes.arrow,t.classes.arrow)),t.classes.hasOwnProperty("nav")&&(n.classes.nav=Object.assign({},e.classes.nav,t.classes.nav))),t.hasOwnProperty("breakpoints")&&(n.breakpoints=Object.assign({},e.breakpoints,t.breakpoints)),n}var _q=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ef(this,e),this.events=t,this.hop=t.hasOwnProperty}return Tf(e,[{key:"on",value:function(n,r){if(Rh(n)){for(var i=0;i1&&arguments[1]!==void 0?arguments[1]:{};Ef(this,e),this._c={},this._t=[],this._e=new _q,this.disabled=!1,this.selector=t,this.settings=Ch(bq,n),this.index=this.settings.startAt}return Tf(e,[{key:"mount",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._e.emit("mount.before"),zo(n)?this._c=xq(this,n,this._e):er("You need to provide a object on `mount()`"),this._e.emit("mount.after"),this}},{key:"mutate",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Rh(n)?this._t=n:er("You need to provide a array on `mutate()`"),this}},{key:"update",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.settings=Ch(this.settings,n),n.hasOwnProperty("startAt")&&(this.index=n.startAt),this._e.emit("update"),this}},{key:"go",value:function(n){return this._c.Run.make(n),this}},{key:"move",value:function(n){return this._c.Transition.disable(),this._c.Move.make(n),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n&&(this.settings.autoplay=n),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(n,r){return this._e.on(n,r),this}},{key:"isType",value:function(n){return this.settings.type===n}},{key:"settings",get:function(){return this._o},set:function(n){zo(n)?this._o=n:er("Options must be an `object` instance.")}},{key:"index",get:function(){return this._i},set:function(n){this._i=_t(n)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(n){this._d=!!n}}]),e}();function Eq(e,t,n){var r={mount:function(){this._o=!1},make:function(u){var c=this;e.disabled||(!e.settings.waitForTransition||e.disable(),this.move=u,n.emit("run.before",this.move),this.calculate(),n.emit("run",this.move),t.Transition.after(function(){c.isStart()&&n.emit("run.start",c.move),c.isEnd()&&n.emit("run.end",c.move),c.isOffset()&&(c._o=!1,n.emit("run.offset",c.move)),n.emit("run.after",c.move),e.enable()}))},calculate:function(){var u=this.move,c=this.length,f=u.steps,d=u.direction,p=1;if(d==="="){if(e.settings.bound&&_t(f)>c){e.index=c;return}e.index=f;return}if(d===">"&&f===">"){e.index=c;return}if(d==="<"&&f==="<"){e.index=0;return}if(d==="|"&&(p=e.settings.perView||1),d===">"||d==="|"&&f===">"){var h=i(p);h>c&&(this._o=!0),e.index=o(h,p);return}if(d==="<"||d==="|"&&f==="<"){var g=s(p);g<0&&(this._o=!0),e.index=a(g,p);return}er("Invalid direction pattern [".concat(d).concat(f,"] has been used"))},isStart:function(){return e.index<=0},isEnd:function(){return e.index>=this.length},isOffset:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?this._o?u==="|>"?this.move.direction==="|"&&this.move.steps===">":u==="|<"?this.move.direction==="|"&&this.move.steps==="<":this.move.direction===u:!1:this._o},isBound:function(){return e.isType("slider")&&e.settings.focusAt!=="center"&&e.settings.bound}};function i(l){var u=e.index;return e.isType("carousel")?u+l:u+(l-u%l)}function o(l,u){var c=r.length;return l<=c?l:e.isType("carousel")?l-(c+1):e.settings.rewind?r.isBound()&&!r.isEnd()?c:0:r.isBound()?c:Math.floor(c/u)*u}function s(l){var u=e.index;if(e.isType("carousel"))return u-l;var c=Math.ceil(u/l);return(c-1)*l}function a(l,u){var c=r.length;return l>=0?l:e.isType("carousel")?l+(c+1):e.settings.rewind?r.isBound()&&r.isStart()?c:Math.floor(c/u)*u:0}return Ge(r,"move",{get:function(){return this._m},set:function(u){var c=u.substr(1);this._m={direction:u.substr(0,1),steps:c?_t(c)?_t(c):c:0}}}),Ge(r,"length",{get:function(){var u=e.settings,c=t.Html.slides.length;return this.isBound()?c-1-(_t(u.perView)-1)+_t(u.focusAt):c-1}}),Ge(r,"offset",{get:function(){return this._o}}),r}function tb(){return new Date().getTime()}function Rf(e,t,n){var r,i,o,s,a=0;n||(n={});var l=function(){a=n.leading===!1?0:tb(),r=null,s=e.apply(i,o),r||(i=o=null)},u=function(){var f=tb();!a&&n.leading===!1&&(a=f);var d=t-(f-a);return i=this,o=arguments,d<=0||d>t?(r&&(clearTimeout(r),r=null),a=f,s=e.apply(i,o),r||(i=o=null)):!r&&n.trailing!==!1&&(r=setTimeout(l,d)),s};return u.cancel=function(){clearTimeout(r),a=0,r=i=o=null},u}var Ol={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};function Tq(e,t,n){var r={apply:function(o){for(var s=0,a=o.length;s0&&arguments[0]!==void 0?arguments[0]:0;this.offset=s,n.emit("move",{movement:this.value}),t.Transition.after(function(){n.emit("move.after",{movement:o.value})})}};return Ge(r,"offset",{get:function(){return r._o},set:function(o){r._o=$E(o)?0:_t(o)}}),Ge(r,"translate",{get:function(){return t.Sizes.slideWidth*e.index}}),Ge(r,"value",{get:function(){var o=this.offset,s=this.translate;return t.Direction.is("rtl")?s+o:s-o}}),n.on(["build.before","run"],function(){r.make()}),r}function Pq(e,t,n){var r={setupSlides:function(){for(var o="".concat(this.slideWidth,"px"),s=t.Html.slides,a=0;a0&&arguments[0]!==void 0?arguments[0]:[],s=t.Html.slides,a=e.settings,l=a.perView,u=a.classes,c=a.cloningRatio;if(s.length!==0)for(var f=+!!e.settings.peek,d=l+f+Math.round(l/2),p=s.slice(0,d).reverse(),h=s.slice(d*-1),g=0;g0&&arguments[0]!==void 0?arguments[0]:{};Ef(this,e),this.listeners=t}return Tf(e,[{key:"on",value:function(n,r,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;Th(n)&&(n=[n]);for(var s=0;s2&&arguments[2]!==void 0?arguments[2]:!1;Th(n)&&(n=[n]);for(var o=0;o":"<","<":">","=":"="};function Mq(e,t,n){var r={mount:function(){this.value=e.settings.direction},resolve:function(o){var s=o.slice(0,1);return this.is("rtl")?o.split(s).join(Iq[s]):o},is:function(o){return this.value===o},addClass:function(){t.Html.root.classList.add(e.settings.classes.direction[this.value])},removeClass:function(){t.Html.root.classList.remove(e.settings.classes.direction[this.value])}};return Ge(r,"value",{get:function(){return r._v},set:function(o){Lq.indexOf(o)>-1?r._v=o:er("Direction value must be `ltr` or `rtl`")}}),n.on(["destroy","update"],function(){r.removeClass()}),n.on("update",function(){r.mount()}),n.on(["build.before","update"],function(){r.addClass()}),r}function Dq(e,t){return{modify:function(r){return t.Direction.is("rtl")?-r:r}}}function zq(e,t){return{modify:function(r){var i=Math.floor(r/t.Sizes.slideWidth);return r+t.Gaps.value*i}}}function jq(e,t){return{modify:function(r){return r+t.Clones.grow/2}}}function Bq(e,t){return{modify:function(r){if(e.settings.focusAt>=0){var i=t.Peek.value;return zo(i)?r-i.before:r-i}return r}}}function Fq(e,t){return{modify:function(r){var i=t.Gaps.value,o=t.Sizes.width,s=e.settings.focusAt,a=t.Sizes.slideWidth;return s==="center"?r-(o/2-a/2):r-a*s-i*s}}}function Vq(e,t,n){var r=[zq,jq,Bq,Fq].concat(e._t,[Dq]);return{mutate:function(o){for(var s=0;s")||t.Run.isOffset("|>")?o+(s-a):(s+a)%o},getTravelDistance:function(){var o=t.Sizes.slideWidth*e.settings.perView;return t.Run.isOffset(">")||t.Run.isOffset("|>")?o*-1:o}};return n.on("move",function(i){if(!e.isType("carousel")||!t.Run.isOffset())return r.set(i.movement);t.Transition.after(function(){n.emit("translate.jump"),r.set(t.Sizes.slideWidth*e.index)});var o=t.Sizes.slideWidth*t.Translate.getStartIndex();return r.set(o-t.Translate.getTravelDistance())}),n.on("destroy",function(){r.remove()}),r}function Hq(e,t,n){var r=!1,i={compose:function(s){var a=e.settings;return r?"".concat(s," 0ms ").concat(a.animationTimingFunc):"".concat(s," ").concat(this.duration,"ms ").concat(a.animationTimingFunc)},set:function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";t.Html.wrapper.style.transition=this.compose(s)},remove:function(){t.Html.wrapper.style.transition=""},after:function(s){setTimeout(function(){s()},this.duration)},enable:function(){r=!1,this.set()},disable:function(){r=!0,this.set()}};return Ge(i,"duration",{get:function(){var s=e.settings;return e.isType("slider")&&t.Run.offset?s.rewindDuration:s.animationDuration}}),n.on("move",function(){i.set()}),n.on(["build.before","resize","translate.jump"],function(){i.disable()}),n.on("run",function(){i.enable()}),n.on("destroy",function(){i.remove()}),i}var IE=!1;try{var ib=Object.defineProperty({},"passive",{get:function(){IE=!0}});window.addEventListener("testPassive",null,ib),window.removeEventListener("testPassive",null,ib)}catch{}var Ph=IE,$l=["touchstart","mousedown"],ob=["touchmove","mousemove"],sb=["touchend","touchcancel","mouseup","mouseleave"],ab=["mousedown","mousemove","mouseup","mouseleave"];function Wq(e,t,n){var r=new oi,i=0,o=0,s=0,a=!1,l=Ph?{passive:!0}:!1,u={mount:function(){this.bindSwipeStart()},start:function(f){if(!a&&!e.disabled){this.disable();var d=this.touches(f);i=null,o=_t(d.pageX),s=_t(d.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),n.emit("swipe.start")}},move:function(f){if(!e.disabled){var d=e.settings,p=d.touchAngle,h=d.touchRatio,g=d.classes,E=this.touches(f),y=_t(E.pageX)-o,m=_t(E.pageY)-s,v=Math.abs(y<<2),S=Math.abs(m<<2),k=Math.sqrt(v+S),w=Math.sqrt(S);if(i=Math.asin(w/k),i*180/Math.PIy&&v"))):t.Move.make(),t.Html.root.classList.remove(g.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),n.emit("swipe.end")}},bindSwipeStart:function(){var f=this,d=e.settings,p=d.swipeThreshold,h=d.dragThreshold;p&&r.on($l[0],t.Html.wrapper,function(g){f.start(g)},l),h&&r.on($l[1],t.Html.wrapper,function(g){f.start(g)},l)},unbindSwipeStart:function(){r.off($l[0],t.Html.wrapper,l),r.off($l[1],t.Html.wrapper,l)},bindSwipeMove:function(){var f=this;r.on(ob,t.Html.wrapper,Rf(function(d){f.move(d)},e.settings.throttle),l)},unbindSwipeMove:function(){r.off(ob,t.Html.wrapper,l)},bindSwipeEnd:function(){var f=this;r.on(sb,t.Html.wrapper,function(d){f.end(d)})},unbindSwipeEnd:function(){r.off(sb,t.Html.wrapper)},touches:function(f){return ab.indexOf(f.type)>-1?f:f.touches[0]||f.changedTouches[0]},threshold:function(f){var d=e.settings;return ab.indexOf(f.type)>-1?d.dragThreshold:d.swipeThreshold},enable:function(){return a=!1,t.Transition.enable(),this},disable:function(){return a=!0,t.Transition.disable(),this}};return n.on("build.after",function(){t.Html.root.classList.add(e.settings.classes.swipeable)}),n.on("destroy",function(){u.unbindSwipeStart(),u.unbindSwipeMove(),u.unbindSwipeEnd(),r.destroy()}),u}function Kq(e,t,n){var r=new oi,i={mount:function(){this.bind()},bind:function(){r.on("dragstart",t.Html.wrapper,this.dragstart)},unbind:function(){r.off("dragstart",t.Html.wrapper)},dragstart:function(s){s.preventDefault()}};return n.on("destroy",function(){i.unbind(),r.destroy()}),i}function qq(e,t,n){var r=new oi,i=!1,o=!1,s={mount:function(){this._a=t.Html.wrapper.querySelectorAll("a"),this.bind()},bind:function(){r.on("click",t.Html.wrapper,this.click)},unbind:function(){r.off("click",t.Html.wrapper)},click:function(l){o&&(l.stopPropagation(),l.preventDefault())},detach:function(){if(o=!0,!i){for(var l=0;l"))),s.code==="ArrowLeft"&&t.Run.make(t.Direction.resolve("".concat(a,"<")))}};return n.on(["destroy","update"],function(){i.unbind()}),n.on("update",function(){i.mount()}),n.on("destroy",function(){r.destroy()}),i}function Jq(e,t,n){var r=new oi,i={mount:function(){this.enable(),this.start(),e.settings.hoverpause&&this.bind()},enable:function(){this._e=!0},disable:function(){this._e=!1},start:function(){var s=this;this._e&&(this.enable(),e.settings.autoplay&&$E(this._i)&&(this._i=setInterval(function(){s.stop(),t.Run.make(">"),s.start(),n.emit("autoplay")},this.time)))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var s=this;r.on("mouseover",t.Html.root,function(){s._e&&s.stop()}),r.on("mouseout",t.Html.root,function(){s._e&&s.start()})},unbind:function(){r.off(["mouseover","mouseout"],t.Html.root)}};return Ge(i,"time",{get:function(){var s=t.Html.slides[e.index].getAttribute("data-glide-autoplay");return _t(s||e.settings.autoplay)}}),n.on(["destroy","update"],function(){i.unbind()}),n.on(["run.before","swipe.start","update"],function(){i.stop()}),n.on(["pause","destroy"],function(){i.disable(),i.stop()}),n.on(["run.after","swipe.end"],function(){i.start()}),n.on(["play"],function(){i.enable(),i.start()}),n.on("update",function(){i.mount()}),n.on("destroy",function(){r.destroy()}),i}function lb(e){return zo(e)?Sq(e):(er("Breakpoints option must be an object"),{})}function eG(e,t,n){var r=new oi,i=e.settings,o=lb(i.breakpoints),s=Object.assign({},i),a={match:function(u){if(typeof window.matchMedia<"u"){for(var c in u)if(u.hasOwnProperty(c)&&window.matchMedia("(max-width: ".concat(c,"px)")).matches)return u[c]}return s}};return Object.assign(i,a.match(o)),r.on("resize",window,Rf(function(){e.settings=Ch(i,a.match(o))},e.settings.throttle)),n.on("update",function(){o=lb(o),s=Object.assign({},i)}),n.on("destroy",function(){r.off("resize",window)}),a}var tG={Html:Rq,Translate:Uq,Transition:Hq,Direction:Mq,Peek:Cq,Sizes:Pq,Gaps:Tq,Move:Aq,Clones:Oq,Resize:$q,Build:Nq,Run:Eq,Swipe:Wq,Images:Kq,Anchors:qq,Controls:Xq,Keyboard:Zq,Autoplay:Jq,Breakpoints:eG},nG=function(e){pq(n,e);var t=yq(n);function n(){return Ef(this,n),t.apply(this,arguments)}return Tf(n,[{key:"mount",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ou(Do(n.prototype),"mount",this).call(this,Object.assign({},tG,i))}}]),n}(kq);const rG=({onBannerChange:e})=>{const t=A.useRef(null),n=A.useRef(-1);return A.useEffect(()=>{if(t.current){let r=parseInt(sessionStorage.getItem("bannerIndex")||"0");(isNaN(r)||r<0)&&(r=0);const i=new nG(t.current,{type:"carousel",perView:1,focusAt:"center",startAt:r});return i.on("move",()=>{const o=i.index;o!==n.current&&(e(o),n.current=o)}),i.mount(),()=>{i.destroy()}}},[e]),O.jsxs("div",{className:"glide",ref:t,children:[O.jsx("div",{className:"glide__track","data-glide-el":"track",children:O.jsxs("ul",{className:"glide__slides",children:[O.jsx("li",{className:"glide__slide",children:O.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:[O.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"}),O.jsx("div",{className:"relative flex justify-center items-center px-16 py-12 w-full",children:O.jsxs("div",{className:"flex flex-col mt-10 mb-2",children:[O.jsx("h1",{className:"text-3xl leading-10",children:"Beauty Therapist Insurance"}),O.jsx("h2",{className:"self-center mt-2 text-lg leading-6",children:"Quote Builder"})]})})]})}),O.jsx("li",{className:"glide__slide",children:O.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:[O.jsx("img",{loading:"lazy",src:"https://cdn.builder.io/api/v1/image/assets/TEMP/200e11a394ad5c506b3f133be24687dab1859b865f2ea8310c308a18d448f767?apiKey=b1f64df9aada44c6ba1728b031344f7b&",className:"object-cover absolute inset-0 w-full h-full",alt:"Florist Working"}),O.jsx("div",{className:"relative flex justify-center items-center px-16 py-12 w-full",children:O.jsxs("div",{className:"flex flex-col mt-10 mb-2",children:[O.jsx("h1",{className:"text-3xl leading-10",children:"Florist Insurance"}),O.jsx("h2",{className:"self-center mt-2 text-lg leading-6",children:"Quote Builder"})]})})]})}),O.jsx("li",{className:"glide__slide",children:O.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:[O.jsx("img",{loading:"lazy",src:"https://cdn.builder.io/api/v1/image/assets/TEMP/258dbf5c230601afe5d7bec785cbe5abb3d42b54ec82f596318f21d195d32b3f?apiKey=b1f64df9aada44c6ba1728b031344f7b&",className:"object-cover absolute inset-0 w-full h-full",alt:"Bike"}),O.jsx("div",{className:"relative flex justify-center items-center px-16 py-12 w-full",children:O.jsxs("div",{className:"flex flex-col mt-10 mb-2",children:[O.jsx("h1",{className:"text-3xl leading-10",children:"Bike Shop Insurance"}),O.jsx("h2",{className:"self-center mt-2 text-lg leading-6",children:"Quote Builder"})]})})]})}),O.jsx("li",{className:"glide__slide",children:O.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:[O.jsx("img",{loading:"lazy",src:"https://cdn.builder.io/api/v1/image/assets/TEMP/446151b906bfcf1081a90272f8d824d4460daed7b3050601afbd0830d7e47e43?apiKey=b1f64df9aada44c6ba1728b031344f7b&",className:"object-cover absolute inset-0 w-full h-full",alt:"Fashion shop"}),O.jsx("div",{className:"relative flex justify-center items-center px-16 py-12 w-full",children:O.jsxs("div",{className:"flex flex-col mt-10 mb-2",children:[O.jsx("h1",{className:"text-3xl leading-10",children:"Fashion Shop Insurance"}),O.jsx("h2",{className:"self-center mt-2 text-lg leading-6",children:"Quote Builder"})]})})]})})]})}),O.jsxs("div",{className:"glide__arrows","data-glide-el":"controls",children:[O.jsx("button",{className:"glide__arrow glide__arrow--left","data-glide-dir":"<",children:"Left"}),O.jsx("button",{className:"glide__arrow glide__arrow--right","data-glide-dir":">",children:"Right"})]}),O.jsxs("div",{className:"glide__bullets","data-glide-el":"controls[nav]",children:[O.jsx("button",{className:"glide__bullet","data-glide-dir":"=0"}),O.jsx("button",{className:"glide__bullet","data-glide-dir":"=1"}),O.jsx("button",{className:"glide__bullet","data-glide-dir":"=2"}),O.jsx("button",{className:"glide__bullet","data-glide-dir":"=3"})]})]})},iG=({status:e,onClick:t})=>{const[n,r]=A.useState(!1),i=()=>{r(!0)},o=()=>{r(!1)},s=()=>{t&&t()};return O.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] ${n?"bg-red-200":""}`,role:"button",style:{paddingTop:"0.2rem",paddingBottom:"0.2rem"},tabIndex:0,"aria-label":e==="?"?"Status unknown":`Status: ${e}`,onMouseDown:i,onMouseUp:o,onMouseLeave:o,onClick:s,children:e})},Ts=({logoUrl:e,alertText:t,status:n,amount:r,setAmount:i})=>{const{sendMessage:o}=O_(),s=()=>{const a=`I would like help with ${t.toLowerCase()} coverage recommendations`,l={id:Mc(),name:"user",type:"custom_message",output:a,createdAt:new Date().toISOString()};o(l,[])};return O.jsxs("section",{style:{display:"flex",flexDirection:"row",paddingTop:"10px",paddingBottom:"15px",borderBottom:"1px solid"},className:"ml-16",children:[O.jsxs("div",{className:"flex",style:{width:"400px",alignItems:"center"},children:[O.jsx("img",{loading:"lazy",src:e,className:"w-8 h-8",alt:t}),O.jsx("div",{className:"text-black uppercase",style:{padding:"10px"},children:t}),O.jsx(iG,{status:n,onClick:s})]}),O.jsx("input",{type:"number",value:r,onChange:a=>i(Number(a.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:"right",maxWidth:"200px",border:"1px solid black"}})]})},oG="http://localhost:8000",sG={},Dd=new Mz(oG);function aG(){const{connect:e}=Oz(),t=hr(Zm);A.useEffect(()=>{t!=null&&t.socket.connected||fetch(Dd.buildEndpoint("/custom-auth")).then(s=>s.json()).then(s=>{e({client:Dd,userEnv:sG,accessToken:`Bearer: ${s.token}`})})},[]);const n=async s=>{try{const a=sessionStorage.getItem("bannerIndex");a!==s.toString()&&(sessionStorage.setItem("bannerIndex",s.toString()),await fetch(Dd.buildEndpoint("/banner-status"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({banner_index:s,stored_banner_index:a?parseInt(a):null})}),window.location.reload())}catch(a){console.error("Error updating banner status:",a)}},[r,i]=A.useState({}),o=(s,a)=>{i(l=>({...l,[s]:a}))};return O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"top",children:[O.jsx(dq,{}),O.jsx(rG,{onBannerChange:n})]}),O.jsxs("div",{className:"flex flex-row justify-center items-start gap-x-5 mt-5",children:[O.jsxs("div",{className:"left-side",style:{padding:"30px"},children:[O.jsxs("div",{className:"flex flex-col",children:[O.jsx("header",{className:"text-2xl font-bold leading-8 text-black pl-16",children:O.jsx("h1",{children:"Your Personalised Package:"})}),O.jsx("section",{style:{display:"flex",justifyContent:"space-between"},children:O.jsx(Ts,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/be051a227710fa99e9efda725e8d0dc36c64fad96e941813d07d6250884eadb2?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"PUBLIC & PRODUCT LIABILITY",status:"?",amount:r.publicLiability||0,setAmount:s=>o("publicLiability",s)})}),O.jsx("section",{style:{display:"flex",justifyContent:"space-between"},children:O.jsx(Ts,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/fb7d406f3707aefeb694b288abea645b643e28df498e96faa3a88f8ae3b4f096?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"FIRE AND ACCIDENTAL DAMAGE",status:"?",amount:r.fireDamage||0,setAmount:s=>o("fireDamage",s)})}),O.jsx("section",{style:{display:"flex",justifyContent:"space-between"},children:O.jsx(Ts,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/af6837406a2497c1255b86413c1138e2c55b3fc5c643e05f560bafd57e9bd20b?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"GLASS",status:"?",amount:r.glass||0,setAmount:s=>o("glass",s)})}),O.jsx("section",{style:{display:"flex",justifyContent:"space-between"},children:O.jsx(Ts,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/a7ffd8559e286d4d85db00334a22a1a956d9835240ad8d97e82af98af62a149e?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"PERSONAL EQUIPMENT",status:"?",amount:r.personalEquipment||0,setAmount:s=>o("personalEquipment",s)})}),O.jsx("section",{style:{display:"flex",justifyContent:"space-between"},children:O.jsx(Ts,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/89dc158bec91bc71c7b35c5b9752238d239eb70b38f3256e62653dee21b33b55?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"THEFT",status:"?",amount:r.theft||0,setAmount:s=>o("theft",s)})})]}),O.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"}),O.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:[O.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"]})]}),O.jsx("div",{className:"middle flex items-center justify-center",style:{padding:"30px"},children:O.jsx(fq,{})})]})]})}zd.createRoot(document.getElementById("root")).render(O.jsx(X.StrictMode,{children:O.jsx(Z$,{children:O.jsx(aG,{})})}));