@agi-cli/web-ui 0.1.101 → 0.1.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,7 @@
6
6
  `+Y[m].replace(" at new "," at ");return r.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",r.displayName)),de}while(1<=m&&0<=w);break}}}finally{He=!1,Error.prepareStackTrace=c}return(c=r?r.displayName||r.name:"")?ze(c):""}function Ee(r,a){switch(r.tag){case 26:case 27:case 5:return ze(r.type);case 16:return ze("Lazy");case 13:return r.child!==a&&a!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return De(r.type,!1);case 11:return De(r.type.render,!1);case 1:return De(r.type,!0);case 31:return ze("Activity");default:return""}}function wt(r){try{var a="",c=null;do a+=Ee(r,c),c=r,r=r.return;while(r);return a}catch(m){return`
7
7
  Error generating stack: `+m.message+`
8
8
  `+m.stack}}var Mt=Object.prototype.hasOwnProperty,ft=e.unstable_scheduleCallback,Vt=e.unstable_cancelCallback,Bt=e.unstable_shouldYield,Ne=e.unstable_requestPaint,Oe=e.unstable_now,je=e.unstable_getCurrentPriorityLevel,ce=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,ve=e.unstable_NormalPriority,Ce=e.unstable_LowPriority,Ie=e.unstable_IdlePriority,pt=e.log,Fe=e.unstable_setDisableYieldValue,mt=null,at=null;function dt(r){if(typeof pt=="function"&&Fe(r),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(mt,r)}catch{}}var Je=Math.clz32?Math.clz32:Nn,nn=Math.log,Wt=Math.LN2;function Nn(r){return r>>>=0,r===0?32:31-(nn(r)/Wt|0)|0}var gt=256,Zn=262144,na=4194304;function Qn(r){var a=r&42;if(a!==0)return a;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function yi(r,a,c){var m=r.pendingLanes;if(m===0)return 0;var w=0,k=r.suspendedLanes,D=r.pingedLanes;r=r.warmLanes;var q=m&134217727;return q!==0?(m=q&~k,m!==0?w=Qn(m):(D&=q,D!==0?w=Qn(D):c||(c=q&~r,c!==0&&(w=Qn(c))))):(q=m&~k,q!==0?w=Qn(q):D!==0?w=Qn(D):c||(c=m&~r,c!==0&&(w=Qn(c)))),w===0?0:a!==0&&a!==w&&(a&k)===0&&(k=w&-w,c=a&-a,k>=c||k===32&&(c&4194048)!==0)?a:w}function Br(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function is(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function O_(){var r=na;return na<<=1,(na&62914560)===0&&(na=4194304),r}function au(r){for(var a=[],c=0;31>c;c++)a.push(r);return a}function as(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function PL(r,a,c,m,w,k){var D=r.pendingLanes;r.pendingLanes=c,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=c,r.entangledLanes&=c,r.errorRecoveryDisabledLanes&=c,r.shellSuspendCounter=0;var q=r.entanglements,Y=r.expirationTimes,re=r.hiddenUpdates;for(c=D&~c;0<c;){var de=31-Je(c),pe=1<<de;q[de]=0,Y[de]=-1;var ae=re[de];if(ae!==null)for(re[de]=null,de=0;de<ae.length;de++){var oe=ae[de];oe!==null&&(oe.lane&=-536870913)}c&=~pe}m!==0&&I_(r,m,0),k!==0&&w===0&&r.tag!==0&&(r.suspendedLanes|=k&~(D&~a))}function I_(r,a,c){r.pendingLanes|=a,r.suspendedLanes&=~a;var m=31-Je(a);r.entangledLanes|=a,r.entanglements[m]=r.entanglements[m]|1073741824|c&261930}function L_(r,a){var c=r.entangledLanes|=a;for(r=r.entanglements;c;){var m=31-Je(c),w=1<<m;w&a|r[m]&a&&(r[m]|=a),c&=~w}}function D_(r,a){var c=a&-a;return c=(c&42)!==0?1:su(c),(c&(r.suspendedLanes|a))!==0?0:c}function su(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function ou(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function M_(){var r=J.p;return r!==0?r:(r=window.event,r===void 0?32:_x(r.type))}function B_(r,a){var c=J.p;try{return J.p=r,a()}finally{J.p=c}}var Fr=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Fr,rn="__reactProps$"+Fr,ra="__reactContainer$"+Fr,lu="__reactEvents$"+Fr,UL="__reactListeners$"+Fr,jL="__reactHandles$"+Fr,F_="__reactResources$"+Fr,ss="__reactMarker$"+Fr;function cu(r){delete r[Ut],delete r[rn],delete r[lu],delete r[UL],delete r[jL]}function ia(r){var a=r[Ut];if(a)return a;for(var c=r.parentNode;c;){if(a=c[ra]||c[Ut]){if(c=a.alternate,a.child!==null||c!==null&&c.child!==null)for(r=ix(r);r!==null;){if(c=r[Ut])return c;r=ix(r)}return a}r=c,c=r.parentNode}return null}function aa(r){if(r=r[Ut]||r[ra]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function os(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function sa(r){var a=r[F_];return a||(a=r[F_]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ft(r){r[ss]=!0}var P_=new Set,U_={};function vi(r,a){oa(r,a),oa(r+"Capture",a)}function oa(r,a){for(U_[r]=a,r=0;r<a.length;r++)P_.add(a[r])}var zL=RegExp("^[: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]*$"),j_={},z_={};function HL(r){return Mt.call(z_,r)?!0:Mt.call(j_,r)?!1:zL.test(r)?z_[r]=!0:(j_[r]=!0,!1)}function Lo(r,a,c){if(HL(a))if(c===null)r.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var m=a.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+c)}}function Do(r,a,c){if(c===null)r.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+c)}}function fr(r,a,c,m){if(m===null)r.removeAttribute(c);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(c);return}r.setAttributeNS(a,c,""+m)}}function On(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function H_(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function qL(r,a,c){var m=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var w=m.get,k=m.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return w.call(this)},set:function(D){c=""+D,k.call(this,D)}}),Object.defineProperty(r,a,{enumerable:m.enumerable}),{getValue:function(){return c},setValue:function(D){c=""+D},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function uu(r){if(!r._valueTracker){var a=H_(r)?"checked":"value";r._valueTracker=qL(r,a,""+r[a])}}function q_(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var c=a.getValue(),m="";return r&&(m=H_(r)?r.checked?"true":"false":r.value),r=m,r!==c?(a.setValue(r),!0):!1}function Mo(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var $L=/[\n"\\]/g;function In(r){return r.replace($L,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function du(r,a,c,m,w,k,D,q){r.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?r.type=D:r.removeAttribute("type"),a!=null?D==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+On(a)):r.value!==""+On(a)&&(r.value=""+On(a)):D!=="submit"&&D!=="reset"||r.removeAttribute("value"),a!=null?hu(r,D,On(a)):c!=null?hu(r,D,On(c)):m!=null&&r.removeAttribute("value"),w==null&&k!=null&&(r.defaultChecked=!!k),w!=null&&(r.checked=w&&typeof w!="function"&&typeof w!="symbol"),q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?r.name=""+On(q):r.removeAttribute("name")}function $_(r,a,c,m,w,k,D,q){if(k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(r.type=k),a!=null||c!=null){if(!(k!=="submit"&&k!=="reset"||a!=null)){uu(r);return}c=c!=null?""+On(c):"",a=a!=null?""+On(a):c,q||a===r.value||(r.value=a),r.defaultValue=a}m=m??w,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=q?r.checked:!!m,r.defaultChecked=!!m,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(r.name=D),uu(r)}function hu(r,a,c){a==="number"&&Mo(r.ownerDocument)===r||r.defaultValue===""+c||(r.defaultValue=""+c)}function la(r,a,c,m){if(r=r.options,a){a={};for(var w=0;w<c.length;w++)a["$"+c[w]]=!0;for(c=0;c<r.length;c++)w=a.hasOwnProperty("$"+r[c].value),r[c].selected!==w&&(r[c].selected=w),w&&m&&(r[c].defaultSelected=!0)}else{for(c=""+On(c),a=null,w=0;w<r.length;w++){if(r[w].value===c){r[w].selected=!0,m&&(r[w].defaultSelected=!0);return}a!==null||r[w].disabled||(a=r[w])}a!==null&&(a.selected=!0)}}function G_(r,a,c){if(a!=null&&(a=""+On(a),a!==r.value&&(r.value=a),c==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=c!=null?""+On(c):""}function V_(r,a,c,m){if(a==null){if(m!=null){if(c!=null)throw Error(i(92));if(V(m)){if(1<m.length)throw Error(i(93));m=m[0]}c=m}c==null&&(c=""),a=c}c=On(a),r.defaultValue=c,m=r.textContent,m===c&&m!==""&&m!==null&&(r.value=m),uu(r)}function ca(r,a){if(a){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=a;return}}r.textContent=a}var GL=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function W_(r,a,c){var m=a.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?m?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":m?r.setProperty(a,c):typeof c!="number"||c===0||GL.has(a)?a==="float"?r.cssFloat=c:r[a]=(""+c).trim():r[a]=c+"px"}function K_(r,a,c){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,c!=null){for(var m in c)!c.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?r.setProperty(m,""):m==="float"?r.cssFloat="":r[m]="");for(var w in a)m=a[w],a.hasOwnProperty(w)&&c[w]!==m&&W_(r,w,m)}else for(var k in a)a.hasOwnProperty(k)&&W_(r,k,a[k])}function fu(r){if(r.indexOf("-")===-1)return!1;switch(r){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 VL=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),WL=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Bo(r){return WL.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function pr(){}var pu=null;function mu(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ua=null,da=null;function Y_(r){var a=aa(r);if(a&&(r=a.stateNode)){var c=r[rn]||null;e:switch(r=a.stateNode,a.type){case"input":if(du(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),a=c.name,c.type==="radio"&&a!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+In(""+a)+'"][type="radio"]'),a=0;a<c.length;a++){var m=c[a];if(m!==r&&m.form===r.form){var w=m[rn]||null;if(!w)throw Error(i(90));du(m,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(a=0;a<c.length;a++)m=c[a],m.form===r.form&&q_(m)}break e;case"textarea":G_(r,c.value,c.defaultValue);break e;case"select":a=c.value,a!=null&&la(r,!!c.multiple,a,!1)}}}var gu=!1;function X_(r,a,c){if(gu)return r(a,c);gu=!0;try{var m=r(a);return m}finally{if(gu=!1,(ua!==null||da!==null)&&(xl(),ua&&(a=ua,r=da,da=ua=null,Y_(a),r)))for(a=0;a<r.length;a++)Y_(r[a])}}function ls(r,a){var c=r.stateNode;if(c===null)return null;var m=c[rn]||null;if(m===null)return null;c=m[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(r=r.type,m=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!m;break e;default:r=!1}if(r)return null;if(c&&typeof c!="function")throw Error(i(231,a,typeof c));return c}var mr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bu=!1;if(mr)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){bu=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{bu=!1}var Pr=null,yu=null,Fo=null;function Z_(){if(Fo)return Fo;var r,a=yu,c=a.length,m,w="value"in Pr?Pr.value:Pr.textContent,k=w.length;for(r=0;r<c&&a[r]===w[r];r++);var D=c-r;for(m=1;m<=D&&a[c-m]===w[k-m];m++);return Fo=w.slice(r,1<m?1-m:void 0)}function Po(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Uo(){return!0}function Q_(){return!1}function an(r){function a(c,m,w,k,D){this._reactName=c,this._targetInst=w,this.type=m,this.nativeEvent=k,this.target=D,this.currentTarget=null;for(var q in r)r.hasOwnProperty(q)&&(c=r[q],this[q]=c?c(k):k[q]);return this.isDefaultPrevented=(k.defaultPrevented!=null?k.defaultPrevented:k.returnValue===!1)?Uo:Q_,this.isPropagationStopped=Q_,this}return f(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Uo)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Uo)},persist:function(){},isPersistent:Uo}),a}var _i={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jo=an(_i),us=f({},_i,{view:0,detail:0}),KL=an(us),vu,_u,ds,zo=f({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Eu,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ds&&(ds&&r.type==="mousemove"?(vu=r.screenX-ds.screenX,_u=r.screenY-ds.screenY):_u=vu=0,ds=r),vu)},movementY:function(r){return"movementY"in r?r.movementY:_u}}),J_=an(zo),YL=f({},zo,{dataTransfer:0}),XL=an(YL),ZL=f({},us,{relatedTarget:0}),Su=an(ZL),QL=f({},_i,{animationName:0,elapsedTime:0,pseudoElement:0}),JL=an(QL),eD=f({},_i,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),tD=an(eD),nD=f({},_i,{data:0}),eS=an(nD),rD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},iD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},aD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sD(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=aD[r])?!!a[r]:!1}function Eu(){return sD}var oD=f({},us,{key:function(r){if(r.key){var a=rD[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=Po(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?iD[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Eu,charCode:function(r){return r.type==="keypress"?Po(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Po(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),lD=an(oD),cD=f({},zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tS=an(cD),uD=f({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Eu}),dD=an(uD),hD=f({},_i,{propertyName:0,elapsedTime:0,pseudoElement:0}),fD=an(hD),pD=f({},zo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),mD=an(pD),gD=f({},_i,{newState:0,oldState:0}),bD=an(gD),yD=[9,13,27,32],xu=mr&&"CompositionEvent"in window,hs=null;mr&&"documentMode"in document&&(hs=document.documentMode);var vD=mr&&"TextEvent"in window&&!hs,nS=mr&&(!xu||hs&&8<hs&&11>=hs),rS=" ",iS=!1;function aS(r,a){switch(r){case"keyup":return yD.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sS(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ha=!1;function _D(r,a){switch(r){case"compositionend":return sS(a);case"keypress":return a.which!==32?null:(iS=!0,rS);case"textInput":return r=a.data,r===rS&&iS?null:r;default:return null}}function SD(r,a){if(ha)return r==="compositionend"||!xu&&aS(r,a)?(r=Z_(),Fo=yu=Pr=null,ha=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return nS&&a.locale!=="ko"?null:a.data;default:return null}}var ED={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oS(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!ED[r.type]:a==="textarea"}function lS(r,a,c,m){ua?da?da.push(m):da=[m]:ua=m,a=Nl(a,"onChange"),0<a.length&&(c=new jo("onChange","change",null,c,m),r.push({event:c,listeners:a}))}var fs=null,ps=null;function xD(r){$0(r,0)}function Ho(r){var a=os(r);if(q_(a))return r}function cS(r,a){if(r==="change")return a}var uS=!1;if(mr){var wu;if(mr){var Cu="oninput"in document;if(!Cu){var dS=document.createElement("div");dS.setAttribute("oninput","return;"),Cu=typeof dS.oninput=="function"}wu=Cu}else wu=!1;uS=wu&&(!document.documentMode||9<document.documentMode)}function hS(){fs&&(fs.detachEvent("onpropertychange",fS),ps=fs=null)}function fS(r){if(r.propertyName==="value"&&Ho(ps)){var a=[];lS(a,ps,r,mu(r)),X_(xD,a)}}function wD(r,a,c){r==="focusin"?(hS(),fs=a,ps=c,fs.attachEvent("onpropertychange",fS)):r==="focusout"&&hS()}function CD(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ho(ps)}function TD(r,a){if(r==="click")return Ho(a)}function AD(r,a){if(r==="input"||r==="change")return Ho(a)}function kD(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var yn=typeof Object.is=="function"?Object.is:kD;function ms(r,a){if(yn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var c=Object.keys(r),m=Object.keys(a);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var w=c[m];if(!Mt.call(a,w)||!yn(r[w],a[w]))return!1}return!0}function pS(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function mS(r,a){var c=pS(r);r=0;for(var m;c;){if(c.nodeType===3){if(m=r+c.textContent.length,r<=a&&m>=a)return{node:c,offset:a-r};r=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=pS(c)}}function gS(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?gS(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function bS(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Mo(r.document);a instanceof r.HTMLIFrameElement;){try{var c=typeof a.contentWindow.location.href=="string"}catch{c=!1}if(c)r=a.contentWindow;else break;a=Mo(r.document)}return a}function Tu(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var RD=mr&&"documentMode"in document&&11>=document.documentMode,fa=null,Au=null,gs=null,ku=!1;function yS(r,a,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;ku||fa==null||fa!==Mo(m)||(m=fa,"selectionStart"in m&&Tu(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),gs&&ms(gs,m)||(gs=m,m=Nl(Au,"onSelect"),0<m.length&&(a=new jo("onSelect","select",null,a,c),r.push({event:a,listeners:m}),a.target=fa)))}function Si(r,a){var c={};return c[r.toLowerCase()]=a.toLowerCase(),c["Webkit"+r]="webkit"+a,c["Moz"+r]="moz"+a,c}var pa={animationend:Si("Animation","AnimationEnd"),animationiteration:Si("Animation","AnimationIteration"),animationstart:Si("Animation","AnimationStart"),transitionrun:Si("Transition","TransitionRun"),transitionstart:Si("Transition","TransitionStart"),transitioncancel:Si("Transition","TransitionCancel"),transitionend:Si("Transition","TransitionEnd")},Ru={},vS={};mr&&(vS=document.createElement("div").style,"AnimationEvent"in window||(delete pa.animationend.animation,delete pa.animationiteration.animation,delete pa.animationstart.animation),"TransitionEvent"in window||delete pa.transitionend.transition);function Ei(r){if(Ru[r])return Ru[r];if(!pa[r])return r;var a=pa[r],c;for(c in a)if(a.hasOwnProperty(c)&&c in vS)return Ru[r]=a[c];return r}var _S=Ei("animationend"),SS=Ei("animationiteration"),ES=Ei("animationstart"),ND=Ei("transitionrun"),OD=Ei("transitionstart"),ID=Ei("transitioncancel"),xS=Ei("transitionend"),wS=new Map,Nu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Nu.push("scrollEnd");function $n(r,a){wS.set(r,a),vi(a,[r])}var qo=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Ln=[],ma=0,Ou=0;function $o(){for(var r=ma,a=Ou=ma=0;a<r;){var c=Ln[a];Ln[a++]=null;var m=Ln[a];Ln[a++]=null;var w=Ln[a];Ln[a++]=null;var k=Ln[a];if(Ln[a++]=null,m!==null&&w!==null){var D=m.pending;D===null?w.next=w:(w.next=D.next,D.next=w),m.pending=w}k!==0&&CS(c,w,k)}}function Go(r,a,c,m){Ln[ma++]=r,Ln[ma++]=a,Ln[ma++]=c,Ln[ma++]=m,Ou|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function Iu(r,a,c,m){return Go(r,a,c,m),Vo(r)}function xi(r,a){return Go(r,null,null,a),Vo(r)}function CS(r,a,c){r.lanes|=c;var m=r.alternate;m!==null&&(m.lanes|=c);for(var w=!1,k=r.return;k!==null;)k.childLanes|=c,m=k.alternate,m!==null&&(m.childLanes|=c),k.tag===22&&(r=k.stateNode,r===null||r._visibility&1||(w=!0)),r=k,k=k.return;return r.tag===3?(k=r.stateNode,w&&a!==null&&(w=31-Je(c),r=k.hiddenUpdates,m=r[w],m===null?r[w]=[a]:m.push(a),a.lane=c|536870912),k):null}function Vo(r){if(50<Ps)throw Ps=0,zd=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var ga={};function LD(r,a,c,m){this.tag=r,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(r,a,c,m){return new LD(r,a,c,m)}function Lu(r){return r=r.prototype,!(!r||!r.isReactComponent)}function gr(r,a){var c=r.alternate;return c===null?(c=vn(r.tag,a,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=a,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&65011712,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,a=r.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c.refCleanup=r.refCleanup,c}function TS(r,a){r.flags&=65011714;var c=r.alternate;return c===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=c.childLanes,r.lanes=c.lanes,r.child=c.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=c.memoizedProps,r.memoizedState=c.memoizedState,r.updateQueue=c.updateQueue,r.type=c.type,a=c.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function Wo(r,a,c,m,w,k){var D=0;if(m=r,typeof r=="function")Lu(r)&&(D=1);else if(typeof r=="string")D=P2(r,c,ee.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case I:return r=vn(31,c,a,w),r.elementType=I,r.lanes=k,r;case E:return wi(c.children,w,k,a);case y:D=8,w|=24;break;case S:return r=vn(12,c,a,w|2),r.elementType=S,r.lanes=k,r;case N:return r=vn(13,c,a,w),r.elementType=N,r.lanes=k,r;case A:return r=vn(19,c,a,w),r.elementType=A,r.lanes=k,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case _:D=10;break e;case v:D=9;break e;case C:D=11;break e;case O:D=14;break e;case R:D=16,m=null;break e}D=29,c=Error(i(130,r===null?"null":typeof r,"")),m=null}return a=vn(D,c,a,w),a.elementType=r,a.type=m,a.lanes=k,a}function wi(r,a,c,m){return r=vn(7,r,m,a),r.lanes=c,r}function Du(r,a,c){return r=vn(6,r,null,a),r.lanes=c,r}function AS(r){var a=vn(18,null,null,0);return a.stateNode=r,a}function Mu(r,a,c){return a=vn(4,r.children!==null?r.children:[],r.key,a),a.lanes=c,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var kS=new WeakMap;function Dn(r,a){if(typeof r=="object"&&r!==null){var c=kS.get(r);return c!==void 0?c:(a={value:r,source:a,stack:wt(a)},kS.set(r,a),a)}return{value:r,source:a,stack:wt(a)}}var ba=[],ya=0,Ko=null,bs=0,Mn=[],Bn=0,Ur=null,Jn=1,er="";function br(r,a){ba[ya++]=bs,ba[ya++]=Ko,Ko=r,bs=a}function RS(r,a,c){Mn[Bn++]=Jn,Mn[Bn++]=er,Mn[Bn++]=Ur,Ur=r;var m=Jn;r=er;var w=32-Je(m)-1;m&=~(1<<w),c+=1;var k=32-Je(a)+w;if(30<k){var D=w-w%5;k=(m&(1<<D)-1).toString(32),m>>=D,w-=D,Jn=1<<32-Je(a)+w|c<<w|m,er=k+r}else Jn=1<<k|c<<w|m,er=r}function Bu(r){r.return!==null&&(br(r,1),RS(r,1,0))}function Fu(r){for(;r===Ko;)Ko=ba[--ya],ba[ya]=null,bs=ba[--ya],ba[ya]=null;for(;r===Ur;)Ur=Mn[--Bn],Mn[Bn]=null,er=Mn[--Bn],Mn[Bn]=null,Jn=Mn[--Bn],Mn[Bn]=null}function NS(r,a){Mn[Bn++]=Jn,Mn[Bn++]=er,Mn[Bn++]=Ur,Jn=a.id,er=a.overflow,Ur=r}var jt=null,ct=null,Ke=!1,jr=null,Fn=!1,Pu=Error(i(519));function zr(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ys(Dn(a,r)),Pu}function OS(r){var a=r.stateNode,c=r.type,m=r.memoizedProps;switch(a[Ut]=r,a[rn]=m,c){case"dialog":$e("cancel",a),$e("close",a);break;case"iframe":case"object":case"embed":$e("load",a);break;case"video":case"audio":for(c=0;c<js.length;c++)$e(js[c],a);break;case"source":$e("error",a);break;case"img":case"image":case"link":$e("error",a),$e("load",a);break;case"details":$e("toggle",a);break;case"input":$e("invalid",a),$_(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":$e("invalid",a);break;case"textarea":$e("invalid",a),V_(a,m.value,m.defaultValue,m.children)}c=m.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||a.textContent===""+c||m.suppressHydrationWarning===!0||K0(a.textContent,c)?(m.popover!=null&&($e("beforetoggle",a),$e("toggle",a)),m.onScroll!=null&&$e("scroll",a),m.onScrollEnd!=null&&$e("scrollend",a),m.onClick!=null&&(a.onclick=pr),a=!0):a=!1,a||zr(r,!0)}function IS(r){for(jt=r.return;jt;)switch(jt.tag){case 5:case 31:case 13:Fn=!1;return;case 27:case 3:Fn=!0;return;default:jt=jt.return}}function va(r){if(r!==jt)return!1;if(!Ke)return IS(r),Ke=!0,!1;var a=r.tag,c;if((c=a!==3&&a!==27)&&((c=a===5)&&(c=r.type,c=!(c!=="form"&&c!=="button")||nh(r.type,r.memoizedProps)),c=!c),c&&ct&&zr(r),IS(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ct=rx(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ct=rx(r)}else a===27?(a=ct,ti(r.type)?(r=oh,oh=null,ct=r):ct=a):ct=jt?Un(r.stateNode.nextSibling):null;return!0}function Ci(){ct=jt=null,Ke=!1}function Uu(){var r=jr;return r!==null&&(cn===null?cn=r:cn.push.apply(cn,r),jr=null),r}function ys(r){jr===null?jr=[r]:jr.push(r)}var ju=B(null),Ti=null,yr=null;function Hr(r,a,c){U(ju,a._currentValue),a._currentValue=c}function vr(r){r._currentValue=ju.current,H(ju)}function zu(r,a,c){for(;r!==null;){var m=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),r===c)break;r=r.return}}function Hu(r,a,c,m){var w=r.child;for(w!==null&&(w.return=r);w!==null;){var k=w.dependencies;if(k!==null){var D=w.child;k=k.firstContext;e:for(;k!==null;){var q=k;k=w;for(var Y=0;Y<a.length;Y++)if(q.context===a[Y]){k.lanes|=c,q=k.alternate,q!==null&&(q.lanes|=c),zu(k.return,c,r),m||(D=null);break e}k=q.next}}else if(w.tag===18){if(D=w.return,D===null)throw Error(i(341));D.lanes|=c,k=D.alternate,k!==null&&(k.lanes|=c),zu(D,c,r),D=null}else D=w.child;if(D!==null)D.return=w;else for(D=w;D!==null;){if(D===r){D=null;break}if(w=D.sibling,w!==null){w.return=D.return,D=w;break}D=D.return}w=D}}function _a(r,a,c,m){r=null;for(var w=a,k=!1;w!==null;){if(!k){if((w.flags&524288)!==0)k=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var D=w.alternate;if(D===null)throw Error(i(387));if(D=D.memoizedProps,D!==null){var q=w.type;yn(w.pendingProps.value,D.value)||(r!==null?r.push(q):r=[q])}}else if(w===X.current){if(D=w.alternate,D===null)throw Error(i(387));D.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(r!==null?r.push(Gs):r=[Gs])}w=w.return}r!==null&&Hu(a,r,c,m),a.flags|=262144}function Yo(r){for(r=r.firstContext;r!==null;){if(!yn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Ai(r){Ti=r,yr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function zt(r){return LS(Ti,r)}function Xo(r,a){return Ti===null&&Ai(r),LS(r,a)}function LS(r,a){var c=a._currentValue;if(a={context:a,memoizedValue:c,next:null},yr===null){if(r===null)throw Error(i(308));yr=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else yr=yr.next=a;return c}var DD=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(c,m){r.push(m)}};this.abort=function(){a.aborted=!0,r.forEach(function(c){return c()})}},MD=e.unstable_scheduleCallback,BD=e.unstable_NormalPriority,Ct={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qu(){return{controller:new DD,data:new Map,refCount:0}}function vs(r){r.refCount--,r.refCount===0&&MD(BD,function(){r.controller.abort()})}var _s=null,$u=0,Sa=0,Ea=null;function FD(r,a){if(_s===null){var c=_s=[];$u=0,Sa=Wd(),Ea={status:"pending",value:void 0,then:function(m){c.push(m)}}}return $u++,a.then(DS,DS),a}function DS(){if(--$u===0&&_s!==null){Ea!==null&&(Ea.status="fulfilled");var r=_s;_s=null,Sa=0,Ea=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function PD(r,a){var c=[],m={status:"pending",value:null,reason:null,then:function(w){c.push(w)}};return r.then(function(){m.status="fulfilled",m.value=a;for(var w=0;w<c.length;w++)(0,c[w])(a)},function(w){for(m.status="rejected",m.reason=w,w=0;w<c.length;w++)(0,c[w])(void 0)}),m}var MS=W.S;W.S=function(r,a){y0=Oe(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&FD(r,a),MS!==null&&MS(r,a)};var ki=B(null);function Gu(){var r=ki.current;return r!==null?r:st.pooledCache}function Zo(r,a){a===null?U(ki,ki.current):U(ki,a.pool)}function BS(){var r=Gu();return r===null?null:{parent:Ct._currentValue,pool:r}}var xa=Error(i(460)),Vu=Error(i(474)),Qo=Error(i(542)),Jo={then:function(){}};function FS(r){return r=r.status,r==="fulfilled"||r==="rejected"}function PS(r,a,c){switch(c=r[c],c===void 0?r.push(a):c!==a&&(a.then(pr,pr),a=c),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,jS(r),r;default:if(typeof a.status=="string")a.then(pr,pr);else{if(r=st,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(m){if(a.status==="pending"){var w=a;w.status="fulfilled",w.value=m}},function(m){if(a.status==="pending"){var w=a;w.status="rejected",w.reason=m}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,jS(r),r}throw Ni=a,xa}}function Ri(r){try{var a=r._init;return a(r._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Ni=c,xa):c}}var Ni=null;function US(){if(Ni===null)throw Error(i(459));var r=Ni;return Ni=null,r}function jS(r){if(r===xa||r===Qo)throw Error(i(483))}var wa=null,Ss=0;function el(r){var a=Ss;return Ss+=1,wa===null&&(wa=[]),PS(wa,r,a)}function Es(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function tl(r,a){throw a.$$typeof===g?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function zS(r){function a(te,Z){if(r){var ne=te.deletions;ne===null?(te.deletions=[Z],te.flags|=16):ne.push(Z)}}function c(te,Z){if(!r)return null;for(;Z!==null;)a(te,Z),Z=Z.sibling;return null}function m(te){for(var Z=new Map;te!==null;)te.key!==null?Z.set(te.key,te):Z.set(te.index,te),te=te.sibling;return Z}function w(te,Z){return te=gr(te,Z),te.index=0,te.sibling=null,te}function k(te,Z,ne){return te.index=ne,r?(ne=te.alternate,ne!==null?(ne=ne.index,ne<Z?(te.flags|=67108866,Z):ne):(te.flags|=67108866,Z)):(te.flags|=1048576,Z)}function D(te){return r&&te.alternate===null&&(te.flags|=67108866),te}function q(te,Z,ne,fe){return Z===null||Z.tag!==6?(Z=Du(ne,te.mode,fe),Z.return=te,Z):(Z=w(Z,ne),Z.return=te,Z)}function Y(te,Z,ne,fe){var we=ne.type;return we===E?de(te,Z,ne.props.children,fe,ne.key):Z!==null&&(Z.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===R&&Ri(we)===Z.type)?(Z=w(Z,ne.props),Es(Z,ne),Z.return=te,Z):(Z=Wo(ne.type,ne.key,ne.props,null,te.mode,fe),Es(Z,ne),Z.return=te,Z)}function re(te,Z,ne,fe){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ne.containerInfo||Z.stateNode.implementation!==ne.implementation?(Z=Mu(ne,te.mode,fe),Z.return=te,Z):(Z=w(Z,ne.children||[]),Z.return=te,Z)}function de(te,Z,ne,fe,we){return Z===null||Z.tag!==7?(Z=wi(ne,te.mode,fe,we),Z.return=te,Z):(Z=w(Z,ne),Z.return=te,Z)}function pe(te,Z,ne){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Du(""+Z,te.mode,ne),Z.return=te,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return ne=Wo(Z.type,Z.key,Z.props,null,te.mode,ne),Es(ne,Z),ne.return=te,ne;case x:return Z=Mu(Z,te.mode,ne),Z.return=te,Z;case R:return Z=Ri(Z),pe(te,Z,ne)}if(V(Z)||j(Z))return Z=wi(Z,te.mode,ne,null),Z.return=te,Z;if(typeof Z.then=="function")return pe(te,el(Z),ne);if(Z.$$typeof===_)return pe(te,Xo(te,Z),ne);tl(te,Z)}return null}function ae(te,Z,ne,fe){var we=Z!==null?Z.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return we!==null?null:q(te,Z,""+ne,fe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case b:return ne.key===we?Y(te,Z,ne,fe):null;case x:return ne.key===we?re(te,Z,ne,fe):null;case R:return ne=Ri(ne),ae(te,Z,ne,fe)}if(V(ne)||j(ne))return we!==null?null:de(te,Z,ne,fe,null);if(typeof ne.then=="function")return ae(te,Z,el(ne),fe);if(ne.$$typeof===_)return ae(te,Z,Xo(te,ne),fe);tl(te,ne)}return null}function oe(te,Z,ne,fe,we){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return te=te.get(ne)||null,q(Z,te,""+fe,we);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case b:return te=te.get(fe.key===null?ne:fe.key)||null,Y(Z,te,fe,we);case x:return te=te.get(fe.key===null?ne:fe.key)||null,re(Z,te,fe,we);case R:return fe=Ri(fe),oe(te,Z,ne,fe,we)}if(V(fe)||j(fe))return te=te.get(ne)||null,de(Z,te,fe,we,null);if(typeof fe.then=="function")return oe(te,Z,ne,el(fe),we);if(fe.$$typeof===_)return oe(te,Z,ne,Xo(Z,fe),we);tl(Z,fe)}return null}function _e(te,Z,ne,fe){for(var we=null,Xe=null,Se=Z,Pe=Z=0,We=null;Se!==null&&Pe<ne.length;Pe++){Se.index>Pe?(We=Se,Se=null):We=Se.sibling;var Ze=ae(te,Se,ne[Pe],fe);if(Ze===null){Se===null&&(Se=We);break}r&&Se&&Ze.alternate===null&&a(te,Se),Z=k(Ze,Z,Pe),Xe===null?we=Ze:Xe.sibling=Ze,Xe=Ze,Se=We}if(Pe===ne.length)return c(te,Se),Ke&&br(te,Pe),we;if(Se===null){for(;Pe<ne.length;Pe++)Se=pe(te,ne[Pe],fe),Se!==null&&(Z=k(Se,Z,Pe),Xe===null?we=Se:Xe.sibling=Se,Xe=Se);return Ke&&br(te,Pe),we}for(Se=m(Se);Pe<ne.length;Pe++)We=oe(Se,te,Pe,ne[Pe],fe),We!==null&&(r&&We.alternate!==null&&Se.delete(We.key===null?Pe:We.key),Z=k(We,Z,Pe),Xe===null?we=We:Xe.sibling=We,Xe=We);return r&&Se.forEach(function(si){return a(te,si)}),Ke&&br(te,Pe),we}function ke(te,Z,ne,fe){if(ne==null)throw Error(i(151));for(var we=null,Xe=null,Se=Z,Pe=Z=0,We=null,Ze=ne.next();Se!==null&&!Ze.done;Pe++,Ze=ne.next()){Se.index>Pe?(We=Se,Se=null):We=Se.sibling;var si=ae(te,Se,Ze.value,fe);if(si===null){Se===null&&(Se=We);break}r&&Se&&si.alternate===null&&a(te,Se),Z=k(si,Z,Pe),Xe===null?we=si:Xe.sibling=si,Xe=si,Se=We}if(Ze.done)return c(te,Se),Ke&&br(te,Pe),we;if(Se===null){for(;!Ze.done;Pe++,Ze=ne.next())Ze=pe(te,Ze.value,fe),Ze!==null&&(Z=k(Ze,Z,Pe),Xe===null?we=Ze:Xe.sibling=Ze,Xe=Ze);return Ke&&br(te,Pe),we}for(Se=m(Se);!Ze.done;Pe++,Ze=ne.next())Ze=oe(Se,te,Pe,Ze.value,fe),Ze!==null&&(r&&Ze.alternate!==null&&Se.delete(Ze.key===null?Pe:Ze.key),Z=k(Ze,Z,Pe),Xe===null?we=Ze:Xe.sibling=Ze,Xe=Ze);return r&&Se.forEach(function(Y2){return a(te,Y2)}),Ke&&br(te,Pe),we}function it(te,Z,ne,fe){if(typeof ne=="object"&&ne!==null&&ne.type===E&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case b:e:{for(var we=ne.key;Z!==null;){if(Z.key===we){if(we=ne.type,we===E){if(Z.tag===7){c(te,Z.sibling),fe=w(Z,ne.props.children),fe.return=te,te=fe;break e}}else if(Z.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===R&&Ri(we)===Z.type){c(te,Z.sibling),fe=w(Z,ne.props),Es(fe,ne),fe.return=te,te=fe;break e}c(te,Z);break}else a(te,Z);Z=Z.sibling}ne.type===E?(fe=wi(ne.props.children,te.mode,fe,ne.key),fe.return=te,te=fe):(fe=Wo(ne.type,ne.key,ne.props,null,te.mode,fe),Es(fe,ne),fe.return=te,te=fe)}return D(te);case x:e:{for(we=ne.key;Z!==null;){if(Z.key===we)if(Z.tag===4&&Z.stateNode.containerInfo===ne.containerInfo&&Z.stateNode.implementation===ne.implementation){c(te,Z.sibling),fe=w(Z,ne.children||[]),fe.return=te,te=fe;break e}else{c(te,Z);break}else a(te,Z);Z=Z.sibling}fe=Mu(ne,te.mode,fe),fe.return=te,te=fe}return D(te);case R:return ne=Ri(ne),it(te,Z,ne,fe)}if(V(ne))return _e(te,Z,ne,fe);if(j(ne)){if(we=j(ne),typeof we!="function")throw Error(i(150));return ne=we.call(ne),ke(te,Z,ne,fe)}if(typeof ne.then=="function")return it(te,Z,el(ne),fe);if(ne.$$typeof===_)return it(te,Z,Xo(te,ne),fe);tl(te,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint"?(ne=""+ne,Z!==null&&Z.tag===6?(c(te,Z.sibling),fe=w(Z,ne),fe.return=te,te=fe):(c(te,Z),fe=Du(ne,te.mode,fe),fe.return=te,te=fe),D(te)):c(te,Z)}return function(te,Z,ne,fe){try{Ss=0;var we=it(te,Z,ne,fe);return wa=null,we}catch(Se){if(Se===xa||Se===Qo)throw Se;var Xe=vn(29,Se,null,te.mode);return Xe.lanes=fe,Xe.return=te,Xe}finally{}}}var Oi=zS(!0),HS=zS(!1),qr=!1;function Wu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function $r(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Gr(r,a,c){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(Qe&2)!==0){var w=m.pending;return w===null?a.next=a:(a.next=w.next,w.next=a),m.pending=a,a=Vo(r),CS(r,null,c),a}return Go(r,m,a,c),Vo(r)}function xs(r,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194048)!==0)){var m=a.lanes;m&=r.pendingLanes,c|=m,a.lanes=c,L_(r,c)}}function Yu(r,a){var c=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var w=null,k=null;if(c=c.firstBaseUpdate,c!==null){do{var D={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};k===null?w=k=D:k=k.next=D,c=c.next}while(c!==null);k===null?w=k=a:k=k.next=a}else w=k=a;c={baseState:m.baseState,firstBaseUpdate:w,lastBaseUpdate:k,shared:m.shared,callbacks:m.callbacks},r.updateQueue=c;return}r=c.lastBaseUpdate,r===null?c.firstBaseUpdate=a:r.next=a,c.lastBaseUpdate=a}var Xu=!1;function ws(){if(Xu){var r=Ea;if(r!==null)throw r}}function Cs(r,a,c,m){Xu=!1;var w=r.updateQueue;qr=!1;var k=w.firstBaseUpdate,D=w.lastBaseUpdate,q=w.shared.pending;if(q!==null){w.shared.pending=null;var Y=q,re=Y.next;Y.next=null,D===null?k=re:D.next=re,D=Y;var de=r.alternate;de!==null&&(de=de.updateQueue,q=de.lastBaseUpdate,q!==D&&(q===null?de.firstBaseUpdate=re:q.next=re,de.lastBaseUpdate=Y))}if(k!==null){var pe=w.baseState;D=0,de=re=Y=null,q=k;do{var ae=q.lane&-536870913,oe=ae!==q.lane;if(oe?(Ve&ae)===ae:(m&ae)===ae){ae!==0&&ae===Sa&&(Xu=!0),de!==null&&(de=de.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});e:{var _e=r,ke=q;ae=a;var it=c;switch(ke.tag){case 1:if(_e=ke.payload,typeof _e=="function"){pe=_e.call(it,pe,ae);break e}pe=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=ke.payload,ae=typeof _e=="function"?_e.call(it,pe,ae):_e,ae==null)break e;pe=f({},pe,ae);break e;case 2:qr=!0}}ae=q.callback,ae!==null&&(r.flags|=64,oe&&(r.flags|=8192),oe=w.callbacks,oe===null?w.callbacks=[ae]:oe.push(ae))}else oe={lane:ae,tag:q.tag,payload:q.payload,callback:q.callback,next:null},de===null?(re=de=oe,Y=pe):de=de.next=oe,D|=ae;if(q=q.next,q===null){if(q=w.shared.pending,q===null)break;oe=q,q=oe.next,oe.next=null,w.lastBaseUpdate=oe,w.shared.pending=null}}while(!0);de===null&&(Y=pe),w.baseState=Y,w.firstBaseUpdate=re,w.lastBaseUpdate=de,k===null&&(w.shared.lanes=0),Xr|=D,r.lanes=D,r.memoizedState=pe}}function qS(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function $S(r,a){var c=r.callbacks;if(c!==null)for(r.callbacks=null,r=0;r<c.length;r++)qS(c[r],a)}var Ca=B(null),nl=B(0);function GS(r,a){r=kr,U(nl,r),U(Ca,a),kr=r|a.baseLanes}function Zu(){U(nl,kr),U(Ca,Ca.current)}function Qu(){kr=nl.current,H(Ca),H(nl)}var _n=B(null),Pn=null;function Vr(r){var a=r.alternate;U(St,St.current&1),U(_n,r),Pn===null&&(a===null||Ca.current!==null||a.memoizedState!==null)&&(Pn=r)}function Ju(r){U(St,St.current),U(_n,r),Pn===null&&(Pn=r)}function VS(r){r.tag===22?(U(St,St.current),U(_n,r),Pn===null&&(Pn=r)):Wr()}function Wr(){U(St,St.current),U(_n,_n.current)}function Sn(r){H(_n),Pn===r&&(Pn=null),H(St)}var St=B(0);function rl(r){for(var a=r;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||ah(c)||sh(c)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var _r=0,Me=null,nt=null,Tt=null,il=!1,Ta=!1,Ii=!1,al=0,Ts=0,Aa=null,UD=0;function yt(){throw Error(i(321))}function ed(r,a){if(a===null)return!1;for(var c=0;c<a.length&&c<r.length;c++)if(!yn(r[c],a[c]))return!1;return!0}function td(r,a,c,m,w,k){return _r=k,Me=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,W.H=r===null||r.memoizedState===null?RE:gd,Ii=!1,k=c(m,w),Ii=!1,Ta&&(k=KS(a,c,m,w)),WS(r),k}function WS(r){W.H=Rs;var a=nt!==null&&nt.next!==null;if(_r=0,Tt=nt=Me=null,il=!1,Ts=0,Aa=null,a)throw Error(i(300));r===null||At||(r=r.dependencies,r!==null&&Yo(r)&&(At=!0))}function KS(r,a,c,m){Me=r;var w=0;do{if(Ta&&(Aa=null),Ts=0,Ta=!1,25<=w)throw Error(i(301));if(w+=1,Tt=nt=null,r.updateQueue!=null){var k=r.updateQueue;k.lastEffect=null,k.events=null,k.stores=null,k.memoCache!=null&&(k.memoCache.index=0)}W.H=NE,k=a(c,m)}while(Ta);return k}function jD(){var r=W.H,a=r.useState()[0];return a=typeof a.then=="function"?As(a):a,r=r.useState()[0],(nt!==null?nt.memoizedState:null)!==r&&(Me.flags|=1024),a}function nd(){var r=al!==0;return al=0,r}function rd(r,a,c){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~c}function id(r){if(il){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}il=!1}_r=0,Tt=nt=Me=null,Ta=!1,Ts=al=0,Aa=null}function Qt(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Me.memoizedState=Tt=r:Tt=Tt.next=r,Tt}function Et(){if(nt===null){var r=Me.alternate;r=r!==null?r.memoizedState:null}else r=nt.next;var a=Tt===null?Me.memoizedState:Tt.next;if(a!==null)Tt=a,nt=r;else{if(r===null)throw Me.alternate===null?Error(i(467)):Error(i(310));nt=r,r={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},Tt===null?Me.memoizedState=Tt=r:Tt=Tt.next=r}return Tt}function sl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function As(r){var a=Ts;return Ts+=1,Aa===null&&(Aa=[]),r=PS(Aa,r,a),a=Me,(Tt===null?a.memoizedState:Tt.next)===null&&(a=a.alternate,W.H=a===null||a.memoizedState===null?RE:gd),r}function ol(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return As(r);if(r.$$typeof===_)return zt(r)}throw Error(i(438,String(r)))}function ad(r){var a=null,c=Me.updateQueue;if(c!==null&&(a=c.memoCache),a==null){var m=Me.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(a={data:m.data.map(function(w){return w.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),c===null&&(c=sl(),Me.updateQueue=c),c.memoCache=a,c=a.data[a.index],c===void 0)for(c=a.data[a.index]=Array(r),m=0;m<r;m++)c[m]=M;return a.index++,c}function Sr(r,a){return typeof a=="function"?a(r):a}function ll(r){var a=Et();return sd(a,nt,r)}function sd(r,a,c){var m=r.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=c;var w=r.baseQueue,k=m.pending;if(k!==null){if(w!==null){var D=w.next;w.next=k.next,k.next=D}a.baseQueue=w=k,m.pending=null}if(k=r.baseState,w===null)r.memoizedState=k;else{a=w.next;var q=D=null,Y=null,re=a,de=!1;do{var pe=re.lane&-536870913;if(pe!==re.lane?(Ve&pe)===pe:(_r&pe)===pe){var ae=re.revertLane;if(ae===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null}),pe===Sa&&(de=!0);else if((_r&ae)===ae){re=re.next,ae===Sa&&(de=!0);continue}else pe={lane:0,revertLane:re.revertLane,gesture:null,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},Y===null?(q=Y=pe,D=k):Y=Y.next=pe,Me.lanes|=ae,Xr|=ae;pe=re.action,Ii&&c(k,pe),k=re.hasEagerState?re.eagerState:c(k,pe)}else ae={lane:pe,revertLane:re.revertLane,gesture:re.gesture,action:re.action,hasEagerState:re.hasEagerState,eagerState:re.eagerState,next:null},Y===null?(q=Y=ae,D=k):Y=Y.next=ae,Me.lanes|=pe,Xr|=pe;re=re.next}while(re!==null&&re!==a);if(Y===null?D=k:Y.next=q,!yn(k,r.memoizedState)&&(At=!0,de&&(c=Ea,c!==null)))throw c;r.memoizedState=k,r.baseState=D,r.baseQueue=Y,m.lastRenderedState=k}return w===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function od(r){var a=Et(),c=a.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=r;var m=c.dispatch,w=c.pending,k=a.memoizedState;if(w!==null){c.pending=null;var D=w=w.next;do k=r(k,D.action),D=D.next;while(D!==w);yn(k,a.memoizedState)||(At=!0),a.memoizedState=k,a.baseQueue===null&&(a.baseState=k),c.lastRenderedState=k}return[k,m]}function YS(r,a,c){var m=Me,w=Et(),k=Ke;if(k){if(c===void 0)throw Error(i(407));c=c()}else c=a();var D=!yn((nt||w).memoizedState,c);if(D&&(w.memoizedState=c,At=!0),w=w.queue,ud(QS.bind(null,m,w,r),[r]),w.getSnapshot!==a||D||Tt!==null&&Tt.memoizedState.tag&1){if(m.flags|=2048,ka(9,{destroy:void 0},ZS.bind(null,m,w,c,a),null),st===null)throw Error(i(349));k||(_r&127)!==0||XS(m,a,c)}return c}function XS(r,a,c){r.flags|=16384,r={getSnapshot:a,value:c},a=Me.updateQueue,a===null?(a=sl(),Me.updateQueue=a,a.stores=[r]):(c=a.stores,c===null?a.stores=[r]:c.push(r))}function ZS(r,a,c,m){a.value=c,a.getSnapshot=m,JS(a)&&eE(r)}function QS(r,a,c){return c(function(){JS(a)&&eE(r)})}function JS(r){var a=r.getSnapshot;r=r.value;try{var c=a();return!yn(r,c)}catch{return!0}}function eE(r){var a=xi(r,2);a!==null&&un(a,r,2)}function ld(r){var a=Qt();if(typeof r=="function"){var c=r;if(r=c(),Ii){dt(!0);try{c()}finally{dt(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:r},a}function tE(r,a,c,m){return r.baseState=c,sd(r,nt,typeof m=="function"?m:Sr)}function zD(r,a,c,m,w){if(dl(r))throw Error(i(485));if(r=a.action,r!==null){var k={payload:w,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){k.listeners.push(D)}};W.T!==null?c(!0):k.isTransition=!1,m(k),c=a.pending,c===null?(k.next=a.pending=k,nE(a,k)):(k.next=c.next,a.pending=c.next=k)}}function nE(r,a){var c=a.action,m=a.payload,w=r.state;if(a.isTransition){var k=W.T,D={};W.T=D;try{var q=c(w,m),Y=W.S;Y!==null&&Y(D,q),rE(r,a,q)}catch(re){cd(r,a,re)}finally{k!==null&&D.types!==null&&(k.types=D.types),W.T=k}}else try{k=c(w,m),rE(r,a,k)}catch(re){cd(r,a,re)}}function rE(r,a,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(m){iE(r,a,m)},function(m){return cd(r,a,m)}):iE(r,a,c)}function iE(r,a,c){a.status="fulfilled",a.value=c,aE(a),r.state=c,a=r.pending,a!==null&&(c=a.next,c===a?r.pending=null:(c=c.next,a.next=c,nE(r,c)))}function cd(r,a,c){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=c,aE(a),a=a.next;while(a!==m)}r.action=null}function aE(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function sE(r,a){return a}function oE(r,a){if(Ke){var c=st.formState;if(c!==null){e:{var m=Me;if(Ke){if(ct){t:{for(var w=ct,k=Fn;w.nodeType!==8;){if(!k){w=null;break t}if(w=Un(w.nextSibling),w===null){w=null;break t}}k=w.data,w=k==="F!"||k==="F"?w:null}if(w){ct=Un(w.nextSibling),m=w.data==="F!";break e}}zr(m)}m=!1}m&&(a=c[0])}}return c=Qt(),c.memoizedState=c.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sE,lastRenderedState:a},c.queue=m,c=TE.bind(null,Me,m),m.dispatch=c,m=ld(!1),k=md.bind(null,Me,!1,m.queue),m=Qt(),w={state:a,dispatch:null,action:r,pending:null},m.queue=w,c=zD.bind(null,Me,w,k,c),w.dispatch=c,m.memoizedState=r,[a,c,!1]}function lE(r){var a=Et();return cE(a,nt,r)}function cE(r,a,c){if(a=sd(r,a,sE)[0],r=ll(Sr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=As(a)}catch(D){throw D===xa?Qo:D}else m=a;a=Et();var w=a.queue,k=w.dispatch;return c!==a.memoizedState&&(Me.flags|=2048,ka(9,{destroy:void 0},HD.bind(null,w,c),null)),[m,k,r]}function HD(r,a){r.action=a}function uE(r){var a=Et(),c=nt;if(c!==null)return cE(a,c,r);Et(),a=a.memoizedState,c=Et();var m=c.queue.dispatch;return c.memoizedState=r,[a,m,!1]}function ka(r,a,c,m){return r={tag:r,create:c,deps:m,inst:a,next:null},a=Me.updateQueue,a===null&&(a=sl(),Me.updateQueue=a),c=a.lastEffect,c===null?a.lastEffect=r.next=r:(m=c.next,c.next=r,r.next=m,a.lastEffect=r),r}function dE(){return Et().memoizedState}function cl(r,a,c,m){var w=Qt();Me.flags|=r,w.memoizedState=ka(1|a,{destroy:void 0},c,m===void 0?null:m)}function ul(r,a,c,m){var w=Et();m=m===void 0?null:m;var k=w.memoizedState.inst;nt!==null&&m!==null&&ed(m,nt.memoizedState.deps)?w.memoizedState=ka(a,k,c,m):(Me.flags|=r,w.memoizedState=ka(1|a,k,c,m))}function hE(r,a){cl(8390656,8,r,a)}function ud(r,a){ul(2048,8,r,a)}function qD(r){Me.flags|=4;var a=Me.updateQueue;if(a===null)a=sl(),Me.updateQueue=a,a.events=[r];else{var c=a.events;c===null?a.events=[r]:c.push(r)}}function fE(r){var a=Et().memoizedState;return qD({ref:a,nextImpl:r}),function(){if((Qe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function pE(r,a){return ul(4,2,r,a)}function mE(r,a){return ul(4,4,r,a)}function gE(r,a){if(typeof a=="function"){r=r();var c=a(r);return function(){typeof c=="function"?c():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function bE(r,a,c){c=c!=null?c.concat([r]):null,ul(4,4,gE.bind(null,a,r),c)}function dd(){}function yE(r,a){var c=Et();a=a===void 0?null:a;var m=c.memoizedState;return a!==null&&ed(a,m[1])?m[0]:(c.memoizedState=[r,a],r)}function vE(r,a){var c=Et();a=a===void 0?null:a;var m=c.memoizedState;if(a!==null&&ed(a,m[1]))return m[0];if(m=r(),Ii){dt(!0);try{r()}finally{dt(!1)}}return c.memoizedState=[m,a],m}function hd(r,a,c){return c===void 0||(_r&1073741824)!==0&&(Ve&261930)===0?r.memoizedState=a:(r.memoizedState=c,r=_0(),Me.lanes|=r,Xr|=r,c)}function _E(r,a,c,m){return yn(c,a)?c:Ca.current!==null?(r=hd(r,c,m),yn(r,a)||(At=!0),r):(_r&42)===0||(_r&1073741824)!==0&&(Ve&261930)===0?(At=!0,r.memoizedState=c):(r=_0(),Me.lanes|=r,Xr|=r,a)}function SE(r,a,c,m,w){var k=J.p;J.p=k!==0&&8>k?k:8;var D=W.T,q={};W.T=q,md(r,!1,a,c);try{var Y=w(),re=W.S;if(re!==null&&re(q,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var de=PD(Y,m);ks(r,a,de,wn(r))}else ks(r,a,m,wn(r))}catch(pe){ks(r,a,{then:function(){},status:"rejected",reason:pe},wn())}finally{J.p=k,D!==null&&q.types!==null&&(D.types=q.types),W.T=D}}function $D(){}function fd(r,a,c,m){if(r.tag!==5)throw Error(i(476));var w=EE(r).queue;SE(r,w,a,Q,c===null?$D:function(){return xE(r),c(m)})}function EE(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:Q},next:null};var c={};return a.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:c},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function xE(r){var a=EE(r);a.next===null&&(a=r.alternate.memoizedState),ks(r,a.next.queue,{},wn())}function pd(){return zt(Gs)}function wE(){return Et().memoizedState}function CE(){return Et().memoizedState}function GD(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var c=wn();r=$r(c);var m=Gr(a,r,c);m!==null&&(un(m,a,c),xs(m,a,c)),a={cache:qu()},r.payload=a;return}a=a.return}}function VD(r,a,c){var m=wn();c={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},dl(r)?AE(a,c):(c=Iu(r,a,c,m),c!==null&&(un(c,r,m),kE(c,a,m)))}function TE(r,a,c){var m=wn();ks(r,a,c,m)}function ks(r,a,c,m){var w={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(dl(r))AE(a,w);else{var k=r.alternate;if(r.lanes===0&&(k===null||k.lanes===0)&&(k=a.lastRenderedReducer,k!==null))try{var D=a.lastRenderedState,q=k(D,c);if(w.hasEagerState=!0,w.eagerState=q,yn(q,D))return Go(r,a,w,0),st===null&&$o(),!1}catch{}finally{}if(c=Iu(r,a,w,m),c!==null)return un(c,r,m),kE(c,a,m),!0}return!1}function md(r,a,c,m){if(m={lane:2,revertLane:Wd(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},dl(r)){if(a)throw Error(i(479))}else a=Iu(r,c,m,2),a!==null&&un(a,r,2)}function dl(r){var a=r.alternate;return r===Me||a!==null&&a===Me}function AE(r,a){Ta=il=!0;var c=r.pending;c===null?a.next=a:(a.next=c.next,c.next=a),r.pending=a}function kE(r,a,c){if((c&4194048)!==0){var m=a.lanes;m&=r.pendingLanes,c|=m,a.lanes=c,L_(r,c)}}var Rs={readContext:zt,use:ol,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};Rs.useEffectEvent=yt;var RE={readContext:zt,use:ol,useCallback:function(r,a){return Qt().memoizedState=[r,a===void 0?null:a],r},useContext:zt,useEffect:hE,useImperativeHandle:function(r,a,c){c=c!=null?c.concat([r]):null,cl(4194308,4,gE.bind(null,a,r),c)},useLayoutEffect:function(r,a){return cl(4194308,4,r,a)},useInsertionEffect:function(r,a){cl(4,2,r,a)},useMemo:function(r,a){var c=Qt();a=a===void 0?null:a;var m=r();if(Ii){dt(!0);try{r()}finally{dt(!1)}}return c.memoizedState=[m,a],m},useReducer:function(r,a,c){var m=Qt();if(c!==void 0){var w=c(a);if(Ii){dt(!0);try{c(a)}finally{dt(!1)}}}else w=a;return m.memoizedState=m.baseState=w,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:w},m.queue=r,r=r.dispatch=VD.bind(null,Me,r),[m.memoizedState,r]},useRef:function(r){var a=Qt();return r={current:r},a.memoizedState=r},useState:function(r){r=ld(r);var a=r.queue,c=TE.bind(null,Me,a);return a.dispatch=c,[r.memoizedState,c]},useDebugValue:dd,useDeferredValue:function(r,a){var c=Qt();return hd(c,r,a)},useTransition:function(){var r=ld(!1);return r=SE.bind(null,Me,r.queue,!0,!1),Qt().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,c){var m=Me,w=Qt();if(Ke){if(c===void 0)throw Error(i(407));c=c()}else{if(c=a(),st===null)throw Error(i(349));(Ve&127)!==0||XS(m,a,c)}w.memoizedState=c;var k={value:c,getSnapshot:a};return w.queue=k,hE(QS.bind(null,m,k,r),[r]),m.flags|=2048,ka(9,{destroy:void 0},ZS.bind(null,m,k,c,a),null),c},useId:function(){var r=Qt(),a=st.identifierPrefix;if(Ke){var c=er,m=Jn;c=(m&~(1<<32-Je(m)-1)).toString(32)+c,a="_"+a+"R_"+c,c=al++,0<c&&(a+="H"+c.toString(32)),a+="_"}else c=UD++,a="_"+a+"r_"+c.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:pd,useFormState:oE,useActionState:oE,useOptimistic:function(r){var a=Qt();a.memoizedState=a.baseState=r;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=c,a=md.bind(null,Me,!0,c),c.dispatch=a,[r,a]},useMemoCache:ad,useCacheRefresh:function(){return Qt().memoizedState=GD.bind(null,Me)},useEffectEvent:function(r){var a=Qt(),c={impl:r};return a.memoizedState=c,function(){if((Qe&2)!==0)throw Error(i(440));return c.impl.apply(void 0,arguments)}}},gd={readContext:zt,use:ol,useCallback:yE,useContext:zt,useEffect:ud,useImperativeHandle:bE,useInsertionEffect:pE,useLayoutEffect:mE,useMemo:vE,useReducer:ll,useRef:dE,useState:function(){return ll(Sr)},useDebugValue:dd,useDeferredValue:function(r,a){var c=Et();return _E(c,nt.memoizedState,r,a)},useTransition:function(){var r=ll(Sr)[0],a=Et().memoizedState;return[typeof r=="boolean"?r:As(r),a]},useSyncExternalStore:YS,useId:wE,useHostTransitionStatus:pd,useFormState:lE,useActionState:lE,useOptimistic:function(r,a){var c=Et();return tE(c,nt,r,a)},useMemoCache:ad,useCacheRefresh:CE};gd.useEffectEvent=fE;var NE={readContext:zt,use:ol,useCallback:yE,useContext:zt,useEffect:ud,useImperativeHandle:bE,useInsertionEffect:pE,useLayoutEffect:mE,useMemo:vE,useReducer:od,useRef:dE,useState:function(){return od(Sr)},useDebugValue:dd,useDeferredValue:function(r,a){var c=Et();return nt===null?hd(c,r,a):_E(c,nt.memoizedState,r,a)},useTransition:function(){var r=od(Sr)[0],a=Et().memoizedState;return[typeof r=="boolean"?r:As(r),a]},useSyncExternalStore:YS,useId:wE,useHostTransitionStatus:pd,useFormState:uE,useActionState:uE,useOptimistic:function(r,a){var c=Et();return nt!==null?tE(c,nt,r,a):(c.baseState=r,[r,c.queue.dispatch])},useMemoCache:ad,useCacheRefresh:CE};NE.useEffectEvent=fE;function bd(r,a,c,m){a=r.memoizedState,c=c(m,a),c=c==null?a:f({},a,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var yd={enqueueSetState:function(r,a,c){r=r._reactInternals;var m=wn(),w=$r(m);w.payload=a,c!=null&&(w.callback=c),a=Gr(r,w,m),a!==null&&(un(a,r,m),xs(a,r,m))},enqueueReplaceState:function(r,a,c){r=r._reactInternals;var m=wn(),w=$r(m);w.tag=1,w.payload=a,c!=null&&(w.callback=c),a=Gr(r,w,m),a!==null&&(un(a,r,m),xs(a,r,m))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var c=wn(),m=$r(c);m.tag=2,a!=null&&(m.callback=a),a=Gr(r,m,c),a!==null&&(un(a,r,c),xs(a,r,c))}};function OE(r,a,c,m,w,k,D){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,k,D):a.prototype&&a.prototype.isPureReactComponent?!ms(c,m)||!ms(w,k):!0}function IE(r,a,c,m){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(c,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(c,m),a.state!==r&&yd.enqueueReplaceState(a,a.state,null)}function Li(r,a){var c=a;if("ref"in a){c={};for(var m in a)m!=="ref"&&(c[m]=a[m])}if(r=r.defaultProps){c===a&&(c=f({},c));for(var w in r)c[w]===void 0&&(c[w]=r[w])}return c}function LE(r){qo(r)}function DE(r){console.error(r)}function ME(r){qo(r)}function hl(r,a){try{var c=r.onUncaughtError;c(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function BE(r,a,c){try{var m=r.onCaughtError;m(c.value,{componentStack:c.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function vd(r,a,c){return c=$r(c),c.tag=3,c.payload={element:null},c.callback=function(){hl(r,a)},c}function FE(r){return r=$r(r),r.tag=3,r}function PE(r,a,c,m){var w=c.type.getDerivedStateFromError;if(typeof w=="function"){var k=m.value;r.payload=function(){return w(k)},r.callback=function(){BE(a,c,m)}}var D=c.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(r.callback=function(){BE(a,c,m),typeof w!="function"&&(Zr===null?Zr=new Set([this]):Zr.add(this));var q=m.stack;this.componentDidCatch(m.value,{componentStack:q!==null?q:""})})}function WD(r,a,c,m,w){if(c.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(a=c.alternate,a!==null&&_a(a,c,w,!0),c=_n.current,c!==null){switch(c.tag){case 31:case 13:return Pn===null?wl():c.alternate===null&&vt===0&&(vt=3),c.flags&=-257,c.flags|=65536,c.lanes=w,m===Jo?c.flags|=16384:(a=c.updateQueue,a===null?c.updateQueue=new Set([m]):a.add(m),$d(r,m,w)),!1;case 22:return c.flags|=65536,m===Jo?c.flags|=16384:(a=c.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([m])},c.updateQueue=a):(c=a.retryQueue,c===null?a.retryQueue=new Set([m]):c.add(m)),$d(r,m,w)),!1}throw Error(i(435,c.tag))}return $d(r,m,w),wl(),!1}if(Ke)return a=_n.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=w,m!==Pu&&(r=Error(i(422),{cause:m}),ys(Dn(r,c)))):(m!==Pu&&(a=Error(i(423),{cause:m}),ys(Dn(a,c))),r=r.current.alternate,r.flags|=65536,w&=-w,r.lanes|=w,m=Dn(m,c),w=vd(r.stateNode,m,w),Yu(r,w),vt!==4&&(vt=2)),!1;var k=Error(i(520),{cause:m});if(k=Dn(k,c),Fs===null?Fs=[k]:Fs.push(k),vt!==4&&(vt=2),a===null)return!0;m=Dn(m,c),c=a;do{switch(c.tag){case 3:return c.flags|=65536,r=w&-w,c.lanes|=r,r=vd(c.stateNode,m,r),Yu(c,r),!1;case 1:if(a=c.type,k=c.stateNode,(c.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(Zr===null||!Zr.has(k))))return c.flags|=65536,w&=-w,c.lanes|=w,w=FE(w),PE(w,r,c,m),Yu(c,w),!1}c=c.return}while(c!==null);return!1}var _d=Error(i(461)),At=!1;function Ht(r,a,c,m){a.child=r===null?HS(a,null,c,m):Oi(a,r.child,c,m)}function UE(r,a,c,m,w){c=c.render;var k=a.ref;if("ref"in m){var D={};for(var q in m)q!=="ref"&&(D[q]=m[q])}else D=m;return Ai(a),m=td(r,a,c,D,k,w),q=nd(),r!==null&&!At?(rd(r,a,w),Er(r,a,w)):(Ke&&q&&Bu(a),a.flags|=1,Ht(r,a,m,w),a.child)}function jE(r,a,c,m,w){if(r===null){var k=c.type;return typeof k=="function"&&!Lu(k)&&k.defaultProps===void 0&&c.compare===null?(a.tag=15,a.type=k,zE(r,a,k,m,w)):(r=Wo(c.type,null,m,a,a.mode,w),r.ref=a.ref,r.return=a,a.child=r)}if(k=r.child,!kd(r,w)){var D=k.memoizedProps;if(c=c.compare,c=c!==null?c:ms,c(D,m)&&r.ref===a.ref)return Er(r,a,w)}return a.flags|=1,r=gr(k,m),r.ref=a.ref,r.return=a,a.child=r}function zE(r,a,c,m,w){if(r!==null){var k=r.memoizedProps;if(ms(k,m)&&r.ref===a.ref)if(At=!1,a.pendingProps=m=k,kd(r,w))(r.flags&131072)!==0&&(At=!0);else return a.lanes=r.lanes,Er(r,a,w)}return Sd(r,a,c,m,w)}function HE(r,a,c,m){var w=m.children,k=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((a.flags&128)!==0){if(k=k!==null?k.baseLanes|c:c,r!==null){for(m=a.child=r.child,w=0;m!==null;)w=w|m.lanes|m.childLanes,m=m.sibling;m=w&~k}else m=0,a.child=null;return qE(r,a,k,c,m)}if((c&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Zo(a,k!==null?k.cachePool:null),k!==null?GS(a,k):Zu(),VS(a);else return m=a.lanes=536870912,qE(r,a,k!==null?k.baseLanes|c:c,c,m)}else k!==null?(Zo(a,k.cachePool),GS(a,k),Wr(),a.memoizedState=null):(r!==null&&Zo(a,null),Zu(),Wr());return Ht(r,a,w,c),a.child}function Ns(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function qE(r,a,c,m,w){var k=Gu();return k=k===null?null:{parent:Ct._currentValue,pool:k},a.memoizedState={baseLanes:c,cachePool:k},r!==null&&Zo(a,null),Zu(),VS(a),r!==null&&_a(r,a,m,!0),a.childLanes=w,null}function fl(r,a){return a=ml({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function $E(r,a,c){return Oi(a,r.child,null,c),r=fl(a,a.pendingProps),r.flags|=2,Sn(a),a.memoizedState=null,r}function KD(r,a,c){var m=a.pendingProps,w=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Ke){if(m.mode==="hidden")return r=fl(a,m),a.lanes=536870912,Ns(null,r);if(Ju(a),(r=ct)?(r=nx(r,Fn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Ur!==null?{id:Jn,overflow:er}:null,retryLane:536870912,hydrationErrors:null},c=AS(r),c.return=a,a.child=c,jt=a,ct=null)):r=null,r===null)throw zr(a);return a.lanes=536870912,null}return fl(a,m)}var k=r.memoizedState;if(k!==null){var D=k.dehydrated;if(Ju(a),w)if(a.flags&256)a.flags&=-257,a=$E(r,a,c);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(At||_a(r,a,c,!1),w=(c&r.childLanes)!==0,At||w){if(m=st,m!==null&&(D=D_(m,c),D!==0&&D!==k.retryLane))throw k.retryLane=D,xi(r,D),un(m,r,D),_d;wl(),a=$E(r,a,c)}else r=k.treeContext,ct=Un(D.nextSibling),jt=a,Ke=!0,jr=null,Fn=!1,r!==null&&NS(a,r),a=fl(a,m),a.flags|=4096;return a}return r=gr(r.child,{mode:m.mode,children:m.children}),r.ref=a.ref,a.child=r,r.return=a,r}function pl(r,a){var c=a.ref;if(c===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(i(284));(r===null||r.ref!==c)&&(a.flags|=4194816)}}function Sd(r,a,c,m,w){return Ai(a),c=td(r,a,c,m,void 0,w),m=nd(),r!==null&&!At?(rd(r,a,w),Er(r,a,w)):(Ke&&m&&Bu(a),a.flags|=1,Ht(r,a,c,w),a.child)}function GE(r,a,c,m,w,k){return Ai(a),a.updateQueue=null,c=KS(a,m,c,w),WS(r),m=nd(),r!==null&&!At?(rd(r,a,k),Er(r,a,k)):(Ke&&m&&Bu(a),a.flags|=1,Ht(r,a,c,k),a.child)}function VE(r,a,c,m,w){if(Ai(a),a.stateNode===null){var k=ga,D=c.contextType;typeof D=="object"&&D!==null&&(k=zt(D)),k=new c(m,k),a.memoizedState=k.state!==null&&k.state!==void 0?k.state:null,k.updater=yd,a.stateNode=k,k._reactInternals=a,k=a.stateNode,k.props=m,k.state=a.memoizedState,k.refs={},Wu(a),D=c.contextType,k.context=typeof D=="object"&&D!==null?zt(D):ga,k.state=a.memoizedState,D=c.getDerivedStateFromProps,typeof D=="function"&&(bd(a,c,D,m),k.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof k.getSnapshotBeforeUpdate=="function"||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(D=k.state,typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount(),D!==k.state&&yd.enqueueReplaceState(k,k.state,null),Cs(a,m,k,w),ws(),k.state=a.memoizedState),typeof k.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(r===null){k=a.stateNode;var q=a.memoizedProps,Y=Li(c,q);k.props=Y;var re=k.context,de=c.contextType;D=ga,typeof de=="object"&&de!==null&&(D=zt(de));var pe=c.getDerivedStateFromProps;de=typeof pe=="function"||typeof k.getSnapshotBeforeUpdate=="function",q=a.pendingProps!==q,de||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(q||re!==D)&&IE(a,k,m,D),qr=!1;var ae=a.memoizedState;k.state=ae,Cs(a,m,k,w),ws(),re=a.memoizedState,q||ae!==re||qr?(typeof pe=="function"&&(bd(a,c,pe,m),re=a.memoizedState),(Y=qr||OE(a,c,Y,m,ae,re,D))?(de||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(a.flags|=4194308)):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=re),k.props=m,k.state=re,k.context=D,m=Y):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{k=a.stateNode,Ku(r,a),D=a.memoizedProps,de=Li(c,D),k.props=de,pe=a.pendingProps,ae=k.context,re=c.contextType,Y=ga,typeof re=="object"&&re!==null&&(Y=zt(re)),q=c.getDerivedStateFromProps,(re=typeof q=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(D!==pe||ae!==Y)&&IE(a,k,m,Y),qr=!1,ae=a.memoizedState,k.state=ae,Cs(a,m,k,w),ws();var oe=a.memoizedState;D!==pe||ae!==oe||qr||r!==null&&r.dependencies!==null&&Yo(r.dependencies)?(typeof q=="function"&&(bd(a,c,q,m),oe=a.memoizedState),(de=qr||OE(a,c,de,m,ae,oe,Y)||r!==null&&r.dependencies!==null&&Yo(r.dependencies))?(re||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(m,oe,Y),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(m,oe,Y)),typeof k.componentDidUpdate=="function"&&(a.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof k.componentDidUpdate!="function"||D===r.memoizedProps&&ae===r.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||D===r.memoizedProps&&ae===r.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=oe),k.props=m,k.state=oe,k.context=Y,m=de):(typeof k.componentDidUpdate!="function"||D===r.memoizedProps&&ae===r.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||D===r.memoizedProps&&ae===r.memoizedState||(a.flags|=1024),m=!1)}return k=m,pl(r,a),m=(a.flags&128)!==0,k||m?(k=a.stateNode,c=m&&typeof c.getDerivedStateFromError!="function"?null:k.render(),a.flags|=1,r!==null&&m?(a.child=Oi(a,r.child,null,w),a.child=Oi(a,null,c,w)):Ht(r,a,c,w),a.memoizedState=k.state,r=a.child):r=Er(r,a,w),r}function WE(r,a,c,m){return Ci(),a.flags|=256,Ht(r,a,c,m),a.child}var Ed={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xd(r){return{baseLanes:r,cachePool:BS()}}function wd(r,a,c){return r=r!==null?r.childLanes&~c:0,a&&(r|=xn),r}function KE(r,a,c){var m=a.pendingProps,w=!1,k=(a.flags&128)!==0,D;if((D=k)||(D=r!==null&&r.memoizedState===null?!1:(St.current&2)!==0),D&&(w=!0,a.flags&=-129),D=(a.flags&32)!==0,a.flags&=-33,r===null){if(Ke){if(w?Vr(a):Wr(),(r=ct)?(r=nx(r,Fn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Ur!==null?{id:Jn,overflow:er}:null,retryLane:536870912,hydrationErrors:null},c=AS(r),c.return=a,a.child=c,jt=a,ct=null)):r=null,r===null)throw zr(a);return sh(r)?a.lanes=32:a.lanes=536870912,null}var q=m.children;return m=m.fallback,w?(Wr(),w=a.mode,q=ml({mode:"hidden",children:q},w),m=wi(m,w,c,null),q.return=a,m.return=a,q.sibling=m,a.child=q,m=a.child,m.memoizedState=xd(c),m.childLanes=wd(r,D,c),a.memoizedState=Ed,Ns(null,m)):(Vr(a),Cd(a,q))}var Y=r.memoizedState;if(Y!==null&&(q=Y.dehydrated,q!==null)){if(k)a.flags&256?(Vr(a),a.flags&=-257,a=Td(r,a,c)):a.memoizedState!==null?(Wr(),a.child=r.child,a.flags|=128,a=null):(Wr(),q=m.fallback,w=a.mode,m=ml({mode:"visible",children:m.children},w),q=wi(q,w,c,null),q.flags|=2,m.return=a,q.return=a,m.sibling=q,a.child=m,Oi(a,r.child,null,c),m=a.child,m.memoizedState=xd(c),m.childLanes=wd(r,D,c),a.memoizedState=Ed,a=Ns(null,m));else if(Vr(a),sh(q)){if(D=q.nextSibling&&q.nextSibling.dataset,D)var re=D.dgst;D=re,m=Error(i(419)),m.stack="",m.digest=D,ys({value:m,source:null,stack:null}),a=Td(r,a,c)}else if(At||_a(r,a,c,!1),D=(c&r.childLanes)!==0,At||D){if(D=st,D!==null&&(m=D_(D,c),m!==0&&m!==Y.retryLane))throw Y.retryLane=m,xi(r,m),un(D,r,m),_d;ah(q)||wl(),a=Td(r,a,c)}else ah(q)?(a.flags|=192,a.child=r.child,a=null):(r=Y.treeContext,ct=Un(q.nextSibling),jt=a,Ke=!0,jr=null,Fn=!1,r!==null&&NS(a,r),a=Cd(a,m.children),a.flags|=4096);return a}return w?(Wr(),q=m.fallback,w=a.mode,Y=r.child,re=Y.sibling,m=gr(Y,{mode:"hidden",children:m.children}),m.subtreeFlags=Y.subtreeFlags&65011712,re!==null?q=gr(re,q):(q=wi(q,w,c,null),q.flags|=2),q.return=a,m.return=a,m.sibling=q,a.child=m,Ns(null,m),m=a.child,q=r.child.memoizedState,q===null?q=xd(c):(w=q.cachePool,w!==null?(Y=Ct._currentValue,w=w.parent!==Y?{parent:Y,pool:Y}:w):w=BS(),q={baseLanes:q.baseLanes|c,cachePool:w}),m.memoizedState=q,m.childLanes=wd(r,D,c),a.memoizedState=Ed,Ns(r.child,m)):(Vr(a),c=r.child,r=c.sibling,c=gr(c,{mode:"visible",children:m.children}),c.return=a,c.sibling=null,r!==null&&(D=a.deletions,D===null?(a.deletions=[r],a.flags|=16):D.push(r)),a.child=c,a.memoizedState=null,c)}function Cd(r,a){return a=ml({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function ml(r,a){return r=vn(22,r,null,a),r.lanes=0,r}function Td(r,a,c){return Oi(a,r.child,null,c),r=Cd(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function YE(r,a,c){r.lanes|=a;var m=r.alternate;m!==null&&(m.lanes|=a),zu(r.return,a,c)}function Ad(r,a,c,m,w,k){var D=r.memoizedState;D===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:w,treeForkCount:k}:(D.isBackwards=a,D.rendering=null,D.renderingStartTime=0,D.last=m,D.tail=c,D.tailMode=w,D.treeForkCount=k)}function XE(r,a,c){var m=a.pendingProps,w=m.revealOrder,k=m.tail;m=m.children;var D=St.current,q=(D&2)!==0;if(q?(D=D&1|2,a.flags|=128):D&=1,U(St,D),Ht(r,a,m,c),m=Ke?bs:0,!q&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&YE(r,c,a);else if(r.tag===19)YE(r,c,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(w){case"forwards":for(c=a.child,w=null;c!==null;)r=c.alternate,r!==null&&rl(r)===null&&(w=c),c=c.sibling;c=w,c===null?(w=a.child,a.child=null):(w=c.sibling,c.sibling=null),Ad(a,!1,w,c,k,m);break;case"backwards":case"unstable_legacy-backwards":for(c=null,w=a.child,a.child=null;w!==null;){if(r=w.alternate,r!==null&&rl(r)===null){a.child=w;break}r=w.sibling,w.sibling=c,c=w,w=r}Ad(a,!0,c,null,k,m);break;case"together":Ad(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function Er(r,a,c){if(r!==null&&(a.dependencies=r.dependencies),Xr|=a.lanes,(c&a.childLanes)===0)if(r!==null){if(_a(r,a,c,!1),(c&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,c=gr(r,r.pendingProps),a.child=c,c.return=a;r.sibling!==null;)r=r.sibling,c=c.sibling=gr(r,r.pendingProps),c.return=a;c.sibling=null}return a.child}function kd(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Yo(r)))}function YD(r,a,c){switch(a.tag){case 3:$(a,a.stateNode.containerInfo),Hr(a,Ct,r.memoizedState.cache),Ci();break;case 27:case 5:he(a);break;case 4:$(a,a.stateNode.containerInfo);break;case 10:Hr(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Ju(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(Vr(a),a.flags|=128,null):(c&a.child.childLanes)!==0?KE(r,a,c):(Vr(a),r=Er(r,a,c),r!==null?r.sibling:null);Vr(a);break;case 19:var w=(r.flags&128)!==0;if(m=(c&a.childLanes)!==0,m||(_a(r,a,c,!1),m=(c&a.childLanes)!==0),w){if(m)return XE(r,a,c);a.flags|=128}if(w=a.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),U(St,St.current),m)break;return null;case 22:return a.lanes=0,HE(r,a,c,a.pendingProps);case 24:Hr(a,Ct,r.memoizedState.cache)}return Er(r,a,c)}function ZE(r,a,c){if(r!==null)if(r.memoizedProps!==a.pendingProps)At=!0;else{if(!kd(r,c)&&(a.flags&128)===0)return At=!1,YD(r,a,c);At=(r.flags&131072)!==0}else At=!1,Ke&&(a.flags&1048576)!==0&&RS(a,bs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(r=Ri(a.elementType),a.type=r,typeof r=="function")Lu(r)?(m=Li(r,m),a.tag=1,a=VE(null,a,r,m,c)):(a.tag=0,a=Sd(null,a,r,m,c));else{if(r!=null){var w=r.$$typeof;if(w===C){a.tag=11,a=UE(null,a,r,m,c);break e}else if(w===O){a.tag=14,a=jE(null,a,r,m,c);break e}}throw a=G(r)||r,Error(i(306,a,""))}}return a;case 0:return Sd(r,a,a.type,a.pendingProps,c);case 1:return m=a.type,w=Li(m,a.pendingProps),VE(r,a,m,w,c);case 3:e:{if($(a,a.stateNode.containerInfo),r===null)throw Error(i(387));m=a.pendingProps;var k=a.memoizedState;w=k.element,Ku(r,a),Cs(a,m,null,c);var D=a.memoizedState;if(m=D.cache,Hr(a,Ct,m),m!==k.cache&&Hu(a,[Ct],c,!0),ws(),m=D.element,k.isDehydrated)if(k={element:m,isDehydrated:!1,cache:D.cache},a.updateQueue.baseState=k,a.memoizedState=k,a.flags&256){a=WE(r,a,m,c);break e}else if(m!==w){w=Dn(Error(i(424)),a),ys(w),a=WE(r,a,m,c);break e}else{switch(r=a.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(ct=Un(r.firstChild),jt=a,Ke=!0,jr=null,Fn=!0,c=HS(a,null,m,c),a.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(Ci(),m===w){a=Er(r,a,c);break e}Ht(r,a,m,c)}a=a.child}return a;case 26:return pl(r,a),r===null?(c=lx(a.type,null,a.pendingProps,null))?a.memoizedState=c:Ke||(c=a.type,r=a.pendingProps,m=Ol(ue.current).createElement(c),m[Ut]=a,m[rn]=r,qt(m,c,r),Ft(m),a.stateNode=m):a.memoizedState=lx(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return he(a),r===null&&Ke&&(m=a.stateNode=ax(a.type,a.pendingProps,ue.current),jt=a,Fn=!0,w=ct,ti(a.type)?(oh=w,ct=Un(m.firstChild)):ct=w),Ht(r,a,a.pendingProps.children,c),pl(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Ke&&((w=m=ct)&&(m=C2(m,a.type,a.pendingProps,Fn),m!==null?(a.stateNode=m,jt=a,ct=Un(m.firstChild),Fn=!1,w=!0):w=!1),w||zr(a)),he(a),w=a.type,k=a.pendingProps,D=r!==null?r.memoizedProps:null,m=k.children,nh(w,k)?m=null:D!==null&&nh(w,D)&&(a.flags|=32),a.memoizedState!==null&&(w=td(r,a,jD,null,null,c),Gs._currentValue=w),pl(r,a),Ht(r,a,m,c),a.child;case 6:return r===null&&Ke&&((r=c=ct)&&(c=T2(c,a.pendingProps,Fn),c!==null?(a.stateNode=c,jt=a,ct=null,r=!0):r=!1),r||zr(a)),null;case 13:return KE(r,a,c);case 4:return $(a,a.stateNode.containerInfo),m=a.pendingProps,r===null?a.child=Oi(a,null,m,c):Ht(r,a,m,c),a.child;case 11:return UE(r,a,a.type,a.pendingProps,c);case 7:return Ht(r,a,a.pendingProps,c),a.child;case 8:return Ht(r,a,a.pendingProps.children,c),a.child;case 12:return Ht(r,a,a.pendingProps.children,c),a.child;case 10:return m=a.pendingProps,Hr(a,a.type,m.value),Ht(r,a,m.children,c),a.child;case 9:return w=a.type._context,m=a.pendingProps.children,Ai(a),w=zt(w),m=m(w),a.flags|=1,Ht(r,a,m,c),a.child;case 14:return jE(r,a,a.type,a.pendingProps,c);case 15:return zE(r,a,a.type,a.pendingProps,c);case 19:return XE(r,a,c);case 31:return KD(r,a,c);case 22:return HE(r,a,c,a.pendingProps);case 24:return Ai(a),m=zt(Ct),r===null?(w=Gu(),w===null&&(w=st,k=qu(),w.pooledCache=k,k.refCount++,k!==null&&(w.pooledCacheLanes|=c),w=k),a.memoizedState={parent:m,cache:w},Wu(a),Hr(a,Ct,w)):((r.lanes&c)!==0&&(Ku(r,a),Cs(a,null,null,c),ws()),w=r.memoizedState,k=a.memoizedState,w.parent!==m?(w={parent:m,cache:m},a.memoizedState=w,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=w),Hr(a,Ct,m)):(m=k.cache,Hr(a,Ct,m),m!==w.cache&&Hu(a,[Ct],c,!0))),Ht(r,a,a.pendingProps.children,c),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function xr(r){r.flags|=4}function Rd(r,a,c,m,w){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(w&335544128)===w)if(r.stateNode.complete)r.flags|=8192;else if(w0())r.flags|=8192;else throw Ni=Jo,Vu}else r.flags&=-16777217}function QE(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!fx(a))if(w0())r.flags|=8192;else throw Ni=Jo,Vu}function gl(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?O_():536870912,r.lanes|=a,Ia|=a)}function Os(r,a){if(!Ke)switch(r.tailMode){case"hidden":a=r.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r.tail=null:c.sibling=null;break;case"collapsed":c=r.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:m.sibling=null}}function ut(r){var a=r.alternate!==null&&r.alternate.child===r.child,c=0,m=0;if(a)for(var w=r.child;w!==null;)c|=w.lanes|w.childLanes,m|=w.subtreeFlags&65011712,m|=w.flags&65011712,w.return=r,w=w.sibling;else for(w=r.child;w!==null;)c|=w.lanes|w.childLanes,m|=w.subtreeFlags,m|=w.flags,w.return=r,w=w.sibling;return r.subtreeFlags|=m,r.childLanes=c,a}function XD(r,a,c){var m=a.pendingProps;switch(Fu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(a),null;case 1:return ut(a),null;case 3:return c=a.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),vr(Ct),ie(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(va(a)?xr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Uu())),ut(a),null;case 26:var w=a.type,k=a.memoizedState;return r===null?(xr(a),k!==null?(ut(a),QE(a,k)):(ut(a),Rd(a,w,null,m,c))):k?k!==r.memoizedState?(xr(a),ut(a),QE(a,k)):(ut(a),a.flags&=-16777217):(r=r.memoizedProps,r!==m&&xr(a),ut(a),Rd(a,w,r,m,c)),null;case 27:if(be(a),c=ue.current,w=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==m&&xr(a);else{if(!m){if(a.stateNode===null)throw Error(i(166));return ut(a),null}r=ee.current,va(a)?OS(a):(r=ax(w,m,c),a.stateNode=r,xr(a))}return ut(a),null;case 5:if(be(a),w=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==m&&xr(a);else{if(!m){if(a.stateNode===null)throw Error(i(166));return ut(a),null}if(k=ee.current,va(a))OS(a);else{var D=Ol(ue.current);switch(k){case 1:k=D.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:k=D.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":k=D.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":k=D.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":k=D.createElement("div"),k.innerHTML="<script><\/script>",k=k.removeChild(k.firstChild);break;case"select":k=typeof m.is=="string"?D.createElement("select",{is:m.is}):D.createElement("select"),m.multiple?k.multiple=!0:m.size&&(k.size=m.size);break;default:k=typeof m.is=="string"?D.createElement(w,{is:m.is}):D.createElement(w)}}k[Ut]=a,k[rn]=m;e:for(D=a.child;D!==null;){if(D.tag===5||D.tag===6)k.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===a)break e;for(;D.sibling===null;){if(D.return===null||D.return===a)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}a.stateNode=k;e:switch(qt(k,w,m),w){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&xr(a)}}return ut(a),Rd(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,c),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==m&&xr(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(i(166));if(r=ue.current,va(a)){if(r=a.stateNode,c=a.memoizedProps,m=null,w=jt,w!==null)switch(w.tag){case 27:case 5:m=w.memoizedProps}r[Ut]=a,r=!!(r.nodeValue===c||m!==null&&m.suppressHydrationWarning===!0||K0(r.nodeValue,c)),r||zr(a,!0)}else r=Ol(r).createTextNode(m),r[Ut]=a,a.stateNode=r}return ut(a),null;case 31:if(c=a.memoizedState,r===null||r.memoizedState!==null){if(m=va(a),c!==null){if(r===null){if(!m)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Ut]=a}else Ci(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ut(a),r=!1}else c=Uu(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=c),r=!0;if(!r)return a.flags&256?(Sn(a),a):(Sn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return ut(a),null;case 13:if(m=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(w=va(a),m!==null&&m.dehydrated!==null){if(r===null){if(!w)throw Error(i(318));if(w=a.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(i(317));w[Ut]=a}else Ci(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ut(a),w=!1}else w=Uu(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=w),w=!0;if(!w)return a.flags&256?(Sn(a),a):(Sn(a),null)}return Sn(a),(a.flags&128)!==0?(a.lanes=c,a):(c=m!==null,r=r!==null&&r.memoizedState!==null,c&&(m=a.child,w=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(w=m.alternate.memoizedState.cachePool.pool),k=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(k=m.memoizedState.cachePool.pool),k!==w&&(m.flags|=2048)),c!==r&&c&&(a.child.flags|=8192),gl(a,a.updateQueue),ut(a),null);case 4:return ie(),r===null&&Zd(a.stateNode.containerInfo),ut(a),null;case 10:return vr(a.type),ut(a),null;case 19:if(H(St),m=a.memoizedState,m===null)return ut(a),null;if(w=(a.flags&128)!==0,k=m.rendering,k===null)if(w)Os(m,!1);else{if(vt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(k=rl(r),k!==null){for(a.flags|=128,Os(m,!1),r=k.updateQueue,a.updateQueue=r,gl(a,r),a.subtreeFlags=0,r=c,c=a.child;c!==null;)TS(c,r),c=c.sibling;return U(St,St.current&1|2),Ke&&br(a,m.treeForkCount),a.child}r=r.sibling}m.tail!==null&&Oe()>Sl&&(a.flags|=128,w=!0,Os(m,!1),a.lanes=4194304)}else{if(!w)if(r=rl(k),r!==null){if(a.flags|=128,w=!0,r=r.updateQueue,a.updateQueue=r,gl(a,r),Os(m,!0),m.tail===null&&m.tailMode==="hidden"&&!k.alternate&&!Ke)return ut(a),null}else 2*Oe()-m.renderingStartTime>Sl&&c!==536870912&&(a.flags|=128,w=!0,Os(m,!1),a.lanes=4194304);m.isBackwards?(k.sibling=a.child,a.child=k):(r=m.last,r!==null?r.sibling=k:a.child=k,m.last=k)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=Oe(),r.sibling=null,c=St.current,U(St,w?c&1|2:c&1),Ke&&br(a,m.treeForkCount),r):(ut(a),null);case 22:case 23:return Sn(a),Qu(),m=a.memoizedState!==null,r!==null?r.memoizedState!==null!==m&&(a.flags|=8192):m&&(a.flags|=8192),m?(c&536870912)!==0&&(a.flags&128)===0&&(ut(a),a.subtreeFlags&6&&(a.flags|=8192)):ut(a),c=a.updateQueue,c!==null&&gl(a,c.retryQueue),c=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==c&&(a.flags|=2048),r!==null&&H(ki),null;case 24:return c=null,r!==null&&(c=r.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),vr(Ct),ut(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function ZD(r,a){switch(Fu(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return vr(Ct),ie(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return be(a),null;case 31:if(a.memoizedState!==null){if(Sn(a),a.alternate===null)throw Error(i(340));Ci()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(Sn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ci()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return H(St),null;case 4:return ie(),null;case 10:return vr(a.type),null;case 22:case 23:return Sn(a),Qu(),r!==null&&H(ki),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return vr(Ct),null;case 25:return null;default:return null}}function JE(r,a){switch(Fu(a),a.tag){case 3:vr(Ct),ie();break;case 26:case 27:case 5:be(a);break;case 4:ie();break;case 31:a.memoizedState!==null&&Sn(a);break;case 13:Sn(a);break;case 19:H(St);break;case 10:vr(a.type);break;case 22:case 23:Sn(a),Qu(),r!==null&&H(ki);break;case 24:vr(Ct)}}function Is(r,a){try{var c=a.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var w=m.next;c=w;do{if((c.tag&r)===r){m=void 0;var k=c.create,D=c.inst;m=k(),D.destroy=m}c=c.next}while(c!==w)}}catch(q){tt(a,a.return,q)}}function Kr(r,a,c){try{var m=a.updateQueue,w=m!==null?m.lastEffect:null;if(w!==null){var k=w.next;m=k;do{if((m.tag&r)===r){var D=m.inst,q=D.destroy;if(q!==void 0){D.destroy=void 0,w=a;var Y=c,re=q;try{re()}catch(de){tt(w,Y,de)}}}m=m.next}while(m!==k)}}catch(de){tt(a,a.return,de)}}function e0(r){var a=r.updateQueue;if(a!==null){var c=r.stateNode;try{$S(a,c)}catch(m){tt(r,r.return,m)}}}function t0(r,a,c){c.props=Li(r.type,r.memoizedProps),c.state=r.memoizedState;try{c.componentWillUnmount()}catch(m){tt(r,a,m)}}function Ls(r,a){try{var c=r.ref;if(c!==null){switch(r.tag){case 26:case 27:case 5:var m=r.stateNode;break;case 30:m=r.stateNode;break;default:m=r.stateNode}typeof c=="function"?r.refCleanup=c(m):c.current=m}}catch(w){tt(r,a,w)}}function tr(r,a){var c=r.ref,m=r.refCleanup;if(c!==null)if(typeof m=="function")try{m()}catch(w){tt(r,a,w)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(w){tt(r,a,w)}else c.current=null}function n0(r){var a=r.type,c=r.memoizedProps,m=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":c.autoFocus&&m.focus();break e;case"img":c.src?m.src=c.src:c.srcSet&&(m.srcset=c.srcSet)}}catch(w){tt(r,r.return,w)}}function Nd(r,a,c){try{var m=r.stateNode;v2(m,r.type,c,a),m[rn]=a}catch(w){tt(r,r.return,w)}}function r0(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&ti(r.type)||r.tag===4}function Od(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||r0(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&ti(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Id(r,a,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,a?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(r,a):(a=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,a.appendChild(r),c=c._reactRootContainer,c!=null||a.onclick!==null||(a.onclick=pr));else if(m!==4&&(m===27&&ti(r.type)&&(c=r.stateNode,a=null),r=r.child,r!==null))for(Id(r,a,c),r=r.sibling;r!==null;)Id(r,a,c),r=r.sibling}function bl(r,a,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,a?c.insertBefore(r,a):c.appendChild(r);else if(m!==4&&(m===27&&ti(r.type)&&(c=r.stateNode),r=r.child,r!==null))for(bl(r,a,c),r=r.sibling;r!==null;)bl(r,a,c),r=r.sibling}function i0(r){var a=r.stateNode,c=r.memoizedProps;try{for(var m=r.type,w=a.attributes;w.length;)a.removeAttributeNode(w[0]);qt(a,m,c),a[Ut]=r,a[rn]=c}catch(k){tt(r,r.return,k)}}var wr=!1,kt=!1,Ld=!1,a0=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function QD(r,a){if(r=r.containerInfo,eh=Pl,r=bS(r),Tu(r)){if("selectionStart"in r)var c={start:r.selectionStart,end:r.selectionEnd};else e:{c=(c=r.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var w=m.anchorOffset,k=m.focusNode;m=m.focusOffset;try{c.nodeType,k.nodeType}catch{c=null;break e}var D=0,q=-1,Y=-1,re=0,de=0,pe=r,ae=null;t:for(;;){for(var oe;pe!==c||w!==0&&pe.nodeType!==3||(q=D+w),pe!==k||m!==0&&pe.nodeType!==3||(Y=D+m),pe.nodeType===3&&(D+=pe.nodeValue.length),(oe=pe.firstChild)!==null;)ae=pe,pe=oe;for(;;){if(pe===r)break t;if(ae===c&&++re===w&&(q=D),ae===k&&++de===m&&(Y=D),(oe=pe.nextSibling)!==null)break;pe=ae,ae=pe.parentNode}pe=oe}c=q===-1||Y===-1?null:{start:q,end:Y}}else c=null}c=c||{start:0,end:0}}else c=null;for(th={focusedElem:r,selectionRange:c},Pl=!1,Pt=a;Pt!==null;)if(a=Pt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,Pt=r;else for(;Pt!==null;){switch(a=Pt,k=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(c=0;c<r.length;c++)w=r[c],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&k!==null){r=void 0,c=a,w=k.memoizedProps,k=k.memoizedState,m=c.stateNode;try{var _e=Li(c.type,w);r=m.getSnapshotBeforeUpdate(_e,k),m.__reactInternalSnapshotBeforeUpdate=r}catch(ke){tt(c,c.return,ke)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,c=r.nodeType,c===9)ih(r);else if(c===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":ih(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,Pt=r;break}Pt=a.return}}function s0(r,a,c){var m=c.flags;switch(c.tag){case 0:case 11:case 15:Tr(r,c),m&4&&Is(5,c);break;case 1:if(Tr(r,c),m&4)if(r=c.stateNode,a===null)try{r.componentDidMount()}catch(D){tt(c,c.return,D)}else{var w=Li(c.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(w,a,r.__reactInternalSnapshotBeforeUpdate)}catch(D){tt(c,c.return,D)}}m&64&&e0(c),m&512&&Ls(c,c.return);break;case 3:if(Tr(r,c),m&64&&(r=c.updateQueue,r!==null)){if(a=null,c.child!==null)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{$S(r,a)}catch(D){tt(c,c.return,D)}}break;case 27:a===null&&m&4&&i0(c);case 26:case 5:Tr(r,c),a===null&&m&4&&n0(c),m&512&&Ls(c,c.return);break;case 12:Tr(r,c);break;case 31:Tr(r,c),m&4&&c0(r,c);break;case 13:Tr(r,c),m&4&&u0(r,c),m&64&&(r=c.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(c=o2.bind(null,c),A2(r,c))));break;case 22:if(m=c.memoizedState!==null||wr,!m){a=a!==null&&a.memoizedState!==null||kt,w=wr;var k=kt;wr=m,(kt=a)&&!k?Ar(r,c,(c.subtreeFlags&8772)!==0):Tr(r,c),wr=w,kt=k}break;case 30:break;default:Tr(r,c)}}function o0(r){var a=r.alternate;a!==null&&(r.alternate=null,o0(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&cu(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var ht=null,sn=!1;function Cr(r,a,c){for(c=c.child;c!==null;)l0(r,a,c),c=c.sibling}function l0(r,a,c){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(mt,c)}catch{}switch(c.tag){case 26:kt||tr(c,a),Cr(r,a,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:kt||tr(c,a);var m=ht,w=sn;ti(c.type)&&(ht=c.stateNode,sn=!1),Cr(r,a,c),Hs(c.stateNode),ht=m,sn=w;break;case 5:kt||tr(c,a);case 6:if(m=ht,w=sn,ht=null,Cr(r,a,c),ht=m,sn=w,ht!==null)if(sn)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(c.stateNode)}catch(k){tt(c,a,k)}else try{ht.removeChild(c.stateNode)}catch(k){tt(c,a,k)}break;case 18:ht!==null&&(sn?(r=ht,ex(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,c.stateNode),ja(r)):ex(ht,c.stateNode));break;case 4:m=ht,w=sn,ht=c.stateNode.containerInfo,sn=!0,Cr(r,a,c),ht=m,sn=w;break;case 0:case 11:case 14:case 15:Kr(2,c,a),kt||Kr(4,c,a),Cr(r,a,c);break;case 1:kt||(tr(c,a),m=c.stateNode,typeof m.componentWillUnmount=="function"&&t0(c,a,m)),Cr(r,a,c);break;case 21:Cr(r,a,c);break;case 22:kt=(m=kt)||c.memoizedState!==null,Cr(r,a,c),kt=m;break;default:Cr(r,a,c)}}function c0(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ja(r)}catch(c){tt(a,a.return,c)}}}function u0(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ja(r)}catch(c){tt(a,a.return,c)}}function JD(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new a0),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new a0),a;default:throw Error(i(435,r.tag))}}function yl(r,a){var c=JD(r);a.forEach(function(m){if(!c.has(m)){c.add(m);var w=l2.bind(null,r,m);m.then(w,w)}})}function on(r,a){var c=a.deletions;if(c!==null)for(var m=0;m<c.length;m++){var w=c[m],k=r,D=a,q=D;e:for(;q!==null;){switch(q.tag){case 27:if(ti(q.type)){ht=q.stateNode,sn=!1;break e}break;case 5:ht=q.stateNode,sn=!1;break e;case 3:case 4:ht=q.stateNode.containerInfo,sn=!0;break e}q=q.return}if(ht===null)throw Error(i(160));l0(k,D,w),ht=null,sn=!1,k=w.alternate,k!==null&&(k.return=null),w.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)d0(a,r),a=a.sibling}var Gn=null;function d0(r,a){var c=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:on(a,r),ln(r),m&4&&(Kr(3,r,r.return),Is(3,r),Kr(5,r,r.return));break;case 1:on(a,r),ln(r),m&512&&(kt||c===null||tr(c,c.return)),m&64&&wr&&(r=r.updateQueue,r!==null&&(m=r.callbacks,m!==null&&(c=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=c===null?m:c.concat(m))));break;case 26:var w=Gn;if(on(a,r),ln(r),m&512&&(kt||c===null||tr(c,c.return)),m&4){var k=c!==null?c.memoizedState:null;if(m=r.memoizedState,c===null)if(m===null)if(r.stateNode===null){e:{m=r.type,c=r.memoizedProps,w=w.ownerDocument||w;t:switch(m){case"title":k=w.getElementsByTagName("title")[0],(!k||k[ss]||k[Ut]||k.namespaceURI==="http://www.w3.org/2000/svg"||k.hasAttribute("itemprop"))&&(k=w.createElement(m),w.head.insertBefore(k,w.querySelector("head > title"))),qt(k,m,c),k[Ut]=r,Ft(k),m=k;break e;case"link":var D=dx("link","href",w).get(m+(c.href||""));if(D){for(var q=0;q<D.length;q++)if(k=D[q],k.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&k.getAttribute("rel")===(c.rel==null?null:c.rel)&&k.getAttribute("title")===(c.title==null?null:c.title)&&k.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){D.splice(q,1);break t}}k=w.createElement(m),qt(k,m,c),w.head.appendChild(k);break;case"meta":if(D=dx("meta","content",w).get(m+(c.content||""))){for(q=0;q<D.length;q++)if(k=D[q],k.getAttribute("content")===(c.content==null?null:""+c.content)&&k.getAttribute("name")===(c.name==null?null:c.name)&&k.getAttribute("property")===(c.property==null?null:c.property)&&k.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&k.getAttribute("charset")===(c.charSet==null?null:c.charSet)){D.splice(q,1);break t}}k=w.createElement(m),qt(k,m,c),w.head.appendChild(k);break;default:throw Error(i(468,m))}k[Ut]=r,Ft(k),m=k}r.stateNode=m}else hx(w,r.type,r.stateNode);else r.stateNode=ux(w,m,r.memoizedProps);else k!==m?(k===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):k.count--,m===null?hx(w,r.type,r.stateNode):ux(w,m,r.memoizedProps)):m===null&&r.stateNode!==null&&Nd(r,r.memoizedProps,c.memoizedProps)}break;case 27:on(a,r),ln(r),m&512&&(kt||c===null||tr(c,c.return)),c!==null&&m&4&&Nd(r,r.memoizedProps,c.memoizedProps);break;case 5:if(on(a,r),ln(r),m&512&&(kt||c===null||tr(c,c.return)),r.flags&32){w=r.stateNode;try{ca(w,"")}catch(_e){tt(r,r.return,_e)}}m&4&&r.stateNode!=null&&(w=r.memoizedProps,Nd(r,w,c!==null?c.memoizedProps:w)),m&1024&&(Ld=!0);break;case 6:if(on(a,r),ln(r),m&4){if(r.stateNode===null)throw Error(i(162));m=r.memoizedProps,c=r.stateNode;try{c.nodeValue=m}catch(_e){tt(r,r.return,_e)}}break;case 3:if(Dl=null,w=Gn,Gn=Il(a.containerInfo),on(a,r),Gn=w,ln(r),m&4&&c!==null&&c.memoizedState.isDehydrated)try{ja(a.containerInfo)}catch(_e){tt(r,r.return,_e)}Ld&&(Ld=!1,h0(r));break;case 4:m=Gn,Gn=Il(r.stateNode.containerInfo),on(a,r),ln(r),Gn=m;break;case 12:on(a,r),ln(r);break;case 31:on(a,r),ln(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,yl(r,m)));break;case 13:on(a,r),ln(r),r.child.flags&8192&&r.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(_l=Oe()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,yl(r,m)));break;case 22:w=r.memoizedState!==null;var Y=c!==null&&c.memoizedState!==null,re=wr,de=kt;if(wr=re||w,kt=de||Y,on(a,r),kt=de,wr=re,ln(r),m&8192)e:for(a=r.stateNode,a._visibility=w?a._visibility&-2:a._visibility|1,w&&(c===null||Y||wr||kt||Di(r)),c=null,a=r;;){if(a.tag===5||a.tag===26){if(c===null){Y=c=a;try{if(k=Y.stateNode,w)D=k.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{q=Y.stateNode;var pe=Y.memoizedProps.style,ae=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;q.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(_e){tt(Y,Y.return,_e)}}}else if(a.tag===6){if(c===null){Y=a;try{Y.stateNode.nodeValue=w?"":Y.memoizedProps}catch(_e){tt(Y,Y.return,_e)}}}else if(a.tag===18){if(c===null){Y=a;try{var oe=Y.stateNode;w?tx(oe,!0):tx(Y.stateNode,!1)}catch(_e){tt(Y,Y.return,_e)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;c===a&&(c=null),a=a.return}c===a&&(c=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=r.updateQueue,m!==null&&(c=m.retryQueue,c!==null&&(m.retryQueue=null,yl(r,c))));break;case 19:on(a,r),ln(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,yl(r,m)));break;case 30:break;case 21:break;default:on(a,r),ln(r)}}function ln(r){var a=r.flags;if(a&2){try{for(var c,m=r.return;m!==null;){if(r0(m)){c=m;break}m=m.return}if(c==null)throw Error(i(160));switch(c.tag){case 27:var w=c.stateNode,k=Od(r);bl(r,k,w);break;case 5:var D=c.stateNode;c.flags&32&&(ca(D,""),c.flags&=-33);var q=Od(r);bl(r,q,D);break;case 3:case 4:var Y=c.stateNode.containerInfo,re=Od(r);Id(r,re,Y);break;default:throw Error(i(161))}}catch(de){tt(r,r.return,de)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function h0(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;h0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Tr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)s0(r,a.alternate,a),a=a.sibling}function Di(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Kr(4,a,a.return),Di(a);break;case 1:tr(a,a.return);var c=a.stateNode;typeof c.componentWillUnmount=="function"&&t0(a,a.return,c),Di(a);break;case 27:Hs(a.stateNode);case 26:case 5:tr(a,a.return),Di(a);break;case 22:a.memoizedState===null&&Di(a);break;case 30:Di(a);break;default:Di(a)}r=r.sibling}}function Ar(r,a,c){for(c=c&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,w=r,k=a,D=k.flags;switch(k.tag){case 0:case 11:case 15:Ar(w,k,c),Is(4,k);break;case 1:if(Ar(w,k,c),m=k,w=m.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(re){tt(m,m.return,re)}if(m=k,w=m.updateQueue,w!==null){var q=m.stateNode;try{var Y=w.shared.hiddenCallbacks;if(Y!==null)for(w.shared.hiddenCallbacks=null,w=0;w<Y.length;w++)qS(Y[w],q)}catch(re){tt(m,m.return,re)}}c&&D&64&&e0(k),Ls(k,k.return);break;case 27:i0(k);case 26:case 5:Ar(w,k,c),c&&m===null&&D&4&&n0(k),Ls(k,k.return);break;case 12:Ar(w,k,c);break;case 31:Ar(w,k,c),c&&D&4&&c0(w,k);break;case 13:Ar(w,k,c),c&&D&4&&u0(w,k);break;case 22:k.memoizedState===null&&Ar(w,k,c),Ls(k,k.return);break;case 30:break;default:Ar(w,k,c)}a=a.sibling}}function Dd(r,a){var c=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==c&&(r!=null&&r.refCount++,c!=null&&vs(c))}function Md(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&vs(r))}function Vn(r,a,c,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)f0(r,a,c,m),a=a.sibling}function f0(r,a,c,m){var w=a.flags;switch(a.tag){case 0:case 11:case 15:Vn(r,a,c,m),w&2048&&Is(9,a);break;case 1:Vn(r,a,c,m);break;case 3:Vn(r,a,c,m),w&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&vs(r)));break;case 12:if(w&2048){Vn(r,a,c,m),r=a.stateNode;try{var k=a.memoizedProps,D=k.id,q=k.onPostCommit;typeof q=="function"&&q(D,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(Y){tt(a,a.return,Y)}}else Vn(r,a,c,m);break;case 31:Vn(r,a,c,m);break;case 13:Vn(r,a,c,m);break;case 23:break;case 22:k=a.stateNode,D=a.alternate,a.memoizedState!==null?k._visibility&2?Vn(r,a,c,m):Ds(r,a):k._visibility&2?Vn(r,a,c,m):(k._visibility|=2,Ra(r,a,c,m,(a.subtreeFlags&10256)!==0||!1)),w&2048&&Dd(D,a);break;case 24:Vn(r,a,c,m),w&2048&&Md(a.alternate,a);break;default:Vn(r,a,c,m)}}function Ra(r,a,c,m,w){for(w=w&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var k=r,D=a,q=c,Y=m,re=D.flags;switch(D.tag){case 0:case 11:case 15:Ra(k,D,q,Y,w),Is(8,D);break;case 23:break;case 22:var de=D.stateNode;D.memoizedState!==null?de._visibility&2?Ra(k,D,q,Y,w):Ds(k,D):(de._visibility|=2,Ra(k,D,q,Y,w)),w&&re&2048&&Dd(D.alternate,D);break;case 24:Ra(k,D,q,Y,w),w&&re&2048&&Md(D.alternate,D);break;default:Ra(k,D,q,Y,w)}a=a.sibling}}function Ds(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var c=r,m=a,w=m.flags;switch(m.tag){case 22:Ds(c,m),w&2048&&Dd(m.alternate,m);break;case 24:Ds(c,m),w&2048&&Md(m.alternate,m);break;default:Ds(c,m)}a=a.sibling}}var Ms=8192;function Na(r,a,c){if(r.subtreeFlags&Ms)for(r=r.child;r!==null;)p0(r,a,c),r=r.sibling}function p0(r,a,c){switch(r.tag){case 26:Na(r,a,c),r.flags&Ms&&r.memoizedState!==null&&U2(c,Gn,r.memoizedState,r.memoizedProps);break;case 5:Na(r,a,c);break;case 3:case 4:var m=Gn;Gn=Il(r.stateNode.containerInfo),Na(r,a,c),Gn=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=Ms,Ms=16777216,Na(r,a,c),Ms=m):Na(r,a,c));break;default:Na(r,a,c)}}function m0(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function Bs(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var m=a[c];Pt=m,b0(m,r)}m0(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)g0(r),r=r.sibling}function g0(r){switch(r.tag){case 0:case 11:case 15:Bs(r),r.flags&2048&&Kr(9,r,r.return);break;case 3:Bs(r);break;case 12:Bs(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,vl(r)):Bs(r);break;default:Bs(r)}}function vl(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var m=a[c];Pt=m,b0(m,r)}m0(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Kr(8,a,a.return),vl(a);break;case 22:c=a.stateNode,c._visibility&2&&(c._visibility&=-3,vl(a));break;default:vl(a)}r=r.sibling}}function b0(r,a){for(;Pt!==null;){var c=Pt;switch(c.tag){case 0:case 11:case 15:Kr(8,c,a);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var m=c.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:vs(c.memoizedState.cache)}if(m=c.child,m!==null)m.return=c,Pt=m;else e:for(c=r;Pt!==null;){m=Pt;var w=m.sibling,k=m.return;if(o0(m),m===c){Pt=null;break e}if(w!==null){w.return=k,Pt=w;break e}Pt=k}}}var e2={getCacheForType:function(r){var a=zt(Ct),c=a.data.get(r);return c===void 0&&(c=r(),a.data.set(r,c)),c},cacheSignal:function(){return zt(Ct).controller.signal}},t2=typeof WeakMap=="function"?WeakMap:Map,Qe=0,st=null,qe=null,Ve=0,et=0,En=null,Yr=!1,Oa=!1,Bd=!1,kr=0,vt=0,Xr=0,Mi=0,Fd=0,xn=0,Ia=0,Fs=null,cn=null,Pd=!1,_l=0,y0=0,Sl=1/0,El=null,Zr=null,It=0,Qr=null,La=null,Rr=0,Ud=0,jd=null,v0=null,Ps=0,zd=null;function wn(){return(Qe&2)!==0&&Ve!==0?Ve&-Ve:W.T!==null?Wd():M_()}function _0(){if(xn===0)if((Ve&536870912)===0||Ke){var r=Zn;Zn<<=1,(Zn&3932160)===0&&(Zn=262144),xn=r}else xn=536870912;return r=_n.current,r!==null&&(r.flags|=32),xn}function un(r,a,c){(r===st&&(et===2||et===9)||r.cancelPendingCommit!==null)&&(Da(r,0),Jr(r,Ve,xn,!1)),as(r,c),((Qe&2)===0||r!==st)&&(r===st&&((Qe&2)===0&&(Mi|=c),vt===4&&Jr(r,Ve,xn,!1)),nr(r))}function S0(r,a,c){if((Qe&6)!==0)throw Error(i(327));var m=!c&&(a&127)===0&&(a&r.expiredLanes)===0||Br(r,a),w=m?i2(r,a):qd(r,a,!0),k=m;do{if(w===0){Oa&&!m&&Jr(r,a,0,!1);break}else{if(c=r.current.alternate,k&&!n2(c)){w=qd(r,a,!1),k=!1;continue}if(w===2){if(k=a,r.errorRecoveryDisabledLanes&k)var D=0;else D=r.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){a=D;e:{var q=r;w=Fs;var Y=q.current.memoizedState.isDehydrated;if(Y&&(Da(q,D).flags|=256),D=qd(q,D,!1),D!==2){if(Bd&&!Y){q.errorRecoveryDisabledLanes|=k,Mi|=k,w=4;break e}k=cn,cn=w,k!==null&&(cn===null?cn=k:cn.push.apply(cn,k))}w=D}if(k=!1,w!==2)continue}}if(w===1){Da(r,0),Jr(r,a,0,!0);break}e:{switch(m=r,k=w,k){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Jr(m,a,xn,!Yr);break e;case 2:cn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(w=_l+300-Oe(),10<w)){if(Jr(m,a,xn,!Yr),yi(m,0,!0)!==0)break e;Rr=a,m.timeoutHandle=Q0(E0.bind(null,m,c,cn,El,Pd,a,xn,Mi,Ia,Yr,k,"Throttled",-0,0),w);break e}E0(m,c,cn,El,Pd,a,xn,Mi,Ia,Yr,k,null,-0,0)}}break}while(!0);nr(r)}function E0(r,a,c,m,w,k,D,q,Y,re,de,pe,ae,oe){if(r.timeoutHandle=-1,pe=a.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pr},p0(a,k,pe);var _e=(k&62914560)===k?_l-Oe():(k&4194048)===k?y0-Oe():0;if(_e=j2(pe,_e),_e!==null){Rr=k,r.cancelPendingCommit=_e(N0.bind(null,r,a,k,c,m,w,D,q,Y,de,pe,null,ae,oe)),Jr(r,k,D,!re);return}}N0(r,a,k,c,m,w,D,q,Y)}function n2(r){for(var a=r;;){var c=a.tag;if((c===0||c===11||c===15)&&a.flags&16384&&(c=a.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var m=0;m<c.length;m++){var w=c[m],k=w.getSnapshot;w=w.value;try{if(!yn(k(),w))return!1}catch{return!1}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Jr(r,a,c,m){a&=~Fd,a&=~Mi,r.suspendedLanes|=a,r.pingedLanes&=~a,m&&(r.warmLanes|=a),m=r.expirationTimes;for(var w=a;0<w;){var k=31-Je(w),D=1<<k;m[k]=-1,w&=~D}c!==0&&I_(r,c,a)}function xl(){return(Qe&6)===0?(Us(0),!1):!0}function Hd(){if(qe!==null){if(et===0)var r=qe.return;else r=qe,yr=Ti=null,id(r),wa=null,Ss=0,r=qe;for(;r!==null;)JE(r.alternate,r),r=r.return;qe=null}}function Da(r,a){var c=r.timeoutHandle;c!==-1&&(r.timeoutHandle=-1,E2(c)),c=r.cancelPendingCommit,c!==null&&(r.cancelPendingCommit=null,c()),Rr=0,Hd(),st=r,qe=c=gr(r.current,null),Ve=a,et=0,En=null,Yr=!1,Oa=Br(r,a),Bd=!1,Ia=xn=Fd=Mi=Xr=vt=0,cn=Fs=null,Pd=!1,(a&8)!==0&&(a|=a&32);var m=r.entangledLanes;if(m!==0)for(r=r.entanglements,m&=a;0<m;){var w=31-Je(m),k=1<<w;a|=r[w],m&=~k}return kr=a,$o(),c}function x0(r,a){Me=null,W.H=Rs,a===xa||a===Qo?(a=US(),et=3):a===Vu?(a=US(),et=4):et=a===_d?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,En=a,qe===null&&(vt=1,hl(r,Dn(a,r.current)))}function w0(){var r=_n.current;return r===null?!0:(Ve&4194048)===Ve?Pn===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?r===Pn:!1}function C0(){var r=W.H;return W.H=Rs,r===null?Rs:r}function T0(){var r=W.A;return W.A=e2,r}function wl(){vt=4,Yr||(Ve&4194048)!==Ve&&_n.current!==null||(Oa=!0),(Xr&134217727)===0&&(Mi&134217727)===0||st===null||Jr(st,Ve,xn,!1)}function qd(r,a,c){var m=Qe;Qe|=2;var w=C0(),k=T0();(st!==r||Ve!==a)&&(El=null,Da(r,a)),a=!1;var D=vt;e:do try{if(et!==0&&qe!==null){var q=qe,Y=En;switch(et){case 8:Hd(),D=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(a=!0);var re=et;if(et=0,En=null,Ma(r,q,Y,re),c&&Oa){D=0;break e}break;default:re=et,et=0,En=null,Ma(r,q,Y,re)}}r2(),D=vt;break}catch(de){x0(r,de)}while(!0);return a&&r.shellSuspendCounter++,yr=Ti=null,Qe=m,W.H=w,W.A=k,qe===null&&(st=null,Ve=0,$o()),D}function r2(){for(;qe!==null;)A0(qe)}function i2(r,a){var c=Qe;Qe|=2;var m=C0(),w=T0();st!==r||Ve!==a?(El=null,Sl=Oe()+500,Da(r,a)):Oa=Br(r,a);e:do try{if(et!==0&&qe!==null){a=qe;var k=En;t:switch(et){case 1:et=0,En=null,Ma(r,a,k,1);break;case 2:case 9:if(FS(k)){et=0,En=null,k0(a);break}a=function(){et!==2&&et!==9||st!==r||(et=7),nr(r)},k.then(a,a);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:FS(k)?(et=0,En=null,k0(a)):(et=0,En=null,Ma(r,a,k,7));break;case 5:var D=null;switch(qe.tag){case 26:D=qe.memoizedState;case 5:case 27:var q=qe;if(D?fx(D):q.stateNode.complete){et=0,En=null;var Y=q.sibling;if(Y!==null)qe=Y;else{var re=q.return;re!==null?(qe=re,Cl(re)):qe=null}break t}}et=0,En=null,Ma(r,a,k,5);break;case 6:et=0,En=null,Ma(r,a,k,6);break;case 8:Hd(),vt=6;break e;default:throw Error(i(462))}}a2();break}catch(de){x0(r,de)}while(!0);return yr=Ti=null,W.H=m,W.A=w,Qe=c,qe!==null?0:(st=null,Ve=0,$o(),vt)}function a2(){for(;qe!==null&&!Bt();)A0(qe)}function A0(r){var a=ZE(r.alternate,r,kr);r.memoizedProps=r.pendingProps,a===null?Cl(r):qe=a}function k0(r){var a=r,c=a.alternate;switch(a.tag){case 15:case 0:a=GE(c,a,a.pendingProps,a.type,void 0,Ve);break;case 11:a=GE(c,a,a.pendingProps,a.type.render,a.ref,Ve);break;case 5:id(a);default:JE(c,a),a=qe=TS(a,kr),a=ZE(c,a,kr)}r.memoizedProps=r.pendingProps,a===null?Cl(r):qe=a}function Ma(r,a,c,m){yr=Ti=null,id(a),wa=null,Ss=0;var w=a.return;try{if(WD(r,w,a,c,Ve)){vt=1,hl(r,Dn(c,r.current)),qe=null;return}}catch(k){if(w!==null)throw qe=w,k;vt=1,hl(r,Dn(c,r.current)),qe=null;return}a.flags&32768?(Ke||m===1?r=!0:Oa||(Ve&536870912)!==0?r=!1:(Yr=r=!0,(m===2||m===9||m===3||m===6)&&(m=_n.current,m!==null&&m.tag===13&&(m.flags|=16384))),R0(a,r)):Cl(a)}function Cl(r){var a=r;do{if((a.flags&32768)!==0){R0(a,Yr);return}r=a.return;var c=XD(a.alternate,a,kr);if(c!==null){qe=c;return}if(a=a.sibling,a!==null){qe=a;return}qe=a=r}while(a!==null);vt===0&&(vt=5)}function R0(r,a){do{var c=ZD(r.alternate,r);if(c!==null){c.flags&=32767,qe=c;return}if(c=r.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!a&&(r=r.sibling,r!==null)){qe=r;return}qe=r=c}while(r!==null);vt=6,qe=null}function N0(r,a,c,m,w,k,D,q,Y){r.cancelPendingCommit=null;do Tl();while(It!==0);if((Qe&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(k=a.lanes|a.childLanes,k|=Ou,PL(r,c,k,D,q,Y),r===st&&(qe=st=null,Ve=0),La=a,Qr=r,Rr=c,Ud=k,jd=w,v0=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,c2(ve,function(){return M0(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=W.T,W.T=null,w=J.p,J.p=2,D=Qe,Qe|=4;try{QD(r,a,c)}finally{Qe=D,J.p=w,W.T=m}}It=1,O0(),I0(),L0()}}function O0(){if(It===1){It=0;var r=Qr,a=La,c=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||c){c=W.T,W.T=null;var m=J.p;J.p=2;var w=Qe;Qe|=4;try{d0(a,r);var k=th,D=bS(r.containerInfo),q=k.focusedElem,Y=k.selectionRange;if(D!==q&&q&&q.ownerDocument&&gS(q.ownerDocument.documentElement,q)){if(Y!==null&&Tu(q)){var re=Y.start,de=Y.end;if(de===void 0&&(de=re),"selectionStart"in q)q.selectionStart=re,q.selectionEnd=Math.min(de,q.value.length);else{var pe=q.ownerDocument||document,ae=pe&&pe.defaultView||window;if(ae.getSelection){var oe=ae.getSelection(),_e=q.textContent.length,ke=Math.min(Y.start,_e),it=Y.end===void 0?ke:Math.min(Y.end,_e);!oe.extend&&ke>it&&(D=it,it=ke,ke=D);var te=mS(q,ke),Z=mS(q,it);if(te&&Z&&(oe.rangeCount!==1||oe.anchorNode!==te.node||oe.anchorOffset!==te.offset||oe.focusNode!==Z.node||oe.focusOffset!==Z.offset)){var ne=pe.createRange();ne.setStart(te.node,te.offset),oe.removeAllRanges(),ke>it?(oe.addRange(ne),oe.extend(Z.node,Z.offset)):(ne.setEnd(Z.node,Z.offset),oe.addRange(ne))}}}}for(pe=[],oe=q;oe=oe.parentNode;)oe.nodeType===1&&pe.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof q.focus=="function"&&q.focus(),q=0;q<pe.length;q++){var fe=pe[q];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Pl=!!eh,th=eh=null}finally{Qe=w,J.p=m,W.T=c}}r.current=a,It=2}}function I0(){if(It===2){It=0;var r=Qr,a=La,c=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||c){c=W.T,W.T=null;var m=J.p;J.p=2;var w=Qe;Qe|=4;try{s0(r,a.alternate,a)}finally{Qe=w,J.p=m,W.T=c}}It=3}}function L0(){if(It===4||It===3){It=0,Ne();var r=Qr,a=La,c=Rr,m=v0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?It=5:(It=0,La=Qr=null,D0(r,r.pendingLanes));var w=r.pendingLanes;if(w===0&&(Zr=null),ou(c),a=a.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(mt,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=W.T,w=J.p,J.p=2,W.T=null;try{for(var k=r.onRecoverableError,D=0;D<m.length;D++){var q=m[D];k(q.value,{componentStack:q.stack})}}finally{W.T=a,J.p=w}}(Rr&3)!==0&&Tl(),nr(r),w=r.pendingLanes,(c&261930)!==0&&(w&42)!==0?r===zd?Ps++:(Ps=0,zd=r):Ps=0,Us(0)}}function D0(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,vs(a)))}function Tl(){return O0(),I0(),L0(),M0()}function M0(){if(It!==5)return!1;var r=Qr,a=Ud;Ud=0;var c=ou(Rr),m=W.T,w=J.p;try{J.p=32>c?32:c,W.T=null,c=jd,jd=null;var k=Qr,D=Rr;if(It=0,La=Qr=null,Rr=0,(Qe&6)!==0)throw Error(i(331));var q=Qe;if(Qe|=4,g0(k.current),f0(k,k.current,D,c),Qe=q,Us(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(mt,k)}catch{}return!0}finally{J.p=w,W.T=m,D0(r,a)}}function B0(r,a,c){a=Dn(c,a),a=vd(r.stateNode,a,2),r=Gr(r,a,2),r!==null&&(as(r,2),nr(r))}function tt(r,a,c){if(r.tag===3)B0(r,r,c);else for(;a!==null;){if(a.tag===3){B0(a,r,c);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Zr===null||!Zr.has(m))){r=Dn(c,r),c=FE(2),m=Gr(a,c,2),m!==null&&(PE(c,m,a,r),as(m,2),nr(m));break}}a=a.return}}function $d(r,a,c){var m=r.pingCache;if(m===null){m=r.pingCache=new t2;var w=new Set;m.set(a,w)}else w=m.get(a),w===void 0&&(w=new Set,m.set(a,w));w.has(c)||(Bd=!0,w.add(c),r=s2.bind(null,r,a,c),a.then(r,r))}function s2(r,a,c){var m=r.pingCache;m!==null&&m.delete(a),r.pingedLanes|=r.suspendedLanes&c,r.warmLanes&=~c,st===r&&(Ve&c)===c&&(vt===4||vt===3&&(Ve&62914560)===Ve&&300>Oe()-_l?(Qe&2)===0&&Da(r,0):Fd|=c,Ia===Ve&&(Ia=0)),nr(r)}function F0(r,a){a===0&&(a=O_()),r=xi(r,a),r!==null&&(as(r,a),nr(r))}function o2(r){var a=r.memoizedState,c=0;a!==null&&(c=a.retryLane),F0(r,c)}function l2(r,a){var c=0;switch(r.tag){case 31:case 13:var m=r.stateNode,w=r.memoizedState;w!==null&&(c=w.retryLane);break;case 19:m=r.stateNode;break;case 22:m=r.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(a),F0(r,c)}function c2(r,a){return ft(r,a)}var Al=null,Ba=null,Gd=!1,kl=!1,Vd=!1,ei=0;function nr(r){r!==Ba&&r.next===null&&(Ba===null?Al=Ba=r:Ba=Ba.next=r),kl=!0,Gd||(Gd=!0,d2())}function Us(r,a){if(!Vd&&kl){Vd=!0;do for(var c=!1,m=Al;m!==null;){if(r!==0){var w=m.pendingLanes;if(w===0)var k=0;else{var D=m.suspendedLanes,q=m.pingedLanes;k=(1<<31-Je(42|r)+1)-1,k&=w&~(D&~q),k=k&201326741?k&201326741|1:k?k|2:0}k!==0&&(c=!0,z0(m,k))}else k=Ve,k=yi(m,m===st?k:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(k&3)===0||Br(m,k)||(c=!0,z0(m,k));m=m.next}while(c);Vd=!1}}function u2(){P0()}function P0(){kl=Gd=!1;var r=0;ei!==0&&S2()&&(r=ei);for(var a=Oe(),c=null,m=Al;m!==null;){var w=m.next,k=U0(m,a);k===0?(m.next=null,c===null?Al=w:c.next=w,w===null&&(Ba=c)):(c=m,(r!==0||(k&3)!==0)&&(kl=!0)),m=w}It!==0&&It!==5||Us(r),ei!==0&&(ei=0)}function U0(r,a){for(var c=r.suspendedLanes,m=r.pingedLanes,w=r.expirationTimes,k=r.pendingLanes&-62914561;0<k;){var D=31-Je(k),q=1<<D,Y=w[D];Y===-1?((q&c)===0||(q&m)!==0)&&(w[D]=is(q,a)):Y<=a&&(r.expiredLanes|=q),k&=~q}if(a=st,c=Ve,c=yi(r,r===a?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,c===0||r===a&&(et===2||et===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&Vt(m),r.callbackNode=null,r.callbackPriority=0;if((c&3)===0||Br(r,c)){if(a=c&-c,a===r.callbackPriority)return a;switch(m!==null&&Vt(m),ou(c)){case 2:case 8:c=me;break;case 32:c=ve;break;case 268435456:c=Ie;break;default:c=ve}return m=j0.bind(null,r),c=ft(c,m),r.callbackPriority=a,r.callbackNode=c,a}return m!==null&&m!==null&&Vt(m),r.callbackPriority=2,r.callbackNode=null,2}function j0(r,a){if(It!==0&&It!==5)return r.callbackNode=null,r.callbackPriority=0,null;var c=r.callbackNode;if(Tl()&&r.callbackNode!==c)return null;var m=Ve;return m=yi(r,r===st?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(S0(r,m,a),U0(r,Oe()),r.callbackNode!=null&&r.callbackNode===c?j0.bind(null,r):null)}function z0(r,a){if(Tl())return null;S0(r,a,!0)}function d2(){x2(function(){(Qe&6)!==0?ft(ce,u2):P0()})}function Wd(){if(ei===0){var r=Sa;r===0&&(r=gt,gt<<=1,(gt&261888)===0&&(gt=256)),ei=r}return ei}function H0(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Bo(""+r)}function q0(r,a){var c=a.ownerDocument.createElement("input");return c.name=a.name,c.value=a.value,r.id&&c.setAttribute("form",r.id),a.parentNode.insertBefore(c,a),r=new FormData(r),c.parentNode.removeChild(c),r}function h2(r,a,c,m,w){if(a==="submit"&&c&&c.stateNode===w){var k=H0((w[rn]||null).action),D=m.submitter;D&&(a=(a=D[rn]||null)?H0(a.formAction):D.getAttribute("formAction"),a!==null&&(k=a,D=null));var q=new jo("action","action",null,m,w);r.push({event:q,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ei!==0){var Y=D?q0(w,D):new FormData(w);fd(c,{pending:!0,data:Y,method:w.method,action:k},null,Y)}}else typeof k=="function"&&(q.preventDefault(),Y=D?q0(w,D):new FormData(w),fd(c,{pending:!0,data:Y,method:w.method,action:k},k,Y))},currentTarget:w}]})}}for(var Kd=0;Kd<Nu.length;Kd++){var Yd=Nu[Kd],f2=Yd.toLowerCase(),p2=Yd[0].toUpperCase()+Yd.slice(1);$n(f2,"on"+p2)}$n(_S,"onAnimationEnd"),$n(SS,"onAnimationIteration"),$n(ES,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(ND,"onTransitionRun"),$n(OD,"onTransitionStart"),$n(ID,"onTransitionCancel"),$n(xS,"onTransitionEnd"),oa("onMouseEnter",["mouseout","mouseover"]),oa("onMouseLeave",["mouseout","mouseover"]),oa("onPointerEnter",["pointerout","pointerover"]),oa("onPointerLeave",["pointerout","pointerover"]),vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var js="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),m2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(js));function $0(r,a){a=(a&4)!==0;for(var c=0;c<r.length;c++){var m=r[c],w=m.event;m=m.listeners;e:{var k=void 0;if(a)for(var D=m.length-1;0<=D;D--){var q=m[D],Y=q.instance,re=q.currentTarget;if(q=q.listener,Y!==k&&w.isPropagationStopped())break e;k=q,w.currentTarget=re;try{k(w)}catch(de){qo(de)}w.currentTarget=null,k=Y}else for(D=0;D<m.length;D++){if(q=m[D],Y=q.instance,re=q.currentTarget,q=q.listener,Y!==k&&w.isPropagationStopped())break e;k=q,w.currentTarget=re;try{k(w)}catch(de){qo(de)}w.currentTarget=null,k=Y}}}}function $e(r,a){var c=a[lu];c===void 0&&(c=a[lu]=new Set);var m=r+"__bubble";c.has(m)||(G0(a,r,2,!1),c.add(m))}function Xd(r,a,c){var m=0;a&&(m|=4),G0(c,r,m,a)}var Rl="_reactListening"+Math.random().toString(36).slice(2);function Zd(r){if(!r[Rl]){r[Rl]=!0,P_.forEach(function(c){c!=="selectionchange"&&(m2.has(c)||Xd(c,!1,r),Xd(c,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Rl]||(a[Rl]=!0,Xd("selectionchange",!1,a))}}function G0(r,a,c,m){switch(_x(a)){case 2:var w=q2;break;case 8:w=$2;break;default:w=hh}c=w.bind(null,a,c,r),w=void 0,!bu||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(w=!0),m?w!==void 0?r.addEventListener(a,c,{capture:!0,passive:w}):r.addEventListener(a,c,!0):w!==void 0?r.addEventListener(a,c,{passive:w}):r.addEventListener(a,c,!1)}function Qd(r,a,c,m,w){var k=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var D=m.tag;if(D===3||D===4){var q=m.stateNode.containerInfo;if(q===w)break;if(D===4)for(D=m.return;D!==null;){var Y=D.tag;if((Y===3||Y===4)&&D.stateNode.containerInfo===w)return;D=D.return}for(;q!==null;){if(D=ia(q),D===null)return;if(Y=D.tag,Y===5||Y===6||Y===26||Y===27){m=k=D;continue e}q=q.parentNode}}m=m.return}X_(function(){var re=k,de=mu(c),pe=[];e:{var ae=wS.get(r);if(ae!==void 0){var oe=jo,_e=r;switch(r){case"keypress":if(Po(c)===0)break e;case"keydown":case"keyup":oe=lD;break;case"focusin":_e="focus",oe=Su;break;case"focusout":_e="blur",oe=Su;break;case"beforeblur":case"afterblur":oe=Su;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=J_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=XL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=dD;break;case _S:case SS:case ES:oe=JL;break;case xS:oe=fD;break;case"scroll":case"scrollend":oe=KL;break;case"wheel":oe=mD;break;case"copy":case"cut":case"paste":oe=tD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=tS;break;case"toggle":case"beforetoggle":oe=bD}var ke=(a&4)!==0,it=!ke&&(r==="scroll"||r==="scrollend"),te=ke?ae!==null?ae+"Capture":null:ae;ke=[];for(var Z=re,ne;Z!==null;){var fe=Z;if(ne=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||ne===null||te===null||(fe=ls(Z,te),fe!=null&&ke.push(zs(Z,fe,ne))),it)break;Z=Z.return}0<ke.length&&(ae=new oe(ae,_e,null,c,de),pe.push({event:ae,listeners:ke}))}}if((a&7)===0){e:{if(ae=r==="mouseover"||r==="pointerover",oe=r==="mouseout"||r==="pointerout",ae&&c!==pu&&(_e=c.relatedTarget||c.fromElement)&&(ia(_e)||_e[ra]))break e;if((oe||ae)&&(ae=de.window===de?de:(ae=de.ownerDocument)?ae.defaultView||ae.parentWindow:window,oe?(_e=c.relatedTarget||c.toElement,oe=re,_e=_e?ia(_e):null,_e!==null&&(it=l(_e),ke=_e.tag,_e!==it||ke!==5&&ke!==27&&ke!==6)&&(_e=null)):(oe=null,_e=re),oe!==_e)){if(ke=J_,fe="onMouseLeave",te="onMouseEnter",Z="mouse",(r==="pointerout"||r==="pointerover")&&(ke=tS,fe="onPointerLeave",te="onPointerEnter",Z="pointer"),it=oe==null?ae:os(oe),ne=_e==null?ae:os(_e),ae=new ke(fe,Z+"leave",oe,c,de),ae.target=it,ae.relatedTarget=ne,fe=null,ia(de)===re&&(ke=new ke(te,Z+"enter",_e,c,de),ke.target=ne,ke.relatedTarget=it,fe=ke),it=fe,oe&&_e)t:{for(ke=g2,te=oe,Z=_e,ne=0,fe=te;fe;fe=ke(fe))ne++;fe=0;for(var we=Z;we;we=ke(we))fe++;for(;0<ne-fe;)te=ke(te),ne--;for(;0<fe-ne;)Z=ke(Z),fe--;for(;ne--;){if(te===Z||Z!==null&&te===Z.alternate){ke=te;break t}te=ke(te),Z=ke(Z)}ke=null}else ke=null;oe!==null&&V0(pe,ae,oe,ke,!1),_e!==null&&it!==null&&V0(pe,it,_e,ke,!0)}}e:{if(ae=re?os(re):window,oe=ae.nodeName&&ae.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ae.type==="file")var Xe=cS;else if(oS(ae))if(uS)Xe=AD;else{Xe=CD;var Se=wD}else oe=ae.nodeName,!oe||oe.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?re&&fu(re.elementType)&&(Xe=cS):Xe=TD;if(Xe&&(Xe=Xe(r,re))){lS(pe,Xe,c,de);break e}Se&&Se(r,ae,re),r==="focusout"&&re&&ae.type==="number"&&re.memoizedProps.value!=null&&hu(ae,"number",ae.value)}switch(Se=re?os(re):window,r){case"focusin":(oS(Se)||Se.contentEditable==="true")&&(fa=Se,Au=re,gs=null);break;case"focusout":gs=Au=fa=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,yS(pe,c,de);break;case"selectionchange":if(RD)break;case"keydown":case"keyup":yS(pe,c,de)}var Pe;if(xu)e:{switch(r){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else ha?aS(r,c)&&(We="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(We="onCompositionStart");We&&(nS&&c.locale!=="ko"&&(ha||We!=="onCompositionStart"?We==="onCompositionEnd"&&ha&&(Pe=Z_()):(Pr=de,yu="value"in Pr?Pr.value:Pr.textContent,ha=!0)),Se=Nl(re,We),0<Se.length&&(We=new eS(We,r,null,c,de),pe.push({event:We,listeners:Se}),Pe?We.data=Pe:(Pe=sS(c),Pe!==null&&(We.data=Pe)))),(Pe=vD?_D(r,c):SD(r,c))&&(We=Nl(re,"onBeforeInput"),0<We.length&&(Se=new eS("onBeforeInput","beforeinput",null,c,de),pe.push({event:Se,listeners:We}),Se.data=Pe)),h2(pe,r,re,c,de)}$0(pe,a)})}function zs(r,a,c){return{instance:r,listener:a,currentTarget:c}}function Nl(r,a){for(var c=a+"Capture",m=[];r!==null;){var w=r,k=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||k===null||(w=ls(r,c),w!=null&&m.unshift(zs(r,w,k)),w=ls(r,a),w!=null&&m.push(zs(r,w,k))),r.tag===3)return m;r=r.return}return[]}function g2(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function V0(r,a,c,m,w){for(var k=a._reactName,D=[];c!==null&&c!==m;){var q=c,Y=q.alternate,re=q.stateNode;if(q=q.tag,Y!==null&&Y===m)break;q!==5&&q!==26&&q!==27||re===null||(Y=re,w?(re=ls(c,k),re!=null&&D.unshift(zs(c,re,Y))):w||(re=ls(c,k),re!=null&&D.push(zs(c,re,Y)))),c=c.return}D.length!==0&&r.push({event:a,listeners:D})}var b2=/\r\n?/g,y2=/\u0000|\uFFFD/g;function W0(r){return(typeof r=="string"?r:""+r).replace(b2,`
9
- `).replace(y2,"")}function K0(r,a){return a=W0(a),W0(r)===a}function rt(r,a,c,m,w,k){switch(c){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||ca(r,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&ca(r,""+m);break;case"className":Do(r,"class",m);break;case"tabIndex":Do(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Do(r,c,m);break;case"style":K_(r,m,k);break;case"data":if(a!=="object"){Do(r,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||c!=="href")){r.removeAttribute(c);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=Bo(""+m),r.setAttribute(c,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof k=="function"&&(c==="formAction"?(a!=="input"&&rt(r,a,"name",w.name,w,null),rt(r,a,"formEncType",w.formEncType,w,null),rt(r,a,"formMethod",w.formMethod,w,null),rt(r,a,"formTarget",w.formTarget,w,null)):(rt(r,a,"encType",w.encType,w,null),rt(r,a,"method",w.method,w,null),rt(r,a,"target",w.target,w,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=Bo(""+m),r.setAttribute(c,m);break;case"onClick":m!=null&&(r.onclick=pr);break;case"onScroll":m!=null&&$e("scroll",r);break;case"onScrollEnd":m!=null&&$e("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(w.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}c=Bo(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""+m):r.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""):r.removeAttribute(c);break;case"capture":case"download":m===!0?r.setAttribute(c,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,m):r.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(c,m):r.removeAttribute(c);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(c):r.setAttribute(c,m);break;case"popover":$e("beforetoggle",r),$e("toggle",r),Lo(r,"popover",m);break;case"xlinkActuate":fr(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":fr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":fr(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":fr(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":fr(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":fr(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":fr(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":fr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":fr(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Lo(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=VL.get(c)||c,Lo(r,c,m))}}function Jd(r,a,c,m,w,k){switch(c){case"style":K_(r,m,k);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(w.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"children":typeof m=="string"?ca(r,m):(typeof m=="number"||typeof m=="bigint")&&ca(r,""+m);break;case"onScroll":m!=null&&$e("scroll",r);break;case"onScrollEnd":m!=null&&$e("scrollend",r);break;case"onClick":m!=null&&(r.onclick=pr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!U_.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(w=c.endsWith("Capture"),a=c.slice(2,w?c.length-7:void 0),k=r[rn]||null,k=k!=null?k[c]:null,typeof k=="function"&&r.removeEventListener(a,k,w),typeof m=="function")){typeof k!="function"&&k!==null&&(c in r?r[c]=null:r.hasAttribute(c)&&r.removeAttribute(c)),r.addEventListener(a,m,w);break e}c in r?r[c]=m:m===!0?r.setAttribute(c,""):Lo(r,c,m)}}}function qt(r,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",r),$e("load",r);var m=!1,w=!1,k;for(k in c)if(c.hasOwnProperty(k)){var D=c[k];if(D!=null)switch(k){case"src":m=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:rt(r,a,k,D,c,null)}}w&&rt(r,a,"srcSet",c.srcSet,c,null),m&&rt(r,a,"src",c.src,c,null);return;case"input":$e("invalid",r);var q=k=D=w=null,Y=null,re=null;for(m in c)if(c.hasOwnProperty(m)){var de=c[m];if(de!=null)switch(m){case"name":w=de;break;case"type":D=de;break;case"checked":Y=de;break;case"defaultChecked":re=de;break;case"value":k=de;break;case"defaultValue":q=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(i(137,a));break;default:rt(r,a,m,de,c,null)}}$_(r,k,q,Y,re,D,w,!1);return;case"select":$e("invalid",r),m=D=k=null;for(w in c)if(c.hasOwnProperty(w)&&(q=c[w],q!=null))switch(w){case"value":k=q;break;case"defaultValue":D=q;break;case"multiple":m=q;default:rt(r,a,w,q,c,null)}a=k,c=D,r.multiple=!!m,a!=null?la(r,!!m,a,!1):c!=null&&la(r,!!m,c,!0);return;case"textarea":$e("invalid",r),k=w=m=null;for(D in c)if(c.hasOwnProperty(D)&&(q=c[D],q!=null))switch(D){case"value":m=q;break;case"defaultValue":w=q;break;case"children":k=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(i(91));break;default:rt(r,a,D,q,c,null)}V_(r,m,w,k);return;case"option":for(Y in c)if(c.hasOwnProperty(Y)&&(m=c[Y],m!=null))switch(Y){case"selected":r.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:rt(r,a,Y,m,c,null)}return;case"dialog":$e("beforetoggle",r),$e("toggle",r),$e("cancel",r),$e("close",r);break;case"iframe":case"object":$e("load",r);break;case"video":case"audio":for(m=0;m<js.length;m++)$e(js[m],r);break;case"image":$e("error",r),$e("load",r);break;case"details":$e("toggle",r);break;case"embed":case"source":case"link":$e("error",r),$e("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(re in c)if(c.hasOwnProperty(re)&&(m=c[re],m!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:rt(r,a,re,m,c,null)}return;default:if(fu(a)){for(de in c)c.hasOwnProperty(de)&&(m=c[de],m!==void 0&&Jd(r,a,de,m,c,void 0));return}}for(q in c)c.hasOwnProperty(q)&&(m=c[q],m!=null&&rt(r,a,q,m,c,null))}function v2(r,a,c,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,k=null,D=null,q=null,Y=null,re=null,de=null;for(oe in c){var pe=c[oe];if(c.hasOwnProperty(oe)&&pe!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":Y=pe;default:m.hasOwnProperty(oe)||rt(r,a,oe,null,m,pe)}}for(var ae in m){var oe=m[ae];if(pe=c[ae],m.hasOwnProperty(ae)&&(oe!=null||pe!=null))switch(ae){case"type":k=oe;break;case"name":w=oe;break;case"checked":re=oe;break;case"defaultChecked":de=oe;break;case"value":D=oe;break;case"defaultValue":q=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,a));break;default:oe!==pe&&rt(r,a,ae,oe,m,pe)}}du(r,D,q,Y,re,de,k,w);return;case"select":oe=D=q=ae=null;for(k in c)if(Y=c[k],c.hasOwnProperty(k)&&Y!=null)switch(k){case"value":break;case"multiple":oe=Y;default:m.hasOwnProperty(k)||rt(r,a,k,null,m,Y)}for(w in m)if(k=m[w],Y=c[w],m.hasOwnProperty(w)&&(k!=null||Y!=null))switch(w){case"value":ae=k;break;case"defaultValue":q=k;break;case"multiple":D=k;default:k!==Y&&rt(r,a,w,k,m,Y)}a=q,c=D,m=oe,ae!=null?la(r,!!c,ae,!1):!!m!=!!c&&(a!=null?la(r,!!c,a,!0):la(r,!!c,c?[]:"",!1));return;case"textarea":oe=ae=null;for(q in c)if(w=c[q],c.hasOwnProperty(q)&&w!=null&&!m.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:rt(r,a,q,null,m,w)}for(D in m)if(w=m[D],k=c[D],m.hasOwnProperty(D)&&(w!=null||k!=null))switch(D){case"value":ae=w;break;case"defaultValue":oe=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:w!==k&&rt(r,a,D,w,m,k)}G_(r,ae,oe);return;case"option":for(var _e in c)if(ae=c[_e],c.hasOwnProperty(_e)&&ae!=null&&!m.hasOwnProperty(_e))switch(_e){case"selected":r.selected=!1;break;default:rt(r,a,_e,null,m,ae)}for(Y in m)if(ae=m[Y],oe=c[Y],m.hasOwnProperty(Y)&&ae!==oe&&(ae!=null||oe!=null))switch(Y){case"selected":r.selected=ae&&typeof ae!="function"&&typeof ae!="symbol";break;default:rt(r,a,Y,ae,m,oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in c)ae=c[ke],c.hasOwnProperty(ke)&&ae!=null&&!m.hasOwnProperty(ke)&&rt(r,a,ke,null,m,ae);for(re in m)if(ae=m[re],oe=c[re],m.hasOwnProperty(re)&&ae!==oe&&(ae!=null||oe!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,a));break;default:rt(r,a,re,ae,m,oe)}return;default:if(fu(a)){for(var it in c)ae=c[it],c.hasOwnProperty(it)&&ae!==void 0&&!m.hasOwnProperty(it)&&Jd(r,a,it,void 0,m,ae);for(de in m)ae=m[de],oe=c[de],!m.hasOwnProperty(de)||ae===oe||ae===void 0&&oe===void 0||Jd(r,a,de,ae,m,oe);return}}for(var te in c)ae=c[te],c.hasOwnProperty(te)&&ae!=null&&!m.hasOwnProperty(te)&&rt(r,a,te,null,m,ae);for(pe in m)ae=m[pe],oe=c[pe],!m.hasOwnProperty(pe)||ae===oe||ae==null&&oe==null||rt(r,a,pe,ae,m,oe)}function Y0(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _2(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,c=performance.getEntriesByType("resource"),m=0;m<c.length;m++){var w=c[m],k=w.transferSize,D=w.initiatorType,q=w.duration;if(k&&q&&Y0(D)){for(D=0,q=w.responseEnd,m+=1;m<c.length;m++){var Y=c[m],re=Y.startTime;if(re>q)break;var de=Y.transferSize,pe=Y.initiatorType;de&&Y0(pe)&&(Y=Y.responseEnd,D+=de*(Y<q?1:(q-re)/(Y-re)))}if(--m,a+=8*(k+D)/(w.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var eh=null,th=null;function Ol(r){return r.nodeType===9?r:r.ownerDocument}function X0(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Z0(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function nh(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var rh=null;function S2(){var r=window.event;return r&&r.type==="popstate"?r===rh?!1:(rh=r,!0):(rh=null,!1)}var Q0=typeof setTimeout=="function"?setTimeout:void 0,E2=typeof clearTimeout=="function"?clearTimeout:void 0,J0=typeof Promise=="function"?Promise:void 0,x2=typeof queueMicrotask=="function"?queueMicrotask:typeof J0<"u"?function(r){return J0.resolve(null).then(r).catch(w2)}:Q0;function w2(r){setTimeout(function(){throw r})}function ti(r){return r==="head"}function ex(r,a){var c=a,m=0;do{var w=c.nextSibling;if(r.removeChild(c),w&&w.nodeType===8)if(c=w.data,c==="/$"||c==="/&"){if(m===0){r.removeChild(w),ja(a);return}m--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")m++;else if(c==="html")Hs(r.ownerDocument.documentElement);else if(c==="head"){c=r.ownerDocument.head,Hs(c);for(var k=c.firstChild;k;){var D=k.nextSibling,q=k.nodeName;k[ss]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&k.rel.toLowerCase()==="stylesheet"||c.removeChild(k),k=D}}else c==="body"&&Hs(r.ownerDocument.body);c=w}while(c);ja(a)}function tx(r,a){var c=r;r=0;do{var m=c.nextSibling;if(c.nodeType===1?a?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(a?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(r===0)break;r--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||r++;c=m}while(c)}function ih(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":ih(c),cu(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function C2(r,a,c,m){for(;r.nodeType===1;){var w=c;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[ss])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(k=r.getAttribute("rel"),k==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(k!==w.rel||r.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||r.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||r.getAttribute("title")!==(w.title==null?null:w.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(k=r.getAttribute("src"),(k!==(w.src==null?null:w.src)||r.getAttribute("type")!==(w.type==null?null:w.type)||r.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&k&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var k=w.name==null?null:""+w.name;if(w.type==="hidden"&&r.getAttribute("name")===k)return r}else return r;if(r=Un(r.nextSibling),r===null)break}return null}function T2(r,a,c){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!c||(r=Un(r.nextSibling),r===null))return null;return r}function nx(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Un(r.nextSibling),r===null))return null;return r}function ah(r){return r.data==="$?"||r.data==="$~"}function sh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function A2(r,a){var c=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||c.readyState!=="loading")a();else{var m=function(){a(),c.removeEventListener("DOMContentLoaded",m)};c.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function Un(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var oh=null;function rx(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(a===0)return Un(r.nextSibling);a--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||a++}r=r.nextSibling}return null}function ix(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(a===0)return r;a--}else c!=="/$"&&c!=="/&"||a++}r=r.previousSibling}return null}function ax(r,a,c){switch(a=Ol(c),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Hs(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);cu(r)}var jn=new Map,sx=new Set;function Il(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Nr=J.d;J.d={f:k2,r:R2,D:N2,C:O2,L:I2,m:L2,X:M2,S:D2,M:B2};function k2(){var r=Nr.f(),a=xl();return r||a}function R2(r){var a=aa(r);a!==null&&a.tag===5&&a.type==="form"?xE(a):Nr.r(r)}var Fa=typeof document>"u"?null:document;function ox(r,a,c){var m=Fa;if(m&&typeof a=="string"&&a){var w=In(a);w='link[rel="'+r+'"][href="'+w+'"]',typeof c=="string"&&(w+='[crossorigin="'+c+'"]'),sx.has(w)||(sx.add(w),r={rel:r,crossOrigin:c,href:a},m.querySelector(w)===null&&(a=m.createElement("link"),qt(a,"link",r),Ft(a),m.head.appendChild(a)))}}function N2(r){Nr.D(r),ox("dns-prefetch",r,null)}function O2(r,a){Nr.C(r,a),ox("preconnect",r,a)}function I2(r,a,c){Nr.L(r,a,c);var m=Fa;if(m&&r&&a){var w='link[rel="preload"][as="'+In(a)+'"]';a==="image"&&c&&c.imageSrcSet?(w+='[imagesrcset="'+In(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(w+='[imagesizes="'+In(c.imageSizes)+'"]')):w+='[href="'+In(r)+'"]';var k=w;switch(a){case"style":k=Pa(r);break;case"script":k=Ua(r)}jn.has(k)||(r=f({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:r,as:a},c),jn.set(k,r),m.querySelector(w)!==null||a==="style"&&m.querySelector(qs(k))||a==="script"&&m.querySelector($s(k))||(a=m.createElement("link"),qt(a,"link",r),Ft(a),m.head.appendChild(a)))}}function L2(r,a){Nr.m(r,a);var c=Fa;if(c&&r){var m=a&&typeof a.as=="string"?a.as:"script",w='link[rel="modulepreload"][as="'+In(m)+'"][href="'+In(r)+'"]',k=w;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=Ua(r)}if(!jn.has(k)&&(r=f({rel:"modulepreload",href:r},a),jn.set(k,r),c.querySelector(w)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector($s(k)))return}m=c.createElement("link"),qt(m,"link",r),Ft(m),c.head.appendChild(m)}}}function D2(r,a,c){Nr.S(r,a,c);var m=Fa;if(m&&r){var w=sa(m).hoistableStyles,k=Pa(r);a=a||"default";var D=w.get(k);if(!D){var q={loading:0,preload:null};if(D=m.querySelector(qs(k)))q.loading=5;else{r=f({rel:"stylesheet",href:r,"data-precedence":a},c),(c=jn.get(k))&&lh(r,c);var Y=D=m.createElement("link");Ft(Y),qt(Y,"link",r),Y._p=new Promise(function(re,de){Y.onload=re,Y.onerror=de}),Y.addEventListener("load",function(){q.loading|=1}),Y.addEventListener("error",function(){q.loading|=2}),q.loading|=4,Ll(D,a,m)}D={type:"stylesheet",instance:D,count:1,state:q},w.set(k,D)}}}function M2(r,a){Nr.X(r,a);var c=Fa;if(c&&r){var m=sa(c).hoistableScripts,w=Ua(r),k=m.get(w);k||(k=c.querySelector($s(w)),k||(r=f({src:r,async:!0},a),(a=jn.get(w))&&ch(r,a),k=c.createElement("script"),Ft(k),qt(k,"link",r),c.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},m.set(w,k))}}function B2(r,a){Nr.M(r,a);var c=Fa;if(c&&r){var m=sa(c).hoistableScripts,w=Ua(r),k=m.get(w);k||(k=c.querySelector($s(w)),k||(r=f({src:r,async:!0,type:"module"},a),(a=jn.get(w))&&ch(r,a),k=c.createElement("script"),Ft(k),qt(k,"link",r),c.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},m.set(w,k))}}function lx(r,a,c,m){var w=(w=ue.current)?Il(w):null;if(!w)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(a=Pa(c.href),c=sa(w).hoistableStyles,m=c.get(a),m||(m={type:"style",instance:null,count:0,state:null},c.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){r=Pa(c.href);var k=sa(w).hoistableStyles,D=k.get(r);if(D||(w=w.ownerDocument||w,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(r,D),(k=w.querySelector(qs(r)))&&!k._p&&(D.instance=k,D.state.loading=5),jn.has(r)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},jn.set(r,c),k||F2(w,r,c,D.state))),a&&m===null)throw Error(i(528,""));return D}if(a&&m!==null)throw Error(i(529,""));return null;case"script":return a=c.async,c=c.src,typeof c=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ua(c),c=sa(w).hoistableScripts,m=c.get(a),m||(m={type:"script",instance:null,count:0,state:null},c.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Pa(r){return'href="'+In(r)+'"'}function qs(r){return'link[rel="stylesheet"]['+r+"]"}function cx(r){return f({},r,{"data-precedence":r.precedence,precedence:null})}function F2(r,a,c,m){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=r.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),qt(a,"link",c),Ft(a),r.head.appendChild(a))}function Ua(r){return'[src="'+In(r)+'"]'}function $s(r){return"script[async]"+r}function ux(r,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var m=r.querySelector('style[data-href~="'+In(c.href)+'"]');if(m)return a.instance=m,Ft(m),m;var w=f({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Ft(m),qt(m,"style",w),Ll(m,c.precedence,r),a.instance=m;case"stylesheet":w=Pa(c.href);var k=r.querySelector(qs(w));if(k)return a.state.loading|=4,a.instance=k,Ft(k),k;m=cx(c),(w=jn.get(w))&&lh(m,w),k=(r.ownerDocument||r).createElement("link"),Ft(k);var D=k;return D._p=new Promise(function(q,Y){D.onload=q,D.onerror=Y}),qt(k,"link",m),a.state.loading|=4,Ll(k,c.precedence,r),a.instance=k;case"script":return k=Ua(c.src),(w=r.querySelector($s(k)))?(a.instance=w,Ft(w),w):(m=c,(w=jn.get(k))&&(m=f({},c),ch(m,w)),r=r.ownerDocument||r,w=r.createElement("script"),Ft(w),qt(w,"link",m),r.head.appendChild(w),a.instance=w);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,Ll(m,c.precedence,r));return a.instance}function Ll(r,a,c){for(var m=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=m.length?m[m.length-1]:null,k=w,D=0;D<m.length;D++){var q=m[D];if(q.dataset.precedence===a)k=q;else if(k!==w)break}k?k.parentNode.insertBefore(r,k.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(r,a.firstChild))}function lh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function ch(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Dl=null;function dx(r,a,c){if(Dl===null){var m=new Map,w=Dl=new Map;w.set(c,m)}else w=Dl,m=w.get(c),m||(m=new Map,w.set(c,m));if(m.has(r))return m;for(m.set(r,null),c=c.getElementsByTagName(r),w=0;w<c.length;w++){var k=c[w];if(!(k[ss]||k[Ut]||r==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var D=k.getAttribute(a)||"";D=r+D;var q=m.get(D);q?q.push(k):m.set(D,[k])}}return m}function hx(r,a,c){r=r.ownerDocument||r,r.head.insertBefore(c,a==="title"?r.querySelector("head > title"):null)}function P2(r,a,c){if(c===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return r=a.disabled,typeof a.precedence=="string"&&r==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function fx(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function U2(r,a,c,m){if(c.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var w=Pa(m.href),k=a.querySelector(qs(w));if(k){a=k._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Ml.bind(r),a.then(r,r)),c.state.loading|=4,c.instance=k,Ft(k);return}k=a.ownerDocument||a,m=cx(m),(w=jn.get(w))&&lh(m,w),k=k.createElement("link"),Ft(k);var D=k;D._p=new Promise(function(q,Y){D.onload=q,D.onerror=Y}),qt(k,"link",m),c.instance=k}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(c,a),(a=c.state.preload)&&(c.state.loading&3)===0&&(r.count++,c=Ml.bind(r),a.addEventListener("load",c),a.addEventListener("error",c))}}var uh=0;function j2(r,a){return r.stylesheets&&r.count===0&&Fl(r,r.stylesheets),0<r.count||0<r.imgCount?function(c){var m=setTimeout(function(){if(r.stylesheets&&Fl(r,r.stylesheets),r.unsuspend){var k=r.unsuspend;r.unsuspend=null,k()}},6e4+a);0<r.imgBytes&&uh===0&&(uh=62500*_2());var w=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Fl(r,r.stylesheets),r.unsuspend)){var k=r.unsuspend;r.unsuspend=null,k()}},(r.imgBytes>uh?50:800)+a);return r.unsuspend=c,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(w)}}:null}function Ml(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fl(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Bl=null;function Fl(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Bl=new Map,a.forEach(z2,r),Bl=null,Ml.call(r))}function z2(r,a){if(!(a.state.loading&4)){var c=Bl.get(r);if(c)var m=c.get(null);else{c=new Map,Bl.set(r,c);for(var w=r.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<w.length;k++){var D=w[k];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(c.set(D.dataset.precedence,D),m=D)}m&&c.set(null,m)}w=a.instance,D=w.getAttribute("data-precedence"),k=c.get(D)||m,k===m&&c.set(null,w),c.set(D,w),this.count++,m=Ml.bind(this),w.addEventListener("load",m),w.addEventListener("error",m),k?k.parentNode.insertBefore(w,k.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(w,r.firstChild)),a.state.loading|=4}}var Gs={$$typeof:_,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function H2(r,a,c,m,w,k,D,q,Y){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=au(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=au(0),this.hiddenUpdates=au(null),this.identifierPrefix=m,this.onUncaughtError=w,this.onCaughtError=k,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function px(r,a,c,m,w,k,D,q,Y,re,de,pe){return r=new H2(r,a,c,D,Y,re,de,pe,q),a=1,k===!0&&(a|=24),k=vn(3,null,null,a),r.current=k,k.stateNode=r,a=qu(),a.refCount++,r.pooledCache=a,a.refCount++,k.memoizedState={element:m,isDehydrated:c,cache:a},Wu(k),r}function mx(r){return r?(r=ga,r):ga}function gx(r,a,c,m,w,k){w=mx(w),m.context===null?m.context=w:m.pendingContext=w,m=$r(a),m.payload={element:c},k=k===void 0?null:k,k!==null&&(m.callback=k),c=Gr(r,m,a),c!==null&&(un(c,r,a),xs(c,r,a))}function bx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<a?c:a}}function dh(r,a){bx(r,a),(r=r.alternate)&&bx(r,a)}function yx(r){if(r.tag===13||r.tag===31){var a=xi(r,67108864);a!==null&&un(a,r,67108864),dh(r,67108864)}}function vx(r){if(r.tag===13||r.tag===31){var a=wn();a=su(a);var c=xi(r,a);c!==null&&un(c,r,a),dh(r,a)}}var Pl=!0;function q2(r,a,c,m){var w=W.T;W.T=null;var k=J.p;try{J.p=2,hh(r,a,c,m)}finally{J.p=k,W.T=w}}function $2(r,a,c,m){var w=W.T;W.T=null;var k=J.p;try{J.p=8,hh(r,a,c,m)}finally{J.p=k,W.T=w}}function hh(r,a,c,m){if(Pl){var w=fh(m);if(w===null)Qd(r,a,m,Ul,c),Sx(r,m);else if(V2(w,r,a,c,m))m.stopPropagation();else if(Sx(r,m),a&4&&-1<G2.indexOf(r)){for(;w!==null;){var k=aa(w);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var D=Qn(k.pendingLanes);if(D!==0){var q=k;for(q.pendingLanes|=2,q.entangledLanes|=2;D;){var Y=1<<31-Je(D);q.entanglements[1]|=Y,D&=~Y}nr(k),(Qe&6)===0&&(Sl=Oe()+500,Us(0))}}break;case 31:case 13:q=xi(k,2),q!==null&&un(q,k,2),xl(),dh(k,2)}if(k=fh(m),k===null&&Qd(r,a,m,Ul,c),k===w)break;w=k}w!==null&&m.stopPropagation()}else Qd(r,a,m,null,c)}}function fh(r){return r=mu(r),ph(r)}var Ul=null;function ph(r){if(Ul=null,r=ia(r),r!==null){var a=l(r);if(a===null)r=null;else{var c=a.tag;if(c===13){if(r=u(a),r!==null)return r;r=null}else if(c===31){if(r=o(a),r!==null)return r;r=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Ul=r,null}function _x(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(je()){case ce:return 2;case me:return 8;case ve:case Ce:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var mh=!1,ni=null,ri=null,ii=null,Vs=new Map,Ws=new Map,ai=[],G2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Sx(r,a){switch(r){case"focusin":case"focusout":ni=null;break;case"dragenter":case"dragleave":ri=null;break;case"mouseover":case"mouseout":ii=null;break;case"pointerover":case"pointerout":Vs.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ws.delete(a.pointerId)}}function Ks(r,a,c,m,w,k){return r===null||r.nativeEvent!==k?(r={blockedOn:a,domEventName:c,eventSystemFlags:m,nativeEvent:k,targetContainers:[w]},a!==null&&(a=aa(a),a!==null&&yx(a)),r):(r.eventSystemFlags|=m,a=r.targetContainers,w!==null&&a.indexOf(w)===-1&&a.push(w),r)}function V2(r,a,c,m,w){switch(a){case"focusin":return ni=Ks(ni,r,a,c,m,w),!0;case"dragenter":return ri=Ks(ri,r,a,c,m,w),!0;case"mouseover":return ii=Ks(ii,r,a,c,m,w),!0;case"pointerover":var k=w.pointerId;return Vs.set(k,Ks(Vs.get(k)||null,r,a,c,m,w)),!0;case"gotpointercapture":return k=w.pointerId,Ws.set(k,Ks(Ws.get(k)||null,r,a,c,m,w)),!0}return!1}function Ex(r){var a=ia(r.target);if(a!==null){var c=l(a);if(c!==null){if(a=c.tag,a===13){if(a=u(c),a!==null){r.blockedOn=a,B_(r.priority,function(){vx(c)});return}}else if(a===31){if(a=o(c),a!==null){r.blockedOn=a,B_(r.priority,function(){vx(c)});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function jl(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var c=fh(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);pu=m,c.target.dispatchEvent(m),pu=null}else return a=aa(c),a!==null&&yx(a),r.blockedOn=c,!1;a.shift()}return!0}function xx(r,a,c){jl(r)&&c.delete(a)}function W2(){mh=!1,ni!==null&&jl(ni)&&(ni=null),ri!==null&&jl(ri)&&(ri=null),ii!==null&&jl(ii)&&(ii=null),Vs.forEach(xx),Ws.forEach(xx)}function zl(r,a){r.blockedOn===a&&(r.blockedOn=null,mh||(mh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,W2)))}var Hl=null;function wx(r){Hl!==r&&(Hl=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hl===r&&(Hl=null);for(var a=0;a<r.length;a+=3){var c=r[a],m=r[a+1],w=r[a+2];if(typeof m!="function"){if(ph(m||c)===null)continue;break}var k=aa(c);k!==null&&(r.splice(a,3),a-=3,fd(k,{pending:!0,data:w,method:c.method,action:m},m,w))}}))}function ja(r){function a(Y){return zl(Y,r)}ni!==null&&zl(ni,r),ri!==null&&zl(ri,r),ii!==null&&zl(ii,r),Vs.forEach(a),Ws.forEach(a);for(var c=0;c<ai.length;c++){var m=ai[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<ai.length&&(c=ai[0],c.blockedOn===null);)Ex(c),c.blockedOn===null&&ai.shift();if(c=(r.ownerDocument||r).$$reactFormReplay,c!=null)for(m=0;m<c.length;m+=3){var w=c[m],k=c[m+1],D=w[rn]||null;if(typeof k=="function")D||wx(c);else if(D){var q=null;if(k&&k.hasAttribute("formAction")){if(w=k,D=k[rn]||null)q=D.formAction;else if(ph(w)!==null)continue}else q=D.action;typeof q=="function"?c[m+1]=q:(c.splice(m,3),m-=3),wx(c)}}}function Cx(){function r(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(D){return w=D})},focusReset:"manual",scroll:"manual"})}function a(){w!==null&&(w(),w=null),m||setTimeout(c,20)}function c(){if(!m&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,w=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(c,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),w!==null&&(w(),w=null)}}}function gh(r){this._internalRoot=r}ql.prototype.render=gh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var c=a.current,m=wn();gx(c,m,r,a,null,null)},ql.prototype.unmount=gh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;gx(r.current,2,null,r,null,null),xl(),a[ra]=null}};function ql(r){this._internalRoot=r}ql.prototype.unstable_scheduleHydration=function(r){if(r){var a=M_();r={blockedOn:null,target:r,priority:a};for(var c=0;c<ai.length&&a!==0&&a<ai[c].priority;c++);ai.splice(c,0,r),c===0&&Ex(r)}};var Tx=t.version;if(Tx!=="19.2.0")throw Error(i(527,Tx,"19.2.0"));J.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var K2={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$l.isDisabled&&$l.supportsFiber)try{mt=$l.inject(K2),at=$l}catch{}}return Xs.createRoot=function(r,a){if(!s(r))throw Error(i(299));var c=!1,m="",w=LE,k=DE,D=ME;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(w=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(D=a.onRecoverableError)),a=px(r,1,!1,null,null,c,m,null,w,k,D,Cx),r[ra]=a.current,Zd(r),new gh(a)},Xs.hydrateRoot=function(r,a,c){if(!s(r))throw Error(i(299));var m=!1,w="",k=LE,D=DE,q=ME,Y=null;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onUncaughtError!==void 0&&(k=c.onUncaughtError),c.onCaughtError!==void 0&&(D=c.onCaughtError),c.onRecoverableError!==void 0&&(q=c.onRecoverableError),c.formState!==void 0&&(Y=c.formState)),a=px(r,1,!0,a,c??null,m,w,Y,k,D,q,Cx),a.context=mx(null),c=a.current,m=wn(),m=su(m),w=$r(m),w.callback=null,Gr(c,w,m),c=m,a.current.lanes=c,as(a,c),nr(a),r[ra]=a.current,Zd(r),new ql(a)},Xs.version="19.2.0",Xs}var Bx;function rM(){if(Bx)return vh.exports;Bx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vh.exports=nM(),vh.exports}var iM=rM(),Qa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},aM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sM=class{#e=aM;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ui=new sM;function oM(e){setTimeout(e,0)}var Vi=typeof window>"u"||"Deno"in globalThis;function Jt(){}function lM(e,t){return typeof e=="function"?e(t):e}function Wy(e){return typeof e=="number"&&e>=0&&e!==1/0}function MN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ui(e,t){return typeof e=="function"?e(t):e}function Hn(e,t){return typeof e=="function"?e(t):e}function Fx(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:l,queryKey:u,stale:o}=e;if(u){if(i){if(t.queryHash!==Rv(u,t.options))return!1}else if(!po(t.queryKey,u))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||l&&!l(t))}function Px(e,t){const{exact:n,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Wi(t.options.mutationKey)!==Wi(l))return!1}else if(!po(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function Rv(e,t){return(t?.queryKeyHashFn||Wi)(e)}function Wi(e){return JSON.stringify(e,(t,n)=>Ky(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function po(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>po(e[n],t[n])):!1}var cM=Object.prototype.hasOwnProperty;function BN(e,t){if(e===t)return e;const n=Ux(e)&&Ux(t);if(!n&&!(Ky(e)&&Ky(t)))return t;const s=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),u=l.length,o=n?new Array(u):{};let d=0;for(let h=0;h<u;h++){const p=n?h:l[h],f=e[p],g=t[p];if(f===g){o[p]=f,(n?h<s:cM.call(e,p))&&d++;continue}if(f===null||g===null||typeof f!="object"||typeof g!="object"){o[p]=g;continue}const b=BN(f,g);o[p]=b,b===f&&d++}return s===u&&d===s?e:o}function pc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ux(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ky(e){if(!jx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jx(e){return Object.prototype.toString.call(e)==="[object Object]"}function uM(e){return new Promise(t=>{Ui.setTimeout(t,e)})}function Yy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?BN(e,t):t}function dM(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function hM(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Nv=Symbol();function FN(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Nv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function PN(e,t){return typeof e=="function"?e(...t):!!e}var fM=class extends Qa{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Vi&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Ov=new fM;function Xy(){let e,t;const n=new Promise((s,l)=>{e=s,t=l});n.status="pending",n.catch(()=>{});function i(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},n.reject=s=>{i({status:"rejected",reason:s}),t(s)},n}var pM=oM;function mM(){let e=[],t=0,n=o=>{o()},i=o=>{o()},s=pM;const l=o=>{t?e.push(o):s(()=>{n(o)})},u=()=>{const o=e;e=[],o.length&&s(()=>{i(()=>{o.forEach(d=>{n(d)})})})};return{batch:o=>{let d;t++;try{d=o()}finally{t--,t||u()}return d},batchCalls:o=>(...d)=>{l(()=>{o(...d)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{i=o},setScheduler:o=>{s=o}}}var Lt=mM(),gM=class extends Qa{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Vi&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},mc=new gM;function bM(e){return Math.min(1e3*2**e,3e4)}function UN(e){return(e??"online")==="online"?mc.isOnline():!0}var Zy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function jN(e){let t=!1,n=0,i;const s=Xy(),l=()=>s.status!=="pending",u=E=>{if(!l()){const y=new Zy(E);g(y),e.onCancel?.(y)}},o=()=>{t=!0},d=()=>{t=!1},h=()=>Ov.isFocused()&&(e.networkMode==="always"||mc.isOnline())&&e.canRun(),p=()=>UN(e.networkMode)&&e.canRun(),f=E=>{l()||(i?.(),s.resolve(E))},g=E=>{l()||(i?.(),s.reject(E))},b=()=>new Promise(E=>{i=y=>{(l()||h())&&E(y)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),x=()=>{if(l())return;let E;const y=n===0?e.initialPromise:void 0;try{E=y??e.fn()}catch(S){E=Promise.reject(S)}Promise.resolve(E).then(f).catch(S=>{if(l())return;const v=e.retry??(Vi?0:3),_=e.retryDelay??bM,C=typeof _=="function"?_(n,S):_,N=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,S);if(t||!N){g(S);return}n++,e.onFail?.(n,S),uM(C).then(()=>h()?void 0:b()).then(()=>{t?g(S):x()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(i?.(),s),cancelRetry:o,continueRetry:d,canStart:p,start:()=>(p()?x():b().then(x),s)}}var zN=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wy(this.gcTime)&&(this.#e=Ui.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ui.clearTimeout(this.#e),this.#e=void 0)}},yM=class extends zN{#e;#t;#n;#i;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Hx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Hx(this.options);t.data!==void 0&&(this.setState(zx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Yy(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Hn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ui(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!MN(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const o=this.observers.find(d=>d.options.queryFn);o&&this.setOptions(o.options)}const n=new AbortController,i=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const o=FN(this.options,t),h=(()=>{const p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(p),p})();return this.#o=!1,this.options.persister?this.options.persister(o,h,this):o(h)},u=(()=>{const o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:s};return i(o),o})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#a({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=jN({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:o=>{o instanceof Zy&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(o,d)=>{this.#a({type:"failed",failureCount:o,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const o=await this.#r.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#n.config.onSuccess?.(o,this),this.#n.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof Zy){if(o.silent)return this.#r.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#a({type:"error",error:o}),this.#n.config.onError?.(o,this),this.#n.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...HN(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...zx(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Lt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function HN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:UN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Hx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var vM=class extends Qa{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=Xy(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#o;#a;#m;#h;#f;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),qx(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qy(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qy(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!pc(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&$x(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||Hn(this.options.enabled,this.#t)!==Hn(t.enabled,this.#t)||ui(this.options.staleTime,this.#t)!==ui(t.staleTime,this.#t))&&this.#g();const s=this.#b();i&&(this.#t!==n||Hn(this.options.enabled,this.#t)!==Hn(t.enabled,this.#t)||s!==this.#l)&&this.#y(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return SM(this,n)&&(this.#i=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Jt)),t}#g(){this.#_();const e=ui(this.options.staleTime,this.#t);if(Vi||this.#i.isStale||!Wy(e))return;const n=MN(this.#i.dataUpdatedAt,e)+1;this.#c=Ui.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#S(),this.#l=e,!(Vi||Hn(this.options.enabled,this.#t)===!1||!Wy(this.#l)||this.#l===0)&&(this.#u=Ui.setInterval(()=>{(this.options.refetchIntervalInBackground||Ov.isFocused())&&this.#d()},this.#l))}#v(){this.#g(),this.#y(this.#b())}#_(){this.#c&&(Ui.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(Ui.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#i,l=this.#r,u=this.#s,d=e!==n?e.state:this.#n,{state:h}=e;let p={...h},f=!1,g;if(t._optimisticResults){const R=this.hasListeners(),I=!R&&qx(e,t),M=R&&$x(e,n,t,i);(I||M)&&(p={...p,...HN(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:E}=p;g=p.data;let y=!1;if(t.placeholderData!==void 0&&g===void 0&&E==="pending"){let R;s?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(R=s.data,y=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,R!==void 0&&(E="success",g=Yy(s?.data,R,t),f=!0)}if(t.select&&g!==void 0&&!y)if(s&&g===l?.data&&t.select===this.#m)g=this.#h;else try{this.#m=t.select,g=t.select(g),g=Yy(s?.data,g,t),this.#h=g,this.#a=null}catch(R){this.#a=R}this.#a&&(b=this.#a,g=this.#h,x=Date.now(),E="error");const S=p.fetchStatus==="fetching",v=E==="pending",_=E==="error",C=v&&S,N=g!==void 0,O={status:E,fetchStatus:p.fetchStatus,isPending:v,isSuccess:E==="success",isError:_,isInitialLoading:C,isLoading:C,data:g,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!v,isLoadingError:_&&!N,isPaused:p.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&N,isStale:Iv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Hn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=P=>{O.status==="error"?P.reject(O.error):O.data!==void 0&&P.resolve(O.data)},I=()=>{const P=this.#o=O.promise=Xy();R(P)},M=this.#o;switch(M.status){case"pending":e.queryHash===n.queryHash&&R(M);break;case"fulfilled":(O.status==="error"||O.data!==M.value)&&I();break;case"rejected":(O.status!=="error"||O.error!==M.reason)&&I();break}}return O}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#f=this.#t),pc(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#i).some(u=>{const o=u;return this.#i[o]!==e[o]&&l.has(o)})};this.#x({listeners:n()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#x(e){Lt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function _M(e,t){return Hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qx(e,t){return _M(e,t)||e.state.data!==void 0&&Qy(e,t,t.refetchOnMount)}function Qy(e,t,n){if(Hn(t.enabled,e)!==!1&&ui(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Iv(e,t)}return!1}function $x(e,t,n,i){return(e!==t||Hn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Iv(e,n)}function Iv(e,t){return Hn(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function SM(e,t){return!pc(e.getCurrentResult(),t)}function Gx(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},d=0;const h=async()=>{let p=!1;const f=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=FN(t.options,t.fetchOptions),b=async(x,E,y)=>{if(p)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);const v=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:E,direction:y?"backward":"forward",meta:t.options.meta};return f(A),A})(),_=await g(v),{maxPages:C}=t.options,N=y?hM:dM;return{pages:N(x.pages,_,C),pageParams:N(x.pageParams,E,C)}};if(s&&l.length){const x=s==="backward",E=x?EM:Vx,y={pages:l,pageParams:u},S=E(i,y);o=await b(y,S,x)}else{const x=e??l.length;do{const E=d===0?u[0]??i.initialPageParam:Vx(i,o);if(d>0&&E==null)break;o=await b(o,E),d++}while(d<x)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function Vx(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function EM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var xM=class extends zN{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||qN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=jN({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",s=!this.#i.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:s})}const l=await this.#i.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{throw await this.#n.config.onError?.(l,e,this.state.context,this,n),await this.options.onError?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,l,e,this.state.context,n),l}finally{this.#r({type:"error",error:l})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Lt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function qN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wM=class extends Qa{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const i=new xM({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=Gl(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Gl(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Gl(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=Gl(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Lt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Px(t,n))}findAll(e={}){return this.getAll().filter(t=>Px(e,t))}notify(e){Lt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Lt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Jt))))}};function Gl(e){return e.options.scope?.id}var CM=class extends Qa{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),pc(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Wi(n.mutationKey)!==Wi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??qN();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Lt.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,i=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,n,i,s),this.#i.onSettled?.(t.data,null,n,i,s)):t?.type==="error"&&(this.#i.onError?.(t.error,n,i,s),this.#i.onSettled?.(void 0,t.error,n,i,s))}this.listeners.forEach(n=>{n(this.#t)})})}},TM=class extends Qa{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??Rv(i,t);let l=this.get(s);return l||(l=new yM({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Lt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Fx(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Fx(e,n)):t}notify(e){Lt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Lt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Lt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},AM=class{#e;#t;#n;#i;#r;#s;#o;#a;constructor(e={}){this.#e=e.queryCache||new TM,this.#t=e.mutationCache||new wM,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=Ov.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=mc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ui(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,u=lM(t,l);if(u!==void 0)return this.#e.build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Lt.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Lt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Lt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Lt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return Lt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Lt.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,n);return n.throwOnError||(l=l.catch(Jt)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ui(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=Gx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=Gx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return mc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Wi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{po(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Wi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{po(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rv(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Nv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},$N=K.createContext(void 0),mn=e=>{const t=K.useContext($N);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kM=({client:e,children:t})=>(K.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx($N.Provider,{value:e,children:t})),GN=K.createContext(!1),RM=()=>K.useContext(GN);GN.Provider;function NM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var OM=K.createContext(NM()),IM=()=>K.useContext(OM),LM=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},DM=e=>{K.useEffect(()=>{e.clearReset()},[e])},MM=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||PN(n,[e.error,i])),BM=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>n(i(...s)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},FM=(e,t)=>e.isLoading&&e.isFetching&&!t,PM=(e,t)=>e?.suspense&&t.isPending,Wx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function UM(e,t,n){const i=RM(),s=IM(),l=mn(),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=i?"isRestoring":"optimistic",BM(u),LM(u,s),DM(s);const o=!l.getQueryCache().get(u.queryHash),[d]=K.useState(()=>new t(l,u)),h=d.getOptimisticResult(u),p=!i&&e.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(f=>{const g=p?d.subscribe(Lt.batchCalls(f)):Jt;return d.updateResult(),g},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),K.useEffect(()=>{d.setOptions(u)},[u,d]),PM(u,h))throw Wx(u,d,s);if(MM({result:h,errorResetBoundary:s,throwOnError:u.throwOnError,query:l.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,h),u.experimental_prefetchInRender&&!Vi&&FM(h,i)&&(o?Wx(u,d,s):l.getQueryCache().get(u.queryHash)?.promise)?.catch(Jt).finally(()=>{d.updateResult()}),u.notifyOnChangeProps?h:d.trackResult(h)}function fi(e,t){return UM(e,vM)}function Yn(e,t){const n=mn(),[i]=K.useState(()=>new CM(n,e));K.useEffect(()=>{i.setOptions(e)},[i,e]);const s=K.useSyncExternalStore(K.useCallback(u=>i.subscribe(Lt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=K.useCallback((u,o)=>{i.mutate(u,o).catch(Jt)},[i]);if(s.error&&PN(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const Jy=new WeakMap,jM=new WeakMap,gc={current:[]};let xh=!1,so=0;const ao=new Set,Vl=new Map;function VN(e){for(const t of e){if(gc.current.includes(t))continue;gc.current.push(t),t.recompute();const n=jM.get(t);if(n)for(const i of n){const s=Jy.get(i);s?.length&&VN(s)}}}function zM(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function HM(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function WN(e){if(so>0&&!Vl.has(e)&&Vl.set(e,e.prevState),ao.add(e),!(so>0)&&!xh)try{for(xh=!0;ao.size>0;){const t=Array.from(ao);ao.clear();for(const n of t){const i=Vl.get(n)??n.prevState;n.prevState=i,zM(n)}for(const n of t){const i=Jy.get(n);i&&(gc.current.push(n),VN(i))}for(const n of t){const i=Jy.get(n);if(i)for(const s of i)HM(s)}}}finally{xh=!1,gc.current=[],Vl.clear()}}function oo(e){so++;try{e()}finally{if(so--,so===0){const t=ao.values().next().value;t&&WN(t)}}}function qM(e){return typeof e=="function"}class $M{constructor(t,n){this.listeners=new Set,this.subscribe=i=>{var s,l;this.listeners.add(i);const u=(l=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:l.call(s,i,this);return()=>{this.listeners.delete(i),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,i,s;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):qM(t)?this.state=t(this.prevState):this.state=t,(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),WN(this)}}const di="__TSR_index",Kx="popstate",Yx="beforeunload";function GM(e){let t=e.getLocation();const n=new Set,i=u=>{t=e.getLocation(),n.forEach(o=>o({location:t,action:u}))},s=u=>{e.notifyOnIndexChange??!0?i(u):t=e.getLocation()},l=async({task:u,navigateOpts:o,...d})=>{if(o?.ignoreBlocker??!1){u();return}const p=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&p.length&&f)for(const g of p){const b=bc(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:d.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,o,d)=>{const h=t.state[di];o=Xx(h+1,o),l({task:()=>{e.pushState(u,o),i({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:u,state:o})},replace:(u,o,d)=>{const h=t.state[di];o=Xx(h,o),l({task:()=>{e.replaceState(u,o),i({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:u,state:o})},go:(u,o)=>{l({task:()=>{e.go(u),s({type:"GO",index:u})},navigateOpts:o,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[di]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,u]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function Xx(e,t){t||(t={});const n=Lv();return{...t,key:n,__TSR_key:n,[di]:e}}function VM(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let s=[];const l=()=>s,u=R=>s=R,o=(R=>R),d=(()=>bc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const R=Lv();t.history.replaceState({[di]:0,key:R,__TSR_key:R},"")}let h=d(),p,f=!1,g=!1,b=!1,x=!1;const E=()=>h;let y,S;const v=()=>{y&&(O._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),O._ignoreSubscribers=!1,y=void 0,S=void 0,p=void 0)},_=(R,I,M)=>{const P=o(I);S||(p=h),h=bc(I,M),y={href:P,state:M,isPush:y?.isPush||R==="push"},S||(S=Promise.resolve().then(()=>v()))},C=R=>{h=d(),O.notify({type:R})},N=async()=>{if(g){g=!1;return}const R=d(),I=R.state[di]-h.state[di],M=I===1,P=I===-1,j=!M&&!P||f;f=!1;const z=j?"GO":P?"BACK":"FORWARD",G=j?{type:"GO",index:I}:{type:P?"BACK":"FORWARD"};if(b)b=!1;else{const V=l();if(typeof document<"u"&&V.length){for(const W of V)if(await W.blockerFn({currentLocation:h,nextLocation:R,action:z})){g=!0,t.history.go(1),O.notify(G);return}}}h=d(),O.notify(G)},A=R=>{if(x){x=!1;return}let I=!1;const M=l();if(typeof document<"u"&&M.length)for(const P of M){const j=P.enableBeforeUnload??!0;if(j===!0){I=!0;break}if(typeof j=="function"&&j()===!0){I=!0;break}}if(I)return R.preventDefault(),R.returnValue=""},O=GM({getLocation:E,getLength:()=>t.history.length,pushState:(R,I)=>_("push",R,I),replaceState:(R,I)=>_("replace",R,I),back:R=>(R&&(b=!0),x=!0,t.history.back()),forward:R=>{R&&(b=!0),x=!0,t.history.forward()},go:R=>{f=!0,t.history.go(R)},createHref:R=>o(R),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(Yx,A,{capture:!0}),t.removeEventListener(Kx,N)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(Yx,A,{capture:!0}),t.addEventListener(Kx,N),t.history.pushState=function(...R){const I=n.apply(t.history,R);return O._ignoreSubscribers||C("PUSH"),I},t.history.replaceState=function(...R){const I=i.apply(t.history,R);return O._ignoreSubscribers||C("REPLACE"),I},O}function bc(e,t){const n=e.indexOf("#"),i=e.indexOf("?"),s=Lv();return{href:e,pathname:e.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:e.length),hash:n>-1?e.substring(n):"",search:i>-1?e.slice(i,n===-1?void 0:n):"",state:t||{[di]:0,key:s,__TSR_key:s}}}function Lv(){return(Math.random()+1).toString(36).substring(7)}function yc(e){return e[e.length-1]}function WM(e){return typeof e=="function"}function zi(e,t){return WM(e)?e(t):e}const KM=Object.prototype.hasOwnProperty;function zn(e,t){if(e===t)return e;const n=t,i=Jx(e)&&Jx(n);if(!i&&!(vc(e)&&vc(n)))return n;const s=i?e:Zx(e);if(!s)return n;const l=i?n:Zx(n);if(!l)return n;const u=s.length,o=l.length,d=i?new Array(o):{};let h=0;for(let p=0;p<o;p++){const f=i?p:l[p],g=e[f],b=n[f];if(g===b){d[f]=g,(i?p<u:KM.call(e,f))&&h++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){d[f]=b;continue}const x=zn(g,b);d[f]=x,x===g&&h++}return u===o&&h===u?e:d}function Zx(e){const t=[],n=Object.getOwnPropertyNames(e);for(const s of n){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}const i=Object.getOwnPropertySymbols(e);for(const s of i){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}return t}function vc(e){if(!Qx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Qx(n)||!n.hasOwnProperty("isPrototypeOf"))}function Qx(e){return Object.prototype.toString.call(e)==="[object Object]"}function Jx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,s=e.length;i<s;i++)if(!Hi(e[i],t[i],n))return!1;return!0}if(vc(e)&&vc(t)){const i=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!i||t[u]!==void 0)&&!Hi(e[u],t[u],n))return!1;return!0}let s=0;if(!i)s=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&s++;let l=0;for(const u in t)if((!i||t[u]!==void 0)&&(l++,l>s||!Hi(e[u],t[u],n)))return!1;return s===l}return!1}function Wa(e){let t,n;const i=new Promise((s,l)=>{t=s,n=l});return i.status="pending",i.resolve=s=>{i.status="resolved",i.value=s,t(s),e?.(s)},i.reject=s=>{i.status="rejected",n(s)},i}function hi(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function ew(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function tw(e,t){if(!e)return e;const n=/%25|%5C/gi;let i=0,s="",l;for(;(l=n.exec(e))!==null;)s+=ew(e.slice(i,l.index))+l[0],i=n.lastIndex;return s+ew(i?e.slice(i):e)}var YM="Invariant failed";function Lr(e,t){if(!e)throw new Error(YM)}function _c(e){const t=new Map;let n,i;const s=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,i&&(i.next=l,l.prev=i)):(l.next.prev=void 0,n=l.next,l.next=void 0,i&&(l.prev=i,i.next=l)),i=l)};return{get(l){const u=t.get(l);if(u)return s(u),u.value},set(l,u){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===i&&(i=void 0)}const o=t.get(l);if(o)o.value=u,s(o);else{const d={key:l,value:u,prev:i};i&&(i.next=d),i=d,n||(n=d),t.set(l,d)}},clear(){t.clear(),n=void 0,i=void 0}}}const Ka=0,Ki=1,Yi=2,mo=3,XM=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,ZM=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,QM=/^([^{]*)\{\$\}([^}]*)$/;function Dv(e,t,n=new Uint16Array(6)){const i=e.indexOf("/",t),s=i===-1?e.length:i,l=e.substring(t,s);if(!l||!l.includes("$"))return n[0]=Ka,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(l==="$"){const h=e.length;return n[0]=Yi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=Ki,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const u=l.match(QM);if(u){const p=u[1].length;return n[0]=Yi,n[1]=t+p,n[2]=t+p+1,n[3]=t+p+2,n[4]=t+p+3,n[5]=e.length,n}const o=l.match(ZM);if(o){const h=o[1],p=o[2],f=o[3],g=h.length;return n[0]=mo,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+p.length,n[4]=s-f.length,n[5]=s,n}const d=l.match(XM);if(d){const h=d[1],p=d[2],f=d[3],g=h.length;return n[0]=Ki,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+p.length,n[4]=s-f.length,n[5]=s,n}return n[0]=Ka,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function Bc(e,t,n,i,s,l,u){u?.(n);let o=i;{const d=n.fullPath??n.from,h=d.length,p=n.options?.caseSensitive??e;for(;o<h;){const f=Dv(d,o,t);let g;const b=o,x=f[5];switch(o=x+1,l++,f[0]){case Ka:{const y=d.substring(f[2],f[3]);if(p){const S=s.static?.get(y);if(S)g=S;else{s.static??=new Map;const v=go(n.fullPath??n.from);v.parent=s,v.depth=l,g=v,s.static.set(y,v)}}else{const S=y.toLowerCase(),v=s.staticInsensitive?.get(S);if(v)g=v;else{s.staticInsensitive??=new Map;const _=go(n.fullPath??n.from);_.parent=s,_.depth=l,g=_,s.staticInsensitive.set(S,_)}}break}case Ki:{const y=d.substring(b,f[1]),S=d.substring(f[4],x),v=p&&!!(y||S),_=y?v?y:y.toLowerCase():void 0,C=S?v?S:S.toLowerCase():void 0,N=s.dynamic?.find(A=>A.caseSensitive===v&&A.prefix===_&&A.suffix===C);if(N)g=N;else{const A=Ch(Ki,n.fullPath??n.from,v,_,C);g=A,A.depth=l,A.parent=s,s.dynamic??=[],s.dynamic.push(A)}break}case mo:{const y=d.substring(b,f[1]),S=d.substring(f[4],x),v=p&&!!(y||S),_=y?v?y:y.toLowerCase():void 0,C=S?v?S:S.toLowerCase():void 0,N=s.optional?.find(A=>A.caseSensitive===v&&A.prefix===_&&A.suffix===C);if(N)g=N;else{const A=Ch(mo,n.fullPath??n.from,v,_,C);g=A,A.parent=s,A.depth=l,s.optional??=[],s.optional.push(A)}break}case Yi:{const y=d.substring(b,f[1]),S=d.substring(f[4],x),v=p&&!!(y||S),_=y?v?y:y.toLowerCase():void 0,C=S?v?S:S.toLowerCase():void 0,N=Ch(Yi,n.fullPath??n.from,v,_,C);g=N,N.parent=s,N.depth=l,s.wildcard??=[],s.wildcard.push(N)}}s=g}if((n.path||!n.children)&&!n.isRoot){const f=d.endsWith("/");f||(s.notFound=n),(!s.route||!s.isIndex&&f)&&(s.route=n),s.isIndex||=f}}if(n.children)for(const d of n.children)Bc(e,t,d,o,s,l,u)}function wh(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Fi(e){if(e.static)for(const t of e.static.values())Fi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Fi(t);if(e.dynamic?.length){e.dynamic.sort(wh);for(const t of e.dynamic)Fi(t)}if(e.optional?.length){e.optional.sort(wh);for(const t of e.optional)Fi(t)}if(e.wildcard?.length){e.wildcard.sort(wh);for(const t of e.wildcard)Fi(t)}}function go(e){return{kind:Ka,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Ch(e,t,n,i,s){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:i,suffix:s}}function JM(e,t){const n=go("/"),i=new Uint16Array(6);for(const s of e)Bc(!1,i,s,1,n,0);Fi(n),t.masksTree=n,t.flatCache=_c(1e3)}function eB(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const i=Mv(e,t.masksTree);return t.flatCache.set(e,i),i}function tB(e,t,n,i,s){e||="/",i||="/";const l=t?`case\0${e}`:e;let u=s.singleCache.get(l);if(!u){u=go("/");const o=new Uint16Array(6);Bc(t,o,{from:e},1,u,0),s.singleCache.set(l,u)}return Mv(i,u,n)}function nB(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,s=t.matchCache.get(i);if(s!==void 0)return s;e||="/";const l=Mv(e,t.segmentTree,n);return l&&(l.branch=sB(l.route)),t.matchCache.set(i,l),l}function rB(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function iB(e,t=!1,n){const i=go(e.fullPath),s=new Uint16Array(6),l={},u={};let o=0;return Bc(t,s,e,1,i,0,h=>{if(n?.(h,o),Lr(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,o!==0&&h.path){const p=rB(h.fullPath);(!u[p]||h.fullPath.endsWith("/"))&&(u[p]=h)}o++}),Fi(i),{processedTree:{segmentTree:i,singleCache:_c(1e3),matchCache:_c(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Mv(e,t,n=!1){const i=e.split("/"),s=lB(e,i,t,n);if(!s)return null;const l=aB(e,i,s),u="**"in s;return u&&(l["**"]=s["**"]),{route:u?s.node.notFound??s.node.route:s.node.route,params:l}}function aB(e,t,n){const i=oB(n.node);let s=null;const l={};for(let u=0,o=0,d=0;o<i.length;u++,o++,d++){const h=i[o],p=t[u],f=d;if(p&&(d+=p.length),h.kind===Ki){s??=n.node.fullPath.split("/");const g=s[o],b=h.prefix?.length??0;if(g.charCodeAt(b)===123){const E=h.suffix?.length??0,y=g.substring(b+2,g.length-E-1),S=p.substring(b,p.length-E);l[y]=decodeURIComponent(S)}else{const E=g.substring(1);l[E]=decodeURIComponent(p)}}else if(h.kind===mo){if(n.skipped&1<<o){u--;continue}s??=n.node.fullPath.split("/");const g=s[o],b=h.prefix?.length??0,x=h.suffix?.length??0,E=g.substring(b+3,g.length-x-1),y=h.suffix||h.prefix?p.substring(b,p.length-x):p;y&&(l[E]=decodeURIComponent(y))}else if(h.kind===Yi){const g=h,b=e.substring(f+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),x=decodeURIComponent(b);l["*"]=x,l._splat=x;break}}return l}function sB(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function oB(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function lB(e,t,n,i){const s=!yc(t),l=s&&e!=="/",u=t.length-(s?1:0),o=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,h=null,p=null;for(;o.length;){const f=o.pop();let{node:g,index:b,skipped:x,depth:E,statics:y,dynamics:S,optionals:v}=f;i&&g.notFound&&Th(h,f)&&(h=f);const _=b===u;if(_){if(g.route&&(!l||g.isIndex)&&(Th(p,f)&&(p=f),y===u))return p;if(!g.optional&&!g.wildcard)continue}const C=_?void 0:t[b];let N;if(g.wildcard&&Th(d,f))for(const A of g.wildcard){const{prefix:O,suffix:R}=A;if(!(O&&(_||!(A.caseSensitive?C:N??=C.toLowerCase()).startsWith(O)))){if(R){if(_)continue;const I=t.slice(b).join("/").slice(-R.length);if((A.caseSensitive?I:I.toLowerCase())!==R)continue}d={node:A,index:b,skipped:x,depth:E,statics:y,dynamics:S,optionals:v};break}}if(g.optional){const A=x|1<<E,O=E+1;for(let R=g.optional.length-1;R>=0;R--){const I=g.optional[R];o.push({node:I,index:b,skipped:A,depth:O,statics:y,dynamics:S,optionals:v})}if(!_)for(let R=g.optional.length-1;R>=0;R--){const I=g.optional[R],{prefix:M,suffix:P}=I;if(M||P){const j=I.caseSensitive?C:N??=C.toLowerCase();if(M&&!j.startsWith(M)||P&&!j.endsWith(P))continue}o.push({node:I,index:b+1,skipped:x,depth:O,statics:y,dynamics:S,optionals:v+1})}}if(!_&&g.dynamic&&C)for(let A=g.dynamic.length-1;A>=0;A--){const O=g.dynamic[A],{prefix:R,suffix:I}=O;if(R||I){const M=O.caseSensitive?C:N??=C.toLowerCase();if(R&&!M.startsWith(R)||I&&!M.endsWith(I))continue}o.push({node:O,index:b+1,skipped:x,depth:E+1,statics:y,dynamics:S+1,optionals:v})}if(!_&&g.staticInsensitive){const A=g.staticInsensitive.get(N??=C.toLowerCase());A&&o.push({node:A,index:b+1,skipped:x,depth:E+1,statics:y+1,dynamics:S,optionals:v})}if(!_&&g.static){const A=g.static.get(C);A&&o.push({node:A,index:b+1,skipped:x,depth:E+1,statics:y+1,dynamics:S,optionals:v})}}if(p)return p;if(d)return d;if(i&&h){let f=h.index;for(let b=0;b<h.index;b++)f+=t[b].length;const g=f===e.length?"/":e.slice(f);return{node:h.node,skipped:h.skipped,"**":decodeURIComponent(g)}}return null}function Th(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&t.optionals>e.optionals):!0}function ic(e){return Bv(e.filter(t=>t!==void 0).join("/"))}function Bv(e){return e.replace(/\/{2,}/g,"/")}function KN(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function qi(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function ac(e){return qi(KN(e))}function Sc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function cB(e,t,n){return Sc(e,n)===Sc(t,n)}function uB({base:e,to:t,trailingSlash:n="never",cache:i}){const s=t.startsWith("/"),l=!s&&t===".";let u;if(i){u=s?t:l?e:e+"\0"+t;const f=i.get(u);if(f)return f}let o;if(l)o=e.split("/");else if(s)o=t.split("/");else{for(o=e.split("/");o.length>1&&yc(o)==="";)o.pop();const f=t.split("/");for(let g=0,b=f.length;g<b;g++){const x=f[g];x===""?g?g===b-1&&o.push(x):o=[x]:x===".."?o.pop():x==="."||o.push(x)}}o.length>1&&(yc(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));let d,h="";for(let f=0;f<o.length;f++){f>0&&(h+="/");const g=o[f];if(!g)continue;d=Dv(g,0,d);const b=d[0];if(b===Ka){h+=g;continue}const x=d[5],E=g.substring(0,d[1]),y=g.substring(d[4],x),S=g.substring(d[2],d[3]);b===Ki?h+=E||y?`${E}{$${S}}${y}`:`$${S}`:b===Yi?h+=E||y?`${E}{$}${y}`:"$":h+=`${E}{-$${S}}${y}`}h=Bv(h);const p=h||"/";return u&&i&&i.set(u,p),p}function Ah(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?encodeURI(i):dB(i,n)}function kh({path:e,params:t,decodeCharMap:n}){let i=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const l=e.length;let u=0,o,d="";for(;u<l;){const p=u;o=Dv(e,p,o);const f=o[5];if(u=f+1,p===f)continue;const g=o[0];if(g===Ka){d+="/"+e.substring(p,f);continue}if(g===Yi){const b=t._splat;s._splat=b,s["*"]=b;const x=e.substring(p,o[1]),E=e.substring(o[4],f);if(!b){i=!0,(x||E)&&(d+="/"+x+E);continue}const y=Ah("_splat",t,n);d+="/"+x+y+E;continue}if(g===Ki){const b=e.substring(o[2],o[3]);!i&&!(b in t)&&(i=!0),s[b]=t[b];const x=e.substring(p,o[1]),E=e.substring(o[4],f),y=Ah(b,t,n)??"undefined";d+="/"+x+y+E;continue}if(g===mo){const b=e.substring(o[2],o[3]),x=e.substring(p,o[1]),E=e.substring(o[4],f),y=t[b];if(y==null){(x||E)&&(d+="/"+x+E);continue}s[b]=y;const S=Ah(b,t,n)??"";d+="/"+x+S+E;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:s,interpolatedPath:d||"/",isMissingParams:i}}function dB(e,t){let n=encodeURIComponent(e);if(t)for(const[i,s]of t)n=n.replaceAll(i,s);return n}function Kn(e){return!!e?.isNotFound}function hB(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Ec="tsr-scroll-restoration-v1_3",fB=(e,t)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{e(...i),n=null},t))}};function pB(){const e=hB();if(!e)return null;const t=e.getItem(Ec);let n=t?JSON.parse(t):{};return{state:n,set:i=>(n=zi(i,n)||n,e.setItem(Ec,JSON.stringify(n)))}}const Wl=pB(),ev=e=>e.state.__TSR_key||e.href;function mB(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let xc=!1;function YN({storageKey:e,key:t,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:s,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const o=t||window.history.state?.__TSR_key,d=u[o];xc=!0;e:{if(i&&d&&Object.keys(d).length>0){for(const f in d){const g=d[f];if(f==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(f){const b=document.querySelector(f);b&&(b.scrollLeft=g.scrollX,b.scrollTop=g.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const g=document.getElementById(h);g&&g.scrollIntoView(f)}break e}const p={top:0,left:0,behavior:n};if(window.scrollTo(p),s)for(const f of s){if(f==="window")continue;const g=typeof f=="function"?f():document.querySelector(f);g&&g.scrollTo(p)}}xc=!1}function gB(e,t){if(!Wl&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Wl))return;e.isScrollRestorationSetup=!0,xc=!1;const i=e.options.getScrollRestorationKey||ev;window.history.scrollRestoration="manual";const s=l=>{if(xc||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const d=l.target.getAttribute("data-scroll-restoration-id");d?u=`[data-scroll-restoration-id="${d}"]`:u=mB(l.target)}const o=i(e.state.location);Wl.set(d=>{const h=d[o]||={},p=h[u]||={};if(u==="window")p.scrollX=window.scrollX||0,p.scrollY=window.scrollY||0;else if(u){const f=document.querySelector(u);f&&(p.scrollX=f.scrollLeft||0,p.scrollY=f.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",fB(s,100),!0),e.subscribe("onRendered",l=>{const u=i(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(YN({storageKey:Ec,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Wl.set(o=>(o[u]||={},o)))})}function bB(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function yB(e,t=String){const n=new URLSearchParams;for(const i in e){const s=e[i];s!==void 0&&n.set(i,t(s))}return n.toString()}function Rh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function vB(e){const t=new URLSearchParams(e),n={};for(const[i,s]of t.entries()){const l=n[i];l==null?n[i]=Rh(s):Array.isArray(l)?l.push(Rh(s)):n[i]=[l,Rh(s)]}return n}const _B=EB(JSON.parse),SB=xB(JSON.stringify,JSON.parse);function EB(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=vB(t);for(const i in n){const s=n[i];if(typeof s=="string")try{n[i]=e(s)}catch{}}return n}}function xB(e,t){const n=typeof t=="function";function i(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const l=yB(s,i);return l?`?${l}`:""}}const Tn="__root__";function XN(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function sr(e){return e instanceof Response&&!!e.options}const sc=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Fc=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),ZN=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Lr(n.options.notFoundComponent);const i=e.matches.find(s=>s.routeId===n.id);Lr(i,"Could not find match for route: "+n.id),e.updateMatch(i.id,s=>({...s,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,ZN(e,t))},li=(e,t,n)=>{if(!(!sr(n)&&!Kn(n))){if(sr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const i=sr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:i,isFetching:!1,error:n})),Kn(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw sr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(ZN(e,n),n)}},QN=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Zs=(e,t,n,i)=>{const{id:s,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=i,e.firstBadMatchIndex??=t,li(e,e.router.getMatch(s),n);try{u.options.onError?.(n)}catch(o){n=o,li(e,e.router.getMatch(s),n)}e.updateMatch(s,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},wB=(e,t,n,i)=>{const s=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){s.ssr=i.id===Tn;return}if(u?.ssr===!1){s.ssr=!1;return}const o=b=>b===!0&&u?.ssr==="data-only"?"data-only":b,d=e.router.options.defaultSsr??!0;if(i.options.ssr===void 0){s.ssr=o(d);return}if(typeof i.options.ssr!="function"){s.ssr=o(i.options.ssr);return}const{search:h,params:p}=s,f={search:Kl(h,s.searchError),params:Kl(p,s.paramsError),location:e.location,matches:e.matches.map(b=>({index:b.index,pathname:b.pathname,fullPath:b.fullPath,staticData:b.staticData,id:b.id,routeId:b.routeId,search:Kl(b.search,b.searchError),params:Kl(b.params,b.paramsError),ssr:b.ssr}))},g=i.options.ssr(f);if(hi(g))return g.then(b=>{s.ssr=o(b??d)});s.ssr=o(g??d)},JN=(e,t,n,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Fc(e,t)&&(n.options.loader||n.options.beforeLoad||nO(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{sc(e)},s);i._nonReactive.pendingTimeout=u}},CB=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;JN(e,t,n,i);const s=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&li(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(s):s()},TB=(e,t,n,i)=>{const s=e.router.getMatch(t),l=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Wa(()=>{l?.resolve()});const{paramsError:u,searchError:o}=s;u&&Zs(e,n,u,"PARSE_PARAMS"),o&&Zs(e,n,o,"VALIDATE_SEARCH"),JN(e,t,i,s);const d=new AbortController,h=e.matches[n-1]?.id,g={...(h?e.router.getMatch(h):void 0)?.context??e.router.options.context??void 0,...s.__routeContext};let b=!1;const x=()=>{b||(b=!0,e.updateMatch(t,O=>({...O,isFetching:"beforeLoad",fetchCount:O.fetchCount+1,abortController:d,context:g})))},E=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,O=>({...O,isFetching:!1}))};if(!i.options.beforeLoad){oo(()=>{x(),E()});return}s._nonReactive.beforeLoadPromise=Wa();const{search:y,params:S,cause:v}=s,_=Fc(e,t),C={search:y,abortController:d,params:S,preload:_,context:g,location:e.location,navigate:O=>e.router.navigate({...O,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?"preload":v,matches:e.matches,...e.router.options.additionalContext},N=O=>{if(O===void 0){oo(()=>{x(),E()});return}(sr(O)||Kn(O))&&(x(),Zs(e,n,O,"BEFORE_LOAD")),oo(()=>{x(),e.updateMatch(t,R=>({...R,__beforeLoadContext:O,context:{...R.context,...O}})),E()})};let A;try{if(A=i.options.beforeLoad(C),hi(A))return x(),A.catch(O=>{Zs(e,n,O,"BEFORE_LOAD")}).then(N)}catch(O){x(),Zs(e,n,O,"BEFORE_LOAD")}N(A)},AB=(e,t)=>{const{id:n,routeId:i}=e.matches[t],s=e.router.looseRoutesById[i],l=()=>{if(e.router.isServer){const d=wB(e,n,t,s);if(hi(d))return d.then(o)}return o()},u=()=>TB(e,n,t,s),o=()=>{if(QN(e,n))return;const d=CB(e,n,s);return hi(d)?d.then(u):u()};return l()},lo=(e,t,n)=>{const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([l,u,o])=>{const d=l?.meta,h=l?.links,p=l?.scripts,f=l?.styles;return{meta:d,links:h,headScripts:p,headers:o,scripts:u,styles:f}})},eO=(e,t,n,i)=>{const s=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:o,cause:d}=e.router.getMatch(t);let h=e.router.options.context??{};for(let f=0;f<=n;f++){const g=e.matches[f];if(!g)continue;const b=e.router.getMatch(g.id);b&&(h={...h,...b.__routeContext??{},...b.__beforeLoadContext??{}})}const p=Fc(e,t);return{params:l,deps:u,preload:!!p,parentMatchPromise:s,abortController:o,context:h,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:p?"preload":d,route:i,...e.router.options.additionalContext}},nw=async(e,t,n,i)=>{try{const s=e.router.getMatch(t);try{(!e.router.isServer||s.ssr===!0)&&tO(i);const l=i.options.loader?.(eO(e,t,n,i)),u=i.options.loader&&hi(l);if(!!(u||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(t,f=>({...f,isFetching:"loader"})),i.options.loader){const f=u?await l:l;li(e,e.router.getMatch(t),f),f!==void 0&&e.updateMatch(t,g=>({...g,loaderData:f}))}i._lazyPromise&&await i._lazyPromise;const d=lo(e,t,i),h=d?await d:void 0,p=s._nonReactive.minPendingPromise;p&&await p,i._componentsPromise&&await i._componentsPromise,e.updateMatch(t,f=>({...f,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...h}))}catch(l){let u=l;const o=s._nonReactive.minPendingPromise;o&&await o,Kn(l)&&await i.options.notFoundComponent?.preload?.(),li(e,e.router.getMatch(t),l);try{i.options.onError?.(l)}catch(p){u=p,li(e,e.router.getMatch(t),p)}const d=lo(e,t,i),h=d?await d:void 0;e.updateMatch(t,p=>({...p,error:u,status:"error",isFetching:!1,...h}))}}catch(s){const l=e.router.getMatch(t);if(l){const u=lo(e,t,i);if(u){const o=await u;e.updateMatch(t,d=>({...d,...o}))}l._nonReactive.loaderPromise=void 0}li(e,l,s)}},kB=async(e,t)=>{const{id:n,routeId:i}=e.matches[t];let s=!1,l=!1;const u=e.router.looseRoutesById[i];if(QN(e,n)){if(e.router.isServer){const h=lo(e,n,u);if(h){const p=await h;e.updateMatch(n,f=>({...f,...p}))}return e.router.getMatch(n)}}else{const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const p=e.router.getMatch(n),f=p._nonReactive.error||p.error;f&&li(e,p,f)}else{const p=Date.now()-h.updatedAt,f=Fc(e,n),g=f?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,b=u.options.shouldReload,x=typeof b=="function"?b(eO(e,n,t,u)):b,E=!!f&&!e.router.state.matches.some(_=>_.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=Wa(),E!==y.preload&&e.updateMatch(n,_=>({..._,preload:E}));const{status:S,invalid:v}=y;if(s=S==="success"&&(v||(x??p>g)),!(f&&u.options.preload===!1))if(s&&!e.sync)l=!0,(async()=>{try{await nw(e,n,t,u);const _=e.router.getMatch(n);_._nonReactive.loaderPromise?.resolve(),_._nonReactive.loadPromise?.resolve(),_._nonReactive.loaderPromise=void 0}catch(_){sr(_)&&await e.router.navigate(_.options)}})();else if(S!=="success"||s&&e.sync)await nw(e,n,t,u);else{const _=lo(e,n,u);if(_){const C=await _;e.updateMatch(n,N=>({...N,...C}))}}}}const o=e.router.getMatch(n);l||(o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loadPromise?.resolve()),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0,l||(o._nonReactive.loaderPromise=void 0),o._nonReactive.dehydrated=void 0;const d=l?o.isFetching:!1;return d!==o.isFetching||o.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):o};async function rw(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&sc(t);try{for(let s=0;s<t.matches.length;s++){const l=AB(t,s);hi(l)&&await l}const n=t.firstBadMatchIndex??t.matches.length;for(let s=0;s<n;s++)t.matchPromises.push(kB(t,s));await Promise.all(t.matchPromises);const i=sc(t);hi(i)&&await i}catch(n){if(Kn(n)&&!t.preload){const i=sc(t);throw hi(i)&&await i,n}if(sr(n))throw n}return t.matches}async function tO(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...i}=t.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const i of rO){const s=e.options[i]?.preload;s&&n.push(s())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Kl(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function nO(e){for(const t of rO)if(e.options[t]?.preload)return!0;return!1}const rO=["component","errorComponent","pendingComponent","notFoundComponent"];function RB(e){return{input:({url:t})=>{for(const n of e)t=iO(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=aO(e[n],t);return t}}}function NB(e){const t=ac(e.basepath),n=`/${t}`,i=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:u})=>{const o=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return o===s?u.pathname="/":o.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=ic(["/",t,u.pathname]),u)}}function iO(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function aO(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function $i(e){const t=e.resolvedLocation,n=e.location,i=t?.pathname!==n.pathname,s=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:i,hrefChanged:s,hashChanged:l}}class OB{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options,s=this.basepath??i?.basepath??"/",l=this.basepath===void 0,u=i?.rewrite;this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=VM())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new $M(LB(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),gB(this));let o=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(l||s!==d||u!==h){this.basepath=d;const g=[];ac(d)!==""&&g.push(NB({basepath:d})),h&&g.push(h),this.rewrite=g.length===0?void 0:g.length===1?g[0]:RB(g),this.history&&this.updateLatestLocation(),o=!0}o&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:i,processedTree:s}=iB(this.routeTree,this.options.caseSensitive,(u,o)=>{u.init({originalIndex:o})});this.options.routeMasks&&JM(this.options.routeMasks,s),this.routesById=n,this.routesByPath=i,this.processedTree=s;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,i)=>{const s={eventType:n,fn:i};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const s=({href:d,state:h})=>{const p=new URL(d,this.origin),f=iO(this.rewrite,p),g=this.options.parseSearch(f.search),b=this.options.stringifySearch(g);f.search=b;const x=f.href.replace(f.origin,""),{pathname:E,hash:y}=f;return{href:x,publicHref:d,url:f.href,pathname:tw(E),searchStr:b,search:zn(i?.search,g),hash:y.split("#").reverse()[0]??"",state:zn(i?.state,h)}},l=s(n),{__tempLocation:u,__tempKey:o}=l.state;if(u&&(!o||o===this.tempLocationKey)){const d=s(u);return d.state.key=l.state.key,d.state.__TSR_key=l.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:l}}return l},this.resolvePathCache=_c(1e3),this.resolvePathWithBase=(n,i)=>uB({base:n,to:Bv(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},s):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>DB({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),i=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...i]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const i=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutes(u,{_buildLocation:!0}),d=yc(o);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??d.fullPath,p=this.resolvePathWithBase(h,"."),f=d.search,g={...d.params},b=l.to?this.resolvePathWithBase(p,`${l.to}`):this.resolvePathWithBase(p,"."),x=l.params===!1||l.params===null?{}:(l.params??!0)===!0?g:Object.assign(g,zi(l.params,g)),E=kh({path:b,params:x}).interpolatedPath,y=this.matchRoutes(E,void 0,{_buildLocation:!0}).map(M=>this.looseRoutesById[M.routeId]);if(Object.keys(x).length>0)for(const M of y){const P=M.options.params?.stringify??M.options.stringifyParams;P&&Object.assign(x,P(x))}const S=n.leaveParams?b:tw(kh({path:b,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let v=f;if(n._includeValidateSearch&&this.options.search?.strict){const M={};y.forEach(P=>{if(P.options.validateSearch)try{Object.assign(M,tv(P.options.validateSearch,{...M,...v}))}catch{}}),v=M}v=MB({search:v,dest:l,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),v=zn(f,v);const _=this.options.stringifySearch(v),C=l.hash===!0?u.hash:l.hash?zi(l.hash,u.hash):void 0,N=C?`#${C}`:"";let A=l.state===!0?u.state:l.state?zi(l.state,u.state):{};A=zn(u.state,A);const O=`${S}${_}${N}`,R=new URL(O,this.origin),I=aO(this.rewrite,R);return{publicHref:I.pathname+I.search+I.hash,href:O,url:I.href,pathname:S,search:v,searchStr:_,state:A,hash:C??"",unmaskOnReload:l.unmaskOnReload}},s=(l={},u)=>{const o=i(l);let d=u?i(u):void 0;if(!d){const h={};if(this.options.routeMasks){const p=eB(o.pathname,this.processedTree);if(p){Object.assign(h,p.params);const{from:f,...g}=p.route;u={from:n.from,...g,params:h},d=i(u)}}}return d&&(o.maskedLocation=d),o};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:i,...s})=>{const l=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{s.state[p]=this.latestLocation.state[p]});const h=Hi(s.state,this.latestLocation.state);return d.forEach(p=>{delete s.state[p]}),h},u=qi(this.latestLocation.href)===qi(s.href),o=this.commitLocationPromise;if(this.commitLocationPromise=Wa(()=>{o?.resolve()}),u&&l())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...p}=s;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:i})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:s,viewTransition:l,ignoreBlocker:u,href:o,...d}={})=>{if(o){const f=this.history.location.state.__TSR_index,g=bc(o,{__TSR_index:n?f:f+1});d.to=g.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const p=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:i,hashScrollIntoView:s,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=({to:n,reloadDocument:i,href:s,...l})=>{if(!i&&s)try{new URL(`${s}`),i=!0}catch{}return i?(s||(s=this.buildLocation({to:n,...l}).url),l.replace?window.location.replace(s):window.location.href=s,Promise.resolve()):this.buildAndCommitLocation({...l,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const i=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),s=l=>{try{return encodeURI(decodeURI(l))}catch{return l}};if(ac(s(this.latestLocation.href))!==ac(s(i.href))){let l=i.url;throw this.origin&&l.startsWith(this.origin)&&(l=l.replace(this.origin,"")||"/"),XN({href:l})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(i=>({...i,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:i.cachedMatches.filter(s=>!n.some(l=>l.id===s.id))}))},this.load=async n=>{let i,s,l;for(l=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...$i({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...$i({resolvedLocation:h,location:d})}),await rw({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=[],f=[],g=[];oo(()=>{this.__store.setState(b=>{const x=b.matches,E=b.pendingMatches||b.matches;return p=x.filter(y=>!E.some(S=>S.id===y.id)),f=E.filter(y=>!x.some(S=>S.id===y.id)),g=E.filter(y=>x.some(S=>S.id===y.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...p.filter(y=>y.status!=="error")]}}),this.clearExpiredCache()}),[[p,"onLeave"],[f,"onEnter"],[g,"onStay"]].forEach(([b,x])=>{b.forEach(E=>{this.looseRoutesById[E.routeId].options[x]?.(E)})})})})}})}catch(d){sr(d)?(i=d,this.isServer||this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Kn(d)&&(s=d),this.__store.setState(h=>({...h,statusCode:i?i.status:s?404:h.matches.some(p=>p.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(o=>o.status==="error")&&(u=500),u!==void 0&&this.__store.setState(o=>({...o,statusCode:u}))},this.startViewTransition=n=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,o=typeof i.types=="function"?i.types($i({resolvedLocation:u,location:l})):i.types;if(o===!1){n();return}s={update:n,types:o}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{const s=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";s&&this.__store.setState(l=>({...l,[s]:l[s]?.map(u=>u.id===n?i(u):u)}))})},this.getMatch=n=>{const i=s=>s.id===n;return this.state.cachedMatches.find(i)??this.state.pendingMatches?.find(i)??this.state.matches.find(i)},this.invalidate=n=>{const i=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(i),cachedMatches:s.cachedMatches.map(i),pendingMatches:s.pendingMatches?.map(i)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const i=this.buildLocation(n.options);let s=i.url;this.origin&&s.startsWith(this.origin)&&(s=s.replace(this.origin,"")||"/"),n.options.href=i.href,n.headers.set("Location",s)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n?.filter;i!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(l=>!i(l))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=i=>{const s=this.looseRoutesById[i.routeId];if(!s.options.loader)return!0;const l=(i.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:Date.now()-i.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=tO,this.preloadRoute=async n=>{const i=this.buildLocation(n);let s=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),u=new Set([...l,...this.state.cachedMatches.map(o=>o.id)]);oo(()=>{s.forEach(o=>{u.has(o.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,o]}))})});try{return s=await rw({router:this,matches:s,location:i,preload:!0,updateMatch:(o,d)=>{l.has(o)?s=s.map(h=>h.id===o?d(h):h):this.updateMatch(o,d)}}),s}catch(o){if(sr(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:i});Kn(o)||console.error(o);return}},this.matchRoute=(n,i)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(s);if(i?.pending&&this.state.status!=="pending")return!1;const o=(i?.pending===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=tB(l.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,o.pathname,this.processedTree);return!d||n.params&&!Hi(d.params,n.params,{partial:!0})?!1:i?.includeSearch??!0?Hi(o.search,l.search,{partial:!0})?d.params:!1:d.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??SB,parseSearch:t.parseSearch??_B}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const i=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:l}=i;let{matchedRoutes:u}=i,o=!1;(s?s.path!=="/"&&l["**"]:qi(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:o=!0);const d=(()=>{if(o){if(this.options.notFoundMode!=="root")for(let f=u.length-1;f>=0;f--){const g=u[f];if(g.children)return g.id}return Tn}})(),h=[],p=f=>f?.id?f.context??this.options.context??void 0:this.options.context??void 0;return u.forEach((f,g)=>{const b=h[g-1],[x,E,y]=(()=>{const z=b?.search??t.search,G=b?._strictSearch??void 0;try{const V=tv(f.options.validateSearch,{...z})??void 0;return[{...z,...V},{...G,...V},void 0]}catch(V){let W=V;if(V instanceof wc||(W=new wc(V.message,{cause:V})),n?.throwOnError)throw W;return[z,{},W]}})(),S=f.options.loaderDeps?.({search:x})??"",v=S?JSON.stringify(S):"",{interpolatedPath:_,usedParams:C}=kh({path:f.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),N=f.id+_+v,A=this.getMatch(N),O=this.state.matches.find(z=>z.routeId===f.id),R=A?._strictParams??C;let I;if(!A){const z=f.options.params?.parse??f.options.parseParams;if(z)try{Object.assign(R,z(R))}catch(G){if(I=new IB(G.message,{cause:G}),n?.throwOnError)throw I}}Object.assign(l,R);const M=O?"stay":"enter";let P;if(A)P={...A,cause:M,params:O?zn(O.params,l):l,_strictParams:R,search:zn(O?O.search:A.search,x),_strictSearch:E};else{const z=f.options.loader||f.options.beforeLoad||f.lazyFn||nO(f)?"pending":"success";P={id:N,index:g,routeId:f.id,params:O?zn(O.params,l):l,_strictParams:R,pathname:_,updatedAt:Date.now(),search:O?zn(O.search,x):x,_strictSearch:E,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Wa()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:O?zn(O.loaderDeps,S):S,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:f.options.staticData||{},fullPath:f.fullPath}}n?.preload||(P.globalNotFound=d===f.id),P.searchError=y;const j=p(b);P.context={...j,...P.__routeContext,...P.__beforeLoadContext},h.push(P)}),h.forEach((f,g)=>{const b=this.looseRoutesById[f.routeId];if(!this.getMatch(f.id)&&n?._buildLocation!==!0){const E=h[g-1],y=p(E);if(b.options.context){const S={deps:f.loaderDeps,params:f.params,context:y??{},location:t,navigate:v=>this.navigate({...v,_fromLocation:t}),buildLocation:this.buildLocation,cause:f.cause,abortController:f.abortController,preload:!!f.preload,matches:h};f.__routeContext=b.options.context(S)??void 0}f.context={...y,...f.__routeContext,...f.__beforeLoadContext}}}),h}}class wc extends Error{}class IB extends Error{}function LB(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function tv(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new wc("Async validation not supported");if(n.issues)throw new wc(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function DB({pathname:e,routesById:t,processedTree:n}){const i={},s=qi(e);let l;const u=nB(s,n,!0);return u&&(l=u.route,Object.assign(i,u.params)),{matchedRoutes:u?.branch||[t[Tn]],routeParams:i,foundRoute:l}}function MB({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){const s=n.reduce((o,d)=>{const h=[];if("search"in d.options)d.options.search?.middlewares&&h.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const p=({search:f,next:g})=>{let b=f;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(b=d.options.preSearchFilters.reduce((E,y)=>y(E),f));const x=g(b);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((E,y)=>y(E),x):x};h.push(p)}if(i&&d.options.validateSearch){const p=({search:f,next:g})=>{const b=g(f);try{return{...b,...tv(d.options.validateSearch,b)??void 0}}catch{return b}};h.push(p)}return o.concat(h)},[])??[],l=({search:o})=>t.search?t.search===!0?o:zi(t.search,o):{};s.push(l);const u=(o,d)=>{if(o>=s.length)return d;const h=s[o];return h({search:d,next:f=>u(o+1,f)})};return u(0,e)}const BB="Error preloading route! ☝️";class sO{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const i=this.options,s=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Tn:this.parentRoute||Lr(!1);let l=s?Tn:i?.path;l&&l!=="/"&&(l=KN(l));const u=i?.id||l;let o=s?Tn:ic([this.parentRoute.id===Tn?"":this.parentRoute.id,u]);l===Tn&&(l="/"),o!==Tn&&(o=ic(["/",o]));const d=o===Tn?"/":ic([this.parentRoute.fullPath,l]);this._path=l,this._id=o,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class FB extends sO{constructor(t){super(t)}}function Fv(e){const t=e.errorComponent??Pc;return T.jsx(PB,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?K.createElement(t,{error:n,reset:i}):e.children})}class PB extends K.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Pc({error:e}){const[t,n]=K.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:t?"Hide Error":"Show Error"})]}),T.jsx("div",{style:{height:".25rem"}}),t?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?T.jsx("code",{children:e.message}):null})}):null]})}function UB({children:e,fallback:t=null}){return jB()?T.jsx($t.Fragment,{children:e}):T.jsx($t.Fragment,{children:t})}function jB(){return $t.useSyncExternalStore(zB,()=>!0,()=>!1)}function zB(){return()=>{}}var Nh={exports:{}},Oh={},Ih={exports:{}},Lh={};var iw;function HB(){if(iw)return Lh;iw=1;var e=xo();function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function o(f,g){var b=g(),x=i({inst:{value:b,getSnapshot:g}}),E=x[0].inst,y=x[1];return l(function(){E.value=b,E.getSnapshot=g,d(E)&&y({inst:E})},[f,b,g]),s(function(){return d(E)&&y({inst:E}),f(function(){d(E)&&y({inst:E})})},[f]),u(b),b}function d(f){var g=f.getSnapshot;f=f.value;try{var b=g();return!n(f,b)}catch{return!0}}function h(f,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:o;return Lh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Lh}var aw;function qB(){return aw||(aw=1,Ih.exports=HB()),Ih.exports}var sw;function $B(){if(sw)return Oh;sw=1;var e=xo(),t=qB();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var i=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,o=e.useMemo,d=e.useDebugValue;return Oh.useSyncExternalStoreWithSelector=function(h,p,f,g,b){var x=l(null);if(x.current===null){var E={hasValue:!1,value:null};x.current=E}else E=x.current;x=o(function(){function S(A){if(!v){if(v=!0,_=A,A=g(A),b!==void 0&&E.hasValue){var O=E.value;if(b(O,A))return C=O}return C=A}if(O=C,i(_,A))return O;var R=g(A);return b!==void 0&&b(O,R)?(_=A,O):(_=A,C=R)}var v=!1,_,C,N=f===void 0?null:f;return[function(){return S(p())},N===null?void 0:function(){return S(N())}]},[p,f,g,b]);var y=s(h,x[0],x[1]);return u(function(){E.hasValue=!0,E.value=y},[y]),d(y),y},Oh}var ow;function GB(){return ow||(ow=1,Nh.exports=$B()),Nh.exports}var VB=GB();function WB(e,t=i=>i,n={}){const i=n.equal??KB;return VB.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,i)}function KB(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!t.has(i)||!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=lw(e);if(n.length!==lw(t).length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Object.is(e[n[i]],t[n[i]]))return!1;return!0}function lw(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Dh=K.createContext(null);function oO(){return typeof document>"u"?Dh:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Dh,Dh)}function Rn(e){const t=K.useContext(oO());return e?.warn,t}function hn(e){const t=Rn({warn:e?.router===void 0}),n=e?.router||t,i=K.useRef(void 0);return WB(n.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=zn(i.current,e.select(s));return i.current=l,l}return e.select(s)}return s})}const Uc=K.createContext(void 0),YB=K.createContext(void 0);function lr(e){const t=K.useContext(e.from?YB:Uc);return hn({select:i=>{const s=i.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Lr(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function Pv(e){return lr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Uv(e){const{select:t,...n}=e;return lr({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function jv(e){return lr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function zv(e){return lr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function jc(e){const t=Rn();return K.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var XB=DN();const Yl=typeof window<"u"?K.useLayoutEffect:K.useEffect;function Mh(e){const t=K.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function ZB(e,t,n={},i={}){K.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([l])=>{t(l)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,i.disabled,e])}function QB(e){const t=K.useRef(null);return K.useImperativeHandle(e,()=>t.current,[]),t}function JB(e,t){const n=Rn(),[i,s]=K.useState(!1),l=K.useRef(!1),u=QB(t),{activeProps:o,inactiveProps:d,activeOptions:h,to:p,preload:f,preloadDelay:g,hashScrollIntoView:b,replace:x,startTransition:E,resetScroll:y,viewTransition:S,children:v,target:_,disabled:C,style:N,className:A,onClick:O,onFocus:R,onMouseEnter:I,onMouseLeave:M,onTouchStart:P,ignoreBlocker:j,params:z,search:G,hash:V,state:W,mask:J,reloadDocument:Q,unsafeRelative:F,from:L,_fromLocation:B,...H}=e,U=hn({select:Ne=>Ne.location.search,structuralSharing:!0}),ee=e.from,le=K.useMemo(()=>({...e,from:ee}),[n,U,ee,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ue=K.useMemo(()=>n.buildLocation({...le}),[n,le]),X=K.useMemo(()=>{if(C)return;let Ne=ue.maskedLocation?ue.maskedLocation.url:ue.url,Oe=!1;return n.origin&&(Ne.startsWith(n.origin)?Ne=n.history.createHref(Ne.replace(n.origin,""))||"/":Oe=!0),{href:Ne,external:Oe}},[C,ue.maskedLocation,ue.url,n.origin,n.history]),$=K.useMemo(()=>{if(X?.external)return X.href;try{return new URL(p),p}catch{}},[p,X]),ie=e.reloadDocument||$?!1:f??n.options.defaultPreload,he=g??n.options.defaultPreloadDelay??0,be=hn({select:Ne=>{if($)return!1;if(h?.exact){if(!cB(Ne.location.pathname,ue.pathname,n.basepath))return!1}else{const Oe=Sc(Ne.location.pathname,n.basepath),je=Sc(ue.pathname,n.basepath);if(!(Oe.startsWith(je)&&(Oe.length===je.length||Oe[je.length]==="/")))return!1}return(h?.includeSearch??!0)&&!Hi(Ne.location.search,ue.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Ne.location.hash===ue.hash:!0}}),ge=K.useCallback(()=>{n.preloadRoute({...le}).catch(Ne=>{console.warn(Ne),console.warn(BB)})},[n,le]),xe=K.useCallback(Ne=>{Ne?.isIntersecting&&ge()},[ge]);ZB(u,xe,i3,{disabled:!!C||ie!=="viewport"}),K.useEffect(()=>{l.current||!C&&ie==="render"&&(ge(),l.current=!0)},[C,ge,ie]);const ze=Ne=>{const Oe=Ne.currentTarget.getAttribute("target"),je=_!==void 0?_:Oe;if(!C&&!a3(Ne)&&!Ne.defaultPrevented&&(!je||je==="_self")&&Ne.button===0){Ne.preventDefault(),XB.flushSync(()=>{s(!0)});const ce=n.subscribe("onResolved",()=>{ce(),s(!1)});n.navigate({...le,replace:x,resetScroll:y,hashScrollIntoView:b,startTransition:E,viewTransition:S,ignoreBlocker:j})}};if($)return{...H,ref:u,href:$,...v&&{children:v},..._&&{target:_},...C&&{disabled:C},...N&&{style:N},...A&&{className:A},...O&&{onClick:O},...R&&{onFocus:R},...I&&{onMouseEnter:I},...M&&{onMouseLeave:M},...P&&{onTouchStart:P}};const He=Ne=>{C||ie&&ge()},De=He,Ee=Ne=>{if(!(C||!ie))if(!he)ge();else{const Oe=Ne.target;if(Qs.has(Oe))return;const je=setTimeout(()=>{Qs.delete(Oe),ge()},he);Qs.set(Oe,je)}},wt=Ne=>{if(C||!ie||!he)return;const Oe=Ne.target,je=Qs.get(Oe);je&&(clearTimeout(je),Qs.delete(Oe))},Mt=be?zi(o,{})??e3:Bh,ft=be?Bh:zi(d,{})??Bh,Vt=[A,Mt.className,ft.className].filter(Boolean).join(" "),Bt=(N||Mt.style||ft.style)&&{...N,...Mt.style,...ft.style};return{...H,...Mt,...ft,href:X?.href,ref:u,onClick:Js([O,ze]),onFocus:Js([R,He]),onMouseEnter:Js([I,Ee]),onMouseLeave:Js([M,wt]),onTouchStart:Js([P,De]),disabled:!!C,target:_,...Bt&&{style:Bt},...Vt&&{className:Vt},...C&&t3,...be&&n3,...i&&r3}}const Bh={},e3={className:"active"},t3={role:"link","aria-disabled":!0},n3={"data-status":"active","aria-current":"page"},r3={"data-transitioning":"transitioning"},Qs=new WeakMap,i3={rootMargin:"100px"},Js=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},lO=K.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:s,ref:l,...u}=JB(i,t),o=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;return n===void 0&&delete u.disabled,K.createElement(n||"a",{...u,ref:l},o)});function a3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let s3=class extends sO{constructor(t){super(t),this.useMatch=n=>lr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>lr({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>jv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Uv({...n,from:this.id}),this.useLoaderData=n=>Pv({...n,from:this.id}),this.useNavigate=()=>jc({from:this.fullPath}),this.Link=$t.forwardRef((n,i)=>T.jsx(lO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function o3(e){return new s3(e)}class l3 extends FB{constructor(t){super(t),this.useMatch=n=>lr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>lr({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>jv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Uv({...n,from:this.id}),this.useLoaderData=n=>Pv({...n,from:this.id}),this.useNavigate=()=>jc({from:this.fullPath}),this.Link=$t.forwardRef((n,i)=>T.jsx(lO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function c3(e){return new l3(e)}function bo(e){return typeof e=="object"?new cw(e,{silent:!0}).createRoute(e):new cw(e,{silent:!0}).createRoute}class cw{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const s=o3(i);return s.isRoot=!1,s},this.silent=n?.silent}}class uw{constructor(t){this.useMatch=n=>lr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>lr({from:this.options.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>jv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Uv({...n,from:this.options.id}),this.useLoaderData=n=>Pv({...n,from:this.options.id}),this.useNavigate=()=>{const n=Rn();return jc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function dw(e){return typeof e=="object"?new uw(e):t=>new uw({id:e,...t})}function u3(){const e=Rn(),t=K.useRef({router:e,mounted:!1}),[n,i]=K.useState(!1),{hasPendingMatches:s,isLoading:l}=hn({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),u=Mh(l),o=l||n||s,d=Mh(o),h=l||s,p=Mh(h);return e.startTransition=f=>{i(!0),K.startTransition(()=>{f(),i(!1)})},K.useEffect(()=>{const f=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return qi(e.latestLocation.href)!==qi(g.href)&&e.commitLocation({...g,replace:!0}),()=>{f()}},[e,e.history]),Yl(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),Yl(()=>{u&&!l&&e.emit({type:"onLoad",...$i(e.state)})},[u,e,l]),Yl(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...$i(e.state)})},[h,p,e]),Yl(()=>{d&&!o&&(e.emit({type:"onResolved",...$i(e.state)}),e.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),bB(e))},[o,d,e]),null}function d3(e){const t=hn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return T.jsx(Fv,{getResetKey:()=>t,onCatch:(n,i)=>{if(Kn(n))e.onCatch?.(n,i);else throw n},errorComponent:({error:n})=>{if(Kn(n))return e.fallback?.(n);throw n},children:e.children})}function h3(){return T.jsx("p",{children:"Not Found"})}function qa(e){return T.jsx(T.Fragment,{children:e.children})}function cO(e,t,n){return t.options.notFoundComponent?T.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?T.jsx(e.options.defaultNotFoundComponent,{data:n}):T.jsx(h3,{})}function f3({children:e}){const t=Rn();return t.isServer?T.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:[e].filter(Boolean).join(`
10
- `)+";$_TSR.c()"}}):null}function p3(){const e=Rn();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||ev)(e.latestLocation),i=n!==ev(e.latestLocation)?n:void 0,s={storageKey:Ec,shouldScrollRestoration:!0};return i&&(s.key=i),T.jsx(f3,{children:`(${YN.toString()})(${JSON.stringify(s)})`})}const uO=K.memo(function({matchId:t}){const n=Rn(),i=hn({select:S=>{const v=S.matches.find(_=>_.id===t);return Lr(v),{routeId:v.routeId,ssr:v.ssr,_displayPending:v._displayPending}},structuralSharing:!0}),s=n.routesById[i.routeId],l=s.options.pendingComponent??n.options.defaultPendingComponent,u=l?T.jsx(l,{}):null,o=s.options.errorComponent??n.options.defaultErrorComponent,d=s.options.onCatch??n.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??n.options.notFoundRoute?.options.component:s.options.notFoundComponent,p=i.ssr===!1||i.ssr==="data-only",f=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??l??(s.options.errorComponent?.preload||p))?K.Suspense:qa,g=o?Fv:qa,b=h?d3:qa,x=hn({select:S=>S.loadedAt}),E=hn({select:S=>{const v=S.matches.findIndex(_=>_.id===t);return S.matches[v-1]?.routeId}}),y=s.isRoot?s.options.shellComponent??qa:qa;return T.jsxs(y,{children:[T.jsx(Uc.Provider,{value:t,children:T.jsx(f,{fallback:u,children:T.jsx(g,{getResetKey:()=>x,errorComponent:o||Pc,onCatch:(S,v)=>{if(Kn(S))throw S;d?.(S,v)},children:T.jsx(b,{fallback:S=>{if(!h||S.routeId&&S.routeId!==i.routeId||!S.routeId&&!s.isRoot)throw S;return K.createElement(h,S)},children:p||i._displayPending?T.jsx(UB,{fallback:u,children:T.jsx(hw,{matchId:t})}):T.jsx(hw,{matchId:t})})})})}),E===Tn&&n.options.scrollRestoration?T.jsxs(T.Fragment,{children:[T.jsx(m3,{}),T.jsx(p3,{})]}):null]})});function m3(){const e=Rn(),t=K.useRef(void 0);return T.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...$i(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const hw=K.memo(function({matchId:t}){const n=Rn(),{match:i,key:s,routeId:l}=hn({select:d=>{const h=d.matches.find(x=>x.id===t),p=h.routeId,g=(n.routesById[p].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:p,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:p,match:{id:h.id,status:h.status,error:h.error,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],o=K.useMemo(()=>{const d=u.options.component??n.options.defaultComponent;return d?T.jsx(d,{},s):T.jsx(dO,{})},[s,u.options.component,n.options.defaultComponent]);if(i._displayPending)throw n.getMatch(i.id)?._nonReactive.displayPendingPromise;if(i._forcePending)throw n.getMatch(i.id)?._nonReactive.minPendingPromise;if(i.status==="pending"){const d=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(i.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const p=Wa();h._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(i.id)?._nonReactive.loadPromise}if(i.status==="notFound")return Lr(Kn(i.error)),cO(n,u,i.error);if(i.status==="redirected")throw Lr(sr(i.error)),n.getMatch(i.id)?._nonReactive.loadPromise;if(i.status==="error"){if(n.isServer){const d=(u.options.errorComponent??n.options.defaultErrorComponent)||Pc;return T.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}})}throw i.error}return o}),dO=K.memo(function(){const t=Rn(),n=K.useContext(Uc),i=hn({select:h=>h.matches.find(p=>p.id===n)?.routeId}),s=t.routesById[i],l=hn({select:h=>{const f=h.matches.find(g=>g.id===n);return Lr(f),f.globalNotFound}}),u=hn({select:h=>{const p=h.matches,f=p.findIndex(g=>g.id===n);return p[f+1]?.id}}),o=t.options.defaultPendingComponent?T.jsx(t.options.defaultPendingComponent,{}):null;if(l)return cO(t,s,void 0);if(!u)return null;const d=T.jsx(uO,{matchId:u});return i===Tn?T.jsx(K.Suspense,{fallback:o,children:d}):d});function g3(){const e=Rn(),n=e.routesById[Tn].options.pendingComponent??e.options.defaultPendingComponent,i=n?T.jsx(n,{}):null,s=e.isServer||typeof document<"u"&&e.ssr?qa:K.Suspense,l=T.jsxs(s,{fallback:i,children:[!e.isServer&&T.jsx(u3,{}),T.jsx(b3,{})]});return e.options.InnerWrap?T.jsx(e.options.InnerWrap,{children:l}):l}function b3(){const e=Rn(),t=hn({select:s=>s.matches[0]?.id}),n=hn({select:s=>s.loadedAt}),i=t?T.jsx(uO,{matchId:t}):null;return T.jsx(Uc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:T.jsx(Fv,{getResetKey:()=>n,errorComponent:Pc,onCatch:s=>{s.message||s.toString()},children:i})})}const y3=e=>new v3(e);class v3 extends OB{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=bo,globalThis.createLazyFileRoute=dw):typeof window<"u"&&(window.createFileRoute=bo,window.createLazyFileRoute=dw);function _3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=oO(),s=T.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?T.jsx(e.options.Wrap,{children:s}):s}function S3({router:e,...t}){return T.jsx(_3,{router:e,...t,children:T.jsx(g3,{})})}const zc=c3({component:E3});function E3(){return T.jsxs(T.Fragment,{children:[T.jsx(dO,{}),null]})}const x3=bo("/")({beforeLoad:()=>{throw XN({to:"/sessions"})},component:()=>null}),bt=K.forwardRef(({className:e="",variant:t="primary",size:n="md",...i},s)=>{const l="inline-flex items-center justify-center rounded font-medium transition-colors focus-visible:outline-none disabled:opacity-50 disabled:cursor-not-allowed",u={primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-muted text-foreground hover:bg-muted/80 border border-border",ghost:"text-muted-foreground hover:text-foreground hover:bg-muted/50"},o={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base",icon:"w-10 h-10 p-0"};return T.jsx("button",{ref:s,className:`${l} ${u[t]} ${o[n]} ${e}`,...i})});bt.displayName="Button";const w3=K.forwardRef(({className:e="",children:t,...n},i)=>T.jsx("div",{ref:i,className:`bg-card text-card-foreground border border-border rounded-lg ${e}`,...n,children:t}));w3.displayName="Card";const C3=K.forwardRef(({className:e="",...t},n)=>T.jsx("input",{ref:n,className:`w-full px-3 py-2 bg-muted border border-border rounded text-foreground placeholder-muted-foreground outline-none ${e}`,...t}));C3.displayName="Input";const Hv=K.forwardRef(({className:e="",...t},n)=>T.jsx("textarea",{ref:n,className:`w-full px-3 py-2 bg-muted border border-border rounded text-foreground placeholder-muted-foreground outline-none resize-none ${e}`,...t}));Hv.displayName="Textarea";const fw=e=>{let t;const n=new Set,i=(h,p)=>{const f=typeof h=="function"?h(t):h;if(!Object.is(f,t)){const g=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(b=>b(t,g))}},s=()=>t,o={setState:i,getState:s,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(i,s,o);return o},T3=(e=>e?fw(e):fw),A3=e=>e;function k3(e,t=A3){const n=$t.useSyncExternalStore(e.subscribe,$t.useCallback(()=>t(e.getState()),[e,t]),$t.useCallback(()=>t(e.getInitialState()),[e,t]));return $t.useDebugValue(n),n}const pw=e=>{const t=T3(e),n=i=>k3(t,i);return Object.assign(n,t),n},wo=(e=>e?pw(e):pw),qv=wo(e=>({isOpen:!1,title:"Confirm Action",message:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:void 0,openConfirmation:t=>e({isOpen:!0,title:t.title||"Confirm Action",message:t.message,confirmLabel:t.confirmLabel||"Confirm",cancelLabel:t.cancelLabel||"Cancel",variant:t.variant||"default",onConfirm:t.onConfirm,onCancel:t.onCancel}),closeConfirmation:()=>e({isOpen:!1,onConfirm:()=>{},onCancel:void 0})}));const R3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),mw=e=>{const t=N3(e);return t.charAt(0).toUpperCase()+t.slice(1)},hO=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),O3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var I3={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const L3=K.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:u,...o},d)=>K.createElement("svg",{ref:d,...I3,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:hO("lucide",s),...!l&&!O3(o)&&{"aria-hidden":"true"},...o},[...u.map(([h,p])=>K.createElement(h,p)),...Array.isArray(l)?l:[l]]));const Ae=(e,t)=>{const n=K.forwardRef(({className:i,...s},l)=>K.createElement(L3,{ref:l,iconNode:t,className:hO(`lucide-${R3(mw(e))}`,`lucide-${e}`,i),...s}));return n.displayName=mw(e),n};const D3=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],M3=Ae("arrow-down",D3);const B3=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],F3=Ae("arrow-left",B3);const P3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],U3=Ae("arrow-right",P3);const j3=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],z3=Ae("arrow-up",j3);const H3=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],fO=Ae("bot",H3);const q3=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],$3=Ae("braces",q3);const G3=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],V3=Ae("brain",G3);const W3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pO=Ae("check",W3);const K3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],cr=Ae("chevron-down",K3);const Y3=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ot=Ae("chevron-right",Y3);const X3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],dr=Ae("circle-alert",X3);const Z3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Q3=Ae("circle-check",Z3);const J3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],eF=Ae("circle-stop",J3);const tF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nF=Ae("circle",tF);const rF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],iF=Ae("clock",rF);const aF=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],sF=Ae("code",aF);const oF=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],gw=Ae("command",oF);const lF=[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]],bw=Ae("diff",lF);const cF=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],mO=Ae("dollar-sign",cF);const uF=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],dF=Ae("ellipsis-vertical",uF);const hF=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],fF=Ae("external-link",hF);const pF=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],mF=Ae("file-code",pF);const gF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],bF=Ae("file-json",gF);const yF=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],yw=Ae("file-pen",yF);const vF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],_F=Ae("file-plus",vF);const SF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],gO=Ae("file-text",SF);const EF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 13v-1h6v1",key:"1bb014"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M11 18h2",key:"12mj7e"}]],xF=Ae("file-type",EF);const wF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],CF=Ae("file-x",wF);const TF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],co=Ae("file",TF);const AF=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],kF=Ae("folder-tree",AF);const RF=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],NF=Ae("folder",RF);const OF=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Cc=Ae("git-branch",OF);const IF=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Tc=Ae("git-commit-horizontal",IF);const LF=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],bO=Ae("hash",LF);const DF=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],MF=Ae("image",DF);const BF=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],yO=Ae("keyboard",BF);const FF=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],PF=Ae("list",FF);const UF=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],vO=Ae("loader-circle",UF);const jF=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],zF=Ae("message-square",jF);const HF=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],qF=Ae("octagon-x",HF);const $F=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],vw=Ae("pencil",$F);const GF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ac=Ae("plus",GF);const VF=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],WF=Ae("refresh-cw",VF);const KF=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],YF=Ae("rotate-ccw",KF);const XF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$v=Ae("search",XF);const ZF=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],yo=Ae("sparkles",ZF);const QF=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],JF=Ae("square-check-big",QF);const e4=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ya=Ae("terminal",e4);const t4=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],n4=Ae("trash-2",t4);const r4=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],i4=Ae("upload",r4);const a4=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],_O=Ae("user",a4);const s4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hc=Ae("x",s4);function o4(){const{isOpen:e,title:t,message:n,confirmLabel:i,cancelLabel:s,variant:l,onConfirm:u,onCancel:o,closeConfirmation:d}=qv(),[h,p]=K.useState(!1);K.useEffect(()=>{e||p(!1)},[e]);const f=K.useCallback(async()=>{p(!0);try{await u(),d()}catch(x){console.error("Confirmation action failed:",x),p(!1)}},[u,d]),g=K.useCallback(()=>{o?.(),d()},[o,d]),b=x=>{x.target===x.currentTarget&&!h&&g()};return K.useEffect(()=>{const x=E=>{e&&!h&&(E.key==="Escape"&&(E.preventDefault(),g()),E.key==="Enter"&&(E.preventDefault(),f()))};if(e)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,h,f,g]),e?T.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:b,onKeyDown:x=>{x.key==="Escape"&&!h&&(x.preventDefault(),g())},children:T.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg max-w-md w-full mx-4",children:[T.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[l==="destructive"&&T.jsx(dr,{className:"w-5 h-5 text-destructive"}),T.jsx("h2",{className:"text-lg font-semibold",children:t})]}),T.jsx("button",{type:"button",onClick:g,disabled:h,className:"p-1 hover:bg-muted rounded transition-colors disabled:opacity-50","aria-label":"Close",children:T.jsx(Hc,{className:"w-5 h-5"})})]}),T.jsx("div",{className:"p-4",children:T.jsx("p",{className:"text-muted-foreground",children:n})}),T.jsxs("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-border",children:[T.jsx("button",{type:"button",onClick:g,disabled:h,className:"px-4 py-2 text-sm font-medium rounded transition-colors hover:bg-muted disabled:opacity-50",children:s}),T.jsx("button",{type:"button",onClick:f,disabled:h,className:`px-4 py-2 text-sm font-medium rounded transition-colors disabled:opacity-50 ${l==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-primary text-primary-foreground hover:bg-primary/90"}`,children:h?"Processing...":i})]})]})}):null}function Dr(e){return Array.isArray?Array.isArray(e):xO(e)==="[object Array]"}function l4(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function c4(e){return e==null?"":l4(e)}function or(e){return typeof e=="string"}function SO(e){return typeof e=="number"}function u4(e){return e===!0||e===!1||d4(e)&&xO(e)=="[object Boolean]"}function EO(e){return typeof e=="object"}function d4(e){return EO(e)&&e!==null}function An(e){return e!=null}function Fh(e){return!e.trim().length}function xO(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const h4="Incorrect 'index' type",f4=e=>`Invalid value for key ${e}`,p4=e=>`Pattern length exceeds max of ${e}.`,m4=e=>`Missing ${e} property in key`,g4=e=>`Property 'weight' in key '${e}' must be a positive integer`,_w=Object.prototype.hasOwnProperty;class b4{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(i=>{let s=wO(i);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(i=>{i.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function wO(e){let t=null,n=null,i=null,s=1,l=null;if(or(e)||Dr(e))i=e,t=Sw(e),n=nv(e);else{if(!_w.call(e,"name"))throw new Error(m4("name"));const u=e.name;if(i=u,_w.call(e,"weight")&&(s=e.weight,s<=0))throw new Error(g4(u));t=Sw(u),n=nv(u),l=e.getFn}return{path:t,id:n,weight:s,src:i,getFn:l}}function Sw(e){return Dr(e)?e:e.split(".")}function nv(e){return Dr(e)?e.join("."):e}function y4(e,t){let n=[],i=!1;const s=(l,u,o)=>{if(An(l))if(!u[o])n.push(l);else{let d=u[o];const h=l[d];if(!An(h))return;if(o===u.length-1&&(or(h)||SO(h)||u4(h)))n.push(c4(h));else if(Dr(h)){i=!0;for(let p=0,f=h.length;p<f;p+=1)s(h[p],u,o+1)}else u.length&&s(h,u,o+1)}};return s(e,or(t)?t.split("."):t,0),i?n:n[0]}const v4={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},_4={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},S4={location:0,threshold:.6,distance:100},E4={useExtendedSearch:!1,getFn:y4,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Re={..._4,...v4,...S4,...E4};const x4=/[^ ]+/g;function w4(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){const l=s.match(x4).length;if(n.has(l))return n.get(l);const u=1/Math.pow(l,.5*e),o=parseFloat(Math.round(u*i)/i);return n.set(l,o),o},clear(){n.clear()}}}class Gv{constructor({getFn:t=Re.getFn,fieldNormWeight:n=Re.fieldNormWeight}={}){this.norm=w4(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,i)=>{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,or(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();or(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,i=this.size();n<i;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!An(t)||Fh(t))return;let i={v:t,i:n,n:this.norm.get(t)};this.records.push(i)}_addObject(t,n){let i={i:n,$:{}};this.keys.forEach((s,l)=>{let u=s.getFn?s.getFn(t):this.getFn(t,s.path);if(An(u)){if(Dr(u)){let o=[];const d=[{nestedArrIndex:-1,value:u}];for(;d.length;){const{nestedArrIndex:h,value:p}=d.pop();if(An(p))if(or(p)&&!Fh(p)){let f={v:p,i:h,n:this.norm.get(p)};o.push(f)}else Dr(p)&&p.forEach((f,g)=>{d.push({nestedArrIndex:g,value:f})})}i.$[l]=o}else if(or(u)&&!Fh(u)){let o={v:u,n:this.norm.get(u)};i.$[l]=o}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function CO(e,t,{getFn:n=Re.getFn,fieldNormWeight:i=Re.fieldNormWeight}={}){const s=new Gv({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(wO)),s.setSources(t),s.create(),s}function C4(e,{getFn:t=Re.getFn,fieldNormWeight:n=Re.fieldNormWeight}={}){const{keys:i,records:s}=e,l=new Gv({getFn:t,fieldNormWeight:n});return l.setKeys(i),l.setIndexRecords(s),l}function Xl(e,{errors:t=0,currentLocation:n=0,expectedLocation:i=0,distance:s=Re.distance,ignoreLocation:l=Re.ignoreLocation}={}){const u=t/e.length;if(l)return u;const o=Math.abs(i-n);return s?u+o/s:o?1:u}function T4(e=[],t=Re.minMatchCharLength){let n=[],i=-1,s=-1,l=0;for(let u=e.length;l<u;l+=1){let o=e[l];o&&i===-1?i=l:!o&&i!==-1&&(s=l-1,s-i+1>=t&&n.push([i,s]),i=-1)}return e[l-1]&&l-i>=t&&n.push([i,l-1]),n}const Pi=32;function A4(e,t,n,{location:i=Re.location,distance:s=Re.distance,threshold:l=Re.threshold,findAllMatches:u=Re.findAllMatches,minMatchCharLength:o=Re.minMatchCharLength,includeMatches:d=Re.includeMatches,ignoreLocation:h=Re.ignoreLocation}={}){if(t.length>Pi)throw new Error(p4(Pi));const p=t.length,f=e.length,g=Math.max(0,Math.min(i,f));let b=l,x=g;const E=o>1||d,y=E?Array(f):[];let S;for(;(S=e.indexOf(t,x))>-1;){let O=Xl(t,{currentLocation:S,expectedLocation:g,distance:s,ignoreLocation:h});if(b=Math.min(O,b),x=S+p,E){let R=0;for(;R<p;)y[S+R]=1,R+=1}}x=-1;let v=[],_=1,C=p+f;const N=1<<p-1;for(let O=0;O<p;O+=1){let R=0,I=C;for(;R<I;)Xl(t,{errors:O,currentLocation:g+I,expectedLocation:g,distance:s,ignoreLocation:h})<=b?R=I:C=I,I=Math.floor((C-R)/2+R);C=I;let M=Math.max(1,g-I+1),P=u?f:Math.min(g+I,f)+p,j=Array(P+2);j[P+1]=(1<<O)-1;for(let G=P;G>=M;G-=1){let V=G-1,W=n[e.charAt(V)];if(E&&(y[V]=+!!W),j[G]=(j[G+1]<<1|1)&W,O&&(j[G]|=(v[G+1]|v[G])<<1|1|v[G+1]),j[G]&N&&(_=Xl(t,{errors:O,currentLocation:V,expectedLocation:g,distance:s,ignoreLocation:h}),_<=b)){if(b=_,x=V,x<=g)break;M=Math.max(1,2*g-x)}}if(Xl(t,{errors:O+1,currentLocation:g,expectedLocation:g,distance:s,ignoreLocation:h})>b)break;v=j}const A={isMatch:x>=0,score:Math.max(.001,_)};if(E){const O=T4(y,o);O.length?d&&(A.indices=O):A.isMatch=!1}return A}function k4(e){let t={};for(let n=0,i=e.length;n<i;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<i-n-1}return t}const kc=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class TO{constructor(t,{location:n=Re.location,threshold:i=Re.threshold,distance:s=Re.distance,includeMatches:l=Re.includeMatches,findAllMatches:u=Re.findAllMatches,minMatchCharLength:o=Re.minMatchCharLength,isCaseSensitive:d=Re.isCaseSensitive,ignoreDiacritics:h=Re.ignoreDiacritics,ignoreLocation:p=Re.ignoreLocation}={}){if(this.options={location:n,threshold:i,distance:s,includeMatches:l,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p},t=d?t:t.toLowerCase(),t=h?kc(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const f=(b,x)=>{this.chunks.push({pattern:b,alphabet:k4(b),startIndex:x})},g=this.pattern.length;if(g>Pi){let b=0;const x=g%Pi,E=g-x;for(;b<E;)f(this.pattern.substr(b,Pi),b),b+=Pi;if(x){const y=g-Pi;f(this.pattern.substr(y),y)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:i,includeMatches:s}=this.options;if(t=n?t:t.toLowerCase(),t=i?kc(t):t,this.pattern===t){let E={isMatch:!0,score:0};return s&&(E.indices=[[0,t.length-1]]),E}const{location:l,distance:u,threshold:o,findAllMatches:d,minMatchCharLength:h,ignoreLocation:p}=this.options;let f=[],g=0,b=!1;this.chunks.forEach(({pattern:E,alphabet:y,startIndex:S})=>{const{isMatch:v,score:_,indices:C}=A4(t,E,y,{location:l+S,distance:u,threshold:o,findAllMatches:d,minMatchCharLength:h,includeMatches:s,ignoreLocation:p});v&&(b=!0),g+=_,v&&C&&(f=[...f,...C])});let x={isMatch:b,score:b?g/this.chunks.length:1};return b&&s&&(x.indices=f),x}}class pi{constructor(t){this.pattern=t}static isMultiMatch(t){return Ew(t,this.multiRegex)}static isSingleMatch(t){return Ew(t,this.singleRegex)}search(){}}function Ew(e,t){const n=e.match(t);return n?n[1]:null}class R4 extends pi{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class N4 extends pi{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const i=t.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class O4 extends pi{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class I4 extends pi{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class L4 extends pi{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class D4 extends pi{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class AO extends pi{constructor(t,{location:n=Re.location,threshold:i=Re.threshold,distance:s=Re.distance,includeMatches:l=Re.includeMatches,findAllMatches:u=Re.findAllMatches,minMatchCharLength:o=Re.minMatchCharLength,isCaseSensitive:d=Re.isCaseSensitive,ignoreDiacritics:h=Re.ignoreDiacritics,ignoreLocation:p=Re.ignoreLocation}={}){super(t),this._bitapSearch=new TO(t,{location:n,threshold:i,distance:s,includeMatches:l,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class kO extends pi{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,i;const s=[],l=this.pattern.length;for(;(i=t.indexOf(this.pattern,n))>-1;)n=i+l,s.push([i,n-1]);const u=!!s.length;return{isMatch:u,score:u?0:1,indices:s}}}const rv=[R4,kO,O4,I4,D4,L4,N4,AO],xw=rv.length,M4=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,B4="|";function F4(e,t={}){return e.split(B4).map(n=>{let i=n.trim().split(M4).filter(l=>l&&!!l.trim()),s=[];for(let l=0,u=i.length;l<u;l+=1){const o=i[l];let d=!1,h=-1;for(;!d&&++h<xw;){const p=rv[h];let f=p.isMultiMatch(o);f&&(s.push(new p(f,t)),d=!0)}if(!d)for(h=-1;++h<xw;){const p=rv[h];let f=p.isSingleMatch(o);if(f){s.push(new p(f,t));break}}}return s})}const P4=new Set([AO.type,kO.type]);class U4{constructor(t,{isCaseSensitive:n=Re.isCaseSensitive,ignoreDiacritics:i=Re.ignoreDiacritics,includeMatches:s=Re.includeMatches,minMatchCharLength:l=Re.minMatchCharLength,ignoreLocation:u=Re.ignoreLocation,findAllMatches:o=Re.findAllMatches,location:d=Re.location,threshold:h=Re.threshold,distance:p=Re.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:i,includeMatches:s,minMatchCharLength:l,findAllMatches:o,ignoreLocation:u,location:d,threshold:h,distance:p},t=n?t:t.toLowerCase(),t=i?kc(t):t,this.pattern=t,this.query=F4(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:s,ignoreDiacritics:l}=this.options;t=s?t:t.toLowerCase(),t=l?kc(t):t;let u=0,o=[],d=0;for(let h=0,p=n.length;h<p;h+=1){const f=n[h];o.length=0,u=0;for(let g=0,b=f.length;g<b;g+=1){const x=f[g],{isMatch:E,indices:y,score:S}=x.search(t);if(E){if(u+=1,d+=S,i){const v=x.constructor.type;P4.has(v)?o=[...o,...y]:o.push(y)}}else{d=0,u=0,o.length=0;break}}if(u){let g={isMatch:!0,score:d/u};return i&&(g.indices=o),g}}return{isMatch:!1,score:1}}}const iv=[];function j4(...e){iv.push(...e)}function av(e,t){for(let n=0,i=iv.length;n<i;n+=1){let s=iv[n];if(s.condition(e,t))return new s(e,t)}return new TO(e,t)}const Rc={AND:"$and",OR:"$or"},sv={PATH:"$path",PATTERN:"$val"},ov=e=>!!(e[Rc.AND]||e[Rc.OR]),z4=e=>!!e[sv.PATH],H4=e=>!Dr(e)&&EO(e)&&!ov(e),ww=e=>({[Rc.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function RO(e,t,{auto:n=!0}={}){const i=s=>{let l=Object.keys(s);const u=z4(s);if(!u&&l.length>1&&!ov(s))return i(ww(s));if(H4(s)){const d=u?s[sv.PATH]:l[0],h=u?s[sv.PATTERN]:s[d];if(!or(h))throw new Error(f4(d));const p={keyId:nv(d),pattern:h};return n&&(p.searcher=av(h,t)),p}let o={children:[],operator:l[0]};return l.forEach(d=>{const h=s[d];Dr(h)&&h.forEach(p=>{o.children.push(i(p))})}),o};return ov(e)||(e=ww(e)),i(e)}function q4(e,{ignoreFieldNorm:t=Re.ignoreFieldNorm}){e.forEach(n=>{let i=1;n.matches.forEach(({key:s,norm:l,score:u})=>{const o=s?s.weight:null;i*=Math.pow(u===0&&o?Number.EPSILON:u,(o||1)*(t?1:l))}),n.score=i})}function $4(e,t){const n=e.matches;t.matches=[],An(n)&&n.forEach(i=>{if(!An(i.indices)||!i.indices.length)return;const{indices:s,value:l}=i;let u={indices:s,value:l};i.key&&(u.key=i.key.src),i.idx>-1&&(u.refIndex=i.idx),t.matches.push(u)})}function G4(e,t){t.score=e.score}function V4(e,t,{includeMatches:n=Re.includeMatches,includeScore:i=Re.includeScore}={}){const s=[];return n&&s.push($4),i&&s.push(G4),e.map(l=>{const{idx:u}=l,o={item:t[u],refIndex:u};return s.length&&s.forEach(d=>{d(l,o)}),o})}class mi{constructor(t,n={},i){this.options={...Re,...n},this.options.useExtendedSearch,this._keyStore=new b4(this.options.keys),this.setCollection(t,i)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Gv))throw new Error(h4);this._myIndex=n||CO(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){An(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let i=0,s=this._docs.length;i<s;i+=1){const l=this._docs[i];t(l,i)&&(this.removeAt(i),i-=1,s-=1,n.push(l))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:i,includeScore:s,shouldSort:l,sortFn:u,ignoreFieldNorm:o}=this.options;let d=or(t)?or(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return q4(d,{ignoreFieldNorm:o}),l&&d.sort(u),SO(n)&&n>-1&&(d=d.slice(0,n)),V4(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(t){const n=av(t,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:l,i:u,n:o})=>{if(!An(l))return;const{isMatch:d,score:h,indices:p}=n.searchIn(l);d&&s.push({item:l,idx:u,matches:[{score:h,value:l,norm:o,indices:p}]})}),s}_searchLogical(t){const n=RO(t,this.options),i=(o,d,h)=>{if(!o.children){const{keyId:f,searcher:g}=o,b=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(d,f),searcher:g});return b&&b.length?[{idx:h,item:d,matches:b}]:[]}const p=[];for(let f=0,g=o.children.length;f<g;f+=1){const b=o.children[f],x=i(b,d,h);if(x.length)p.push(...x);else if(o.operator===Rc.AND)return[]}return p},s=this._myIndex.records,l={},u=[];return s.forEach(({$:o,i:d})=>{if(An(o)){let h=i(n,o,d);h.length&&(l[d]||(l[d]={idx:d,item:o,matches:[]},u.push(l[d])),h.forEach(({matches:p})=>{l[d].matches.push(...p)}))}}),u}_searchObjectList(t){const n=av(t,this.options),{keys:i,records:s}=this._myIndex,l=[];return s.forEach(({$:u,i:o})=>{if(!An(u))return;let d=[];i.forEach((h,p)=>{d.push(...this._findMatches({key:h,value:u[p],searcher:n}))}),d.length&&l.push({idx:o,item:u,matches:d})}),l}_findMatches({key:t,value:n,searcher:i}){if(!An(n))return[];let s=[];if(Dr(n))n.forEach(({v:l,i:u,n:o})=>{if(!An(l))return;const{isMatch:d,score:h,indices:p}=i.searchIn(l);d&&s.push({score:h,key:t,value:l,idx:u,norm:o,indices:p})});else{const{v:l,n:u}=n,{isMatch:o,score:d,indices:h}=i.searchIn(l);o&&s.push({score:d,key:t,value:l,norm:u,indices:h})}return s}}mi.version="7.1.0";mi.createIndex=CO;mi.parseIndex=C4;mi.config=Re;mi.parseQuery=RO;j4(U4);function W4(e){switch(e.split(".").pop()?.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"cjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":return mF;case"json":case"yaml":case"yml":case"toml":return bF;case"md":case"txt":case"log":return gO;case"png":case"jpg":case"jpeg":case"gif":case"svg":case"webp":return MF;case"css":case"scss":case"sass":case"less":return $3;case"html":case"xml":return xF;default:return co}}function K4(e,t){const n=t.get(e);return n?{added:{icon:Ac,label:"Added",className:"text-green-500"},modified:{icon:vw,label:"Modified",className:"text-yellow-500"},untracked:{icon:Ac,label:"Untracked",className:"text-blue-500"}}[n]||{icon:vw,label:"Modified",className:"text-yellow-500"}:null}function Y4({files:e,changedFiles:t=[],query:n,selectedIndex:i,onSelect:s,onEnterSelect:l,onClose:u}){const o=K.useMemo(()=>new Map(t?.map(p=>[p.path,p.status])||[]),[t]),d=K.useMemo(()=>new mi(e,{threshold:.4,distance:100,ignoreLocation:!0,includeMatches:!0}),[e]),h=K.useMemo(()=>{if(!n)return e.slice(0,20);const p=d.search(n).map(f=>f.item);return p.sort((f,g)=>{const b=o.has(f),x=o.has(g);return b&&!x?-1:!b&&x?1:0}),p.slice(0,20)},[d,n,e,o]);return K.useEffect(()=>{document.getElementById(`file-item-${i}`)?.scrollIntoView({block:"nearest"})},[i]),K.useEffect(()=>{l(h[i])},[h,i,l]),K.useEffect(()=>{const p=f=>{f.target.closest("[data-file-mention-popup]")||u()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[u]),h.length===0?T.jsx("div",{"data-file-mention-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg z-50 p-3",children:T.jsx("span",{className:"text-muted-foreground text-sm",children:"No files found"})}):T.jsx("div",{"data-file-mention-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg max-h-[300px] overflow-y-auto z-50",children:h.map((p,f)=>T.jsx("button",{type:"button",id:`file-item-${f}`,onMouseDown:g=>{g.preventDefault(),s(p)},className:`w-full text-left px-3 py-2 hover:bg-accent ${f===i?"bg-accent":""}`,children:T.jsxs("div",{className:"flex items-center gap-2 w-full",children:[(()=>{const g=W4(p);return T.jsx(g,{className:"w-4 h-4 flex-shrink-0 text-muted-foreground"})})(),T.jsx("span",{className:"font-mono text-sm flex-1 truncate",children:p}),(()=>{const g=K4(p,o);return g&&T.jsx(g.icon,{className:`w-3.5 h-3.5 flex-shrink-0 ${g.className}`,title:g.label})})()]})},p))})}const Cw=[{id:"models",label:"/models",description:"Open model selector",icon:yo},{id:"agents",label:"/agents",description:"Open agent selector",icon:Ya},{id:"new",label:"/new",description:"Create new session",icon:Ac},{id:"help",label:"/help",description:"Show keyboard shortcuts and help",icon:yO},{id:"vim",label:"/vim",description:"Toggle Vim mode keybindings",icon:sF}];function X4(e){if(!e)return Cw;const t=e.toLowerCase(),n=[];for(const i of Cw){const s=i.label.toLowerCase().includes(t),l=i.description.toLowerCase().includes(t);if(s||l){const u=s?10:5;n.push({...i,matchScore:u})}}return n.sort((i,s)=>{const l=(s.matchScore||0)-(i.matchScore||0);return l!==0?l:i.label.localeCompare(s.label)})}function Z4({query:e,selectedIndex:t,onSelect:n,onEnterSelect:i,onClose:s}){const l=K.useMemo(()=>X4(e),[e]);return K.useEffect(()=>{document.getElementById(`command-item-${t}`)?.scrollIntoView({block:"nearest"})},[t]),K.useEffect(()=>{i(l[t]?.id)},[l,t,i]),K.useEffect(()=>{const u=o=>{o.target.closest("[data-command-popup]")||s()};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[s]),l.length===0?T.jsx("div",{"data-command-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg z-50 p-3",children:T.jsx("span",{className:"text-muted-foreground text-sm",children:"No commands found"})}):T.jsx("div",{"data-command-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg max-h-[300px] overflow-y-auto z-50",children:l.map((u,o)=>{const d=u.icon;return T.jsx("button",{type:"button",id:`command-item-${o}`,onMouseDown:h=>{h.preventDefault(),n(u.id)},className:`w-full text-left px-3 py-2 hover:bg-accent ${o===t?"bg-accent":""}`,children:T.jsxs("div",{className:"flex items-center gap-3 w-full",children:[T.jsx(d,{className:"w-4 h-4 flex-shrink-0 text-primary"}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"font-mono text-sm font-medium text-foreground",children:u.label}),T.jsx("div",{className:"text-xs text-muted-foreground truncate",children:u.description})]})]})},u.id)})})}const Q4={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"};function Vv({isOpen:e,onClose:t,title:n,children:i,showCloseButton:s=!0,closeOnBackdropClick:l=!0,closeOnEscape:u=!0,maxWidth:o="md"}){if(K.useEffect(()=>{if(!e||!u)return;const h=p=>{p.key==="Escape"&&(p.preventDefault(),p.stopPropagation(),t())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,u,t]),K.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e)return null;const d=h=>{l&&h.target===h.currentTarget&&t()};return T.jsxs(T.Fragment,{children:[T.jsx("button",{type:"button",className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[9999] cursor-default",onClick:d,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&d(h)},"aria-label":"Close modal"}),T.jsx("div",{className:`fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[9999] w-full ${Q4[o]} px-4`,children:T.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg",children:[(n||s)&&T.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[n&&T.jsx("div",{className:"text-lg font-semibold text-foreground",children:n}),s&&T.jsx("button",{type:"button",onClick:t,className:"text-muted-foreground hover:text-foreground transition-colors ml-auto","aria-label":"Close",children:T.jsx(Hc,{className:"h-5 w-5"})})]}),T.jsx("div",{className:"p-4",children:i})]})})]})}const J4=[{keys:["Ctrl","H"],description:"Navigate to left sidebar (sessions)",category:"Navigation"},{keys:["Ctrl","L"],description:"Navigate to right sidebar (git)",category:"Navigation"},{keys:["Ctrl","/"],description:"Toggle left sidebar collapse/expand",category:"Navigation"},{keys:["Ctrl","\\"],description:"Toggle right sidebar collapse/expand",category:"Navigation"},{keys:["Ctrl","N"],description:"Create new session",category:"Navigation"},{keys:["ESC"],description:"Close sidebar and return to center",category:"Navigation"},{keys:["J"],description:"Navigate to next item (in focused list)",category:"List Navigation"},{keys:["K"],description:"Navigate to previous item (in focused list)",category:"List Navigation"},{keys:["Enter"],description:"Select focused item and return to input",category:"List Navigation"},{keys:["Space"],description:"Toggle stage/unstage for focused file (git panel)",category:"Git Operations"},{keys:["A"],description:"Stage all unstaged files",category:"Git Operations"},{keys:["U"],description:"Unstage all staged files",category:"Git Operations"},{keys:["C"],description:"Open commit modal (if files are staged)",category:"Git Operations"},{keys:["Tab"],description:"Toggle plan mode",category:"Chat"},{keys:["Enter"],description:"Send message",category:"Chat"},{keys:["Shift","Enter"],description:"New line in message",category:"Chat"},{keys:["@"],description:"Mention file (opens file picker)",category:"Chat"},{keys:["/"],description:"Slash command (opens command menu)",category:"Chat"}],eP=[{keys:["i"],description:"Enter insert mode at cursor (vim mode)",category:"Vim Mode"},{keys:["a"],description:"Enter insert mode after cursor (vim mode)",category:"Vim Mode"},{keys:["I"],description:"Enter insert mode at line start (vim mode)",category:"Vim Mode"},{keys:["A"],description:"Enter insert mode at line end (vim mode)",category:"Vim Mode"},{keys:["o"],description:"New line below and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["O"],description:"New line above and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["ESC"],description:"Return to normal mode (vim mode)",category:"Vim Mode"},{keys:["Enter"],description:"Send message in normal mode (vim mode)",category:"Vim Mode"},{keys:["w"],description:"Jump to next word start (vim mode)",category:"Vim Mode"},{keys:["e"],description:"Jump to next word end (vim mode)",category:"Vim Mode"},{keys:["b"],description:"Jump to previous word start (vim mode)",category:"Vim Mode"},{keys:["x"],description:"Delete character under cursor (vim mode)",category:"Vim Mode"},{keys:["s"],description:"Delete character and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["S"],description:"Delete line and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["f","{char}"],description:"Find and jump to next character on line (vim mode)",category:"Vim Mode"},{keys:["d","d"],description:"Delete current line (vim mode)",category:"Vim Mode"},{keys:["0"],description:"Jump to line start (vim mode)",category:"Vim Mode"},{keys:["$"],description:"Jump to line end (vim mode)",category:"Vim Mode"}],tP=[{command:"/models",description:"Open model selector"},{command:"/agents",description:"Open agent selector"},{command:"/new",description:"Create new session"},{command:"/help",description:"Show keyboard shortcuts and help (this modal)"}];function nP(e){const t={};for(const n of e)t[n.category]||(t[n.category]=[]),t[n.category].push(n);return t}function rP({isOpen:e,onClose:t}){const n=[...J4,...eP],i=nP(n),s=K.useRef(null),l=K.useRef(null);return K.useEffect(()=>{e?(l.current=document.activeElement,l.current&&l.current.blur()):l.current&&(l.current.focus(),l.current=null)},[e]),K.useEffect(()=>{if(!e)return;const u=o=>{const d=o.target;if(!(d.tagName==="INPUT"||d.tagName==="TEXTAREA"||d.isContentEditable))if(o.key==="j"){o.preventDefault();const p=s.current;p&&p.scrollBy({top:100,behavior:"smooth"})}else if(o.key==="k"){o.preventDefault();const p=s.current;p&&p.scrollBy({top:-100,behavior:"smooth"})}else o.key==="Enter"&&(o.preventDefault(),t())};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,t]),T.jsx(Vv,{isOpen:e,onClose:t,title:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(yO,{className:"w-5 h-5"}),T.jsx("span",{children:"Keyboard Shortcuts & Help"})]}),maxWidth:"2xl",closeOnEscape:!0,closeOnBackdropClick:!0,children:T.jsxs("div",{ref:s,className:"space-y-6 max-h-[70vh] overflow-y-auto",children:[Object.entries(i).map(([u,o])=>T.jsxs("div",{children:[T.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[T.jsx(gw,{className:"w-4 h-4"}),u]}),T.jsx("div",{className:"space-y-2",children:o.map((d,h)=>T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-accent/50 hover:bg-accent transition-colors",children:[T.jsx("span",{className:"text-sm text-foreground",children:d.description}),T.jsx("div",{className:"flex items-center gap-1",children:d.keys.map(p=>T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx("kbd",{className:"px-2 py-1 text-xs font-mono bg-background border border-border rounded shadow-sm",children:p}),d.keys.indexOf(p)<d.keys.length-1&&T.jsx("span",{className:"text-muted-foreground",children:"+"})]},p))})]},`${u}-${d.description}`))})]},u)),T.jsxs("div",{children:[T.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[T.jsx(gw,{className:"w-4 h-4"}),"Slash Commands"]}),T.jsx("div",{className:"space-y-2",children:tP.map((u,o)=>T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-accent/50 hover:bg-accent transition-colors",children:[T.jsx("span",{className:"text-sm text-foreground",children:u.description}),T.jsx("kbd",{className:"px-2 py-1 text-xs font-mono bg-background border border-border rounded shadow-sm",children:u.command})]},u.command))})]}),T.jsx("div",{className:"pt-4 border-t border-border",children:T.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.jsx("strong",{children:"Tip:"})," Shortcuts are disabled when typing in input fields. Press ",T.jsx("kbd",{className:"text-xs",children:"ESC"})," to close popups and return focus to chat input."]})})]})})}var Tw;(function(e){e.OPENAI="openai",e.ANTHROPIC="anthropic",e.GOOGLE="google",e.OPENROUTER="openrouter",e.OPENCODE="opencode",e.SOLFORGE="solforge"})(Tw||(Tw={}));function NO(e,t){return function(){return e.apply(t,arguments)}}const{toString:iP}=Object.prototype,{getPrototypeOf:Wv}=Object,{iterator:qc,toStringTag:OO}=Symbol,$c=(e=>t=>{const n=iP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Xn=e=>(e=e.toLowerCase(),t=>$c(t)===e),Gc=e=>t=>typeof t===e,{isArray:Ja}=Array,Xa=Gc("undefined");function Co(e){return e!==null&&!Xa(e)&&e.constructor!==null&&!Xa(e.constructor)&&fn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const IO=Xn("ArrayBuffer");function aP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&IO(e.buffer),t}const sP=Gc("string"),fn=Gc("function"),LO=Gc("number"),To=e=>e!==null&&typeof e=="object",oP=e=>e===!0||e===!1,oc=e=>{if($c(e)!=="object")return!1;const t=Wv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(OO in e)&&!(qc in e)},lP=e=>{if(!To(e)||Co(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},cP=Xn("Date"),uP=Xn("File"),dP=Xn("Blob"),hP=Xn("FileList"),fP=e=>To(e)&&fn(e.pipe),pP=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||fn(e.append)&&((t=$c(e))==="formdata"||t==="object"&&fn(e.toString)&&e.toString()==="[object FormData]"))},mP=Xn("URLSearchParams"),[gP,bP,yP,vP]=["ReadableStream","Request","Response","Headers"].map(Xn),_P=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ao(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ja(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(Co(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),u=l.length;let o;for(i=0;i<u;i++)o=l[i],t.call(null,e[o],o,e)}}function DO(e,t){if(Co(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,s;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,MO=e=>!Xa(e)&&e!==ji;function lv(){const{caseless:e,skipUndefined:t}=MO(this)&&this||{},n={},i=(s,l)=>{const u=e&&DO(n,l)||l;oc(n[u])&&oc(s)?n[u]=lv(n[u],s):oc(s)?n[u]=lv({},s):Ja(s)?n[u]=s.slice():(!t||!Xa(s))&&(n[u]=s)};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&Ao(arguments[s],i);return n}const SP=(e,t,n,{allOwnKeys:i}={})=>(Ao(t,(s,l)=>{n&&fn(s)?e[l]=NO(s,n):e[l]=s},{allOwnKeys:i}),e),EP=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xP=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},wP=(e,t,n,i)=>{let s,l,u;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)u=s[l],(!i||i(u,e,t))&&!o[u]&&(t[u]=e[u],o[u]=!0);e=n!==!1&&Wv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},CP=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},TP=e=>{if(!e)return null;if(Ja(e))return e;let t=e.length;if(!LO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},AP=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Wv(Uint8Array)),kP=(e,t)=>{const i=(e&&e[qc]).call(e);let s;for(;(s=i.next())&&!s.done;){const l=s.value;t.call(e,l[0],l[1])}},RP=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},NP=Xn("HTMLFormElement"),OP=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Aw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),IP=Xn("RegExp"),BO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Ao(n,(s,l)=>{let u;(u=t(s,l,e))!==!1&&(i[l]=u||s)}),Object.defineProperties(e,i)},LP=e=>{BO(e,(t,n)=>{if(fn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(fn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},DP=(e,t)=>{const n={},i=s=>{s.forEach(l=>{n[l]=!0})};return Ja(e)?i(e):i(String(e).split(t)),n},MP=()=>{},BP=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function FP(e){return!!(e&&fn(e.append)&&e[OO]==="FormData"&&e[qc])}const PP=e=>{const t=new Array(10),n=(i,s)=>{if(To(i)){if(t.indexOf(i)>=0)return;if(Co(i))return i;if(!("toJSON"in i)){t[s]=i;const l=Ja(i)?[]:{};return Ao(i,(u,o)=>{const d=n(u,s+1);!Xa(d)&&(l[o]=d)}),t[s]=void 0,l}}return i};return n(e,0)},UP=Xn("AsyncFunction"),jP=e=>e&&(To(e)||fn(e))&&fn(e.then)&&fn(e.catch),FO=((e,t)=>e?setImmediate:t?((n,i)=>(ji.addEventListener("message",({source:s,data:l})=>{s===ji&&l===n&&i.length&&i.shift()()},!1),s=>{i.push(s),ji.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",fn(ji.postMessage)),zP=typeof queueMicrotask<"u"?queueMicrotask.bind(ji):typeof process<"u"&&process.nextTick||FO,HP=e=>e!=null&&fn(e[qc]),se={isArray:Ja,isArrayBuffer:IO,isBuffer:Co,isFormData:pP,isArrayBufferView:aP,isString:sP,isNumber:LO,isBoolean:oP,isObject:To,isPlainObject:oc,isEmptyObject:lP,isReadableStream:gP,isRequest:bP,isResponse:yP,isHeaders:vP,isUndefined:Xa,isDate:cP,isFile:uP,isBlob:dP,isRegExp:IP,isFunction:fn,isStream:fP,isURLSearchParams:mP,isTypedArray:AP,isFileList:hP,forEach:Ao,merge:lv,extend:SP,trim:_P,stripBOM:EP,inherits:xP,toFlatObject:wP,kindOf:$c,kindOfTest:Xn,endsWith:CP,toArray:TP,forEachEntry:kP,matchAll:RP,isHTMLForm:NP,hasOwnProperty:Aw,hasOwnProp:Aw,reduceDescriptors:BO,freezeMethods:LP,toObjectSet:DP,toCamelCase:OP,noop:MP,toFiniteNumber:BP,findKey:DO,global:ji,isContextDefined:MO,isSpecCompliantForm:FP,toJSONObject:PP,isAsyncFn:UP,isThenable:jP,setImmediate:FO,asap:zP,isIterable:HP};function Be(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}se.inherits(Be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.status}}});const PO=Be.prototype,UO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{UO[e]={value:e}});Object.defineProperties(Be,UO);Object.defineProperty(PO,"isAxiosError",{value:!0});Be.from=(e,t,n,i,s,l)=>{const u=Object.create(PO);se.toFlatObject(e,u,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const o=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return Be.call(u,o,d,n,i,s),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",l&&Object.assign(u,l),u};const qP=null;function cv(e){return se.isPlainObject(e)||se.isArray(e)}function jO(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function kw(e,t,n){return e?e.concat(t).map(function(s,l){return s=jO(s),!n&&l?"["+s+"]":s}).join(n?".":""):t}function $P(e){return se.isArray(e)&&!e.some(cv)}const GP=se.toFlatObject(se,{},null,function(t){return/^is[A-Z]/.test(t)});function Vc(e,t,n){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,y){return!se.isUndefined(y[E])});const i=n.metaTokens,s=n.visitor||p,l=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&se.isSpecCompliantForm(t);if(!se.isFunction(s))throw new TypeError("visitor must be a function");function h(x){if(x===null)return"";if(se.isDate(x))return x.toISOString();if(se.isBoolean(x))return x.toString();if(!d&&se.isBlob(x))throw new Be("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(x)||se.isTypedArray(x)?d&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function p(x,E,y){let S=x;if(x&&!y&&typeof x=="object"){if(se.endsWith(E,"{}"))E=i?E:E.slice(0,-2),x=JSON.stringify(x);else if(se.isArray(x)&&$P(x)||(se.isFileList(x)||se.endsWith(E,"[]"))&&(S=se.toArray(x)))return E=jO(E),S.forEach(function(_,C){!(se.isUndefined(_)||_===null)&&t.append(u===!0?kw([E],C,l):u===null?E:E+"[]",h(_))}),!1}return cv(x)?!0:(t.append(kw(y,E,l),h(x)),!1)}const f=[],g=Object.assign(GP,{defaultVisitor:p,convertValue:h,isVisitable:cv});function b(x,E){if(!se.isUndefined(x)){if(f.indexOf(x)!==-1)throw Error("Circular reference detected in "+E.join("."));f.push(x),se.forEach(x,function(S,v){(!(se.isUndefined(S)||S===null)&&s.call(t,S,se.isString(v)?v.trim():v,E,g))===!0&&b(S,E?E.concat(v):[v])}),f.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Rw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Kv(e,t){this._pairs=[],e&&Vc(e,this,t)}const zO=Kv.prototype;zO.append=function(t,n){this._pairs.push([t,n])};zO.toString=function(t){const n=t?function(i){return t.call(this,i,Rw)}:Rw;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function VP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function HO(e,t,n){if(!t)return e;const i=n&&n.encode||VP;se.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let l;if(s?l=s(t,n):l=se.isURLSearchParams(t)?t.toString():new Kv(t,n).toString(i),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Nw{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){se.forEach(this.handlers,function(i){i!==null&&t(i)})}}const qO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},WP=typeof URLSearchParams<"u"?URLSearchParams:Kv,KP=typeof FormData<"u"?FormData:null,YP=typeof Blob<"u"?Blob:null,XP={isBrowser:!0,classes:{URLSearchParams:WP,FormData:KP,Blob:YP},protocols:["http","https","file","blob","url","data"]},Yv=typeof window<"u"&&typeof document<"u",uv=typeof navigator=="object"&&navigator||void 0,ZP=Yv&&(!uv||["ReactNative","NativeScript","NS"].indexOf(uv.product)<0),QP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",JP=Yv&&window.location.href||"http://localhost",eU=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Yv,hasStandardBrowserEnv:ZP,hasStandardBrowserWebWorkerEnv:QP,navigator:uv,origin:JP},Symbol.toStringTag,{value:"Module"})),Yt={...eU,...XP};function tU(e,t){return Vc(e,new Yt.classes.URLSearchParams,{visitor:function(n,i,s,l){return Yt.isNode&&se.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function nU(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rU(e){const t={},n=Object.keys(e);let i;const s=n.length;let l;for(i=0;i<s;i++)l=n[i],t[l]=e[l];return t}function $O(e){function t(n,i,s,l){let u=n[l++];if(u==="__proto__")return!0;const o=Number.isFinite(+u),d=l>=n.length;return u=!u&&se.isArray(s)?s.length:u,d?(se.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!o):((!s[u]||!se.isObject(s[u]))&&(s[u]=[]),t(n,i,s[u],l)&&se.isArray(s[u])&&(s[u]=rU(s[u])),!o)}if(se.isFormData(e)&&se.isFunction(e.entries)){const n={};return se.forEachEntry(e,(i,s)=>{t(nU(i),s,n,0)}),n}return null}function iU(e,t,n){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const ko={transitional:qO,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,l=se.isObject(t);if(l&&se.isHTMLForm(t)&&(t=new FormData(t)),se.isFormData(t))return s?JSON.stringify($O(t)):t;if(se.isArrayBuffer(t)||se.isBuffer(t)||se.isStream(t)||se.isFile(t)||se.isBlob(t)||se.isReadableStream(t))return t;if(se.isArrayBufferView(t))return t.buffer;if(se.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return tU(t,this.formSerializer).toString();if((o=se.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Vc(o?{"files[]":t}:t,d&&new d,this.formSerializer)}}return l||s?(n.setContentType("application/json",!1),iU(t)):t}],transformResponse:[function(t){const n=this.transitional||ko.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(se.isResponse(t)||se.isReadableStream(t))return t;if(t&&se.isString(t)&&(i&&!this.responseType||s)){const u=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(u)throw o.name==="SyntaxError"?Be.from(o,Be.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],e=>{ko.headers[e]={}});const aU=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sU=e=>{const t={};let n,i,s;return e&&e.split(`
9
+ `).replace(y2,"")}function K0(r,a){return a=W0(a),W0(r)===a}function rt(r,a,c,m,w,k){switch(c){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||ca(r,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&ca(r,""+m);break;case"className":Do(r,"class",m);break;case"tabIndex":Do(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Do(r,c,m);break;case"style":K_(r,m,k);break;case"data":if(a!=="object"){Do(r,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||c!=="href")){r.removeAttribute(c);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=Bo(""+m),r.setAttribute(c,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof k=="function"&&(c==="formAction"?(a!=="input"&&rt(r,a,"name",w.name,w,null),rt(r,a,"formEncType",w.formEncType,w,null),rt(r,a,"formMethod",w.formMethod,w,null),rt(r,a,"formTarget",w.formTarget,w,null)):(rt(r,a,"encType",w.encType,w,null),rt(r,a,"method",w.method,w,null),rt(r,a,"target",w.target,w,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=Bo(""+m),r.setAttribute(c,m);break;case"onClick":m!=null&&(r.onclick=pr);break;case"onScroll":m!=null&&$e("scroll",r);break;case"onScrollEnd":m!=null&&$e("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(w.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}c=Bo(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""+m):r.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""):r.removeAttribute(c);break;case"capture":case"download":m===!0?r.setAttribute(c,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,m):r.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(c,m):r.removeAttribute(c);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(c):r.setAttribute(c,m);break;case"popover":$e("beforetoggle",r),$e("toggle",r),Lo(r,"popover",m);break;case"xlinkActuate":fr(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":fr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":fr(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":fr(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":fr(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":fr(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":fr(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":fr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":fr(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Lo(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=VL.get(c)||c,Lo(r,c,m))}}function Jd(r,a,c,m,w,k){switch(c){case"style":K_(r,m,k);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(w.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"children":typeof m=="string"?ca(r,m):(typeof m=="number"||typeof m=="bigint")&&ca(r,""+m);break;case"onScroll":m!=null&&$e("scroll",r);break;case"onScrollEnd":m!=null&&$e("scrollend",r);break;case"onClick":m!=null&&(r.onclick=pr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!U_.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(w=c.endsWith("Capture"),a=c.slice(2,w?c.length-7:void 0),k=r[rn]||null,k=k!=null?k[c]:null,typeof k=="function"&&r.removeEventListener(a,k,w),typeof m=="function")){typeof k!="function"&&k!==null&&(c in r?r[c]=null:r.hasAttribute(c)&&r.removeAttribute(c)),r.addEventListener(a,m,w);break e}c in r?r[c]=m:m===!0?r.setAttribute(c,""):Lo(r,c,m)}}}function qt(r,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",r),$e("load",r);var m=!1,w=!1,k;for(k in c)if(c.hasOwnProperty(k)){var D=c[k];if(D!=null)switch(k){case"src":m=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:rt(r,a,k,D,c,null)}}w&&rt(r,a,"srcSet",c.srcSet,c,null),m&&rt(r,a,"src",c.src,c,null);return;case"input":$e("invalid",r);var q=k=D=w=null,Y=null,re=null;for(m in c)if(c.hasOwnProperty(m)){var de=c[m];if(de!=null)switch(m){case"name":w=de;break;case"type":D=de;break;case"checked":Y=de;break;case"defaultChecked":re=de;break;case"value":k=de;break;case"defaultValue":q=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(i(137,a));break;default:rt(r,a,m,de,c,null)}}$_(r,k,q,Y,re,D,w,!1);return;case"select":$e("invalid",r),m=D=k=null;for(w in c)if(c.hasOwnProperty(w)&&(q=c[w],q!=null))switch(w){case"value":k=q;break;case"defaultValue":D=q;break;case"multiple":m=q;default:rt(r,a,w,q,c,null)}a=k,c=D,r.multiple=!!m,a!=null?la(r,!!m,a,!1):c!=null&&la(r,!!m,c,!0);return;case"textarea":$e("invalid",r),k=w=m=null;for(D in c)if(c.hasOwnProperty(D)&&(q=c[D],q!=null))switch(D){case"value":m=q;break;case"defaultValue":w=q;break;case"children":k=q;break;case"dangerouslySetInnerHTML":if(q!=null)throw Error(i(91));break;default:rt(r,a,D,q,c,null)}V_(r,m,w,k);return;case"option":for(Y in c)if(c.hasOwnProperty(Y)&&(m=c[Y],m!=null))switch(Y){case"selected":r.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:rt(r,a,Y,m,c,null)}return;case"dialog":$e("beforetoggle",r),$e("toggle",r),$e("cancel",r),$e("close",r);break;case"iframe":case"object":$e("load",r);break;case"video":case"audio":for(m=0;m<js.length;m++)$e(js[m],r);break;case"image":$e("error",r),$e("load",r);break;case"details":$e("toggle",r);break;case"embed":case"source":case"link":$e("error",r),$e("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(re in c)if(c.hasOwnProperty(re)&&(m=c[re],m!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:rt(r,a,re,m,c,null)}return;default:if(fu(a)){for(de in c)c.hasOwnProperty(de)&&(m=c[de],m!==void 0&&Jd(r,a,de,m,c,void 0));return}}for(q in c)c.hasOwnProperty(q)&&(m=c[q],m!=null&&rt(r,a,q,m,c,null))}function v2(r,a,c,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,k=null,D=null,q=null,Y=null,re=null,de=null;for(oe in c){var pe=c[oe];if(c.hasOwnProperty(oe)&&pe!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":Y=pe;default:m.hasOwnProperty(oe)||rt(r,a,oe,null,m,pe)}}for(var ae in m){var oe=m[ae];if(pe=c[ae],m.hasOwnProperty(ae)&&(oe!=null||pe!=null))switch(ae){case"type":k=oe;break;case"name":w=oe;break;case"checked":re=oe;break;case"defaultChecked":de=oe;break;case"value":D=oe;break;case"defaultValue":q=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,a));break;default:oe!==pe&&rt(r,a,ae,oe,m,pe)}}du(r,D,q,Y,re,de,k,w);return;case"select":oe=D=q=ae=null;for(k in c)if(Y=c[k],c.hasOwnProperty(k)&&Y!=null)switch(k){case"value":break;case"multiple":oe=Y;default:m.hasOwnProperty(k)||rt(r,a,k,null,m,Y)}for(w in m)if(k=m[w],Y=c[w],m.hasOwnProperty(w)&&(k!=null||Y!=null))switch(w){case"value":ae=k;break;case"defaultValue":q=k;break;case"multiple":D=k;default:k!==Y&&rt(r,a,w,k,m,Y)}a=q,c=D,m=oe,ae!=null?la(r,!!c,ae,!1):!!m!=!!c&&(a!=null?la(r,!!c,a,!0):la(r,!!c,c?[]:"",!1));return;case"textarea":oe=ae=null;for(q in c)if(w=c[q],c.hasOwnProperty(q)&&w!=null&&!m.hasOwnProperty(q))switch(q){case"value":break;case"children":break;default:rt(r,a,q,null,m,w)}for(D in m)if(w=m[D],k=c[D],m.hasOwnProperty(D)&&(w!=null||k!=null))switch(D){case"value":ae=w;break;case"defaultValue":oe=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:w!==k&&rt(r,a,D,w,m,k)}G_(r,ae,oe);return;case"option":for(var _e in c)if(ae=c[_e],c.hasOwnProperty(_e)&&ae!=null&&!m.hasOwnProperty(_e))switch(_e){case"selected":r.selected=!1;break;default:rt(r,a,_e,null,m,ae)}for(Y in m)if(ae=m[Y],oe=c[Y],m.hasOwnProperty(Y)&&ae!==oe&&(ae!=null||oe!=null))switch(Y){case"selected":r.selected=ae&&typeof ae!="function"&&typeof ae!="symbol";break;default:rt(r,a,Y,ae,m,oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in c)ae=c[ke],c.hasOwnProperty(ke)&&ae!=null&&!m.hasOwnProperty(ke)&&rt(r,a,ke,null,m,ae);for(re in m)if(ae=m[re],oe=c[re],m.hasOwnProperty(re)&&ae!==oe&&(ae!=null||oe!=null))switch(re){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,a));break;default:rt(r,a,re,ae,m,oe)}return;default:if(fu(a)){for(var it in c)ae=c[it],c.hasOwnProperty(it)&&ae!==void 0&&!m.hasOwnProperty(it)&&Jd(r,a,it,void 0,m,ae);for(de in m)ae=m[de],oe=c[de],!m.hasOwnProperty(de)||ae===oe||ae===void 0&&oe===void 0||Jd(r,a,de,ae,m,oe);return}}for(var te in c)ae=c[te],c.hasOwnProperty(te)&&ae!=null&&!m.hasOwnProperty(te)&&rt(r,a,te,null,m,ae);for(pe in m)ae=m[pe],oe=c[pe],!m.hasOwnProperty(pe)||ae===oe||ae==null&&oe==null||rt(r,a,pe,ae,m,oe)}function Y0(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _2(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,c=performance.getEntriesByType("resource"),m=0;m<c.length;m++){var w=c[m],k=w.transferSize,D=w.initiatorType,q=w.duration;if(k&&q&&Y0(D)){for(D=0,q=w.responseEnd,m+=1;m<c.length;m++){var Y=c[m],re=Y.startTime;if(re>q)break;var de=Y.transferSize,pe=Y.initiatorType;de&&Y0(pe)&&(Y=Y.responseEnd,D+=de*(Y<q?1:(q-re)/(Y-re)))}if(--m,a+=8*(k+D)/(w.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var eh=null,th=null;function Ol(r){return r.nodeType===9?r:r.ownerDocument}function X0(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Z0(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function nh(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var rh=null;function S2(){var r=window.event;return r&&r.type==="popstate"?r===rh?!1:(rh=r,!0):(rh=null,!1)}var Q0=typeof setTimeout=="function"?setTimeout:void 0,E2=typeof clearTimeout=="function"?clearTimeout:void 0,J0=typeof Promise=="function"?Promise:void 0,x2=typeof queueMicrotask=="function"?queueMicrotask:typeof J0<"u"?function(r){return J0.resolve(null).then(r).catch(w2)}:Q0;function w2(r){setTimeout(function(){throw r})}function ti(r){return r==="head"}function ex(r,a){var c=a,m=0;do{var w=c.nextSibling;if(r.removeChild(c),w&&w.nodeType===8)if(c=w.data,c==="/$"||c==="/&"){if(m===0){r.removeChild(w),ja(a);return}m--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")m++;else if(c==="html")Hs(r.ownerDocument.documentElement);else if(c==="head"){c=r.ownerDocument.head,Hs(c);for(var k=c.firstChild;k;){var D=k.nextSibling,q=k.nodeName;k[ss]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&k.rel.toLowerCase()==="stylesheet"||c.removeChild(k),k=D}}else c==="body"&&Hs(r.ownerDocument.body);c=w}while(c);ja(a)}function tx(r,a){var c=r;r=0;do{var m=c.nextSibling;if(c.nodeType===1?a?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(a?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(r===0)break;r--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||r++;c=m}while(c)}function ih(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":ih(c),cu(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function C2(r,a,c,m){for(;r.nodeType===1;){var w=c;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[ss])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(k=r.getAttribute("rel"),k==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(k!==w.rel||r.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||r.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||r.getAttribute("title")!==(w.title==null?null:w.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(k=r.getAttribute("src"),(k!==(w.src==null?null:w.src)||r.getAttribute("type")!==(w.type==null?null:w.type)||r.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&k&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var k=w.name==null?null:""+w.name;if(w.type==="hidden"&&r.getAttribute("name")===k)return r}else return r;if(r=Un(r.nextSibling),r===null)break}return null}function T2(r,a,c){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!c||(r=Un(r.nextSibling),r===null))return null;return r}function nx(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Un(r.nextSibling),r===null))return null;return r}function ah(r){return r.data==="$?"||r.data==="$~"}function sh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function A2(r,a){var c=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||c.readyState!=="loading")a();else{var m=function(){a(),c.removeEventListener("DOMContentLoaded",m)};c.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function Un(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var oh=null;function rx(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(a===0)return Un(r.nextSibling);a--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||a++}r=r.nextSibling}return null}function ix(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(a===0)return r;a--}else c!=="/$"&&c!=="/&"||a++}r=r.previousSibling}return null}function ax(r,a,c){switch(a=Ol(c),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Hs(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);cu(r)}var jn=new Map,sx=new Set;function Il(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Nr=J.d;J.d={f:k2,r:R2,D:N2,C:O2,L:I2,m:L2,X:M2,S:D2,M:B2};function k2(){var r=Nr.f(),a=xl();return r||a}function R2(r){var a=aa(r);a!==null&&a.tag===5&&a.type==="form"?xE(a):Nr.r(r)}var Fa=typeof document>"u"?null:document;function ox(r,a,c){var m=Fa;if(m&&typeof a=="string"&&a){var w=In(a);w='link[rel="'+r+'"][href="'+w+'"]',typeof c=="string"&&(w+='[crossorigin="'+c+'"]'),sx.has(w)||(sx.add(w),r={rel:r,crossOrigin:c,href:a},m.querySelector(w)===null&&(a=m.createElement("link"),qt(a,"link",r),Ft(a),m.head.appendChild(a)))}}function N2(r){Nr.D(r),ox("dns-prefetch",r,null)}function O2(r,a){Nr.C(r,a),ox("preconnect",r,a)}function I2(r,a,c){Nr.L(r,a,c);var m=Fa;if(m&&r&&a){var w='link[rel="preload"][as="'+In(a)+'"]';a==="image"&&c&&c.imageSrcSet?(w+='[imagesrcset="'+In(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(w+='[imagesizes="'+In(c.imageSizes)+'"]')):w+='[href="'+In(r)+'"]';var k=w;switch(a){case"style":k=Pa(r);break;case"script":k=Ua(r)}jn.has(k)||(r=f({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:r,as:a},c),jn.set(k,r),m.querySelector(w)!==null||a==="style"&&m.querySelector(qs(k))||a==="script"&&m.querySelector($s(k))||(a=m.createElement("link"),qt(a,"link",r),Ft(a),m.head.appendChild(a)))}}function L2(r,a){Nr.m(r,a);var c=Fa;if(c&&r){var m=a&&typeof a.as=="string"?a.as:"script",w='link[rel="modulepreload"][as="'+In(m)+'"][href="'+In(r)+'"]',k=w;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":k=Ua(r)}if(!jn.has(k)&&(r=f({rel:"modulepreload",href:r},a),jn.set(k,r),c.querySelector(w)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector($s(k)))return}m=c.createElement("link"),qt(m,"link",r),Ft(m),c.head.appendChild(m)}}}function D2(r,a,c){Nr.S(r,a,c);var m=Fa;if(m&&r){var w=sa(m).hoistableStyles,k=Pa(r);a=a||"default";var D=w.get(k);if(!D){var q={loading:0,preload:null};if(D=m.querySelector(qs(k)))q.loading=5;else{r=f({rel:"stylesheet",href:r,"data-precedence":a},c),(c=jn.get(k))&&lh(r,c);var Y=D=m.createElement("link");Ft(Y),qt(Y,"link",r),Y._p=new Promise(function(re,de){Y.onload=re,Y.onerror=de}),Y.addEventListener("load",function(){q.loading|=1}),Y.addEventListener("error",function(){q.loading|=2}),q.loading|=4,Ll(D,a,m)}D={type:"stylesheet",instance:D,count:1,state:q},w.set(k,D)}}}function M2(r,a){Nr.X(r,a);var c=Fa;if(c&&r){var m=sa(c).hoistableScripts,w=Ua(r),k=m.get(w);k||(k=c.querySelector($s(w)),k||(r=f({src:r,async:!0},a),(a=jn.get(w))&&ch(r,a),k=c.createElement("script"),Ft(k),qt(k,"link",r),c.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},m.set(w,k))}}function B2(r,a){Nr.M(r,a);var c=Fa;if(c&&r){var m=sa(c).hoistableScripts,w=Ua(r),k=m.get(w);k||(k=c.querySelector($s(w)),k||(r=f({src:r,async:!0,type:"module"},a),(a=jn.get(w))&&ch(r,a),k=c.createElement("script"),Ft(k),qt(k,"link",r),c.head.appendChild(k)),k={type:"script",instance:k,count:1,state:null},m.set(w,k))}}function lx(r,a,c,m){var w=(w=ue.current)?Il(w):null;if(!w)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(a=Pa(c.href),c=sa(w).hoistableStyles,m=c.get(a),m||(m={type:"style",instance:null,count:0,state:null},c.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){r=Pa(c.href);var k=sa(w).hoistableStyles,D=k.get(r);if(D||(w=w.ownerDocument||w,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},k.set(r,D),(k=w.querySelector(qs(r)))&&!k._p&&(D.instance=k,D.state.loading=5),jn.has(r)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},jn.set(r,c),k||F2(w,r,c,D.state))),a&&m===null)throw Error(i(528,""));return D}if(a&&m!==null)throw Error(i(529,""));return null;case"script":return a=c.async,c=c.src,typeof c=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ua(c),c=sa(w).hoistableScripts,m=c.get(a),m||(m={type:"script",instance:null,count:0,state:null},c.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Pa(r){return'href="'+In(r)+'"'}function qs(r){return'link[rel="stylesheet"]['+r+"]"}function cx(r){return f({},r,{"data-precedence":r.precedence,precedence:null})}function F2(r,a,c,m){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=r.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),qt(a,"link",c),Ft(a),r.head.appendChild(a))}function Ua(r){return'[src="'+In(r)+'"]'}function $s(r){return"script[async]"+r}function ux(r,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var m=r.querySelector('style[data-href~="'+In(c.href)+'"]');if(m)return a.instance=m,Ft(m),m;var w=f({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Ft(m),qt(m,"style",w),Ll(m,c.precedence,r),a.instance=m;case"stylesheet":w=Pa(c.href);var k=r.querySelector(qs(w));if(k)return a.state.loading|=4,a.instance=k,Ft(k),k;m=cx(c),(w=jn.get(w))&&lh(m,w),k=(r.ownerDocument||r).createElement("link"),Ft(k);var D=k;return D._p=new Promise(function(q,Y){D.onload=q,D.onerror=Y}),qt(k,"link",m),a.state.loading|=4,Ll(k,c.precedence,r),a.instance=k;case"script":return k=Ua(c.src),(w=r.querySelector($s(k)))?(a.instance=w,Ft(w),w):(m=c,(w=jn.get(k))&&(m=f({},c),ch(m,w)),r=r.ownerDocument||r,w=r.createElement("script"),Ft(w),qt(w,"link",m),r.head.appendChild(w),a.instance=w);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,Ll(m,c.precedence,r));return a.instance}function Ll(r,a,c){for(var m=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=m.length?m[m.length-1]:null,k=w,D=0;D<m.length;D++){var q=m[D];if(q.dataset.precedence===a)k=q;else if(k!==w)break}k?k.parentNode.insertBefore(r,k.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(r,a.firstChild))}function lh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function ch(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var Dl=null;function dx(r,a,c){if(Dl===null){var m=new Map,w=Dl=new Map;w.set(c,m)}else w=Dl,m=w.get(c),m||(m=new Map,w.set(c,m));if(m.has(r))return m;for(m.set(r,null),c=c.getElementsByTagName(r),w=0;w<c.length;w++){var k=c[w];if(!(k[ss]||k[Ut]||r==="link"&&k.getAttribute("rel")==="stylesheet")&&k.namespaceURI!=="http://www.w3.org/2000/svg"){var D=k.getAttribute(a)||"";D=r+D;var q=m.get(D);q?q.push(k):m.set(D,[k])}}return m}function hx(r,a,c){r=r.ownerDocument||r,r.head.insertBefore(c,a==="title"?r.querySelector("head > title"):null)}function P2(r,a,c){if(c===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return r=a.disabled,typeof a.precedence=="string"&&r==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function fx(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function U2(r,a,c,m){if(c.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var w=Pa(m.href),k=a.querySelector(qs(w));if(k){a=k._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Ml.bind(r),a.then(r,r)),c.state.loading|=4,c.instance=k,Ft(k);return}k=a.ownerDocument||a,m=cx(m),(w=jn.get(w))&&lh(m,w),k=k.createElement("link"),Ft(k);var D=k;D._p=new Promise(function(q,Y){D.onload=q,D.onerror=Y}),qt(k,"link",m),c.instance=k}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(c,a),(a=c.state.preload)&&(c.state.loading&3)===0&&(r.count++,c=Ml.bind(r),a.addEventListener("load",c),a.addEventListener("error",c))}}var uh=0;function j2(r,a){return r.stylesheets&&r.count===0&&Fl(r,r.stylesheets),0<r.count||0<r.imgCount?function(c){var m=setTimeout(function(){if(r.stylesheets&&Fl(r,r.stylesheets),r.unsuspend){var k=r.unsuspend;r.unsuspend=null,k()}},6e4+a);0<r.imgBytes&&uh===0&&(uh=62500*_2());var w=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Fl(r,r.stylesheets),r.unsuspend)){var k=r.unsuspend;r.unsuspend=null,k()}},(r.imgBytes>uh?50:800)+a);return r.unsuspend=c,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(w)}}:null}function Ml(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fl(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Bl=null;function Fl(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Bl=new Map,a.forEach(z2,r),Bl=null,Ml.call(r))}function z2(r,a){if(!(a.state.loading&4)){var c=Bl.get(r);if(c)var m=c.get(null);else{c=new Map,Bl.set(r,c);for(var w=r.querySelectorAll("link[data-precedence],style[data-precedence]"),k=0;k<w.length;k++){var D=w[k];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(c.set(D.dataset.precedence,D),m=D)}m&&c.set(null,m)}w=a.instance,D=w.getAttribute("data-precedence"),k=c.get(D)||m,k===m&&c.set(null,w),c.set(D,w),this.count++,m=Ml.bind(this),w.addEventListener("load",m),w.addEventListener("error",m),k?k.parentNode.insertBefore(w,k.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(w,r.firstChild)),a.state.loading|=4}}var Gs={$$typeof:_,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function H2(r,a,c,m,w,k,D,q,Y){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=au(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=au(0),this.hiddenUpdates=au(null),this.identifierPrefix=m,this.onUncaughtError=w,this.onCaughtError=k,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function px(r,a,c,m,w,k,D,q,Y,re,de,pe){return r=new H2(r,a,c,D,Y,re,de,pe,q),a=1,k===!0&&(a|=24),k=vn(3,null,null,a),r.current=k,k.stateNode=r,a=qu(),a.refCount++,r.pooledCache=a,a.refCount++,k.memoizedState={element:m,isDehydrated:c,cache:a},Wu(k),r}function mx(r){return r?(r=ga,r):ga}function gx(r,a,c,m,w,k){w=mx(w),m.context===null?m.context=w:m.pendingContext=w,m=$r(a),m.payload={element:c},k=k===void 0?null:k,k!==null&&(m.callback=k),c=Gr(r,m,a),c!==null&&(un(c,r,a),xs(c,r,a))}function bx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<a?c:a}}function dh(r,a){bx(r,a),(r=r.alternate)&&bx(r,a)}function yx(r){if(r.tag===13||r.tag===31){var a=xi(r,67108864);a!==null&&un(a,r,67108864),dh(r,67108864)}}function vx(r){if(r.tag===13||r.tag===31){var a=wn();a=su(a);var c=xi(r,a);c!==null&&un(c,r,a),dh(r,a)}}var Pl=!0;function q2(r,a,c,m){var w=W.T;W.T=null;var k=J.p;try{J.p=2,hh(r,a,c,m)}finally{J.p=k,W.T=w}}function $2(r,a,c,m){var w=W.T;W.T=null;var k=J.p;try{J.p=8,hh(r,a,c,m)}finally{J.p=k,W.T=w}}function hh(r,a,c,m){if(Pl){var w=fh(m);if(w===null)Qd(r,a,m,Ul,c),Sx(r,m);else if(V2(w,r,a,c,m))m.stopPropagation();else if(Sx(r,m),a&4&&-1<G2.indexOf(r)){for(;w!==null;){var k=aa(w);if(k!==null)switch(k.tag){case 3:if(k=k.stateNode,k.current.memoizedState.isDehydrated){var D=Qn(k.pendingLanes);if(D!==0){var q=k;for(q.pendingLanes|=2,q.entangledLanes|=2;D;){var Y=1<<31-Je(D);q.entanglements[1]|=Y,D&=~Y}nr(k),(Qe&6)===0&&(Sl=Oe()+500,Us(0))}}break;case 31:case 13:q=xi(k,2),q!==null&&un(q,k,2),xl(),dh(k,2)}if(k=fh(m),k===null&&Qd(r,a,m,Ul,c),k===w)break;w=k}w!==null&&m.stopPropagation()}else Qd(r,a,m,null,c)}}function fh(r){return r=mu(r),ph(r)}var Ul=null;function ph(r){if(Ul=null,r=ia(r),r!==null){var a=l(r);if(a===null)r=null;else{var c=a.tag;if(c===13){if(r=u(a),r!==null)return r;r=null}else if(c===31){if(r=o(a),r!==null)return r;r=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Ul=r,null}function _x(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(je()){case ce:return 2;case me:return 8;case ve:case Ce:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var mh=!1,ni=null,ri=null,ii=null,Vs=new Map,Ws=new Map,ai=[],G2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Sx(r,a){switch(r){case"focusin":case"focusout":ni=null;break;case"dragenter":case"dragleave":ri=null;break;case"mouseover":case"mouseout":ii=null;break;case"pointerover":case"pointerout":Vs.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ws.delete(a.pointerId)}}function Ks(r,a,c,m,w,k){return r===null||r.nativeEvent!==k?(r={blockedOn:a,domEventName:c,eventSystemFlags:m,nativeEvent:k,targetContainers:[w]},a!==null&&(a=aa(a),a!==null&&yx(a)),r):(r.eventSystemFlags|=m,a=r.targetContainers,w!==null&&a.indexOf(w)===-1&&a.push(w),r)}function V2(r,a,c,m,w){switch(a){case"focusin":return ni=Ks(ni,r,a,c,m,w),!0;case"dragenter":return ri=Ks(ri,r,a,c,m,w),!0;case"mouseover":return ii=Ks(ii,r,a,c,m,w),!0;case"pointerover":var k=w.pointerId;return Vs.set(k,Ks(Vs.get(k)||null,r,a,c,m,w)),!0;case"gotpointercapture":return k=w.pointerId,Ws.set(k,Ks(Ws.get(k)||null,r,a,c,m,w)),!0}return!1}function Ex(r){var a=ia(r.target);if(a!==null){var c=l(a);if(c!==null){if(a=c.tag,a===13){if(a=u(c),a!==null){r.blockedOn=a,B_(r.priority,function(){vx(c)});return}}else if(a===31){if(a=o(c),a!==null){r.blockedOn=a,B_(r.priority,function(){vx(c)});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function jl(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var c=fh(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);pu=m,c.target.dispatchEvent(m),pu=null}else return a=aa(c),a!==null&&yx(a),r.blockedOn=c,!1;a.shift()}return!0}function xx(r,a,c){jl(r)&&c.delete(a)}function W2(){mh=!1,ni!==null&&jl(ni)&&(ni=null),ri!==null&&jl(ri)&&(ri=null),ii!==null&&jl(ii)&&(ii=null),Vs.forEach(xx),Ws.forEach(xx)}function zl(r,a){r.blockedOn===a&&(r.blockedOn=null,mh||(mh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,W2)))}var Hl=null;function wx(r){Hl!==r&&(Hl=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hl===r&&(Hl=null);for(var a=0;a<r.length;a+=3){var c=r[a],m=r[a+1],w=r[a+2];if(typeof m!="function"){if(ph(m||c)===null)continue;break}var k=aa(c);k!==null&&(r.splice(a,3),a-=3,fd(k,{pending:!0,data:w,method:c.method,action:m},m,w))}}))}function ja(r){function a(Y){return zl(Y,r)}ni!==null&&zl(ni,r),ri!==null&&zl(ri,r),ii!==null&&zl(ii,r),Vs.forEach(a),Ws.forEach(a);for(var c=0;c<ai.length;c++){var m=ai[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<ai.length&&(c=ai[0],c.blockedOn===null);)Ex(c),c.blockedOn===null&&ai.shift();if(c=(r.ownerDocument||r).$$reactFormReplay,c!=null)for(m=0;m<c.length;m+=3){var w=c[m],k=c[m+1],D=w[rn]||null;if(typeof k=="function")D||wx(c);else if(D){var q=null;if(k&&k.hasAttribute("formAction")){if(w=k,D=k[rn]||null)q=D.formAction;else if(ph(w)!==null)continue}else q=D.action;typeof q=="function"?c[m+1]=q:(c.splice(m,3),m-=3),wx(c)}}}function Cx(){function r(k){k.canIntercept&&k.info==="react-transition"&&k.intercept({handler:function(){return new Promise(function(D){return w=D})},focusReset:"manual",scroll:"manual"})}function a(){w!==null&&(w(),w=null),m||setTimeout(c,20)}function c(){if(!m&&!navigation.transition){var k=navigation.currentEntry;k&&k.url!=null&&navigation.navigate(k.url,{state:k.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,w=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(c,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),w!==null&&(w(),w=null)}}}function gh(r){this._internalRoot=r}ql.prototype.render=gh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var c=a.current,m=wn();gx(c,m,r,a,null,null)},ql.prototype.unmount=gh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;gx(r.current,2,null,r,null,null),xl(),a[ra]=null}};function ql(r){this._internalRoot=r}ql.prototype.unstable_scheduleHydration=function(r){if(r){var a=M_();r={blockedOn:null,target:r,priority:a};for(var c=0;c<ai.length&&a!==0&&a<ai[c].priority;c++);ai.splice(c,0,r),c===0&&Ex(r)}};var Tx=t.version;if(Tx!=="19.2.0")throw Error(i(527,Tx,"19.2.0"));J.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var K2={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $l=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$l.isDisabled&&$l.supportsFiber)try{mt=$l.inject(K2),at=$l}catch{}}return Xs.createRoot=function(r,a){if(!s(r))throw Error(i(299));var c=!1,m="",w=LE,k=DE,D=ME;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(w=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(D=a.onRecoverableError)),a=px(r,1,!1,null,null,c,m,null,w,k,D,Cx),r[ra]=a.current,Zd(r),new gh(a)},Xs.hydrateRoot=function(r,a,c){if(!s(r))throw Error(i(299));var m=!1,w="",k=LE,D=DE,q=ME,Y=null;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(w=c.identifierPrefix),c.onUncaughtError!==void 0&&(k=c.onUncaughtError),c.onCaughtError!==void 0&&(D=c.onCaughtError),c.onRecoverableError!==void 0&&(q=c.onRecoverableError),c.formState!==void 0&&(Y=c.formState)),a=px(r,1,!0,a,c??null,m,w,Y,k,D,q,Cx),a.context=mx(null),c=a.current,m=wn(),m=su(m),w=$r(m),w.callback=null,Gr(c,w,m),c=m,a.current.lanes=c,as(a,c),nr(a),r[ra]=a.current,Zd(r),new ql(a)},Xs.version="19.2.0",Xs}var Bx;function rM(){if(Bx)return vh.exports;Bx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),vh.exports=nM(),vh.exports}var iM=rM(),Qa=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},aM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sM=class{#e=aM;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ui=new sM;function oM(e){setTimeout(e,0)}var Vi=typeof window>"u"||"Deno"in globalThis;function Jt(){}function lM(e,t){return typeof e=="function"?e(t):e}function Wy(e){return typeof e=="number"&&e>=0&&e!==1/0}function MN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ui(e,t){return typeof e=="function"?e(t):e}function Hn(e,t){return typeof e=="function"?e(t):e}function Fx(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:l,queryKey:u,stale:o}=e;if(u){if(i){if(t.queryHash!==Rv(u,t.options))return!1}else if(!po(t.queryKey,u))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||l&&!l(t))}function Px(e,t){const{exact:n,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Wi(t.options.mutationKey)!==Wi(l))return!1}else if(!po(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function Rv(e,t){return(t?.queryKeyHashFn||Wi)(e)}function Wi(e){return JSON.stringify(e,(t,n)=>Ky(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function po(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>po(e[n],t[n])):!1}var cM=Object.prototype.hasOwnProperty;function BN(e,t){if(e===t)return e;const n=Ux(e)&&Ux(t);if(!n&&!(Ky(e)&&Ky(t)))return t;const s=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),u=l.length,o=n?new Array(u):{};let d=0;for(let h=0;h<u;h++){const p=n?h:l[h],f=e[p],g=t[p];if(f===g){o[p]=f,(n?h<s:cM.call(e,p))&&d++;continue}if(f===null||g===null||typeof f!="object"||typeof g!="object"){o[p]=g;continue}const b=BN(f,g);o[p]=b,b===f&&d++}return s===u&&d===s?e:o}function pc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ux(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ky(e){if(!jx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jx(e){return Object.prototype.toString.call(e)==="[object Object]"}function uM(e){return new Promise(t=>{Ui.setTimeout(t,e)})}function Yy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?BN(e,t):t}function dM(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function hM(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Nv=Symbol();function FN(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Nv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function PN(e,t){return typeof e=="function"?e(...t):!!e}var fM=class extends Qa{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Vi&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Ov=new fM;function Xy(){let e,t;const n=new Promise((s,l)=>{e=s,t=l});n.status="pending",n.catch(()=>{});function i(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},n.reject=s=>{i({status:"rejected",reason:s}),t(s)},n}var pM=oM;function mM(){let e=[],t=0,n=o=>{o()},i=o=>{o()},s=pM;const l=o=>{t?e.push(o):s(()=>{n(o)})},u=()=>{const o=e;e=[],o.length&&s(()=>{i(()=>{o.forEach(d=>{n(d)})})})};return{batch:o=>{let d;t++;try{d=o()}finally{t--,t||u()}return d},batchCalls:o=>(...d)=>{l(()=>{o(...d)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{i=o},setScheduler:o=>{s=o}}}var Lt=mM(),gM=class extends Qa{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Vi&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},mc=new gM;function bM(e){return Math.min(1e3*2**e,3e4)}function UN(e){return(e??"online")==="online"?mc.isOnline():!0}var Zy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function jN(e){let t=!1,n=0,i;const s=Xy(),l=()=>s.status!=="pending",u=E=>{if(!l()){const y=new Zy(E);g(y),e.onCancel?.(y)}},o=()=>{t=!0},d=()=>{t=!1},h=()=>Ov.isFocused()&&(e.networkMode==="always"||mc.isOnline())&&e.canRun(),p=()=>UN(e.networkMode)&&e.canRun(),f=E=>{l()||(i?.(),s.resolve(E))},g=E=>{l()||(i?.(),s.reject(E))},b=()=>new Promise(E=>{i=y=>{(l()||h())&&E(y)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),x=()=>{if(l())return;let E;const y=n===0?e.initialPromise:void 0;try{E=y??e.fn()}catch(S){E=Promise.reject(S)}Promise.resolve(E).then(f).catch(S=>{if(l())return;const v=e.retry??(Vi?0:3),_=e.retryDelay??bM,C=typeof _=="function"?_(n,S):_,N=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,S);if(t||!N){g(S);return}n++,e.onFail?.(n,S),uM(C).then(()=>h()?void 0:b()).then(()=>{t?g(S):x()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(i?.(),s),cancelRetry:o,continueRetry:d,canStart:p,start:()=>(p()?x():b().then(x),s)}}var zN=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wy(this.gcTime)&&(this.#e=Ui.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ui.clearTimeout(this.#e),this.#e=void 0)}},yM=class extends zN{#e;#t;#n;#i;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Hx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Hx(this.options);t.data!==void 0&&(this.setState(zx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Yy(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Hn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ui(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!MN(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const o=this.observers.find(d=>d.options.queryFn);o&&this.setOptions(o.options)}const n=new AbortController,i=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const o=FN(this.options,t),h=(()=>{const p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(p),p})();return this.#o=!1,this.options.persister?this.options.persister(o,h,this):o(h)},u=(()=>{const o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:s};return i(o),o})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#a({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=jN({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:o=>{o instanceof Zy&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(o,d)=>{this.#a({type:"failed",failureCount:o,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const o=await this.#r.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#n.config.onSuccess?.(o,this),this.#n.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof Zy){if(o.silent)return this.#r.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#a({type:"error",error:o}),this.#n.config.onError?.(o,this),this.#n.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...HN(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...zx(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Lt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function HN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:UN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Hx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var vM=class extends Qa{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=Xy(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#o;#a;#m;#h;#f;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),qx(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qy(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qy(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!pc(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&$x(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||Hn(this.options.enabled,this.#t)!==Hn(t.enabled,this.#t)||ui(this.options.staleTime,this.#t)!==ui(t.staleTime,this.#t))&&this.#g();const s=this.#b();i&&(this.#t!==n||Hn(this.options.enabled,this.#t)!==Hn(t.enabled,this.#t)||s!==this.#l)&&this.#y(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return SM(this,n)&&(this.#i=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Jt)),t}#g(){this.#_();const e=ui(this.options.staleTime,this.#t);if(Vi||this.#i.isStale||!Wy(e))return;const n=MN(this.#i.dataUpdatedAt,e)+1;this.#c=Ui.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#S(),this.#l=e,!(Vi||Hn(this.options.enabled,this.#t)===!1||!Wy(this.#l)||this.#l===0)&&(this.#u=Ui.setInterval(()=>{(this.options.refetchIntervalInBackground||Ov.isFocused())&&this.#d()},this.#l))}#v(){this.#g(),this.#y(this.#b())}#_(){this.#c&&(Ui.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(Ui.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#i,l=this.#r,u=this.#s,d=e!==n?e.state:this.#n,{state:h}=e;let p={...h},f=!1,g;if(t._optimisticResults){const R=this.hasListeners(),I=!R&&qx(e,t),M=R&&$x(e,n,t,i);(I||M)&&(p={...p,...HN(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:E}=p;g=p.data;let y=!1;if(t.placeholderData!==void 0&&g===void 0&&E==="pending"){let R;s?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(R=s.data,y=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,R!==void 0&&(E="success",g=Yy(s?.data,R,t),f=!0)}if(t.select&&g!==void 0&&!y)if(s&&g===l?.data&&t.select===this.#m)g=this.#h;else try{this.#m=t.select,g=t.select(g),g=Yy(s?.data,g,t),this.#h=g,this.#a=null}catch(R){this.#a=R}this.#a&&(b=this.#a,g=this.#h,x=Date.now(),E="error");const S=p.fetchStatus==="fetching",v=E==="pending",_=E==="error",C=v&&S,N=g!==void 0,O={status:E,fetchStatus:p.fetchStatus,isPending:v,isSuccess:E==="success",isError:_,isInitialLoading:C,isLoading:C,data:g,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!v,isLoadingError:_&&!N,isPaused:p.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&N,isStale:Iv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Hn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=P=>{O.status==="error"?P.reject(O.error):O.data!==void 0&&P.resolve(O.data)},I=()=>{const P=this.#o=O.promise=Xy();R(P)},M=this.#o;switch(M.status){case"pending":e.queryHash===n.queryHash&&R(M);break;case"fulfilled":(O.status==="error"||O.data!==M.value)&&I();break;case"rejected":(O.status!=="error"||O.error!==M.reason)&&I();break}}return O}updateResult(){const e=this.#i,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#f=this.#t),pc(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#i).some(u=>{const o=u;return this.#i[o]!==e[o]&&l.has(o)})};this.#x({listeners:n()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#x(e){Lt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function _M(e,t){return Hn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function qx(e,t){return _M(e,t)||e.state.data!==void 0&&Qy(e,t,t.refetchOnMount)}function Qy(e,t,n){if(Hn(t.enabled,e)!==!1&&ui(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Iv(e,t)}return!1}function $x(e,t,n,i){return(e!==t||Hn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Iv(e,n)}function Iv(e,t){return Hn(t.enabled,e)!==!1&&e.isStaleByTime(ui(t.staleTime,e))}function SM(e,t){return!pc(e.getCurrentResult(),t)}function Gx(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},d=0;const h=async()=>{let p=!1;const f=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},g=FN(t.options,t.fetchOptions),b=async(x,E,y)=>{if(p)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);const v=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:E,direction:y?"backward":"forward",meta:t.options.meta};return f(A),A})(),_=await g(v),{maxPages:C}=t.options,N=y?hM:dM;return{pages:N(x.pages,_,C),pageParams:N(x.pageParams,E,C)}};if(s&&l.length){const x=s==="backward",E=x?EM:Vx,y={pages:l,pageParams:u},S=E(i,y);o=await b(y,S,x)}else{const x=e??l.length;do{const E=d===0?u[0]??i.initialPageParam:Vx(i,o);if(d>0&&E==null)break;o=await b(o,E),d++}while(d<x)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function Vx(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function EM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var xM=class extends zN{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||qN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=jN({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",s=!this.#i.canStart();try{if(i)t();else{this.#r({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:s})}const l=await this.#i.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{throw await this.#n.config.onError?.(l,e,this.state.context,this,n),await this.options.onError?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,l,e,this.state.context,n),l}finally{this.#r({type:"error",error:l})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Lt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function qN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wM=class extends Qa{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const i=new xM({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=Gl(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Gl(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Gl(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=Gl(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Lt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Px(t,n))}findAll(e={}){return this.getAll().filter(t=>Px(e,t))}notify(e){Lt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Lt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Jt))))}};function Gl(e){return e.options.scope?.id}var CM=class extends Qa{#e;#t=void 0;#n;#i;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),pc(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Wi(n.mutationKey)!==Wi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,n){return this.#i=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??qN();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Lt.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,i=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#i.onSuccess?.(t.data,n,i,s),this.#i.onSettled?.(t.data,null,n,i,s)):t?.type==="error"&&(this.#i.onError?.(t.error,n,i,s),this.#i.onSettled?.(void 0,t.error,n,i,s))}this.listeners.forEach(n=>{n(this.#t)})})}},TM=class extends Qa{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??Rv(i,t);let l=this.get(s);return l||(l=new yM({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Lt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Fx(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Fx(e,n)):t}notify(e){Lt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Lt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Lt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},AM=class{#e;#t;#n;#i;#r;#s;#o;#a;constructor(e={}){this.#e=e.queryCache||new TM,this.#t=e.mutationCache||new wM,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=Ov.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=mc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ui(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,u=lM(t,l);if(u!==void 0)return this.#e.build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Lt.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Lt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Lt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Lt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return Lt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Lt.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,n);return n.throwOnError||(l=l.catch(Jt)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ui(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=Gx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=Gx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return mc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(Wi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{po(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Wi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{po(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rv(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Nv&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},$N=K.createContext(void 0),mn=e=>{const t=K.useContext($N);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},kM=({client:e,children:t})=>(K.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx($N.Provider,{value:e,children:t})),GN=K.createContext(!1),RM=()=>K.useContext(GN);GN.Provider;function NM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var OM=K.createContext(NM()),IM=()=>K.useContext(OM),LM=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},DM=e=>{K.useEffect(()=>{e.clearReset()},[e])},MM=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||PN(n,[e.error,i])),BM=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>n(i(...s)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},FM=(e,t)=>e.isLoading&&e.isFetching&&!t,PM=(e,t)=>e?.suspense&&t.isPending,Wx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function UM(e,t,n){const i=RM(),s=IM(),l=mn(),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=i?"isRestoring":"optimistic",BM(u),LM(u,s),DM(s);const o=!l.getQueryCache().get(u.queryHash),[d]=K.useState(()=>new t(l,u)),h=d.getOptimisticResult(u),p=!i&&e.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(f=>{const g=p?d.subscribe(Lt.batchCalls(f)):Jt;return d.updateResult(),g},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),K.useEffect(()=>{d.setOptions(u)},[u,d]),PM(u,h))throw Wx(u,d,s);if(MM({result:h,errorResetBoundary:s,throwOnError:u.throwOnError,query:l.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,h),u.experimental_prefetchInRender&&!Vi&&FM(h,i)&&(o?Wx(u,d,s):l.getQueryCache().get(u.queryHash)?.promise)?.catch(Jt).finally(()=>{d.updateResult()}),u.notifyOnChangeProps?h:d.trackResult(h)}function fi(e,t){return UM(e,vM)}function Yn(e,t){const n=mn(),[i]=K.useState(()=>new CM(n,e));K.useEffect(()=>{i.setOptions(e)},[i,e]);const s=K.useSyncExternalStore(K.useCallback(u=>i.subscribe(Lt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=K.useCallback((u,o)=>{i.mutate(u,o).catch(Jt)},[i]);if(s.error&&PN(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const Jy=new WeakMap,jM=new WeakMap,gc={current:[]};let xh=!1,so=0;const ao=new Set,Vl=new Map;function VN(e){for(const t of e){if(gc.current.includes(t))continue;gc.current.push(t),t.recompute();const n=jM.get(t);if(n)for(const i of n){const s=Jy.get(i);s?.length&&VN(s)}}}function zM(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function HM(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function WN(e){if(so>0&&!Vl.has(e)&&Vl.set(e,e.prevState),ao.add(e),!(so>0)&&!xh)try{for(xh=!0;ao.size>0;){const t=Array.from(ao);ao.clear();for(const n of t){const i=Vl.get(n)??n.prevState;n.prevState=i,zM(n)}for(const n of t){const i=Jy.get(n);i&&(gc.current.push(n),VN(i))}for(const n of t){const i=Jy.get(n);if(i)for(const s of i)HM(s)}}}finally{xh=!1,gc.current=[],Vl.clear()}}function oo(e){so++;try{e()}finally{if(so--,so===0){const t=ao.values().next().value;t&&WN(t)}}}function qM(e){return typeof e=="function"}class $M{constructor(t,n){this.listeners=new Set,this.subscribe=i=>{var s,l;this.listeners.add(i);const u=(l=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:l.call(s,i,this);return()=>{this.listeners.delete(i),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,i,s;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):qM(t)?this.state=t(this.prevState):this.state=t,(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),WN(this)}}const di="__TSR_index",Kx="popstate",Yx="beforeunload";function GM(e){let t=e.getLocation();const n=new Set,i=u=>{t=e.getLocation(),n.forEach(o=>o({location:t,action:u}))},s=u=>{e.notifyOnIndexChange??!0?i(u):t=e.getLocation()},l=async({task:u,navigateOpts:o,...d})=>{if(o?.ignoreBlocker??!1){u();return}const p=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&p.length&&f)for(const g of p){const b=bc(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:d.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,o,d)=>{const h=t.state[di];o=Xx(h+1,o),l({task:()=>{e.pushState(u,o),i({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:u,state:o})},replace:(u,o,d)=>{const h=t.state[di];o=Xx(h,o),l({task:()=>{e.replaceState(u,o),i({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:u,state:o})},go:(u,o)=>{l({task:()=>{e.go(u),s({type:"GO",index:u})},navigateOpts:o,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[di]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,u]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function Xx(e,t){t||(t={});const n=Lv();return{...t,key:n,__TSR_key:n,[di]:e}}function VM(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let s=[];const l=()=>s,u=R=>s=R,o=(R=>R),d=(()=>bc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const R=Lv();t.history.replaceState({[di]:0,key:R,__TSR_key:R},"")}let h=d(),p,f=!1,g=!1,b=!1,x=!1;const E=()=>h;let y,S;const v=()=>{y&&(O._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),O._ignoreSubscribers=!1,y=void 0,S=void 0,p=void 0)},_=(R,I,M)=>{const P=o(I);S||(p=h),h=bc(I,M),y={href:P,state:M,isPush:y?.isPush||R==="push"},S||(S=Promise.resolve().then(()=>v()))},C=R=>{h=d(),O.notify({type:R})},N=async()=>{if(g){g=!1;return}const R=d(),I=R.state[di]-h.state[di],M=I===1,P=I===-1,j=!M&&!P||f;f=!1;const z=j?"GO":P?"BACK":"FORWARD",G=j?{type:"GO",index:I}:{type:P?"BACK":"FORWARD"};if(b)b=!1;else{const V=l();if(typeof document<"u"&&V.length){for(const W of V)if(await W.blockerFn({currentLocation:h,nextLocation:R,action:z})){g=!0,t.history.go(1),O.notify(G);return}}}h=d(),O.notify(G)},A=R=>{if(x){x=!1;return}let I=!1;const M=l();if(typeof document<"u"&&M.length)for(const P of M){const j=P.enableBeforeUnload??!0;if(j===!0){I=!0;break}if(typeof j=="function"&&j()===!0){I=!0;break}}if(I)return R.preventDefault(),R.returnValue=""},O=GM({getLocation:E,getLength:()=>t.history.length,pushState:(R,I)=>_("push",R,I),replaceState:(R,I)=>_("replace",R,I),back:R=>(R&&(b=!0),x=!0,t.history.back()),forward:R=>{R&&(b=!0),x=!0,t.history.forward()},go:R=>{f=!0,t.history.go(R)},createHref:R=>o(R),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(Yx,A,{capture:!0}),t.removeEventListener(Kx,N)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(Yx,A,{capture:!0}),t.addEventListener(Kx,N),t.history.pushState=function(...R){const I=n.apply(t.history,R);return O._ignoreSubscribers||C("PUSH"),I},t.history.replaceState=function(...R){const I=i.apply(t.history,R);return O._ignoreSubscribers||C("REPLACE"),I},O}function bc(e,t){const n=e.indexOf("#"),i=e.indexOf("?"),s=Lv();return{href:e,pathname:e.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:e.length),hash:n>-1?e.substring(n):"",search:i>-1?e.slice(i,n===-1?void 0:n):"",state:t||{[di]:0,key:s,__TSR_key:s}}}function Lv(){return(Math.random()+1).toString(36).substring(7)}function yc(e){return e[e.length-1]}function WM(e){return typeof e=="function"}function zi(e,t){return WM(e)?e(t):e}const KM=Object.prototype.hasOwnProperty;function zn(e,t){if(e===t)return e;const n=t,i=Jx(e)&&Jx(n);if(!i&&!(vc(e)&&vc(n)))return n;const s=i?e:Zx(e);if(!s)return n;const l=i?n:Zx(n);if(!l)return n;const u=s.length,o=l.length,d=i?new Array(o):{};let h=0;for(let p=0;p<o;p++){const f=i?p:l[p],g=e[f],b=n[f];if(g===b){d[f]=g,(i?p<u:KM.call(e,f))&&h++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){d[f]=b;continue}const x=zn(g,b);d[f]=x,x===g&&h++}return u===o&&h===u?e:d}function Zx(e){const t=[],n=Object.getOwnPropertyNames(e);for(const s of n){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}const i=Object.getOwnPropertySymbols(e);for(const s of i){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}return t}function vc(e){if(!Qx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Qx(n)||!n.hasOwnProperty("isPrototypeOf"))}function Qx(e){return Object.prototype.toString.call(e)==="[object Object]"}function Jx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,s=e.length;i<s;i++)if(!Hi(e[i],t[i],n))return!1;return!0}if(vc(e)&&vc(t)){const i=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!i||t[u]!==void 0)&&!Hi(e[u],t[u],n))return!1;return!0}let s=0;if(!i)s=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&s++;let l=0;for(const u in t)if((!i||t[u]!==void 0)&&(l++,l>s||!Hi(e[u],t[u],n)))return!1;return s===l}return!1}function Wa(e){let t,n;const i=new Promise((s,l)=>{t=s,n=l});return i.status="pending",i.resolve=s=>{i.status="resolved",i.value=s,t(s),e?.(s)},i.reject=s=>{i.status="rejected",n(s)},i}function hi(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function ew(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function tw(e,t){if(!e)return e;const n=/%25|%5C/gi;let i=0,s="",l;for(;(l=n.exec(e))!==null;)s+=ew(e.slice(i,l.index))+l[0],i=n.lastIndex;return s+ew(i?e.slice(i):e)}var YM="Invariant failed";function Lr(e,t){if(!e)throw new Error(YM)}function _c(e){const t=new Map;let n,i;const s=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,i&&(i.next=l,l.prev=i)):(l.next.prev=void 0,n=l.next,l.next=void 0,i&&(l.prev=i,i.next=l)),i=l)};return{get(l){const u=t.get(l);if(u)return s(u),u.value},set(l,u){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===i&&(i=void 0)}const o=t.get(l);if(o)o.value=u,s(o);else{const d={key:l,value:u,prev:i};i&&(i.next=d),i=d,n||(n=d),t.set(l,d)}},clear(){t.clear(),n=void 0,i=void 0}}}const Ka=0,Ki=1,Yi=2,mo=3,XM=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,ZM=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,QM=/^([^{]*)\{\$\}([^}]*)$/;function Dv(e,t,n=new Uint16Array(6)){const i=e.indexOf("/",t),s=i===-1?e.length:i,l=e.substring(t,s);if(!l||!l.includes("$"))return n[0]=Ka,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(l==="$"){const h=e.length;return n[0]=Yi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=Ki,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const u=l.match(QM);if(u){const p=u[1].length;return n[0]=Yi,n[1]=t+p,n[2]=t+p+1,n[3]=t+p+2,n[4]=t+p+3,n[5]=e.length,n}const o=l.match(ZM);if(o){const h=o[1],p=o[2],f=o[3],g=h.length;return n[0]=mo,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+p.length,n[4]=s-f.length,n[5]=s,n}const d=l.match(XM);if(d){const h=d[1],p=d[2],f=d[3],g=h.length;return n[0]=Ki,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+p.length,n[4]=s-f.length,n[5]=s,n}return n[0]=Ka,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function Bc(e,t,n,i,s,l,u){u?.(n);let o=i;{const d=n.fullPath??n.from,h=d.length,p=n.options?.caseSensitive??e;for(;o<h;){const f=Dv(d,o,t);let g;const b=o,x=f[5];switch(o=x+1,l++,f[0]){case Ka:{const y=d.substring(f[2],f[3]);if(p){const S=s.static?.get(y);if(S)g=S;else{s.static??=new Map;const v=go(n.fullPath??n.from);v.parent=s,v.depth=l,g=v,s.static.set(y,v)}}else{const S=y.toLowerCase(),v=s.staticInsensitive?.get(S);if(v)g=v;else{s.staticInsensitive??=new Map;const _=go(n.fullPath??n.from);_.parent=s,_.depth=l,g=_,s.staticInsensitive.set(S,_)}}break}case Ki:{const y=d.substring(b,f[1]),S=d.substring(f[4],x),v=p&&!!(y||S),_=y?v?y:y.toLowerCase():void 0,C=S?v?S:S.toLowerCase():void 0,N=s.dynamic?.find(A=>A.caseSensitive===v&&A.prefix===_&&A.suffix===C);if(N)g=N;else{const A=Ch(Ki,n.fullPath??n.from,v,_,C);g=A,A.depth=l,A.parent=s,s.dynamic??=[],s.dynamic.push(A)}break}case mo:{const y=d.substring(b,f[1]),S=d.substring(f[4],x),v=p&&!!(y||S),_=y?v?y:y.toLowerCase():void 0,C=S?v?S:S.toLowerCase():void 0,N=s.optional?.find(A=>A.caseSensitive===v&&A.prefix===_&&A.suffix===C);if(N)g=N;else{const A=Ch(mo,n.fullPath??n.from,v,_,C);g=A,A.parent=s,A.depth=l,s.optional??=[],s.optional.push(A)}break}case Yi:{const y=d.substring(b,f[1]),S=d.substring(f[4],x),v=p&&!!(y||S),_=y?v?y:y.toLowerCase():void 0,C=S?v?S:S.toLowerCase():void 0,N=Ch(Yi,n.fullPath??n.from,v,_,C);g=N,N.parent=s,N.depth=l,s.wildcard??=[],s.wildcard.push(N)}}s=g}if((n.path||!n.children)&&!n.isRoot){const f=d.endsWith("/");f||(s.notFound=n),(!s.route||!s.isIndex&&f)&&(s.route=n),s.isIndex||=f}}if(n.children)for(const d of n.children)Bc(e,t,d,o,s,l,u)}function wh(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Fi(e){if(e.static)for(const t of e.static.values())Fi(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Fi(t);if(e.dynamic?.length){e.dynamic.sort(wh);for(const t of e.dynamic)Fi(t)}if(e.optional?.length){e.optional.sort(wh);for(const t of e.optional)Fi(t)}if(e.wildcard?.length){e.wildcard.sort(wh);for(const t of e.wildcard)Fi(t)}}function go(e){return{kind:Ka,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Ch(e,t,n,i,s){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:i,suffix:s}}function JM(e,t){const n=go("/"),i=new Uint16Array(6);for(const s of e)Bc(!1,i,s,1,n,0);Fi(n),t.masksTree=n,t.flatCache=_c(1e3)}function eB(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const i=Mv(e,t.masksTree);return t.flatCache.set(e,i),i}function tB(e,t,n,i,s){e||="/",i||="/";const l=t?`case\0${e}`:e;let u=s.singleCache.get(l);if(!u){u=go("/");const o=new Uint16Array(6);Bc(t,o,{from:e},1,u,0),s.singleCache.set(l,u)}return Mv(i,u,n)}function nB(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,s=t.matchCache.get(i);if(s!==void 0)return s;e||="/";const l=Mv(e,t.segmentTree,n);return l&&(l.branch=sB(l.route)),t.matchCache.set(i,l),l}function rB(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function iB(e,t=!1,n){const i=go(e.fullPath),s=new Uint16Array(6),l={},u={};let o=0;return Bc(t,s,e,1,i,0,h=>{if(n?.(h,o),Lr(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,o!==0&&h.path){const p=rB(h.fullPath);(!u[p]||h.fullPath.endsWith("/"))&&(u[p]=h)}o++}),Fi(i),{processedTree:{segmentTree:i,singleCache:_c(1e3),matchCache:_c(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Mv(e,t,n=!1){const i=e.split("/"),s=lB(e,i,t,n);if(!s)return null;const l=aB(e,i,s),u="**"in s;return u&&(l["**"]=s["**"]),{route:u?s.node.notFound??s.node.route:s.node.route,params:l}}function aB(e,t,n){const i=oB(n.node);let s=null;const l={};for(let u=0,o=0,d=0;o<i.length;u++,o++,d++){const h=i[o],p=t[u],f=d;if(p&&(d+=p.length),h.kind===Ki){s??=n.node.fullPath.split("/");const g=s[o],b=h.prefix?.length??0;if(g.charCodeAt(b)===123){const E=h.suffix?.length??0,y=g.substring(b+2,g.length-E-1),S=p.substring(b,p.length-E);l[y]=decodeURIComponent(S)}else{const E=g.substring(1);l[E]=decodeURIComponent(p)}}else if(h.kind===mo){if(n.skipped&1<<o){u--;continue}s??=n.node.fullPath.split("/");const g=s[o],b=h.prefix?.length??0,x=h.suffix?.length??0,E=g.substring(b+3,g.length-x-1),y=h.suffix||h.prefix?p.substring(b,p.length-x):p;y&&(l[E]=decodeURIComponent(y))}else if(h.kind===Yi){const g=h,b=e.substring(f+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),x=decodeURIComponent(b);l["*"]=x,l._splat=x;break}}return l}function sB(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function oB(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function lB(e,t,n,i){const s=!yc(t),l=s&&e!=="/",u=t.length-(s?1:0),o=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,h=null,p=null;for(;o.length;){const f=o.pop();let{node:g,index:b,skipped:x,depth:E,statics:y,dynamics:S,optionals:v}=f;i&&g.notFound&&Th(h,f)&&(h=f);const _=b===u;if(_){if(g.route&&(!l||g.isIndex)&&(Th(p,f)&&(p=f),y===u))return p;if(!g.optional&&!g.wildcard)continue}const C=_?void 0:t[b];let N;if(g.wildcard&&Th(d,f))for(const A of g.wildcard){const{prefix:O,suffix:R}=A;if(!(O&&(_||!(A.caseSensitive?C:N??=C.toLowerCase()).startsWith(O)))){if(R){if(_)continue;const I=t.slice(b).join("/").slice(-R.length);if((A.caseSensitive?I:I.toLowerCase())!==R)continue}d={node:A,index:b,skipped:x,depth:E,statics:y,dynamics:S,optionals:v};break}}if(g.optional){const A=x|1<<E,O=E+1;for(let R=g.optional.length-1;R>=0;R--){const I=g.optional[R];o.push({node:I,index:b,skipped:A,depth:O,statics:y,dynamics:S,optionals:v})}if(!_)for(let R=g.optional.length-1;R>=0;R--){const I=g.optional[R],{prefix:M,suffix:P}=I;if(M||P){const j=I.caseSensitive?C:N??=C.toLowerCase();if(M&&!j.startsWith(M)||P&&!j.endsWith(P))continue}o.push({node:I,index:b+1,skipped:x,depth:O,statics:y,dynamics:S,optionals:v+1})}}if(!_&&g.dynamic&&C)for(let A=g.dynamic.length-1;A>=0;A--){const O=g.dynamic[A],{prefix:R,suffix:I}=O;if(R||I){const M=O.caseSensitive?C:N??=C.toLowerCase();if(R&&!M.startsWith(R)||I&&!M.endsWith(I))continue}o.push({node:O,index:b+1,skipped:x,depth:E+1,statics:y,dynamics:S+1,optionals:v})}if(!_&&g.staticInsensitive){const A=g.staticInsensitive.get(N??=C.toLowerCase());A&&o.push({node:A,index:b+1,skipped:x,depth:E+1,statics:y+1,dynamics:S,optionals:v})}if(!_&&g.static){const A=g.static.get(C);A&&o.push({node:A,index:b+1,skipped:x,depth:E+1,statics:y+1,dynamics:S,optionals:v})}}if(p)return p;if(d)return d;if(i&&h){let f=h.index;for(let b=0;b<h.index;b++)f+=t[b].length;const g=f===e.length?"/":e.slice(f);return{node:h.node,skipped:h.skipped,"**":decodeURIComponent(g)}}return null}function Th(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&t.optionals>e.optionals):!0}function ic(e){return Bv(e.filter(t=>t!==void 0).join("/"))}function Bv(e){return e.replace(/\/{2,}/g,"/")}function KN(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function qi(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function ac(e){return qi(KN(e))}function Sc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function cB(e,t,n){return Sc(e,n)===Sc(t,n)}function uB({base:e,to:t,trailingSlash:n="never",cache:i}){const s=t.startsWith("/"),l=!s&&t===".";let u;if(i){u=s?t:l?e:e+"\0"+t;const f=i.get(u);if(f)return f}let o;if(l)o=e.split("/");else if(s)o=t.split("/");else{for(o=e.split("/");o.length>1&&yc(o)==="";)o.pop();const f=t.split("/");for(let g=0,b=f.length;g<b;g++){const x=f[g];x===""?g?g===b-1&&o.push(x):o=[x]:x===".."?o.pop():x==="."||o.push(x)}}o.length>1&&(yc(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));let d,h="";for(let f=0;f<o.length;f++){f>0&&(h+="/");const g=o[f];if(!g)continue;d=Dv(g,0,d);const b=d[0];if(b===Ka){h+=g;continue}const x=d[5],E=g.substring(0,d[1]),y=g.substring(d[4],x),S=g.substring(d[2],d[3]);b===Ki?h+=E||y?`${E}{$${S}}${y}`:`$${S}`:b===Yi?h+=E||y?`${E}{$}${y}`:"$":h+=`${E}{-$${S}}${y}`}h=Bv(h);const p=h||"/";return u&&i&&i.set(u,p),p}function Ah(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?encodeURI(i):dB(i,n)}function kh({path:e,params:t,decodeCharMap:n}){let i=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const l=e.length;let u=0,o,d="";for(;u<l;){const p=u;o=Dv(e,p,o);const f=o[5];if(u=f+1,p===f)continue;const g=o[0];if(g===Ka){d+="/"+e.substring(p,f);continue}if(g===Yi){const b=t._splat;s._splat=b,s["*"]=b;const x=e.substring(p,o[1]),E=e.substring(o[4],f);if(!b){i=!0,(x||E)&&(d+="/"+x+E);continue}const y=Ah("_splat",t,n);d+="/"+x+y+E;continue}if(g===Ki){const b=e.substring(o[2],o[3]);!i&&!(b in t)&&(i=!0),s[b]=t[b];const x=e.substring(p,o[1]),E=e.substring(o[4],f),y=Ah(b,t,n)??"undefined";d+="/"+x+y+E;continue}if(g===mo){const b=e.substring(o[2],o[3]),x=e.substring(p,o[1]),E=e.substring(o[4],f),y=t[b];if(y==null){(x||E)&&(d+="/"+x+E);continue}s[b]=y;const S=Ah(b,t,n)??"";d+="/"+x+S+E;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:s,interpolatedPath:d||"/",isMissingParams:i}}function dB(e,t){let n=encodeURIComponent(e);if(t)for(const[i,s]of t)n=n.replaceAll(i,s);return n}function Kn(e){return!!e?.isNotFound}function hB(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Ec="tsr-scroll-restoration-v1_3",fB=(e,t)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{e(...i),n=null},t))}};function pB(){const e=hB();if(!e)return null;const t=e.getItem(Ec);let n=t?JSON.parse(t):{};return{state:n,set:i=>(n=zi(i,n)||n,e.setItem(Ec,JSON.stringify(n)))}}const Wl=pB(),ev=e=>e.state.__TSR_key||e.href;function mB(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let xc=!1;function YN({storageKey:e,key:t,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:s,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const o=t||window.history.state?.__TSR_key,d=u[o];xc=!0;e:{if(i&&d&&Object.keys(d).length>0){for(const f in d){const g=d[f];if(f==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(f){const b=document.querySelector(f);b&&(b.scrollLeft=g.scrollX,b.scrollTop=g.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const g=document.getElementById(h);g&&g.scrollIntoView(f)}break e}const p={top:0,left:0,behavior:n};if(window.scrollTo(p),s)for(const f of s){if(f==="window")continue;const g=typeof f=="function"?f():document.querySelector(f);g&&g.scrollTo(p)}}xc=!1}function gB(e,t){if(!Wl&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Wl))return;e.isScrollRestorationSetup=!0,xc=!1;const i=e.options.getScrollRestorationKey||ev;window.history.scrollRestoration="manual";const s=l=>{if(xc||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const d=l.target.getAttribute("data-scroll-restoration-id");d?u=`[data-scroll-restoration-id="${d}"]`:u=mB(l.target)}const o=i(e.state.location);Wl.set(d=>{const h=d[o]||={},p=h[u]||={};if(u==="window")p.scrollX=window.scrollX||0,p.scrollY=window.scrollY||0;else if(u){const f=document.querySelector(u);f&&(p.scrollX=f.scrollLeft||0,p.scrollY=f.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",fB(s,100),!0),e.subscribe("onRendered",l=>{const u=i(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(YN({storageKey:Ec,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Wl.set(o=>(o[u]||={},o)))})}function bB(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function yB(e,t=String){const n=new URLSearchParams;for(const i in e){const s=e[i];s!==void 0&&n.set(i,t(s))}return n.toString()}function Rh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function vB(e){const t=new URLSearchParams(e),n={};for(const[i,s]of t.entries()){const l=n[i];l==null?n[i]=Rh(s):Array.isArray(l)?l.push(Rh(s)):n[i]=[l,Rh(s)]}return n}const _B=EB(JSON.parse),SB=xB(JSON.stringify,JSON.parse);function EB(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=vB(t);for(const i in n){const s=n[i];if(typeof s=="string")try{n[i]=e(s)}catch{}}return n}}function xB(e,t){const n=typeof t=="function";function i(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const l=yB(s,i);return l?`?${l}`:""}}const Tn="__root__";function XN(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function sr(e){return e instanceof Response&&!!e.options}const sc=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Fc=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),ZN=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Lr(n.options.notFoundComponent);const i=e.matches.find(s=>s.routeId===n.id);Lr(i,"Could not find match for route: "+n.id),e.updateMatch(i.id,s=>({...s,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,ZN(e,t))},li=(e,t,n)=>{if(!(!sr(n)&&!Kn(n))){if(sr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const i=sr(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:i,isFetching:!1,error:n})),Kn(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw sr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(ZN(e,n),n)}},QN=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Zs=(e,t,n,i)=>{const{id:s,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=i,e.firstBadMatchIndex??=t,li(e,e.router.getMatch(s),n);try{u.options.onError?.(n)}catch(o){n=o,li(e,e.router.getMatch(s),n)}e.updateMatch(s,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},wB=(e,t,n,i)=>{const s=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){s.ssr=i.id===Tn;return}if(u?.ssr===!1){s.ssr=!1;return}const o=b=>b===!0&&u?.ssr==="data-only"?"data-only":b,d=e.router.options.defaultSsr??!0;if(i.options.ssr===void 0){s.ssr=o(d);return}if(typeof i.options.ssr!="function"){s.ssr=o(i.options.ssr);return}const{search:h,params:p}=s,f={search:Kl(h,s.searchError),params:Kl(p,s.paramsError),location:e.location,matches:e.matches.map(b=>({index:b.index,pathname:b.pathname,fullPath:b.fullPath,staticData:b.staticData,id:b.id,routeId:b.routeId,search:Kl(b.search,b.searchError),params:Kl(b.params,b.paramsError),ssr:b.ssr}))},g=i.options.ssr(f);if(hi(g))return g.then(b=>{s.ssr=o(b??d)});s.ssr=o(g??d)},JN=(e,t,n,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Fc(e,t)&&(n.options.loader||n.options.beforeLoad||nO(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{sc(e)},s);i._nonReactive.pendingTimeout=u}},CB=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;JN(e,t,n,i);const s=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&li(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(s):s()},TB=(e,t,n,i)=>{const s=e.router.getMatch(t),l=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Wa(()=>{l?.resolve()});const{paramsError:u,searchError:o}=s;u&&Zs(e,n,u,"PARSE_PARAMS"),o&&Zs(e,n,o,"VALIDATE_SEARCH"),JN(e,t,i,s);const d=new AbortController,h=e.matches[n-1]?.id,g={...(h?e.router.getMatch(h):void 0)?.context??e.router.options.context??void 0,...s.__routeContext};let b=!1;const x=()=>{b||(b=!0,e.updateMatch(t,O=>({...O,isFetching:"beforeLoad",fetchCount:O.fetchCount+1,abortController:d,context:g})))},E=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,O=>({...O,isFetching:!1}))};if(!i.options.beforeLoad){oo(()=>{x(),E()});return}s._nonReactive.beforeLoadPromise=Wa();const{search:y,params:S,cause:v}=s,_=Fc(e,t),C={search:y,abortController:d,params:S,preload:_,context:g,location:e.location,navigate:O=>e.router.navigate({...O,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?"preload":v,matches:e.matches,...e.router.options.additionalContext},N=O=>{if(O===void 0){oo(()=>{x(),E()});return}(sr(O)||Kn(O))&&(x(),Zs(e,n,O,"BEFORE_LOAD")),oo(()=>{x(),e.updateMatch(t,R=>({...R,__beforeLoadContext:O,context:{...R.context,...O}})),E()})};let A;try{if(A=i.options.beforeLoad(C),hi(A))return x(),A.catch(O=>{Zs(e,n,O,"BEFORE_LOAD")}).then(N)}catch(O){x(),Zs(e,n,O,"BEFORE_LOAD")}N(A)},AB=(e,t)=>{const{id:n,routeId:i}=e.matches[t],s=e.router.looseRoutesById[i],l=()=>{if(e.router.isServer){const d=wB(e,n,t,s);if(hi(d))return d.then(o)}return o()},u=()=>TB(e,n,t,s),o=()=>{if(QN(e,n))return;const d=CB(e,n,s);return hi(d)?d.then(u):u()};return l()},lo=(e,t,n)=>{const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([l,u,o])=>{const d=l?.meta,h=l?.links,p=l?.scripts,f=l?.styles;return{meta:d,links:h,headScripts:p,headers:o,scripts:u,styles:f}})},eO=(e,t,n,i)=>{const s=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:o,cause:d}=e.router.getMatch(t);let h=e.router.options.context??{};for(let f=0;f<=n;f++){const g=e.matches[f];if(!g)continue;const b=e.router.getMatch(g.id);b&&(h={...h,...b.__routeContext??{},...b.__beforeLoadContext??{}})}const p=Fc(e,t);return{params:l,deps:u,preload:!!p,parentMatchPromise:s,abortController:o,context:h,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:p?"preload":d,route:i,...e.router.options.additionalContext}},nw=async(e,t,n,i)=>{try{const s=e.router.getMatch(t);try{(!e.router.isServer||s.ssr===!0)&&tO(i);const l=i.options.loader?.(eO(e,t,n,i)),u=i.options.loader&&hi(l);if(!!(u||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(t,f=>({...f,isFetching:"loader"})),i.options.loader){const f=u?await l:l;li(e,e.router.getMatch(t),f),f!==void 0&&e.updateMatch(t,g=>({...g,loaderData:f}))}i._lazyPromise&&await i._lazyPromise;const d=lo(e,t,i),h=d?await d:void 0,p=s._nonReactive.minPendingPromise;p&&await p,i._componentsPromise&&await i._componentsPromise,e.updateMatch(t,f=>({...f,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...h}))}catch(l){let u=l;const o=s._nonReactive.minPendingPromise;o&&await o,Kn(l)&&await i.options.notFoundComponent?.preload?.(),li(e,e.router.getMatch(t),l);try{i.options.onError?.(l)}catch(p){u=p,li(e,e.router.getMatch(t),p)}const d=lo(e,t,i),h=d?await d:void 0;e.updateMatch(t,p=>({...p,error:u,status:"error",isFetching:!1,...h}))}}catch(s){const l=e.router.getMatch(t);if(l){const u=lo(e,t,i);if(u){const o=await u;e.updateMatch(t,d=>({...d,...o}))}l._nonReactive.loaderPromise=void 0}li(e,l,s)}},kB=async(e,t)=>{const{id:n,routeId:i}=e.matches[t];let s=!1,l=!1;const u=e.router.looseRoutesById[i];if(QN(e,n)){if(e.router.isServer){const h=lo(e,n,u);if(h){const p=await h;e.updateMatch(n,f=>({...f,...p}))}return e.router.getMatch(n)}}else{const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const p=e.router.getMatch(n),f=p._nonReactive.error||p.error;f&&li(e,p,f)}else{const p=Date.now()-h.updatedAt,f=Fc(e,n),g=f?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,b=u.options.shouldReload,x=typeof b=="function"?b(eO(e,n,t,u)):b,E=!!f&&!e.router.state.matches.some(_=>_.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=Wa(),E!==y.preload&&e.updateMatch(n,_=>({..._,preload:E}));const{status:S,invalid:v}=y;if(s=S==="success"&&(v||(x??p>g)),!(f&&u.options.preload===!1))if(s&&!e.sync)l=!0,(async()=>{try{await nw(e,n,t,u);const _=e.router.getMatch(n);_._nonReactive.loaderPromise?.resolve(),_._nonReactive.loadPromise?.resolve(),_._nonReactive.loaderPromise=void 0}catch(_){sr(_)&&await e.router.navigate(_.options)}})();else if(S!=="success"||s&&e.sync)await nw(e,n,t,u);else{const _=lo(e,n,u);if(_){const C=await _;e.updateMatch(n,N=>({...N,...C}))}}}}const o=e.router.getMatch(n);l||(o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loadPromise?.resolve()),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0,l||(o._nonReactive.loaderPromise=void 0),o._nonReactive.dehydrated=void 0;const d=l?o.isFetching:!1;return d!==o.isFetching||o.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):o};async function rw(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&sc(t);try{for(let s=0;s<t.matches.length;s++){const l=AB(t,s);hi(l)&&await l}const n=t.firstBadMatchIndex??t.matches.length;for(let s=0;s<n;s++)t.matchPromises.push(kB(t,s));await Promise.all(t.matchPromises);const i=sc(t);hi(i)&&await i}catch(n){if(Kn(n)&&!t.preload){const i=sc(t);throw hi(i)&&await i,n}if(sr(n))throw n}return t.matches}async function tO(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...i}=t.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const i of rO){const s=e.options[i]?.preload;s&&n.push(s())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Kl(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function nO(e){for(const t of rO)if(e.options[t]?.preload)return!0;return!1}const rO=["component","errorComponent","pendingComponent","notFoundComponent"];function RB(e){return{input:({url:t})=>{for(const n of e)t=iO(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=aO(e[n],t);return t}}}function NB(e){const t=ac(e.basepath),n=`/${t}`,i=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:u})=>{const o=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return o===s?u.pathname="/":o.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=ic(["/",t,u.pathname]),u)}}function iO(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function aO(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function $i(e){const t=e.resolvedLocation,n=e.location,i=t?.pathname!==n.pathname,s=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:i,hrefChanged:s,hashChanged:l}}class OB{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options,s=this.basepath??i?.basepath??"/",l=this.basepath===void 0,u=i?.rewrite;this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=VM())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new $M(LB(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),gB(this));let o=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(l||s!==d||u!==h){this.basepath=d;const g=[];ac(d)!==""&&g.push(NB({basepath:d})),h&&g.push(h),this.rewrite=g.length===0?void 0:g.length===1?g[0]:RB(g),this.history&&this.updateLatestLocation(),o=!0}o&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:i,processedTree:s}=iB(this.routeTree,this.options.caseSensitive,(u,o)=>{u.init({originalIndex:o})});this.options.routeMasks&&JM(this.options.routeMasks,s),this.routesById=n,this.routesByPath=i,this.processedTree=s;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,i)=>{const s={eventType:n,fn:i};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const s=({href:d,state:h})=>{const p=new URL(d,this.origin),f=iO(this.rewrite,p),g=this.options.parseSearch(f.search),b=this.options.stringifySearch(g);f.search=b;const x=f.href.replace(f.origin,""),{pathname:E,hash:y}=f;return{href:x,publicHref:d,url:f.href,pathname:tw(E),searchStr:b,search:zn(i?.search,g),hash:y.split("#").reverse()[0]??"",state:zn(i?.state,h)}},l=s(n),{__tempLocation:u,__tempKey:o}=l.state;if(u&&(!o||o===this.tempLocationKey)){const d=s(u);return d.state.key=l.state.key,d.state.__TSR_key=l.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:l}}return l},this.resolvePathCache=_c(1e3),this.resolvePathWithBase=(n,i)=>uB({base:n,to:Bv(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},s):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>DB({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),i=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...i]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const i=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutes(u,{_buildLocation:!0}),d=yc(o);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??d.fullPath,p=this.resolvePathWithBase(h,"."),f=d.search,g={...d.params},b=l.to?this.resolvePathWithBase(p,`${l.to}`):this.resolvePathWithBase(p,"."),x=l.params===!1||l.params===null?{}:(l.params??!0)===!0?g:Object.assign(g,zi(l.params,g)),E=kh({path:b,params:x}).interpolatedPath,y=this.matchRoutes(E,void 0,{_buildLocation:!0}).map(M=>this.looseRoutesById[M.routeId]);if(Object.keys(x).length>0)for(const M of y){const P=M.options.params?.stringify??M.options.stringifyParams;P&&Object.assign(x,P(x))}const S=n.leaveParams?b:tw(kh({path:b,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let v=f;if(n._includeValidateSearch&&this.options.search?.strict){const M={};y.forEach(P=>{if(P.options.validateSearch)try{Object.assign(M,tv(P.options.validateSearch,{...M,...v}))}catch{}}),v=M}v=MB({search:v,dest:l,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),v=zn(f,v);const _=this.options.stringifySearch(v),C=l.hash===!0?u.hash:l.hash?zi(l.hash,u.hash):void 0,N=C?`#${C}`:"";let A=l.state===!0?u.state:l.state?zi(l.state,u.state):{};A=zn(u.state,A);const O=`${S}${_}${N}`,R=new URL(O,this.origin),I=aO(this.rewrite,R);return{publicHref:I.pathname+I.search+I.hash,href:O,url:I.href,pathname:S,search:v,searchStr:_,state:A,hash:C??"",unmaskOnReload:l.unmaskOnReload}},s=(l={},u)=>{const o=i(l);let d=u?i(u):void 0;if(!d){const h={};if(this.options.routeMasks){const p=eB(o.pathname,this.processedTree);if(p){Object.assign(h,p.params);const{from:f,...g}=p.route;u={from:n.from,...g,params:h},d=i(u)}}}return d&&(o.maskedLocation=d),o};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:i,...s})=>{const l=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{s.state[p]=this.latestLocation.state[p]});const h=Hi(s.state,this.latestLocation.state);return d.forEach(p=>{delete s.state[p]}),h},u=qi(this.latestLocation.href)===qi(s.href),o=this.commitLocationPromise;if(this.commitLocationPromise=Wa(()=>{o?.resolve()}),u&&l())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,...p}=s;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:i})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:s,viewTransition:l,ignoreBlocker:u,href:o,...d}={})=>{if(o){const f=this.history.location.state.__TSR_index,g=bc(o,{__TSR_index:n?f:f+1});d.to=g.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const p=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:i,hashScrollIntoView:s,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=({to:n,reloadDocument:i,href:s,...l})=>{if(!i&&s)try{new URL(`${s}`),i=!0}catch{}return i?(s||(s=this.buildLocation({to:n,...l}).url),l.replace?window.location.replace(s):window.location.href=s,Promise.resolve()):this.buildAndCommitLocation({...l,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const i=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),s=l=>{try{return encodeURI(decodeURI(l))}catch{return l}};if(ac(s(this.latestLocation.href))!==ac(s(i.href))){let l=i.url;throw this.origin&&l.startsWith(this.origin)&&(l=l.replace(this.origin,"")||"/"),XN({href:l})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(i=>({...i,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:i.cachedMatches.filter(s=>!n.some(l=>l.id===s.id))}))},this.load=async n=>{let i,s,l;for(l=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...$i({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...$i({resolvedLocation:h,location:d})}),await rw({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=[],f=[],g=[];oo(()=>{this.__store.setState(b=>{const x=b.matches,E=b.pendingMatches||b.matches;return p=x.filter(y=>!E.some(S=>S.id===y.id)),f=E.filter(y=>!x.some(S=>S.id===y.id)),g=E.filter(y=>x.some(S=>S.id===y.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...p.filter(y=>y.status!=="error")]}}),this.clearExpiredCache()}),[[p,"onLeave"],[f,"onEnter"],[g,"onStay"]].forEach(([b,x])=>{b.forEach(E=>{this.looseRoutesById[E.routeId].options[x]?.(E)})})})})}})}catch(d){sr(d)?(i=d,this.isServer||this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Kn(d)&&(s=d),this.__store.setState(h=>({...h,statusCode:i?i.status:s?404:h.matches.some(p=>p.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(o=>o.status==="error")&&(u=500),u!==void 0&&this.__store.setState(o=>({...o,statusCode:u}))},this.startViewTransition=n=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,o=typeof i.types=="function"?i.types($i({resolvedLocation:u,location:l})):i.types;if(o===!1){n();return}s={update:n,types:o}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{const s=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";s&&this.__store.setState(l=>({...l,[s]:l[s]?.map(u=>u.id===n?i(u):u)}))})},this.getMatch=n=>{const i=s=>s.id===n;return this.state.cachedMatches.find(i)??this.state.pendingMatches?.find(i)??this.state.matches.find(i)},this.invalidate=n=>{const i=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(i),cachedMatches:s.cachedMatches.map(i),pendingMatches:s.pendingMatches?.map(i)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const i=this.buildLocation(n.options);let s=i.url;this.origin&&s.startsWith(this.origin)&&(s=s.replace(this.origin,"")||"/"),n.options.href=i.href,n.headers.set("Location",s)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n?.filter;i!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(l=>!i(l))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=i=>{const s=this.looseRoutesById[i.routeId];if(!s.options.loader)return!0;const l=(i.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:Date.now()-i.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=tO,this.preloadRoute=async n=>{const i=this.buildLocation(n);let s=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),u=new Set([...l,...this.state.cachedMatches.map(o=>o.id)]);oo(()=>{s.forEach(o=>{u.has(o.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,o]}))})});try{return s=await rw({router:this,matches:s,location:i,preload:!0,updateMatch:(o,d)=>{l.has(o)?s=s.map(h=>h.id===o?d(h):h):this.updateMatch(o,d)}}),s}catch(o){if(sr(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:i});Kn(o)||console.error(o);return}},this.matchRoute=(n,i)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(s);if(i?.pending&&this.state.status!=="pending")return!1;const o=(i?.pending===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=tB(l.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,o.pathname,this.processedTree);return!d||n.params&&!Hi(d.params,n.params,{partial:!0})?!1:i?.includeSearch??!0?Hi(o.search,l.search,{partial:!0})?d.params:!1:d.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??SB,parseSearch:t.parseSearch??_B}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const i=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:l}=i;let{matchedRoutes:u}=i,o=!1;(s?s.path!=="/"&&l["**"]:qi(t.pathname))&&(this.options.notFoundRoute?u=[...u,this.options.notFoundRoute]:o=!0);const d=(()=>{if(o){if(this.options.notFoundMode!=="root")for(let f=u.length-1;f>=0;f--){const g=u[f];if(g.children)return g.id}return Tn}})(),h=[],p=f=>f?.id?f.context??this.options.context??void 0:this.options.context??void 0;return u.forEach((f,g)=>{const b=h[g-1],[x,E,y]=(()=>{const z=b?.search??t.search,G=b?._strictSearch??void 0;try{const V=tv(f.options.validateSearch,{...z})??void 0;return[{...z,...V},{...G,...V},void 0]}catch(V){let W=V;if(V instanceof wc||(W=new wc(V.message,{cause:V})),n?.throwOnError)throw W;return[z,{},W]}})(),S=f.options.loaderDeps?.({search:x})??"",v=S?JSON.stringify(S):"",{interpolatedPath:_,usedParams:C}=kh({path:f.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),N=f.id+_+v,A=this.getMatch(N),O=this.state.matches.find(z=>z.routeId===f.id),R=A?._strictParams??C;let I;if(!A){const z=f.options.params?.parse??f.options.parseParams;if(z)try{Object.assign(R,z(R))}catch(G){if(I=new IB(G.message,{cause:G}),n?.throwOnError)throw I}}Object.assign(l,R);const M=O?"stay":"enter";let P;if(A)P={...A,cause:M,params:O?zn(O.params,l):l,_strictParams:R,search:zn(O?O.search:A.search,x),_strictSearch:E};else{const z=f.options.loader||f.options.beforeLoad||f.lazyFn||nO(f)?"pending":"success";P={id:N,index:g,routeId:f.id,params:O?zn(O.params,l):l,_strictParams:R,pathname:_,updatedAt:Date.now(),search:O?zn(O.search,x):x,_strictSearch:E,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:Wa()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:O?zn(O.loaderDeps,S):S,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:f.options.staticData||{},fullPath:f.fullPath}}n?.preload||(P.globalNotFound=d===f.id),P.searchError=y;const j=p(b);P.context={...j,...P.__routeContext,...P.__beforeLoadContext},h.push(P)}),h.forEach((f,g)=>{const b=this.looseRoutesById[f.routeId];if(!this.getMatch(f.id)&&n?._buildLocation!==!0){const E=h[g-1],y=p(E);if(b.options.context){const S={deps:f.loaderDeps,params:f.params,context:y??{},location:t,navigate:v=>this.navigate({...v,_fromLocation:t}),buildLocation:this.buildLocation,cause:f.cause,abortController:f.abortController,preload:!!f.preload,matches:h};f.__routeContext=b.options.context(S)??void 0}f.context={...y,...f.__routeContext,...f.__beforeLoadContext}}}),h}}class wc extends Error{}class IB extends Error{}function LB(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function tv(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new wc("Async validation not supported");if(n.issues)throw new wc(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function DB({pathname:e,routesById:t,processedTree:n}){const i={},s=qi(e);let l;const u=nB(s,n,!0);return u&&(l=u.route,Object.assign(i,u.params)),{matchedRoutes:u?.branch||[t[Tn]],routeParams:i,foundRoute:l}}function MB({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){const s=n.reduce((o,d)=>{const h=[];if("search"in d.options)d.options.search?.middlewares&&h.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const p=({search:f,next:g})=>{let b=f;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(b=d.options.preSearchFilters.reduce((E,y)=>y(E),f));const x=g(b);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((E,y)=>y(E),x):x};h.push(p)}if(i&&d.options.validateSearch){const p=({search:f,next:g})=>{const b=g(f);try{return{...b,...tv(d.options.validateSearch,b)??void 0}}catch{return b}};h.push(p)}return o.concat(h)},[])??[],l=({search:o})=>t.search?t.search===!0?o:zi(t.search,o):{};s.push(l);const u=(o,d)=>{if(o>=s.length)return d;const h=s[o];return h({search:d,next:f=>u(o+1,f)})};return u(0,e)}const BB="Error preloading route! ☝️";class sO{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const i=this.options,s=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Tn:this.parentRoute||Lr(!1);let l=s?Tn:i?.path;l&&l!=="/"&&(l=KN(l));const u=i?.id||l;let o=s?Tn:ic([this.parentRoute.id===Tn?"":this.parentRoute.id,u]);l===Tn&&(l="/"),o!==Tn&&(o=ic(["/",o]));const d=o===Tn?"/":ic([this.parentRoute.fullPath,l]);this._path=l,this._id=o,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class FB extends sO{constructor(t){super(t)}}function Fv(e){const t=e.errorComponent??Pc;return T.jsx(PB,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?K.createElement(t,{error:n,reset:i}):e.children})}class PB extends K.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Pc({error:e}){const[t,n]=K.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:t?"Hide Error":"Show Error"})]}),T.jsx("div",{style:{height:".25rem"}}),t?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?T.jsx("code",{children:e.message}):null})}):null]})}function UB({children:e,fallback:t=null}){return jB()?T.jsx($t.Fragment,{children:e}):T.jsx($t.Fragment,{children:t})}function jB(){return $t.useSyncExternalStore(zB,()=>!0,()=>!1)}function zB(){return()=>{}}var Nh={exports:{}},Oh={},Ih={exports:{}},Lh={};var iw;function HB(){if(iw)return Lh;iw=1;var e=xo();function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function o(f,g){var b=g(),x=i({inst:{value:b,getSnapshot:g}}),E=x[0].inst,y=x[1];return l(function(){E.value=b,E.getSnapshot=g,d(E)&&y({inst:E})},[f,b,g]),s(function(){return d(E)&&y({inst:E}),f(function(){d(E)&&y({inst:E})})},[f]),u(b),b}function d(f){var g=f.getSnapshot;f=f.value;try{var b=g();return!n(f,b)}catch{return!0}}function h(f,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:o;return Lh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Lh}var aw;function qB(){return aw||(aw=1,Ih.exports=HB()),Ih.exports}var sw;function $B(){if(sw)return Oh;sw=1;var e=xo(),t=qB();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var i=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,o=e.useMemo,d=e.useDebugValue;return Oh.useSyncExternalStoreWithSelector=function(h,p,f,g,b){var x=l(null);if(x.current===null){var E={hasValue:!1,value:null};x.current=E}else E=x.current;x=o(function(){function S(A){if(!v){if(v=!0,_=A,A=g(A),b!==void 0&&E.hasValue){var O=E.value;if(b(O,A))return C=O}return C=A}if(O=C,i(_,A))return O;var R=g(A);return b!==void 0&&b(O,R)?(_=A,O):(_=A,C=R)}var v=!1,_,C,N=f===void 0?null:f;return[function(){return S(p())},N===null?void 0:function(){return S(N())}]},[p,f,g,b]);var y=s(h,x[0],x[1]);return u(function(){E.hasValue=!0,E.value=y},[y]),d(y),y},Oh}var ow;function GB(){return ow||(ow=1,Nh.exports=$B()),Nh.exports}var VB=GB();function WB(e,t=i=>i,n={}){const i=n.equal??KB;return VB.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,i)}function KB(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!t.has(i)||!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=lw(e);if(n.length!==lw(t).length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Object.is(e[n[i]],t[n[i]]))return!1;return!0}function lw(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Dh=K.createContext(null);function oO(){return typeof document>"u"?Dh:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Dh,Dh)}function Rn(e){const t=K.useContext(oO());return e?.warn,t}function hn(e){const t=Rn({warn:e?.router===void 0}),n=e?.router||t,i=K.useRef(void 0);return WB(n.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=zn(i.current,e.select(s));return i.current=l,l}return e.select(s)}return s})}const Uc=K.createContext(void 0),YB=K.createContext(void 0);function lr(e){const t=K.useContext(e.from?YB:Uc);return hn({select:i=>{const s=i.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Lr(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function Pv(e){return lr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Uv(e){const{select:t,...n}=e;return lr({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function jv(e){return lr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function zv(e){return lr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function jc(e){const t=Rn();return K.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var XB=DN();const Yl=typeof window<"u"?K.useLayoutEffect:K.useEffect;function Mh(e){const t=K.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function ZB(e,t,n={},i={}){K.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([l])=>{t(l)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,i.disabled,e])}function QB(e){const t=K.useRef(null);return K.useImperativeHandle(e,()=>t.current,[]),t}function JB(e,t){const n=Rn(),[i,s]=K.useState(!1),l=K.useRef(!1),u=QB(t),{activeProps:o,inactiveProps:d,activeOptions:h,to:p,preload:f,preloadDelay:g,hashScrollIntoView:b,replace:x,startTransition:E,resetScroll:y,viewTransition:S,children:v,target:_,disabled:C,style:N,className:A,onClick:O,onFocus:R,onMouseEnter:I,onMouseLeave:M,onTouchStart:P,ignoreBlocker:j,params:z,search:G,hash:V,state:W,mask:J,reloadDocument:Q,unsafeRelative:F,from:L,_fromLocation:B,...H}=e,U=hn({select:Ne=>Ne.location.search,structuralSharing:!0}),ee=e.from,le=K.useMemo(()=>({...e,from:ee}),[n,U,ee,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ue=K.useMemo(()=>n.buildLocation({...le}),[n,le]),X=K.useMemo(()=>{if(C)return;let Ne=ue.maskedLocation?ue.maskedLocation.url:ue.url,Oe=!1;return n.origin&&(Ne.startsWith(n.origin)?Ne=n.history.createHref(Ne.replace(n.origin,""))||"/":Oe=!0),{href:Ne,external:Oe}},[C,ue.maskedLocation,ue.url,n.origin,n.history]),$=K.useMemo(()=>{if(X?.external)return X.href;try{return new URL(p),p}catch{}},[p,X]),ie=e.reloadDocument||$?!1:f??n.options.defaultPreload,he=g??n.options.defaultPreloadDelay??0,be=hn({select:Ne=>{if($)return!1;if(h?.exact){if(!cB(Ne.location.pathname,ue.pathname,n.basepath))return!1}else{const Oe=Sc(Ne.location.pathname,n.basepath),je=Sc(ue.pathname,n.basepath);if(!(Oe.startsWith(je)&&(Oe.length===je.length||Oe[je.length]==="/")))return!1}return(h?.includeSearch??!0)&&!Hi(Ne.location.search,ue.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Ne.location.hash===ue.hash:!0}}),ge=K.useCallback(()=>{n.preloadRoute({...le}).catch(Ne=>{console.warn(Ne),console.warn(BB)})},[n,le]),xe=K.useCallback(Ne=>{Ne?.isIntersecting&&ge()},[ge]);ZB(u,xe,i3,{disabled:!!C||ie!=="viewport"}),K.useEffect(()=>{l.current||!C&&ie==="render"&&(ge(),l.current=!0)},[C,ge,ie]);const ze=Ne=>{const Oe=Ne.currentTarget.getAttribute("target"),je=_!==void 0?_:Oe;if(!C&&!a3(Ne)&&!Ne.defaultPrevented&&(!je||je==="_self")&&Ne.button===0){Ne.preventDefault(),XB.flushSync(()=>{s(!0)});const ce=n.subscribe("onResolved",()=>{ce(),s(!1)});n.navigate({...le,replace:x,resetScroll:y,hashScrollIntoView:b,startTransition:E,viewTransition:S,ignoreBlocker:j})}};if($)return{...H,ref:u,href:$,...v&&{children:v},..._&&{target:_},...C&&{disabled:C},...N&&{style:N},...A&&{className:A},...O&&{onClick:O},...R&&{onFocus:R},...I&&{onMouseEnter:I},...M&&{onMouseLeave:M},...P&&{onTouchStart:P}};const He=Ne=>{C||ie&&ge()},De=He,Ee=Ne=>{if(!(C||!ie))if(!he)ge();else{const Oe=Ne.target;if(Qs.has(Oe))return;const je=setTimeout(()=>{Qs.delete(Oe),ge()},he);Qs.set(Oe,je)}},wt=Ne=>{if(C||!ie||!he)return;const Oe=Ne.target,je=Qs.get(Oe);je&&(clearTimeout(je),Qs.delete(Oe))},Mt=be?zi(o,{})??e3:Bh,ft=be?Bh:zi(d,{})??Bh,Vt=[A,Mt.className,ft.className].filter(Boolean).join(" "),Bt=(N||Mt.style||ft.style)&&{...N,...Mt.style,...ft.style};return{...H,...Mt,...ft,href:X?.href,ref:u,onClick:Js([O,ze]),onFocus:Js([R,He]),onMouseEnter:Js([I,Ee]),onMouseLeave:Js([M,wt]),onTouchStart:Js([P,De]),disabled:!!C,target:_,...Bt&&{style:Bt},...Vt&&{className:Vt},...C&&t3,...be&&n3,...i&&r3}}const Bh={},e3={className:"active"},t3={role:"link","aria-disabled":!0},n3={"data-status":"active","aria-current":"page"},r3={"data-transitioning":"transitioning"},Qs=new WeakMap,i3={rootMargin:"100px"},Js=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},lO=K.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:s,ref:l,...u}=JB(i,t),o=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;return n===void 0&&delete u.disabled,K.createElement(n||"a",{...u,ref:l},o)});function a3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let s3=class extends sO{constructor(t){super(t),this.useMatch=n=>lr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>lr({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>jv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Uv({...n,from:this.id}),this.useLoaderData=n=>Pv({...n,from:this.id}),this.useNavigate=()=>jc({from:this.fullPath}),this.Link=$t.forwardRef((n,i)=>T.jsx(lO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function o3(e){return new s3(e)}class l3 extends FB{constructor(t){super(t),this.useMatch=n=>lr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>lr({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>jv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Uv({...n,from:this.id}),this.useLoaderData=n=>Pv({...n,from:this.id}),this.useNavigate=()=>jc({from:this.fullPath}),this.Link=$t.forwardRef((n,i)=>T.jsx(lO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function c3(e){return new l3(e)}function bo(e){return typeof e=="object"?new cw(e,{silent:!0}).createRoute(e):new cw(e,{silent:!0}).createRoute}class cw{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const s=o3(i);return s.isRoot=!1,s},this.silent=n?.silent}}class uw{constructor(t){this.useMatch=n=>lr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>lr({from:this.options.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>zv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>jv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Uv({...n,from:this.options.id}),this.useLoaderData=n=>Pv({...n,from:this.options.id}),this.useNavigate=()=>{const n=Rn();return jc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function dw(e){return typeof e=="object"?new uw(e):t=>new uw({id:e,...t})}function u3(){const e=Rn(),t=K.useRef({router:e,mounted:!1}),[n,i]=K.useState(!1),{hasPendingMatches:s,isLoading:l}=hn({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),u=Mh(l),o=l||n||s,d=Mh(o),h=l||s,p=Mh(h);return e.startTransition=f=>{i(!0),K.startTransition(()=>{f(),i(!1)})},K.useEffect(()=>{const f=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return qi(e.latestLocation.href)!==qi(g.href)&&e.commitLocation({...g,replace:!0}),()=>{f()}},[e,e.history]),Yl(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),Yl(()=>{u&&!l&&e.emit({type:"onLoad",...$i(e.state)})},[u,e,l]),Yl(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...$i(e.state)})},[h,p,e]),Yl(()=>{d&&!o&&(e.emit({type:"onResolved",...$i(e.state)}),e.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),bB(e))},[o,d,e]),null}function d3(e){const t=hn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return T.jsx(Fv,{getResetKey:()=>t,onCatch:(n,i)=>{if(Kn(n))e.onCatch?.(n,i);else throw n},errorComponent:({error:n})=>{if(Kn(n))return e.fallback?.(n);throw n},children:e.children})}function h3(){return T.jsx("p",{children:"Not Found"})}function qa(e){return T.jsx(T.Fragment,{children:e.children})}function cO(e,t,n){return t.options.notFoundComponent?T.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?T.jsx(e.options.defaultNotFoundComponent,{data:n}):T.jsx(h3,{})}function f3({children:e}){const t=Rn();return t.isServer?T.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function p3(){const e=Rn();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||ev)(e.latestLocation),i=n!==ev(e.latestLocation)?n:void 0,s={storageKey:Ec,shouldScrollRestoration:!0};return i&&(s.key=i),T.jsx(f3,{children:`(${YN.toString()})(${JSON.stringify(s)})`})}const uO=K.memo(function({matchId:t}){const n=Rn(),i=hn({select:S=>{const v=S.matches.find(_=>_.id===t);return Lr(v),{routeId:v.routeId,ssr:v.ssr,_displayPending:v._displayPending}},structuralSharing:!0}),s=n.routesById[i.routeId],l=s.options.pendingComponent??n.options.defaultPendingComponent,u=l?T.jsx(l,{}):null,o=s.options.errorComponent??n.options.defaultErrorComponent,d=s.options.onCatch??n.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??n.options.notFoundRoute?.options.component:s.options.notFoundComponent,p=i.ssr===!1||i.ssr==="data-only",f=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??l??(s.options.errorComponent?.preload||p))?K.Suspense:qa,g=o?Fv:qa,b=h?d3:qa,x=hn({select:S=>S.loadedAt}),E=hn({select:S=>{const v=S.matches.findIndex(_=>_.id===t);return S.matches[v-1]?.routeId}}),y=s.isRoot?s.options.shellComponent??qa:qa;return T.jsxs(y,{children:[T.jsx(Uc.Provider,{value:t,children:T.jsx(f,{fallback:u,children:T.jsx(g,{getResetKey:()=>x,errorComponent:o||Pc,onCatch:(S,v)=>{if(Kn(S))throw S;d?.(S,v)},children:T.jsx(b,{fallback:S=>{if(!h||S.routeId&&S.routeId!==i.routeId||!S.routeId&&!s.isRoot)throw S;return K.createElement(h,S)},children:p||i._displayPending?T.jsx(UB,{fallback:u,children:T.jsx(hw,{matchId:t})}):T.jsx(hw,{matchId:t})})})})}),E===Tn&&n.options.scrollRestoration?T.jsxs(T.Fragment,{children:[T.jsx(m3,{}),T.jsx(p3,{})]}):null]})});function m3(){const e=Rn(),t=K.useRef(void 0);return T.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...$i(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const hw=K.memo(function({matchId:t}){const n=Rn(),{match:i,key:s,routeId:l}=hn({select:d=>{const h=d.matches.find(x=>x.id===t),p=h.routeId,g=(n.routesById[p].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:p,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:p,match:{id:h.id,status:h.status,error:h.error,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],o=K.useMemo(()=>{const d=u.options.component??n.options.defaultComponent;return d?T.jsx(d,{},s):T.jsx(dO,{})},[s,u.options.component,n.options.defaultComponent]);if(i._displayPending)throw n.getMatch(i.id)?._nonReactive.displayPendingPromise;if(i._forcePending)throw n.getMatch(i.id)?._nonReactive.minPendingPromise;if(i.status==="pending"){const d=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(i.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const p=Wa();h._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(i.id)?._nonReactive.loadPromise}if(i.status==="notFound")return Lr(Kn(i.error)),cO(n,u,i.error);if(i.status==="redirected")throw Lr(sr(i.error)),n.getMatch(i.id)?._nonReactive.loadPromise;if(i.status==="error"){if(n.isServer){const d=(u.options.errorComponent??n.options.defaultErrorComponent)||Pc;return T.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}})}throw i.error}return o}),dO=K.memo(function(){const t=Rn(),n=K.useContext(Uc),i=hn({select:h=>h.matches.find(p=>p.id===n)?.routeId}),s=t.routesById[i],l=hn({select:h=>{const f=h.matches.find(g=>g.id===n);return Lr(f),f.globalNotFound}}),u=hn({select:h=>{const p=h.matches,f=p.findIndex(g=>g.id===n);return p[f+1]?.id}}),o=t.options.defaultPendingComponent?T.jsx(t.options.defaultPendingComponent,{}):null;if(l)return cO(t,s,void 0);if(!u)return null;const d=T.jsx(uO,{matchId:u});return i===Tn?T.jsx(K.Suspense,{fallback:o,children:d}):d});function g3(){const e=Rn(),n=e.routesById[Tn].options.pendingComponent??e.options.defaultPendingComponent,i=n?T.jsx(n,{}):null,s=e.isServer||typeof document<"u"&&e.ssr?qa:K.Suspense,l=T.jsxs(s,{fallback:i,children:[!e.isServer&&T.jsx(u3,{}),T.jsx(b3,{})]});return e.options.InnerWrap?T.jsx(e.options.InnerWrap,{children:l}):l}function b3(){const e=Rn(),t=hn({select:s=>s.matches[0]?.id}),n=hn({select:s=>s.loadedAt}),i=t?T.jsx(uO,{matchId:t}):null;return T.jsx(Uc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:T.jsx(Fv,{getResetKey:()=>n,errorComponent:Pc,onCatch:s=>{s.message||s.toString()},children:i})})}const y3=e=>new v3(e);class v3 extends OB{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=bo,globalThis.createLazyFileRoute=dw):typeof window<"u"&&(window.createFileRoute=bo,window.createLazyFileRoute=dw);function _3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=oO(),s=T.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?T.jsx(e.options.Wrap,{children:s}):s}function S3({router:e,...t}){return T.jsx(_3,{router:e,...t,children:T.jsx(g3,{})})}const zc=c3({component:E3});function E3(){return T.jsxs(T.Fragment,{children:[T.jsx(dO,{}),null]})}const x3=bo("/")({beforeLoad:()=>{throw XN({to:"/sessions"})},component:()=>null}),bt=K.forwardRef(({className:e="",variant:t="primary",size:n="md",...i},s)=>{const l="inline-flex items-center justify-center rounded font-medium transition-colors focus-visible:outline-none disabled:opacity-50 disabled:cursor-not-allowed",u={primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-muted text-foreground hover:bg-muted/80 border border-border",ghost:"text-muted-foreground hover:text-foreground hover:bg-muted/50"},o={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base",icon:"w-10 h-10 p-0"};return T.jsx("button",{ref:s,className:`${l} ${u[t]} ${o[n]} ${e}`,...i})});bt.displayName="Button";const w3=K.forwardRef(({className:e="",children:t,...n},i)=>T.jsx("div",{ref:i,className:`bg-card text-card-foreground border border-border rounded-lg ${e}`,...n,children:t}));w3.displayName="Card";const C3=K.forwardRef(({className:e="",...t},n)=>T.jsx("input",{ref:n,className:`w-full px-3 py-2 bg-muted border border-border rounded text-foreground placeholder-muted-foreground outline-none ${e}`,...t}));C3.displayName="Input";const Hv=K.forwardRef(({className:e="",...t},n)=>T.jsx("textarea",{ref:n,className:`w-full px-3 py-2 bg-muted border border-border rounded text-foreground placeholder-muted-foreground outline-none resize-none ${e}`,...t}));Hv.displayName="Textarea";const fw=e=>{let t;const n=new Set,i=(h,p)=>{const f=typeof h=="function"?h(t):h;if(!Object.is(f,t)){const g=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(b=>b(t,g))}},s=()=>t,o={setState:i,getState:s,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(i,s,o);return o},T3=(e=>e?fw(e):fw),A3=e=>e;function k3(e,t=A3){const n=$t.useSyncExternalStore(e.subscribe,$t.useCallback(()=>t(e.getState()),[e,t]),$t.useCallback(()=>t(e.getInitialState()),[e,t]));return $t.useDebugValue(n),n}const pw=e=>{const t=T3(e),n=i=>k3(t,i);return Object.assign(n,t),n},wo=(e=>e?pw(e):pw),qv=wo(e=>({isOpen:!1,title:"Confirm Action",message:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:void 0,openConfirmation:t=>e({isOpen:!0,title:t.title||"Confirm Action",message:t.message,confirmLabel:t.confirmLabel||"Confirm",cancelLabel:t.cancelLabel||"Cancel",variant:t.variant||"default",onConfirm:t.onConfirm,onCancel:t.onCancel}),closeConfirmation:()=>e({isOpen:!1,onConfirm:()=>{},onCancel:void 0})}));const R3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N3=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),mw=e=>{const t=N3(e);return t.charAt(0).toUpperCase()+t.slice(1)},hO=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),O3=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var I3={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const L3=K.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:u,...o},d)=>K.createElement("svg",{ref:d,...I3,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:hO("lucide",s),...!l&&!O3(o)&&{"aria-hidden":"true"},...o},[...u.map(([h,p])=>K.createElement(h,p)),...Array.isArray(l)?l:[l]]));const Ae=(e,t)=>{const n=K.forwardRef(({className:i,...s},l)=>K.createElement(L3,{ref:l,iconNode:t,className:hO(`lucide-${R3(mw(e))}`,`lucide-${e}`,i),...s}));return n.displayName=mw(e),n};const D3=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],M3=Ae("arrow-down",D3);const B3=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],F3=Ae("arrow-left",B3);const P3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],U3=Ae("arrow-right",P3);const j3=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],z3=Ae("arrow-up",j3);const H3=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],fO=Ae("bot",H3);const q3=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],$3=Ae("braces",q3);const G3=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],V3=Ae("brain",G3);const W3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pO=Ae("check",W3);const K3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],cr=Ae("chevron-down",K3);const Y3=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ot=Ae("chevron-right",Y3);const X3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],dr=Ae("circle-alert",X3);const Z3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Q3=Ae("circle-check",Z3);const J3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],eF=Ae("circle-stop",J3);const tF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nF=Ae("circle",tF);const rF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],iF=Ae("clock",rF);const aF=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],sF=Ae("code",aF);const oF=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],gw=Ae("command",oF);const lF=[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]],bw=Ae("diff",lF);const cF=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],mO=Ae("dollar-sign",cF);const uF=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],dF=Ae("ellipsis-vertical",uF);const hF=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],fF=Ae("external-link",hF);const pF=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],mF=Ae("file-code",pF);const gF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],bF=Ae("file-json",gF);const yF=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],yw=Ae("file-pen",yF);const vF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],_F=Ae("file-plus",vF);const SF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],gO=Ae("file-text",SF);const EF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 13v-1h6v1",key:"1bb014"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M11 18h2",key:"12mj7e"}]],xF=Ae("file-type",EF);const wF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],CF=Ae("file-x",wF);const TF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],co=Ae("file",TF);const AF=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],kF=Ae("folder-tree",AF);const RF=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],NF=Ae("folder",RF);const OF=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],Cc=Ae("git-branch",OF);const IF=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Tc=Ae("git-commit-horizontal",IF);const LF=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],bO=Ae("hash",LF);const DF=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],MF=Ae("image",DF);const BF=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],yO=Ae("keyboard",BF);const FF=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],PF=Ae("list",FF);const UF=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],vO=Ae("loader-circle",UF);const jF=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],zF=Ae("message-square",jF);const HF=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],qF=Ae("octagon-x",HF);const $F=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],vw=Ae("pencil",$F);const GF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ac=Ae("plus",GF);const VF=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],WF=Ae("refresh-cw",VF);const KF=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],YF=Ae("rotate-ccw",KF);const XF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$v=Ae("search",XF);const ZF=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],yo=Ae("sparkles",ZF);const QF=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],JF=Ae("square-check-big",QF);const e4=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ya=Ae("terminal",e4);const t4=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],n4=Ae("trash-2",t4);const r4=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],i4=Ae("upload",r4);const a4=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],_O=Ae("user",a4);const s4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hc=Ae("x",s4);function o4(){const{isOpen:e,title:t,message:n,confirmLabel:i,cancelLabel:s,variant:l,onConfirm:u,onCancel:o,closeConfirmation:d}=qv(),[h,p]=K.useState(!1);K.useEffect(()=>{e||p(!1)},[e]);const f=K.useCallback(async()=>{p(!0);try{await u(),d()}catch(x){console.error("Confirmation action failed:",x),p(!1)}},[u,d]),g=K.useCallback(()=>{o?.(),d()},[o,d]),b=x=>{x.target===x.currentTarget&&!h&&g()};return K.useEffect(()=>{const x=E=>{e&&!h&&(E.key==="Escape"&&(E.preventDefault(),g()),E.key==="Enter"&&(E.preventDefault(),f()))};if(e)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,h,f,g]),e?T.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:b,onKeyDown:x=>{x.key==="Escape"&&!h&&(x.preventDefault(),g())},children:T.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg max-w-md w-full mx-4",children:[T.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[l==="destructive"&&T.jsx(dr,{className:"w-5 h-5 text-destructive"}),T.jsx("h2",{className:"text-lg font-semibold",children:t})]}),T.jsx("button",{type:"button",onClick:g,disabled:h,className:"p-1 hover:bg-muted rounded transition-colors disabled:opacity-50","aria-label":"Close",children:T.jsx(Hc,{className:"w-5 h-5"})})]}),T.jsx("div",{className:"p-4",children:T.jsx("p",{className:"text-muted-foreground",children:n})}),T.jsxs("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-border",children:[T.jsx("button",{type:"button",onClick:g,disabled:h,className:"px-4 py-2 text-sm font-medium rounded transition-colors hover:bg-muted disabled:opacity-50",children:s}),T.jsx("button",{type:"button",onClick:f,disabled:h,className:`px-4 py-2 text-sm font-medium rounded transition-colors disabled:opacity-50 ${l==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-primary text-primary-foreground hover:bg-primary/90"}`,children:h?"Processing...":i})]})]})}):null}function Dr(e){return Array.isArray?Array.isArray(e):xO(e)==="[object Array]"}function l4(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function c4(e){return e==null?"":l4(e)}function or(e){return typeof e=="string"}function SO(e){return typeof e=="number"}function u4(e){return e===!0||e===!1||d4(e)&&xO(e)=="[object Boolean]"}function EO(e){return typeof e=="object"}function d4(e){return EO(e)&&e!==null}function An(e){return e!=null}function Fh(e){return!e.trim().length}function xO(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const h4="Incorrect 'index' type",f4=e=>`Invalid value for key ${e}`,p4=e=>`Pattern length exceeds max of ${e}.`,m4=e=>`Missing ${e} property in key`,g4=e=>`Property 'weight' in key '${e}' must be a positive integer`,_w=Object.prototype.hasOwnProperty;class b4{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(i=>{let s=wO(i);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(i=>{i.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function wO(e){let t=null,n=null,i=null,s=1,l=null;if(or(e)||Dr(e))i=e,t=Sw(e),n=nv(e);else{if(!_w.call(e,"name"))throw new Error(m4("name"));const u=e.name;if(i=u,_w.call(e,"weight")&&(s=e.weight,s<=0))throw new Error(g4(u));t=Sw(u),n=nv(u),l=e.getFn}return{path:t,id:n,weight:s,src:i,getFn:l}}function Sw(e){return Dr(e)?e:e.split(".")}function nv(e){return Dr(e)?e.join("."):e}function y4(e,t){let n=[],i=!1;const s=(l,u,o)=>{if(An(l))if(!u[o])n.push(l);else{let d=u[o];const h=l[d];if(!An(h))return;if(o===u.length-1&&(or(h)||SO(h)||u4(h)))n.push(c4(h));else if(Dr(h)){i=!0;for(let p=0,f=h.length;p<f;p+=1)s(h[p],u,o+1)}else u.length&&s(h,u,o+1)}};return s(e,or(t)?t.split("."):t,0),i?n:n[0]}const v4={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},_4={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},S4={location:0,threshold:.6,distance:100},E4={useExtendedSearch:!1,getFn:y4,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Re={..._4,...v4,...S4,...E4};const x4=/[^ ]+/g;function w4(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){const l=s.match(x4).length;if(n.has(l))return n.get(l);const u=1/Math.pow(l,.5*e),o=parseFloat(Math.round(u*i)/i);return n.set(l,o),o},clear(){n.clear()}}}class Gv{constructor({getFn:t=Re.getFn,fieldNormWeight:n=Re.fieldNormWeight}={}){this.norm=w4(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,i)=>{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,or(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();or(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,i=this.size();n<i;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!An(t)||Fh(t))return;let i={v:t,i:n,n:this.norm.get(t)};this.records.push(i)}_addObject(t,n){let i={i:n,$:{}};this.keys.forEach((s,l)=>{let u=s.getFn?s.getFn(t):this.getFn(t,s.path);if(An(u)){if(Dr(u)){let o=[];const d=[{nestedArrIndex:-1,value:u}];for(;d.length;){const{nestedArrIndex:h,value:p}=d.pop();if(An(p))if(or(p)&&!Fh(p)){let f={v:p,i:h,n:this.norm.get(p)};o.push(f)}else Dr(p)&&p.forEach((f,g)=>{d.push({nestedArrIndex:g,value:f})})}i.$[l]=o}else if(or(u)&&!Fh(u)){let o={v:u,n:this.norm.get(u)};i.$[l]=o}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function CO(e,t,{getFn:n=Re.getFn,fieldNormWeight:i=Re.fieldNormWeight}={}){const s=new Gv({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(wO)),s.setSources(t),s.create(),s}function C4(e,{getFn:t=Re.getFn,fieldNormWeight:n=Re.fieldNormWeight}={}){const{keys:i,records:s}=e,l=new Gv({getFn:t,fieldNormWeight:n});return l.setKeys(i),l.setIndexRecords(s),l}function Xl(e,{errors:t=0,currentLocation:n=0,expectedLocation:i=0,distance:s=Re.distance,ignoreLocation:l=Re.ignoreLocation}={}){const u=t/e.length;if(l)return u;const o=Math.abs(i-n);return s?u+o/s:o?1:u}function T4(e=[],t=Re.minMatchCharLength){let n=[],i=-1,s=-1,l=0;for(let u=e.length;l<u;l+=1){let o=e[l];o&&i===-1?i=l:!o&&i!==-1&&(s=l-1,s-i+1>=t&&n.push([i,s]),i=-1)}return e[l-1]&&l-i>=t&&n.push([i,l-1]),n}const Pi=32;function A4(e,t,n,{location:i=Re.location,distance:s=Re.distance,threshold:l=Re.threshold,findAllMatches:u=Re.findAllMatches,minMatchCharLength:o=Re.minMatchCharLength,includeMatches:d=Re.includeMatches,ignoreLocation:h=Re.ignoreLocation}={}){if(t.length>Pi)throw new Error(p4(Pi));const p=t.length,f=e.length,g=Math.max(0,Math.min(i,f));let b=l,x=g;const E=o>1||d,y=E?Array(f):[];let S;for(;(S=e.indexOf(t,x))>-1;){let O=Xl(t,{currentLocation:S,expectedLocation:g,distance:s,ignoreLocation:h});if(b=Math.min(O,b),x=S+p,E){let R=0;for(;R<p;)y[S+R]=1,R+=1}}x=-1;let v=[],_=1,C=p+f;const N=1<<p-1;for(let O=0;O<p;O+=1){let R=0,I=C;for(;R<I;)Xl(t,{errors:O,currentLocation:g+I,expectedLocation:g,distance:s,ignoreLocation:h})<=b?R=I:C=I,I=Math.floor((C-R)/2+R);C=I;let M=Math.max(1,g-I+1),P=u?f:Math.min(g+I,f)+p,j=Array(P+2);j[P+1]=(1<<O)-1;for(let G=P;G>=M;G-=1){let V=G-1,W=n[e.charAt(V)];if(E&&(y[V]=+!!W),j[G]=(j[G+1]<<1|1)&W,O&&(j[G]|=(v[G+1]|v[G])<<1|1|v[G+1]),j[G]&N&&(_=Xl(t,{errors:O,currentLocation:V,expectedLocation:g,distance:s,ignoreLocation:h}),_<=b)){if(b=_,x=V,x<=g)break;M=Math.max(1,2*g-x)}}if(Xl(t,{errors:O+1,currentLocation:g,expectedLocation:g,distance:s,ignoreLocation:h})>b)break;v=j}const A={isMatch:x>=0,score:Math.max(.001,_)};if(E){const O=T4(y,o);O.length?d&&(A.indices=O):A.isMatch=!1}return A}function k4(e){let t={};for(let n=0,i=e.length;n<i;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<i-n-1}return t}const kc=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class TO{constructor(t,{location:n=Re.location,threshold:i=Re.threshold,distance:s=Re.distance,includeMatches:l=Re.includeMatches,findAllMatches:u=Re.findAllMatches,minMatchCharLength:o=Re.minMatchCharLength,isCaseSensitive:d=Re.isCaseSensitive,ignoreDiacritics:h=Re.ignoreDiacritics,ignoreLocation:p=Re.ignoreLocation}={}){if(this.options={location:n,threshold:i,distance:s,includeMatches:l,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p},t=d?t:t.toLowerCase(),t=h?kc(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const f=(b,x)=>{this.chunks.push({pattern:b,alphabet:k4(b),startIndex:x})},g=this.pattern.length;if(g>Pi){let b=0;const x=g%Pi,E=g-x;for(;b<E;)f(this.pattern.substr(b,Pi),b),b+=Pi;if(x){const y=g-Pi;f(this.pattern.substr(y),y)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:i,includeMatches:s}=this.options;if(t=n?t:t.toLowerCase(),t=i?kc(t):t,this.pattern===t){let E={isMatch:!0,score:0};return s&&(E.indices=[[0,t.length-1]]),E}const{location:l,distance:u,threshold:o,findAllMatches:d,minMatchCharLength:h,ignoreLocation:p}=this.options;let f=[],g=0,b=!1;this.chunks.forEach(({pattern:E,alphabet:y,startIndex:S})=>{const{isMatch:v,score:_,indices:C}=A4(t,E,y,{location:l+S,distance:u,threshold:o,findAllMatches:d,minMatchCharLength:h,includeMatches:s,ignoreLocation:p});v&&(b=!0),g+=_,v&&C&&(f=[...f,...C])});let x={isMatch:b,score:b?g/this.chunks.length:1};return b&&s&&(x.indices=f),x}}class pi{constructor(t){this.pattern=t}static isMultiMatch(t){return Ew(t,this.multiRegex)}static isSingleMatch(t){return Ew(t,this.singleRegex)}search(){}}function Ew(e,t){const n=e.match(t);return n?n[1]:null}class R4 extends pi{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class N4 extends pi{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const i=t.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class O4 extends pi{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class I4 extends pi{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class L4 extends pi{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class D4 extends pi{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class AO extends pi{constructor(t,{location:n=Re.location,threshold:i=Re.threshold,distance:s=Re.distance,includeMatches:l=Re.includeMatches,findAllMatches:u=Re.findAllMatches,minMatchCharLength:o=Re.minMatchCharLength,isCaseSensitive:d=Re.isCaseSensitive,ignoreDiacritics:h=Re.ignoreDiacritics,ignoreLocation:p=Re.ignoreLocation}={}){super(t),this._bitapSearch=new TO(t,{location:n,threshold:i,distance:s,includeMatches:l,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class kO extends pi{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,i;const s=[],l=this.pattern.length;for(;(i=t.indexOf(this.pattern,n))>-1;)n=i+l,s.push([i,n-1]);const u=!!s.length;return{isMatch:u,score:u?0:1,indices:s}}}const rv=[R4,kO,O4,I4,D4,L4,N4,AO],xw=rv.length,M4=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,B4="|";function F4(e,t={}){return e.split(B4).map(n=>{let i=n.trim().split(M4).filter(l=>l&&!!l.trim()),s=[];for(let l=0,u=i.length;l<u;l+=1){const o=i[l];let d=!1,h=-1;for(;!d&&++h<xw;){const p=rv[h];let f=p.isMultiMatch(o);f&&(s.push(new p(f,t)),d=!0)}if(!d)for(h=-1;++h<xw;){const p=rv[h];let f=p.isSingleMatch(o);if(f){s.push(new p(f,t));break}}}return s})}const P4=new Set([AO.type,kO.type]);class U4{constructor(t,{isCaseSensitive:n=Re.isCaseSensitive,ignoreDiacritics:i=Re.ignoreDiacritics,includeMatches:s=Re.includeMatches,minMatchCharLength:l=Re.minMatchCharLength,ignoreLocation:u=Re.ignoreLocation,findAllMatches:o=Re.findAllMatches,location:d=Re.location,threshold:h=Re.threshold,distance:p=Re.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:i,includeMatches:s,minMatchCharLength:l,findAllMatches:o,ignoreLocation:u,location:d,threshold:h,distance:p},t=n?t:t.toLowerCase(),t=i?kc(t):t,this.pattern=t,this.query=F4(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:s,ignoreDiacritics:l}=this.options;t=s?t:t.toLowerCase(),t=l?kc(t):t;let u=0,o=[],d=0;for(let h=0,p=n.length;h<p;h+=1){const f=n[h];o.length=0,u=0;for(let g=0,b=f.length;g<b;g+=1){const x=f[g],{isMatch:E,indices:y,score:S}=x.search(t);if(E){if(u+=1,d+=S,i){const v=x.constructor.type;P4.has(v)?o=[...o,...y]:o.push(y)}}else{d=0,u=0,o.length=0;break}}if(u){let g={isMatch:!0,score:d/u};return i&&(g.indices=o),g}}return{isMatch:!1,score:1}}}const iv=[];function j4(...e){iv.push(...e)}function av(e,t){for(let n=0,i=iv.length;n<i;n+=1){let s=iv[n];if(s.condition(e,t))return new s(e,t)}return new TO(e,t)}const Rc={AND:"$and",OR:"$or"},sv={PATH:"$path",PATTERN:"$val"},ov=e=>!!(e[Rc.AND]||e[Rc.OR]),z4=e=>!!e[sv.PATH],H4=e=>!Dr(e)&&EO(e)&&!ov(e),ww=e=>({[Rc.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function RO(e,t,{auto:n=!0}={}){const i=s=>{let l=Object.keys(s);const u=z4(s);if(!u&&l.length>1&&!ov(s))return i(ww(s));if(H4(s)){const d=u?s[sv.PATH]:l[0],h=u?s[sv.PATTERN]:s[d];if(!or(h))throw new Error(f4(d));const p={keyId:nv(d),pattern:h};return n&&(p.searcher=av(h,t)),p}let o={children:[],operator:l[0]};return l.forEach(d=>{const h=s[d];Dr(h)&&h.forEach(p=>{o.children.push(i(p))})}),o};return ov(e)||(e=ww(e)),i(e)}function q4(e,{ignoreFieldNorm:t=Re.ignoreFieldNorm}){e.forEach(n=>{let i=1;n.matches.forEach(({key:s,norm:l,score:u})=>{const o=s?s.weight:null;i*=Math.pow(u===0&&o?Number.EPSILON:u,(o||1)*(t?1:l))}),n.score=i})}function $4(e,t){const n=e.matches;t.matches=[],An(n)&&n.forEach(i=>{if(!An(i.indices)||!i.indices.length)return;const{indices:s,value:l}=i;let u={indices:s,value:l};i.key&&(u.key=i.key.src),i.idx>-1&&(u.refIndex=i.idx),t.matches.push(u)})}function G4(e,t){t.score=e.score}function V4(e,t,{includeMatches:n=Re.includeMatches,includeScore:i=Re.includeScore}={}){const s=[];return n&&s.push($4),i&&s.push(G4),e.map(l=>{const{idx:u}=l,o={item:t[u],refIndex:u};return s.length&&s.forEach(d=>{d(l,o)}),o})}class mi{constructor(t,n={},i){this.options={...Re,...n},this.options.useExtendedSearch,this._keyStore=new b4(this.options.keys),this.setCollection(t,i)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Gv))throw new Error(h4);this._myIndex=n||CO(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){An(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let i=0,s=this._docs.length;i<s;i+=1){const l=this._docs[i];t(l,i)&&(this.removeAt(i),i-=1,s-=1,n.push(l))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:i,includeScore:s,shouldSort:l,sortFn:u,ignoreFieldNorm:o}=this.options;let d=or(t)?or(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return q4(d,{ignoreFieldNorm:o}),l&&d.sort(u),SO(n)&&n>-1&&(d=d.slice(0,n)),V4(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(t){const n=av(t,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:l,i:u,n:o})=>{if(!An(l))return;const{isMatch:d,score:h,indices:p}=n.searchIn(l);d&&s.push({item:l,idx:u,matches:[{score:h,value:l,norm:o,indices:p}]})}),s}_searchLogical(t){const n=RO(t,this.options),i=(o,d,h)=>{if(!o.children){const{keyId:f,searcher:g}=o,b=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(d,f),searcher:g});return b&&b.length?[{idx:h,item:d,matches:b}]:[]}const p=[];for(let f=0,g=o.children.length;f<g;f+=1){const b=o.children[f],x=i(b,d,h);if(x.length)p.push(...x);else if(o.operator===Rc.AND)return[]}return p},s=this._myIndex.records,l={},u=[];return s.forEach(({$:o,i:d})=>{if(An(o)){let h=i(n,o,d);h.length&&(l[d]||(l[d]={idx:d,item:o,matches:[]},u.push(l[d])),h.forEach(({matches:p})=>{l[d].matches.push(...p)}))}}),u}_searchObjectList(t){const n=av(t,this.options),{keys:i,records:s}=this._myIndex,l=[];return s.forEach(({$:u,i:o})=>{if(!An(u))return;let d=[];i.forEach((h,p)=>{d.push(...this._findMatches({key:h,value:u[p],searcher:n}))}),d.length&&l.push({idx:o,item:u,matches:d})}),l}_findMatches({key:t,value:n,searcher:i}){if(!An(n))return[];let s=[];if(Dr(n))n.forEach(({v:l,i:u,n:o})=>{if(!An(l))return;const{isMatch:d,score:h,indices:p}=i.searchIn(l);d&&s.push({score:h,key:t,value:l,idx:u,norm:o,indices:p})});else{const{v:l,n:u}=n,{isMatch:o,score:d,indices:h}=i.searchIn(l);o&&s.push({score:d,key:t,value:l,norm:u,indices:h})}return s}}mi.version="7.1.0";mi.createIndex=CO;mi.parseIndex=C4;mi.config=Re;mi.parseQuery=RO;j4(U4);function W4(e){switch(e.split(".").pop()?.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"cjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":return mF;case"json":case"yaml":case"yml":case"toml":return bF;case"md":case"txt":case"log":return gO;case"png":case"jpg":case"jpeg":case"gif":case"svg":case"webp":return MF;case"css":case"scss":case"sass":case"less":return $3;case"html":case"xml":return xF;default:return co}}function K4(e,t){const n=t.get(e);return n?{added:{icon:Ac,label:"Added",className:"text-green-500"},modified:{icon:vw,label:"Modified",className:"text-yellow-500"},untracked:{icon:Ac,label:"Untracked",className:"text-blue-500"}}[n]||{icon:vw,label:"Modified",className:"text-yellow-500"}:null}function Y4({files:e,changedFiles:t=[],query:n,selectedIndex:i,onSelect:s,onEnterSelect:l,onClose:u}){const o=K.useMemo(()=>new Map(t?.map(p=>[p.path,p.status])||[]),[t]),d=K.useMemo(()=>new mi(e,{threshold:.4,distance:100,ignoreLocation:!0,includeMatches:!0}),[e]),h=K.useMemo(()=>{if(!n)return e.slice(0,20);const p=d.search(n).map(f=>f.item);return p.sort((f,g)=>{const b=o.has(f),x=o.has(g);return b&&!x?-1:!b&&x?1:0}),p.slice(0,20)},[d,n,e,o]);return K.useEffect(()=>{document.getElementById(`file-item-${i}`)?.scrollIntoView({block:"nearest"})},[i]),K.useEffect(()=>{l(h[i])},[h,i,l]),K.useEffect(()=>{const p=f=>{f.target.closest("[data-file-mention-popup]")||u()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[u]),h.length===0?T.jsx("div",{"data-file-mention-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg z-50 p-3",children:T.jsx("span",{className:"text-muted-foreground text-sm",children:"No files found"})}):T.jsx("div",{"data-file-mention-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg max-h-[300px] overflow-y-auto z-50",children:h.map((p,f)=>T.jsx("button",{type:"button",id:`file-item-${f}`,onMouseDown:g=>{g.preventDefault(),s(p)},className:`w-full text-left px-3 py-2 hover:bg-accent ${f===i?"bg-accent":""}`,children:T.jsxs("div",{className:"flex items-center gap-2 w-full",children:[(()=>{const g=W4(p);return T.jsx(g,{className:"w-4 h-4 flex-shrink-0 text-muted-foreground"})})(),T.jsx("span",{className:"font-mono text-sm flex-1 truncate",children:p}),(()=>{const g=K4(p,o);return g&&T.jsx(g.icon,{className:`w-3.5 h-3.5 flex-shrink-0 ${g.className}`,title:g.label})})()]})},p))})}const Cw=[{id:"models",label:"/models",description:"Open model selector",icon:yo},{id:"agents",label:"/agents",description:"Open agent selector",icon:Ya},{id:"new",label:"/new",description:"Create new session",icon:Ac},{id:"help",label:"/help",description:"Show keyboard shortcuts and help",icon:yO},{id:"vim",label:"/vim",description:"Toggle Vim mode keybindings",icon:sF}];function X4(e){if(!e)return Cw;const t=e.toLowerCase(),n=[];for(const i of Cw){const s=i.label.toLowerCase().includes(t),l=i.description.toLowerCase().includes(t);if(s||l){const u=s?10:5;n.push({...i,matchScore:u})}}return n.sort((i,s)=>{const l=(s.matchScore||0)-(i.matchScore||0);return l!==0?l:i.label.localeCompare(s.label)})}function Z4({query:e,selectedIndex:t,onSelect:n,onEnterSelect:i,onClose:s}){const l=K.useMemo(()=>X4(e),[e]);return K.useEffect(()=>{document.getElementById(`command-item-${t}`)?.scrollIntoView({block:"nearest"})},[t]),K.useEffect(()=>{i(l[t]?.id)},[l,t,i]),K.useEffect(()=>{const u=o=>{o.target.closest("[data-command-popup]")||s()};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[s]),l.length===0?T.jsx("div",{"data-command-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg z-50 p-3",children:T.jsx("span",{className:"text-muted-foreground text-sm",children:"No commands found"})}):T.jsx("div",{"data-command-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg max-h-[300px] overflow-y-auto z-50",children:l.map((u,o)=>{const d=u.icon;return T.jsx("button",{type:"button",id:`command-item-${o}`,onMouseDown:h=>{h.preventDefault(),n(u.id)},className:`w-full text-left px-3 py-2 hover:bg-accent ${o===t?"bg-accent":""}`,children:T.jsxs("div",{className:"flex items-center gap-3 w-full",children:[T.jsx(d,{className:"w-4 h-4 flex-shrink-0 text-primary"}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"font-mono text-sm font-medium text-foreground",children:u.label}),T.jsx("div",{className:"text-xs text-muted-foreground truncate",children:u.description})]})]})},u.id)})})}const Q4={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"};function Vv({isOpen:e,onClose:t,title:n,children:i,showCloseButton:s=!0,closeOnBackdropClick:l=!0,closeOnEscape:u=!0,maxWidth:o="md"}){if(K.useEffect(()=>{if(!e||!u)return;const h=p=>{p.key==="Escape"&&(p.preventDefault(),p.stopPropagation(),t())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,u,t]),K.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e)return null;const d=h=>{l&&h.target===h.currentTarget&&t()};return T.jsxs(T.Fragment,{children:[T.jsx("button",{type:"button",className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[9999] cursor-default",onClick:d,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&d(h)},"aria-label":"Close modal"}),T.jsx("div",{className:`fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[9999] w-full ${Q4[o]} px-4`,children:T.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg",children:[(n||s)&&T.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[n&&T.jsx("div",{className:"text-lg font-semibold text-foreground",children:n}),s&&T.jsx("button",{type:"button",onClick:t,className:"text-muted-foreground hover:text-foreground transition-colors ml-auto","aria-label":"Close",children:T.jsx(Hc,{className:"h-5 w-5"})})]}),T.jsx("div",{className:"p-4",children:i})]})})]})}const J4=[{keys:["Ctrl","H"],description:"Navigate to left sidebar (sessions)",category:"Navigation"},{keys:["Ctrl","L"],description:"Navigate to right sidebar (git)",category:"Navigation"},{keys:["Ctrl","/"],description:"Toggle left sidebar collapse/expand",category:"Navigation"},{keys:["Ctrl","\\"],description:"Toggle right sidebar collapse/expand",category:"Navigation"},{keys:["Ctrl","N"],description:"Create new session",category:"Navigation"},{keys:["ESC"],description:"Close sidebar and return to center",category:"Navigation"},{keys:["J"],description:"Navigate to next item (in focused list)",category:"List Navigation"},{keys:["K"],description:"Navigate to previous item (in focused list)",category:"List Navigation"},{keys:["Enter"],description:"Select focused item and return to input",category:"List Navigation"},{keys:["Space"],description:"Toggle stage/unstage for focused file (git panel)",category:"Git Operations"},{keys:["A"],description:"Stage all unstaged files",category:"Git Operations"},{keys:["U"],description:"Unstage all staged files",category:"Git Operations"},{keys:["C"],description:"Open commit modal (if files are staged)",category:"Git Operations"},{keys:["Tab"],description:"Toggle plan mode",category:"Chat"},{keys:["Enter"],description:"Send message",category:"Chat"},{keys:["Shift","Enter"],description:"New line in message",category:"Chat"},{keys:["@"],description:"Mention file (opens file picker)",category:"Chat"},{keys:["/"],description:"Slash command (opens command menu)",category:"Chat"}],eP=[{keys:["i"],description:"Enter insert mode at cursor (vim mode)",category:"Vim Mode"},{keys:["a"],description:"Enter insert mode after cursor (vim mode)",category:"Vim Mode"},{keys:["I"],description:"Enter insert mode at line start (vim mode)",category:"Vim Mode"},{keys:["A"],description:"Enter insert mode at line end (vim mode)",category:"Vim Mode"},{keys:["o"],description:"New line below and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["O"],description:"New line above and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["ESC"],description:"Return to normal mode (vim mode)",category:"Vim Mode"},{keys:["Enter"],description:"Send message in normal mode (vim mode)",category:"Vim Mode"},{keys:["w"],description:"Jump to next word start (vim mode)",category:"Vim Mode"},{keys:["e"],description:"Jump to next word end (vim mode)",category:"Vim Mode"},{keys:["b"],description:"Jump to previous word start (vim mode)",category:"Vim Mode"},{keys:["x"],description:"Delete character under cursor (vim mode)",category:"Vim Mode"},{keys:["s"],description:"Delete character and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["S"],description:"Delete line and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["f","{char}"],description:"Find and jump to next character on line (vim mode)",category:"Vim Mode"},{keys:["d","d"],description:"Delete current line (vim mode)",category:"Vim Mode"},{keys:["0"],description:"Jump to line start (vim mode)",category:"Vim Mode"},{keys:["$"],description:"Jump to line end (vim mode)",category:"Vim Mode"}],tP=[{command:"/models",description:"Open model selector"},{command:"/agents",description:"Open agent selector"},{command:"/new",description:"Create new session"},{command:"/help",description:"Show keyboard shortcuts and help (this modal)"}];function nP(e){const t={};for(const n of e)t[n.category]||(t[n.category]=[]),t[n.category].push(n);return t}function rP({isOpen:e,onClose:t}){const n=[...J4,...eP],i=nP(n),s=K.useRef(null),l=K.useRef(null);return K.useEffect(()=>{e?(l.current=document.activeElement,l.current&&l.current.blur()):l.current&&(l.current.focus(),l.current=null)},[e]),K.useEffect(()=>{if(!e)return;const u=o=>{const d=o.target;if(!(d.tagName==="INPUT"||d.tagName==="TEXTAREA"||d.isContentEditable))if(o.key==="j"){o.preventDefault();const p=s.current;p&&p.scrollBy({top:100,behavior:"smooth"})}else if(o.key==="k"){o.preventDefault();const p=s.current;p&&p.scrollBy({top:-100,behavior:"smooth"})}else o.key==="Enter"&&(o.preventDefault(),t())};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,t]),T.jsx(Vv,{isOpen:e,onClose:t,title:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(yO,{className:"w-5 h-5"}),T.jsx("span",{children:"Keyboard Shortcuts & Help"})]}),maxWidth:"2xl",closeOnEscape:!0,closeOnBackdropClick:!0,children:T.jsxs("div",{ref:s,className:"space-y-6 max-h-[70vh] overflow-y-auto",children:[Object.entries(i).map(([u,o])=>T.jsxs("div",{children:[T.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[T.jsx(gw,{className:"w-4 h-4"}),u]}),T.jsx("div",{className:"space-y-2",children:o.map((d,h)=>T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-accent/50 hover:bg-accent transition-colors",children:[T.jsx("span",{className:"text-sm text-foreground",children:d.description}),T.jsx("div",{className:"flex items-center gap-1",children:d.keys.map(p=>T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx("kbd",{className:"px-2 py-1 text-xs font-mono bg-background border border-border rounded shadow-sm",children:p}),d.keys.indexOf(p)<d.keys.length-1&&T.jsx("span",{className:"text-muted-foreground",children:"+"})]},p))})]},`${u}-${d.description}`))})]},u)),T.jsxs("div",{children:[T.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[T.jsx(gw,{className:"w-4 h-4"}),"Slash Commands"]}),T.jsx("div",{className:"space-y-2",children:tP.map((u,o)=>T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-accent/50 hover:bg-accent transition-colors",children:[T.jsx("span",{className:"text-sm text-foreground",children:u.description}),T.jsx("kbd",{className:"px-2 py-1 text-xs font-mono bg-background border border-border rounded shadow-sm",children:u.command})]},u.command))})]}),T.jsx("div",{className:"pt-4 border-t border-border",children:T.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.jsx("strong",{children:"Tip:"})," Shortcuts are disabled when typing in input fields. Press ",T.jsx("kbd",{className:"text-xs",children:"ESC"})," to close popups and return focus to chat input."]})})]})})}var Tw;(function(e){e.OPENAI="openai",e.ANTHROPIC="anthropic",e.GOOGLE="google",e.OPENROUTER="openrouter",e.OPENCODE="opencode",e.SOLFORGE="solforge"})(Tw||(Tw={}));function NO(e,t){return function(){return e.apply(t,arguments)}}const{toString:iP}=Object.prototype,{getPrototypeOf:Wv}=Object,{iterator:qc,toStringTag:OO}=Symbol,$c=(e=>t=>{const n=iP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Xn=e=>(e=e.toLowerCase(),t=>$c(t)===e),Gc=e=>t=>typeof t===e,{isArray:Ja}=Array,Xa=Gc("undefined");function Co(e){return e!==null&&!Xa(e)&&e.constructor!==null&&!Xa(e.constructor)&&fn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const IO=Xn("ArrayBuffer");function aP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&IO(e.buffer),t}const sP=Gc("string"),fn=Gc("function"),LO=Gc("number"),To=e=>e!==null&&typeof e=="object",oP=e=>e===!0||e===!1,oc=e=>{if($c(e)!=="object")return!1;const t=Wv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(OO in e)&&!(qc in e)},lP=e=>{if(!To(e)||Co(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},cP=Xn("Date"),uP=Xn("File"),dP=Xn("Blob"),hP=Xn("FileList"),fP=e=>To(e)&&fn(e.pipe),pP=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||fn(e.append)&&((t=$c(e))==="formdata"||t==="object"&&fn(e.toString)&&e.toString()==="[object FormData]"))},mP=Xn("URLSearchParams"),[gP,bP,yP,vP]=["ReadableStream","Request","Response","Headers"].map(Xn),_P=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ao(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),Ja(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(Co(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),u=l.length;let o;for(i=0;i<u;i++)o=l[i],t.call(null,e[o],o,e)}}function DO(e,t){if(Co(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,s;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,MO=e=>!Xa(e)&&e!==ji;function lv(){const{caseless:e,skipUndefined:t}=MO(this)&&this||{},n={},i=(s,l)=>{const u=e&&DO(n,l)||l;oc(n[u])&&oc(s)?n[u]=lv(n[u],s):oc(s)?n[u]=lv({},s):Ja(s)?n[u]=s.slice():(!t||!Xa(s))&&(n[u]=s)};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&Ao(arguments[s],i);return n}const SP=(e,t,n,{allOwnKeys:i}={})=>(Ao(t,(s,l)=>{n&&fn(s)?e[l]=NO(s,n):e[l]=s},{allOwnKeys:i}),e),EP=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xP=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},wP=(e,t,n,i)=>{let s,l,u;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)u=s[l],(!i||i(u,e,t))&&!o[u]&&(t[u]=e[u],o[u]=!0);e=n!==!1&&Wv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},CP=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},TP=e=>{if(!e)return null;if(Ja(e))return e;let t=e.length;if(!LO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},AP=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Wv(Uint8Array)),kP=(e,t)=>{const i=(e&&e[qc]).call(e);let s;for(;(s=i.next())&&!s.done;){const l=s.value;t.call(e,l[0],l[1])}},RP=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},NP=Xn("HTMLFormElement"),OP=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Aw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),IP=Xn("RegExp"),BO=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Ao(n,(s,l)=>{let u;(u=t(s,l,e))!==!1&&(i[l]=u||s)}),Object.defineProperties(e,i)},LP=e=>{BO(e,(t,n)=>{if(fn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(fn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},DP=(e,t)=>{const n={},i=s=>{s.forEach(l=>{n[l]=!0})};return Ja(e)?i(e):i(String(e).split(t)),n},MP=()=>{},BP=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function FP(e){return!!(e&&fn(e.append)&&e[OO]==="FormData"&&e[qc])}const PP=e=>{const t=new Array(10),n=(i,s)=>{if(To(i)){if(t.indexOf(i)>=0)return;if(Co(i))return i;if(!("toJSON"in i)){t[s]=i;const l=Ja(i)?[]:{};return Ao(i,(u,o)=>{const d=n(u,s+1);!Xa(d)&&(l[o]=d)}),t[s]=void 0,l}}return i};return n(e,0)},UP=Xn("AsyncFunction"),jP=e=>e&&(To(e)||fn(e))&&fn(e.then)&&fn(e.catch),FO=((e,t)=>e?setImmediate:t?((n,i)=>(ji.addEventListener("message",({source:s,data:l})=>{s===ji&&l===n&&i.length&&i.shift()()},!1),s=>{i.push(s),ji.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",fn(ji.postMessage)),zP=typeof queueMicrotask<"u"?queueMicrotask.bind(ji):typeof process<"u"&&process.nextTick||FO,HP=e=>e!=null&&fn(e[qc]),se={isArray:Ja,isArrayBuffer:IO,isBuffer:Co,isFormData:pP,isArrayBufferView:aP,isString:sP,isNumber:LO,isBoolean:oP,isObject:To,isPlainObject:oc,isEmptyObject:lP,isReadableStream:gP,isRequest:bP,isResponse:yP,isHeaders:vP,isUndefined:Xa,isDate:cP,isFile:uP,isBlob:dP,isRegExp:IP,isFunction:fn,isStream:fP,isURLSearchParams:mP,isTypedArray:AP,isFileList:hP,forEach:Ao,merge:lv,extend:SP,trim:_P,stripBOM:EP,inherits:xP,toFlatObject:wP,kindOf:$c,kindOfTest:Xn,endsWith:CP,toArray:TP,forEachEntry:kP,matchAll:RP,isHTMLForm:NP,hasOwnProperty:Aw,hasOwnProp:Aw,reduceDescriptors:BO,freezeMethods:LP,toObjectSet:DP,toCamelCase:OP,noop:MP,toFiniteNumber:BP,findKey:DO,global:ji,isContextDefined:MO,isSpecCompliantForm:FP,toJSONObject:PP,isAsyncFn:UP,isThenable:jP,setImmediate:FO,asap:zP,isIterable:HP};function Be(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}se.inherits(Be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.status}}});const PO=Be.prototype,UO={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{UO[e]={value:e}});Object.defineProperties(Be,UO);Object.defineProperty(PO,"isAxiosError",{value:!0});Be.from=(e,t,n,i,s,l)=>{const u=Object.create(PO);se.toFlatObject(e,u,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const o=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return Be.call(u,o,d,n,i,s),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",l&&Object.assign(u,l),u};const qP=null;function cv(e){return se.isPlainObject(e)||se.isArray(e)}function jO(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function kw(e,t,n){return e?e.concat(t).map(function(s,l){return s=jO(s),!n&&l?"["+s+"]":s}).join(n?".":""):t}function $P(e){return se.isArray(e)&&!e.some(cv)}const GP=se.toFlatObject(se,{},null,function(t){return/^is[A-Z]/.test(t)});function Vc(e,t,n){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,y){return!se.isUndefined(y[E])});const i=n.metaTokens,s=n.visitor||p,l=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&se.isSpecCompliantForm(t);if(!se.isFunction(s))throw new TypeError("visitor must be a function");function h(x){if(x===null)return"";if(se.isDate(x))return x.toISOString();if(se.isBoolean(x))return x.toString();if(!d&&se.isBlob(x))throw new Be("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(x)||se.isTypedArray(x)?d&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function p(x,E,y){let S=x;if(x&&!y&&typeof x=="object"){if(se.endsWith(E,"{}"))E=i?E:E.slice(0,-2),x=JSON.stringify(x);else if(se.isArray(x)&&$P(x)||(se.isFileList(x)||se.endsWith(E,"[]"))&&(S=se.toArray(x)))return E=jO(E),S.forEach(function(_,C){!(se.isUndefined(_)||_===null)&&t.append(u===!0?kw([E],C,l):u===null?E:E+"[]",h(_))}),!1}return cv(x)?!0:(t.append(kw(y,E,l),h(x)),!1)}const f=[],g=Object.assign(GP,{defaultVisitor:p,convertValue:h,isVisitable:cv});function b(x,E){if(!se.isUndefined(x)){if(f.indexOf(x)!==-1)throw Error("Circular reference detected in "+E.join("."));f.push(x),se.forEach(x,function(S,v){(!(se.isUndefined(S)||S===null)&&s.call(t,S,se.isString(v)?v.trim():v,E,g))===!0&&b(S,E?E.concat(v):[v])}),f.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Rw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Kv(e,t){this._pairs=[],e&&Vc(e,this,t)}const zO=Kv.prototype;zO.append=function(t,n){this._pairs.push([t,n])};zO.toString=function(t){const n=t?function(i){return t.call(this,i,Rw)}:Rw;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function VP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function HO(e,t,n){if(!t)return e;const i=n&&n.encode||VP;se.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let l;if(s?l=s(t,n):l=se.isURLSearchParams(t)?t.toString():new Kv(t,n).toString(i),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Nw{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){se.forEach(this.handlers,function(i){i!==null&&t(i)})}}const qO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},WP=typeof URLSearchParams<"u"?URLSearchParams:Kv,KP=typeof FormData<"u"?FormData:null,YP=typeof Blob<"u"?Blob:null,XP={isBrowser:!0,classes:{URLSearchParams:WP,FormData:KP,Blob:YP},protocols:["http","https","file","blob","url","data"]},Yv=typeof window<"u"&&typeof document<"u",uv=typeof navigator=="object"&&navigator||void 0,ZP=Yv&&(!uv||["ReactNative","NativeScript","NS"].indexOf(uv.product)<0),QP=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",JP=Yv&&window.location.href||"http://localhost",eU=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Yv,hasStandardBrowserEnv:ZP,hasStandardBrowserWebWorkerEnv:QP,navigator:uv,origin:JP},Symbol.toStringTag,{value:"Module"})),Yt={...eU,...XP};function tU(e,t){return Vc(e,new Yt.classes.URLSearchParams,{visitor:function(n,i,s,l){return Yt.isNode&&se.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function nU(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rU(e){const t={},n=Object.keys(e);let i;const s=n.length;let l;for(i=0;i<s;i++)l=n[i],t[l]=e[l];return t}function $O(e){function t(n,i,s,l){let u=n[l++];if(u==="__proto__")return!0;const o=Number.isFinite(+u),d=l>=n.length;return u=!u&&se.isArray(s)?s.length:u,d?(se.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!o):((!s[u]||!se.isObject(s[u]))&&(s[u]=[]),t(n,i,s[u],l)&&se.isArray(s[u])&&(s[u]=rU(s[u])),!o)}if(se.isFormData(e)&&se.isFunction(e.entries)){const n={};return se.forEachEntry(e,(i,s)=>{t(nU(i),s,n,0)}),n}return null}function iU(e,t,n){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const ko={transitional:qO,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,l=se.isObject(t);if(l&&se.isHTMLForm(t)&&(t=new FormData(t)),se.isFormData(t))return s?JSON.stringify($O(t)):t;if(se.isArrayBuffer(t)||se.isBuffer(t)||se.isStream(t)||se.isFile(t)||se.isBlob(t)||se.isReadableStream(t))return t;if(se.isArrayBufferView(t))return t.buffer;if(se.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return tU(t,this.formSerializer).toString();if((o=se.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Vc(o?{"files[]":t}:t,d&&new d,this.formSerializer)}}return l||s?(n.setContentType("application/json",!1),iU(t)):t}],transformResponse:[function(t){const n=this.transitional||ko.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(se.isResponse(t)||se.isReadableStream(t))return t;if(t&&se.isString(t)&&(i&&!this.responseType||s)){const u=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(u)throw o.name==="SyntaxError"?Be.from(o,Be.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yt.classes.FormData,Blob:Yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],e=>{ko.headers[e]={}});const aU=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sU=e=>{const t={};let n,i,s;return e&&e.split(`
11
10
  `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),i=u.substring(s+1).trim(),!(!n||t[n]&&aU[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},Ow=Symbol("internals");function eo(e){return e&&String(e).trim().toLowerCase()}function lc(e){return e===!1||e==null?e:se.isArray(e)?e.map(lc):String(e)}function oU(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const lU=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ph(e,t,n,i,s){if(se.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!se.isString(t)){if(se.isString(i))return t.indexOf(i)!==-1;if(se.isRegExp(i))return i.test(t)}}function cU(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function uU(e,t){const n=se.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(s,l,u){return this[i].call(this,t,s,l,u)},configurable:!0})})}let pn=class{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function l(o,d,h){const p=eo(d);if(!p)throw new Error("header name must be a non-empty string");const f=se.findKey(s,p);(!f||s[f]===void 0||h===!0||h===void 0&&s[f]!==!1)&&(s[f||d]=lc(o))}const u=(o,d)=>se.forEach(o,(h,p)=>l(h,p,d));if(se.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(se.isString(t)&&(t=t.trim())&&!lU(t))u(sU(t),n);else if(se.isObject(t)&&se.isIterable(t)){let o={},d,h;for(const p of t){if(!se.isArray(p))throw TypeError("Object iterator must return a key-value pair");o[h=p[0]]=(d=o[h])?se.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(o,n)}else t!=null&&l(n,t,i);return this}get(t,n){if(t=eo(t),t){const i=se.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return oU(s);if(se.isFunction(n))return n.call(this,s,i);if(se.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=eo(t),t){const i=se.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||Ph(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function l(u){if(u=eo(u),u){const o=se.findKey(i,u);o&&(!n||Ph(i,i[o],o,n))&&(delete i[o],s=!0)}}return se.isArray(t)?t.forEach(l):l(t),s}clear(t){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const l=n[i];(!t||Ph(this,this[l],l,t,!0))&&(delete this[l],s=!0)}return s}normalize(t){const n=this,i={};return se.forEach(this,(s,l)=>{const u=se.findKey(i,l);if(u){n[u]=lc(s),delete n[l];return}const o=t?cU(l):String(l).trim();o!==l&&delete n[l],n[o]=lc(s),i[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return se.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&se.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
12
11
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[Ow]=this[Ow]={accessors:{}}).accessors,s=this.prototype;function l(u){const o=eo(u);i[o]||(uU(s,u),i[o]=!0)}return se.isArray(t)?t.forEach(l):l(t),this}};pn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);se.reduceDescriptors(pn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});se.freezeMethods(pn);function Uh(e,t){const n=this||ko,i=t||n,s=pn.from(i.headers);let l=i.data;return se.forEach(e,function(o){l=o.call(n,l,s.normalize(),t?t.status:void 0)}),s.normalize(),l}function GO(e){return!!(e&&e.__CANCEL__)}function es(e,t,n){Be.call(this,e??"canceled",Be.ERR_CANCELED,t,n),this.name="CanceledError"}se.inherits(es,Be,{__CANCEL__:!0});function VO(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new Be("Request failed with status code "+n.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dU(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function hU(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s=0,l=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=i[l];u||(u=h),n[s]=d,i[s]=h;let f=l,g=0;for(;f!==s;)g+=n[f++],f=f%e;if(s=(s+1)%e,s===l&&(l=(l+1)%e),h-u<t)return;const b=p&&h-p;return b?Math.round(g*1e3/b):void 0}}function fU(e,t){let n=0,i=1e3/t,s,l;const u=(h,p=Date.now())=>{n=p,s=null,l&&(clearTimeout(l),l=null),e(...h)};return[(...h)=>{const p=Date.now(),f=p-n;f>=i?u(h,p):(s=h,l||(l=setTimeout(()=>{l=null,u(s)},i-f)))},()=>s&&u(s)]}const Nc=(e,t,n=3)=>{let i=0;const s=hU(50,250);return fU(l=>{const u=l.loaded,o=l.lengthComputable?l.total:void 0,d=u-i,h=s(d),p=u<=o;i=u;const f={loaded:u,total:o,progress:o?u/o:void 0,bytes:d,rate:h||void 0,estimated:h&&o&&p?(o-u)/h:void 0,event:l,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(f)},n)},Iw=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},Lw=e=>(...t)=>se.asap(()=>e(...t)),pU=Yt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yt.origin),Yt.navigator&&/(msie|trident)/i.test(Yt.navigator.userAgent)):()=>!0,mU=Yt.hasStandardBrowserEnv?{write(e,t,n,i,s,l,u){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];se.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),se.isString(i)&&o.push(`path=${i}`),se.isString(s)&&o.push(`domain=${s}`),l===!0&&o.push("secure"),se.isString(u)&&o.push(`SameSite=${u}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function gU(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bU(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function WO(e,t,n){let i=!gU(t);return e&&(i||n==!1)?bU(e,t):t}const Dw=e=>e instanceof pn?{...e}:e;function Xi(e,t){t=t||{};const n={};function i(h,p,f,g){return se.isPlainObject(h)&&se.isPlainObject(p)?se.merge.call({caseless:g},h,p):se.isPlainObject(p)?se.merge({},p):se.isArray(p)?p.slice():p}function s(h,p,f,g){if(se.isUndefined(p)){if(!se.isUndefined(h))return i(void 0,h,f,g)}else return i(h,p,f,g)}function l(h,p){if(!se.isUndefined(p))return i(void 0,p)}function u(h,p){if(se.isUndefined(p)){if(!se.isUndefined(h))return i(void 0,h)}else return i(void 0,p)}function o(h,p,f){if(f in t)return i(h,p);if(f in e)return i(void 0,h)}const d={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:o,headers:(h,p,f)=>s(Dw(h),Dw(p),f,!0)};return se.forEach(Object.keys({...e,...t}),function(p){const f=d[p]||s,g=f(e[p],t[p],p);se.isUndefined(g)&&f!==o||(n[p]=g)}),n}const KO=e=>{const t=Xi({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:l,headers:u,auth:o}=t;if(t.headers=u=pn.from(u),t.url=HO(WO(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&u.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),se.isFormData(n)){if(Yt.hasStandardBrowserEnv||Yt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(se.isFunction(n.getHeaders)){const d=n.getHeaders(),h=["content-type","content-length"];Object.entries(d).forEach(([p,f])=>{h.includes(p.toLowerCase())&&u.set(p,f)})}}if(Yt.hasStandardBrowserEnv&&(i&&se.isFunction(i)&&(i=i(t)),i||i!==!1&&pU(t.url))){const d=s&&l&&mU.read(l);d&&u.set(s,d)}return t},yU=typeof XMLHttpRequest<"u",vU=yU&&function(e){return new Promise(function(n,i){const s=KO(e);let l=s.data;const u=pn.from(s.headers).normalize();let{responseType:o,onUploadProgress:d,onDownloadProgress:h}=s,p,f,g,b,x;function E(){b&&b(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function S(){if(!y)return;const _=pn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),N={data:!o||o==="text"||o==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:e,request:y};VO(function(O){n(O),E()},function(O){i(O),E()},N),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(i(new Be("Request aborted",Be.ECONNABORTED,e,y)),y=null)},y.onerror=function(C){const N=C&&C.message?C.message:"Network Error",A=new Be(N,Be.ERR_NETWORK,e,y);A.event=C||null,i(A),y=null},y.ontimeout=function(){let C=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||qO;s.timeoutErrorMessage&&(C=s.timeoutErrorMessage),i(new Be(C,N.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,e,y)),y=null},l===void 0&&u.setContentType(null),"setRequestHeader"in y&&se.forEach(u.toJSON(),function(C,N){y.setRequestHeader(N,C)}),se.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),o&&o!=="json"&&(y.responseType=s.responseType),h&&([g,x]=Nc(h,!0),y.addEventListener("progress",g)),d&&y.upload&&([f,b]=Nc(d),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(p=_=>{y&&(i(!_||_.type?new es(null,e,y):_),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const v=dU(s.url);if(v&&Yt.protocols.indexOf(v)===-1){i(new Be("Unsupported protocol "+v+":",Be.ERR_BAD_REQUEST,e));return}y.send(l||null)})},_U=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,s;const l=function(h){if(!s){s=!0,o();const p=h instanceof Error?h:this.reason;i.abort(p instanceof Be?p:new es(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,l(new Be(`timeout ${t} of ms exceeded`,Be.ETIMEDOUT))},t);const o=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(l):h.removeEventListener("abort",l)}),e=null)};e.forEach(h=>h.addEventListener("abort",l));const{signal:d}=i;return d.unsubscribe=()=>se.asap(o),d}},SU=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let i=0,s;for(;i<n;)s=i+t,yield e.slice(i,s),i=s},EU=async function*(e,t){for await(const n of xU(e))yield*SU(n,t)},xU=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},Mw=(e,t,n,i)=>{const s=EU(e,t);let l=0,u,o=d=>{u||(u=!0,i&&i(d))};return new ReadableStream({async pull(d){try{const{done:h,value:p}=await s.next();if(h){o(),d.close();return}let f=p.byteLength;if(n){let g=l+=f;n(g)}d.enqueue(new Uint8Array(p))}catch(h){throw o(h),h}},cancel(d){return o(d),s.return()}},{highWaterMark:2})},Bw=64*1024,{isFunction:Zl}=se,wU=(({Request:e,Response:t})=>({Request:e,Response:t}))(se.global),{ReadableStream:Fw,TextEncoder:Pw}=se.global,Uw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},CU=e=>{e=se.merge.call({skipUndefined:!0},wU,e);const{fetch:t,Request:n,Response:i}=e,s=t?Zl(t):typeof fetch=="function",l=Zl(n),u=Zl(i);if(!s)return!1;const o=s&&Zl(Fw),d=s&&(typeof Pw=="function"?(x=>E=>x.encode(E))(new Pw):async x=>new Uint8Array(await new n(x).arrayBuffer())),h=l&&o&&Uw(()=>{let x=!1;const E=new n(Yt.origin,{body:new Fw,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!E}),p=u&&o&&Uw(()=>se.isReadableStream(new i("").body)),f={stream:p&&(x=>x.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!f[x]&&(f[x]=(E,y)=>{let S=E&&E[x];if(S)return S.call(E);throw new Be(`Response type '${x}' is not supported`,Be.ERR_NOT_SUPPORT,y)})});const g=async x=>{if(x==null)return 0;if(se.isBlob(x))return x.size;if(se.isSpecCompliantForm(x))return(await new n(Yt.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(se.isArrayBufferView(x)||se.isArrayBuffer(x))return x.byteLength;if(se.isURLSearchParams(x)&&(x=x+""),se.isString(x))return(await d(x)).byteLength},b=async(x,E)=>{const y=se.toFiniteNumber(x.getContentLength());return y??g(E)};return async x=>{let{url:E,method:y,data:S,signal:v,cancelToken:_,timeout:C,onDownloadProgress:N,onUploadProgress:A,responseType:O,headers:R,withCredentials:I="same-origin",fetchOptions:M}=KO(x),P=t||fetch;O=O?(O+"").toLowerCase():"text";let j=_U([v,_&&_.toAbortSignal()],C),z=null;const G=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let V;try{if(A&&h&&y!=="get"&&y!=="head"&&(V=await b(R,S))!==0){let B=new n(E,{method:"POST",body:S,duplex:"half"}),H;if(se.isFormData(S)&&(H=B.headers.get("content-type"))&&R.setContentType(H),B.body){const[U,ee]=Iw(V,Nc(Lw(A)));S=Mw(B.body,Bw,U,ee)}}se.isString(I)||(I=I?"include":"omit");const W=l&&"credentials"in n.prototype,J={...M,signal:j,method:y.toUpperCase(),headers:R.normalize().toJSON(),body:S,duplex:"half",credentials:W?I:void 0};z=l&&new n(E,J);let Q=await(l?P(z,M):P(E,J));const F=p&&(O==="stream"||O==="response");if(p&&(N||F&&G)){const B={};["status","statusText","headers"].forEach(le=>{B[le]=Q[le]});const H=se.toFiniteNumber(Q.headers.get("content-length")),[U,ee]=N&&Iw(H,Nc(Lw(N),!0))||[];Q=new i(Mw(Q.body,Bw,U,()=>{ee&&ee(),G&&G()}),B)}O=O||"text";let L=await f[se.findKey(f,O)||"text"](Q,x);return!F&&G&&G(),await new Promise((B,H)=>{VO(B,H,{data:L,headers:pn.from(Q.headers),status:Q.status,statusText:Q.statusText,config:x,request:z})})}catch(W){throw G&&G(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new Be("Network Error",Be.ERR_NETWORK,x,z),{cause:W.cause||W}):Be.from(W,W&&W.code,x,z)}}},TU=new Map,YO=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:s}=t,l=[i,s,n];let u=l.length,o=u,d,h,p=TU;for(;o--;)d=l[o],h=p.get(d),h===void 0&&p.set(d,h=o?new Map:CU(t)),p=h;return h};YO();const Xv={http:qP,xhr:vU,fetch:{get:YO}};se.forEach(Xv,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jw=e=>`- ${e}`,AU=e=>se.isFunction(e)||e===null||e===!1;function kU(e,t){e=se.isArray(e)?e:[e];const{length:n}=e;let i,s;const l={};for(let u=0;u<n;u++){i=e[u];let o;if(s=i,!AU(i)&&(s=Xv[(o=String(i)).toLowerCase()],s===void 0))throw new Be(`Unknown adapter '${o}'`);if(s&&(se.isFunction(s)||(s=s.get(t))))break;l[o||"#"+u]=s}if(!s){const u=Object.entries(l).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let o=n?u.length>1?`since :
13
12
  `+u.map(jw).join(`