@agi-cli/web-ui 0.1.129 → 0.1.131

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,7 +6,7 @@
6
6
  `+Q[m].replace(" at new "," at ");return r.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",r.displayName)),he}while(1<=m&&0<=C);break}}}finally{De=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?Ue(u):""}function Se(r,a){switch(r.tag){case 26:case 27:case 5:return Ue(r.type);case 16:return Ue("Lazy");case 13:return r.child!==a&&a!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("SuspenseList");case 0:case 15:return ve(r.type,!1);case 11:return ve(r.type.render,!1);case 1:return ve(r.type,!0);case 31:return Ue("Activity");default:return""}}function Qe(r){try{var a="",u=null;do a+=Se(r,u),u=r,r=r.return;while(r);return a}catch(m){return`
7
7
  Error generating stack: `+m.message+`
8
8
  `+m.stack}}var kt=Object.prototype.hasOwnProperty,Je=e.unstable_scheduleCallback,ot=e.unstable_cancelCallback,Xe=e.unstable_shouldYield,mt=e.unstable_requestPaint,ke=e.unstable_now,Le=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,_e=e.unstable_NormalPriority,Te=e.unstable_LowPriority,Me=e.unstable_IdlePriority,bt=e.log,Fe=e.unstable_setDisableYieldValue,yt=null,nt=null;function Re(r){if(typeof bt=="function"&&Fe(r),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(yt,r)}catch{}}var Ve=Math.clz32?Math.clz32:jn,ln=Math.log,Xt=Math.LN2;function jn(r){return r>>>=0,r===0?32:31-(ln(r)/Xt|0)|0}var xt=256,ur=262144,va=4194304;function dr(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 Ii(r,a,u){var m=r.pendingLanes;if(m===0)return 0;var C=0,A=r.suspendedLanes,B=r.pingedLanes;r=r.warmLanes;var $=m&134217727;return $!==0?(m=$&~A,m!==0?C=dr(m):(B&=$,B!==0?C=dr(B):u||(u=$&~r,u!==0&&(C=dr(u))))):($=m&~A,$!==0?C=dr($):B!==0?C=dr(B):u||(u=m&~r,u!==0&&(C=dr(u)))),C===0?0:a!==0&&a!==C&&(a&A)===0&&(A=C&-C,u=a&-a,A>=u||A===32&&(u&4194048)!==0)?a:C}function Kr(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function ws(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 gS(){var r=va;return va<<=1,(va&62914560)===0&&(va=4194304),r}function ju(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function Cs(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function rD(r,a,u,m,C,A){var B=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var $=r.entanglements,Q=r.expirationTimes,ie=r.hiddenUpdates;for(u=B&~u;0<u;){var he=31-Ve(u),pe=1<<he;$[he]=0,Q[he]=-1;var se=ie[he];if(se!==null)for(ie[he]=null,he=0;he<se.length;he++){var ce=se[he];ce!==null&&(ce.lane&=-536870913)}u&=~pe}m!==0&&bS(r,m,0),A!==0&&C===0&&r.tag!==0&&(r.suspendedLanes|=A&~(B&~a))}function bS(r,a,u){r.pendingLanes|=a,r.suspendedLanes&=~a;var m=31-Ve(a);r.entangledLanes|=a,r.entanglements[m]=r.entanglements[m]|1073741824|u&261930}function yS(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var m=31-Ve(u),C=1<<m;C&a|r[m]&a&&(r[m]|=a),u&=~C}}function vS(r,a){var u=a&-a;return u=(u&42)!==0?1:Pu(u),(u&(r.suspendedLanes|a))!==0?0:u}function Pu(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 Uu(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function _S(){var r=X.p;return r!==0?r:(r=window.event,r===void 0?32:ax(r.type))}function SS(r,a){var u=X.p;try{return X.p=r,a()}finally{X.p=u}}var Yr=Math.random().toString(36).slice(2),qt="__reactFiber$"+Yr,cn="__reactProps$"+Yr,_a="__reactContainer$"+Yr,Hu="__reactEvents$"+Yr,iD="__reactListeners$"+Yr,aD="__reactHandles$"+Yr,ES="__reactResources$"+Yr,ks="__reactMarker$"+Yr;function zu(r){delete r[qt],delete r[cn],delete r[Hu],delete r[iD],delete r[aD]}function Sa(r){var a=r[qt];if(a)return a;for(var u=r.parentNode;u;){if(a=u[_a]||u[qt]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=qE(r);r!==null;){if(u=r[qt])return u;r=qE(r)}return a}r=u,u=r.parentNode}return null}function Ea(r){if(r=r[qt]||r[_a]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Ts(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function xa(r){var a=r[ES];return a||(a=r[ES]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ht(r){r[ks]=!0}var xS=new Set,wS={};function Di(r,a){wa(r,a),wa(r+"Capture",a)}function wa(r,a){for(wS[r]=a,r=0;r<a.length;r++)xS.add(a[r])}var sD=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]*$"),CS={},kS={};function oD(r){return kt.call(kS,r)?!0:kt.call(CS,r)?!1:sD.test(r)?kS[r]=!0:(CS[r]=!0,!1)}function nl(r,a,u){if(oD(a))if(u===null)r.removeAttribute(a);else{switch(typeof u){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,""+u)}}function rl(r,a,u){if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+u)}}function xr(r,a,u,m){if(m===null)r.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(a,u,""+m)}}function Pn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function TS(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function lD(r,a,u){var m=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var C=m.get,A=m.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return C.call(this)},set:function(B){u=""+B,A.call(this,B)}}),Object.defineProperty(r,a,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(B){u=""+B},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function qu(r){if(!r._valueTracker){var a=TS(r)?"checked":"value";r._valueTracker=lD(r,a,""+r[a])}}function AS(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),m="";return r&&(m=TS(r)?r.checked?"true":"false":r.value),r=m,r!==u?(a.setValue(r),!0):!1}function il(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 cD=/[\n"\\]/g;function Un(r){return r.replace(cD,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function $u(r,a,u,m,C,A,B,$){r.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?r.type=B:r.removeAttribute("type"),a!=null?B==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+Pn(a)):r.value!==""+Pn(a)&&(r.value=""+Pn(a)):B!=="submit"&&B!=="reset"||r.removeAttribute("value"),a!=null?Gu(r,B,Pn(a)):u!=null?Gu(r,B,Pn(u)):m!=null&&r.removeAttribute("value"),C==null&&A!=null&&(r.defaultChecked=!!A),C!=null&&(r.checked=C&&typeof C!="function"&&typeof C!="symbol"),$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?r.name=""+Pn($):r.removeAttribute("name")}function RS(r,a,u,m,C,A,B,$){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(r.type=A),a!=null||u!=null){if(!(A!=="submit"&&A!=="reset"||a!=null)){qu(r);return}u=u!=null?""+Pn(u):"",a=a!=null?""+Pn(a):u,$||a===r.value||(r.value=a),r.defaultValue=a}m=m??C,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=$?r.checked:!!m,r.defaultChecked=!!m,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(r.name=B),qu(r)}function Gu(r,a,u){a==="number"&&il(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function Ca(r,a,u,m){if(r=r.options,a){a={};for(var C=0;C<u.length;C++)a["$"+u[C]]=!0;for(u=0;u<r.length;u++)C=a.hasOwnProperty("$"+r[u].value),r[u].selected!==C&&(r[u].selected=C),C&&m&&(r[u].defaultSelected=!0)}else{for(u=""+Pn(u),a=null,C=0;C<r.length;C++){if(r[C].value===u){r[C].selected=!0,m&&(r[C].defaultSelected=!0);return}a!==null||r[C].disabled||(a=r[C])}a!==null&&(a.selected=!0)}}function NS(r,a,u){if(a!=null&&(a=""+Pn(a),a!==r.value&&(r.value=a),u==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=u!=null?""+Pn(u):""}function OS(r,a,u,m){if(a==null){if(m!=null){if(u!=null)throw Error(i(92));if(K(m)){if(1<m.length)throw Error(i(93));m=m[0]}u=m}u==null&&(u=""),a=u}u=Pn(a),r.defaultValue=u,m=r.textContent,m===u&&m!==""&&m!==null&&(r.value=m),qu(r)}function ka(r,a){if(a){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=a;return}}r.textContent=a}var uD=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 LS(r,a,u){var m=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":m?r.setProperty(a,u):typeof u!="number"||u===0||uD.has(a)?a==="float"?r.cssFloat=u:r[a]=(""+u).trim():r[a]=u+"px"}function IS(r,a,u){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?r.setProperty(m,""):m==="float"?r.cssFloat="":r[m]="");for(var C in a)m=a[C],a.hasOwnProperty(C)&&u[C]!==m&&LS(r,C,m)}else for(var A in a)a.hasOwnProperty(A)&&LS(r,A,a[A])}function Vu(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 dD=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"]]),hD=/^[\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 al(r){return hD.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function wr(){}var Wu=null;function Ku(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ta=null,Aa=null;function DS(r){var a=Ea(r);if(a&&(r=a.stateNode)){var u=r[cn]||null;e:switch(r=a.stateNode,a.type){case"input":if($u(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Un(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var m=u[a];if(m!==r&&m.form===r.form){var C=m[cn]||null;if(!C)throw Error(i(90));$u(m,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(a=0;a<u.length;a++)m=u[a],m.form===r.form&&AS(m)}break e;case"textarea":NS(r,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Ca(r,!!u.multiple,a,!1)}}}var Yu=!1;function MS(r,a,u){if(Yu)return r(a,u);Yu=!0;try{var m=r(a);return m}finally{if(Yu=!1,(Ta!==null||Aa!==null)&&(Vl(),Ta&&(a=Ta,r=Aa,Aa=Ta=null,DS(a),r)))for(a=0;a<r.length;a++)DS(r[a])}}function As(r,a){var u=r.stateNode;if(u===null)return null;var m=u[cn]||null;if(m===null)return null;u=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(u&&typeof u!="function")throw Error(i(231,a,typeof u));return u}var Cr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xu=!1;if(Cr)try{var Rs={};Object.defineProperty(Rs,"passive",{get:function(){Xu=!0}}),window.addEventListener("test",Rs,Rs),window.removeEventListener("test",Rs,Rs)}catch{Xu=!1}var Xr=null,Zu=null,sl=null;function BS(){if(sl)return sl;var r,a=Zu,u=a.length,m,C="value"in Xr?Xr.value:Xr.textContent,A=C.length;for(r=0;r<u&&a[r]===C[r];r++);var B=u-r;for(m=1;m<=B&&a[u-m]===C[A-m];m++);return sl=C.slice(r,1<m?1-m:void 0)}function ol(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 ll(){return!0}function FS(){return!1}function un(r){function a(u,m,C,A,B){this._reactName=u,this._targetInst=C,this.type=m,this.nativeEvent=A,this.target=B,this.currentTarget=null;for(var $ in r)r.hasOwnProperty($)&&(u=r[$],this[$]=u?u(A):A[$]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?ll:FS,this.isPropagationStopped=FS,this}return f(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=ll)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),a}var Mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=un(Mi),Ns=f({},Mi,{view:0,detail:0}),fD=un(Ns),Qu,Ju,Os,ul=f({},Ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:td,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!==Os&&(Os&&r.type==="mousemove"?(Qu=r.screenX-Os.screenX,Ju=r.screenY-Os.screenY):Ju=Qu=0,Os=r),Qu)},movementY:function(r){return"movementY"in r?r.movementY:Ju}}),jS=un(ul),pD=f({},ul,{dataTransfer:0}),mD=un(pD),gD=f({},Ns,{relatedTarget:0}),ed=un(gD),bD=f({},Mi,{animationName:0,elapsedTime:0,pseudoElement:0}),yD=un(bD),vD=f({},Mi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),_D=un(vD),SD=f({},Mi,{data:0}),PS=un(SD),ED={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xD={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"},wD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function CD(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=wD[r])?!!a[r]:!1}function td(){return CD}var kD=f({},Ns,{key:function(r){if(r.key){var a=ED[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=ol(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?xD[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:td,charCode:function(r){return r.type==="keypress"?ol(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ol(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),TD=un(kD),AD=f({},ul,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),US=un(AD),RD=f({},Ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:td}),ND=un(RD),OD=f({},Mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),LD=un(OD),ID=f({},ul,{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}),DD=un(ID),MD=f({},Mi,{newState:0,oldState:0}),BD=un(MD),FD=[9,13,27,32],nd=Cr&&"CompositionEvent"in window,Ls=null;Cr&&"documentMode"in document&&(Ls=document.documentMode);var jD=Cr&&"TextEvent"in window&&!Ls,HS=Cr&&(!nd||Ls&&8<Ls&&11>=Ls),zS=" ",qS=!1;function $S(r,a){switch(r){case"keyup":return FD.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function GS(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ra=!1;function PD(r,a){switch(r){case"compositionend":return GS(a);case"keypress":return a.which!==32?null:(qS=!0,zS);case"textInput":return r=a.data,r===zS&&qS?null:r;default:return null}}function UD(r,a){if(Ra)return r==="compositionend"||!nd&&$S(r,a)?(r=BS(),sl=Zu=Xr=null,Ra=!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 HS&&a.locale!=="ko"?null:a.data;default:return null}}var HD={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 VS(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!HD[r.type]:a==="textarea"}function WS(r,a,u,m){Ta?Aa?Aa.push(m):Aa=[m]:Ta=m,a=Jl(a,"onChange"),0<a.length&&(u=new cl("onChange","change",null,u,m),r.push({event:u,listeners:a}))}var Is=null,Ds=null;function zD(r){RE(r,0)}function dl(r){var a=Ts(r);if(AS(a))return r}function KS(r,a){if(r==="change")return a}var YS=!1;if(Cr){var rd;if(Cr){var id="oninput"in document;if(!id){var XS=document.createElement("div");XS.setAttribute("oninput","return;"),id=typeof XS.oninput=="function"}rd=id}else rd=!1;YS=rd&&(!document.documentMode||9<document.documentMode)}function ZS(){Is&&(Is.detachEvent("onpropertychange",QS),Ds=Is=null)}function QS(r){if(r.propertyName==="value"&&dl(Ds)){var a=[];WS(a,Ds,r,Ku(r)),MS(zD,a)}}function qD(r,a,u){r==="focusin"?(ZS(),Is=a,Ds=u,Is.attachEvent("onpropertychange",QS)):r==="focusout"&&ZS()}function $D(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return dl(Ds)}function GD(r,a){if(r==="click")return dl(a)}function VD(r,a){if(r==="input"||r==="change")return dl(a)}function WD(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var Cn=typeof Object.is=="function"?Object.is:WD;function Ms(r,a){if(Cn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var u=Object.keys(r),m=Object.keys(a);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var C=u[m];if(!kt.call(a,C)||!Cn(r[C],a[C]))return!1}return!0}function JS(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function e0(r,a){var u=JS(r);r=0;for(var m;u;){if(u.nodeType===3){if(m=r+u.textContent.length,r<=a&&m>=a)return{node:u,offset:a-r};r=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=JS(u)}}function t0(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?t0(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function n0(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=il(r.document);a instanceof r.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)r=a.contentWindow;else break;a=il(r.document)}return a}function ad(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 KD=Cr&&"documentMode"in document&&11>=document.documentMode,Na=null,sd=null,Bs=null,od=!1;function r0(r,a,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;od||Na==null||Na!==il(m)||(m=Na,"selectionStart"in m&&ad(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}),Bs&&Ms(Bs,m)||(Bs=m,m=Jl(sd,"onSelect"),0<m.length&&(a=new cl("onSelect","select",null,a,u),r.push({event:a,listeners:m}),a.target=Na)))}function Bi(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var Oa={animationend:Bi("Animation","AnimationEnd"),animationiteration:Bi("Animation","AnimationIteration"),animationstart:Bi("Animation","AnimationStart"),transitionrun:Bi("Transition","TransitionRun"),transitionstart:Bi("Transition","TransitionStart"),transitioncancel:Bi("Transition","TransitionCancel"),transitionend:Bi("Transition","TransitionEnd")},ld={},i0={};Cr&&(i0=document.createElement("div").style,"AnimationEvent"in window||(delete Oa.animationend.animation,delete Oa.animationiteration.animation,delete Oa.animationstart.animation),"TransitionEvent"in window||delete Oa.transitionend.transition);function Fi(r){if(ld[r])return ld[r];if(!Oa[r])return r;var a=Oa[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in i0)return ld[r]=a[u];return r}var a0=Fi("animationend"),s0=Fi("animationiteration"),o0=Fi("animationstart"),YD=Fi("transitionrun"),XD=Fi("transitionstart"),ZD=Fi("transitioncancel"),l0=Fi("transitionend"),c0=new Map,cd="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(" ");cd.push("scrollEnd");function rr(r,a){c0.set(r,a),Di(a,[r])}var hl=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)},Hn=[],La=0,ud=0;function fl(){for(var r=La,a=ud=La=0;a<r;){var u=Hn[a];Hn[a++]=null;var m=Hn[a];Hn[a++]=null;var C=Hn[a];Hn[a++]=null;var A=Hn[a];if(Hn[a++]=null,m!==null&&C!==null){var B=m.pending;B===null?C.next=C:(C.next=B.next,B.next=C),m.pending=C}A!==0&&u0(u,C,A)}}function pl(r,a,u,m){Hn[La++]=r,Hn[La++]=a,Hn[La++]=u,Hn[La++]=m,ud|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function dd(r,a,u,m){return pl(r,a,u,m),ml(r)}function ji(r,a){return pl(r,null,null,a),ml(r)}function u0(r,a,u){r.lanes|=u;var m=r.alternate;m!==null&&(m.lanes|=u);for(var C=!1,A=r.return;A!==null;)A.childLanes|=u,m=A.alternate,m!==null&&(m.childLanes|=u),A.tag===22&&(r=A.stateNode,r===null||r._visibility&1||(C=!0)),r=A,A=A.return;return r.tag===3?(A=r.stateNode,C&&a!==null&&(C=31-Ve(u),r=A.hiddenUpdates,m=r[C],m===null?r[C]=[a]:m.push(a),a.lane=u|536870912),A):null}function ml(r){if(50<io)throw io=0,_h=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var Ia={};function QD(r,a,u,m){this.tag=r,this.key=u,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 kn(r,a,u,m){return new QD(r,a,u,m)}function hd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function kr(r,a){var u=r.alternate;return u===null?(u=kn(r.tag,a,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=a,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,a=r.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function d0(r,a){r.flags&=65011714;var u=r.alternate;return u===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=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,a=u.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function gl(r,a,u,m,C,A){var B=0;if(m=r,typeof r=="function")hd(r)&&(B=1);else if(typeof r=="string")B=r3(r,u,ee.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case L:return r=kn(31,u,a,C),r.elementType=L,r.lanes=A,r;case w:return Pi(u.children,C,A,a);case y:B=8,C|=24;break;case E:return r=kn(12,u,a,C|2),r.elementType=E,r.lanes=A,r;case N:return r=kn(13,u,a,C),r.elementType=N,r.lanes=A,r;case T:return r=kn(19,u,a,C),r.elementType=T,r.lanes=A,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case S:B=10;break e;case _:B=9;break e;case k:B=11;break e;case O:B=14;break e;case R:B=16,m=null;break e}B=29,u=Error(i(130,r===null?"null":typeof r,"")),m=null}return a=kn(B,u,a,C),a.elementType=r,a.type=m,a.lanes=A,a}function Pi(r,a,u,m){return r=kn(7,r,m,a),r.lanes=u,r}function fd(r,a,u){return r=kn(6,r,null,a),r.lanes=u,r}function h0(r){var a=kn(18,null,null,0);return a.stateNode=r,a}function pd(r,a,u){return a=kn(4,r.children!==null?r.children:[],r.key,a),a.lanes=u,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var f0=new WeakMap;function zn(r,a){if(typeof r=="object"&&r!==null){var u=f0.get(r);return u!==void 0?u:(a={value:r,source:a,stack:Qe(a)},f0.set(r,a),a)}return{value:r,source:a,stack:Qe(a)}}var Da=[],Ma=0,bl=null,Fs=0,qn=[],$n=0,Zr=null,hr=1,fr="";function Tr(r,a){Da[Ma++]=Fs,Da[Ma++]=bl,bl=r,Fs=a}function p0(r,a,u){qn[$n++]=hr,qn[$n++]=fr,qn[$n++]=Zr,Zr=r;var m=hr;r=fr;var C=32-Ve(m)-1;m&=~(1<<C),u+=1;var A=32-Ve(a)+C;if(30<A){var B=C-C%5;A=(m&(1<<B)-1).toString(32),m>>=B,C-=B,hr=1<<32-Ve(a)+C|u<<C|m,fr=A+r}else hr=1<<A|u<<C|m,fr=r}function md(r){r.return!==null&&(Tr(r,1),p0(r,1,0))}function gd(r){for(;r===bl;)bl=Da[--Ma],Da[Ma]=null,Fs=Da[--Ma],Da[Ma]=null;for(;r===Zr;)Zr=qn[--$n],qn[$n]=null,fr=qn[--$n],qn[$n]=null,hr=qn[--$n],qn[$n]=null}function m0(r,a){qn[$n++]=hr,qn[$n++]=fr,qn[$n++]=Zr,hr=a.id,fr=a.overflow,Zr=r}var $t=null,vt=null,Ye=!1,Qr=null,Gn=!1,bd=Error(i(519));function Jr(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw js(zn(a,r)),bd}function g0(r){var a=r.stateNode,u=r.type,m=r.memoizedProps;switch(a[qt]=r,a[cn]=m,u){case"dialog":$e("cancel",a),$e("close",a);break;case"iframe":case"object":case"embed":$e("load",a);break;case"video":case"audio":for(u=0;u<so.length;u++)$e(so[u],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),RS(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),OS(a,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||m.suppressHydrationWarning===!0||IE(a.textContent,u)?(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=wr),a=!0):a=!1,a||Jr(r,!0)}function b0(r){for($t=r.return;$t;)switch($t.tag){case 5:case 31:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:$t=$t.return}}function Ba(r){if(r!==$t)return!1;if(!Ye)return b0(r),Ye=!0,!1;var a=r.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||Mh(r.type,r.memoizedProps)),u=!u),u&&vt&&Jr(r),b0(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));vt=zE(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));vt=zE(r)}else a===27?(a=vt,fi(r.type)?(r=Uh,Uh=null,vt=r):vt=a):vt=$t?Wn(r.stateNode.nextSibling):null;return!0}function Ui(){vt=$t=null,Ye=!1}function yd(){var r=Qr;return r!==null&&(pn===null?pn=r:pn.push.apply(pn,r),Qr=null),r}function js(r){Qr===null?Qr=[r]:Qr.push(r)}var vd=j(null),Hi=null,Ar=null;function ei(r,a,u){U(vd,a._currentValue),a._currentValue=u}function Rr(r){r._currentValue=vd.current,G(vd)}function _d(r,a,u){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===u)break;r=r.return}}function Sd(r,a,u,m){var C=r.child;for(C!==null&&(C.return=r);C!==null;){var A=C.dependencies;if(A!==null){var B=C.child;A=A.firstContext;e:for(;A!==null;){var $=A;A=C;for(var Q=0;Q<a.length;Q++)if($.context===a[Q]){A.lanes|=u,$=A.alternate,$!==null&&($.lanes|=u),_d(A.return,u,r),m||(B=null);break e}A=$.next}}else if(C.tag===18){if(B=C.return,B===null)throw Error(i(341));B.lanes|=u,A=B.alternate,A!==null&&(A.lanes|=u),_d(B,u,r),B=null}else B=C.child;if(B!==null)B.return=C;else for(B=C;B!==null;){if(B===r){B=null;break}if(C=B.sibling,C!==null){C.return=B.return,B=C;break}B=B.return}C=B}}function Fa(r,a,u,m){r=null;for(var C=a,A=!1;C!==null;){if(!A){if((C.flags&524288)!==0)A=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var B=C.alternate;if(B===null)throw Error(i(387));if(B=B.memoizedProps,B!==null){var $=C.type;Cn(C.pendingProps.value,B.value)||(r!==null?r.push($):r=[$])}}else if(C===Y.current){if(B=C.alternate,B===null)throw Error(i(387));B.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(r!==null?r.push(ho):r=[ho])}C=C.return}r!==null&&Sd(a,r,u,m),a.flags|=262144}function yl(r){for(r=r.firstContext;r!==null;){if(!Cn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function zi(r){Hi=r,Ar=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Gt(r){return y0(Hi,r)}function vl(r,a){return Hi===null&&zi(r),y0(r,a)}function y0(r,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},Ar===null){if(r===null)throw Error(i(308));Ar=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Ar=Ar.next=a;return u}var JD=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(u,m){r.push(m)}};this.abort=function(){a.aborted=!0,r.forEach(function(u){return u()})}},eM=e.unstable_scheduleCallback,tM=e.unstable_NormalPriority,It={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ed(){return{controller:new JD,data:new Map,refCount:0}}function Ps(r){r.refCount--,r.refCount===0&&eM(tM,function(){r.controller.abort()})}var Us=null,xd=0,ja=0,Pa=null;function nM(r,a){if(Us===null){var u=Us=[];xd=0,ja=kh(),Pa={status:"pending",value:void 0,then:function(m){u.push(m)}}}return xd++,a.then(v0,v0),a}function v0(){if(--xd===0&&Us!==null){Pa!==null&&(Pa.status="fulfilled");var r=Us;Us=null,ja=0,Pa=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function rM(r,a){var u=[],m={status:"pending",value:null,reason:null,then:function(C){u.push(C)}};return r.then(function(){m.status="fulfilled",m.value=a;for(var C=0;C<u.length;C++)(0,u[C])(a)},function(C){for(m.status="rejected",m.reason=C,C=0;C<u.length;C++)(0,u[C])(void 0)}),m}var _0=V.S;V.S=function(r,a){rE=ke(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&nM(r,a),_0!==null&&_0(r,a)};var qi=j(null);function wd(){var r=qi.current;return r!==null?r:ht.pooledCache}function _l(r,a){a===null?U(qi,qi.current):U(qi,a.pool)}function S0(){var r=wd();return r===null?null:{parent:It._currentValue,pool:r}}var Ua=Error(i(460)),Cd=Error(i(474)),Sl=Error(i(542)),El={then:function(){}};function E0(r){return r=r.status,r==="fulfilled"||r==="rejected"}function x0(r,a,u){switch(u=r[u],u===void 0?r.push(a):u!==a&&(a.then(wr,wr),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,C0(r),r;default:if(typeof a.status=="string")a.then(wr,wr);else{if(r=ht,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(m){if(a.status==="pending"){var C=a;C.status="fulfilled",C.value=m}},function(m){if(a.status==="pending"){var C=a;C.status="rejected",C.reason=m}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,C0(r),r}throw Gi=a,Ua}}function $i(r){try{var a=r._init;return a(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Gi=u,Ua):u}}var Gi=null;function w0(){if(Gi===null)throw Error(i(459));var r=Gi;return Gi=null,r}function C0(r){if(r===Ua||r===Sl)throw Error(i(483))}var Ha=null,Hs=0;function xl(r){var a=Hs;return Hs+=1,Ha===null&&(Ha=[]),x0(Ha,r,a)}function zs(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function wl(r,a){throw a.$$typeof===b?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function k0(r){function a(te,J){if(r){var re=te.deletions;re===null?(te.deletions=[J],te.flags|=16):re.push(J)}}function u(te,J){if(!r)return null;for(;J!==null;)a(te,J),J=J.sibling;return null}function m(te){for(var J=new Map;te!==null;)te.key!==null?J.set(te.key,te):J.set(te.index,te),te=te.sibling;return J}function C(te,J){return te=kr(te,J),te.index=0,te.sibling=null,te}function A(te,J,re){return te.index=re,r?(re=te.alternate,re!==null?(re=re.index,re<J?(te.flags|=67108866,J):re):(te.flags|=67108866,J)):(te.flags|=1048576,J)}function B(te){return r&&te.alternate===null&&(te.flags|=67108866),te}function $(te,J,re,fe){return J===null||J.tag!==6?(J=fd(re,te.mode,fe),J.return=te,J):(J=C(J,re),J.return=te,J)}function Q(te,J,re,fe){var Ae=re.type;return Ae===w?he(te,J,re.props.children,fe,re.key):J!==null&&(J.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===R&&$i(Ae)===J.type)?(J=C(J,re.props),zs(J,re),J.return=te,J):(J=gl(re.type,re.key,re.props,null,te.mode,fe),zs(J,re),J.return=te,J)}function ie(te,J,re,fe){return J===null||J.tag!==4||J.stateNode.containerInfo!==re.containerInfo||J.stateNode.implementation!==re.implementation?(J=pd(re,te.mode,fe),J.return=te,J):(J=C(J,re.children||[]),J.return=te,J)}function he(te,J,re,fe,Ae){return J===null||J.tag!==7?(J=Pi(re,te.mode,fe,Ae),J.return=te,J):(J=C(J,re),J.return=te,J)}function pe(te,J,re){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=fd(""+J,te.mode,re),J.return=te,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case g:return re=gl(J.type,J.key,J.props,null,te.mode,re),zs(re,J),re.return=te,re;case x:return J=pd(J,te.mode,re),J.return=te,J;case R:return J=$i(J),pe(te,J,re)}if(K(J)||H(J))return J=Pi(J,te.mode,re,null),J.return=te,J;if(typeof J.then=="function")return pe(te,xl(J),re);if(J.$$typeof===S)return pe(te,vl(te,J),re);wl(te,J)}return null}function se(te,J,re,fe){var Ae=J!==null?J.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Ae!==null?null:$(te,J,""+re,fe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case g:return re.key===Ae?Q(te,J,re,fe):null;case x:return re.key===Ae?ie(te,J,re,fe):null;case R:return re=$i(re),se(te,J,re,fe)}if(K(re)||H(re))return Ae!==null?null:he(te,J,re,fe,null);if(typeof re.then=="function")return se(te,J,xl(re),fe);if(re.$$typeof===S)return se(te,J,vl(te,re),fe);wl(te,re)}return null}function ce(te,J,re,fe,Ae){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return te=te.get(re)||null,$(J,te,""+fe,Ae);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case g:return te=te.get(fe.key===null?re:fe.key)||null,Q(J,te,fe,Ae);case x:return te=te.get(fe.key===null?re:fe.key)||null,ie(J,te,fe,Ae);case R:return fe=$i(fe),ce(te,J,re,fe,Ae)}if(K(fe)||H(fe))return te=te.get(re)||null,he(J,te,fe,Ae,null);if(typeof fe.then=="function")return ce(te,J,re,xl(fe),Ae);if(fe.$$typeof===S)return ce(te,J,re,vl(J,fe),Ae);wl(J,fe)}return null}function we(te,J,re,fe){for(var Ae=null,et=null,Ce=J,He=J=0,Ke=null;Ce!==null&&He<re.length;He++){Ce.index>He?(Ke=Ce,Ce=null):Ke=Ce.sibling;var tt=se(te,Ce,re[He],fe);if(tt===null){Ce===null&&(Ce=Ke);break}r&&Ce&&tt.alternate===null&&a(te,Ce),J=A(tt,J,He),et===null?Ae=tt:et.sibling=tt,et=tt,Ce=Ke}if(He===re.length)return u(te,Ce),Ye&&Tr(te,He),Ae;if(Ce===null){for(;He<re.length;He++)Ce=pe(te,re[He],fe),Ce!==null&&(J=A(Ce,J,He),et===null?Ae=Ce:et.sibling=Ce,et=Ce);return Ye&&Tr(te,He),Ae}for(Ce=m(Ce);He<re.length;He++)Ke=ce(Ce,te,He,re[He],fe),Ke!==null&&(r&&Ke.alternate!==null&&Ce.delete(Ke.key===null?He:Ke.key),J=A(Ke,J,He),et===null?Ae=Ke:et.sibling=Ke,et=Ke);return r&&Ce.forEach(function(yi){return a(te,yi)}),Ye&&Tr(te,He),Ae}function Oe(te,J,re,fe){if(re==null)throw Error(i(151));for(var Ae=null,et=null,Ce=J,He=J=0,Ke=null,tt=re.next();Ce!==null&&!tt.done;He++,tt=re.next()){Ce.index>He?(Ke=Ce,Ce=null):Ke=Ce.sibling;var yi=se(te,Ce,tt.value,fe);if(yi===null){Ce===null&&(Ce=Ke);break}r&&Ce&&yi.alternate===null&&a(te,Ce),J=A(yi,J,He),et===null?Ae=yi:et.sibling=yi,et=yi,Ce=Ke}if(tt.done)return u(te,Ce),Ye&&Tr(te,He),Ae;if(Ce===null){for(;!tt.done;He++,tt=re.next())tt=pe(te,tt.value,fe),tt!==null&&(J=A(tt,J,He),et===null?Ae=tt:et.sibling=tt,et=tt);return Ye&&Tr(te,He),Ae}for(Ce=m(Ce);!tt.done;He++,tt=re.next())tt=ce(Ce,te,He,tt.value,fe),tt!==null&&(r&&tt.alternate!==null&&Ce.delete(tt.key===null?He:tt.key),J=A(tt,J,He),et===null?Ae=tt:et.sibling=tt,et=tt);return r&&Ce.forEach(function(p3){return a(te,p3)}),Ye&&Tr(te,He),Ae}function ut(te,J,re,fe){if(typeof re=="object"&&re!==null&&re.type===w&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case g:e:{for(var Ae=re.key;J!==null;){if(J.key===Ae){if(Ae=re.type,Ae===w){if(J.tag===7){u(te,J.sibling),fe=C(J,re.props.children),fe.return=te,te=fe;break e}}else if(J.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===R&&$i(Ae)===J.type){u(te,J.sibling),fe=C(J,re.props),zs(fe,re),fe.return=te,te=fe;break e}u(te,J);break}else a(te,J);J=J.sibling}re.type===w?(fe=Pi(re.props.children,te.mode,fe,re.key),fe.return=te,te=fe):(fe=gl(re.type,re.key,re.props,null,te.mode,fe),zs(fe,re),fe.return=te,te=fe)}return B(te);case x:e:{for(Ae=re.key;J!==null;){if(J.key===Ae)if(J.tag===4&&J.stateNode.containerInfo===re.containerInfo&&J.stateNode.implementation===re.implementation){u(te,J.sibling),fe=C(J,re.children||[]),fe.return=te,te=fe;break e}else{u(te,J);break}else a(te,J);J=J.sibling}fe=pd(re,te.mode,fe),fe.return=te,te=fe}return B(te);case R:return re=$i(re),ut(te,J,re,fe)}if(K(re))return we(te,J,re,fe);if(H(re)){if(Ae=H(re),typeof Ae!="function")throw Error(i(150));return re=Ae.call(re),Oe(te,J,re,fe)}if(typeof re.then=="function")return ut(te,J,xl(re),fe);if(re.$$typeof===S)return ut(te,J,vl(te,re),fe);wl(te,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,J!==null&&J.tag===6?(u(te,J.sibling),fe=C(J,re),fe.return=te,te=fe):(u(te,J),fe=fd(re,te.mode,fe),fe.return=te,te=fe),B(te)):u(te,J)}return function(te,J,re,fe){try{Hs=0;var Ae=ut(te,J,re,fe);return Ha=null,Ae}catch(Ce){if(Ce===Ua||Ce===Sl)throw Ce;var et=kn(29,Ce,null,te.mode);return et.lanes=fe,et.return=te,et}}}var Vi=k0(!0),T0=k0(!1),ti=!1;function kd(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Td(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 ni(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ri(r,a,u){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(rt&2)!==0){var C=m.pending;return C===null?a.next=a:(a.next=C.next,C.next=a),m.pending=a,a=ml(r),u0(r,null,u),a}return pl(r,m,a,u),ml(r)}function qs(r,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var m=a.lanes;m&=r.pendingLanes,u|=m,a.lanes=u,yS(r,u)}}function Ad(r,a){var u=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var C=null,A=null;if(u=u.firstBaseUpdate,u!==null){do{var B={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};A===null?C=A=B:A=A.next=B,u=u.next}while(u!==null);A===null?C=A=a:A=A.next=a}else C=A=a;u={baseState:m.baseState,firstBaseUpdate:C,lastBaseUpdate:A,shared:m.shared,callbacks:m.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=a:r.next=a,u.lastBaseUpdate=a}var Rd=!1;function $s(){if(Rd){var r=Pa;if(r!==null)throw r}}function Gs(r,a,u,m){Rd=!1;var C=r.updateQueue;ti=!1;var A=C.firstBaseUpdate,B=C.lastBaseUpdate,$=C.shared.pending;if($!==null){C.shared.pending=null;var Q=$,ie=Q.next;Q.next=null,B===null?A=ie:B.next=ie,B=Q;var he=r.alternate;he!==null&&(he=he.updateQueue,$=he.lastBaseUpdate,$!==B&&($===null?he.firstBaseUpdate=ie:$.next=ie,he.lastBaseUpdate=Q))}if(A!==null){var pe=C.baseState;B=0,he=ie=Q=null,$=A;do{var se=$.lane&-536870913,ce=se!==$.lane;if(ce?(We&se)===se:(m&se)===se){se!==0&&se===ja&&(Rd=!0),he!==null&&(he=he.next={lane:0,tag:$.tag,payload:$.payload,callback:null,next:null});e:{var we=r,Oe=$;se=a;var ut=u;switch(Oe.tag){case 1:if(we=Oe.payload,typeof we=="function"){pe=we.call(ut,pe,se);break e}pe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Oe.payload,se=typeof we=="function"?we.call(ut,pe,se):we,se==null)break e;pe=f({},pe,se);break e;case 2:ti=!0}}se=$.callback,se!==null&&(r.flags|=64,ce&&(r.flags|=8192),ce=C.callbacks,ce===null?C.callbacks=[se]:ce.push(se))}else ce={lane:se,tag:$.tag,payload:$.payload,callback:$.callback,next:null},he===null?(ie=he=ce,Q=pe):he=he.next=ce,B|=se;if($=$.next,$===null){if($=C.shared.pending,$===null)break;ce=$,$=ce.next,ce.next=null,C.lastBaseUpdate=ce,C.shared.pending=null}}while(!0);he===null&&(Q=pe),C.baseState=Q,C.firstBaseUpdate=ie,C.lastBaseUpdate=he,A===null&&(C.shared.lanes=0),li|=B,r.lanes=B,r.memoizedState=pe}}function A0(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function R0(r,a){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)A0(u[r],a)}var za=j(null),Cl=j(0);function N0(r,a){r=jr,U(Cl,r),U(za,a),jr=r|a.baseLanes}function Nd(){U(Cl,jr),U(za,za.current)}function Od(){jr=Cl.current,G(za),G(Cl)}var Tn=j(null),Vn=null;function ii(r){var a=r.alternate;U(Nt,Nt.current&1),U(Tn,r),Vn===null&&(a===null||za.current!==null||a.memoizedState!==null)&&(Vn=r)}function Ld(r){U(Nt,Nt.current),U(Tn,r),Vn===null&&(Vn=r)}function O0(r){r.tag===22?(U(Nt,Nt.current),U(Tn,r),Vn===null&&(Vn=r)):ai()}function ai(){U(Nt,Nt.current),U(Tn,Tn.current)}function An(r){G(Tn),Vn===r&&(Vn=null),G(Nt)}var Nt=j(0);function kl(r){for(var a=r;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||jh(u)||Ph(u)))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 Nr=0,je=null,lt=null,Dt=null,Tl=!1,qa=!1,Wi=!1,Al=0,Vs=0,$a=null,iM=0;function Tt(){throw Error(i(321))}function Id(r,a){if(a===null)return!1;for(var u=0;u<a.length&&u<r.length;u++)if(!Cn(r[u],a[u]))return!1;return!0}function Dd(r,a,u,m,C,A){return Nr=A,je=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,V.H=r===null||r.memoizedState===null?p1:Yd,Wi=!1,A=u(m,C),Wi=!1,qa&&(A=I0(a,u,m,C)),L0(r),A}function L0(r){V.H=Ys;var a=lt!==null&&lt.next!==null;if(Nr=0,Dt=lt=je=null,Tl=!1,Vs=0,$a=null,a)throw Error(i(300));r===null||Mt||(r=r.dependencies,r!==null&&yl(r)&&(Mt=!0))}function I0(r,a,u,m){je=r;var C=0;do{if(qa&&($a=null),Vs=0,qa=!1,25<=C)throw Error(i(301));if(C+=1,Dt=lt=null,r.updateQueue!=null){var A=r.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}V.H=m1,A=a(u,m)}while(qa);return A}function aM(){var r=V.H,a=r.useState()[0];return a=typeof a.then=="function"?Ws(a):a,r=r.useState()[0],(lt!==null?lt.memoizedState:null)!==r&&(je.flags|=1024),a}function Md(){var r=Al!==0;return Al=0,r}function Bd(r,a,u){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~u}function Fd(r){if(Tl){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Tl=!1}Nr=0,Dt=lt=je=null,qa=!1,Vs=Al=0,$a=null}function rn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?je.memoizedState=Dt=r:Dt=Dt.next=r,Dt}function Ot(){if(lt===null){var r=je.alternate;r=r!==null?r.memoizedState:null}else r=lt.next;var a=Dt===null?je.memoizedState:Dt.next;if(a!==null)Dt=a,lt=r;else{if(r===null)throw je.alternate===null?Error(i(467)):Error(i(310));lt=r,r={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},Dt===null?je.memoizedState=Dt=r:Dt=Dt.next=r}return Dt}function Rl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ws(r){var a=Vs;return Vs+=1,$a===null&&($a=[]),r=x0($a,r,a),a=je,(Dt===null?a.memoizedState:Dt.next)===null&&(a=a.alternate,V.H=a===null||a.memoizedState===null?p1:Yd),r}function Nl(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Ws(r);if(r.$$typeof===S)return Gt(r)}throw Error(i(438,String(r)))}function jd(r){var a=null,u=je.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var m=je.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(a={data:m.data.map(function(C){return C.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=Rl(),je.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(r),m=0;m<r;m++)u[m]=D;return a.index++,u}function Or(r,a){return typeof a=="function"?a(r):a}function Ol(r){var a=Ot();return Pd(a,lt,r)}function Pd(r,a,u){var m=r.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=u;var C=r.baseQueue,A=m.pending;if(A!==null){if(C!==null){var B=C.next;C.next=A.next,A.next=B}a.baseQueue=C=A,m.pending=null}if(A=r.baseState,C===null)r.memoizedState=A;else{a=C.next;var $=B=null,Q=null,ie=a,he=!1;do{var pe=ie.lane&-536870913;if(pe!==ie.lane?(We&pe)===pe:(Nr&pe)===pe){var se=ie.revertLane;if(se===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),pe===ja&&(he=!0);else if((Nr&se)===se){ie=ie.next,se===ja&&(he=!0);continue}else pe={lane:0,revertLane:ie.revertLane,gesture:null,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},Q===null?($=Q=pe,B=A):Q=Q.next=pe,je.lanes|=se,li|=se;pe=ie.action,Wi&&u(A,pe),A=ie.hasEagerState?ie.eagerState:u(A,pe)}else se={lane:pe,revertLane:ie.revertLane,gesture:ie.gesture,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},Q===null?($=Q=se,B=A):Q=Q.next=se,je.lanes|=pe,li|=pe;ie=ie.next}while(ie!==null&&ie!==a);if(Q===null?B=A:Q.next=$,!Cn(A,r.memoizedState)&&(Mt=!0,he&&(u=Pa,u!==null)))throw u;r.memoizedState=A,r.baseState=B,r.baseQueue=Q,m.lastRenderedState=A}return C===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function Ud(r){var a=Ot(),u=a.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=r;var m=u.dispatch,C=u.pending,A=a.memoizedState;if(C!==null){u.pending=null;var B=C=C.next;do A=r(A,B.action),B=B.next;while(B!==C);Cn(A,a.memoizedState)||(Mt=!0),a.memoizedState=A,a.baseQueue===null&&(a.baseState=A),u.lastRenderedState=A}return[A,m]}function D0(r,a,u){var m=je,C=Ot(),A=Ye;if(A){if(u===void 0)throw Error(i(407));u=u()}else u=a();var B=!Cn((lt||C).memoizedState,u);if(B&&(C.memoizedState=u,Mt=!0),C=C.queue,qd(F0.bind(null,m,C,r),[r]),C.getSnapshot!==a||B||Dt!==null&&Dt.memoizedState.tag&1){if(m.flags|=2048,Ga(9,{destroy:void 0},B0.bind(null,m,C,u,a),null),ht===null)throw Error(i(349));A||(Nr&127)!==0||M0(m,a,u)}return u}function M0(r,a,u){r.flags|=16384,r={getSnapshot:a,value:u},a=je.updateQueue,a===null?(a=Rl(),je.updateQueue=a,a.stores=[r]):(u=a.stores,u===null?a.stores=[r]:u.push(r))}function B0(r,a,u,m){a.value=u,a.getSnapshot=m,j0(a)&&P0(r)}function F0(r,a,u){return u(function(){j0(a)&&P0(r)})}function j0(r){var a=r.getSnapshot;r=r.value;try{var u=a();return!Cn(r,u)}catch{return!0}}function P0(r){var a=ji(r,2);a!==null&&mn(a,r,2)}function Hd(r){var a=rn();if(typeof r=="function"){var u=r;if(r=u(),Wi){Re(!0);try{u()}finally{Re(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:r},a}function U0(r,a,u,m){return r.baseState=u,Pd(r,lt,typeof m=="function"?m:Or)}function sM(r,a,u,m,C){if(Dl(r))throw Error(i(485));if(r=a.action,r!==null){var A={payload:C,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){A.listeners.push(B)}};V.T!==null?u(!0):A.isTransition=!1,m(A),u=a.pending,u===null?(A.next=a.pending=A,H0(a,A)):(A.next=u.next,a.pending=u.next=A)}}function H0(r,a){var u=a.action,m=a.payload,C=r.state;if(a.isTransition){var A=V.T,B={};V.T=B;try{var $=u(C,m),Q=V.S;Q!==null&&Q(B,$),z0(r,a,$)}catch(ie){zd(r,a,ie)}finally{A!==null&&B.types!==null&&(A.types=B.types),V.T=A}}else try{A=u(C,m),z0(r,a,A)}catch(ie){zd(r,a,ie)}}function z0(r,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){q0(r,a,m)},function(m){return zd(r,a,m)}):q0(r,a,u)}function q0(r,a,u){a.status="fulfilled",a.value=u,$0(a),r.state=u,a=r.pending,a!==null&&(u=a.next,u===a?r.pending=null:(u=u.next,a.next=u,H0(r,u)))}function zd(r,a,u){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=u,$0(a),a=a.next;while(a!==m)}r.action=null}function $0(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function G0(r,a){return a}function V0(r,a){if(Ye){var u=ht.formState;if(u!==null){e:{var m=je;if(Ye){if(vt){t:{for(var C=vt,A=Gn;C.nodeType!==8;){if(!A){C=null;break t}if(C=Wn(C.nextSibling),C===null){C=null;break t}}A=C.data,C=A==="F!"||A==="F"?C:null}if(C){vt=Wn(C.nextSibling),m=C.data==="F!";break e}}Jr(m)}m=!1}m&&(a=u[0])}}return u=rn(),u.memoizedState=u.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:G0,lastRenderedState:a},u.queue=m,u=d1.bind(null,je,m),m.dispatch=u,m=Hd(!1),A=Kd.bind(null,je,!1,m.queue),m=rn(),C={state:a,dispatch:null,action:r,pending:null},m.queue=C,u=sM.bind(null,je,C,A,u),C.dispatch=u,m.memoizedState=r,[a,u,!1]}function W0(r){var a=Ot();return K0(a,lt,r)}function K0(r,a,u){if(a=Pd(r,a,G0)[0],r=Ol(Or)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Ws(a)}catch(B){throw B===Ua?Sl:B}else m=a;a=Ot();var C=a.queue,A=C.dispatch;return u!==a.memoizedState&&(je.flags|=2048,Ga(9,{destroy:void 0},oM.bind(null,C,u),null)),[m,A,r]}function oM(r,a){r.action=a}function Y0(r){var a=Ot(),u=lt;if(u!==null)return K0(a,u,r);Ot(),a=a.memoizedState,u=Ot();var m=u.queue.dispatch;return u.memoizedState=r,[a,m,!1]}function Ga(r,a,u,m){return r={tag:r,create:u,deps:m,inst:a,next:null},a=je.updateQueue,a===null&&(a=Rl(),je.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=r.next=r:(m=u.next,u.next=r,r.next=m,a.lastEffect=r),r}function X0(){return Ot().memoizedState}function Ll(r,a,u,m){var C=rn();je.flags|=r,C.memoizedState=Ga(1|a,{destroy:void 0},u,m===void 0?null:m)}function Il(r,a,u,m){var C=Ot();m=m===void 0?null:m;var A=C.memoizedState.inst;lt!==null&&m!==null&&Id(m,lt.memoizedState.deps)?C.memoizedState=Ga(a,A,u,m):(je.flags|=r,C.memoizedState=Ga(1|a,A,u,m))}function Z0(r,a){Ll(8390656,8,r,a)}function qd(r,a){Il(2048,8,r,a)}function lM(r){je.flags|=4;var a=je.updateQueue;if(a===null)a=Rl(),je.updateQueue=a,a.events=[r];else{var u=a.events;u===null?a.events=[r]:u.push(r)}}function Q0(r){var a=Ot().memoizedState;return lM({ref:a,nextImpl:r}),function(){if((rt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function J0(r,a){return Il(4,2,r,a)}function e1(r,a){return Il(4,4,r,a)}function t1(r,a){if(typeof a=="function"){r=r();var u=a(r);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function n1(r,a,u){u=u!=null?u.concat([r]):null,Il(4,4,t1.bind(null,a,r),u)}function $d(){}function r1(r,a){var u=Ot();a=a===void 0?null:a;var m=u.memoizedState;return a!==null&&Id(a,m[1])?m[0]:(u.memoizedState=[r,a],r)}function i1(r,a){var u=Ot();a=a===void 0?null:a;var m=u.memoizedState;if(a!==null&&Id(a,m[1]))return m[0];if(m=r(),Wi){Re(!0);try{r()}finally{Re(!1)}}return u.memoizedState=[m,a],m}function Gd(r,a,u){return u===void 0||(Nr&1073741824)!==0&&(We&261930)===0?r.memoizedState=a:(r.memoizedState=u,r=aE(),je.lanes|=r,li|=r,u)}function a1(r,a,u,m){return Cn(u,a)?u:za.current!==null?(r=Gd(r,u,m),Cn(r,a)||(Mt=!0),r):(Nr&42)===0||(Nr&1073741824)!==0&&(We&261930)===0?(Mt=!0,r.memoizedState=u):(r=aE(),je.lanes|=r,li|=r,a)}function s1(r,a,u,m,C){var A=X.p;X.p=A!==0&&8>A?A:8;var B=V.T,$={};V.T=$,Kd(r,!1,a,u);try{var Q=C(),ie=V.S;if(ie!==null&&ie($,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var he=rM(Q,m);Ks(r,a,he,On(r))}else Ks(r,a,m,On(r))}catch(pe){Ks(r,a,{then:function(){},status:"rejected",reason:pe},On())}finally{X.p=A,B!==null&&$.types!==null&&(B.types=$.types),V.T=B}}function cM(){}function Vd(r,a,u,m){if(r.tag!==5)throw Error(i(476));var C=o1(r).queue;s1(r,C,a,Z,u===null?cM:function(){return l1(r),u(m)})}function o1(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:Z},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:u},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function l1(r){var a=o1(r);a.next===null&&(a=r.alternate.memoizedState),Ks(r,a.next.queue,{},On())}function Wd(){return Gt(ho)}function c1(){return Ot().memoizedState}function u1(){return Ot().memoizedState}function uM(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var u=On();r=ni(u);var m=ri(a,r,u);m!==null&&(mn(m,a,u),qs(m,a,u)),a={cache:Ed()},r.payload=a;return}a=a.return}}function dM(r,a,u){var m=On();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Dl(r)?h1(a,u):(u=dd(r,a,u,m),u!==null&&(mn(u,r,m),f1(u,a,m)))}function d1(r,a,u){var m=On();Ks(r,a,u,m)}function Ks(r,a,u,m){var C={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Dl(r))h1(a,C);else{var A=r.alternate;if(r.lanes===0&&(A===null||A.lanes===0)&&(A=a.lastRenderedReducer,A!==null))try{var B=a.lastRenderedState,$=A(B,u);if(C.hasEagerState=!0,C.eagerState=$,Cn($,B))return pl(r,a,C,0),ht===null&&fl(),!1}catch{}if(u=dd(r,a,C,m),u!==null)return mn(u,r,m),f1(u,a,m),!0}return!1}function Kd(r,a,u,m){if(m={lane:2,revertLane:kh(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Dl(r)){if(a)throw Error(i(479))}else a=dd(r,u,m,2),a!==null&&mn(a,r,2)}function Dl(r){var a=r.alternate;return r===je||a!==null&&a===je}function h1(r,a){qa=Tl=!0;var u=r.pending;u===null?a.next=a:(a.next=u.next,u.next=a),r.pending=a}function f1(r,a,u){if((u&4194048)!==0){var m=a.lanes;m&=r.pendingLanes,u|=m,a.lanes=u,yS(r,u)}}var Ys={readContext:Gt,use:Nl,useCallback:Tt,useContext:Tt,useEffect:Tt,useImperativeHandle:Tt,useLayoutEffect:Tt,useInsertionEffect:Tt,useMemo:Tt,useReducer:Tt,useRef:Tt,useState:Tt,useDebugValue:Tt,useDeferredValue:Tt,useTransition:Tt,useSyncExternalStore:Tt,useId:Tt,useHostTransitionStatus:Tt,useFormState:Tt,useActionState:Tt,useOptimistic:Tt,useMemoCache:Tt,useCacheRefresh:Tt};Ys.useEffectEvent=Tt;var p1={readContext:Gt,use:Nl,useCallback:function(r,a){return rn().memoizedState=[r,a===void 0?null:a],r},useContext:Gt,useEffect:Z0,useImperativeHandle:function(r,a,u){u=u!=null?u.concat([r]):null,Ll(4194308,4,t1.bind(null,a,r),u)},useLayoutEffect:function(r,a){return Ll(4194308,4,r,a)},useInsertionEffect:function(r,a){Ll(4,2,r,a)},useMemo:function(r,a){var u=rn();a=a===void 0?null:a;var m=r();if(Wi){Re(!0);try{r()}finally{Re(!1)}}return u.memoizedState=[m,a],m},useReducer:function(r,a,u){var m=rn();if(u!==void 0){var C=u(a);if(Wi){Re(!0);try{u(a)}finally{Re(!1)}}}else C=a;return m.memoizedState=m.baseState=C,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:C},m.queue=r,r=r.dispatch=dM.bind(null,je,r),[m.memoizedState,r]},useRef:function(r){var a=rn();return r={current:r},a.memoizedState=r},useState:function(r){r=Hd(r);var a=r.queue,u=d1.bind(null,je,a);return a.dispatch=u,[r.memoizedState,u]},useDebugValue:$d,useDeferredValue:function(r,a){var u=rn();return Gd(u,r,a)},useTransition:function(){var r=Hd(!1);return r=s1.bind(null,je,r.queue,!0,!1),rn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,u){var m=je,C=rn();if(Ye){if(u===void 0)throw Error(i(407));u=u()}else{if(u=a(),ht===null)throw Error(i(349));(We&127)!==0||M0(m,a,u)}C.memoizedState=u;var A={value:u,getSnapshot:a};return C.queue=A,Z0(F0.bind(null,m,A,r),[r]),m.flags|=2048,Ga(9,{destroy:void 0},B0.bind(null,m,A,u,a),null),u},useId:function(){var r=rn(),a=ht.identifierPrefix;if(Ye){var u=fr,m=hr;u=(m&~(1<<32-Ve(m)-1)).toString(32)+u,a="_"+a+"R_"+u,u=Al++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=iM++,a="_"+a+"r_"+u.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:Wd,useFormState:V0,useActionState:V0,useOptimistic:function(r){var a=rn();a.memoizedState=a.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=Kd.bind(null,je,!0,u),u.dispatch=a,[r,a]},useMemoCache:jd,useCacheRefresh:function(){return rn().memoizedState=uM.bind(null,je)},useEffectEvent:function(r){var a=rn(),u={impl:r};return a.memoizedState=u,function(){if((rt&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},Yd={readContext:Gt,use:Nl,useCallback:r1,useContext:Gt,useEffect:qd,useImperativeHandle:n1,useInsertionEffect:J0,useLayoutEffect:e1,useMemo:i1,useReducer:Ol,useRef:X0,useState:function(){return Ol(Or)},useDebugValue:$d,useDeferredValue:function(r,a){var u=Ot();return a1(u,lt.memoizedState,r,a)},useTransition:function(){var r=Ol(Or)[0],a=Ot().memoizedState;return[typeof r=="boolean"?r:Ws(r),a]},useSyncExternalStore:D0,useId:c1,useHostTransitionStatus:Wd,useFormState:W0,useActionState:W0,useOptimistic:function(r,a){var u=Ot();return U0(u,lt,r,a)},useMemoCache:jd,useCacheRefresh:u1};Yd.useEffectEvent=Q0;var m1={readContext:Gt,use:Nl,useCallback:r1,useContext:Gt,useEffect:qd,useImperativeHandle:n1,useInsertionEffect:J0,useLayoutEffect:e1,useMemo:i1,useReducer:Ud,useRef:X0,useState:function(){return Ud(Or)},useDebugValue:$d,useDeferredValue:function(r,a){var u=Ot();return lt===null?Gd(u,r,a):a1(u,lt.memoizedState,r,a)},useTransition:function(){var r=Ud(Or)[0],a=Ot().memoizedState;return[typeof r=="boolean"?r:Ws(r),a]},useSyncExternalStore:D0,useId:c1,useHostTransitionStatus:Wd,useFormState:Y0,useActionState:Y0,useOptimistic:function(r,a){var u=Ot();return lt!==null?U0(u,lt,r,a):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:jd,useCacheRefresh:u1};m1.useEffectEvent=Q0;function Xd(r,a,u,m){a=r.memoizedState,u=u(m,a),u=u==null?a:f({},a,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Zd={enqueueSetState:function(r,a,u){r=r._reactInternals;var m=On(),C=ni(m);C.payload=a,u!=null&&(C.callback=u),a=ri(r,C,m),a!==null&&(mn(a,r,m),qs(a,r,m))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var m=On(),C=ni(m);C.tag=1,C.payload=a,u!=null&&(C.callback=u),a=ri(r,C,m),a!==null&&(mn(a,r,m),qs(a,r,m))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=On(),m=ni(u);m.tag=2,a!=null&&(m.callback=a),a=ri(r,m,u),a!==null&&(mn(a,r,u),qs(a,r,u))}};function g1(r,a,u,m,C,A,B){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,A,B):a.prototype&&a.prototype.isPureReactComponent?!Ms(u,m)||!Ms(C,A):!0}function b1(r,a,u,m){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,m),a.state!==r&&Zd.enqueueReplaceState(a,a.state,null)}function Ki(r,a){var u=a;if("ref"in a){u={};for(var m in a)m!=="ref"&&(u[m]=a[m])}if(r=r.defaultProps){u===a&&(u=f({},u));for(var C in r)u[C]===void 0&&(u[C]=r[C])}return u}function y1(r){hl(r)}function v1(r){console.error(r)}function _1(r){hl(r)}function Ml(r,a){try{var u=r.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function S1(r,a,u){try{var m=r.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function Qd(r,a,u){return u=ni(u),u.tag=3,u.payload={element:null},u.callback=function(){Ml(r,a)},u}function E1(r){return r=ni(r),r.tag=3,r}function x1(r,a,u,m){var C=u.type.getDerivedStateFromError;if(typeof C=="function"){var A=m.value;r.payload=function(){return C(A)},r.callback=function(){S1(a,u,m)}}var B=u.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(r.callback=function(){S1(a,u,m),typeof C!="function"&&(ci===null?ci=new Set([this]):ci.add(this));var $=m.stack;this.componentDidCatch(m.value,{componentStack:$!==null?$:""})})}function hM(r,a,u,m,C){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(a=u.alternate,a!==null&&Fa(a,u,C,!0),u=Tn.current,u!==null){switch(u.tag){case 31:case 13:return Vn===null?Wl():u.alternate===null&&At===0&&(At=3),u.flags&=-257,u.flags|=65536,u.lanes=C,m===El?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([m]):a.add(m),xh(r,m,C)),!1;case 22:return u.flags|=65536,m===El?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([m]):u.add(m)),xh(r,m,C)),!1}throw Error(i(435,u.tag))}return xh(r,m,C),Wl(),!1}if(Ye)return a=Tn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=C,m!==bd&&(r=Error(i(422),{cause:m}),js(zn(r,u)))):(m!==bd&&(a=Error(i(423),{cause:m}),js(zn(a,u))),r=r.current.alternate,r.flags|=65536,C&=-C,r.lanes|=C,m=zn(m,u),C=Qd(r.stateNode,m,C),Ad(r,C),At!==4&&(At=2)),!1;var A=Error(i(520),{cause:m});if(A=zn(A,u),ro===null?ro=[A]:ro.push(A),At!==4&&(At=2),a===null)return!0;m=zn(m,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,r=C&-C,u.lanes|=r,r=Qd(u.stateNode,m,r),Ad(u,r),!1;case 1:if(a=u.type,A=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(ci===null||!ci.has(A))))return u.flags|=65536,C&=-C,u.lanes|=C,C=E1(C),x1(C,r,u,m),Ad(u,C),!1}u=u.return}while(u!==null);return!1}var Jd=Error(i(461)),Mt=!1;function Vt(r,a,u,m){a.child=r===null?T0(a,null,u,m):Vi(a,r.child,u,m)}function w1(r,a,u,m,C){u=u.render;var A=a.ref;if("ref"in m){var B={};for(var $ in m)$!=="ref"&&(B[$]=m[$])}else B=m;return zi(a),m=Dd(r,a,u,B,A,C),$=Md(),r!==null&&!Mt?(Bd(r,a,C),Lr(r,a,C)):(Ye&&$&&md(a),a.flags|=1,Vt(r,a,m,C),a.child)}function C1(r,a,u,m,C){if(r===null){var A=u.type;return typeof A=="function"&&!hd(A)&&A.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=A,k1(r,a,A,m,C)):(r=gl(u.type,null,m,a,a.mode,C),r.ref=a.ref,r.return=a,a.child=r)}if(A=r.child,!oh(r,C)){var B=A.memoizedProps;if(u=u.compare,u=u!==null?u:Ms,u(B,m)&&r.ref===a.ref)return Lr(r,a,C)}return a.flags|=1,r=kr(A,m),r.ref=a.ref,r.return=a,a.child=r}function k1(r,a,u,m,C){if(r!==null){var A=r.memoizedProps;if(Ms(A,m)&&r.ref===a.ref)if(Mt=!1,a.pendingProps=m=A,oh(r,C))(r.flags&131072)!==0&&(Mt=!0);else return a.lanes=r.lanes,Lr(r,a,C)}return eh(r,a,u,m,C)}function T1(r,a,u,m){var C=m.children,A=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(A=A!==null?A.baseLanes|u:u,r!==null){for(m=a.child=r.child,C=0;m!==null;)C=C|m.lanes|m.childLanes,m=m.sibling;m=C&~A}else m=0,a.child=null;return A1(r,a,A,u,m)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&_l(a,A!==null?A.cachePool:null),A!==null?N0(a,A):Nd(),O0(a);else return m=a.lanes=536870912,A1(r,a,A!==null?A.baseLanes|u:u,u,m)}else A!==null?(_l(a,A.cachePool),N0(a,A),ai(),a.memoizedState=null):(r!==null&&_l(a,null),Nd(),ai());return Vt(r,a,C,u),a.child}function Xs(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function A1(r,a,u,m,C){var A=wd();return A=A===null?null:{parent:It._currentValue,pool:A},a.memoizedState={baseLanes:u,cachePool:A},r!==null&&_l(a,null),Nd(),O0(a),r!==null&&Fa(r,a,m,!0),a.childLanes=C,null}function Bl(r,a){return a=jl({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function R1(r,a,u){return Vi(a,r.child,null,u),r=Bl(a,a.pendingProps),r.flags|=2,An(a),a.memoizedState=null,r}function fM(r,a,u){var m=a.pendingProps,C=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Ye){if(m.mode==="hidden")return r=Bl(a,m),a.lanes=536870912,Xs(null,r);if(Ld(a),(r=vt)?(r=HE(r,Gn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Zr!==null?{id:hr,overflow:fr}:null,retryLane:536870912,hydrationErrors:null},u=h0(r),u.return=a,a.child=u,$t=a,vt=null)):r=null,r===null)throw Jr(a);return a.lanes=536870912,null}return Bl(a,m)}var A=r.memoizedState;if(A!==null){var B=A.dehydrated;if(Ld(a),C)if(a.flags&256)a.flags&=-257,a=R1(r,a,u);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Mt||Fa(r,a,u,!1),C=(u&r.childLanes)!==0,Mt||C){if(m=ht,m!==null&&(B=vS(m,u),B!==0&&B!==A.retryLane))throw A.retryLane=B,ji(r,B),mn(m,r,B),Jd;Wl(),a=R1(r,a,u)}else r=A.treeContext,vt=Wn(B.nextSibling),$t=a,Ye=!0,Qr=null,Gn=!1,r!==null&&m0(a,r),a=Bl(a,m),a.flags|=4096;return a}return r=kr(r.child,{mode:m.mode,children:m.children}),r.ref=a.ref,a.child=r,r.return=a,r}function Fl(r,a){var u=a.ref;if(u===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(r===null||r.ref!==u)&&(a.flags|=4194816)}}function eh(r,a,u,m,C){return zi(a),u=Dd(r,a,u,m,void 0,C),m=Md(),r!==null&&!Mt?(Bd(r,a,C),Lr(r,a,C)):(Ye&&m&&md(a),a.flags|=1,Vt(r,a,u,C),a.child)}function N1(r,a,u,m,C,A){return zi(a),a.updateQueue=null,u=I0(a,m,u,C),L0(r),m=Md(),r!==null&&!Mt?(Bd(r,a,A),Lr(r,a,A)):(Ye&&m&&md(a),a.flags|=1,Vt(r,a,u,A),a.child)}function O1(r,a,u,m,C){if(zi(a),a.stateNode===null){var A=Ia,B=u.contextType;typeof B=="object"&&B!==null&&(A=Gt(B)),A=new u(m,A),a.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=Zd,a.stateNode=A,A._reactInternals=a,A=a.stateNode,A.props=m,A.state=a.memoizedState,A.refs={},kd(a),B=u.contextType,A.context=typeof B=="object"&&B!==null?Gt(B):Ia,A.state=a.memoizedState,B=u.getDerivedStateFromProps,typeof B=="function"&&(Xd(a,u,B,m),A.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(B=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),B!==A.state&&Zd.enqueueReplaceState(A,A.state,null),Gs(a,m,A,C),$s(),A.state=a.memoizedState),typeof A.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(r===null){A=a.stateNode;var $=a.memoizedProps,Q=Ki(u,$);A.props=Q;var ie=A.context,he=u.contextType;B=Ia,typeof he=="object"&&he!==null&&(B=Gt(he));var pe=u.getDerivedStateFromProps;he=typeof pe=="function"||typeof A.getSnapshotBeforeUpdate=="function",$=a.pendingProps!==$,he||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||($||ie!==B)&&b1(a,A,m,B),ti=!1;var se=a.memoizedState;A.state=se,Gs(a,m,A,C),$s(),ie=a.memoizedState,$||se!==ie||ti?(typeof pe=="function"&&(Xd(a,u,pe,m),ie=a.memoizedState),(Q=ti||g1(a,u,Q,m,se,ie,B))?(he||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(a.flags|=4194308)):(typeof A.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=ie),A.props=m,A.state=ie,A.context=B,m=Q):(typeof A.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{A=a.stateNode,Td(r,a),B=a.memoizedProps,he=Ki(u,B),A.props=he,pe=a.pendingProps,se=A.context,ie=u.contextType,Q=Ia,typeof ie=="object"&&ie!==null&&(Q=Gt(ie)),$=u.getDerivedStateFromProps,(ie=typeof $=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(B!==pe||se!==Q)&&b1(a,A,m,Q),ti=!1,se=a.memoizedState,A.state=se,Gs(a,m,A,C),$s();var ce=a.memoizedState;B!==pe||se!==ce||ti||r!==null&&r.dependencies!==null&&yl(r.dependencies)?(typeof $=="function"&&(Xd(a,u,$,m),ce=a.memoizedState),(he=ti||g1(a,u,he,m,se,ce,Q)||r!==null&&r.dependencies!==null&&yl(r.dependencies))?(ie||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(m,ce,Q),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(m,ce,Q)),typeof A.componentDidUpdate=="function"&&(a.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof A.componentDidUpdate!="function"||B===r.memoizedProps&&se===r.memoizedState||(a.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||B===r.memoizedProps&&se===r.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=ce),A.props=m,A.state=ce,A.context=Q,m=he):(typeof A.componentDidUpdate!="function"||B===r.memoizedProps&&se===r.memoizedState||(a.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||B===r.memoizedProps&&se===r.memoizedState||(a.flags|=1024),m=!1)}return A=m,Fl(r,a),m=(a.flags&128)!==0,A||m?(A=a.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:A.render(),a.flags|=1,r!==null&&m?(a.child=Vi(a,r.child,null,C),a.child=Vi(a,null,u,C)):Vt(r,a,u,C),a.memoizedState=A.state,r=a.child):r=Lr(r,a,C),r}function L1(r,a,u,m){return Ui(),a.flags|=256,Vt(r,a,u,m),a.child}var th={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nh(r){return{baseLanes:r,cachePool:S0()}}function rh(r,a,u){return r=r!==null?r.childLanes&~u:0,a&&(r|=Nn),r}function I1(r,a,u){var m=a.pendingProps,C=!1,A=(a.flags&128)!==0,B;if((B=A)||(B=r!==null&&r.memoizedState===null?!1:(Nt.current&2)!==0),B&&(C=!0,a.flags&=-129),B=(a.flags&32)!==0,a.flags&=-33,r===null){if(Ye){if(C?ii(a):ai(),(r=vt)?(r=HE(r,Gn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Zr!==null?{id:hr,overflow:fr}:null,retryLane:536870912,hydrationErrors:null},u=h0(r),u.return=a,a.child=u,$t=a,vt=null)):r=null,r===null)throw Jr(a);return Ph(r)?a.lanes=32:a.lanes=536870912,null}var $=m.children;return m=m.fallback,C?(ai(),C=a.mode,$=jl({mode:"hidden",children:$},C),m=Pi(m,C,u,null),$.return=a,m.return=a,$.sibling=m,a.child=$,m=a.child,m.memoizedState=nh(u),m.childLanes=rh(r,B,u),a.memoizedState=th,Xs(null,m)):(ii(a),ih(a,$))}var Q=r.memoizedState;if(Q!==null&&($=Q.dehydrated,$!==null)){if(A)a.flags&256?(ii(a),a.flags&=-257,a=ah(r,a,u)):a.memoizedState!==null?(ai(),a.child=r.child,a.flags|=128,a=null):(ai(),$=m.fallback,C=a.mode,m=jl({mode:"visible",children:m.children},C),$=Pi($,C,u,null),$.flags|=2,m.return=a,$.return=a,m.sibling=$,a.child=m,Vi(a,r.child,null,u),m=a.child,m.memoizedState=nh(u),m.childLanes=rh(r,B,u),a.memoizedState=th,a=Xs(null,m));else if(ii(a),Ph($)){if(B=$.nextSibling&&$.nextSibling.dataset,B)var ie=B.dgst;B=ie,m=Error(i(419)),m.stack="",m.digest=B,js({value:m,source:null,stack:null}),a=ah(r,a,u)}else if(Mt||Fa(r,a,u,!1),B=(u&r.childLanes)!==0,Mt||B){if(B=ht,B!==null&&(m=vS(B,u),m!==0&&m!==Q.retryLane))throw Q.retryLane=m,ji(r,m),mn(B,r,m),Jd;jh($)||Wl(),a=ah(r,a,u)}else jh($)?(a.flags|=192,a.child=r.child,a=null):(r=Q.treeContext,vt=Wn($.nextSibling),$t=a,Ye=!0,Qr=null,Gn=!1,r!==null&&m0(a,r),a=ih(a,m.children),a.flags|=4096);return a}return C?(ai(),$=m.fallback,C=a.mode,Q=r.child,ie=Q.sibling,m=kr(Q,{mode:"hidden",children:m.children}),m.subtreeFlags=Q.subtreeFlags&65011712,ie!==null?$=kr(ie,$):($=Pi($,C,u,null),$.flags|=2),$.return=a,m.return=a,m.sibling=$,a.child=m,Xs(null,m),m=a.child,$=r.child.memoizedState,$===null?$=nh(u):(C=$.cachePool,C!==null?(Q=It._currentValue,C=C.parent!==Q?{parent:Q,pool:Q}:C):C=S0(),$={baseLanes:$.baseLanes|u,cachePool:C}),m.memoizedState=$,m.childLanes=rh(r,B,u),a.memoizedState=th,Xs(r.child,m)):(ii(a),u=r.child,r=u.sibling,u=kr(u,{mode:"visible",children:m.children}),u.return=a,u.sibling=null,r!==null&&(B=a.deletions,B===null?(a.deletions=[r],a.flags|=16):B.push(r)),a.child=u,a.memoizedState=null,u)}function ih(r,a){return a=jl({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function jl(r,a){return r=kn(22,r,null,a),r.lanes=0,r}function ah(r,a,u){return Vi(a,r.child,null,u),r=ih(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function D1(r,a,u){r.lanes|=a;var m=r.alternate;m!==null&&(m.lanes|=a),_d(r.return,a,u)}function sh(r,a,u,m,C,A){var B=r.memoizedState;B===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:C,treeForkCount:A}:(B.isBackwards=a,B.rendering=null,B.renderingStartTime=0,B.last=m,B.tail=u,B.tailMode=C,B.treeForkCount=A)}function M1(r,a,u){var m=a.pendingProps,C=m.revealOrder,A=m.tail;m=m.children;var B=Nt.current,$=(B&2)!==0;if($?(B=B&1|2,a.flags|=128):B&=1,U(Nt,B),Vt(r,a,m,u),m=Ye?Fs:0,!$&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&D1(r,u,a);else if(r.tag===19)D1(r,u,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(C){case"forwards":for(u=a.child,C=null;u!==null;)r=u.alternate,r!==null&&kl(r)===null&&(C=u),u=u.sibling;u=C,u===null?(C=a.child,a.child=null):(C=u.sibling,u.sibling=null),sh(a,!1,C,u,A,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,C=a.child,a.child=null;C!==null;){if(r=C.alternate,r!==null&&kl(r)===null){a.child=C;break}r=C.sibling,C.sibling=u,u=C,C=r}sh(a,!0,u,null,A,m);break;case"together":sh(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function Lr(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),li|=a.lanes,(u&a.childLanes)===0)if(r!==null){if(Fa(r,a,u,!1),(u&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,u=kr(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=kr(r,r.pendingProps),u.return=a;u.sibling=null}return a.child}function oh(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&yl(r)))}function pM(r,a,u){switch(a.tag){case 3:z(a,a.stateNode.containerInfo),ei(a,It,r.memoizedState.cache),Ui();break;case 27:case 5:ue(a);break;case 4:z(a,a.stateNode.containerInfo);break;case 10:ei(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Ld(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(ii(a),a.flags|=128,null):(u&a.child.childLanes)!==0?I1(r,a,u):(ii(a),r=Lr(r,a,u),r!==null?r.sibling:null);ii(a);break;case 19:var C=(r.flags&128)!==0;if(m=(u&a.childLanes)!==0,m||(Fa(r,a,u,!1),m=(u&a.childLanes)!==0),C){if(m)return M1(r,a,u);a.flags|=128}if(C=a.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),U(Nt,Nt.current),m)break;return null;case 22:return a.lanes=0,T1(r,a,u,a.pendingProps);case 24:ei(a,It,r.memoizedState.cache)}return Lr(r,a,u)}function B1(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps)Mt=!0;else{if(!oh(r,u)&&(a.flags&128)===0)return Mt=!1,pM(r,a,u);Mt=(r.flags&131072)!==0}else Mt=!1,Ye&&(a.flags&1048576)!==0&&p0(a,Fs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(r=$i(a.elementType),a.type=r,typeof r=="function")hd(r)?(m=Ki(r,m),a.tag=1,a=O1(null,a,r,m,u)):(a.tag=0,a=eh(null,a,r,m,u));else{if(r!=null){var C=r.$$typeof;if(C===k){a.tag=11,a=w1(null,a,r,m,u);break e}else if(C===O){a.tag=14,a=C1(null,a,r,m,u);break e}}throw a=W(r)||r,Error(i(306,a,""))}}return a;case 0:return eh(r,a,a.type,a.pendingProps,u);case 1:return m=a.type,C=Ki(m,a.pendingProps),O1(r,a,m,C,u);case 3:e:{if(z(a,a.stateNode.containerInfo),r===null)throw Error(i(387));m=a.pendingProps;var A=a.memoizedState;C=A.element,Td(r,a),Gs(a,m,null,u);var B=a.memoizedState;if(m=B.cache,ei(a,It,m),m!==A.cache&&Sd(a,[It],u,!0),$s(),m=B.element,A.isDehydrated)if(A={element:m,isDehydrated:!1,cache:B.cache},a.updateQueue.baseState=A,a.memoizedState=A,a.flags&256){a=L1(r,a,m,u);break e}else if(m!==C){C=zn(Error(i(424)),a),js(C),a=L1(r,a,m,u);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,vt=Wn(r.firstChild),$t=a,Ye=!0,Qr=null,Gn=!0,u=T0(a,null,m,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ui(),m===C){a=Lr(r,a,u);break e}Vt(r,a,m,u)}a=a.child}return a;case 26:return Fl(r,a),r===null?(u=WE(a.type,null,a.pendingProps,null))?a.memoizedState=u:Ye||(u=a.type,r=a.pendingProps,m=ec(de.current).createElement(u),m[qt]=a,m[cn]=r,Wt(m,u,r),Ht(m),a.stateNode=m):a.memoizedState=WE(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return ue(a),r===null&&Ye&&(m=a.stateNode=$E(a.type,a.pendingProps,de.current),$t=a,Gn=!0,C=vt,fi(a.type)?(Uh=C,vt=Wn(m.firstChild)):vt=C),Vt(r,a,a.pendingProps.children,u),Fl(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Ye&&((C=m=vt)&&(m=$M(m,a.type,a.pendingProps,Gn),m!==null?(a.stateNode=m,$t=a,vt=Wn(m.firstChild),Gn=!1,C=!0):C=!1),C||Jr(a)),ue(a),C=a.type,A=a.pendingProps,B=r!==null?r.memoizedProps:null,m=A.children,Mh(C,A)?m=null:B!==null&&Mh(C,B)&&(a.flags|=32),a.memoizedState!==null&&(C=Dd(r,a,aM,null,null,u),ho._currentValue=C),Fl(r,a),Vt(r,a,m,u),a.child;case 6:return r===null&&Ye&&((r=u=vt)&&(u=GM(u,a.pendingProps,Gn),u!==null?(a.stateNode=u,$t=a,vt=null,r=!0):r=!1),r||Jr(a)),null;case 13:return I1(r,a,u);case 4:return z(a,a.stateNode.containerInfo),m=a.pendingProps,r===null?a.child=Vi(a,null,m,u):Vt(r,a,m,u),a.child;case 11:return w1(r,a,a.type,a.pendingProps,u);case 7:return Vt(r,a,a.pendingProps,u),a.child;case 8:return Vt(r,a,a.pendingProps.children,u),a.child;case 12:return Vt(r,a,a.pendingProps.children,u),a.child;case 10:return m=a.pendingProps,ei(a,a.type,m.value),Vt(r,a,m.children,u),a.child;case 9:return C=a.type._context,m=a.pendingProps.children,zi(a),C=Gt(C),m=m(C),a.flags|=1,Vt(r,a,m,u),a.child;case 14:return C1(r,a,a.type,a.pendingProps,u);case 15:return k1(r,a,a.type,a.pendingProps,u);case 19:return M1(r,a,u);case 31:return fM(r,a,u);case 22:return T1(r,a,u,a.pendingProps);case 24:return zi(a),m=Gt(It),r===null?(C=wd(),C===null&&(C=ht,A=Ed(),C.pooledCache=A,A.refCount++,A!==null&&(C.pooledCacheLanes|=u),C=A),a.memoizedState={parent:m,cache:C},kd(a),ei(a,It,C)):((r.lanes&u)!==0&&(Td(r,a),Gs(a,null,null,u),$s()),C=r.memoizedState,A=a.memoizedState,C.parent!==m?(C={parent:m,cache:m},a.memoizedState=C,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=C),ei(a,It,m)):(m=A.cache,ei(a,It,m),m!==C.cache&&Sd(a,[It],u,!0))),Vt(r,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Ir(r){r.flags|=4}function lh(r,a,u,m,C){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(C&335544128)===C)if(r.stateNode.complete)r.flags|=8192;else if(cE())r.flags|=8192;else throw Gi=El,Cd}else r.flags&=-16777217}function F1(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!QE(a))if(cE())r.flags|=8192;else throw Gi=El,Cd}function Pl(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?gS():536870912,r.lanes|=a,Ya|=a)}function Zs(r,a){if(!Ye)switch(r.tailMode){case"hidden":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:m.sibling=null}}function _t(r){var a=r.alternate!==null&&r.alternate.child===r.child,u=0,m=0;if(a)for(var C=r.child;C!==null;)u|=C.lanes|C.childLanes,m|=C.subtreeFlags&65011712,m|=C.flags&65011712,C.return=r,C=C.sibling;else for(C=r.child;C!==null;)u|=C.lanes|C.childLanes,m|=C.subtreeFlags,m|=C.flags,C.return=r,C=C.sibling;return r.subtreeFlags|=m,r.childLanes=u,a}function mM(r,a,u){var m=a.pendingProps;switch(gd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(a),null;case 1:return _t(a),null;case 3:return u=a.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),Rr(It),ne(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(Ba(a)?Ir(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,yd())),_t(a),null;case 26:var C=a.type,A=a.memoizedState;return r===null?(Ir(a),A!==null?(_t(a),F1(a,A)):(_t(a),lh(a,C,null,m,u))):A?A!==r.memoizedState?(Ir(a),_t(a),F1(a,A)):(_t(a),a.flags&=-16777217):(r=r.memoizedProps,r!==m&&Ir(a),_t(a),lh(a,C,r,m,u)),null;case 27:if(ge(a),u=de.current,C=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==m&&Ir(a);else{if(!m){if(a.stateNode===null)throw Error(i(166));return _t(a),null}r=ee.current,Ba(a)?g0(a):(r=$E(C,m,u),a.stateNode=r,Ir(a))}return _t(a),null;case 5:if(ge(a),C=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==m&&Ir(a);else{if(!m){if(a.stateNode===null)throw Error(i(166));return _t(a),null}if(A=ee.current,Ba(a))g0(a);else{var B=ec(de.current);switch(A){case 1:A=B.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:A=B.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":A=B.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":A=B.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":A=B.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof m.is=="string"?B.createElement("select",{is:m.is}):B.createElement("select"),m.multiple?A.multiple=!0:m.size&&(A.size=m.size);break;default:A=typeof m.is=="string"?B.createElement(C,{is:m.is}):B.createElement(C)}}A[qt]=a,A[cn]=m;e:for(B=a.child;B!==null;){if(B.tag===5||B.tag===6)A.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===a)break e;for(;B.sibling===null;){if(B.return===null||B.return===a)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}a.stateNode=A;e:switch(Wt(A,C,m),C){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Ir(a)}}return _t(a),lh(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,u),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==m&&Ir(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(i(166));if(r=de.current,Ba(a)){if(r=a.stateNode,u=a.memoizedProps,m=null,C=$t,C!==null)switch(C.tag){case 27:case 5:m=C.memoizedProps}r[qt]=a,r=!!(r.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||IE(r.nodeValue,u)),r||Jr(a,!0)}else r=ec(r).createTextNode(m),r[qt]=a,a.stateNode=r}return _t(a),null;case 31:if(u=a.memoizedState,r===null||r.memoizedState!==null){if(m=Ba(a),u!==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[qt]=a}else Ui(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;_t(a),r=!1}else u=yd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return a.flags&256?(An(a),a):(An(a),null);if((a.flags&128)!==0)throw Error(i(558))}return _t(a),null;case 13:if(m=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(C=Ba(a),m!==null&&m.dehydrated!==null){if(r===null){if(!C)throw Error(i(318));if(C=a.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(i(317));C[qt]=a}else Ui(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;_t(a),C=!1}else C=yd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=C),C=!0;if(!C)return a.flags&256?(An(a),a):(An(a),null)}return An(a),(a.flags&128)!==0?(a.lanes=u,a):(u=m!==null,r=r!==null&&r.memoizedState!==null,u&&(m=a.child,C=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(C=m.alternate.memoizedState.cachePool.pool),A=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(A=m.memoizedState.cachePool.pool),A!==C&&(m.flags|=2048)),u!==r&&u&&(a.child.flags|=8192),Pl(a,a.updateQueue),_t(a),null);case 4:return ne(),r===null&&Nh(a.stateNode.containerInfo),_t(a),null;case 10:return Rr(a.type),_t(a),null;case 19:if(G(Nt),m=a.memoizedState,m===null)return _t(a),null;if(C=(a.flags&128)!==0,A=m.rendering,A===null)if(C)Zs(m,!1);else{if(At!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(A=kl(r),A!==null){for(a.flags|=128,Zs(m,!1),r=A.updateQueue,a.updateQueue=r,Pl(a,r),a.subtreeFlags=0,r=u,u=a.child;u!==null;)d0(u,r),u=u.sibling;return U(Nt,Nt.current&1|2),Ye&&Tr(a,m.treeForkCount),a.child}r=r.sibling}m.tail!==null&&ke()>$l&&(a.flags|=128,C=!0,Zs(m,!1),a.lanes=4194304)}else{if(!C)if(r=kl(A),r!==null){if(a.flags|=128,C=!0,r=r.updateQueue,a.updateQueue=r,Pl(a,r),Zs(m,!0),m.tail===null&&m.tailMode==="hidden"&&!A.alternate&&!Ye)return _t(a),null}else 2*ke()-m.renderingStartTime>$l&&u!==536870912&&(a.flags|=128,C=!0,Zs(m,!1),a.lanes=4194304);m.isBackwards?(A.sibling=a.child,a.child=A):(r=m.last,r!==null?r.sibling=A:a.child=A,m.last=A)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=ke(),r.sibling=null,u=Nt.current,U(Nt,C?u&1|2:u&1),Ye&&Tr(a,m.treeForkCount),r):(_t(a),null);case 22:case 23:return An(a),Od(),m=a.memoizedState!==null,r!==null?r.memoizedState!==null!==m&&(a.flags|=8192):m&&(a.flags|=8192),m?(u&536870912)!==0&&(a.flags&128)===0&&(_t(a),a.subtreeFlags&6&&(a.flags|=8192)):_t(a),u=a.updateQueue,u!==null&&Pl(a,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==u&&(a.flags|=2048),r!==null&&G(qi),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Rr(It),_t(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function gM(r,a){switch(gd(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Rr(It),ne(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return ge(a),null;case 31:if(a.memoizedState!==null){if(An(a),a.alternate===null)throw Error(i(340));Ui()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(An(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ui()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return G(Nt),null;case 4:return ne(),null;case 10:return Rr(a.type),null;case 22:case 23:return An(a),Od(),r!==null&&G(qi),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Rr(It),null;case 25:return null;default:return null}}function j1(r,a){switch(gd(a),a.tag){case 3:Rr(It),ne();break;case 26:case 27:case 5:ge(a);break;case 4:ne();break;case 31:a.memoizedState!==null&&An(a);break;case 13:An(a);break;case 19:G(Nt);break;case 10:Rr(a.type);break;case 22:case 23:An(a),Od(),r!==null&&G(qi);break;case 24:Rr(It)}}function Qs(r,a){try{var u=a.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var C=m.next;u=C;do{if((u.tag&r)===r){m=void 0;var A=u.create,B=u.inst;m=A(),B.destroy=m}u=u.next}while(u!==C)}}catch($){st(a,a.return,$)}}function si(r,a,u){try{var m=a.updateQueue,C=m!==null?m.lastEffect:null;if(C!==null){var A=C.next;m=A;do{if((m.tag&r)===r){var B=m.inst,$=B.destroy;if($!==void 0){B.destroy=void 0,C=a;var Q=u,ie=$;try{ie()}catch(he){st(C,Q,he)}}}m=m.next}while(m!==A)}}catch(he){st(a,a.return,he)}}function P1(r){var a=r.updateQueue;if(a!==null){var u=r.stateNode;try{R0(a,u)}catch(m){st(r,r.return,m)}}}function U1(r,a,u){u.props=Ki(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(m){st(r,a,m)}}function Js(r,a){try{var u=r.ref;if(u!==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 u=="function"?r.refCleanup=u(m):u.current=m}}catch(C){st(r,a,C)}}function pr(r,a){var u=r.ref,m=r.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(C){st(r,a,C)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(C){st(r,a,C)}else u.current=null}function H1(r){var a=r.type,u=r.memoizedProps,m=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(C){st(r,r.return,C)}}function ch(r,a,u){try{var m=r.stateNode;jM(m,r.type,u,a),m[cn]=a}catch(C){st(r,r.return,C)}}function z1(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&fi(r.type)||r.tag===4}function uh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||z1(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&&fi(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 dh(r,a,u){var m=r.tag;if(m===5||m===6)r=r.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(r),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=wr));else if(m!==4&&(m===27&&fi(r.type)&&(u=r.stateNode,a=null),r=r.child,r!==null))for(dh(r,a,u),r=r.sibling;r!==null;)dh(r,a,u),r=r.sibling}function Ul(r,a,u){var m=r.tag;if(m===5||m===6)r=r.stateNode,a?u.insertBefore(r,a):u.appendChild(r);else if(m!==4&&(m===27&&fi(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(Ul(r,a,u),r=r.sibling;r!==null;)Ul(r,a,u),r=r.sibling}function q1(r){var a=r.stateNode,u=r.memoizedProps;try{for(var m=r.type,C=a.attributes;C.length;)a.removeAttributeNode(C[0]);Wt(a,m,u),a[qt]=r,a[cn]=u}catch(A){st(r,r.return,A)}}var Dr=!1,Bt=!1,hh=!1,$1=typeof WeakSet=="function"?WeakSet:Set,zt=null;function bM(r,a){if(r=r.containerInfo,Ih=oc,r=n0(r),ad(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var C=m.anchorOffset,A=m.focusNode;m=m.focusOffset;try{u.nodeType,A.nodeType}catch{u=null;break e}var B=0,$=-1,Q=-1,ie=0,he=0,pe=r,se=null;t:for(;;){for(var ce;pe!==u||C!==0&&pe.nodeType!==3||($=B+C),pe!==A||m!==0&&pe.nodeType!==3||(Q=B+m),pe.nodeType===3&&(B+=pe.nodeValue.length),(ce=pe.firstChild)!==null;)se=pe,pe=ce;for(;;){if(pe===r)break t;if(se===u&&++ie===C&&($=B),se===A&&++he===m&&(Q=B),(ce=pe.nextSibling)!==null)break;pe=se,se=pe.parentNode}pe=ce}u=$===-1||Q===-1?null:{start:$,end:Q}}else u=null}u=u||{start:0,end:0}}else u=null;for(Dh={focusedElem:r,selectionRange:u},oc=!1,zt=a;zt!==null;)if(a=zt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,zt=r;else for(;zt!==null;){switch(a=zt,A=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(u=0;u<r.length;u++)C=r[u],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&A!==null){r=void 0,u=a,C=A.memoizedProps,A=A.memoizedState,m=u.stateNode;try{var we=Ki(u.type,C);r=m.getSnapshotBeforeUpdate(we,A),m.__reactInternalSnapshotBeforeUpdate=r}catch(Oe){st(u,u.return,Oe)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,u=r.nodeType,u===9)Fh(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Fh(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,zt=r;break}zt=a.return}}function G1(r,a,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Br(r,u),m&4&&Qs(5,u);break;case 1:if(Br(r,u),m&4)if(r=u.stateNode,a===null)try{r.componentDidMount()}catch(B){st(u,u.return,B)}else{var C=Ki(u.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(C,a,r.__reactInternalSnapshotBeforeUpdate)}catch(B){st(u,u.return,B)}}m&64&&P1(u),m&512&&Js(u,u.return);break;case 3:if(Br(r,u),m&64&&(r=u.updateQueue,r!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{R0(r,a)}catch(B){st(u,u.return,B)}}break;case 27:a===null&&m&4&&q1(u);case 26:case 5:Br(r,u),a===null&&m&4&&H1(u),m&512&&Js(u,u.return);break;case 12:Br(r,u);break;case 31:Br(r,u),m&4&&K1(r,u);break;case 13:Br(r,u),m&4&&Y1(r,u),m&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=kM.bind(null,u),VM(r,u))));break;case 22:if(m=u.memoizedState!==null||Dr,!m){a=a!==null&&a.memoizedState!==null||Bt,C=Dr;var A=Bt;Dr=m,(Bt=a)&&!A?Fr(r,u,(u.subtreeFlags&8772)!==0):Br(r,u),Dr=C,Bt=A}break;case 30:break;default:Br(r,u)}}function V1(r){var a=r.alternate;a!==null&&(r.alternate=null,V1(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&zu(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 St=null,dn=!1;function Mr(r,a,u){for(u=u.child;u!==null;)W1(r,a,u),u=u.sibling}function W1(r,a,u){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(yt,u)}catch{}switch(u.tag){case 26:Bt||pr(u,a),Mr(r,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Bt||pr(u,a);var m=St,C=dn;fi(u.type)&&(St=u.stateNode,dn=!1),Mr(r,a,u),lo(u.stateNode),St=m,dn=C;break;case 5:Bt||pr(u,a);case 6:if(m=St,C=dn,St=null,Mr(r,a,u),St=m,dn=C,St!==null)if(dn)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(u.stateNode)}catch(A){st(u,a,A)}else try{St.removeChild(u.stateNode)}catch(A){st(u,a,A)}break;case 18:St!==null&&(dn?(r=St,PE(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),rs(r)):PE(St,u.stateNode));break;case 4:m=St,C=dn,St=u.stateNode.containerInfo,dn=!0,Mr(r,a,u),St=m,dn=C;break;case 0:case 11:case 14:case 15:si(2,u,a),Bt||si(4,u,a),Mr(r,a,u);break;case 1:Bt||(pr(u,a),m=u.stateNode,typeof m.componentWillUnmount=="function"&&U1(u,a,m)),Mr(r,a,u);break;case 21:Mr(r,a,u);break;case 22:Bt=(m=Bt)||u.memoizedState!==null,Mr(r,a,u),Bt=m;break;default:Mr(r,a,u)}}function K1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{rs(r)}catch(u){st(a,a.return,u)}}}function Y1(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{rs(r)}catch(u){st(a,a.return,u)}}function yM(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new $1),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new $1),a;default:throw Error(i(435,r.tag))}}function Hl(r,a){var u=yM(r);a.forEach(function(m){if(!u.has(m)){u.add(m);var C=TM.bind(null,r,m);m.then(C,C)}})}function hn(r,a){var u=a.deletions;if(u!==null)for(var m=0;m<u.length;m++){var C=u[m],A=r,B=a,$=B;e:for(;$!==null;){switch($.tag){case 27:if(fi($.type)){St=$.stateNode,dn=!1;break e}break;case 5:St=$.stateNode,dn=!1;break e;case 3:case 4:St=$.stateNode.containerInfo,dn=!0;break e}$=$.return}if(St===null)throw Error(i(160));W1(A,B,C),St=null,dn=!1,A=C.alternate,A!==null&&(A.return=null),C.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)X1(a,r),a=a.sibling}var ir=null;function X1(r,a){var u=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:hn(a,r),fn(r),m&4&&(si(3,r,r.return),Qs(3,r),si(5,r,r.return));break;case 1:hn(a,r),fn(r),m&512&&(Bt||u===null||pr(u,u.return)),m&64&&Dr&&(r=r.updateQueue,r!==null&&(m=r.callbacks,m!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var C=ir;if(hn(a,r),fn(r),m&512&&(Bt||u===null||pr(u,u.return)),m&4){var A=u!==null?u.memoizedState:null;if(m=r.memoizedState,u===null)if(m===null)if(r.stateNode===null){e:{m=r.type,u=r.memoizedProps,C=C.ownerDocument||C;t:switch(m){case"title":A=C.getElementsByTagName("title")[0],(!A||A[ks]||A[qt]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=C.createElement(m),C.head.insertBefore(A,C.querySelector("head > title"))),Wt(A,m,u),A[qt]=r,Ht(A),m=A;break e;case"link":var B=XE("link","href",C).get(m+(u.href||""));if(B){for(var $=0;$<B.length;$++)if(A=B[$],A.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&A.getAttribute("rel")===(u.rel==null?null:u.rel)&&A.getAttribute("title")===(u.title==null?null:u.title)&&A.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){B.splice($,1);break t}}A=C.createElement(m),Wt(A,m,u),C.head.appendChild(A);break;case"meta":if(B=XE("meta","content",C).get(m+(u.content||""))){for($=0;$<B.length;$++)if(A=B[$],A.getAttribute("content")===(u.content==null?null:""+u.content)&&A.getAttribute("name")===(u.name==null?null:u.name)&&A.getAttribute("property")===(u.property==null?null:u.property)&&A.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&A.getAttribute("charset")===(u.charSet==null?null:u.charSet)){B.splice($,1);break t}}A=C.createElement(m),Wt(A,m,u),C.head.appendChild(A);break;default:throw Error(i(468,m))}A[qt]=r,Ht(A),m=A}r.stateNode=m}else ZE(C,r.type,r.stateNode);else r.stateNode=YE(C,m,r.memoizedProps);else A!==m?(A===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):A.count--,m===null?ZE(C,r.type,r.stateNode):YE(C,m,r.memoizedProps)):m===null&&r.stateNode!==null&&ch(r,r.memoizedProps,u.memoizedProps)}break;case 27:hn(a,r),fn(r),m&512&&(Bt||u===null||pr(u,u.return)),u!==null&&m&4&&ch(r,r.memoizedProps,u.memoizedProps);break;case 5:if(hn(a,r),fn(r),m&512&&(Bt||u===null||pr(u,u.return)),r.flags&32){C=r.stateNode;try{ka(C,"")}catch(we){st(r,r.return,we)}}m&4&&r.stateNode!=null&&(C=r.memoizedProps,ch(r,C,u!==null?u.memoizedProps:C)),m&1024&&(hh=!0);break;case 6:if(hn(a,r),fn(r),m&4){if(r.stateNode===null)throw Error(i(162));m=r.memoizedProps,u=r.stateNode;try{u.nodeValue=m}catch(we){st(r,r.return,we)}}break;case 3:if(rc=null,C=ir,ir=tc(a.containerInfo),hn(a,r),ir=C,fn(r),m&4&&u!==null&&u.memoizedState.isDehydrated)try{rs(a.containerInfo)}catch(we){st(r,r.return,we)}hh&&(hh=!1,Z1(r));break;case 4:m=ir,ir=tc(r.stateNode.containerInfo),hn(a,r),fn(r),ir=m;break;case 12:hn(a,r),fn(r);break;case 31:hn(a,r),fn(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Hl(r,m)));break;case 13:hn(a,r),fn(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(ql=ke()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Hl(r,m)));break;case 22:C=r.memoizedState!==null;var Q=u!==null&&u.memoizedState!==null,ie=Dr,he=Bt;if(Dr=ie||C,Bt=he||Q,hn(a,r),Bt=he,Dr=ie,fn(r),m&8192)e:for(a=r.stateNode,a._visibility=C?a._visibility&-2:a._visibility|1,C&&(u===null||Q||Dr||Bt||Yi(r)),u=null,a=r;;){if(a.tag===5||a.tag===26){if(u===null){Q=u=a;try{if(A=Q.stateNode,C)B=A.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{$=Q.stateNode;var pe=Q.memoizedProps.style,se=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;$.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(we){st(Q,Q.return,we)}}}else if(a.tag===6){if(u===null){Q=a;try{Q.stateNode.nodeValue=C?"":Q.memoizedProps}catch(we){st(Q,Q.return,we)}}}else if(a.tag===18){if(u===null){Q=a;try{var ce=Q.stateNode;C?UE(ce,!0):UE(Q.stateNode,!1)}catch(we){st(Q,Q.return,we)}}}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;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=r.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,Hl(r,u))));break;case 19:hn(a,r),fn(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Hl(r,m)));break;case 30:break;case 21:break;default:hn(a,r),fn(r)}}function fn(r){var a=r.flags;if(a&2){try{for(var u,m=r.return;m!==null;){if(z1(m)){u=m;break}m=m.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var C=u.stateNode,A=uh(r);Ul(r,A,C);break;case 5:var B=u.stateNode;u.flags&32&&(ka(B,""),u.flags&=-33);var $=uh(r);Ul(r,$,B);break;case 3:case 4:var Q=u.stateNode.containerInfo,ie=uh(r);dh(r,ie,Q);break;default:throw Error(i(161))}}catch(he){st(r,r.return,he)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function Z1(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;Z1(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Br(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)G1(r,a.alternate,a),a=a.sibling}function Yi(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:si(4,a,a.return),Yi(a);break;case 1:pr(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&U1(a,a.return,u),Yi(a);break;case 27:lo(a.stateNode);case 26:case 5:pr(a,a.return),Yi(a);break;case 22:a.memoizedState===null&&Yi(a);break;case 30:Yi(a);break;default:Yi(a)}r=r.sibling}}function Fr(r,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,C=r,A=a,B=A.flags;switch(A.tag){case 0:case 11:case 15:Fr(C,A,u),Qs(4,A);break;case 1:if(Fr(C,A,u),m=A,C=m.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(ie){st(m,m.return,ie)}if(m=A,C=m.updateQueue,C!==null){var $=m.stateNode;try{var Q=C.shared.hiddenCallbacks;if(Q!==null)for(C.shared.hiddenCallbacks=null,C=0;C<Q.length;C++)A0(Q[C],$)}catch(ie){st(m,m.return,ie)}}u&&B&64&&P1(A),Js(A,A.return);break;case 27:q1(A);case 26:case 5:Fr(C,A,u),u&&m===null&&B&4&&H1(A),Js(A,A.return);break;case 12:Fr(C,A,u);break;case 31:Fr(C,A,u),u&&B&4&&K1(C,A);break;case 13:Fr(C,A,u),u&&B&4&&Y1(C,A);break;case 22:A.memoizedState===null&&Fr(C,A,u),Js(A,A.return);break;case 30:break;default:Fr(C,A,u)}a=a.sibling}}function fh(r,a){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&Ps(u))}function ph(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Ps(r))}function ar(r,a,u,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Q1(r,a,u,m),a=a.sibling}function Q1(r,a,u,m){var C=a.flags;switch(a.tag){case 0:case 11:case 15:ar(r,a,u,m),C&2048&&Qs(9,a);break;case 1:ar(r,a,u,m);break;case 3:ar(r,a,u,m),C&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Ps(r)));break;case 12:if(C&2048){ar(r,a,u,m),r=a.stateNode;try{var A=a.memoizedProps,B=A.id,$=A.onPostCommit;typeof $=="function"&&$(B,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(Q){st(a,a.return,Q)}}else ar(r,a,u,m);break;case 31:ar(r,a,u,m);break;case 13:ar(r,a,u,m);break;case 23:break;case 22:A=a.stateNode,B=a.alternate,a.memoizedState!==null?A._visibility&2?ar(r,a,u,m):eo(r,a):A._visibility&2?ar(r,a,u,m):(A._visibility|=2,Va(r,a,u,m,(a.subtreeFlags&10256)!==0||!1)),C&2048&&fh(B,a);break;case 24:ar(r,a,u,m),C&2048&&ph(a.alternate,a);break;default:ar(r,a,u,m)}}function Va(r,a,u,m,C){for(C=C&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var A=r,B=a,$=u,Q=m,ie=B.flags;switch(B.tag){case 0:case 11:case 15:Va(A,B,$,Q,C),Qs(8,B);break;case 23:break;case 22:var he=B.stateNode;B.memoizedState!==null?he._visibility&2?Va(A,B,$,Q,C):eo(A,B):(he._visibility|=2,Va(A,B,$,Q,C)),C&&ie&2048&&fh(B.alternate,B);break;case 24:Va(A,B,$,Q,C),C&&ie&2048&&ph(B.alternate,B);break;default:Va(A,B,$,Q,C)}a=a.sibling}}function eo(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=r,m=a,C=m.flags;switch(m.tag){case 22:eo(u,m),C&2048&&fh(m.alternate,m);break;case 24:eo(u,m),C&2048&&ph(m.alternate,m);break;default:eo(u,m)}a=a.sibling}}var to=8192;function Wa(r,a,u){if(r.subtreeFlags&to)for(r=r.child;r!==null;)J1(r,a,u),r=r.sibling}function J1(r,a,u){switch(r.tag){case 26:Wa(r,a,u),r.flags&to&&r.memoizedState!==null&&i3(u,ir,r.memoizedState,r.memoizedProps);break;case 5:Wa(r,a,u);break;case 3:case 4:var m=ir;ir=tc(r.stateNode.containerInfo),Wa(r,a,u),ir=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=to,to=16777216,Wa(r,a,u),to=m):Wa(r,a,u));break;default:Wa(r,a,u)}}function eE(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 no(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var m=a[u];zt=m,nE(m,r)}eE(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)tE(r),r=r.sibling}function tE(r){switch(r.tag){case 0:case 11:case 15:no(r),r.flags&2048&&si(9,r,r.return);break;case 3:no(r);break;case 12:no(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,zl(r)):no(r);break;default:no(r)}}function zl(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var m=a[u];zt=m,nE(m,r)}eE(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:si(8,a,a.return),zl(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,zl(a));break;default:zl(a)}r=r.sibling}}function nE(r,a){for(;zt!==null;){var u=zt;switch(u.tag){case 0:case 11:case 15:si(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Ps(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,zt=m;else e:for(u=r;zt!==null;){m=zt;var C=m.sibling,A=m.return;if(V1(m),m===u){zt=null;break e}if(C!==null){C.return=A,zt=C;break e}zt=A}}}var vM={getCacheForType:function(r){var a=Gt(It),u=a.data.get(r);return u===void 0&&(u=r(),a.data.set(r,u)),u},cacheSignal:function(){return Gt(It).controller.signal}},_M=typeof WeakMap=="function"?WeakMap:Map,rt=0,ht=null,qe=null,We=0,at=0,Rn=null,oi=!1,Ka=!1,mh=!1,jr=0,At=0,li=0,Xi=0,gh=0,Nn=0,Ya=0,ro=null,pn=null,bh=!1,ql=0,rE=0,$l=1/0,Gl=null,ci=null,jt=0,ui=null,Xa=null,Pr=0,yh=0,vh=null,iE=null,io=0,_h=null;function On(){return(rt&2)!==0&&We!==0?We&-We:V.T!==null?kh():_S()}function aE(){if(Nn===0)if((We&536870912)===0||Ye){var r=ur;ur<<=1,(ur&3932160)===0&&(ur=262144),Nn=r}else Nn=536870912;return r=Tn.current,r!==null&&(r.flags|=32),Nn}function mn(r,a,u){(r===ht&&(at===2||at===9)||r.cancelPendingCommit!==null)&&(Za(r,0),di(r,We,Nn,!1)),Cs(r,u),((rt&2)===0||r!==ht)&&(r===ht&&((rt&2)===0&&(Xi|=u),At===4&&di(r,We,Nn,!1)),mr(r))}function sE(r,a,u){if((rt&6)!==0)throw Error(i(327));var m=!u&&(a&127)===0&&(a&r.expiredLanes)===0||Kr(r,a),C=m?xM(r,a):Eh(r,a,!0),A=m;do{if(C===0){Ka&&!m&&di(r,a,0,!1);break}else{if(u=r.current.alternate,A&&!SM(u)){C=Eh(r,a,!1),A=!1;continue}if(C===2){if(A=a,r.errorRecoveryDisabledLanes&A)var B=0;else B=r.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){a=B;e:{var $=r;C=ro;var Q=$.current.memoizedState.isDehydrated;if(Q&&(Za($,B).flags|=256),B=Eh($,B,!1),B!==2){if(mh&&!Q){$.errorRecoveryDisabledLanes|=A,Xi|=A,C=4;break e}A=pn,pn=C,A!==null&&(pn===null?pn=A:pn.push.apply(pn,A))}C=B}if(A=!1,C!==2)continue}}if(C===1){Za(r,0),di(r,a,0,!0);break}e:{switch(m=r,A=C,A){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:di(m,a,Nn,!oi);break e;case 2:pn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(C=ql+300-ke(),10<C)){if(di(m,a,Nn,!oi),Ii(m,0,!0)!==0)break e;Pr=a,m.timeoutHandle=FE(oE.bind(null,m,u,pn,Gl,bh,a,Nn,Xi,Ya,oi,A,"Throttled",-0,0),C);break e}oE(m,u,pn,Gl,bh,a,Nn,Xi,Ya,oi,A,null,-0,0)}}break}while(!0);mr(r)}function oE(r,a,u,m,C,A,B,$,Q,ie,he,pe,se,ce){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:wr},J1(a,A,pe);var we=(A&62914560)===A?ql-ke():(A&4194048)===A?rE-ke():0;if(we=a3(pe,we),we!==null){Pr=A,r.cancelPendingCommit=we(mE.bind(null,r,a,A,u,m,C,B,$,Q,he,pe,null,se,ce)),di(r,A,B,!ie);return}}mE(r,a,A,u,m,C,B,$,Q)}function SM(r){for(var a=r;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var C=u[m],A=C.getSnapshot;C=C.value;try{if(!Cn(A(),C))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;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 di(r,a,u,m){a&=~gh,a&=~Xi,r.suspendedLanes|=a,r.pingedLanes&=~a,m&&(r.warmLanes|=a),m=r.expirationTimes;for(var C=a;0<C;){var A=31-Ve(C),B=1<<A;m[A]=-1,C&=~B}u!==0&&bS(r,u,a)}function Vl(){return(rt&6)===0?(ao(0),!1):!0}function Sh(){if(qe!==null){if(at===0)var r=qe.return;else r=qe,Ar=Hi=null,Fd(r),Ha=null,Hs=0,r=qe;for(;r!==null;)j1(r.alternate,r),r=r.return;qe=null}}function Za(r,a){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,HM(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),Pr=0,Sh(),ht=r,qe=u=kr(r.current,null),We=a,at=0,Rn=null,oi=!1,Ka=Kr(r,a),mh=!1,Ya=Nn=gh=Xi=li=At=0,pn=ro=null,bh=!1,(a&8)!==0&&(a|=a&32);var m=r.entangledLanes;if(m!==0)for(r=r.entanglements,m&=a;0<m;){var C=31-Ve(m),A=1<<C;a|=r[C],m&=~A}return jr=a,fl(),u}function lE(r,a){je=null,V.H=Ys,a===Ua||a===Sl?(a=w0(),at=3):a===Cd?(a=w0(),at=4):at=a===Jd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Rn=a,qe===null&&(At=1,Ml(r,zn(a,r.current)))}function cE(){var r=Tn.current;return r===null?!0:(We&4194048)===We?Vn===null:(We&62914560)===We||(We&536870912)!==0?r===Vn:!1}function uE(){var r=V.H;return V.H=Ys,r===null?Ys:r}function dE(){var r=V.A;return V.A=vM,r}function Wl(){At=4,oi||(We&4194048)!==We&&Tn.current!==null||(Ka=!0),(li&134217727)===0&&(Xi&134217727)===0||ht===null||di(ht,We,Nn,!1)}function Eh(r,a,u){var m=rt;rt|=2;var C=uE(),A=dE();(ht!==r||We!==a)&&(Gl=null,Za(r,a)),a=!1;var B=At;e:do try{if(at!==0&&qe!==null){var $=qe,Q=Rn;switch(at){case 8:Sh(),B=6;break e;case 3:case 2:case 9:case 6:Tn.current===null&&(a=!0);var ie=at;if(at=0,Rn=null,Qa(r,$,Q,ie),u&&Ka){B=0;break e}break;default:ie=at,at=0,Rn=null,Qa(r,$,Q,ie)}}EM(),B=At;break}catch(he){lE(r,he)}while(!0);return a&&r.shellSuspendCounter++,Ar=Hi=null,rt=m,V.H=C,V.A=A,qe===null&&(ht=null,We=0,fl()),B}function EM(){for(;qe!==null;)hE(qe)}function xM(r,a){var u=rt;rt|=2;var m=uE(),C=dE();ht!==r||We!==a?(Gl=null,$l=ke()+500,Za(r,a)):Ka=Kr(r,a);e:do try{if(at!==0&&qe!==null){a=qe;var A=Rn;t:switch(at){case 1:at=0,Rn=null,Qa(r,a,A,1);break;case 2:case 9:if(E0(A)){at=0,Rn=null,fE(a);break}a=function(){at!==2&&at!==9||ht!==r||(at=7),mr(r)},A.then(a,a);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:E0(A)?(at=0,Rn=null,fE(a)):(at=0,Rn=null,Qa(r,a,A,7));break;case 5:var B=null;switch(qe.tag){case 26:B=qe.memoizedState;case 5:case 27:var $=qe;if(B?QE(B):$.stateNode.complete){at=0,Rn=null;var Q=$.sibling;if(Q!==null)qe=Q;else{var ie=$.return;ie!==null?(qe=ie,Kl(ie)):qe=null}break t}}at=0,Rn=null,Qa(r,a,A,5);break;case 6:at=0,Rn=null,Qa(r,a,A,6);break;case 8:Sh(),At=6;break e;default:throw Error(i(462))}}wM();break}catch(he){lE(r,he)}while(!0);return Ar=Hi=null,V.H=m,V.A=C,rt=u,qe!==null?0:(ht=null,We=0,fl(),At)}function wM(){for(;qe!==null&&!Xe();)hE(qe)}function hE(r){var a=B1(r.alternate,r,jr);r.memoizedProps=r.pendingProps,a===null?Kl(r):qe=a}function fE(r){var a=r,u=a.alternate;switch(a.tag){case 15:case 0:a=N1(u,a,a.pendingProps,a.type,void 0,We);break;case 11:a=N1(u,a,a.pendingProps,a.type.render,a.ref,We);break;case 5:Fd(a);default:j1(u,a),a=qe=d0(a,jr),a=B1(u,a,jr)}r.memoizedProps=r.pendingProps,a===null?Kl(r):qe=a}function Qa(r,a,u,m){Ar=Hi=null,Fd(a),Ha=null,Hs=0;var C=a.return;try{if(hM(r,C,a,u,We)){At=1,Ml(r,zn(u,r.current)),qe=null;return}}catch(A){if(C!==null)throw qe=C,A;At=1,Ml(r,zn(u,r.current)),qe=null;return}a.flags&32768?(Ye||m===1?r=!0:Ka||(We&536870912)!==0?r=!1:(oi=r=!0,(m===2||m===9||m===3||m===6)&&(m=Tn.current,m!==null&&m.tag===13&&(m.flags|=16384))),pE(a,r)):Kl(a)}function Kl(r){var a=r;do{if((a.flags&32768)!==0){pE(a,oi);return}r=a.return;var u=mM(a.alternate,a,jr);if(u!==null){qe=u;return}if(a=a.sibling,a!==null){qe=a;return}qe=a=r}while(a!==null);At===0&&(At=5)}function pE(r,a){do{var u=gM(r.alternate,r);if(u!==null){u.flags&=32767,qe=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(r=r.sibling,r!==null)){qe=r;return}qe=r=u}while(r!==null);At=6,qe=null}function mE(r,a,u,m,C,A,B,$,Q){r.cancelPendingCommit=null;do Yl();while(jt!==0);if((rt&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(A=a.lanes|a.childLanes,A|=ud,rD(r,u,A,B,$,Q),r===ht&&(qe=ht=null,We=0),Xa=a,ui=r,Pr=u,yh=A,vh=C,iE=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,AM(_e,function(){return _E(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=V.T,V.T=null,C=X.p,X.p=2,B=rt,rt|=4;try{bM(r,a,u)}finally{rt=B,X.p=C,V.T=m}}jt=1,gE(),bE(),yE()}}function gE(){if(jt===1){jt=0;var r=ui,a=Xa,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=V.T,V.T=null;var m=X.p;X.p=2;var C=rt;rt|=4;try{X1(a,r);var A=Dh,B=n0(r.containerInfo),$=A.focusedElem,Q=A.selectionRange;if(B!==$&&$&&$.ownerDocument&&t0($.ownerDocument.documentElement,$)){if(Q!==null&&ad($)){var ie=Q.start,he=Q.end;if(he===void 0&&(he=ie),"selectionStart"in $)$.selectionStart=ie,$.selectionEnd=Math.min(he,$.value.length);else{var pe=$.ownerDocument||document,se=pe&&pe.defaultView||window;if(se.getSelection){var ce=se.getSelection(),we=$.textContent.length,Oe=Math.min(Q.start,we),ut=Q.end===void 0?Oe:Math.min(Q.end,we);!ce.extend&&Oe>ut&&(B=ut,ut=Oe,Oe=B);var te=e0($,Oe),J=e0($,ut);if(te&&J&&(ce.rangeCount!==1||ce.anchorNode!==te.node||ce.anchorOffset!==te.offset||ce.focusNode!==J.node||ce.focusOffset!==J.offset)){var re=pe.createRange();re.setStart(te.node,te.offset),ce.removeAllRanges(),Oe>ut?(ce.addRange(re),ce.extend(J.node,J.offset)):(re.setEnd(J.node,J.offset),ce.addRange(re))}}}}for(pe=[],ce=$;ce=ce.parentNode;)ce.nodeType===1&&pe.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof $.focus=="function"&&$.focus(),$=0;$<pe.length;$++){var fe=pe[$];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}oc=!!Ih,Dh=Ih=null}finally{rt=C,X.p=m,V.T=u}}r.current=a,jt=2}}function bE(){if(jt===2){jt=0;var r=ui,a=Xa,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=V.T,V.T=null;var m=X.p;X.p=2;var C=rt;rt|=4;try{G1(r,a.alternate,a)}finally{rt=C,X.p=m,V.T=u}}jt=3}}function yE(){if(jt===4||jt===3){jt=0,mt();var r=ui,a=Xa,u=Pr,m=iE;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?jt=5:(jt=0,Xa=ui=null,vE(r,r.pendingLanes));var C=r.pendingLanes;if(C===0&&(ci=null),Uu(u),a=a.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(yt,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=V.T,C=X.p,X.p=2,V.T=null;try{for(var A=r.onRecoverableError,B=0;B<m.length;B++){var $=m[B];A($.value,{componentStack:$.stack})}}finally{V.T=a,X.p=C}}(Pr&3)!==0&&Yl(),mr(r),C=r.pendingLanes,(u&261930)!==0&&(C&42)!==0?r===_h?io++:(io=0,_h=r):io=0,ao(0)}}function vE(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Ps(a)))}function Yl(){return gE(),bE(),yE(),_E()}function _E(){if(jt!==5)return!1;var r=ui,a=yh;yh=0;var u=Uu(Pr),m=V.T,C=X.p;try{X.p=32>u?32:u,V.T=null,u=vh,vh=null;var A=ui,B=Pr;if(jt=0,Xa=ui=null,Pr=0,(rt&6)!==0)throw Error(i(331));var $=rt;if(rt|=4,tE(A.current),Q1(A,A.current,B,u),rt=$,ao(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(yt,A)}catch{}return!0}finally{X.p=C,V.T=m,vE(r,a)}}function SE(r,a,u){a=zn(u,a),a=Qd(r.stateNode,a,2),r=ri(r,a,2),r!==null&&(Cs(r,2),mr(r))}function st(r,a,u){if(r.tag===3)SE(r,r,u);else for(;a!==null;){if(a.tag===3){SE(a,r,u);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ci===null||!ci.has(m))){r=zn(u,r),u=E1(2),m=ri(a,u,2),m!==null&&(x1(u,m,a,r),Cs(m,2),mr(m));break}}a=a.return}}function xh(r,a,u){var m=r.pingCache;if(m===null){m=r.pingCache=new _M;var C=new Set;m.set(a,C)}else C=m.get(a),C===void 0&&(C=new Set,m.set(a,C));C.has(u)||(mh=!0,C.add(u),r=CM.bind(null,r,a,u),a.then(r,r))}function CM(r,a,u){var m=r.pingCache;m!==null&&m.delete(a),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,ht===r&&(We&u)===u&&(At===4||At===3&&(We&62914560)===We&&300>ke()-ql?(rt&2)===0&&Za(r,0):gh|=u,Ya===We&&(Ya=0)),mr(r)}function EE(r,a){a===0&&(a=gS()),r=ji(r,a),r!==null&&(Cs(r,a),mr(r))}function kM(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),EE(r,u)}function TM(r,a){var u=0;switch(r.tag){case 31:case 13:var m=r.stateNode,C=r.memoizedState;C!==null&&(u=C.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),EE(r,u)}function AM(r,a){return Je(r,a)}var Xl=null,Ja=null,wh=!1,Zl=!1,Ch=!1,hi=0;function mr(r){r!==Ja&&r.next===null&&(Ja===null?Xl=Ja=r:Ja=Ja.next=r),Zl=!0,wh||(wh=!0,NM())}function ao(r,a){if(!Ch&&Zl){Ch=!0;do for(var u=!1,m=Xl;m!==null;){if(r!==0){var C=m.pendingLanes;if(C===0)var A=0;else{var B=m.suspendedLanes,$=m.pingedLanes;A=(1<<31-Ve(42|r)+1)-1,A&=C&~(B&~$),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(u=!0,kE(m,A))}else A=We,A=Ii(m,m===ht?A:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(A&3)===0||Kr(m,A)||(u=!0,kE(m,A));m=m.next}while(u);Ch=!1}}function RM(){xE()}function xE(){Zl=wh=!1;var r=0;hi!==0&&UM()&&(r=hi);for(var a=ke(),u=null,m=Xl;m!==null;){var C=m.next,A=wE(m,a);A===0?(m.next=null,u===null?Xl=C:u.next=C,C===null&&(Ja=u)):(u=m,(r!==0||(A&3)!==0)&&(Zl=!0)),m=C}jt!==0&&jt!==5||ao(r),hi!==0&&(hi=0)}function wE(r,a){for(var u=r.suspendedLanes,m=r.pingedLanes,C=r.expirationTimes,A=r.pendingLanes&-62914561;0<A;){var B=31-Ve(A),$=1<<B,Q=C[B];Q===-1?(($&u)===0||($&m)!==0)&&(C[B]=ws($,a)):Q<=a&&(r.expiredLanes|=$),A&=~$}if(a=ht,u=We,u=Ii(r,r===a?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,u===0||r===a&&(at===2||at===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&ot(m),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||Kr(r,u)){if(a=u&-u,a===r.callbackPriority)return a;switch(m!==null&&ot(m),Uu(u)){case 2:case 8:u=me;break;case 32:u=_e;break;case 268435456:u=Me;break;default:u=_e}return m=CE.bind(null,r),u=Je(u,m),r.callbackPriority=a,r.callbackNode=u,a}return m!==null&&m!==null&&ot(m),r.callbackPriority=2,r.callbackNode=null,2}function CE(r,a){if(jt!==0&&jt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(Yl()&&r.callbackNode!==u)return null;var m=We;return m=Ii(r,r===ht?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(sE(r,m,a),wE(r,ke()),r.callbackNode!=null&&r.callbackNode===u?CE.bind(null,r):null)}function kE(r,a){if(Yl())return null;sE(r,a,!0)}function NM(){zM(function(){(rt&6)!==0?Je(oe,RM):xE()})}function kh(){if(hi===0){var r=ja;r===0&&(r=xt,xt<<=1,(xt&261888)===0&&(xt=256)),hi=r}return hi}function TE(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:al(""+r)}function AE(r,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,r.id&&u.setAttribute("form",r.id),a.parentNode.insertBefore(u,a),r=new FormData(r),u.parentNode.removeChild(u),r}function OM(r,a,u,m,C){if(a==="submit"&&u&&u.stateNode===C){var A=TE((C[cn]||null).action),B=m.submitter;B&&(a=(a=B[cn]||null)?TE(a.formAction):B.getAttribute("formAction"),a!==null&&(A=a,B=null));var $=new cl("action","action",null,m,C);r.push({event:$,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(hi!==0){var Q=B?AE(C,B):new FormData(C);Vd(u,{pending:!0,data:Q,method:C.method,action:A},null,Q)}}else typeof A=="function"&&($.preventDefault(),Q=B?AE(C,B):new FormData(C),Vd(u,{pending:!0,data:Q,method:C.method,action:A},A,Q))},currentTarget:C}]})}}for(var Th=0;Th<cd.length;Th++){var Ah=cd[Th],LM=Ah.toLowerCase(),IM=Ah[0].toUpperCase()+Ah.slice(1);rr(LM,"on"+IM)}rr(a0,"onAnimationEnd"),rr(s0,"onAnimationIteration"),rr(o0,"onAnimationStart"),rr("dblclick","onDoubleClick"),rr("focusin","onFocus"),rr("focusout","onBlur"),rr(YD,"onTransitionRun"),rr(XD,"onTransitionStart"),rr(ZD,"onTransitionCancel"),rr(l0,"onTransitionEnd"),wa("onMouseEnter",["mouseout","mouseover"]),wa("onMouseLeave",["mouseout","mouseover"]),wa("onPointerEnter",["pointerout","pointerover"]),wa("onPointerLeave",["pointerout","pointerover"]),Di("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Di("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Di("onBeforeInput",["compositionend","keypress","textInput","paste"]),Di("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Di("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Di("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var so="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(" "),DM=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(so));function RE(r,a){a=(a&4)!==0;for(var u=0;u<r.length;u++){var m=r[u],C=m.event;m=m.listeners;e:{var A=void 0;if(a)for(var B=m.length-1;0<=B;B--){var $=m[B],Q=$.instance,ie=$.currentTarget;if($=$.listener,Q!==A&&C.isPropagationStopped())break e;A=$,C.currentTarget=ie;try{A(C)}catch(he){hl(he)}C.currentTarget=null,A=Q}else for(B=0;B<m.length;B++){if($=m[B],Q=$.instance,ie=$.currentTarget,$=$.listener,Q!==A&&C.isPropagationStopped())break e;A=$,C.currentTarget=ie;try{A(C)}catch(he){hl(he)}C.currentTarget=null,A=Q}}}}function $e(r,a){var u=a[Hu];u===void 0&&(u=a[Hu]=new Set);var m=r+"__bubble";u.has(m)||(NE(a,r,2,!1),u.add(m))}function Rh(r,a,u){var m=0;a&&(m|=4),NE(u,r,m,a)}var Ql="_reactListening"+Math.random().toString(36).slice(2);function Nh(r){if(!r[Ql]){r[Ql]=!0,xS.forEach(function(u){u!=="selectionchange"&&(DM.has(u)||Rh(u,!1,r),Rh(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Ql]||(a[Ql]=!0,Rh("selectionchange",!1,a))}}function NE(r,a,u,m){switch(ax(a)){case 2:var C=l3;break;case 8:C=c3;break;default:C=Gh}u=C.bind(null,a,u,r),C=void 0,!Xu||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(C=!0),m?C!==void 0?r.addEventListener(a,u,{capture:!0,passive:C}):r.addEventListener(a,u,!0):C!==void 0?r.addEventListener(a,u,{passive:C}):r.addEventListener(a,u,!1)}function Oh(r,a,u,m,C){var A=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var B=m.tag;if(B===3||B===4){var $=m.stateNode.containerInfo;if($===C)break;if(B===4)for(B=m.return;B!==null;){var Q=B.tag;if((Q===3||Q===4)&&B.stateNode.containerInfo===C)return;B=B.return}for(;$!==null;){if(B=Sa($),B===null)return;if(Q=B.tag,Q===5||Q===6||Q===26||Q===27){m=A=B;continue e}$=$.parentNode}}m=m.return}MS(function(){var ie=A,he=Ku(u),pe=[];e:{var se=c0.get(r);if(se!==void 0){var ce=cl,we=r;switch(r){case"keypress":if(ol(u)===0)break e;case"keydown":case"keyup":ce=TD;break;case"focusin":we="focus",ce=ed;break;case"focusout":we="blur",ce=ed;break;case"beforeblur":case"afterblur":ce=ed;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=jS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=mD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=ND;break;case a0:case s0:case o0:ce=yD;break;case l0:ce=LD;break;case"scroll":case"scrollend":ce=fD;break;case"wheel":ce=DD;break;case"copy":case"cut":case"paste":ce=_D;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=US;break;case"toggle":case"beforetoggle":ce=BD}var Oe=(a&4)!==0,ut=!Oe&&(r==="scroll"||r==="scrollend"),te=Oe?se!==null?se+"Capture":null:se;Oe=[];for(var J=ie,re;J!==null;){var fe=J;if(re=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||re===null||te===null||(fe=As(J,te),fe!=null&&Oe.push(oo(J,fe,re))),ut)break;J=J.return}0<Oe.length&&(se=new ce(se,we,null,u,he),pe.push({event:se,listeners:Oe}))}}if((a&7)===0){e:{if(se=r==="mouseover"||r==="pointerover",ce=r==="mouseout"||r==="pointerout",se&&u!==Wu&&(we=u.relatedTarget||u.fromElement)&&(Sa(we)||we[_a]))break e;if((ce||se)&&(se=he.window===he?he:(se=he.ownerDocument)?se.defaultView||se.parentWindow:window,ce?(we=u.relatedTarget||u.toElement,ce=ie,we=we?Sa(we):null,we!==null&&(ut=l(we),Oe=we.tag,we!==ut||Oe!==5&&Oe!==27&&Oe!==6)&&(we=null)):(ce=null,we=ie),ce!==we)){if(Oe=jS,fe="onMouseLeave",te="onMouseEnter",J="mouse",(r==="pointerout"||r==="pointerover")&&(Oe=US,fe="onPointerLeave",te="onPointerEnter",J="pointer"),ut=ce==null?se:Ts(ce),re=we==null?se:Ts(we),se=new Oe(fe,J+"leave",ce,u,he),se.target=ut,se.relatedTarget=re,fe=null,Sa(he)===ie&&(Oe=new Oe(te,J+"enter",we,u,he),Oe.target=re,Oe.relatedTarget=ut,fe=Oe),ut=fe,ce&&we)t:{for(Oe=MM,te=ce,J=we,re=0,fe=te;fe;fe=Oe(fe))re++;fe=0;for(var Ae=J;Ae;Ae=Oe(Ae))fe++;for(;0<re-fe;)te=Oe(te),re--;for(;0<fe-re;)J=Oe(J),fe--;for(;re--;){if(te===J||J!==null&&te===J.alternate){Oe=te;break t}te=Oe(te),J=Oe(J)}Oe=null}else Oe=null;ce!==null&&OE(pe,se,ce,Oe,!1),we!==null&&ut!==null&&OE(pe,ut,we,Oe,!0)}}e:{if(se=ie?Ts(ie):window,ce=se.nodeName&&se.nodeName.toLowerCase(),ce==="select"||ce==="input"&&se.type==="file")var et=KS;else if(VS(se))if(YS)et=VD;else{et=$D;var Ce=qD}else ce=se.nodeName,!ce||ce.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?ie&&Vu(ie.elementType)&&(et=KS):et=GD;if(et&&(et=et(r,ie))){WS(pe,et,u,he);break e}Ce&&Ce(r,se,ie),r==="focusout"&&ie&&se.type==="number"&&ie.memoizedProps.value!=null&&Gu(se,"number",se.value)}switch(Ce=ie?Ts(ie):window,r){case"focusin":(VS(Ce)||Ce.contentEditable==="true")&&(Na=Ce,sd=ie,Bs=null);break;case"focusout":Bs=sd=Na=null;break;case"mousedown":od=!0;break;case"contextmenu":case"mouseup":case"dragend":od=!1,r0(pe,u,he);break;case"selectionchange":if(KD)break;case"keydown":case"keyup":r0(pe,u,he)}var He;if(nd)e:{switch(r){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Ra?$S(r,u)&&(Ke="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ke="onCompositionStart");Ke&&(HS&&u.locale!=="ko"&&(Ra||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Ra&&(He=BS()):(Xr=he,Zu="value"in Xr?Xr.value:Xr.textContent,Ra=!0)),Ce=Jl(ie,Ke),0<Ce.length&&(Ke=new PS(Ke,r,null,u,he),pe.push({event:Ke,listeners:Ce}),He?Ke.data=He:(He=GS(u),He!==null&&(Ke.data=He)))),(He=jD?PD(r,u):UD(r,u))&&(Ke=Jl(ie,"onBeforeInput"),0<Ke.length&&(Ce=new PS("onBeforeInput","beforeinput",null,u,he),pe.push({event:Ce,listeners:Ke}),Ce.data=He)),OM(pe,r,ie,u,he)}RE(pe,a)})}function oo(r,a,u){return{instance:r,listener:a,currentTarget:u}}function Jl(r,a){for(var u=a+"Capture",m=[];r!==null;){var C=r,A=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||A===null||(C=As(r,u),C!=null&&m.unshift(oo(r,C,A)),C=As(r,a),C!=null&&m.push(oo(r,C,A))),r.tag===3)return m;r=r.return}return[]}function MM(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function OE(r,a,u,m,C){for(var A=a._reactName,B=[];u!==null&&u!==m;){var $=u,Q=$.alternate,ie=$.stateNode;if($=$.tag,Q!==null&&Q===m)break;$!==5&&$!==26&&$!==27||ie===null||(Q=ie,C?(ie=As(u,A),ie!=null&&B.unshift(oo(u,ie,Q))):C||(ie=As(u,A),ie!=null&&B.push(oo(u,ie,Q)))),u=u.return}B.length!==0&&r.push({event:a,listeners:B})}var BM=/\r\n?/g,FM=/\u0000|\uFFFD/g;function LE(r){return(typeof r=="string"?r:""+r).replace(BM,`
9
- `).replace(FM,"")}function IE(r,a){return a=LE(a),LE(r)===a}function ct(r,a,u,m,C,A){switch(u){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||ka(r,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&ka(r,""+m);break;case"className":rl(r,"class",m);break;case"tabIndex":rl(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(r,u,m);break;case"style":IS(r,m,A);break;case"data":if(a!=="object"){rl(r,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||u!=="href")){r.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(u);break}m=al(""+m),r.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(u,"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 A=="function"&&(u==="formAction"?(a!=="input"&&ct(r,a,"name",C.name,C,null),ct(r,a,"formEncType",C.formEncType,C,null),ct(r,a,"formMethod",C.formMethod,C,null),ct(r,a,"formTarget",C.formTarget,C,null)):(ct(r,a,"encType",C.encType,C,null),ct(r,a,"method",C.method,C,null),ct(r,a,"target",C.target,C,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(u);break}m=al(""+m),r.setAttribute(u,m);break;case"onClick":m!=null&&(r.onclick=wr);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(u=m.__html,u!=null){if(C.children!=null)throw Error(i(60));r.innerHTML=u}}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}u=al(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);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(u,""+m):r.removeAttribute(u);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(u,""):r.removeAttribute(u);break;case"capture":case"download":m===!0?r.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(u,m):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(u,m):r.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(u):r.setAttribute(u,m);break;case"popover":$e("beforetoggle",r),$e("toggle",r),nl(r,"popover",m);break;case"xlinkActuate":xr(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":xr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":xr(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":xr(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":xr(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":xr(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":xr(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":xr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":xr(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":nl(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=dD.get(u)||u,nl(r,u,m))}}function Lh(r,a,u,m,C,A){switch(u){case"style":IS(r,m,A);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(u=m.__html,u!=null){if(C.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"children":typeof m=="string"?ka(r,m):(typeof m=="number"||typeof m=="bigint")&&ka(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=wr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wS.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(C=u.endsWith("Capture"),a=u.slice(2,C?u.length-7:void 0),A=r[cn]||null,A=A!=null?A[u]:null,typeof A=="function"&&r.removeEventListener(a,A,C),typeof m=="function")){typeof A!="function"&&A!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(a,m,C);break e}u in r?r[u]=m:m===!0?r.setAttribute(u,""):nl(r,u,m)}}}function Wt(r,a,u){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,C=!1,A;for(A in u)if(u.hasOwnProperty(A)){var B=u[A];if(B!=null)switch(A){case"src":m=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:ct(r,a,A,B,u,null)}}C&&ct(r,a,"srcSet",u.srcSet,u,null),m&&ct(r,a,"src",u.src,u,null);return;case"input":$e("invalid",r);var $=A=B=C=null,Q=null,ie=null;for(m in u)if(u.hasOwnProperty(m)){var he=u[m];if(he!=null)switch(m){case"name":C=he;break;case"type":B=he;break;case"checked":Q=he;break;case"defaultChecked":ie=he;break;case"value":A=he;break;case"defaultValue":$=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,a));break;default:ct(r,a,m,he,u,null)}}RS(r,A,$,Q,ie,B,C,!1);return;case"select":$e("invalid",r),m=B=A=null;for(C in u)if(u.hasOwnProperty(C)&&($=u[C],$!=null))switch(C){case"value":A=$;break;case"defaultValue":B=$;break;case"multiple":m=$;default:ct(r,a,C,$,u,null)}a=A,u=B,r.multiple=!!m,a!=null?Ca(r,!!m,a,!1):u!=null&&Ca(r,!!m,u,!0);return;case"textarea":$e("invalid",r),A=C=m=null;for(B in u)if(u.hasOwnProperty(B)&&($=u[B],$!=null))switch(B){case"value":m=$;break;case"defaultValue":C=$;break;case"children":A=$;break;case"dangerouslySetInnerHTML":if($!=null)throw Error(i(91));break;default:ct(r,a,B,$,u,null)}OS(r,m,C,A);return;case"option":for(Q in u)u.hasOwnProperty(Q)&&(m=u[Q],m!=null)&&(Q==="selected"?r.selected=m&&typeof m!="function"&&typeof m!="symbol":ct(r,a,Q,m,u,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<so.length;m++)$e(so[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(ie in u)if(u.hasOwnProperty(ie)&&(m=u[ie],m!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:ct(r,a,ie,m,u,null)}return;default:if(Vu(a)){for(he in u)u.hasOwnProperty(he)&&(m=u[he],m!==void 0&&Lh(r,a,he,m,u,void 0));return}}for($ in u)u.hasOwnProperty($)&&(m=u[$],m!=null&&ct(r,a,$,m,u,null))}function jM(r,a,u,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,A=null,B=null,$=null,Q=null,ie=null,he=null;for(ce in u){var pe=u[ce];if(u.hasOwnProperty(ce)&&pe!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":Q=pe;default:m.hasOwnProperty(ce)||ct(r,a,ce,null,m,pe)}}for(var se in m){var ce=m[se];if(pe=u[se],m.hasOwnProperty(se)&&(ce!=null||pe!=null))switch(se){case"type":A=ce;break;case"name":C=ce;break;case"checked":ie=ce;break;case"defaultChecked":he=ce;break;case"value":B=ce;break;case"defaultValue":$=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:ce!==pe&&ct(r,a,se,ce,m,pe)}}$u(r,B,$,Q,ie,he,A,C);return;case"select":ce=B=$=se=null;for(A in u)if(Q=u[A],u.hasOwnProperty(A)&&Q!=null)switch(A){case"value":break;case"multiple":ce=Q;default:m.hasOwnProperty(A)||ct(r,a,A,null,m,Q)}for(C in m)if(A=m[C],Q=u[C],m.hasOwnProperty(C)&&(A!=null||Q!=null))switch(C){case"value":se=A;break;case"defaultValue":$=A;break;case"multiple":B=A;default:A!==Q&&ct(r,a,C,A,m,Q)}a=$,u=B,m=ce,se!=null?Ca(r,!!u,se,!1):!!m!=!!u&&(a!=null?Ca(r,!!u,a,!0):Ca(r,!!u,u?[]:"",!1));return;case"textarea":ce=se=null;for($ in u)if(C=u[$],u.hasOwnProperty($)&&C!=null&&!m.hasOwnProperty($))switch($){case"value":break;case"children":break;default:ct(r,a,$,null,m,C)}for(B in m)if(C=m[B],A=u[B],m.hasOwnProperty(B)&&(C!=null||A!=null))switch(B){case"value":se=C;break;case"defaultValue":ce=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(i(91));break;default:C!==A&&ct(r,a,B,C,m,A)}NS(r,se,ce);return;case"option":for(var we in u)se=u[we],u.hasOwnProperty(we)&&se!=null&&!m.hasOwnProperty(we)&&(we==="selected"?r.selected=!1:ct(r,a,we,null,m,se));for(Q in m)se=m[Q],ce=u[Q],m.hasOwnProperty(Q)&&se!==ce&&(se!=null||ce!=null)&&(Q==="selected"?r.selected=se&&typeof se!="function"&&typeof se!="symbol":ct(r,a,Q,se,m,ce));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 Oe in u)se=u[Oe],u.hasOwnProperty(Oe)&&se!=null&&!m.hasOwnProperty(Oe)&&ct(r,a,Oe,null,m,se);for(ie in m)if(se=m[ie],ce=u[ie],m.hasOwnProperty(ie)&&se!==ce&&(se!=null||ce!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(i(137,a));break;default:ct(r,a,ie,se,m,ce)}return;default:if(Vu(a)){for(var ut in u)se=u[ut],u.hasOwnProperty(ut)&&se!==void 0&&!m.hasOwnProperty(ut)&&Lh(r,a,ut,void 0,m,se);for(he in m)se=m[he],ce=u[he],!m.hasOwnProperty(he)||se===ce||se===void 0&&ce===void 0||Lh(r,a,he,se,m,ce);return}}for(var te in u)se=u[te],u.hasOwnProperty(te)&&se!=null&&!m.hasOwnProperty(te)&&ct(r,a,te,null,m,se);for(pe in m)se=m[pe],ce=u[pe],!m.hasOwnProperty(pe)||se===ce||se==null&&ce==null||ct(r,a,pe,se,m,ce)}function DE(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PM(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var C=u[m],A=C.transferSize,B=C.initiatorType,$=C.duration;if(A&&$&&DE(B)){for(B=0,$=C.responseEnd,m+=1;m<u.length;m++){var Q=u[m],ie=Q.startTime;if(ie>$)break;var he=Q.transferSize,pe=Q.initiatorType;he&&DE(pe)&&(Q=Q.responseEnd,B+=he*(Q<$?1:($-ie)/(Q-ie)))}if(--m,a+=8*(A+B)/(C.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 Ih=null,Dh=null;function ec(r){return r.nodeType===9?r:r.ownerDocument}function ME(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 BE(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 Mh(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 Bh=null;function UM(){var r=window.event;return r&&r.type==="popstate"?r===Bh?!1:(Bh=r,!0):(Bh=null,!1)}var FE=typeof setTimeout=="function"?setTimeout:void 0,HM=typeof clearTimeout=="function"?clearTimeout:void 0,jE=typeof Promise=="function"?Promise:void 0,zM=typeof queueMicrotask=="function"?queueMicrotask:typeof jE<"u"?function(r){return jE.resolve(null).then(r).catch(qM)}:FE;function qM(r){setTimeout(function(){throw r})}function fi(r){return r==="head"}function PE(r,a){var u=a,m=0;do{var C=u.nextSibling;if(r.removeChild(u),C&&C.nodeType===8)if(u=C.data,u==="/$"||u==="/&"){if(m===0){r.removeChild(C),rs(a);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")lo(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,lo(u);for(var A=u.firstChild;A;){var B=A.nextSibling,$=A.nodeName;A[ks]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&A.rel.toLowerCase()==="stylesheet"||u.removeChild(A),A=B}}else u==="body"&&lo(r.ownerDocument.body);u=C}while(u);rs(a)}function UE(r,a){var u=r;r=0;do{var m=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=m}while(u)}function Fh(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Fh(u),zu(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function $M(r,a,u,m){for(;r.nodeType===1;){var C=u;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[ks])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(A=r.getAttribute("rel"),A==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(A!==C.rel||r.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||r.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||r.getAttribute("title")!==(C.title==null?null:C.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(A=r.getAttribute("src"),(A!==(C.src==null?null:C.src)||r.getAttribute("type")!==(C.type==null?null:C.type)||r.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&A&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var A=C.name==null?null:""+C.name;if(C.type==="hidden"&&r.getAttribute("name")===A)return r}else return r;if(r=Wn(r.nextSibling),r===null)break}return null}function GM(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=Wn(r.nextSibling),r===null))return null;return r}function HE(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Wn(r.nextSibling),r===null))return null;return r}function jh(r){return r.data==="$?"||r.data==="$~"}function Ph(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function VM(r,a){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||u.readyState!=="loading")a();else{var m=function(){a(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function Wn(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 Uh=null;function zE(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(a===0)return Wn(r.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}r=r.nextSibling}return null}function qE(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return r;a--}else u!=="/$"&&u!=="/&"||a++}r=r.previousSibling}return null}function $E(r,a,u){switch(a=ec(u),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 lo(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);zu(r)}var Kn=new Map,GE=new Set;function tc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ur=X.d;X.d={f:WM,r:KM,D:YM,C:XM,L:ZM,m:QM,X:e3,S:JM,M:t3};function WM(){var r=Ur.f(),a=Vl();return r||a}function KM(r){var a=Ea(r);a!==null&&a.tag===5&&a.type==="form"?l1(a):Ur.r(r)}var es=typeof document>"u"?null:document;function VE(r,a,u){var m=es;if(m&&typeof a=="string"&&a){var C=Un(a);C='link[rel="'+r+'"][href="'+C+'"]',typeof u=="string"&&(C+='[crossorigin="'+u+'"]'),GE.has(C)||(GE.add(C),r={rel:r,crossOrigin:u,href:a},m.querySelector(C)===null&&(a=m.createElement("link"),Wt(a,"link",r),Ht(a),m.head.appendChild(a)))}}function YM(r){Ur.D(r),VE("dns-prefetch",r,null)}function XM(r,a){Ur.C(r,a),VE("preconnect",r,a)}function ZM(r,a,u){Ur.L(r,a,u);var m=es;if(m&&r&&a){var C='link[rel="preload"][as="'+Un(a)+'"]';a==="image"&&u&&u.imageSrcSet?(C+='[imagesrcset="'+Un(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(C+='[imagesizes="'+Un(u.imageSizes)+'"]')):C+='[href="'+Un(r)+'"]';var A=C;switch(a){case"style":A=ts(r);break;case"script":A=ns(r)}Kn.has(A)||(r=f({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),Kn.set(A,r),m.querySelector(C)!==null||a==="style"&&m.querySelector(co(A))||a==="script"&&m.querySelector(uo(A))||(a=m.createElement("link"),Wt(a,"link",r),Ht(a),m.head.appendChild(a)))}}function QM(r,a){Ur.m(r,a);var u=es;if(u&&r){var m=a&&typeof a.as=="string"?a.as:"script",C='link[rel="modulepreload"][as="'+Un(m)+'"][href="'+Un(r)+'"]',A=C;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=ns(r)}if(!Kn.has(A)&&(r=f({rel:"modulepreload",href:r},a),Kn.set(A,r),u.querySelector(C)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(uo(A)))return}m=u.createElement("link"),Wt(m,"link",r),Ht(m),u.head.appendChild(m)}}}function JM(r,a,u){Ur.S(r,a,u);var m=es;if(m&&r){var C=xa(m).hoistableStyles,A=ts(r);a=a||"default";var B=C.get(A);if(!B){var $={loading:0,preload:null};if(B=m.querySelector(co(A)))$.loading=5;else{r=f({rel:"stylesheet",href:r,"data-precedence":a},u),(u=Kn.get(A))&&Hh(r,u);var Q=B=m.createElement("link");Ht(Q),Wt(Q,"link",r),Q._p=new Promise(function(ie,he){Q.onload=ie,Q.onerror=he}),Q.addEventListener("load",function(){$.loading|=1}),Q.addEventListener("error",function(){$.loading|=2}),$.loading|=4,nc(B,a,m)}B={type:"stylesheet",instance:B,count:1,state:$},C.set(A,B)}}}function e3(r,a){Ur.X(r,a);var u=es;if(u&&r){var m=xa(u).hoistableScripts,C=ns(r),A=m.get(C);A||(A=u.querySelector(uo(C)),A||(r=f({src:r,async:!0},a),(a=Kn.get(C))&&zh(r,a),A=u.createElement("script"),Ht(A),Wt(A,"link",r),u.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(C,A))}}function t3(r,a){Ur.M(r,a);var u=es;if(u&&r){var m=xa(u).hoistableScripts,C=ns(r),A=m.get(C);A||(A=u.querySelector(uo(C)),A||(r=f({src:r,async:!0,type:"module"},a),(a=Kn.get(C))&&zh(r,a),A=u.createElement("script"),Ht(A),Wt(A,"link",r),u.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(C,A))}}function WE(r,a,u,m){var C=(C=de.current)?tc(C):null;if(!C)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=ts(u.href),u=xa(C).hoistableStyles,m=u.get(a),m||(m={type:"style",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=ts(u.href);var A=xa(C).hoistableStyles,B=A.get(r);if(B||(C=C.ownerDocument||C,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(r,B),(A=C.querySelector(co(r)))&&!A._p&&(B.instance=A,B.state.loading=5),Kn.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Kn.set(r,u),A||n3(C,r,u,B.state))),a&&m===null)throw Error(i(528,""));return B}if(a&&m!==null)throw Error(i(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=ns(u),u=xa(C).hoistableScripts,m=u.get(a),m||(m={type:"script",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function ts(r){return'href="'+Un(r)+'"'}function co(r){return'link[rel="stylesheet"]['+r+"]"}function KE(r){return f({},r,{"data-precedence":r.precedence,precedence:null})}function n3(r,a,u,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}),Wt(a,"link",u),Ht(a),r.head.appendChild(a))}function ns(r){return'[src="'+Un(r)+'"]'}function uo(r){return"script[async]"+r}function YE(r,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var m=r.querySelector('style[data-href~="'+Un(u.href)+'"]');if(m)return a.instance=m,Ht(m),m;var C=f({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Ht(m),Wt(m,"style",C),nc(m,u.precedence,r),a.instance=m;case"stylesheet":C=ts(u.href);var A=r.querySelector(co(C));if(A)return a.state.loading|=4,a.instance=A,Ht(A),A;m=KE(u),(C=Kn.get(C))&&Hh(m,C),A=(r.ownerDocument||r).createElement("link"),Ht(A);var B=A;return B._p=new Promise(function($,Q){B.onload=$,B.onerror=Q}),Wt(A,"link",m),a.state.loading|=4,nc(A,u.precedence,r),a.instance=A;case"script":return A=ns(u.src),(C=r.querySelector(uo(A)))?(a.instance=C,Ht(C),C):(m=u,(C=Kn.get(A))&&(m=f({},u),zh(m,C)),r=r.ownerDocument||r,C=r.createElement("script"),Ht(C),Wt(C,"link",m),r.head.appendChild(C),a.instance=C);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,nc(m,u.precedence,r));return a.instance}function nc(r,a,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=m.length?m[m.length-1]:null,A=C,B=0;B<m.length;B++){var $=m[B];if($.dataset.precedence===a)A=$;else if(A!==C)break}A?A.parentNode.insertBefore(r,A.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(r,a.firstChild))}function Hh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function zh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var rc=null;function XE(r,a,u){if(rc===null){var m=new Map,C=rc=new Map;C.set(u,m)}else C=rc,m=C.get(u),m||(m=new Map,C.set(u,m));if(m.has(r))return m;for(m.set(r,null),u=u.getElementsByTagName(r),C=0;C<u.length;C++){var A=u[C];if(!(A[ks]||A[qt]||r==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var B=A.getAttribute(a)||"";B=r+B;var $=m.get(B);$?$.push(A):m.set(B,[A])}}return m}function ZE(r,a,u){r=r.ownerDocument||r,r.head.insertBefore(u,a==="title"?r.querySelector("head > title"):null)}function r3(r,a,u){if(u===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;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!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 QE(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function i3(r,a,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var C=ts(m.href),A=a.querySelector(co(C));if(A){a=A._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=ic.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=A,Ht(A);return}A=a.ownerDocument||a,m=KE(m),(C=Kn.get(C))&&Hh(m,C),A=A.createElement("link"),Ht(A);var B=A;B._p=new Promise(function($,Q){B.onload=$,B.onerror=Q}),Wt(A,"link",m),u.instance=A}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=ic.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var qh=0;function a3(r,a){return r.stylesheets&&r.count===0&&sc(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var m=setTimeout(function(){if(r.stylesheets&&sc(r,r.stylesheets),r.unsuspend){var A=r.unsuspend;r.unsuspend=null,A()}},6e4+a);0<r.imgBytes&&qh===0&&(qh=62500*PM());var C=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&sc(r,r.stylesheets),r.unsuspend)){var A=r.unsuspend;r.unsuspend=null,A()}},(r.imgBytes>qh?50:800)+a);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(C)}}:null}function ic(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var ac=null;function sc(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,ac=new Map,a.forEach(s3,r),ac=null,ic.call(r))}function s3(r,a){if(!(a.state.loading&4)){var u=ac.get(r);if(u)var m=u.get(null);else{u=new Map,ac.set(r,u);for(var C=r.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<C.length;A++){var B=C[A];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(u.set(B.dataset.precedence,B),m=B)}m&&u.set(null,m)}C=a.instance,B=C.getAttribute("data-precedence"),A=u.get(B)||m,A===m&&u.set(null,C),u.set(B,C),this.count++,m=ic.bind(this),C.addEventListener("load",m),C.addEventListener("error",m),A?A.parentNode.insertBefore(C,A.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(C,r.firstChild)),a.state.loading|=4}}var ho={$$typeof:S,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function o3(r,a,u,m,C,A,B,$,Q){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=ju(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ju(0),this.hiddenUpdates=ju(null),this.identifierPrefix=m,this.onUncaughtError=C,this.onCaughtError=A,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function JE(r,a,u,m,C,A,B,$,Q,ie,he,pe){return r=new o3(r,a,u,B,Q,ie,he,pe,$),a=1,A===!0&&(a|=24),A=kn(3,null,null,a),r.current=A,A.stateNode=r,a=Ed(),a.refCount++,r.pooledCache=a,a.refCount++,A.memoizedState={element:m,isDehydrated:u,cache:a},kd(A),r}function ex(r){return r?(r=Ia,r):Ia}function tx(r,a,u,m,C,A){C=ex(C),m.context===null?m.context=C:m.pendingContext=C,m=ni(a),m.payload={element:u},A=A===void 0?null:A,A!==null&&(m.callback=A),u=ri(r,m,a),u!==null&&(mn(u,r,a),qs(u,r,a))}function nx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function $h(r,a){nx(r,a),(r=r.alternate)&&nx(r,a)}function rx(r){if(r.tag===13||r.tag===31){var a=ji(r,67108864);a!==null&&mn(a,r,67108864),$h(r,67108864)}}function ix(r){if(r.tag===13||r.tag===31){var a=On();a=Pu(a);var u=ji(r,a);u!==null&&mn(u,r,a),$h(r,a)}}var oc=!0;function l3(r,a,u,m){var C=V.T;V.T=null;var A=X.p;try{X.p=2,Gh(r,a,u,m)}finally{X.p=A,V.T=C}}function c3(r,a,u,m){var C=V.T;V.T=null;var A=X.p;try{X.p=8,Gh(r,a,u,m)}finally{X.p=A,V.T=C}}function Gh(r,a,u,m){if(oc){var C=Vh(m);if(C===null)Oh(r,a,m,lc,u),sx(r,m);else if(d3(C,r,a,u,m))m.stopPropagation();else if(sx(r,m),a&4&&-1<u3.indexOf(r)){for(;C!==null;){var A=Ea(C);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var B=dr(A.pendingLanes);if(B!==0){var $=A;for($.pendingLanes|=2,$.entangledLanes|=2;B;){var Q=1<<31-Ve(B);$.entanglements[1]|=Q,B&=~Q}mr(A),(rt&6)===0&&($l=ke()+500,ao(0))}}break;case 31:case 13:$=ji(A,2),$!==null&&mn($,A,2),Vl(),$h(A,2)}if(A=Vh(m),A===null&&Oh(r,a,m,lc,u),A===C)break;C=A}C!==null&&m.stopPropagation()}else Oh(r,a,m,null,u)}}function Vh(r){return r=Ku(r),Wh(r)}var lc=null;function Wh(r){if(lc=null,r=Sa(r),r!==null){var a=l(r);if(a===null)r=null;else{var u=a.tag;if(u===13){if(r=c(a),r!==null)return r;r=null}else if(u===31){if(r=o(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return lc=r,null}function ax(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(Le()){case oe:return 2;case me:return 8;case _e:case Te:return 32;case Me:return 268435456;default:return 32}default:return 32}}var Kh=!1,pi=null,mi=null,gi=null,fo=new Map,po=new Map,bi=[],u3="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":pi=null;break;case"dragenter":case"dragleave":mi=null;break;case"mouseover":case"mouseout":gi=null;break;case"pointerover":case"pointerout":fo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":po.delete(a.pointerId)}}function mo(r,a,u,m,C,A){return r===null||r.nativeEvent!==A?(r={blockedOn:a,domEventName:u,eventSystemFlags:m,nativeEvent:A,targetContainers:[C]},a!==null&&(a=Ea(a),a!==null&&rx(a)),r):(r.eventSystemFlags|=m,a=r.targetContainers,C!==null&&a.indexOf(C)===-1&&a.push(C),r)}function d3(r,a,u,m,C){switch(a){case"focusin":return pi=mo(pi,r,a,u,m,C),!0;case"dragenter":return mi=mo(mi,r,a,u,m,C),!0;case"mouseover":return gi=mo(gi,r,a,u,m,C),!0;case"pointerover":var A=C.pointerId;return fo.set(A,mo(fo.get(A)||null,r,a,u,m,C)),!0;case"gotpointercapture":return A=C.pointerId,po.set(A,mo(po.get(A)||null,r,a,u,m,C)),!0}return!1}function ox(r){var a=Sa(r.target);if(a!==null){var u=l(a);if(u!==null){if(a=u.tag,a===13){if(a=c(u),a!==null){r.blockedOn=a,SS(r.priority,function(){ix(u)});return}}else if(a===31){if(a=o(u),a!==null){r.blockedOn=a,SS(r.priority,function(){ix(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function cc(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=Vh(r.nativeEvent);if(u===null){u=r.nativeEvent;var m=new u.constructor(u.type,u);Wu=m,u.target.dispatchEvent(m),Wu=null}else return a=Ea(u),a!==null&&rx(a),r.blockedOn=u,!1;a.shift()}return!0}function lx(r,a,u){cc(r)&&u.delete(a)}function h3(){Kh=!1,pi!==null&&cc(pi)&&(pi=null),mi!==null&&cc(mi)&&(mi=null),gi!==null&&cc(gi)&&(gi=null),fo.forEach(lx),po.forEach(lx)}function uc(r,a){r.blockedOn===a&&(r.blockedOn=null,Kh||(Kh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,h3)))}var dc=null;function cx(r){dc!==r&&(dc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dc===r&&(dc=null);for(var a=0;a<r.length;a+=3){var u=r[a],m=r[a+1],C=r[a+2];if(typeof m!="function"){if(Wh(m||u)===null)continue;break}var A=Ea(u);A!==null&&(r.splice(a,3),a-=3,Vd(A,{pending:!0,data:C,method:u.method,action:m},m,C))}}))}function rs(r){function a(Q){return uc(Q,r)}pi!==null&&uc(pi,r),mi!==null&&uc(mi,r),gi!==null&&uc(gi,r),fo.forEach(a),po.forEach(a);for(var u=0;u<bi.length;u++){var m=bi[u];m.blockedOn===r&&(m.blockedOn=null)}for(;0<bi.length&&(u=bi[0],u.blockedOn===null);)ox(u),u.blockedOn===null&&bi.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var C=u[m],A=u[m+1],B=C[cn]||null;if(typeof A=="function")B||cx(u);else if(B){var $=null;if(A&&A.hasAttribute("formAction")){if(C=A,B=A[cn]||null)$=B.formAction;else if(Wh(C)!==null)continue}else $=B.action;typeof $=="function"?u[m+1]=$:(u.splice(m,3),m-=3),cx(u)}}}function ux(){function r(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(B){return C=B})},focusReset:"manual",scroll:"manual"})}function a(){C!==null&&(C(),C=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,C=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),C!==null&&(C(),C=null)}}}function Yh(r){this._internalRoot=r}hc.prototype.render=Yh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var u=a.current,m=On();tx(u,m,r,a,null,null)},hc.prototype.unmount=Yh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;tx(r.current,2,null,r,null,null),Vl(),a[_a]=null}};function hc(r){this._internalRoot=r}hc.prototype.unstable_scheduleHydration=function(r){if(r){var a=_S();r={blockedOn:null,target:r,priority:a};for(var u=0;u<bi.length&&a!==0&&a<bi[u].priority;u++);bi.splice(u,0,r),u===0&&ox(r)}};var dx=t.version;if(dx!=="19.2.3")throw Error(i(527,dx,"19.2.3"));X.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 f3={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{yt=fc.inject(f3),nt=fc}catch{}}return bo.createRoot=function(r,a){if(!s(r))throw Error(i(299));var u=!1,m="",C=y1,A=v1,B=_1;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(C=a.onUncaughtError),a.onCaughtError!==void 0&&(A=a.onCaughtError),a.onRecoverableError!==void 0&&(B=a.onRecoverableError)),a=JE(r,1,!1,null,null,u,m,null,C,A,B,ux),r[_a]=a.current,Nh(r),new Yh(a)},bo.hydrateRoot=function(r,a,u){if(!s(r))throw Error(i(299));var m=!1,C="",A=y1,B=v1,$=_1,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(C=u.identifierPrefix),u.onUncaughtError!==void 0&&(A=u.onUncaughtError),u.onCaughtError!==void 0&&(B=u.onCaughtError),u.onRecoverableError!==void 0&&($=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),a=JE(r,1,!0,a,u??null,m,C,Q,A,B,$,ux),a.context=ex(null),u=a.current,m=On(),m=Pu(m),C=ni(m),C.callback=null,ri(u,C,m),u=m,a.current.lanes=u,Cs(a,u),mr(a),r[_a]=a.current,Nh(r),new hc(a)},bo.version="19.2.3",bo}var Sx;function E3(){if(Sx)return Qh.exports;Sx=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(),Qh.exports=S3(),Qh.exports}var x3=E3(),gs=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(){}},w3={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},C3=class{#e=w3;#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)}},Ji=new C3;function k3(e){setTimeout(e,0)}var sa=typeof window>"u"||"Deno"in globalThis;function an(){}function T3(e,t){return typeof e=="function"?e(t):e}function Tv(e){return typeof e=="number"&&e>=0&&e!==1/0}function CN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ci(e,t){return typeof e=="function"?e(t):e}function Xn(e,t){return typeof e=="function"?e(t):e}function Ex(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:l,queryKey:c,stale:o}=e;if(c){if(i){if(t.queryHash!==p_(c,t.options))return!1}else if(!Io(t.queryKey,c))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 xx(e,t){const{exact:n,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(oa(t.options.mutationKey)!==oa(l))return!1}else if(!Io(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function p_(e,t){return(t?.queryKeyHashFn||oa)(e)}function oa(e){return JSON.stringify(e,(t,n)=>Av(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function Io(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Io(e[n],t[n])):!1}var A3=Object.prototype.hasOwnProperty;function kN(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=wx(e)&&wx(t);if(!i&&!(Av(e)&&Av(t)))return t;const l=(i?e:Object.keys(e)).length,c=i?t:Object.keys(t),o=c.length,d=i?new Array(o):{};let h=0;for(let p=0;p<o;p++){const f=i?p:c[p],b=e[f],g=t[f];if(b===g){d[f]=b,(i?p<l:A3.call(e,f))&&h++;continue}if(b===null||g===null||typeof b!="object"||typeof g!="object"){d[f]=g;continue}const x=kN(b,g,n+1);d[f]=x,x===b&&h++}return l===o&&h===l?e:d}function Hc(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 wx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Av(e){if(!Cx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Cx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Cx(e){return Object.prototype.toString.call(e)==="[object Object]"}function R3(e){return new Promise(t=>{Ji.setTimeout(t,e)})}function Rv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?kN(e,t):t}function N3(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function O3(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var m_=Symbol();function TN(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===m_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function g_(e,t){return typeof e=="function"?e(...t):!!e}function L3(e,t,n){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var I3=class extends gs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!sa&&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"}},b_=new I3;function Nv(){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 D3=k3;function M3(){let e=[],t=0,n=o=>{o()},i=o=>{o()},s=D3;const l=o=>{t?e.push(o):s(()=>{n(o)})},c=()=>{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||c()}return d},batchCalls:o=>(...d)=>{l(()=>{o(...d)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{i=o},setScheduler:o=>{s=o}}}var Pt=M3(),B3=class extends gs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!sa&&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}},zc=new B3;function F3(e){return Math.min(1e3*2**e,3e4)}function AN(e){return(e??"online")==="online"?zc.isOnline():!0}var Ov=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function RN(e){let t=!1,n=0,i;const s=Nv(),l=()=>s.status!=="pending",c=w=>{if(!l()){const y=new Ov(w);b(y),e.onCancel?.(y)}},o=()=>{t=!0},d=()=>{t=!1},h=()=>b_.isFocused()&&(e.networkMode==="always"||zc.isOnline())&&e.canRun(),p=()=>AN(e.networkMode)&&e.canRun(),f=w=>{l()||(i?.(),s.resolve(w))},b=w=>{l()||(i?.(),s.reject(w))},g=()=>new Promise(w=>{i=y=>{(l()||h())&&w(y)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),x=()=>{if(l())return;let w;const y=n===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(E){w=Promise.reject(E)}Promise.resolve(w).then(f).catch(E=>{if(l())return;const _=e.retry??(sa?0:3),S=e.retryDelay??F3,k=typeof S=="function"?S(n,E):S,N=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,E);if(t||!N){b(E);return}n++,e.onFail?.(n,E),R3(k).then(()=>h()?void 0:g()).then(()=>{t?b(E):x()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(i?.(),s),cancelRetry:o,continueRetry:d,canStart:p,start:()=>(p()?x():g().then(x),s)}}var NN=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Tv(this.gcTime)&&(this.#e=Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(sa?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ji.clearTimeout(this.#e),this.#e=void 0)}},j3=class extends NN{#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=Tx(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=Tx(this.options);t.data!==void 0&&(this.setState(kx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Rv(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(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Xn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===m_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ci(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:!CN(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=TN(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)},c=(()=>{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(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=RN({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:o=>{o instanceof Ov&&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:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.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 Ov){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,...ON(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...kx(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",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Pt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function ON(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:AN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tx(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 P3=class extends gs{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=Nv(),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),Ax(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lv(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 Xn(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&&!Hc(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Rx(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||Xn(this.options.enabled,this.#t)!==Xn(t.enabled,this.#t)||Ci(this.options.staleTime,this.#t)!==Ci(t.staleTime,this.#t))&&this.#g();const s=this.#b();i&&(this.#t!==n||Xn(this.options.enabled,this.#t)!==Xn(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 H3(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(an)),t}#g(){this.#_();const e=Ci(this.options.staleTime,this.#t);if(sa||this.#i.isStale||!Tv(e))return;const n=CN(this.#i.dataUpdatedAt,e)+1;this.#c=Ji.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,!(sa||Xn(this.options.enabled,this.#t)===!1||!Tv(this.#l)||this.#l===0)&&(this.#u=Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||b_.isFocused())&&this.#d()},this.#l))}#v(){this.#g(),this.#y(this.#b())}#_(){this.#c&&(Ji.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(Ji.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#i,l=this.#r,c=this.#s,d=e!==n?e.state:this.#n,{state:h}=e;let p={...h},f=!1,b;if(t._optimisticResults){const R=this.hasListeners(),L=!R&&Ax(e,t),D=R&&Rx(e,n,t,i);(L||D)&&(p={...p,...ON(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:g,errorUpdatedAt:x,status:w}=p;b=p.data;let y=!1;if(t.placeholderData!==void 0&&b===void 0&&w==="pending"){let R;s?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(R=s.data,y=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,R!==void 0&&(w="success",b=Rv(s?.data,R,t),f=!0)}if(t.select&&b!==void 0&&!y)if(s&&b===l?.data&&t.select===this.#m)b=this.#h;else try{this.#m=t.select,b=t.select(b),b=Rv(s?.data,b,t),this.#h=b,this.#a=null}catch(R){this.#a=R}this.#a&&(g=this.#a,b=this.#h,x=Date.now(),w="error");const E=p.fetchStatus==="fetching",_=w==="pending",S=w==="error",k=_&&E,N=b!==void 0,O={status:w,fetchStatus:p.fetchStatus,isPending:_,isSuccess:w==="success",isError:S,isInitialLoading:k,isLoading:k,data:b,dataUpdatedAt:p.dataUpdatedAt,error:g,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:E,isRefetching:E&&!_,isLoadingError:S&&!N,isPaused:p.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&N,isStale:y_(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Xn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=O.data!==void 0,L=O.status==="error"&&!R,D=F=>{L?F.reject(O.error):R&&F.resolve(O.data)},I=()=>{const F=this.#o=O.promise=Nv();D(F)},H=this.#o;switch(H.status){case"pending":e.queryHash===n.queryHash&&D(H);break;case"fulfilled":(L||O.data!==H.value)&&I();break;case"rejected":(!L||O.error!==H.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),Hc(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(c=>{const o=c;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){Pt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function U3(e,t){return Xn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ax(e,t){return U3(e,t)||e.state.data!==void 0&&Lv(e,t,t.refetchOnMount)}function Lv(e,t,n){if(Xn(t.enabled,e)!==!1&&Ci(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&y_(e,t)}return!1}function Rx(e,t,n,i){return(e!==t||Xn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&y_(e,n)}function y_(e,t){return Xn(t.enabled,e)!==!1&&e.isStaleByTime(Ci(t.staleTime,e))}function H3(e,t){return!Hc(e.getCurrentResult(),t)}function Nx(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},d=0;const h=async()=>{let p=!1;const f=x=>{L3(x,()=>t.signal,()=>p=!0)},b=TN(t.options,t.fetchOptions),g=async(x,w,y)=>{if(p)return Promise.reject();if(w==null&&x.pages.length)return Promise.resolve(x);const _=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:w,direction:y?"backward":"forward",meta:t.options.meta};return f(T),T})(),S=await b(_),{maxPages:k}=t.options,N=y?O3:N3;return{pages:N(x.pages,S,k),pageParams:N(x.pageParams,w,k)}};if(s&&l.length){const x=s==="backward",w=x?z3:Ox,y={pages:l,pageParams:c},E=w(i,y);o=await g(y,E,x)}else{const x=e??l.length;do{const w=d===0?c[0]??i.initialPageParam:Ox(i,o);if(d>0&&w==null)break;o=await g(o,w),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 Ox(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 z3(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var q3=class extends NN{#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||LN(),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=RN({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},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 c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,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{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),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),Pt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function LN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $3=class extends gs{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 q3({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=pc(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=pc(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=pc(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=pc(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Pt.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=>xx(t,n))}findAll(e={}){return this.getAll().filter(t=>xx(e,t))}notify(e){Pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Pt.batch(()=>Promise.all(e.map(t=>t.continue().catch(an))))}};function pc(e){return e.options.scope?.id}var G3=class extends gs{#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),Hc(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&oa(n.mutationKey)!==oa(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??LN();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){Pt.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};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,i,s)}catch(l){Promise.reject(l)}try{this.#i.onSettled?.(t.data,null,n,i,s)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,i,s)}catch(l){Promise.reject(l)}try{this.#i.onSettled?.(void 0,t.error,n,i,s)}catch(l){Promise.reject(l)}}}this.listeners.forEach(n=>{n(this.#t)})})}},V3=class extends gs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??p_(i,t);let l=this.get(s);return l||(l=new j3({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(){Pt.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=>Ex(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Ex(e,n)):t}notify(e){Pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Pt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Pt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},W3=class{#e;#t;#n;#i;#r;#s;#o;#a;constructor(e={}){this.#e=e.queryCache||new V3,this.#t=e.mutationCache||new $3,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=b_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=zc.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(Ci(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,c=T3(t,l);if(c!==void 0)return this.#e.build(this,i).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return Pt.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;Pt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Pt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Pt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(an).catch(an)}invalidateQueries(e,t={}){return Pt.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=Pt.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(an)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(an)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ci(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(an).catch(an)}fetchInfiniteQuery(e){return e.behavior=Nx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(an).catch(an)}ensureInfiniteQueryData(e){return e.behavior=Nx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zc.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(oa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{Io(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(oa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{Io(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=p_(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===m_&&(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()}},IN=q.createContext(void 0),Ut=e=>{const t=q.useContext(IN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},K3=({client:e,children:t})=>(q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(IN.Provider,{value:e,children:t})),DN=q.createContext(!1),Y3=()=>q.useContext(DN);DN.Provider;function X3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Z3=q.createContext(X3()),Q3=()=>q.useContext(Z3),J3=(e,t,n)=>{const i=n?.state.error&&typeof e.throwOnError=="function"?g_(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},e4=e=>{q.useEffect(()=>{e.clearReset()},[e])},t4=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||g_(n,[e.error,i])),n4=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))}},r4=(e,t)=>e.isLoading&&e.isFetching&&!t,i4=(e,t)=>e?.suspense&&t.isPending,Lx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function a4(e,t,n){const i=Y3(),s=Q3(),l=Ut(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const o=l.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",n4(c),J3(c,s,o),e4(s);const d=!l.getQueryCache().get(c.queryHash),[h]=q.useState(()=>new t(l,c)),p=h.getOptimisticResult(c),f=!i&&e.subscribed!==!1;if(q.useSyncExternalStore(q.useCallback(b=>{const g=f?h.subscribe(Pt.batchCalls(b)):an;return h.updateResult(),g},[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),q.useEffect(()=>{h.setOptions(c)},[c,h]),i4(c,p))throw Lx(c,h,s);if(t4({result:p,errorResetBoundary:s,throwOnError:c.throwOnError,query:o,suspense:c.suspense}))throw p.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!sa&&r4(p,i)&&(d?Lx(c,h,s):o?.promise)?.catch(an).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?p:h.trackResult(p)}function nr(e,t){return a4(e,P3)}function tn(e,t){const n=Ut(),[i]=q.useState(()=>new G3(n,e));q.useEffect(()=>{i.setOptions(e)},[i,e]);const s=q.useSyncExternalStore(q.useCallback(c=>i.subscribe(Pt.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=q.useCallback((c,o)=>{i.mutate(c,o).catch(an)},[i]);if(s.error&&g_(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const Iv=new WeakMap,s4=new WeakMap,qc={current:[]};let nf=!1,Ao=0;const To=new Set,mc=new Map;function MN(e){for(const t of e){if(qc.current.includes(t))continue;qc.current.push(t),t.recompute();const n=s4.get(t);if(n)for(const i of n){const s=Iv.get(i);s?.length&&MN(s)}}}function o4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function l4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function BN(e){if(Ao>0&&!mc.has(e)&&mc.set(e,e.prevState),To.add(e),!(Ao>0)&&!nf)try{for(nf=!0;To.size>0;){const t=Array.from(To);To.clear();for(const n of t){const i=mc.get(n)??n.prevState;n.prevState=i,o4(n)}for(const n of t){const i=Iv.get(n);i&&(qc.current.push(n),MN(i))}for(const n of t){const i=Iv.get(n);if(i)for(const s of i)l4(s)}}}finally{nf=!1,qc.current=[],mc.clear()}}function Ro(e){Ao++;try{e()}finally{if(Ao--,Ao===0){const t=To.values().next().value;t&&BN(t)}}}function c4(e){return typeof e=="function"}class u4{constructor(t,n){this.listeners=new Set,this.subscribe=i=>{var s,l;this.listeners.add(i);const c=(l=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:l.call(s,i,this);return()=>{this.listeners.delete(i),c?.()}},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):c4(t)?this.state=t(this.prevState):this.state=t,(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),BN(this)}}const ki="__TSR_index",Ix="popstate",Dx="beforeunload";function d4(e){let t=e.getLocation();const n=new Set,i=(c,o)=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:c,navigateOpts:o}))},s=c=>{e.notifyOnIndexChange??!0?i(c):t=e.getLocation()},l=async({task:c,navigateOpts:o,...d})=>{if(o?.ignoreBlocker??!1)return c(),{type:"SUCCESS"};const p=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&p.length&&f)for(const b of p){const g=$c(d.path,d.state);if(await b.blockerFn({currentLocation:t,nextLocation:g,action:d.type}))return e.onBlocked?.(),{type:"BLOCKED"}}return c(),{type:"SUCCESS"}};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,o,d)=>{const h=t.state[ki];return o=Mx(h+1,o),l({task:()=>{e.pushState(c,o),i({type:"PUSH"},d)},navigateOpts:d,type:"PUSH",path:c,state:o})},replace:(c,o,d)=>{const h=t.state[ki];return o=Mx(h,o),l({task:()=>{e.replaceState(c,o),i({type:"REPLACE"},d)},navigateOpts:d,type:"REPLACE",path:c,state:o})},go:(c,o)=>{l({task:()=>{e.go(c),s({type:"GO",index:c})},navigateOpts:o,type:"GO"})},back:c=>{l({task:()=>{e.back(c?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{l({task:()=>{e.forward(c?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[ki]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,c]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function Mx(e,t){t||(t={});const n=v_();return{...t,key:n,__TSR_key:n,[ki]:e}}function h4(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let s=[];const l=()=>s,c=R=>s=R,o=(R=>R),d=(()=>$c(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const R=v_();t.history.replaceState({[ki]:0,key:R,__TSR_key:R},"")}let h=d(),p,f=!1,b=!1,g=!1,x=!1;const w=()=>h;let y,E;const _=()=>{y&&(O._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),O._ignoreSubscribers=!1,y=void 0,E=void 0,p=void 0)},S=(R,L,D)=>{const I=o(L);E||(p=h),h=$c(L,D),y={href:I,state:D,isPush:y?.isPush||R==="push"},E||(E=Promise.resolve().then(()=>_()))},k=R=>{h=d(),O.notify({type:R})},N=async()=>{if(b){b=!1;return}const R=d(),L=R.state[ki]-h.state[ki],D=L===1,I=L===-1,H=!D&&!I||f;f=!1;const F=H?"GO":I?"BACK":"FORWARD",W=H?{type:"GO",index:L}:{type:I?"BACK":"FORWARD"};if(g)g=!1;else{const K=l();if(typeof document<"u"&&K.length){for(const V of K)if(await V.blockerFn({currentLocation:h,nextLocation:R,action:F})){b=!0,t.history.go(1),O.notify(W);return}}}h=d(),O.notify(W)},T=R=>{if(x){x=!1;return}let L=!1;const D=l();if(typeof document<"u"&&D.length)for(const I of D){const H=I.enableBeforeUnload??!0;if(H===!0){L=!0;break}if(typeof H=="function"&&H()===!0){L=!0;break}}if(L)return R.preventDefault(),R.returnValue=""},O=d4({getLocation:w,getLength:()=>t.history.length,pushState:(R,L)=>S("push",R,L),replaceState:(R,L)=>S("replace",R,L),back:R=>(R&&(g=!0),x=!0,t.history.back()),forward:R=>{R&&(g=!0),x=!0,t.history.forward()},go:R=>{f=!0,t.history.go(R)},createHref:R=>o(R),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(Dx,T,{capture:!0}),t.removeEventListener(Ix,N)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(Dx,T,{capture:!0}),t.addEventListener(Ix,N),t.history.pushState=function(...R){const L=n.apply(t.history,R);return O._ignoreSubscribers||k("PUSH"),L},t.history.replaceState=function(...R){const L=i.apply(t.history,R);return O._ignoreSubscribers||k("REPLACE"),L},O}function f4(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function $c(e,t){const n=f4(e),i=n.indexOf("#"),s=n.indexOf("?"),l=v_();return{href:n,pathname:n.substring(0,i>0?s>0?Math.min(i,s):i:s>0?s:n.length),hash:i>-1?n.substring(i):"",search:s>-1?n.slice(s,i===-1?void 0:i):"",state:t||{[ki]:0,key:l,__TSR_key:l}}}function v_(){return(Math.random()+1).toString(36).substring(7)}function Gc(e){return e[e.length-1]}function p4(e){return typeof e=="function"}function Si(e,t){return p4(e)?e(t):e}const m4=Object.prototype.hasOwnProperty,Bx=Object.prototype.propertyIsEnumerable;function Yn(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=t,s=Px(e)&&Px(i);if(!s&&!(Vc(e)&&Vc(i)))return i;const l=s?e:Fx(e);if(!l)return i;const c=s?i:Fx(i);if(!c)return i;const o=l.length,d=c.length,h=s?new Array(d):{};let p=0;for(let f=0;f<d;f++){const b=s?f:c[f],g=e[b],x=i[b];if(g===x){h[b]=g,(s?f<o:m4.call(e,b))&&p++;continue}if(g===null||x===null||typeof g!="object"||typeof x!="object"){h[b]=x;continue}const w=Yn(g,x,n+1);h[b]=w,w===g&&p++}return o===d&&p===o?e:h}function Fx(e){const t=Object.getOwnPropertyNames(e);for(const s of t)if(!Bx.call(e,s))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const i=t;for(const s of n){if(!Bx.call(e,s))return!1;i.push(s)}return i}function Vc(e){if(!jx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!jx(n)||!n.hasOwnProperty("isPrototypeOf"))}function jx(e){return Object.prototype.toString.call(e)==="[object Object]"}function Px(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ra(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(!ra(e[i],t[i],n))return!1;return!0}if(Vc(e)&&Vc(t)){const i=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!i||t[c]!==void 0)&&!ra(e[c],t[c],n))return!1;return!0}let s=0;if(!i)s=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&s++;let l=0;for(const c in t)if((!i||t[c]!==void 0)&&(l++,l>s||!ra(e[c],t[c],n)))return!1;return s===l}return!1}function ds(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 Ti(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function g4(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Ux(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return g4(t)}const FN=["http:","https:","mailto:","tel:"];function Wc(e){if(!e)return!1;try{const t=new URL(e);return!FN.includes(t.protocol)}catch{return!1}}const b4={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},y4=/[&><\u2028\u2029]/g;function v4(e){return e.replace(y4,t=>b4[t])}function rf(e,t){if(!e)return e;const n=/%25|%5C/gi;let i=0,s="",l;for(;(l=n.exec(e))!==null;)s+=Ux(e.slice(i,l.index))+l[0],i=n.lastIndex;return s=s+Ux(i?e.slice(i):e),s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}var _4="Invariant failed";function zr(e,t){if(!e)throw new Error(_4)}function Kc(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 c=t.get(l);if(c)return s(c),c.value},set(l,c){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=c,s(o);else{const d={key:l,value:c,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 hs=0,la=1,ca=2,Do=3,ea=4,jN=5,S4=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,E4=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,x4=/^([^{]*)\{\$\}([^}]*)$/;function __(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]=hs,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]=ca,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=la,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const c=l.match(x4);if(c){const p=c[1].length;return n[0]=ca,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(E4);if(o){const h=o[1],p=o[2],f=o[3],b=h.length;return n[0]=Do,n[1]=t+b,n[2]=t+b+3,n[3]=t+b+3+p.length,n[4]=s-f.length,n[5]=s,n}const d=l.match(S4);if(d){const h=d[1],p=d[2],f=d[3],b=h.length;return n[0]=la,n[1]=t+b,n[2]=t+b+2,n[3]=t+b+2+p.length,n[4]=s-f.length,n[5]=s,n}return n[0]=hs,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function cu(e,t,n,i,s,l,c){c?.(n);let o=i;{const d=n.fullPath??n.from,h=d.length,p=n.options?.caseSensitive??e,f=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;o<h;){const g=__(d,o,t);let x;const w=o,y=g[5];switch(o=y+1,l++,g[0]){case hs:{const _=d.substring(g[2],g[3]);if(p){const S=s.static?.get(_);if(S)x=S;else{s.static??=new Map;const k=ta(n.fullPath??n.from);k.parent=s,k.depth=l,x=k,s.static.set(_,k)}}else{const S=_.toLowerCase(),k=s.staticInsensitive?.get(S);if(k)x=k;else{s.staticInsensitive??=new Map;const N=ta(n.fullPath??n.from);N.parent=s,N.depth=l,x=N,s.staticInsensitive.set(S,N)}}break}case la:{const _=d.substring(w,g[1]),S=d.substring(g[4],y),k=p&&!!(_||S),N=_?k?_:_.toLowerCase():void 0,T=S?k?S:S.toLowerCase():void 0,O=!f&&s.dynamic?.find(R=>!R.skipOnParamError&&R.caseSensitive===k&&R.prefix===N&&R.suffix===T);if(O)x=O;else{const R=sf(la,n.fullPath??n.from,k,N,T);x=R,R.depth=l,R.parent=s,s.dynamic??=[],s.dynamic.push(R)}break}case Do:{const _=d.substring(w,g[1]),S=d.substring(g[4],y),k=p&&!!(_||S),N=_?k?_:_.toLowerCase():void 0,T=S?k?S:S.toLowerCase():void 0,O=!f&&s.optional?.find(R=>!R.skipOnParamError&&R.caseSensitive===k&&R.prefix===N&&R.suffix===T);if(O)x=O;else{const R=sf(Do,n.fullPath??n.from,k,N,T);x=R,R.parent=s,R.depth=l,s.optional??=[],s.optional.push(R)}break}case ca:{const _=d.substring(w,g[1]),S=d.substring(g[4],y),k=p&&!!(_||S),N=_?k?_:_.toLowerCase():void 0,T=S?k?S:S.toLowerCase():void 0,O=sf(ca,n.fullPath??n.from,k,N,T);x=O,O.parent=s,O.depth=l,s.wildcard??=[],s.wildcard.push(O)}}s=x}if(f&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const g=ta(n.fullPath??n.from);g.kind=jN,g.parent=s,l++,g.depth=l,s.pathless??=[],s.pathless.push(g),s=g}const b=(n.path||!n.children)&&!n.isRoot;if(b&&d.endsWith("/")){const g=ta(n.fullPath??n.from);g.kind=ea,g.parent=s,l++,g.depth=l,s.index=g,s=g}s.parse=n.options?.params?.parse??null,s.skipOnParamError=f,s.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,b&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)cu(e,t,d,o,s,l,c)}function af(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;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 _i(e){if(e.pathless)for(const t of e.pathless)_i(t);if(e.static)for(const t of e.static.values())_i(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())_i(t);if(e.dynamic?.length){e.dynamic.sort(af);for(const t of e.dynamic)_i(t)}if(e.optional?.length){e.optional.sort(af);for(const t of e.optional)_i(t)}if(e.wildcard?.length){e.wildcard.sort(af);for(const t of e.wildcard)_i(t)}}function ta(e){return{kind:hs,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function sf(e,t,n,i,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:i,suffix:s}}function w4(e,t){const n=ta("/"),i=new Uint16Array(6);for(const s of e)cu(!1,i,s,1,n,0);_i(n),t.masksTree=n,t.flatCache=Kc(1e3)}function C4(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const i=S_(e,t.masksTree);return t.flatCache.set(e,i),i}function k4(e,t,n,i,s){e||="/",i||="/";const l=t?`case\0${e}`:e;let c=s.singleCache.get(l);if(!c){c=ta("/");const o=new Uint16Array(6);cu(t,o,{from:e},1,c,0),s.singleCache.set(l,c)}return S_(i,c,n)}function T4(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,s=t.matchCache.get(i);if(s!==void 0)return s;e||="/";let l;try{l=S_(e,t.segmentTree,n)}catch(c){if(c instanceof URIError)l=null;else throw c}return l&&(l.branch=N4(l.route)),t.matchCache.set(i,l),l}function A4(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function R4(e,t=!1,n){const i=ta(e.fullPath),s=new Uint16Array(6),l={},c={};let o=0;return cu(t,s,e,1,i,0,h=>{if(n?.(h,o),zr(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,o!==0&&h.path){const p=A4(h.fullPath);(!c[p]||h.fullPath.endsWith("/"))&&(c[p]=h)}o++}),_i(i),{processedTree:{segmentTree:i,singleCache:Kc(1e3),matchCache:Kc(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:c}}function S_(e,t,n=!1){const i=e.split("/"),s=L4(e,i,t,n);if(!s)return null;const[l]=PN(e,i,s);return{route:s.node.route,rawParams:l,parsedParams:s.parsedParams}}function PN(e,t,n){const i=O4(n.node);let s=null;const l={};let c=n.extract?.part??0,o=n.extract?.node??0,d=n.extract?.path??0,h=n.extract?.segment??0;for(;o<i.length;c++,o++,d++,h++){const p=i[o];if(p.kind===ea)break;if(p.kind===jN){h--,c--,d--;continue}const f=t[c],b=d;if(f&&(d+=f.length),p.kind===la){s??=n.node.fullPath.split("/");const g=s[h],x=p.prefix?.length??0;if(g.charCodeAt(x)===123){const y=p.suffix?.length??0,E=g.substring(x+2,g.length-y-1),_=f.substring(x,f.length-y);l[E]=decodeURIComponent(_)}else{const y=g.substring(1);l[y]=decodeURIComponent(f)}}else if(p.kind===Do){if(n.skipped&1<<o){c--,d=b-1;continue}s??=n.node.fullPath.split("/");const g=s[h],x=p.prefix?.length??0,w=p.suffix?.length??0,y=g.substring(x+3,g.length-w-1),E=p.suffix||p.prefix?f.substring(x,f.length-w):f;E&&(l[y]=decodeURIComponent(E))}else if(p.kind===ca){const g=p,x=e.substring(b+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),w=decodeURIComponent(x);l["*"]=w,l._splat=w;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:c,node:o,path:d,segment:h}]}function N4(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function O4(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function L4(e,t,n,i){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!Gc(t),l=s&&e!=="/",c=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(),{node:b,index:g,skipped:x,depth:w,statics:y,dynamics:E,optionals:_}=f;let{extract:S,rawParams:k,parsedParams:N}=f;if(b.skipOnParamError){if(!of(e,t,f))continue;k=f.rawParams,S=f.extract,N=f.parsedParams}i&&b.route&&b.kind!==ea&&yo(h,f)&&(h=f);const T=g===c;if(T&&(b.route&&!l&&yo(p,f)&&(p=f),!b.optional&&!b.wildcard&&!b.index&&!b.pathless))continue;const O=T?void 0:t[g];let R;if(T&&b.index){const L={node:b.index,index:g,skipped:x,depth:w+1,statics:y,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N};let D=!0;if(b.index.skipOnParamError&&(of(e,t,L)||(D=!1)),D){if(y===c&&!E&&!_&&!x)return L;yo(p,L)&&(p=L)}}if(b.wildcard&&yo(d,f))for(const L of b.wildcard){const{prefix:D,suffix:I}=L;if(D&&(T||!(L.caseSensitive?O:R??=O.toLowerCase()).startsWith(D)))continue;if(I){if(T)continue;const F=t.slice(g).join("/").slice(-I.length);if((L.caseSensitive?F:F.toLowerCase())!==I)continue}const H={node:L,index:c,skipped:x,depth:w,statics:y,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N};if(!(L.skipOnParamError&&!of(e,t,H))){d=H;break}}if(b.optional){const L=x|1<<w,D=w+1;for(let I=b.optional.length-1;I>=0;I--){const H=b.optional[I];o.push({node:H,index:g,skipped:L,depth:D,statics:y,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N})}if(!T)for(let I=b.optional.length-1;I>=0;I--){const H=b.optional[I],{prefix:F,suffix:W}=H;if(F||W){const K=H.caseSensitive?O:R??=O.toLowerCase();if(F&&!K.startsWith(F)||W&&!K.endsWith(W))continue}o.push({node:H,index:g+1,skipped:x,depth:D,statics:y,dynamics:E,optionals:_+1,extract:S,rawParams:k,parsedParams:N})}}if(!T&&b.dynamic&&O)for(let L=b.dynamic.length-1;L>=0;L--){const D=b.dynamic[L],{prefix:I,suffix:H}=D;if(I||H){const F=D.caseSensitive?O:R??=O.toLowerCase();if(I&&!F.startsWith(I)||H&&!F.endsWith(H))continue}o.push({node:D,index:g+1,skipped:x,depth:w+1,statics:y,dynamics:E+1,optionals:_,extract:S,rawParams:k,parsedParams:N})}if(!T&&b.staticInsensitive){const L=b.staticInsensitive.get(R??=O.toLowerCase());L&&o.push({node:L,index:g+1,skipped:x,depth:w+1,statics:y+1,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N})}if(!T&&b.static){const L=b.static.get(O);L&&o.push({node:L,index:g+1,skipped:x,depth:w+1,statics:y+1,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N})}if(b.pathless){const L=w+1;for(let D=b.pathless.length-1;D>=0;D--){const I=b.pathless[D];o.push({node:I,index:g,skipped:x,depth:L,statics:y,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N})}}}if(p&&d)return yo(d,p)?p:d;if(p)return p;if(d)return d;if(i&&h){let f=h.index;for(let g=0;g<h.index;g++)f+=t[g].length;const b=f===e.length?"/":e.slice(f);return h.rawParams??={},h.rawParams["**"]=decodeURIComponent(b),h}return null}function of(e,t,n){try{const[i,s]=PN(e,t,n);n.rawParams=i,n.extract=s;const l=n.node.parse(i);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function yo(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ea)>(e.node.kind===ea)||t.node.kind===ea==(e.node.kind===ea)&&t.depth>e.depth))):!0}function Ac(e){return E_(e.filter(t=>t!==void 0).join("/"))}function E_(e){return e.replace(/\/{2,}/g,"/")}function UN(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function yr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function HN(e){return yr(UN(e))}function Yc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function I4(e,t,n){return Yc(e,n)===Yc(t,n)}function D4({base:e,to:t,trailingSlash:n="never",cache:i}){const s=t.startsWith("/"),l=!s&&t===".";let c;if(i){c=s?t:l?e:e+"\0"+t;const f=i.get(c);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&&Gc(o)==="";)o.pop();const f=t.split("/");for(let b=0,g=f.length;b<g;b++){const x=f[b];x===""?b?b===g-1&&o.push(x):o=[x]:x===".."?o.pop():x==="."||o.push(x)}}o.length>1&&(Gc(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));let d,h="";for(let f=0;f<o.length;f++){f>0&&(h+="/");const b=o[f];if(!b)continue;d=__(b,0,d);const g=d[0];if(g===hs){h+=b;continue}const x=d[5],w=b.substring(0,d[1]),y=b.substring(d[4],x),E=b.substring(d[2],d[3]);g===la?h+=w||y?`${w}{$${E}}${y}`:`$${E}`:g===ca?h+=w||y?`${w}{$}${y}`:"$":h+=`${w}{-$${E}}${y}`}h=E_(h);const p=h||"/";return c&&i&&i.set(c,p),p}function lf(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?encodeURI(i):M4(i,n)}function cf({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 c=0,o,d="";for(;c<l;){const p=c;o=__(e,p,o);const f=o[5];if(c=f+1,p===f)continue;const b=o[0];if(b===hs){d+="/"+e.substring(p,f);continue}if(b===ca){const g=t._splat;s._splat=g,s["*"]=g;const x=e.substring(p,o[1]),w=e.substring(o[4],f);if(!g){i=!0,(x||w)&&(d+="/"+x+w);continue}const y=lf("_splat",t,n);d+="/"+x+y+w;continue}if(b===la){const g=e.substring(o[2],o[3]);!i&&!(g in t)&&(i=!0),s[g]=t[g];const x=e.substring(p,o[1]),w=e.substring(o[4],f),y=lf(g,t,n)??"undefined";d+="/"+x+y+w;continue}if(b===Do){const g=e.substring(o[2],o[3]),x=t[g];if(x==null)continue;s[g]=x;const w=e.substring(p,o[1]),y=e.substring(o[4],f),E=lf(g,t,n)??"";d+="/"+w+E+y;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:s,interpolatedPath:d||"/",isMissingParams:i}}function M4(e,t){let n=encodeURIComponent(e);if(t)for(const[i,s]of t)n=n.replaceAll(i,s);return n}function Dn(e){return!!e?.isNotFound}function B4(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Xc="tsr-scroll-restoration-v1_3",F4=(e,t)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{e(...i),n=null},t))}};function j4(){const e=B4();if(!e)return null;const t=e.getItem(Xc);let n=t?JSON.parse(t):{};return{state:n,set:i=>{n=Si(i,n)||n;try{e.setItem(Xc,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const gc=j4(),Dv=e=>e.state.__TSR_key||e.href;function P4(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 Zc=!1;function zN({storageKey:e,key:t,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:s,location:l}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const o=t||window.history.state?.__TSR_key,d=c[o];Zc=!0;e:{if(i&&d&&Object.keys(d).length>0){for(const f in d){const b=d[f];if(f==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:n});else if(f){const g=document.querySelector(f);g&&(g.scrollLeft=b.scrollX,g.scrollTop=b.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const b=document.getElementById(h);b&&b.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 b=typeof f=="function"?f():document.querySelector(f);b&&b.scrollTo(p)}}Zc=!1}function U4(e,t){if(!gc&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!gc))return;e.isScrollRestorationSetup=!0,Zc=!1;const i=e.options.getScrollRestorationKey||Dv;window.history.scrollRestoration="manual";const s=l=>{if(Zc||!e.isScrollRestoring)return;let c="";if(l.target===document||l.target===window)c="window";else{const d=l.target.getAttribute("data-scroll-restoration-id");d?c=`[data-scroll-restoration-id="${d}"]`:c=P4(l.target)}const o=i(e.state.location);gc.set(d=>{const h=d[o]||={},p=h[c]||={};if(c==="window")p.scrollX=window.scrollX||0,p.scrollY=window.scrollY||0;else if(c){const f=document.querySelector(c);f&&(p.scrollX=f.scrollLeft||0,p.scrollY=f.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",F4(s,100),!0),e.subscribe("onRendered",l=>{const c=i(l.toLocation);(l.toLocation.state.__TSR_resetScroll??!0)&&(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(zN({storageKey:Xc,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&gc.set(d=>(d[c]||={},d))))})}function H4(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 z4(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 uf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function q4(e){const t=new URLSearchParams(e),n={};for(const[i,s]of t.entries()){const l=n[i];l==null?n[i]=uf(s):Array.isArray(l)?l.push(uf(s)):n[i]=[l,uf(s)]}return n}const $4=V4(JSON.parse),G4=W4(JSON.stringify,JSON.parse);function V4(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=q4(t);for(const i in n){const s=n[i];if(typeof s=="string")try{n[i]=e(s)}catch{}}return n}}function W4(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=z4(s,i);return l?`?${l}`:""}}const bn="__root__";function x_(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&Wc(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${FN.join(", ")} protocols are allowed.`);if(!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 Jn(e){return e instanceof Response&&!!e.options}const Rc=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},uu=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),cs=(e,t,n=!0)=>{const i={...e.router.options.context??{}},s=n?t:t-1;for(let l=0;l<=s;l++){const c=e.matches[l];if(!c)continue;const o=e.router.getMatch(c.id);o&&Object.assign(i,o.__routeContext,o.__beforeLoadContext)}return i},qN=(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),zr(n.options.notFoundComponent);const i=e.matches.find(s=>s.routeId===n.id);zr(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,qN(e,t))},Ei=(e,t,n)=>{if(!(!Jn(n)&&!Dn(n))){if(Jn(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=Jn(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:i,context:cs(e,t.index),isFetching:!1,error:n})),Dn(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Jn(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(qN(e,n),n)}},$N=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},vo=(e,t,n,i)=>{const{id:s,routeId:l}=e.matches[t],c=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=i,e.firstBadMatchIndex??=t,Ei(e,e.router.getMatch(s),n);try{c.options.onError?.(n)}catch(o){n=o,Ei(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}))},K4=(e,t,n,i)=>{const s=e.router.getMatch(t),l=e.matches[n-1]?.id,c=l?e.router.getMatch(l):void 0;if(e.router.isShell()){s.ssr=i.id===bn;return}if(c?.ssr===!1){s.ssr=!1;return}const o=g=>g===!0&&c?.ssr==="data-only"?"data-only":g,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:bc(h,s.searchError),params:bc(p,s.paramsError),location:e.location,matches:e.matches.map(g=>({index:g.index,pathname:g.pathname,fullPath:g.fullPath,staticData:g.staticData,id:g.id,routeId:g.routeId,search:bc(g.search,g.searchError),params:bc(g.params,g.paramsError),ssr:g.ssr}))},b=i.options.ssr(f);if(Ti(b))return b.then(g=>{s.ssr=o(g??d)});s.ssr=o(b??d)},GN=(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&&!uu(e,t)&&(n.options.loader||n.options.beforeLoad||KN(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{Rc(e)},s);i._nonReactive.pendingTimeout=c}},Y4=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;GN(e,t,n,i);const s=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Ei(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(s):s()},X4=(e,t,n,i)=>{const s=e.router.getMatch(t),l=s._nonReactive.loadPromise;s._nonReactive.loadPromise=ds(()=>{l?.resolve()});const{paramsError:c,searchError:o}=s;c&&vo(e,n,c,"PARSE_PARAMS"),o&&vo(e,n,o,"VALIDATE_SEARCH"),GN(e,t,i,s);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let f=!1;const b=()=>{f||(f=!0,e.updateMatch(t,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:d})))},g=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!i.options.beforeLoad){Ro(()=>{b(),g()});return}s._nonReactive.beforeLoadPromise=ds();const x={...cs(e,n,!1),...s.__routeContext},{search:w,params:y,cause:E}=s,_=uu(e,t),S={search:w,abortController:d,params:y,preload:_,context:x,location:e.location,navigate:T=>e.router.navigate({...T,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?"preload":E,matches:e.matches,...e.router.options.additionalContext},k=T=>{if(T===void 0){Ro(()=>{b(),g()});return}(Jn(T)||Dn(T))&&(b(),vo(e,n,T,"BEFORE_LOAD")),Ro(()=>{b(),e.updateMatch(t,O=>({...O,__beforeLoadContext:T})),g()})};let N;try{if(N=i.options.beforeLoad(S),Ti(N))return b(),N.catch(T=>{vo(e,n,T,"BEFORE_LOAD")}).then(k)}catch(T){b(),vo(e,n,T,"BEFORE_LOAD")}k(N)},Z4=(e,t)=>{const{id:n,routeId:i}=e.matches[t],s=e.router.looseRoutesById[i],l=()=>{if(e.router.isServer){const d=K4(e,n,t,s);if(Ti(d))return d.then(o)}return o()},c=()=>X4(e,n,t,s),o=()=>{if($N(e,n))return;const d=Y4(e,n,s);return Ti(d)?d.then(c):c()};return l()},Q4=(e,t,n)=>{const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,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,c,o])=>{const d=l?.meta,h=l?.links,p=l?.scripts,f=l?.styles;return{meta:d,links:h,headScripts:p,headers:o,scripts:c,styles:f}})},VN=(e,t,n,i)=>{const s=e.matchPromises[n-1],{params:l,loaderDeps:c,abortController:o,cause:d}=e.router.getMatch(t),h=cs(e,n),p=uu(e,t);return{params:l,deps:c,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}},Hx=async(e,t,n,i)=>{try{const s=e.router.getMatch(t);try{(!e.router.isServer||s.ssr===!0)&&WN(i);const l=i.options.loader?.(VN(e,t,n,i)),c=i.options.loader&&Ti(l);if((c||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),i.options.loader){const h=c?await l:l;Ei(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,p=>({...p,loaderData:h}))}i._lazyPromise&&await i._lazyPromise;const d=s._nonReactive.minPendingPromise;d&&await d,i._componentsPromise&&await i._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:cs(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:cs(e,n)}));return}const o=s._nonReactive.minPendingPromise;o&&await o,Dn(l)&&await i.options.notFoundComponent?.preload?.(),Ei(e,e.router.getMatch(t),l);try{i.options.onError?.(l)}catch(d){c=d,Ei(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:c,context:cs(e,n),status:"error",isFetching:!1}))}}catch(s){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Ei(e,l,s)}},J4=async(e,t)=>{const{id:n,routeId:i}=e.matches[t];let s=!1,l=!1;const c=e.router.looseRoutesById[i];if($N(e,n)){if(e.router.isServer)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&&Ei(e,p,f)}else{const p=Date.now()-h.updatedAt,f=uu(e,n),b=f?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,g=c.options.shouldReload,x=typeof g=="function"?g(VN(e,n,t,c)):g,w=!!f&&!e.router.state.matches.some(S=>S.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=ds(),w!==y.preload&&e.updateMatch(n,S=>({...S,preload:w}));const{status:E,invalid:_}=y;s=E==="success"&&(_||(x??p>b)),f&&c.options.preload===!1||(s&&!e.sync?(l=!0,(async()=>{try{await Hx(e,n,t,c);const S=e.router.getMatch(n);S._nonReactive.loaderPromise?.resolve(),S._nonReactive.loadPromise?.resolve(),S._nonReactive.loaderPromise=void 0}catch(S){Jn(S)&&await e.router.navigate(S.options)}})()):(E!=="success"||s&&e.sync)&&await Hx(e,n,t,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 zx(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Rc(t);try{for(let o=0;o<t.matches.length;o++){const d=Z4(t,o);Ti(d)&&await d}const n=t.firstBadMatchIndex??t.matches.length;for(let o=0;o<n;o++)t.matchPromises.push(J4(t,o));const s=(await Promise.allSettled(t.matchPromises)).filter(o=>o.status==="rejected").map(o=>o.reason);let l;for(const o of s){if(Jn(o))throw o;!l&&Dn(o)&&(l=o)}for(const o of t.matches){const{id:d,routeId:h}=o,p=t.router.looseRoutesById[h];try{const f=Q4(t,d,p);if(f){const b=await f;t.updateMatch(d,g=>({...g,...b}))}}catch(f){console.error(`Error executing head for route ${h}:`,f)}}if(l)throw l;const c=Rc(t);Ti(c)&&await c}catch(n){if(Dn(n)&&!t.preload){const i=Rc(t);throw Ti(i)&&await i,n}if(Jn(n))throw n}return t.matches}async function WN(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 YN){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 bc(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function KN(e){for(const t of YN)if(e.options[t]?.preload)return!0;return!1}const YN=["component","errorComponent","pendingComponent","notFoundComponent"];function e5(e){return{input:({url:t})=>{for(const n of e)t=Mv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=XN(e[n],t);return t}}}function t5(e){const t=HN(e.basepath),n=`/${t}`,i=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:c})=>{const o=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return o===s?c.pathname="/":o.startsWith(l)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=Ac(["/",t,c.pathname]),c)}}function Mv(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 XN(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 ia(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 n5{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,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,c=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(b=>[encodeURIComponent(b),b])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=h4())),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 u4(i5(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),U4(this));let o=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(l||s!==d||c!==h){this.basepath=d;const b=[];HN(d)!==""&&b.push(t5({basepath:d})),h&&b.push(h),this.rewrite=b.length===0?void 0:b.length===1?b[0]:e5(b),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}=R4(this.routeTree,this.options.caseSensitive,(c,o)=>{c.init({originalIndex:o})});this.options.routeMasks&&w4(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=Mv(this.rewrite,p),b=this.options.parseSearch(f.search),g=this.options.stringifySearch(b);return f.search=g,{href:f.href.replace(f.origin,""),publicHref:d,url:f,pathname:rf(f.pathname),searchStr:g,search:Yn(i?.search,b),hash:rf(f.hash.split("#").reverse()[0]??""),state:Yn(i?.state,h)}},l=s(n),{__tempLocation:c,__tempKey:o}=l.state;if(c&&(!o||o===this.tempLocationKey)){const d=s(c);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=Kc(1e3),this.resolvePathWithBase=(n,i)=>D4({base:n,to:E_(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},s).matches:this.matchRoutesInternal(n,i).matches,this.getMatchedRoutes=n=>a5({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 c=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutes(c,{_buildLocation:!0}),d=Gc(o);l.from;const h=l.unsafeRelative==="path"?c.pathname:l.from??d.fullPath,p=this.resolvePathWithBase(h,"."),f=d.search,b={...d.params},g=l.to?this.resolvePathWithBase(p,`${l.to}`):this.resolvePathWithBase(p,"."),x=l.params===!1||l.params===null?{}:(l.params??!0)===!0?b:Object.assign(b,Si(l.params,b)),w=cf({path:g,params:x}).interpolatedPath,y=this.getMatchedRoutes(w);let E=y.matchedRoutes;const _=y.routeParams,S=y.foundRoute?y.foundRoute.path!=="/"&&y.routeParams["**"]:yr(w);let k;if(S&&(this.options.notFoundRoute?E=[...E,this.options.notFoundRoute]:k=qx(this.options.notFoundMode,E)),Object.keys(x).length>0)for(const X of E){const Z=X.options.params?.stringify??X.options.stringifyParams;Z&&Object.assign(x,Z(x))}const N=n.leaveParams?g:rf(cf({path:g,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let T=f;if(n._includeValidateSearch&&this.options.search?.strict){const X={};E.forEach(Z=>{if(Z.options.validateSearch)try{Object.assign(X,Bv(Z.options.validateSearch,{...X,...T}))}catch{}}),T=X}T=l5({search:T,dest:l,destRoutes:E,_includeValidateSearch:n._includeValidateSearch}),T=Yn(f,T);const O=this.options.stringifySearch(T),R=l.hash===!0?c.hash:l.hash?Si(l.hash,c.hash):void 0,L=R?`#${R}`:"";let D=l.state===!0?c.state:l.state?Si(l.state,c.state):{};D=Yn(c.state,D);const I={..._,...x},H=o5({routes:E,params:I,searchStr:O,globalNotFoundRouteId:k}),F=`${N}${O}${L}`,W=new URL(F,this.origin),K=XN(this.rewrite,W),V=W.href.replace(W.origin,"");return{publicHref:K.pathname+K.search+K.hash,href:V,url:K,pathname:N,search:T,searchStr:O,state:D,hash:R??"",unmaskOnReload:l.unmaskOnReload,_matchSnapshot:H}},s=(l={},c)=>{const o=i(l);let d=c?i(c):void 0;if(!d){const h={};if(this.options.routeMasks){const p=C4(o.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:f,params:b,...g}=p.route,x=b===!1||b===null?{}:(b??!0)===!0?h:Object.assign(h,Si(b,h));c={from:n.from,...g,params:x},d=i(c)}}}return d&&(o.maskedLocation=d),o};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:i,...s})=>{const l=()=>{const x=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];x.forEach(y=>{s.state[y]=this.latestLocation.state[y]});const w=ra(s.state,this.latestLocation.state);return x.forEach(y=>{delete s.state[y]}),w},c=yr(this.latestLocation.href)===yr(s.href),o=this.commitLocationPromise;if(this.commitLocationPromise=ds(()=>{o?.resolve()}),c&&l())return this.load(),this.commitLocationPromise;let{maskedLocation:d,hashScrollIntoView:h,url:p,...f}=s;d&&(f={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,f.state.__TSR_resetScroll=s.resetScroll??!0,this.shouldViewTransition=n,f.state.__TSR_sessionId=this.sessionId,f.state.__TSR_matches=s._matchSnapshot??s5({matchResult:this.getMatchedRoutes(s.pathname),pathname:s.pathname,searchStr:s.searchStr,notFoundRoute:this.options.notFoundRoute,notFoundMode:this.options.notFoundMode});const b={...s,publicHref:f.publicHref,state:f.state,maskedLocation:d};return(await this.history[s.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:i,skipTransitionerLoad:!0})).type==="BLOCKED"?(this.commitLocationPromise?.resolve(),this.commitLocationPromise):this.history.location.href!==f.publicHref?this.commitLocationPromise:(this.latestLocation=b,this.load({_skipUpdateLatestLocation:!0}),this.commitLocationPromise)},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:s,viewTransition:l,ignoreBlocker:c,href:o,...d}={})=>{if(o){const f=this.history.location.state.__TSR_index,b=$c(o,{__TSR_index:n?f:f+1}),g=new URL(b.pathname,this.origin),x=Mv(this.rewrite,g);d.to=x.pathname,d.search=this.options.parseSearch(b.search),d.hash=b.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:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:i,href:s,publicHref:l,...c})=>{let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!i&&(i=!0),i){if(n!==void 0||!s){const h=this.buildLocation({to:n,...c});s=s??h.url.href,l=l??h.url.href}const d=!o&&l?l:s;if(Wc(d))return Promise.resolve();if(!c.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const f of p)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...c,href:s,to:n,_isNavigate:!0})},this.beforeLoad=n=>{if(this.cancelMatches(),n?._skipUpdateLatestLocation||this.updateLatestLocation(),this.isServer){const l=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==l.publicHref||l.url.origin!==this.origin){const c=this.getParsedLocationHref(l);throw x_({href:c})}}const i=this.latestLocation.state.__TSR_sessionId===this.sessionId?this.latestLocation.state.__TSR_matches:void 0,s=this.matchRoutes(this.latestLocation,{snapshot:i});this.__store.setState(l=>({...l,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:s,cachedMatches:l.cachedMatches.filter(c=>!s.some(o=>o.id===c.id))}))},this.load=async n=>{let i,s,l;for(l=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad({_skipUpdateLatestLocation:n?._skipUpdateLatestLocation});const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ia({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...ia({resolvedLocation:h,location:d})}),await zx({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=[],f=[],b=[];Ro(()=>{this.__store.setState(g=>{const x=g.matches,w=g.pendingMatches||g.matches;return p=x.filter(y=>!w.some(E=>E.id===y.id)),f=w.filter(y=>!x.some(E=>E.id===y.id)),b=w.filter(y=>x.some(E=>E.id===y.id)),{...g,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...g.cachedMatches,...p.filter(y=>y.status!=="error"&&y.status!=="notFound")]}}),this.clearExpiredCache()}),[[p,"onLeave"],[f,"onEnter"],[b,"onStay"]].forEach(([g,x])=>{g.forEach(w=>{this.looseRoutesById[w.routeId].options[x]?.(w)})})})})}})}catch(d){Jn(d)?(i=d,this.isServer||this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Dn(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 c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(o=>o.status==="error")&&(c=500),c!==void 0&&this.__store.setState(o=>({...o,statusCode:c}))},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,c=this.state.resolvedLocation,o=typeof i.types=="function"?i.types(ia({resolvedLocation:c,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(c=>c.id===n?i(c):c)}))})},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"||s.status==="notFound"?{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.getParsedLocationHref=n=>{let i=n.url.href;return this.origin&&n.url.origin===this.origin&&(i=i.replace(this.origin,"")||"/"),i},this.resolveRedirect=n=>{const i=n.headers.get("Location");if(n.options.href){if(i)try{const s=new URL(i);if(this.origin&&s.origin===this.origin){const l=s.pathname+s.search+s.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}}else{const s=this.buildLocation(n.options),l=this.getParsedLocationHref(s);n.options.href=l,n.headers.set("Location",l)}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=WN,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)),c=new Set([...l,...this.state.cachedMatches.map(o=>o.id)]);Ro(()=>{s.forEach(o=>{c.has(o.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,o]}))})});try{return s=await zx({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(Jn(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:i});Dn(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=k4(l.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,o.pathname,this.processedTree);return!d||n.params&&!ra(d.rawParams,n.params,{partial:!0})?!1:i?.includeSearch??!0?ra(o.search,l.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.sessionId=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??G4,parseSearch:t.parseSearch??$4}),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=n?.snapshot,s=i&&i.routeIds.length>0&&i.routeIds.every(x=>this.routesById[x]);let l,c,o,d,h;if(s)l=i.routeIds.map(x=>this.routesById[x]),c={...i.params},o={...i.params},d=i.globalNotFoundRouteId,h=i.parsedParams;else{const x=this.getMatchedRoutes(t.pathname),{foundRoute:w,routeParams:y}=x;c=y,o={...y},l=x.matchedRoutes,h=x.parsedParams;let E=!1;(w?w.path!=="/"&&c["**"]:yr(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:E=!0),d=E?qx(this.options.notFoundMode,l):void 0}const p=[],f=x=>x?.id?x.context??this.options.context??void 0:this.options.context??void 0,b=s&&i.searchStr===t.searchStr&&i.validatedSearches?.length===l.length,g=[];if(l.forEach((x,w)=>{const y=p[w-1],[E,_,S]=(()=>{if(b){const Z=i.validatedSearches[w];return[Z.search,Z.strictSearch,void 0]}const V=y?.search??t.search,X=y?._strictSearch??void 0;try{const Z=Bv(x.options.validateSearch,{...V})??void 0;return[{...V,...Z},{...X,...Z},void 0]}catch(Z){let P=Z;if(Z instanceof Qc||(P=new Qc(Z.message,{cause:Z})),n?.throwOnError)throw P;return[V,{},P]}})();b||g.push({search:E,strictSearch:_});const k=x.options.loaderDeps?.({search:E})??"",N=k?JSON.stringify(k):"",{interpolatedPath:T,usedParams:O}=cf({path:x.fullPath,params:c,decodeCharMap:this.pathParamsDecodeCharMap}),R=x.id+T+N,L=this.getMatch(R),D=this.state.matches.find(V=>V.routeId===x.id),I=L?._strictParams??O;let H;if(!L)if(x.options.skipRouteOnParseError)for(const V in O)V in h&&(I[V]=h[V]);else{const V=x.options.params?.parse??x.options.parseParams;if(V)try{Object.assign(I,V(I))}catch(X){if(Dn(X)||Jn(X)?H=X:H=new r5(X.message,{cause:X}),n?.throwOnError)throw H}}Object.assign(c,I);const F=D?"stay":"enter";let W;if(L)W={...L,cause:F,params:D?Yn(D.params,c):c,_strictParams:I,search:Yn(D?D.search:L.search,E),_strictSearch:_};else{const V=x.options.loader||x.options.beforeLoad||x.lazyFn||KN(x)?"pending":"success";W={id:R,ssr:this.isServer?void 0:x.options.ssr,index:w,routeId:x.id,params:D?Yn(D.params,c):c,_strictParams:I,pathname:T,updatedAt:Date.now(),search:D?Yn(D.search,E):E,_strictSearch:_,searchError:void 0,status:V,isFetching:!1,error:void 0,paramsError:H,__routeContext:void 0,_nonReactive:{loadPromise:ds()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:D?Yn(D.loaderDeps,k):k,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:x.options.staticData||{},fullPath:x.fullPath}}n?.preload||(W.globalNotFound=d===x.id),W.searchError=S;const K=f(y);W.context={...K,...W.__routeContext,...W.__beforeLoadContext},p.push(W)}),!b&&g.length>0){const x=t.state?.__TSR_matches;x&&(x.searchStr=t.searchStr,x.validatedSearches=g)}return p.forEach((x,w)=>{const y=this.looseRoutesById[x.routeId];if(!this.getMatch(x.id)&&n?._buildLocation!==!0){const _=p[w-1],S=f(_);if(y.options.context){const k={deps:x.loaderDeps,params:x.params,context:S??{},location:t,navigate:N=>this.navigate({...N,_fromLocation:t}),buildLocation:this.buildLocation,cause:x.cause,abortController:x.abortController,preload:!!x.preload,matches:p};x.__routeContext=y.options.context(k)??void 0}x.context={...S,...x.__routeContext,...x.__beforeLoadContext}}}),{matches:p,rawParams:o}}}class Qc extends Error{}class r5 extends Error{}function i5(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Bv(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Qc("Async validation not supported");if(n.issues)throw new Qc(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 a5({pathname:e,routesById:t,processedTree:n}){const i={},s=yr(e);let l,c={};const o=T4(s,n,!0);return o&&(l=o.route,Object.assign(i,o.rawParams),c=Object.assign({},o.parsedParams)),{matchedRoutes:o?.branch||[t[bn]],routeParams:i,foundRoute:l,parsedParams:c}}function s5({matchResult:e,pathname:t,searchStr:n,notFoundRoute:i,notFoundMode:s}){const l={routeIds:e.matchedRoutes.map(o=>o.id),params:e.routeParams,parsedParams:e.parsedParams,searchStr:n};if(e.foundRoute?e.foundRoute.path!=="/"&&e.routeParams["**"]:yr(t))if(i)l.globalNotFoundRouteId=i.id;else{if(s!=="root")for(let o=e.matchedRoutes.length-1;o>=0;o--){const d=e.matchedRoutes[o];if(d.children){l.globalNotFoundRouteId=d.id;break}}l.globalNotFoundRouteId||(l.globalNotFoundRouteId=bn)}return l}function o5({routes:e,params:t,searchStr:n,globalNotFoundRouteId:i}){const s={};for(const c in t){const o=t[c];o!=null&&(s[c]=String(o))}const l={routeIds:e.map(c=>c.id),params:s,parsedParams:t,searchStr:n};return i&&(l.globalNotFoundRouteId=i),l}function l5({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){return c5(n)(e,t,i??!1)}function c5(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)s.options.search?.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const l=({search:c,next:o})=>{let d=c;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(d=s.options.preSearchFilters.reduce((p,f)=>f(p),c));const h=o(d);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((p,f)=>f(p),h):h};t.middlewares.push(l)}if(s.options.validateSearch){const l=({search:c,next:o})=>{const d=o(c);if(!t._includeValidateSearch)return d;try{return{...d,...Bv(s.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(l)}}const n=({search:s})=>{const l=t.dest;return l.search?l.search===!0?s:Si(l.search,s):{}};t.middlewares.push(n);const i=(s,l,c)=>{if(s>=c.length)return l;const o=c[s];return o({search:l,next:h=>i(s+1,h,c)})};return function(l,c,o){return t.dest=c,t._includeValidateSearch=o,i(0,l,t.middlewares)}}function qx(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const i=t[n];if(i.children)return i.id}return bn}const u5="Error preloading route! ☝️";class ZN{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=bn:this.parentRoute||zr(!1);let l=s?bn:i?.path;l&&l!=="/"&&(l=UN(l));const c=i?.id||l;let o=s?bn:Ac([this.parentRoute.id===bn?"":this.parentRoute.id,c]);l===bn&&(l="/"),o!==bn&&(o=Ac(["/",o]));const d=o===bn?"/":Ac([this.parentRoute.fullPath,l]);this._path=l,this._id=o,this._fullPath=d,this._to=yr(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.redirect=n=>x_({from:this.fullPath,...n}),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 d5 extends ZN{constructor(t){super(t)}}const yc=typeof window<"u"?q.useLayoutEffect:q.useEffect;function df(e){const t=q.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function h5(e,t,n={},i={}){q.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 f5(e){const t=q.useRef(null);return q.useImperativeHandle(e,()=>t.current,[]),t}function w_(e){const t=e.errorComponent??du;return v.jsx(p5,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?q.createElement(t,{error:n,reset:i}):e.children})}class p5 extends q.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 du({error:e}){const[t,n]=q.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.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"})]}),v.jsx("div",{style:{height:".25rem"}}),t?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?v.jsx("code",{children:e.message}):null})}):null]})}function m5({children:e,fallback:t=null}){return QN()?v.jsx(Yt.Fragment,{children:e}):v.jsx(Yt.Fragment,{children:t})}function QN(){return Yt.useSyncExternalStore(g5,()=>!0,()=>!1)}function g5(){return()=>{}}var hf={exports:{}},ff={},pf={exports:{}},mf={};var $x;function b5(){if($x)return mf;$x=1;var e=qo();function t(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function o(f,b){var g=b(),x=i({inst:{value:g,getSnapshot:b}}),w=x[0].inst,y=x[1];return l(function(){w.value=g,w.getSnapshot=b,d(w)&&y({inst:w})},[f,g,b]),s(function(){return d(w)&&y({inst:w}),f(function(){d(w)&&y({inst:w})})},[f]),c(g),g}function d(f){var b=f.getSnapshot;f=f.value;try{var g=b();return!n(f,g)}catch{return!0}}function h(f,b){return b()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:o;return mf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,mf}var Gx;function y5(){return Gx||(Gx=1,pf.exports=b5()),pf.exports}var Vx;function v5(){if(Vx)return ff;Vx=1;var e=qo(),t=y5();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,c=e.useEffect,o=e.useMemo,d=e.useDebugValue;return ff.useSyncExternalStoreWithSelector=function(h,p,f,b,g){var x=l(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=o(function(){function E(T){if(!_){if(_=!0,S=T,T=b(T),g!==void 0&&w.hasValue){var O=w.value;if(g(O,T))return k=O}return k=T}if(O=k,i(S,T))return O;var R=b(T);return g!==void 0&&g(O,R)?(S=T,O):(S=T,k=R)}var _=!1,S,k,N=f===void 0?null:f;return[function(){return E(p())},N===null?void 0:function(){return E(N())}]},[p,f,b,g]);var y=s(h,x[0],x[1]);return c(function(){w.hasValue=!0,w.value=y},[y]),d(y),y},ff}var Wx;function _5(){return Wx||(Wx=1,hf.exports=v5()),hf.exports}var S5=_5();function E5(e,t=i=>i,n={}){const i=n.equal??x5;return S5.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,i)}function x5(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=Kx(e);if(n.length!==Kx(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 Kx(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const gf=q.createContext(null);function JN(){return typeof document>"u"?gf:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=gf,gf)}function Fn(e){const t=q.useContext(JN());return e?.warn,t}function vn(e){const t=Fn({warn:e?.router===void 0}),n=e?.router||t,i=q.useRef(void 0);return E5(n.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Yn(i.current,e.select(s));return i.current=l,l}return e.select(s)}return s})}const hu=q.createContext(void 0),w5=q.createContext(void 0);function Sr(e){const t=q.useContext(e.from?w5:hu);return vn({select:i=>{const s=i.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(zr(!((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 C_(e){return Sr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function k_(e){const{select:t,...n}=e;return Sr({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function T_(e){return Sr({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 A_(e){return Sr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fu(e){const t=Fn();return q.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var C5=wN();function k5(e,t){const n=Fn(),[i,s]=q.useState(!1),l=q.useRef(!1),c=f5(t),o=QN(),{activeProps:d,inactiveProps:h,activeOptions:p,to:f,preload:b,preloadDelay:g,hashScrollIntoView:x,replace:w,startTransition:y,resetScroll:E,viewTransition:_,children:S,target:k,disabled:N,style:T,className:O,onClick:R,onFocus:L,onMouseEnter:D,onMouseLeave:I,onTouchStart:H,ignoreBlocker:F,params:W,search:K,hash:V,state:X,mask:Z,reloadDocument:P,unsafeRelative:M,from:j,_fromLocation:G,...U}=e,ee=vn({select:ke=>ke.location.search,structuralSharing:!0}),ae=e.from,de=q.useMemo(()=>({...e,from:ae}),[n,ee,ae,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Y=q.useMemo(()=>n.buildLocation({...de}),[n,de]),z=q.useMemo(()=>{if(N)return;let ke=Y.maskedLocation?Y.maskedLocation.url.href:Y.url.href,Le=!1;return n.origin&&(ke.startsWith(n.origin)?ke=n.history.createHref(ke.replace(n.origin,""))||"/":Le=!0),{href:ke,external:Le}},[N,Y.maskedLocation,Y.url,n.origin,n.history]),ne=q.useMemo(()=>{if(z?.external)return Wc(z.href)?void 0:z.href;if(!(typeof f=="string"&&f.charCodeAt(0)===47&&f.charCodeAt(1)!==47))try{return new URL(f),Wc(f)?void 0:f}catch{}},[f,z]),ue=e.reloadDocument||ne?!1:b??n.options.defaultPreload,ge=g??n.options.defaultPreloadDelay??0,be=vn({select:ke=>{if(ne)return!1;if(p?.exact){if(!I4(ke.location.pathname,Y.pathname,n.basepath))return!1}else{const Le=Yc(ke.location.pathname,n.basepath),oe=Yc(Y.pathname,n.basepath);if(!(Le.startsWith(oe)&&(Le.length===oe.length||Le[oe.length]==="/")))return!1}return(p?.includeSearch??!0)&&!ra(ke.location.search,Y.search,{partial:!p?.exact,ignoreUndefined:!p?.explicitUndefined})?!1:p?.includeHash?o&&ke.location.hash===Y.hash:!0}}),xe=q.useCallback(()=>{n.preloadRoute({...de}).catch(ke=>{console.warn(ke),console.warn(u5)})},[n,de]),Ue=q.useCallback(ke=>{ke?.isIntersecting&&xe()},[xe]);h5(c,Ue,O5,{disabled:!!N||ue!=="viewport"}),q.useEffect(()=>{l.current||!N&&ue==="render"&&(xe(),l.current=!0)},[N,xe,ue]);const De=ke=>{const Le=ke.currentTarget.getAttribute("target"),oe=k!==void 0?k:Le;if(!N&&!L5(ke)&&!ke.defaultPrevented&&(!oe||oe==="_self")&&ke.button===0){ke.preventDefault(),C5.flushSync(()=>{s(!0)});const me=n.subscribe("onResolved",()=>{me(),s(!1)});n.navigate({...de,replace:w,resetScroll:E,hashScrollIntoView:x,startTransition:y,viewTransition:_,ignoreBlocker:F})}};if(ne)return{...U,ref:c,href:ne,...S&&{children:S},...k&&{target:k},...N&&{disabled:N},...T&&{style:T},...O&&{className:O},...R&&{onClick:R},...L&&{onFocus:L},...D&&{onMouseEnter:D},...I&&{onMouseLeave:I},...H&&{onTouchStart:H}};const ve=ke=>{N||ue&&xe()},Se=ve,Qe=ke=>{if(!(N||!ue))if(!ge)xe();else{const Le=ke.target;if(_o.has(Le))return;const oe=setTimeout(()=>{_o.delete(Le),xe()},ge);_o.set(Le,oe)}},kt=ke=>{if(N||!ue||!ge)return;const Le=ke.target,oe=_o.get(Le);oe&&(clearTimeout(oe),_o.delete(Le))},Je=be?Si(d,{})??T5:bf,ot=be?bf:Si(h,{})??bf,Xe=[O,Je.className,ot.className].filter(Boolean).join(" "),mt=(T||Je.style||ot.style)&&{...T,...Je.style,...ot.style};return{...U,...Je,...ot,href:z?.href,ref:c,onClick:So([R,De]),onFocus:So([L,ve]),onMouseEnter:So([D,Qe]),onMouseLeave:So([I,kt]),onTouchStart:So([H,Se]),disabled:!!N,target:k,...mt&&{style:mt},...Xe&&{className:Xe},...N&&A5,...be&&R5,...i&&N5}}const bf={},T5={className:"active"},A5={role:"link","aria-disabled":!0},R5={"data-status":"active","aria-current":"page"},N5={"data-transitioning":"transitioning"},_o=new WeakMap,O5={rootMargin:"100px"},So=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},eO=q.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:s,...l}=k5(i,t),c=typeof i.children=="function"?i.children({isActive:l["data-status"]==="active"}):i.children;if(!n){const{disabled:o,...d}=l;return q.createElement("a",d,c)}return q.createElement(n,l,c)});function L5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let I5=class extends ZN{constructor(t){super(t),this.useMatch=n=>Sr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Sr({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>A_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>T_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>k_({...n,from:this.id}),this.useLoaderData=n=>C_({...n,from:this.id}),this.useNavigate=()=>fu({from:this.fullPath}),this.Link=Yt.forwardRef((n,i)=>v.jsx(eO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function D5(e){return new I5(e)}class M5 extends d5{constructor(t){super(t),this.useMatch=n=>Sr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Sr({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>A_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>T_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>k_({...n,from:this.id}),this.useLoaderData=n=>C_({...n,from:this.id}),this.useNavigate=()=>fu({from:this.fullPath}),this.Link=Yt.forwardRef((n,i)=>v.jsx(eO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function B5(e){return new M5(e)}function Mo(e){return typeof e=="object"?new Yx(e,{silent:!0}).createRoute(e):new Yx(e,{silent:!0}).createRoute}class Yx{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const s=D5(i);return s.isRoot=!1,s},this.silent=n?.silent}}class Xx{constructor(t){this.useMatch=n=>Sr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Sr({from:this.options.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>A_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>T_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>k_({...n,from:this.options.id}),this.useLoaderData=n=>C_({...n,from:this.options.id}),this.useNavigate=()=>{const n=Fn();return fu({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Zx(e){return typeof e=="object"?new Xx(e):t=>new Xx({id:e,...t})}function F5(){const e=Fn(),t=q.useRef({router:e,mounted:!1}),[n,i]=q.useState(!1),{hasPendingMatches:s,isLoading:l}=vn({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),c=df(l),o=l||n||s,d=df(o),h=l||s,p=df(h);return e.startTransition=f=>{i(!0),q.startTransition(()=>{f(),i(!1)})},q.useEffect(()=>{const f=e.history.subscribe(({navigateOpts:g})=>{g?.skipTransitionerLoad||e.load()}),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return yr(e.latestLocation.publicHref)!==yr(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{f()}},[e,e.history]),yc(()=>{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(b){console.error(b)}})()},[e]),yc(()=>{c&&!l&&e.emit({type:"onLoad",...ia(e.state)})},[c,e,l]),yc(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...ia(e.state)})},[h,p,e]),yc(()=>{if(d&&!o){const f=ia(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(b=>({...b,status:"idle",resolvedLocation:b.location})),f.hrefChanged&&H4(e)}},[o,d,e]),null}function j5(e){const t=vn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return v.jsx(w_,{getResetKey:()=>t,onCatch:(n,i)=>{if(Dn(n))e.onCatch?.(n,i);else throw n},errorComponent:({error:n})=>{if(Dn(n))return e.fallback?.(n);throw n},children:e.children})}function P5(){return v.jsx("p",{children:"Not Found"})}function ss(e){return v.jsx(v.Fragment,{children:e.children})}function tO(e,t,n){return t.options.notFoundComponent?v.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?v.jsx(e.options.defaultNotFoundComponent,{...n}):v.jsx(P5,{})}function U5({children:e}){const t=Fn();return t.isServer?v.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function H5(){const e=Fn();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Dv)(e.latestLocation),i=n!==Dv(e.latestLocation)?n:void 0,s={storageKey:Xc,shouldScrollRestoration:!0};return i&&(s.key=i),v.jsx(U5,{children:`(${zN.toString()})(${v4(JSON.stringify(s))})`})}const nO=q.memo(function({matchId:t}){const n=Fn(),i=vn({select:E=>{const _=E.matches.find(S=>S.id===t);return zr(_),{routeId:_.routeId,ssr:_.ssr,_displayPending:_._displayPending}},structuralSharing:!0}),s=n.routesById[i.routeId],l=s.options.pendingComponent??n.options.defaultPendingComponent,c=l?v.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))?q.Suspense:ss,b=o?w_:ss,g=h?j5:ss,x=vn({select:E=>E.loadedAt}),w=vn({select:E=>{const _=E.matches.findIndex(S=>S.id===t);return E.matches[_-1]?.routeId}}),y=s.isRoot?s.options.shellComponent??ss:ss;return v.jsxs(y,{children:[v.jsx(hu.Provider,{value:t,children:v.jsx(f,{fallback:c,children:v.jsx(b,{getResetKey:()=>x,errorComponent:o||du,onCatch:(E,_)=>{if(Dn(E))throw E;d?.(E,_)},children:v.jsx(g,{fallback:E=>{if(!h||E.routeId&&E.routeId!==i.routeId||!E.routeId&&!s.isRoot)throw E;return q.createElement(h,E)},children:p||i._displayPending?v.jsx(m5,{fallback:c,children:v.jsx(Qx,{matchId:t})}):v.jsx(Qx,{matchId:t})})})})}),w===bn&&n.options.scrollRestoration?v.jsxs(v.Fragment,{children:[v.jsx(z5,{}),v.jsx(H5,{})]}):null]})});function z5(){const e=Fn(),t=q.useRef(void 0);return v.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ia(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Qx=q.memo(function({matchId:t}){const n=Fn(),{match:i,key:s,routeId:l}=vn({select:d=>{const h=d.matches.find(x=>x.id===t),p=h.routeId,b=(n.routesById[p].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:p,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:b?JSON.stringify(b):void 0,routeId:p,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),c=n.routesById[l],o=q.useMemo(()=>{const d=c.options.component??n.options.defaultComponent;return d?v.jsx(d,{},s):v.jsx(rO,{})},[s,c.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=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(i.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const p=ds();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 zr(Dn(i.error)),tO(n,c,i.error);if(i.status==="redirected")throw zr(Jn(i.error)),n.getMatch(i.id)?._nonReactive.loadPromise;if(i.status==="error"){if(n.isServer){const d=(c.options.errorComponent??n.options.defaultErrorComponent)||du;return v.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}})}throw i.error}return o}),rO=q.memo(function(){const t=Fn(),n=q.useContext(hu),i=vn({select:h=>h.matches.find(p=>p.id===n)?.routeId}),s=t.routesById[i],l=vn({select:h=>{const f=h.matches.find(b=>b.id===n);return zr(f),f.globalNotFound}}),c=vn({select:h=>{const p=h.matches,f=p.findIndex(b=>b.id===n);return p[f+1]?.id}}),o=t.options.defaultPendingComponent?v.jsx(t.options.defaultPendingComponent,{}):null;if(l)return tO(t,s,void 0);if(!c)return null;const d=v.jsx(nO,{matchId:c});return i===bn?v.jsx(q.Suspense,{fallback:o,children:d}):d});function q5(){const e=Fn(),n=e.routesById[bn].options.pendingComponent??e.options.defaultPendingComponent,i=n?v.jsx(n,{}):null,s=e.isServer||typeof document<"u"&&e.ssr?ss:q.Suspense,l=v.jsxs(s,{fallback:i,children:[!e.isServer&&v.jsx(F5,{}),v.jsx($5,{})]});return e.options.InnerWrap?v.jsx(e.options.InnerWrap,{children:l}):l}function $5(){const e=Fn(),t=vn({select:s=>s.matches[0]?.id}),n=vn({select:s=>s.loadedAt}),i=t?v.jsx(nO,{matchId:t}):null;return v.jsx(hu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:v.jsx(w_,{getResetKey:()=>n,errorComponent:du,onCatch:s=>{s.message||s.toString()},children:i})})}const G5=e=>new V5(e);class V5 extends n5{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Mo,globalThis.createLazyFileRoute=Zx):typeof window<"u"&&(window.createFileRoute=Mo,window.createLazyFileRoute=Zx);function W5({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=JN(),s=v.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?v.jsx(e.options.Wrap,{children:s}):s}function K5({router:e,...t}){return v.jsx(W5,{router:e,...t,children:v.jsx(q5,{})})}const pu=B5({component:Y5});function Y5(){return v.jsxs(v.Fragment,{children:[v.jsx(rO,{}),null]})}const X5=Mo("/")({beforeLoad:()=>{throw x_({to:"/sessions"})},component:()=>null}),it=q.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",c={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 v.jsx("button",{ref:s,className:`${l} ${c[t]} ${o[n]} ${e}`,...i})});it.displayName="Button";const Z5=q.forwardRef(({className:e="",children:t,...n},i)=>v.jsx("div",{ref:i,className:`bg-card text-card-foreground border border-border rounded-lg ${e}`,...n,children:t}));Z5.displayName="Card";const Q5=q.forwardRef(({className:e="",...t},n)=>v.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}));Q5.displayName="Input";const mu=q.forwardRef(({className:e="",...t},n)=>v.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}));mu.displayName="Textarea";const Jx=e=>{let t;const n=new Set,i=(h,p)=>{const f=typeof h=="function"?h(t):h;if(!Object.is(f,t)){const b=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(g=>g(t,b))}},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},J5=(e=>e?Jx(e):Jx),e6=e=>e;function t6(e,t=e6){const n=Yt.useSyncExternalStore(e.subscribe,Yt.useCallback(()=>t(e.getState()),[e,t]),Yt.useCallback(()=>t(e.getInitialState()),[e,t]));return Yt.useDebugValue(n),n}const ew=e=>{const t=J5(e),n=i=>t6(t,i);return Object.assign(n,t),n},lr=(e=>e?ew(e):ew),R_=lr(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 n6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r6=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),tw=e=>{const t=r6(e);return t.charAt(0).toUpperCase()+t.slice(1)},iO=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),i6=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var a6={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 s6=q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...o},d)=>q.createElement("svg",{ref:d,...a6,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:iO("lucide",s),...!l&&!i6(o)&&{"aria-hidden":"true"},...o},[...c.map(([h,p])=>q.createElement(h,p)),...Array.isArray(l)?l:[l]]));const Ee=(e,t)=>{const n=q.forwardRef(({className:i,...s},l)=>q.createElement(s6,{ref:l,iconNode:t,className:iO(`lucide-${n6(tw(e))}`,`lucide-${e}`,i),...s}));return n.displayName=tw(e),n};const o6=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],l6=Ee("arrow-down-to-line",o6);const c6=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],u6=Ee("arrow-down",c6);const d6=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],h6=Ee("arrow-left",d6);const f6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],p6=Ee("arrow-right",f6);const m6=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],aO=Ee("arrow-up-right",m6);const g6=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],sO=Ee("arrow-up",g6);const b6=[["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"}]],y6=Ee("bot",b6);const v6=[["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"}]],_6=Ee("braces",v6);const S6=[["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"}]],N_=Ee("brain",S6);const E6=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ua=Ee("check",E6);const x6=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bs=Ee("chevron-down",x6);const w6=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],C6=Ee("chevron-left",w6);const k6=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],en=Ee("chevron-right",k6);const T6=[["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"}]],Gr=Ee("circle-alert",T6);const A6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],R6=Ee("circle-check",A6);const N6=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],O6=Ee("circle-check-big",N6);const L6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],oO=Ee("circle-stop",L6);const I6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],lO=Ee("circle-x",I6);const D6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],M6=Ee("circle",D6);const B6=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cO=Ee("clock",B6);const F6=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],j6=Ee("code",F6);const P6=[["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"}]],nw=Ee("command",P6);const U6=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],uO=Ee("copy",U6);const H6=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],z6=Ee("credit-card",H6);const q6=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],$6=Ee("database",q6);const G6=[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]],rw=Ee("diff",G6);const V6=[["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"}]],dO=Ee("dollar-sign",V6);const W6=[["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"}]],K6=Ee("ellipsis-vertical",W6);const Y6=[["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"}]],da=Ee("external-link",Y6);const X6=[["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"}]],hO=Ee("file-code",X6);const Z6=[["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"}]],Q6=Ee("file-json",Z6);const J6=[["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"}]],ha=Ee("file-pen",J6);const eB=[["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"}]],fO=Ee("file-plus",eB);const tB=[["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"}]],gu=Ee("file-text",tB);const nB=[["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"}]],rB=Ee("file-type",nB);const iB=[["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"}]],aB=Ee("file-x",iB);const sB=[["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"}]],Ai=Ee("file",sB);const oB=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Bo=Ee("flask-conical",oB);const lB=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],cB=Ee("folder-open",lB);const uB=[["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"}]],pO=Ee("folder-tree",uB);const dB=[["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"}]],hB=Ee("folder",dB);const fB=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],pB=Ee("funnel",fB);const mB=[["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"}]],Bn=Ee("git-branch",mB);const gB=[["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"}]],Jc=Ee("git-commit-horizontal",gB);const bB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],yB=Ee("globe",bB);const vB=[["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"}]],mO=Ee("hash",vB);const _B=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],SB=Ee("history",_B);const EB=[["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"}]],gO=Ee("image",EB);const xB=[["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"}]],bO=Ee("keyboard",xB);const wB=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],CB=Ee("link-2",wB);const kB=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],TB=Ee("link",kB);const AB=[["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"}]],RB=Ee("list",AB);const NB=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],xi=Ee("loader-circle",NB);const OB=[["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"}]],yO=Ee("message-square",OB);const LB=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],IB=Ee("minimize-2",LB);const DB=[["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"}]],MB=Ee("octagon-x",DB);const BB=[["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"}]],iw=Ee("pencil",BB);const FB=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Fo=Ee("plus",FB);const jB=[["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"}]],vO=Ee("refresh-cw",jB);const PB=[["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"}]],_O=Ee("rotate-ccw",PB);const UB=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$o=Ee("search",UB);const HB=[["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"}]],jo=Ee("sparkles",HB);const zB=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],qB=Ee("split",zB);const $B=[["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"}]],GB=Ee("square-check-big",$B);const VB=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],fa=Ee("terminal",VB);const WB=[["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"}]],SO=Ee("trash-2",WB);const KB=[["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"}]],YB=Ee("upload",KB);const XB=[["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"}]],EO=Ee("user",XB);const ZB=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],er=Ee("x",ZB);function QB(){const{isOpen:e,title:t,message:n,confirmLabel:i,cancelLabel:s,variant:l,onConfirm:c,onCancel:o,closeConfirmation:d}=R_(),[h,p]=q.useState(!1);q.useEffect(()=>{e||p(!1)},[e]);const f=q.useCallback(async()=>{p(!0);try{await c(),d()}catch(x){console.error("Confirmation action failed:",x),p(!1)}},[c,d]),b=q.useCallback(()=>{o?.(),d()},[o,d]),g=x=>{x.target===x.currentTarget&&!h&&b()};return q.useEffect(()=>{const x=w=>{if(e&&!h){const y=w.target,E=y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.isContentEditable;(w.key==="Escape"||w.key==="q"&&!E)&&(w.preventDefault(),b()),w.key==="Enter"&&(w.preventDefault(),f())}};if(e)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,h,f,b]),e?v.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:g,onKeyDown:x=>{const w=x.target,y=w.tagName==="INPUT"||w.tagName==="TEXTAREA"||w.isContentEditable;(x.key==="Escape"||x.key==="q"&&!y)&&!h&&(x.preventDefault(),b())},children:v.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg max-w-md w-full mx-4",children:[v.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[l==="destructive"&&v.jsx(Gr,{className:"w-5 h-5 text-destructive"}),v.jsx("h2",{className:"text-lg font-semibold",children:t})]}),v.jsx("button",{type:"button",onClick:b,disabled:h,className:"p-1 hover:bg-muted rounded transition-colors disabled:opacity-50","aria-label":"Close",children:v.jsx(er,{className:"w-5 h-5"})})]}),v.jsx("div",{className:"p-4",children:v.jsx("p",{className:"text-muted-foreground",children:n})}),v.jsxs("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-border",children:[v.jsx("button",{type:"button",onClick:b,disabled:h,className:"px-4 py-2 text-sm font-medium rounded transition-colors hover:bg-muted disabled:opacity-50",children:s}),v.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}let JB=0;const fs=lr(e=>({toasts:[],addToast:t=>{const n=`toast-${++JB}`;return e(i=>({toasts:[...i.toasts,{...t,id:n}]})),n},removeToast:t=>e(n=>({toasts:n.toasts.filter(i=>i.id!==t)})),updateToast:(t,n)=>e(i=>({toasts:i.toasts.map(s=>s.id===t?{...s,...n}:s)})),clearToasts:()=>e({toasts:[]})}));function vr(e,t="default",n=4e3){const i=fs.getState().addToast({message:e,type:t,duration:n});return n>0&&setTimeout(()=>{fs.getState().removeToast(i)},n),i}vr.success=(e,t=4e3)=>vr(e,"success",t);vr.error=(e,t=5e3)=>vr(e,"error",t);vr.loading=e=>vr(e,"loading",0);const eF={default:v.jsx(z6,{className:"h-4 w-4"}),success:v.jsx(O6,{className:"h-4 w-4 text-green-500"}),error:v.jsx(lO,{className:"h-4 w-4 text-red-500"}),loading:v.jsx(xi,{className:"h-4 w-4 animate-spin"})};function tF({toast:e}){const[t,n]=q.useState(!1),i=fs(l=>l.removeToast);q.useEffect(()=>{requestAnimationFrame(()=>n(!0))},[]);const s=()=>{n(!1),setTimeout(()=>i(e.id),150)};return v.jsxs("div",{className:`
9
+ `).replace(FM,"")}function IE(r,a){return a=LE(a),LE(r)===a}function ct(r,a,u,m,C,A){switch(u){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||ka(r,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&ka(r,""+m);break;case"className":rl(r,"class",m);break;case"tabIndex":rl(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":rl(r,u,m);break;case"style":IS(r,m,A);break;case"data":if(a!=="object"){rl(r,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||u!=="href")){r.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(u);break}m=al(""+m),r.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(u,"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 A=="function"&&(u==="formAction"?(a!=="input"&&ct(r,a,"name",C.name,C,null),ct(r,a,"formEncType",C.formEncType,C,null),ct(r,a,"formMethod",C.formMethod,C,null),ct(r,a,"formTarget",C.formTarget,C,null)):(ct(r,a,"encType",C.encType,C,null),ct(r,a,"method",C.method,C,null),ct(r,a,"target",C.target,C,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(u);break}m=al(""+m),r.setAttribute(u,m);break;case"onClick":m!=null&&(r.onclick=wr);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(u=m.__html,u!=null){if(C.children!=null)throw Error(i(60));r.innerHTML=u}}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}u=al(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);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(u,""+m):r.removeAttribute(u);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(u,""):r.removeAttribute(u);break;case"capture":case"download":m===!0?r.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(u,m):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(u,m):r.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(u):r.setAttribute(u,m);break;case"popover":$e("beforetoggle",r),$e("toggle",r),nl(r,"popover",m);break;case"xlinkActuate":xr(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":xr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":xr(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":xr(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":xr(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":xr(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":xr(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":xr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":xr(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":nl(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=dD.get(u)||u,nl(r,u,m))}}function Lh(r,a,u,m,C,A){switch(u){case"style":IS(r,m,A);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(u=m.__html,u!=null){if(C.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"children":typeof m=="string"?ka(r,m):(typeof m=="number"||typeof m=="bigint")&&ka(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=wr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wS.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(C=u.endsWith("Capture"),a=u.slice(2,C?u.length-7:void 0),A=r[cn]||null,A=A!=null?A[u]:null,typeof A=="function"&&r.removeEventListener(a,A,C),typeof m=="function")){typeof A!="function"&&A!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(a,m,C);break e}u in r?r[u]=m:m===!0?r.setAttribute(u,""):nl(r,u,m)}}}function Wt(r,a,u){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,C=!1,A;for(A in u)if(u.hasOwnProperty(A)){var B=u[A];if(B!=null)switch(A){case"src":m=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:ct(r,a,A,B,u,null)}}C&&ct(r,a,"srcSet",u.srcSet,u,null),m&&ct(r,a,"src",u.src,u,null);return;case"input":$e("invalid",r);var $=A=B=C=null,Q=null,ie=null;for(m in u)if(u.hasOwnProperty(m)){var he=u[m];if(he!=null)switch(m){case"name":C=he;break;case"type":B=he;break;case"checked":Q=he;break;case"defaultChecked":ie=he;break;case"value":A=he;break;case"defaultValue":$=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,a));break;default:ct(r,a,m,he,u,null)}}RS(r,A,$,Q,ie,B,C,!1);return;case"select":$e("invalid",r),m=B=A=null;for(C in u)if(u.hasOwnProperty(C)&&($=u[C],$!=null))switch(C){case"value":A=$;break;case"defaultValue":B=$;break;case"multiple":m=$;default:ct(r,a,C,$,u,null)}a=A,u=B,r.multiple=!!m,a!=null?Ca(r,!!m,a,!1):u!=null&&Ca(r,!!m,u,!0);return;case"textarea":$e("invalid",r),A=C=m=null;for(B in u)if(u.hasOwnProperty(B)&&($=u[B],$!=null))switch(B){case"value":m=$;break;case"defaultValue":C=$;break;case"children":A=$;break;case"dangerouslySetInnerHTML":if($!=null)throw Error(i(91));break;default:ct(r,a,B,$,u,null)}OS(r,m,C,A);return;case"option":for(Q in u)u.hasOwnProperty(Q)&&(m=u[Q],m!=null)&&(Q==="selected"?r.selected=m&&typeof m!="function"&&typeof m!="symbol":ct(r,a,Q,m,u,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<so.length;m++)$e(so[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(ie in u)if(u.hasOwnProperty(ie)&&(m=u[ie],m!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:ct(r,a,ie,m,u,null)}return;default:if(Vu(a)){for(he in u)u.hasOwnProperty(he)&&(m=u[he],m!==void 0&&Lh(r,a,he,m,u,void 0));return}}for($ in u)u.hasOwnProperty($)&&(m=u[$],m!=null&&ct(r,a,$,m,u,null))}function jM(r,a,u,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,A=null,B=null,$=null,Q=null,ie=null,he=null;for(ce in u){var pe=u[ce];if(u.hasOwnProperty(ce)&&pe!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":Q=pe;default:m.hasOwnProperty(ce)||ct(r,a,ce,null,m,pe)}}for(var se in m){var ce=m[se];if(pe=u[se],m.hasOwnProperty(se)&&(ce!=null||pe!=null))switch(se){case"type":A=ce;break;case"name":C=ce;break;case"checked":ie=ce;break;case"defaultChecked":he=ce;break;case"value":B=ce;break;case"defaultValue":$=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:ce!==pe&&ct(r,a,se,ce,m,pe)}}$u(r,B,$,Q,ie,he,A,C);return;case"select":ce=B=$=se=null;for(A in u)if(Q=u[A],u.hasOwnProperty(A)&&Q!=null)switch(A){case"value":break;case"multiple":ce=Q;default:m.hasOwnProperty(A)||ct(r,a,A,null,m,Q)}for(C in m)if(A=m[C],Q=u[C],m.hasOwnProperty(C)&&(A!=null||Q!=null))switch(C){case"value":se=A;break;case"defaultValue":$=A;break;case"multiple":B=A;default:A!==Q&&ct(r,a,C,A,m,Q)}a=$,u=B,m=ce,se!=null?Ca(r,!!u,se,!1):!!m!=!!u&&(a!=null?Ca(r,!!u,a,!0):Ca(r,!!u,u?[]:"",!1));return;case"textarea":ce=se=null;for($ in u)if(C=u[$],u.hasOwnProperty($)&&C!=null&&!m.hasOwnProperty($))switch($){case"value":break;case"children":break;default:ct(r,a,$,null,m,C)}for(B in m)if(C=m[B],A=u[B],m.hasOwnProperty(B)&&(C!=null||A!=null))switch(B){case"value":se=C;break;case"defaultValue":ce=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(i(91));break;default:C!==A&&ct(r,a,B,C,m,A)}NS(r,se,ce);return;case"option":for(var we in u)se=u[we],u.hasOwnProperty(we)&&se!=null&&!m.hasOwnProperty(we)&&(we==="selected"?r.selected=!1:ct(r,a,we,null,m,se));for(Q in m)se=m[Q],ce=u[Q],m.hasOwnProperty(Q)&&se!==ce&&(se!=null||ce!=null)&&(Q==="selected"?r.selected=se&&typeof se!="function"&&typeof se!="symbol":ct(r,a,Q,se,m,ce));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 Oe in u)se=u[Oe],u.hasOwnProperty(Oe)&&se!=null&&!m.hasOwnProperty(Oe)&&ct(r,a,Oe,null,m,se);for(ie in m)if(se=m[ie],ce=u[ie],m.hasOwnProperty(ie)&&se!==ce&&(se!=null||ce!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(i(137,a));break;default:ct(r,a,ie,se,m,ce)}return;default:if(Vu(a)){for(var ut in u)se=u[ut],u.hasOwnProperty(ut)&&se!==void 0&&!m.hasOwnProperty(ut)&&Lh(r,a,ut,void 0,m,se);for(he in m)se=m[he],ce=u[he],!m.hasOwnProperty(he)||se===ce||se===void 0&&ce===void 0||Lh(r,a,he,se,m,ce);return}}for(var te in u)se=u[te],u.hasOwnProperty(te)&&se!=null&&!m.hasOwnProperty(te)&&ct(r,a,te,null,m,se);for(pe in m)se=m[pe],ce=u[pe],!m.hasOwnProperty(pe)||se===ce||se==null&&ce==null||ct(r,a,pe,se,m,ce)}function DE(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PM(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var C=u[m],A=C.transferSize,B=C.initiatorType,$=C.duration;if(A&&$&&DE(B)){for(B=0,$=C.responseEnd,m+=1;m<u.length;m++){var Q=u[m],ie=Q.startTime;if(ie>$)break;var he=Q.transferSize,pe=Q.initiatorType;he&&DE(pe)&&(Q=Q.responseEnd,B+=he*(Q<$?1:($-ie)/(Q-ie)))}if(--m,a+=8*(A+B)/(C.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 Ih=null,Dh=null;function ec(r){return r.nodeType===9?r:r.ownerDocument}function ME(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 BE(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 Mh(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 Bh=null;function UM(){var r=window.event;return r&&r.type==="popstate"?r===Bh?!1:(Bh=r,!0):(Bh=null,!1)}var FE=typeof setTimeout=="function"?setTimeout:void 0,HM=typeof clearTimeout=="function"?clearTimeout:void 0,jE=typeof Promise=="function"?Promise:void 0,zM=typeof queueMicrotask=="function"?queueMicrotask:typeof jE<"u"?function(r){return jE.resolve(null).then(r).catch(qM)}:FE;function qM(r){setTimeout(function(){throw r})}function fi(r){return r==="head"}function PE(r,a){var u=a,m=0;do{var C=u.nextSibling;if(r.removeChild(u),C&&C.nodeType===8)if(u=C.data,u==="/$"||u==="/&"){if(m===0){r.removeChild(C),rs(a);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")lo(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,lo(u);for(var A=u.firstChild;A;){var B=A.nextSibling,$=A.nodeName;A[ks]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&A.rel.toLowerCase()==="stylesheet"||u.removeChild(A),A=B}}else u==="body"&&lo(r.ownerDocument.body);u=C}while(u);rs(a)}function UE(r,a){var u=r;r=0;do{var m=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=m}while(u)}function Fh(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Fh(u),zu(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function $M(r,a,u,m){for(;r.nodeType===1;){var C=u;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[ks])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(A=r.getAttribute("rel"),A==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(A!==C.rel||r.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||r.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||r.getAttribute("title")!==(C.title==null?null:C.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(A=r.getAttribute("src"),(A!==(C.src==null?null:C.src)||r.getAttribute("type")!==(C.type==null?null:C.type)||r.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&A&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var A=C.name==null?null:""+C.name;if(C.type==="hidden"&&r.getAttribute("name")===A)return r}else return r;if(r=Wn(r.nextSibling),r===null)break}return null}function GM(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=Wn(r.nextSibling),r===null))return null;return r}function HE(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=Wn(r.nextSibling),r===null))return null;return r}function jh(r){return r.data==="$?"||r.data==="$~"}function Ph(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function VM(r,a){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||u.readyState!=="loading")a();else{var m=function(){a(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function Wn(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 Uh=null;function zE(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(a===0)return Wn(r.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}r=r.nextSibling}return null}function qE(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return r;a--}else u!=="/$"&&u!=="/&"||a++}r=r.previousSibling}return null}function $E(r,a,u){switch(a=ec(u),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 lo(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);zu(r)}var Kn=new Map,GE=new Set;function tc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Ur=X.d;X.d={f:WM,r:KM,D:YM,C:XM,L:ZM,m:QM,X:e3,S:JM,M:t3};function WM(){var r=Ur.f(),a=Vl();return r||a}function KM(r){var a=Ea(r);a!==null&&a.tag===5&&a.type==="form"?l1(a):Ur.r(r)}var es=typeof document>"u"?null:document;function VE(r,a,u){var m=es;if(m&&typeof a=="string"&&a){var C=Un(a);C='link[rel="'+r+'"][href="'+C+'"]',typeof u=="string"&&(C+='[crossorigin="'+u+'"]'),GE.has(C)||(GE.add(C),r={rel:r,crossOrigin:u,href:a},m.querySelector(C)===null&&(a=m.createElement("link"),Wt(a,"link",r),Ht(a),m.head.appendChild(a)))}}function YM(r){Ur.D(r),VE("dns-prefetch",r,null)}function XM(r,a){Ur.C(r,a),VE("preconnect",r,a)}function ZM(r,a,u){Ur.L(r,a,u);var m=es;if(m&&r&&a){var C='link[rel="preload"][as="'+Un(a)+'"]';a==="image"&&u&&u.imageSrcSet?(C+='[imagesrcset="'+Un(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(C+='[imagesizes="'+Un(u.imageSizes)+'"]')):C+='[href="'+Un(r)+'"]';var A=C;switch(a){case"style":A=ts(r);break;case"script":A=ns(r)}Kn.has(A)||(r=f({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),Kn.set(A,r),m.querySelector(C)!==null||a==="style"&&m.querySelector(co(A))||a==="script"&&m.querySelector(uo(A))||(a=m.createElement("link"),Wt(a,"link",r),Ht(a),m.head.appendChild(a)))}}function QM(r,a){Ur.m(r,a);var u=es;if(u&&r){var m=a&&typeof a.as=="string"?a.as:"script",C='link[rel="modulepreload"][as="'+Un(m)+'"][href="'+Un(r)+'"]',A=C;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=ns(r)}if(!Kn.has(A)&&(r=f({rel:"modulepreload",href:r},a),Kn.set(A,r),u.querySelector(C)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(uo(A)))return}m=u.createElement("link"),Wt(m,"link",r),Ht(m),u.head.appendChild(m)}}}function JM(r,a,u){Ur.S(r,a,u);var m=es;if(m&&r){var C=xa(m).hoistableStyles,A=ts(r);a=a||"default";var B=C.get(A);if(!B){var $={loading:0,preload:null};if(B=m.querySelector(co(A)))$.loading=5;else{r=f({rel:"stylesheet",href:r,"data-precedence":a},u),(u=Kn.get(A))&&Hh(r,u);var Q=B=m.createElement("link");Ht(Q),Wt(Q,"link",r),Q._p=new Promise(function(ie,he){Q.onload=ie,Q.onerror=he}),Q.addEventListener("load",function(){$.loading|=1}),Q.addEventListener("error",function(){$.loading|=2}),$.loading|=4,nc(B,a,m)}B={type:"stylesheet",instance:B,count:1,state:$},C.set(A,B)}}}function e3(r,a){Ur.X(r,a);var u=es;if(u&&r){var m=xa(u).hoistableScripts,C=ns(r),A=m.get(C);A||(A=u.querySelector(uo(C)),A||(r=f({src:r,async:!0},a),(a=Kn.get(C))&&zh(r,a),A=u.createElement("script"),Ht(A),Wt(A,"link",r),u.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(C,A))}}function t3(r,a){Ur.M(r,a);var u=es;if(u&&r){var m=xa(u).hoistableScripts,C=ns(r),A=m.get(C);A||(A=u.querySelector(uo(C)),A||(r=f({src:r,async:!0,type:"module"},a),(a=Kn.get(C))&&zh(r,a),A=u.createElement("script"),Ht(A),Wt(A,"link",r),u.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(C,A))}}function WE(r,a,u,m){var C=(C=de.current)?tc(C):null;if(!C)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=ts(u.href),u=xa(C).hoistableStyles,m=u.get(a),m||(m={type:"style",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=ts(u.href);var A=xa(C).hoistableStyles,B=A.get(r);if(B||(C=C.ownerDocument||C,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(r,B),(A=C.querySelector(co(r)))&&!A._p&&(B.instance=A,B.state.loading=5),Kn.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Kn.set(r,u),A||n3(C,r,u,B.state))),a&&m===null)throw Error(i(528,""));return B}if(a&&m!==null)throw Error(i(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=ns(u),u=xa(C).hoistableScripts,m=u.get(a),m||(m={type:"script",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function ts(r){return'href="'+Un(r)+'"'}function co(r){return'link[rel="stylesheet"]['+r+"]"}function KE(r){return f({},r,{"data-precedence":r.precedence,precedence:null})}function n3(r,a,u,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}),Wt(a,"link",u),Ht(a),r.head.appendChild(a))}function ns(r){return'[src="'+Un(r)+'"]'}function uo(r){return"script[async]"+r}function YE(r,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var m=r.querySelector('style[data-href~="'+Un(u.href)+'"]');if(m)return a.instance=m,Ht(m),m;var C=f({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Ht(m),Wt(m,"style",C),nc(m,u.precedence,r),a.instance=m;case"stylesheet":C=ts(u.href);var A=r.querySelector(co(C));if(A)return a.state.loading|=4,a.instance=A,Ht(A),A;m=KE(u),(C=Kn.get(C))&&Hh(m,C),A=(r.ownerDocument||r).createElement("link"),Ht(A);var B=A;return B._p=new Promise(function($,Q){B.onload=$,B.onerror=Q}),Wt(A,"link",m),a.state.loading|=4,nc(A,u.precedence,r),a.instance=A;case"script":return A=ns(u.src),(C=r.querySelector(uo(A)))?(a.instance=C,Ht(C),C):(m=u,(C=Kn.get(A))&&(m=f({},u),zh(m,C)),r=r.ownerDocument||r,C=r.createElement("script"),Ht(C),Wt(C,"link",m),r.head.appendChild(C),a.instance=C);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,nc(m,u.precedence,r));return a.instance}function nc(r,a,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=m.length?m[m.length-1]:null,A=C,B=0;B<m.length;B++){var $=m[B];if($.dataset.precedence===a)A=$;else if(A!==C)break}A?A.parentNode.insertBefore(r,A.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(r,a.firstChild))}function Hh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function zh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var rc=null;function XE(r,a,u){if(rc===null){var m=new Map,C=rc=new Map;C.set(u,m)}else C=rc,m=C.get(u),m||(m=new Map,C.set(u,m));if(m.has(r))return m;for(m.set(r,null),u=u.getElementsByTagName(r),C=0;C<u.length;C++){var A=u[C];if(!(A[ks]||A[qt]||r==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var B=A.getAttribute(a)||"";B=r+B;var $=m.get(B);$?$.push(A):m.set(B,[A])}}return m}function ZE(r,a,u){r=r.ownerDocument||r,r.head.insertBefore(u,a==="title"?r.querySelector("head > title"):null)}function r3(r,a,u){if(u===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;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!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 QE(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function i3(r,a,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var C=ts(m.href),A=a.querySelector(co(C));if(A){a=A._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=ic.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=A,Ht(A);return}A=a.ownerDocument||a,m=KE(m),(C=Kn.get(C))&&Hh(m,C),A=A.createElement("link"),Ht(A);var B=A;B._p=new Promise(function($,Q){B.onload=$,B.onerror=Q}),Wt(A,"link",m),u.instance=A}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=ic.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var qh=0;function a3(r,a){return r.stylesheets&&r.count===0&&sc(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var m=setTimeout(function(){if(r.stylesheets&&sc(r,r.stylesheets),r.unsuspend){var A=r.unsuspend;r.unsuspend=null,A()}},6e4+a);0<r.imgBytes&&qh===0&&(qh=62500*PM());var C=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&sc(r,r.stylesheets),r.unsuspend)){var A=r.unsuspend;r.unsuspend=null,A()}},(r.imgBytes>qh?50:800)+a);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(C)}}:null}function ic(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var ac=null;function sc(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,ac=new Map,a.forEach(s3,r),ac=null,ic.call(r))}function s3(r,a){if(!(a.state.loading&4)){var u=ac.get(r);if(u)var m=u.get(null);else{u=new Map,ac.set(r,u);for(var C=r.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<C.length;A++){var B=C[A];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(u.set(B.dataset.precedence,B),m=B)}m&&u.set(null,m)}C=a.instance,B=C.getAttribute("data-precedence"),A=u.get(B)||m,A===m&&u.set(null,C),u.set(B,C),this.count++,m=ic.bind(this),C.addEventListener("load",m),C.addEventListener("error",m),A?A.parentNode.insertBefore(C,A.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(C,r.firstChild)),a.state.loading|=4}}var ho={$$typeof:S,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function o3(r,a,u,m,C,A,B,$,Q){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=ju(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ju(0),this.hiddenUpdates=ju(null),this.identifierPrefix=m,this.onUncaughtError=C,this.onCaughtError=A,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function JE(r,a,u,m,C,A,B,$,Q,ie,he,pe){return r=new o3(r,a,u,B,Q,ie,he,pe,$),a=1,A===!0&&(a|=24),A=kn(3,null,null,a),r.current=A,A.stateNode=r,a=Ed(),a.refCount++,r.pooledCache=a,a.refCount++,A.memoizedState={element:m,isDehydrated:u,cache:a},kd(A),r}function ex(r){return r?(r=Ia,r):Ia}function tx(r,a,u,m,C,A){C=ex(C),m.context===null?m.context=C:m.pendingContext=C,m=ni(a),m.payload={element:u},A=A===void 0?null:A,A!==null&&(m.callback=A),u=ri(r,m,a),u!==null&&(mn(u,r,a),qs(u,r,a))}function nx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function $h(r,a){nx(r,a),(r=r.alternate)&&nx(r,a)}function rx(r){if(r.tag===13||r.tag===31){var a=ji(r,67108864);a!==null&&mn(a,r,67108864),$h(r,67108864)}}function ix(r){if(r.tag===13||r.tag===31){var a=On();a=Pu(a);var u=ji(r,a);u!==null&&mn(u,r,a),$h(r,a)}}var oc=!0;function l3(r,a,u,m){var C=V.T;V.T=null;var A=X.p;try{X.p=2,Gh(r,a,u,m)}finally{X.p=A,V.T=C}}function c3(r,a,u,m){var C=V.T;V.T=null;var A=X.p;try{X.p=8,Gh(r,a,u,m)}finally{X.p=A,V.T=C}}function Gh(r,a,u,m){if(oc){var C=Vh(m);if(C===null)Oh(r,a,m,lc,u),sx(r,m);else if(d3(C,r,a,u,m))m.stopPropagation();else if(sx(r,m),a&4&&-1<u3.indexOf(r)){for(;C!==null;){var A=Ea(C);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var B=dr(A.pendingLanes);if(B!==0){var $=A;for($.pendingLanes|=2,$.entangledLanes|=2;B;){var Q=1<<31-Ve(B);$.entanglements[1]|=Q,B&=~Q}mr(A),(rt&6)===0&&($l=ke()+500,ao(0))}}break;case 31:case 13:$=ji(A,2),$!==null&&mn($,A,2),Vl(),$h(A,2)}if(A=Vh(m),A===null&&Oh(r,a,m,lc,u),A===C)break;C=A}C!==null&&m.stopPropagation()}else Oh(r,a,m,null,u)}}function Vh(r){return r=Ku(r),Wh(r)}var lc=null;function Wh(r){if(lc=null,r=Sa(r),r!==null){var a=l(r);if(a===null)r=null;else{var u=a.tag;if(u===13){if(r=c(a),r!==null)return r;r=null}else if(u===31){if(r=o(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return lc=r,null}function ax(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(Le()){case oe:return 2;case me:return 8;case _e:case Te:return 32;case Me:return 268435456;default:return 32}default:return 32}}var Kh=!1,pi=null,mi=null,gi=null,fo=new Map,po=new Map,bi=[],u3="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":pi=null;break;case"dragenter":case"dragleave":mi=null;break;case"mouseover":case"mouseout":gi=null;break;case"pointerover":case"pointerout":fo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":po.delete(a.pointerId)}}function mo(r,a,u,m,C,A){return r===null||r.nativeEvent!==A?(r={blockedOn:a,domEventName:u,eventSystemFlags:m,nativeEvent:A,targetContainers:[C]},a!==null&&(a=Ea(a),a!==null&&rx(a)),r):(r.eventSystemFlags|=m,a=r.targetContainers,C!==null&&a.indexOf(C)===-1&&a.push(C),r)}function d3(r,a,u,m,C){switch(a){case"focusin":return pi=mo(pi,r,a,u,m,C),!0;case"dragenter":return mi=mo(mi,r,a,u,m,C),!0;case"mouseover":return gi=mo(gi,r,a,u,m,C),!0;case"pointerover":var A=C.pointerId;return fo.set(A,mo(fo.get(A)||null,r,a,u,m,C)),!0;case"gotpointercapture":return A=C.pointerId,po.set(A,mo(po.get(A)||null,r,a,u,m,C)),!0}return!1}function ox(r){var a=Sa(r.target);if(a!==null){var u=l(a);if(u!==null){if(a=u.tag,a===13){if(a=c(u),a!==null){r.blockedOn=a,SS(r.priority,function(){ix(u)});return}}else if(a===31){if(a=o(u),a!==null){r.blockedOn=a,SS(r.priority,function(){ix(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function cc(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=Vh(r.nativeEvent);if(u===null){u=r.nativeEvent;var m=new u.constructor(u.type,u);Wu=m,u.target.dispatchEvent(m),Wu=null}else return a=Ea(u),a!==null&&rx(a),r.blockedOn=u,!1;a.shift()}return!0}function lx(r,a,u){cc(r)&&u.delete(a)}function h3(){Kh=!1,pi!==null&&cc(pi)&&(pi=null),mi!==null&&cc(mi)&&(mi=null),gi!==null&&cc(gi)&&(gi=null),fo.forEach(lx),po.forEach(lx)}function uc(r,a){r.blockedOn===a&&(r.blockedOn=null,Kh||(Kh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,h3)))}var dc=null;function cx(r){dc!==r&&(dc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){dc===r&&(dc=null);for(var a=0;a<r.length;a+=3){var u=r[a],m=r[a+1],C=r[a+2];if(typeof m!="function"){if(Wh(m||u)===null)continue;break}var A=Ea(u);A!==null&&(r.splice(a,3),a-=3,Vd(A,{pending:!0,data:C,method:u.method,action:m},m,C))}}))}function rs(r){function a(Q){return uc(Q,r)}pi!==null&&uc(pi,r),mi!==null&&uc(mi,r),gi!==null&&uc(gi,r),fo.forEach(a),po.forEach(a);for(var u=0;u<bi.length;u++){var m=bi[u];m.blockedOn===r&&(m.blockedOn=null)}for(;0<bi.length&&(u=bi[0],u.blockedOn===null);)ox(u),u.blockedOn===null&&bi.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var C=u[m],A=u[m+1],B=C[cn]||null;if(typeof A=="function")B||cx(u);else if(B){var $=null;if(A&&A.hasAttribute("formAction")){if(C=A,B=A[cn]||null)$=B.formAction;else if(Wh(C)!==null)continue}else $=B.action;typeof $=="function"?u[m+1]=$:(u.splice(m,3),m-=3),cx(u)}}}function ux(){function r(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(B){return C=B})},focusReset:"manual",scroll:"manual"})}function a(){C!==null&&(C(),C=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,C=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),C!==null&&(C(),C=null)}}}function Yh(r){this._internalRoot=r}hc.prototype.render=Yh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var u=a.current,m=On();tx(u,m,r,a,null,null)},hc.prototype.unmount=Yh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;tx(r.current,2,null,r,null,null),Vl(),a[_a]=null}};function hc(r){this._internalRoot=r}hc.prototype.unstable_scheduleHydration=function(r){if(r){var a=_S();r={blockedOn:null,target:r,priority:a};for(var u=0;u<bi.length&&a!==0&&a<bi[u].priority;u++);bi.splice(u,0,r),u===0&&ox(r)}};var dx=t.version;if(dx!=="19.2.3")throw Error(i(527,dx,"19.2.3"));X.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 f3={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fc.isDisabled&&fc.supportsFiber)try{yt=fc.inject(f3),nt=fc}catch{}}return bo.createRoot=function(r,a){if(!s(r))throw Error(i(299));var u=!1,m="",C=y1,A=v1,B=_1;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(C=a.onUncaughtError),a.onCaughtError!==void 0&&(A=a.onCaughtError),a.onRecoverableError!==void 0&&(B=a.onRecoverableError)),a=JE(r,1,!1,null,null,u,m,null,C,A,B,ux),r[_a]=a.current,Nh(r),new Yh(a)},bo.hydrateRoot=function(r,a,u){if(!s(r))throw Error(i(299));var m=!1,C="",A=y1,B=v1,$=_1,Q=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(C=u.identifierPrefix),u.onUncaughtError!==void 0&&(A=u.onUncaughtError),u.onCaughtError!==void 0&&(B=u.onCaughtError),u.onRecoverableError!==void 0&&($=u.onRecoverableError),u.formState!==void 0&&(Q=u.formState)),a=JE(r,1,!0,a,u??null,m,C,Q,A,B,$,ux),a.context=ex(null),u=a.current,m=On(),m=Pu(m),C=ni(m),C.callback=null,ri(u,C,m),u=m,a.current.lanes=u,Cs(a,u),mr(a),r[_a]=a.current,Nh(r),new hc(a)},bo.version="19.2.3",bo}var Sx;function E3(){if(Sx)return Qh.exports;Sx=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(),Qh.exports=S3(),Qh.exports}var x3=E3(),gs=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(){}},w3={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},C3=class{#e=w3;#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)}},Ji=new C3;function k3(e){setTimeout(e,0)}var sa=typeof window>"u"||"Deno"in globalThis;function an(){}function T3(e,t){return typeof e=="function"?e(t):e}function Tv(e){return typeof e=="number"&&e>=0&&e!==1/0}function CN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ci(e,t){return typeof e=="function"?e(t):e}function Xn(e,t){return typeof e=="function"?e(t):e}function Ex(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:l,queryKey:c,stale:o}=e;if(c){if(i){if(t.queryHash!==p_(c,t.options))return!1}else if(!Io(t.queryKey,c))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 xx(e,t){const{exact:n,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(oa(t.options.mutationKey)!==oa(l))return!1}else if(!Io(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function p_(e,t){return(t?.queryKeyHashFn||oa)(e)}function oa(e){return JSON.stringify(e,(t,n)=>Av(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function Io(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Io(e[n],t[n])):!1}var A3=Object.prototype.hasOwnProperty;function kN(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=wx(e)&&wx(t);if(!i&&!(Av(e)&&Av(t)))return t;const l=(i?e:Object.keys(e)).length,c=i?t:Object.keys(t),o=c.length,d=i?new Array(o):{};let h=0;for(let p=0;p<o;p++){const f=i?p:c[p],b=e[f],g=t[f];if(b===g){d[f]=b,(i?p<l:A3.call(e,f))&&h++;continue}if(b===null||g===null||typeof b!="object"||typeof g!="object"){d[f]=g;continue}const x=kN(b,g,n+1);d[f]=x,x===b&&h++}return l===o&&h===l?e:d}function Hc(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 wx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Av(e){if(!Cx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Cx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Cx(e){return Object.prototype.toString.call(e)==="[object Object]"}function R3(e){return new Promise(t=>{Ji.setTimeout(t,e)})}function Rv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?kN(e,t):t}function N3(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function O3(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var m_=Symbol();function TN(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===m_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function g_(e,t){return typeof e=="function"?e(...t):!!e}function L3(e,t,n){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var I3=class extends gs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!sa&&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"}},b_=new I3;function Nv(){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 D3=k3;function M3(){let e=[],t=0,n=o=>{o()},i=o=>{o()},s=D3;const l=o=>{t?e.push(o):s(()=>{n(o)})},c=()=>{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||c()}return d},batchCalls:o=>(...d)=>{l(()=>{o(...d)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{i=o},setScheduler:o=>{s=o}}}var Pt=M3(),B3=class extends gs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!sa&&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}},zc=new B3;function F3(e){return Math.min(1e3*2**e,3e4)}function AN(e){return(e??"online")==="online"?zc.isOnline():!0}var Ov=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function RN(e){let t=!1,n=0,i;const s=Nv(),l=()=>s.status!=="pending",c=w=>{if(!l()){const y=new Ov(w);b(y),e.onCancel?.(y)}},o=()=>{t=!0},d=()=>{t=!1},h=()=>b_.isFocused()&&(e.networkMode==="always"||zc.isOnline())&&e.canRun(),p=()=>AN(e.networkMode)&&e.canRun(),f=w=>{l()||(i?.(),s.resolve(w))},b=w=>{l()||(i?.(),s.reject(w))},g=()=>new Promise(w=>{i=y=>{(l()||h())&&w(y)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),x=()=>{if(l())return;let w;const y=n===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(E){w=Promise.reject(E)}Promise.resolve(w).then(f).catch(E=>{if(l())return;const _=e.retry??(sa?0:3),S=e.retryDelay??F3,k=typeof S=="function"?S(n,E):S,N=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,E);if(t||!N){b(E);return}n++,e.onFail?.(n,E),R3(k).then(()=>h()?void 0:g()).then(()=>{t?b(E):x()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(i?.(),s),cancelRetry:o,continueRetry:d,canStart:p,start:()=>(p()?x():g().then(x),s)}}var NN=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Tv(this.gcTime)&&(this.#e=Ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(sa?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ji.clearTimeout(this.#e),this.#e=void 0)}},j3=class extends NN{#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=Tx(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=Tx(this.options);t.data!==void 0&&(this.setState(kx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Rv(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(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Xn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===m_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ci(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:!CN(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=TN(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)},c=(()=>{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(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=RN({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:o=>{o instanceof Ov&&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:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.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 Ov){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,...ON(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...kx(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",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Pt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function ON(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:AN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tx(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 P3=class extends gs{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=Nv(),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),Ax(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lv(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 Xn(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&&!Hc(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Rx(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||Xn(this.options.enabled,this.#t)!==Xn(t.enabled,this.#t)||Ci(this.options.staleTime,this.#t)!==Ci(t.staleTime,this.#t))&&this.#g();const s=this.#b();i&&(this.#t!==n||Xn(this.options.enabled,this.#t)!==Xn(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 H3(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(an)),t}#g(){this.#_();const e=Ci(this.options.staleTime,this.#t);if(sa||this.#i.isStale||!Tv(e))return;const n=CN(this.#i.dataUpdatedAt,e)+1;this.#c=Ji.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,!(sa||Xn(this.options.enabled,this.#t)===!1||!Tv(this.#l)||this.#l===0)&&(this.#u=Ji.setInterval(()=>{(this.options.refetchIntervalInBackground||b_.isFocused())&&this.#d()},this.#l))}#v(){this.#g(),this.#y(this.#b())}#_(){this.#c&&(Ji.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(Ji.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#i,l=this.#r,c=this.#s,d=e!==n?e.state:this.#n,{state:h}=e;let p={...h},f=!1,b;if(t._optimisticResults){const R=this.hasListeners(),L=!R&&Ax(e,t),D=R&&Rx(e,n,t,i);(L||D)&&(p={...p,...ON(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:g,errorUpdatedAt:x,status:w}=p;b=p.data;let y=!1;if(t.placeholderData!==void 0&&b===void 0&&w==="pending"){let R;s?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(R=s.data,y=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,R!==void 0&&(w="success",b=Rv(s?.data,R,t),f=!0)}if(t.select&&b!==void 0&&!y)if(s&&b===l?.data&&t.select===this.#m)b=this.#h;else try{this.#m=t.select,b=t.select(b),b=Rv(s?.data,b,t),this.#h=b,this.#a=null}catch(R){this.#a=R}this.#a&&(g=this.#a,b=this.#h,x=Date.now(),w="error");const E=p.fetchStatus==="fetching",_=w==="pending",S=w==="error",k=_&&E,N=b!==void 0,O={status:w,fetchStatus:p.fetchStatus,isPending:_,isSuccess:w==="success",isError:S,isInitialLoading:k,isLoading:k,data:b,dataUpdatedAt:p.dataUpdatedAt,error:g,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:E,isRefetching:E&&!_,isLoadingError:S&&!N,isPaused:p.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&N,isStale:y_(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Xn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=O.data!==void 0,L=O.status==="error"&&!R,D=F=>{L?F.reject(O.error):R&&F.resolve(O.data)},I=()=>{const F=this.#o=O.promise=Nv();D(F)},H=this.#o;switch(H.status){case"pending":e.queryHash===n.queryHash&&D(H);break;case"fulfilled":(L||O.data!==H.value)&&I();break;case"rejected":(!L||O.error!==H.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),Hc(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(c=>{const o=c;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){Pt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function U3(e,t){return Xn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ax(e,t){return U3(e,t)||e.state.data!==void 0&&Lv(e,t,t.refetchOnMount)}function Lv(e,t,n){if(Xn(t.enabled,e)!==!1&&Ci(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&y_(e,t)}return!1}function Rx(e,t,n,i){return(e!==t||Xn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&y_(e,n)}function y_(e,t){return Xn(t.enabled,e)!==!1&&e.isStaleByTime(Ci(t.staleTime,e))}function H3(e,t){return!Hc(e.getCurrentResult(),t)}function Nx(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},d=0;const h=async()=>{let p=!1;const f=x=>{L3(x,()=>t.signal,()=>p=!0)},b=TN(t.options,t.fetchOptions),g=async(x,w,y)=>{if(p)return Promise.reject();if(w==null&&x.pages.length)return Promise.resolve(x);const _=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:w,direction:y?"backward":"forward",meta:t.options.meta};return f(T),T})(),S=await b(_),{maxPages:k}=t.options,N=y?O3:N3;return{pages:N(x.pages,S,k),pageParams:N(x.pageParams,w,k)}};if(s&&l.length){const x=s==="backward",w=x?z3:Ox,y={pages:l,pageParams:c},E=w(i,y);o=await g(y,E,x)}else{const x=e??l.length;do{const w=d===0?c[0]??i.initialPageParam:Ox(i,o);if(d>0&&w==null)break;o=await g(o,w),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 Ox(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 z3(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var q3=class extends NN{#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||LN(),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=RN({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#r({type:"failed",failureCount:l,error:c})},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}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,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{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:l}),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),Pt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function LN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $3=class extends gs{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 q3({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=pc(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=pc(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=pc(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=pc(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Pt.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=>xx(t,n))}findAll(e={}){return this.getAll().filter(t=>xx(e,t))}notify(e){Pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Pt.batch(()=>Promise.all(e.map(t=>t.continue().catch(an))))}};function pc(e){return e.options.scope?.id}var G3=class extends gs{#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),Hc(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&oa(n.mutationKey)!==oa(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??LN();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){Pt.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};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,i,s)}catch(l){Promise.reject(l)}try{this.#i.onSettled?.(t.data,null,n,i,s)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,i,s)}catch(l){Promise.reject(l)}try{this.#i.onSettled?.(void 0,t.error,n,i,s)}catch(l){Promise.reject(l)}}}this.listeners.forEach(n=>{n(this.#t)})})}},V3=class extends gs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??p_(i,t);let l=this.get(s);return l||(l=new j3({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(){Pt.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=>Ex(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Ex(e,n)):t}notify(e){Pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Pt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Pt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},W3=class{#e;#t;#n;#i;#r;#s;#o;#a;constructor(e={}){this.#e=e.queryCache||new V3,this.#t=e.mutationCache||new $3,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=b_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=zc.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(Ci(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,c=T3(t,l);if(c!==void 0)return this.#e.build(this,i).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return Pt.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;Pt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Pt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Pt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(an).catch(an)}invalidateQueries(e,t={}){return Pt.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=Pt.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(an)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(an)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ci(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(an).catch(an)}fetchInfiniteQuery(e){return e.behavior=Nx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(an).catch(an)}ensureInfiniteQueryData(e){return e.behavior=Nx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zc.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(oa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{Io(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(oa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{Io(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=p_(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===m_&&(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()}},IN=q.createContext(void 0),Ut=e=>{const t=q.useContext(IN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},K3=({client:e,children:t})=>(q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(IN.Provider,{value:e,children:t})),DN=q.createContext(!1),Y3=()=>q.useContext(DN);DN.Provider;function X3(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Z3=q.createContext(X3()),Q3=()=>q.useContext(Z3),J3=(e,t,n)=>{const i=n?.state.error&&typeof e.throwOnError=="function"?g_(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},e4=e=>{q.useEffect(()=>{e.clearReset()},[e])},t4=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||g_(n,[e.error,i])),n4=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))}},r4=(e,t)=>e.isLoading&&e.isFetching&&!t,i4=(e,t)=>e?.suspense&&t.isPending,Lx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function a4(e,t,n){const i=Y3(),s=Q3(),l=Ut(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const o=l.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",n4(c),J3(c,s,o),e4(s);const d=!l.getQueryCache().get(c.queryHash),[h]=q.useState(()=>new t(l,c)),p=h.getOptimisticResult(c),f=!i&&e.subscribed!==!1;if(q.useSyncExternalStore(q.useCallback(b=>{const g=f?h.subscribe(Pt.batchCalls(b)):an;return h.updateResult(),g},[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),q.useEffect(()=>{h.setOptions(c)},[c,h]),i4(c,p))throw Lx(c,h,s);if(t4({result:p,errorResetBoundary:s,throwOnError:c.throwOnError,query:o,suspense:c.suspense}))throw p.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!sa&&r4(p,i)&&(d?Lx(c,h,s):o?.promise)?.catch(an).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?p:h.trackResult(p)}function nr(e,t){return a4(e,P3)}function tn(e,t){const n=Ut(),[i]=q.useState(()=>new G3(n,e));q.useEffect(()=>{i.setOptions(e)},[i,e]);const s=q.useSyncExternalStore(q.useCallback(c=>i.subscribe(Pt.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=q.useCallback((c,o)=>{i.mutate(c,o).catch(an)},[i]);if(s.error&&g_(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const Iv=new WeakMap,s4=new WeakMap,qc={current:[]};let nf=!1,Ao=0;const To=new Set,mc=new Map;function MN(e){for(const t of e){if(qc.current.includes(t))continue;qc.current.push(t),t.recompute();const n=s4.get(t);if(n)for(const i of n){const s=Iv.get(i);s?.length&&MN(s)}}}function o4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function l4(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function BN(e){if(Ao>0&&!mc.has(e)&&mc.set(e,e.prevState),To.add(e),!(Ao>0)&&!nf)try{for(nf=!0;To.size>0;){const t=Array.from(To);To.clear();for(const n of t){const i=mc.get(n)??n.prevState;n.prevState=i,o4(n)}for(const n of t){const i=Iv.get(n);i&&(qc.current.push(n),MN(i))}for(const n of t){const i=Iv.get(n);if(i)for(const s of i)l4(s)}}}finally{nf=!1,qc.current=[],mc.clear()}}function Ro(e){Ao++;try{e()}finally{if(Ao--,Ao===0){const t=To.values().next().value;t&&BN(t)}}}function c4(e){return typeof e=="function"}class u4{constructor(t,n){this.listeners=new Set,this.subscribe=i=>{var s,l;this.listeners.add(i);const c=(l=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:l.call(s,i,this);return()=>{this.listeners.delete(i),c?.()}},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):c4(t)?this.state=t(this.prevState):this.state=t,(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),BN(this)}}const ki="__TSR_index",Ix="popstate",Dx="beforeunload";function d4(e){let t=e.getLocation();const n=new Set,i=(c,o)=>{t=e.getLocation(),n.forEach(d=>d({location:t,action:c,navigateOpts:o}))},s=c=>{e.notifyOnIndexChange??!0?i(c):t=e.getLocation()},l=async({task:c,navigateOpts:o,...d})=>{if(o?.ignoreBlocker??!1)return c(),{type:"SUCCESS"};const p=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&p.length&&f)for(const b of p){const g=$c(d.path,d.state);if(await b.blockerFn({currentLocation:t,nextLocation:g,action:d.type}))return e.onBlocked?.(),{type:"BLOCKED"}}return c(),{type:"SUCCESS"}};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,o,d)=>{const h=t.state[ki];return o=Mx(h+1,o),l({task:()=>{e.pushState(c,o),i({type:"PUSH"},d)},navigateOpts:d,type:"PUSH",path:c,state:o})},replace:(c,o,d)=>{const h=t.state[ki];return o=Mx(h,o),l({task:()=>{e.replaceState(c,o),i({type:"REPLACE"},d)},navigateOpts:d,type:"REPLACE",path:c,state:o})},go:(c,o)=>{l({task:()=>{e.go(c),s({type:"GO",index:c})},navigateOpts:o,type:"GO"})},back:c=>{l({task:()=>{e.back(c?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{l({task:()=>{e.forward(c?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[ki]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,c]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function Mx(e,t){t||(t={});const n=v_();return{...t,key:n,__TSR_key:n,[ki]:e}}function h4(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let s=[];const l=()=>s,c=R=>s=R,o=(R=>R),d=(()=>$c(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const R=v_();t.history.replaceState({[ki]:0,key:R,__TSR_key:R},"")}let h=d(),p,f=!1,b=!1,g=!1,x=!1;const w=()=>h;let y,E;const _=()=>{y&&(O._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),O._ignoreSubscribers=!1,y=void 0,E=void 0,p=void 0)},S=(R,L,D)=>{const I=o(L);E||(p=h),h=$c(L,D),y={href:I,state:D,isPush:y?.isPush||R==="push"},E||(E=Promise.resolve().then(()=>_()))},k=R=>{h=d(),O.notify({type:R})},N=async()=>{if(b){b=!1;return}const R=d(),L=R.state[ki]-h.state[ki],D=L===1,I=L===-1,H=!D&&!I||f;f=!1;const F=H?"GO":I?"BACK":"FORWARD",W=H?{type:"GO",index:L}:{type:I?"BACK":"FORWARD"};if(g)g=!1;else{const K=l();if(typeof document<"u"&&K.length){for(const V of K)if(await V.blockerFn({currentLocation:h,nextLocation:R,action:F})){b=!0,t.history.go(1),O.notify(W);return}}}h=d(),O.notify(W)},T=R=>{if(x){x=!1;return}let L=!1;const D=l();if(typeof document<"u"&&D.length)for(const I of D){const H=I.enableBeforeUnload??!0;if(H===!0){L=!0;break}if(typeof H=="function"&&H()===!0){L=!0;break}}if(L)return R.preventDefault(),R.returnValue=""},O=d4({getLocation:w,getLength:()=>t.history.length,pushState:(R,L)=>S("push",R,L),replaceState:(R,L)=>S("replace",R,L),back:R=>(R&&(g=!0),x=!0,t.history.back()),forward:R=>{R&&(g=!0),x=!0,t.history.forward()},go:R=>{f=!0,t.history.go(R)},createHref:R=>o(R),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(Dx,T,{capture:!0}),t.removeEventListener(Ix,N)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(Dx,T,{capture:!0}),t.addEventListener(Ix,N),t.history.pushState=function(...R){const L=n.apply(t.history,R);return O._ignoreSubscribers||k("PUSH"),L},t.history.replaceState=function(...R){const L=i.apply(t.history,R);return O._ignoreSubscribers||k("REPLACE"),L},O}function f4(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function $c(e,t){const n=f4(e),i=n.indexOf("#"),s=n.indexOf("?"),l=v_();return{href:n,pathname:n.substring(0,i>0?s>0?Math.min(i,s):i:s>0?s:n.length),hash:i>-1?n.substring(i):"",search:s>-1?n.slice(s,i===-1?void 0:i):"",state:t||{[ki]:0,key:l,__TSR_key:l}}}function v_(){return(Math.random()+1).toString(36).substring(7)}function Gc(e){return e[e.length-1]}function p4(e){return typeof e=="function"}function Si(e,t){return p4(e)?e(t):e}const m4=Object.prototype.hasOwnProperty,Bx=Object.prototype.propertyIsEnumerable;function Yn(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=t,s=Px(e)&&Px(i);if(!s&&!(Vc(e)&&Vc(i)))return i;const l=s?e:Fx(e);if(!l)return i;const c=s?i:Fx(i);if(!c)return i;const o=l.length,d=c.length,h=s?new Array(d):{};let p=0;for(let f=0;f<d;f++){const b=s?f:c[f],g=e[b],x=i[b];if(g===x){h[b]=g,(s?f<o:m4.call(e,b))&&p++;continue}if(g===null||x===null||typeof g!="object"||typeof x!="object"){h[b]=x;continue}const w=Yn(g,x,n+1);h[b]=w,w===g&&p++}return o===d&&p===o?e:h}function Fx(e){const t=Object.getOwnPropertyNames(e);for(const s of t)if(!Bx.call(e,s))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const i=t;for(const s of n){if(!Bx.call(e,s))return!1;i.push(s)}return i}function Vc(e){if(!jx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!jx(n)||!n.hasOwnProperty("isPrototypeOf"))}function jx(e){return Object.prototype.toString.call(e)==="[object Object]"}function Px(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ra(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(!ra(e[i],t[i],n))return!1;return!0}if(Vc(e)&&Vc(t)){const i=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!i||t[c]!==void 0)&&!ra(e[c],t[c],n))return!1;return!0}let s=0;if(!i)s=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&s++;let l=0;for(const c in t)if((!i||t[c]!==void 0)&&(l++,l>s||!ra(e[c],t[c],n)))return!1;return s===l}return!1}function ds(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 Ti(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function g4(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Ux(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return g4(t)}const FN=["http:","https:","mailto:","tel:"];function Wc(e){if(!e)return!1;try{const t=new URL(e);return!FN.includes(t.protocol)}catch{return!1}}const b4={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},y4=/[&><\u2028\u2029]/g;function v4(e){return e.replace(y4,t=>b4[t])}function rf(e,t){if(!e)return e;const n=/%25|%5C/gi;let i=0,s="",l;for(;(l=n.exec(e))!==null;)s+=Ux(e.slice(i,l.index))+l[0],i=n.lastIndex;return s=s+Ux(i?e.slice(i):e),s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}var _4="Invariant failed";function zr(e,t){if(!e)throw new Error(_4)}function Kc(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 c=t.get(l);if(c)return s(c),c.value},set(l,c){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=c,s(o);else{const d={key:l,value:c,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 hs=0,la=1,ca=2,Do=3,ea=4,jN=5,S4=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,E4=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,x4=/^([^{]*)\{\$\}([^}]*)$/;function __(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]=hs,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]=ca,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=la,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const c=l.match(x4);if(c){const p=c[1].length;return n[0]=ca,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(E4);if(o){const h=o[1],p=o[2],f=o[3],b=h.length;return n[0]=Do,n[1]=t+b,n[2]=t+b+3,n[3]=t+b+3+p.length,n[4]=s-f.length,n[5]=s,n}const d=l.match(S4);if(d){const h=d[1],p=d[2],f=d[3],b=h.length;return n[0]=la,n[1]=t+b,n[2]=t+b+2,n[3]=t+b+2+p.length,n[4]=s-f.length,n[5]=s,n}return n[0]=hs,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function cu(e,t,n,i,s,l,c){c?.(n);let o=i;{const d=n.fullPath??n.from,h=d.length,p=n.options?.caseSensitive??e,f=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;o<h;){const g=__(d,o,t);let x;const w=o,y=g[5];switch(o=y+1,l++,g[0]){case hs:{const _=d.substring(g[2],g[3]);if(p){const S=s.static?.get(_);if(S)x=S;else{s.static??=new Map;const k=ta(n.fullPath??n.from);k.parent=s,k.depth=l,x=k,s.static.set(_,k)}}else{const S=_.toLowerCase(),k=s.staticInsensitive?.get(S);if(k)x=k;else{s.staticInsensitive??=new Map;const N=ta(n.fullPath??n.from);N.parent=s,N.depth=l,x=N,s.staticInsensitive.set(S,N)}}break}case la:{const _=d.substring(w,g[1]),S=d.substring(g[4],y),k=p&&!!(_||S),N=_?k?_:_.toLowerCase():void 0,T=S?k?S:S.toLowerCase():void 0,O=!f&&s.dynamic?.find(R=>!R.skipOnParamError&&R.caseSensitive===k&&R.prefix===N&&R.suffix===T);if(O)x=O;else{const R=sf(la,n.fullPath??n.from,k,N,T);x=R,R.depth=l,R.parent=s,s.dynamic??=[],s.dynamic.push(R)}break}case Do:{const _=d.substring(w,g[1]),S=d.substring(g[4],y),k=p&&!!(_||S),N=_?k?_:_.toLowerCase():void 0,T=S?k?S:S.toLowerCase():void 0,O=!f&&s.optional?.find(R=>!R.skipOnParamError&&R.caseSensitive===k&&R.prefix===N&&R.suffix===T);if(O)x=O;else{const R=sf(Do,n.fullPath??n.from,k,N,T);x=R,R.parent=s,R.depth=l,s.optional??=[],s.optional.push(R)}break}case ca:{const _=d.substring(w,g[1]),S=d.substring(g[4],y),k=p&&!!(_||S),N=_?k?_:_.toLowerCase():void 0,T=S?k?S:S.toLowerCase():void 0,O=sf(ca,n.fullPath??n.from,k,N,T);x=O,O.parent=s,O.depth=l,s.wildcard??=[],s.wildcard.push(O)}}s=x}if(f&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const g=ta(n.fullPath??n.from);g.kind=jN,g.parent=s,l++,g.depth=l,s.pathless??=[],s.pathless.push(g),s=g}const b=(n.path||!n.children)&&!n.isRoot;if(b&&d.endsWith("/")){const g=ta(n.fullPath??n.from);g.kind=ea,g.parent=s,l++,g.depth=l,s.index=g,s=g}s.parse=n.options?.params?.parse??null,s.skipOnParamError=f,s.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,b&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)cu(e,t,d,o,s,l,c)}function af(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;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 _i(e){if(e.pathless)for(const t of e.pathless)_i(t);if(e.static)for(const t of e.static.values())_i(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())_i(t);if(e.dynamic?.length){e.dynamic.sort(af);for(const t of e.dynamic)_i(t)}if(e.optional?.length){e.optional.sort(af);for(const t of e.optional)_i(t)}if(e.wildcard?.length){e.wildcard.sort(af);for(const t of e.wildcard)_i(t)}}function ta(e){return{kind:hs,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function sf(e,t,n,i,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:i,suffix:s}}function w4(e,t){const n=ta("/"),i=new Uint16Array(6);for(const s of e)cu(!1,i,s,1,n,0);_i(n),t.masksTree=n,t.flatCache=Kc(1e3)}function C4(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const i=S_(e,t.masksTree);return t.flatCache.set(e,i),i}function k4(e,t,n,i,s){e||="/",i||="/";const l=t?`case\0${e}`:e;let c=s.singleCache.get(l);if(!c){c=ta("/");const o=new Uint16Array(6);cu(t,o,{from:e},1,c,0),s.singleCache.set(l,c)}return S_(i,c,n)}function T4(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,s=t.matchCache.get(i);if(s!==void 0)return s;e||="/";let l;try{l=S_(e,t.segmentTree,n)}catch(c){if(c instanceof URIError)l=null;else throw c}return l&&(l.branch=N4(l.route)),t.matchCache.set(i,l),l}function A4(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function R4(e,t=!1,n){const i=ta(e.fullPath),s=new Uint16Array(6),l={},c={};let o=0;return cu(t,s,e,1,i,0,h=>{if(n?.(h,o),zr(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,o!==0&&h.path){const p=A4(h.fullPath);(!c[p]||h.fullPath.endsWith("/"))&&(c[p]=h)}o++}),_i(i),{processedTree:{segmentTree:i,singleCache:Kc(1e3),matchCache:Kc(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:c}}function S_(e,t,n=!1){const i=e.split("/"),s=L4(e,i,t,n);if(!s)return null;const[l]=PN(e,i,s);return{route:s.node.route,rawParams:l,parsedParams:s.parsedParams}}function PN(e,t,n){const i=O4(n.node);let s=null;const l={};let c=n.extract?.part??0,o=n.extract?.node??0,d=n.extract?.path??0,h=n.extract?.segment??0;for(;o<i.length;c++,o++,d++,h++){const p=i[o];if(p.kind===ea)break;if(p.kind===jN){h--,c--,d--;continue}const f=t[c],b=d;if(f&&(d+=f.length),p.kind===la){s??=n.node.fullPath.split("/");const g=s[h],x=p.prefix?.length??0;if(g.charCodeAt(x)===123){const y=p.suffix?.length??0,E=g.substring(x+2,g.length-y-1),_=f.substring(x,f.length-y);l[E]=decodeURIComponent(_)}else{const y=g.substring(1);l[y]=decodeURIComponent(f)}}else if(p.kind===Do){if(n.skipped&1<<o){c--,d=b-1;continue}s??=n.node.fullPath.split("/");const g=s[h],x=p.prefix?.length??0,w=p.suffix?.length??0,y=g.substring(x+3,g.length-w-1),E=p.suffix||p.prefix?f.substring(x,f.length-w):f;E&&(l[y]=decodeURIComponent(E))}else if(p.kind===ca){const g=p,x=e.substring(b+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),w=decodeURIComponent(x);l["*"]=w,l._splat=w;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:c,node:o,path:d,segment:h}]}function N4(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function O4(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function L4(e,t,n,i){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!Gc(t),l=s&&e!=="/",c=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(),{node:b,index:g,skipped:x,depth:w,statics:y,dynamics:E,optionals:_}=f;let{extract:S,rawParams:k,parsedParams:N}=f;if(b.skipOnParamError){if(!of(e,t,f))continue;k=f.rawParams,S=f.extract,N=f.parsedParams}i&&b.route&&b.kind!==ea&&yo(h,f)&&(h=f);const T=g===c;if(T&&(b.route&&!l&&yo(p,f)&&(p=f),!b.optional&&!b.wildcard&&!b.index&&!b.pathless))continue;const O=T?void 0:t[g];let R;if(T&&b.index){const L={node:b.index,index:g,skipped:x,depth:w+1,statics:y,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N};let D=!0;if(b.index.skipOnParamError&&(of(e,t,L)||(D=!1)),D){if(y===c&&!E&&!_&&!x)return L;yo(p,L)&&(p=L)}}if(b.wildcard&&yo(d,f))for(const L of b.wildcard){const{prefix:D,suffix:I}=L;if(D&&(T||!(L.caseSensitive?O:R??=O.toLowerCase()).startsWith(D)))continue;if(I){if(T)continue;const F=t.slice(g).join("/").slice(-I.length);if((L.caseSensitive?F:F.toLowerCase())!==I)continue}const H={node:L,index:c,skipped:x,depth:w,statics:y,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N};if(!(L.skipOnParamError&&!of(e,t,H))){d=H;break}}if(b.optional){const L=x|1<<w,D=w+1;for(let I=b.optional.length-1;I>=0;I--){const H=b.optional[I];o.push({node:H,index:g,skipped:L,depth:D,statics:y,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N})}if(!T)for(let I=b.optional.length-1;I>=0;I--){const H=b.optional[I],{prefix:F,suffix:W}=H;if(F||W){const K=H.caseSensitive?O:R??=O.toLowerCase();if(F&&!K.startsWith(F)||W&&!K.endsWith(W))continue}o.push({node:H,index:g+1,skipped:x,depth:D,statics:y,dynamics:E,optionals:_+1,extract:S,rawParams:k,parsedParams:N})}}if(!T&&b.dynamic&&O)for(let L=b.dynamic.length-1;L>=0;L--){const D=b.dynamic[L],{prefix:I,suffix:H}=D;if(I||H){const F=D.caseSensitive?O:R??=O.toLowerCase();if(I&&!F.startsWith(I)||H&&!F.endsWith(H))continue}o.push({node:D,index:g+1,skipped:x,depth:w+1,statics:y,dynamics:E+1,optionals:_,extract:S,rawParams:k,parsedParams:N})}if(!T&&b.staticInsensitive){const L=b.staticInsensitive.get(R??=O.toLowerCase());L&&o.push({node:L,index:g+1,skipped:x,depth:w+1,statics:y+1,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N})}if(!T&&b.static){const L=b.static.get(O);L&&o.push({node:L,index:g+1,skipped:x,depth:w+1,statics:y+1,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N})}if(b.pathless){const L=w+1;for(let D=b.pathless.length-1;D>=0;D--){const I=b.pathless[D];o.push({node:I,index:g,skipped:x,depth:L,statics:y,dynamics:E,optionals:_,extract:S,rawParams:k,parsedParams:N})}}}if(p&&d)return yo(d,p)?p:d;if(p)return p;if(d)return d;if(i&&h){let f=h.index;for(let g=0;g<h.index;g++)f+=t[g].length;const b=f===e.length?"/":e.slice(f);return h.rawParams??={},h.rawParams["**"]=decodeURIComponent(b),h}return null}function of(e,t,n){try{const[i,s]=PN(e,t,n);n.rawParams=i,n.extract=s;const l=n.node.parse(i);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function yo(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ea)>(e.node.kind===ea)||t.node.kind===ea==(e.node.kind===ea)&&t.depth>e.depth))):!0}function Ac(e){return E_(e.filter(t=>t!==void 0).join("/"))}function E_(e){return e.replace(/\/{2,}/g,"/")}function UN(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function yr(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function HN(e){return yr(UN(e))}function Yc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function I4(e,t,n){return Yc(e,n)===Yc(t,n)}function D4({base:e,to:t,trailingSlash:n="never",cache:i}){const s=t.startsWith("/"),l=!s&&t===".";let c;if(i){c=s?t:l?e:e+"\0"+t;const f=i.get(c);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&&Gc(o)==="";)o.pop();const f=t.split("/");for(let b=0,g=f.length;b<g;b++){const x=f[b];x===""?b?b===g-1&&o.push(x):o=[x]:x===".."?o.pop():x==="."||o.push(x)}}o.length>1&&(Gc(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));let d,h="";for(let f=0;f<o.length;f++){f>0&&(h+="/");const b=o[f];if(!b)continue;d=__(b,0,d);const g=d[0];if(g===hs){h+=b;continue}const x=d[5],w=b.substring(0,d[1]),y=b.substring(d[4],x),E=b.substring(d[2],d[3]);g===la?h+=w||y?`${w}{$${E}}${y}`:`$${E}`:g===ca?h+=w||y?`${w}{$}${y}`:"$":h+=`${w}{-$${E}}${y}`}h=E_(h);const p=h||"/";return c&&i&&i.set(c,p),p}function lf(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?encodeURI(i):M4(i,n)}function cf({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 c=0,o,d="";for(;c<l;){const p=c;o=__(e,p,o);const f=o[5];if(c=f+1,p===f)continue;const b=o[0];if(b===hs){d+="/"+e.substring(p,f);continue}if(b===ca){const g=t._splat;s._splat=g,s["*"]=g;const x=e.substring(p,o[1]),w=e.substring(o[4],f);if(!g){i=!0,(x||w)&&(d+="/"+x+w);continue}const y=lf("_splat",t,n);d+="/"+x+y+w;continue}if(b===la){const g=e.substring(o[2],o[3]);!i&&!(g in t)&&(i=!0),s[g]=t[g];const x=e.substring(p,o[1]),w=e.substring(o[4],f),y=lf(g,t,n)??"undefined";d+="/"+x+y+w;continue}if(b===Do){const g=e.substring(o[2],o[3]),x=t[g];if(x==null)continue;s[g]=x;const w=e.substring(p,o[1]),y=e.substring(o[4],f),E=lf(g,t,n)??"";d+="/"+w+E+y;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:s,interpolatedPath:d||"/",isMissingParams:i}}function M4(e,t){let n=encodeURIComponent(e);if(t)for(const[i,s]of t)n=n.replaceAll(i,s);return n}function Dn(e){return!!e?.isNotFound}function B4(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Xc="tsr-scroll-restoration-v1_3",F4=(e,t)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{e(...i),n=null},t))}};function j4(){const e=B4();if(!e)return null;const t=e.getItem(Xc);let n=t?JSON.parse(t):{};return{state:n,set:i=>{n=Si(i,n)||n;try{e.setItem(Xc,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const gc=j4(),Dv=e=>e.state.__TSR_key||e.href;function P4(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 Zc=!1;function zN({storageKey:e,key:t,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:s,location:l}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const o=t||window.history.state?.__TSR_key,d=c[o];Zc=!0;e:{if(i&&d&&Object.keys(d).length>0){for(const f in d){const b=d[f];if(f==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:n});else if(f){const g=document.querySelector(f);g&&(g.scrollLeft=b.scrollX,g.scrollTop=b.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const b=document.getElementById(h);b&&b.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 b=typeof f=="function"?f():document.querySelector(f);b&&b.scrollTo(p)}}Zc=!1}function U4(e,t){if(!gc&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!gc))return;e.isScrollRestorationSetup=!0,Zc=!1;const i=e.options.getScrollRestorationKey||Dv;window.history.scrollRestoration="manual";const s=l=>{if(Zc||!e.isScrollRestoring)return;let c="";if(l.target===document||l.target===window)c="window";else{const d=l.target.getAttribute("data-scroll-restoration-id");d?c=`[data-scroll-restoration-id="${d}"]`:c=P4(l.target)}const o=i(e.state.location);gc.set(d=>{const h=d[o]||={},p=h[c]||={};if(c==="window")p.scrollX=window.scrollX||0,p.scrollY=window.scrollY||0;else if(c){const f=document.querySelector(c);f&&(p.scrollX=f.scrollLeft||0,p.scrollY=f.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",F4(s,100),!0),e.subscribe("onRendered",l=>{const c=i(l.toLocation);(l.toLocation.state.__TSR_resetScroll??!0)&&(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(zN({storageKey:Xc,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&gc.set(d=>(d[c]||={},d))))})}function H4(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 z4(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 uf(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function q4(e){const t=new URLSearchParams(e),n={};for(const[i,s]of t.entries()){const l=n[i];l==null?n[i]=uf(s):Array.isArray(l)?l.push(uf(s)):n[i]=[l,uf(s)]}return n}const $4=V4(JSON.parse),G4=W4(JSON.stringify,JSON.parse);function V4(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=q4(t);for(const i in n){const s=n[i];if(typeof s=="string")try{n[i]=e(s)}catch{}}return n}}function W4(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=z4(s,i);return l?`?${l}`:""}}const bn="__root__";function x_(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&Wc(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${FN.join(", ")} protocols are allowed.`);if(!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 Jn(e){return e instanceof Response&&!!e.options}const Rc=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},uu=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),cs=(e,t,n=!0)=>{const i={...e.router.options.context??{}},s=n?t:t-1;for(let l=0;l<=s;l++){const c=e.matches[l];if(!c)continue;const o=e.router.getMatch(c.id);o&&Object.assign(i,o.__routeContext,o.__beforeLoadContext)}return i},qN=(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),zr(n.options.notFoundComponent);const i=e.matches.find(s=>s.routeId===n.id);zr(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,qN(e,t))},Ei=(e,t,n)=>{if(!(!Jn(n)&&!Dn(n))){if(Jn(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=Jn(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:i,context:cs(e,t.index),isFetching:!1,error:n})),Dn(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Jn(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(qN(e,n),n)}},$N=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},vo=(e,t,n,i)=>{const{id:s,routeId:l}=e.matches[t],c=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=i,e.firstBadMatchIndex??=t,Ei(e,e.router.getMatch(s),n);try{c.options.onError?.(n)}catch(o){n=o,Ei(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}))},K4=(e,t,n,i)=>{const s=e.router.getMatch(t),l=e.matches[n-1]?.id,c=l?e.router.getMatch(l):void 0;if(e.router.isShell()){s.ssr=i.id===bn;return}if(c?.ssr===!1){s.ssr=!1;return}const o=g=>g===!0&&c?.ssr==="data-only"?"data-only":g,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:bc(h,s.searchError),params:bc(p,s.paramsError),location:e.location,matches:e.matches.map(g=>({index:g.index,pathname:g.pathname,fullPath:g.fullPath,staticData:g.staticData,id:g.id,routeId:g.routeId,search:bc(g.search,g.searchError),params:bc(g.params,g.paramsError),ssr:g.ssr}))},b=i.options.ssr(f);if(Ti(b))return b.then(g=>{s.ssr=o(g??d)});s.ssr=o(b??d)},GN=(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&&!uu(e,t)&&(n.options.loader||n.options.beforeLoad||KN(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{Rc(e)},s);i._nonReactive.pendingTimeout=c}},Y4=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;GN(e,t,n,i);const s=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Ei(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(s):s()},X4=(e,t,n,i)=>{const s=e.router.getMatch(t),l=s._nonReactive.loadPromise;s._nonReactive.loadPromise=ds(()=>{l?.resolve()});const{paramsError:c,searchError:o}=s;c&&vo(e,n,c,"PARSE_PARAMS"),o&&vo(e,n,o,"VALIDATE_SEARCH"),GN(e,t,i,s);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let f=!1;const b=()=>{f||(f=!0,e.updateMatch(t,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:d})))},g=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!i.options.beforeLoad){Ro(()=>{b(),g()});return}s._nonReactive.beforeLoadPromise=ds();const x={...cs(e,n,!1),...s.__routeContext},{search:w,params:y,cause:E}=s,_=uu(e,t),S={search:w,abortController:d,params:y,preload:_,context:x,location:e.location,navigate:T=>e.router.navigate({...T,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?"preload":E,matches:e.matches,...e.router.options.additionalContext},k=T=>{if(T===void 0){Ro(()=>{b(),g()});return}(Jn(T)||Dn(T))&&(b(),vo(e,n,T,"BEFORE_LOAD")),Ro(()=>{b(),e.updateMatch(t,O=>({...O,__beforeLoadContext:T})),g()})};let N;try{if(N=i.options.beforeLoad(S),Ti(N))return b(),N.catch(T=>{vo(e,n,T,"BEFORE_LOAD")}).then(k)}catch(T){b(),vo(e,n,T,"BEFORE_LOAD")}k(N)},Z4=(e,t)=>{const{id:n,routeId:i}=e.matches[t],s=e.router.looseRoutesById[i],l=()=>{if(e.router.isServer){const d=K4(e,n,t,s);if(Ti(d))return d.then(o)}return o()},c=()=>X4(e,n,t,s),o=()=>{if($N(e,n))return;const d=Y4(e,n,s);return Ti(d)?d.then(c):c()};return l()},Q4=(e,t,n)=>{const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,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,c,o])=>{const d=l?.meta,h=l?.links,p=l?.scripts,f=l?.styles;return{meta:d,links:h,headScripts:p,headers:o,scripts:c,styles:f}})},VN=(e,t,n,i)=>{const s=e.matchPromises[n-1],{params:l,loaderDeps:c,abortController:o,cause:d}=e.router.getMatch(t),h=cs(e,n),p=uu(e,t);return{params:l,deps:c,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}},Hx=async(e,t,n,i)=>{try{const s=e.router.getMatch(t);try{(!e.router.isServer||s.ssr===!0)&&WN(i);const l=i.options.loader?.(VN(e,t,n,i)),c=i.options.loader&&Ti(l);if((c||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),i.options.loader){const h=c?await l:l;Ei(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,p=>({...p,loaderData:h}))}i._lazyPromise&&await i._lazyPromise;const d=s._nonReactive.minPendingPromise;d&&await d,i._componentsPromise&&await i._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:cs(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:cs(e,n)}));return}const o=s._nonReactive.minPendingPromise;o&&await o,Dn(l)&&await i.options.notFoundComponent?.preload?.(),Ei(e,e.router.getMatch(t),l);try{i.options.onError?.(l)}catch(d){c=d,Ei(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:c,context:cs(e,n),status:"error",isFetching:!1}))}}catch(s){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),Ei(e,l,s)}},J4=async(e,t)=>{const{id:n,routeId:i}=e.matches[t];let s=!1,l=!1;const c=e.router.looseRoutesById[i];if($N(e,n)){if(e.router.isServer)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&&Ei(e,p,f)}else{const p=Date.now()-h.updatedAt,f=uu(e,n),b=f?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,g=c.options.shouldReload,x=typeof g=="function"?g(VN(e,n,t,c)):g,w=!!f&&!e.router.state.matches.some(S=>S.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=ds(),w!==y.preload&&e.updateMatch(n,S=>({...S,preload:w}));const{status:E,invalid:_}=y;s=E==="success"&&(_||(x??p>b)),f&&c.options.preload===!1||(s&&!e.sync?(l=!0,(async()=>{try{await Hx(e,n,t,c);const S=e.router.getMatch(n);S._nonReactive.loaderPromise?.resolve(),S._nonReactive.loadPromise?.resolve(),S._nonReactive.loaderPromise=void 0}catch(S){Jn(S)&&await e.router.navigate(S.options)}})()):(E!=="success"||s&&e.sync)&&await Hx(e,n,t,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 zx(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&Rc(t);try{for(let o=0;o<t.matches.length;o++){const d=Z4(t,o);Ti(d)&&await d}const n=t.firstBadMatchIndex??t.matches.length;for(let o=0;o<n;o++)t.matchPromises.push(J4(t,o));const s=(await Promise.allSettled(t.matchPromises)).filter(o=>o.status==="rejected").map(o=>o.reason);let l;for(const o of s){if(Jn(o))throw o;!l&&Dn(o)&&(l=o)}for(const o of t.matches){const{id:d,routeId:h}=o,p=t.router.looseRoutesById[h];try{const f=Q4(t,d,p);if(f){const b=await f;t.updateMatch(d,g=>({...g,...b}))}}catch(f){console.error(`Error executing head for route ${h}:`,f)}}if(l)throw l;const c=Rc(t);Ti(c)&&await c}catch(n){if(Dn(n)&&!t.preload){const i=Rc(t);throw Ti(i)&&await i,n}if(Jn(n))throw n}return t.matches}async function WN(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 YN){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 bc(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function KN(e){for(const t of YN)if(e.options[t]?.preload)return!0;return!1}const YN=["component","errorComponent","pendingComponent","notFoundComponent"];function e5(e){return{input:({url:t})=>{for(const n of e)t=Mv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=XN(e[n],t);return t}}}function t5(e){const t=HN(e.basepath),n=`/${t}`,i=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:c})=>{const o=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return o===s?c.pathname="/":o.startsWith(l)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=Ac(["/",t,c.pathname]),c)}}function Mv(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 XN(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 ia(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 n5{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,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,c=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(b=>[encodeURIComponent(b),b])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=h4())),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 u4(i5(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),U4(this));let o=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(l||s!==d||c!==h){this.basepath=d;const b=[];HN(d)!==""&&b.push(t5({basepath:d})),h&&b.push(h),this.rewrite=b.length===0?void 0:b.length===1?b[0]:e5(b),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}=R4(this.routeTree,this.options.caseSensitive,(c,o)=>{c.init({originalIndex:o})});this.options.routeMasks&&w4(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=Mv(this.rewrite,p),b=this.options.parseSearch(f.search),g=this.options.stringifySearch(b);return f.search=g,{href:f.href.replace(f.origin,""),publicHref:d,url:f,pathname:rf(f.pathname),searchStr:g,search:Yn(i?.search,b),hash:rf(f.hash.split("#").reverse()[0]??""),state:Yn(i?.state,h)}},l=s(n),{__tempLocation:c,__tempKey:o}=l.state;if(c&&(!o||o===this.tempLocationKey)){const d=s(c);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=Kc(1e3),this.resolvePathWithBase=(n,i)=>D4({base:n,to:E_(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},s).matches:this.matchRoutesInternal(n,i).matches,this.getMatchedRoutes=n=>a5({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 c=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutes(c,{_buildLocation:!0}),d=Gc(o);l.from;const h=l.unsafeRelative==="path"?c.pathname:l.from??d.fullPath,p=this.resolvePathWithBase(h,"."),f=d.search,b={...d.params},g=l.to?this.resolvePathWithBase(p,`${l.to}`):this.resolvePathWithBase(p,"."),x=l.params===!1||l.params===null?{}:(l.params??!0)===!0?b:Object.assign(b,Si(l.params,b)),w=cf({path:g,params:x}).interpolatedPath,y=this.getMatchedRoutes(w);let E=y.matchedRoutes;const _=y.routeParams,S=y.foundRoute?y.foundRoute.path!=="/"&&y.routeParams["**"]:yr(w);let k;if(S&&(this.options.notFoundRoute?E=[...E,this.options.notFoundRoute]:k=qx(this.options.notFoundMode,E)),Object.keys(x).length>0)for(const X of E){const Z=X.options.params?.stringify??X.options.stringifyParams;Z&&Object.assign(x,Z(x))}const N=n.leaveParams?g:rf(cf({path:g,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let T=f;if(n._includeValidateSearch&&this.options.search?.strict){const X={};E.forEach(Z=>{if(Z.options.validateSearch)try{Object.assign(X,Bv(Z.options.validateSearch,{...X,...T}))}catch{}}),T=X}T=l5({search:T,dest:l,destRoutes:E,_includeValidateSearch:n._includeValidateSearch}),T=Yn(f,T);const O=this.options.stringifySearch(T),R=l.hash===!0?c.hash:l.hash?Si(l.hash,c.hash):void 0,L=R?`#${R}`:"";let D=l.state===!0?c.state:l.state?Si(l.state,c.state):{};D=Yn(c.state,D);const I={..._,...x},H=o5({routes:E,params:I,searchStr:O,globalNotFoundRouteId:k}),F=`${N}${O}${L}`,W=new URL(F,this.origin),K=XN(this.rewrite,W),V=W.href.replace(W.origin,"");return{publicHref:K.pathname+K.search+K.hash,href:V,url:K,pathname:N,search:T,searchStr:O,state:D,hash:R??"",unmaskOnReload:l.unmaskOnReload,_matchSnapshot:H}},s=(l={},c)=>{const o=i(l);let d=c?i(c):void 0;if(!d){const h={};if(this.options.routeMasks){const p=C4(o.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:f,params:b,...g}=p.route,x=b===!1||b===null?{}:(b??!0)===!0?h:Object.assign(h,Si(b,h));c={from:n.from,...g,params:x},d=i(c)}}}return d&&(o.maskedLocation=d),o};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:i,...s})=>{const l=()=>{const x=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];x.forEach(y=>{s.state[y]=this.latestLocation.state[y]});const w=ra(s.state,this.latestLocation.state);return x.forEach(y=>{delete s.state[y]}),w},c=yr(this.latestLocation.href)===yr(s.href),o=this.commitLocationPromise;if(this.commitLocationPromise=ds(()=>{o?.resolve()}),c&&l())return this.load(),this.commitLocationPromise;let{maskedLocation:d,hashScrollIntoView:h,url:p,...f}=s;d&&(f={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,f.state.__TSR_resetScroll=s.resetScroll??!0,this.shouldViewTransition=n,f.state.__TSR_sessionId=this.sessionId,f.state.__TSR_matches=s._matchSnapshot??s5({matchResult:this.getMatchedRoutes(s.pathname),pathname:s.pathname,searchStr:s.searchStr,notFoundRoute:this.options.notFoundRoute,notFoundMode:this.options.notFoundMode});const b={...s,publicHref:f.publicHref,state:f.state,maskedLocation:d};return(await this.history[s.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:i,skipTransitionerLoad:!0})).type==="BLOCKED"?(this.commitLocationPromise?.resolve(),this.commitLocationPromise):this.history.location.href!==f.publicHref?this.commitLocationPromise:(this.latestLocation=b,this.load({_skipUpdateLatestLocation:!0}),this.commitLocationPromise)},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:s,viewTransition:l,ignoreBlocker:c,href:o,...d}={})=>{if(o){const f=this.history.location.state.__TSR_index,b=$c(o,{__TSR_index:n?f:f+1}),g=new URL(b.pathname,this.origin),x=Mv(this.rewrite,g);d.to=x.pathname,d.search=this.options.parseSearch(b.search),d.hash=b.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:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:i,href:s,publicHref:l,...c})=>{let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!i&&(i=!0),i){if(n!==void 0||!s){const h=this.buildLocation({to:n,...c});s=s??h.url.href,l=l??h.url.href}const d=!o&&l?l:s;if(Wc(d))return Promise.resolve();if(!c.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const f of p)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...c,href:s,to:n,_isNavigate:!0})},this.beforeLoad=n=>{if(this.cancelMatches(),n?._skipUpdateLatestLocation||this.updateLatestLocation(),this.isServer){const l=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==l.publicHref||l.url.origin!==this.origin){const c=this.getParsedLocationHref(l);throw x_({href:c})}}const i=this.latestLocation.state.__TSR_sessionId===this.sessionId?this.latestLocation.state.__TSR_matches:void 0,s=this.matchRoutes(this.latestLocation,{snapshot:i});this.__store.setState(l=>({...l,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:s,cachedMatches:l.cachedMatches.filter(c=>!s.some(o=>o.id===c.id))}))},this.load=async n=>{let i,s,l;for(l=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad({_skipUpdateLatestLocation:n?._skipUpdateLatestLocation});const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ia({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...ia({resolvedLocation:h,location:d})}),await zx({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=[],f=[],b=[];Ro(()=>{this.__store.setState(g=>{const x=g.matches,w=g.pendingMatches||g.matches;return p=x.filter(y=>!w.some(E=>E.id===y.id)),f=w.filter(y=>!x.some(E=>E.id===y.id)),b=w.filter(y=>x.some(E=>E.id===y.id)),{...g,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...g.cachedMatches,...p.filter(y=>y.status!=="error"&&y.status!=="notFound")]}}),this.clearExpiredCache()}),[[p,"onLeave"],[f,"onEnter"],[b,"onStay"]].forEach(([g,x])=>{g.forEach(w=>{this.looseRoutesById[w.routeId].options[x]?.(w)})})})})}})}catch(d){Jn(d)?(i=d,this.isServer||this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Dn(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 c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(o=>o.status==="error")&&(c=500),c!==void 0&&this.__store.setState(o=>({...o,statusCode:c}))},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,c=this.state.resolvedLocation,o=typeof i.types=="function"?i.types(ia({resolvedLocation:c,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(c=>c.id===n?i(c):c)}))})},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"||s.status==="notFound"?{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.getParsedLocationHref=n=>{let i=n.url.href;return this.origin&&n.url.origin===this.origin&&(i=i.replace(this.origin,"")||"/"),i},this.resolveRedirect=n=>{const i=n.headers.get("Location");if(n.options.href){if(i)try{const s=new URL(i);if(this.origin&&s.origin===this.origin){const l=s.pathname+s.search+s.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}}else{const s=this.buildLocation(n.options),l=this.getParsedLocationHref(s);n.options.href=l,n.headers.set("Location",l)}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=WN,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)),c=new Set([...l,...this.state.cachedMatches.map(o=>o.id)]);Ro(()=>{s.forEach(o=>{c.has(o.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,o]}))})});try{return s=await zx({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(Jn(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:i});Dn(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=k4(l.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,o.pathname,this.processedTree);return!d||n.params&&!ra(d.rawParams,n.params,{partial:!0})?!1:i?.includeSearch??!0?ra(o.search,l.search,{partial:!0})?d.rawParams:!1:d.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.sessionId=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??G4,parseSearch:t.parseSearch??$4}),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=n?.snapshot,s=i&&i.routeIds.length>0&&i.routeIds.every(x=>this.routesById[x]);let l,c,o,d,h;if(s)l=i.routeIds.map(x=>this.routesById[x]),c={...i.params},o={...i.params},d=i.globalNotFoundRouteId,h=i.parsedParams;else{const x=this.getMatchedRoutes(t.pathname),{foundRoute:w,routeParams:y}=x;c=y,o={...y},l=x.matchedRoutes,h=x.parsedParams;let E=!1;(w?w.path!=="/"&&c["**"]:yr(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:E=!0),d=E?qx(this.options.notFoundMode,l):void 0}const p=[],f=x=>x?.id?x.context??this.options.context??void 0:this.options.context??void 0,b=s&&i.searchStr===t.searchStr&&i.validatedSearches?.length===l.length,g=[];if(l.forEach((x,w)=>{const y=p[w-1],[E,_,S]=(()=>{if(b){const Z=i.validatedSearches[w];return[Z.search,Z.strictSearch,void 0]}const V=y?.search??t.search,X=y?._strictSearch??void 0;try{const Z=Bv(x.options.validateSearch,{...V})??void 0;return[{...V,...Z},{...X,...Z},void 0]}catch(Z){let P=Z;if(Z instanceof Qc||(P=new Qc(Z.message,{cause:Z})),n?.throwOnError)throw P;return[V,{},P]}})();b||g.push({search:E,strictSearch:_});const k=x.options.loaderDeps?.({search:E})??"",N=k?JSON.stringify(k):"",{interpolatedPath:T,usedParams:O}=cf({path:x.fullPath,params:c,decodeCharMap:this.pathParamsDecodeCharMap}),R=x.id+T+N,L=this.getMatch(R),D=this.state.matches.find(V=>V.routeId===x.id),I=L?._strictParams??O;let H;if(!L)if(x.options.skipRouteOnParseError)for(const V in O)V in h&&(I[V]=h[V]);else{const V=x.options.params?.parse??x.options.parseParams;if(V)try{Object.assign(I,V(I))}catch(X){if(Dn(X)||Jn(X)?H=X:H=new r5(X.message,{cause:X}),n?.throwOnError)throw H}}Object.assign(c,I);const F=D?"stay":"enter";let W;if(L)W={...L,cause:F,params:D?Yn(D.params,c):c,_strictParams:I,search:Yn(D?D.search:L.search,E),_strictSearch:_};else{const V=x.options.loader||x.options.beforeLoad||x.lazyFn||KN(x)?"pending":"success";W={id:R,ssr:this.isServer?void 0:x.options.ssr,index:w,routeId:x.id,params:D?Yn(D.params,c):c,_strictParams:I,pathname:T,updatedAt:Date.now(),search:D?Yn(D.search,E):E,_strictSearch:_,searchError:void 0,status:V,isFetching:!1,error:void 0,paramsError:H,__routeContext:void 0,_nonReactive:{loadPromise:ds()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:D?Yn(D.loaderDeps,k):k,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:x.options.staticData||{},fullPath:x.fullPath}}n?.preload||(W.globalNotFound=d===x.id),W.searchError=S;const K=f(y);W.context={...K,...W.__routeContext,...W.__beforeLoadContext},p.push(W)}),!b&&g.length>0){const x=t.state?.__TSR_matches;x&&(x.searchStr=t.searchStr,x.validatedSearches=g)}return p.forEach((x,w)=>{const y=this.looseRoutesById[x.routeId];if(!this.getMatch(x.id)&&n?._buildLocation!==!0){const _=p[w-1],S=f(_);if(y.options.context){const k={deps:x.loaderDeps,params:x.params,context:S??{},location:t,navigate:N=>this.navigate({...N,_fromLocation:t}),buildLocation:this.buildLocation,cause:x.cause,abortController:x.abortController,preload:!!x.preload,matches:p};x.__routeContext=y.options.context(k)??void 0}x.context={...S,...x.__routeContext,...x.__beforeLoadContext}}}),{matches:p,rawParams:o}}}class Qc extends Error{}class r5 extends Error{}function i5(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Bv(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Qc("Async validation not supported");if(n.issues)throw new Qc(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 a5({pathname:e,routesById:t,processedTree:n}){const i={},s=yr(e);let l,c={};const o=T4(s,n,!0);return o&&(l=o.route,Object.assign(i,o.rawParams),c=Object.assign({},o.parsedParams)),{matchedRoutes:o?.branch||[t[bn]],routeParams:i,foundRoute:l,parsedParams:c}}function s5({matchResult:e,pathname:t,searchStr:n,notFoundRoute:i,notFoundMode:s}){const l={routeIds:e.matchedRoutes.map(o=>o.id),params:e.routeParams,parsedParams:e.parsedParams,searchStr:n};if(e.foundRoute?e.foundRoute.path!=="/"&&e.routeParams["**"]:yr(t))if(i)l.globalNotFoundRouteId=i.id;else{if(s!=="root")for(let o=e.matchedRoutes.length-1;o>=0;o--){const d=e.matchedRoutes[o];if(d.children){l.globalNotFoundRouteId=d.id;break}}l.globalNotFoundRouteId||(l.globalNotFoundRouteId=bn)}return l}function o5({routes:e,params:t,searchStr:n,globalNotFoundRouteId:i}){const s={};for(const c in t){const o=t[c];o!=null&&(s[c]=String(o))}const l={routeIds:e.map(c=>c.id),params:s,parsedParams:t,searchStr:n};return i&&(l.globalNotFoundRouteId=i),l}function l5({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){return c5(n)(e,t,i??!1)}function c5(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)s.options.search?.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const l=({search:c,next:o})=>{let d=c;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(d=s.options.preSearchFilters.reduce((p,f)=>f(p),c));const h=o(d);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((p,f)=>f(p),h):h};t.middlewares.push(l)}if(s.options.validateSearch){const l=({search:c,next:o})=>{const d=o(c);if(!t._includeValidateSearch)return d;try{return{...d,...Bv(s.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(l)}}const n=({search:s})=>{const l=t.dest;return l.search?l.search===!0?s:Si(l.search,s):{}};t.middlewares.push(n);const i=(s,l,c)=>{if(s>=c.length)return l;const o=c[s];return o({search:l,next:h=>i(s+1,h,c)})};return function(l,c,o){return t.dest=c,t._includeValidateSearch=o,i(0,l,t.middlewares)}}function qx(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const i=t[n];if(i.children)return i.id}return bn}const u5="Error preloading route! ☝️";class ZN{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=bn:this.parentRoute||zr(!1);let l=s?bn:i?.path;l&&l!=="/"&&(l=UN(l));const c=i?.id||l;let o=s?bn:Ac([this.parentRoute.id===bn?"":this.parentRoute.id,c]);l===bn&&(l="/"),o!==bn&&(o=Ac(["/",o]));const d=o===bn?"/":Ac([this.parentRoute.fullPath,l]);this._path=l,this._id=o,this._fullPath=d,this._to=yr(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.redirect=n=>x_({from:this.fullPath,...n}),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 d5 extends ZN{constructor(t){super(t)}}const yc=typeof window<"u"?q.useLayoutEffect:q.useEffect;function df(e){const t=q.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function h5(e,t,n={},i={}){q.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 f5(e){const t=q.useRef(null);return q.useImperativeHandle(e,()=>t.current,[]),t}function w_(e){const t=e.errorComponent??du;return v.jsx(p5,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?q.createElement(t,{error:n,reset:i}):e.children})}class p5 extends q.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 du({error:e}){const[t,n]=q.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.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"})]}),v.jsx("div",{style:{height:".25rem"}}),t?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?v.jsx("code",{children:e.message}):null})}):null]})}function m5({children:e,fallback:t=null}){return QN()?v.jsx(Yt.Fragment,{children:e}):v.jsx(Yt.Fragment,{children:t})}function QN(){return Yt.useSyncExternalStore(g5,()=>!0,()=>!1)}function g5(){return()=>{}}var hf={exports:{}},ff={},pf={exports:{}},mf={};var $x;function b5(){if($x)return mf;$x=1;var e=qo();function t(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function o(f,b){var g=b(),x=i({inst:{value:g,getSnapshot:b}}),w=x[0].inst,y=x[1];return l(function(){w.value=g,w.getSnapshot=b,d(w)&&y({inst:w})},[f,g,b]),s(function(){return d(w)&&y({inst:w}),f(function(){d(w)&&y({inst:w})})},[f]),c(g),g}function d(f){var b=f.getSnapshot;f=f.value;try{var g=b();return!n(f,g)}catch{return!0}}function h(f,b){return b()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:o;return mf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,mf}var Gx;function y5(){return Gx||(Gx=1,pf.exports=b5()),pf.exports}var Vx;function v5(){if(Vx)return ff;Vx=1;var e=qo(),t=y5();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,c=e.useEffect,o=e.useMemo,d=e.useDebugValue;return ff.useSyncExternalStoreWithSelector=function(h,p,f,b,g){var x=l(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=o(function(){function E(T){if(!_){if(_=!0,S=T,T=b(T),g!==void 0&&w.hasValue){var O=w.value;if(g(O,T))return k=O}return k=T}if(O=k,i(S,T))return O;var R=b(T);return g!==void 0&&g(O,R)?(S=T,O):(S=T,k=R)}var _=!1,S,k,N=f===void 0?null:f;return[function(){return E(p())},N===null?void 0:function(){return E(N())}]},[p,f,b,g]);var y=s(h,x[0],x[1]);return c(function(){w.hasValue=!0,w.value=y},[y]),d(y),y},ff}var Wx;function _5(){return Wx||(Wx=1,hf.exports=v5()),hf.exports}var S5=_5();function E5(e,t=i=>i,n={}){const i=n.equal??x5;return S5.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,i)}function x5(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=Kx(e);if(n.length!==Kx(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 Kx(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const gf=q.createContext(null);function JN(){return typeof document>"u"?gf:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=gf,gf)}function Fn(e){const t=q.useContext(JN());return e?.warn,t}function vn(e){const t=Fn({warn:e?.router===void 0}),n=e?.router||t,i=q.useRef(void 0);return E5(n.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Yn(i.current,e.select(s));return i.current=l,l}return e.select(s)}return s})}const hu=q.createContext(void 0),w5=q.createContext(void 0);function Sr(e){const t=q.useContext(e.from?w5:hu);return vn({select:i=>{const s=i.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(zr(!((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 C_(e){return Sr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function k_(e){const{select:t,...n}=e;return Sr({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function T_(e){return Sr({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 A_(e){return Sr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fu(e){const t=Fn();return q.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var C5=wN();function k5(e,t){const n=Fn(),[i,s]=q.useState(!1),l=q.useRef(!1),c=f5(t),o=QN(),{activeProps:d,inactiveProps:h,activeOptions:p,to:f,preload:b,preloadDelay:g,hashScrollIntoView:x,replace:w,startTransition:y,resetScroll:E,viewTransition:_,children:S,target:k,disabled:N,style:T,className:O,onClick:R,onFocus:L,onMouseEnter:D,onMouseLeave:I,onTouchStart:H,ignoreBlocker:F,params:W,search:K,hash:V,state:X,mask:Z,reloadDocument:P,unsafeRelative:M,from:j,_fromLocation:G,...U}=e,ee=vn({select:ke=>ke.location.search,structuralSharing:!0}),ae=e.from,de=q.useMemo(()=>({...e,from:ae}),[n,ee,ae,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Y=q.useMemo(()=>n.buildLocation({...de}),[n,de]),z=q.useMemo(()=>{if(N)return;let ke=Y.maskedLocation?Y.maskedLocation.url.href:Y.url.href,Le=!1;return n.origin&&(ke.startsWith(n.origin)?ke=n.history.createHref(ke.replace(n.origin,""))||"/":Le=!0),{href:ke,external:Le}},[N,Y.maskedLocation,Y.url,n.origin,n.history]),ne=q.useMemo(()=>{if(z?.external)return Wc(z.href)?void 0:z.href;if(!(typeof f=="string"&&f.charCodeAt(0)===47&&f.charCodeAt(1)!==47))try{return new URL(f),Wc(f)?void 0:f}catch{}},[f,z]),ue=e.reloadDocument||ne?!1:b??n.options.defaultPreload,ge=g??n.options.defaultPreloadDelay??0,be=vn({select:ke=>{if(ne)return!1;if(p?.exact){if(!I4(ke.location.pathname,Y.pathname,n.basepath))return!1}else{const Le=Yc(ke.location.pathname,n.basepath),oe=Yc(Y.pathname,n.basepath);if(!(Le.startsWith(oe)&&(Le.length===oe.length||Le[oe.length]==="/")))return!1}return(p?.includeSearch??!0)&&!ra(ke.location.search,Y.search,{partial:!p?.exact,ignoreUndefined:!p?.explicitUndefined})?!1:p?.includeHash?o&&ke.location.hash===Y.hash:!0}}),xe=q.useCallback(()=>{n.preloadRoute({...de}).catch(ke=>{console.warn(ke),console.warn(u5)})},[n,de]),Ue=q.useCallback(ke=>{ke?.isIntersecting&&xe()},[xe]);h5(c,Ue,O5,{disabled:!!N||ue!=="viewport"}),q.useEffect(()=>{l.current||!N&&ue==="render"&&(xe(),l.current=!0)},[N,xe,ue]);const De=ke=>{const Le=ke.currentTarget.getAttribute("target"),oe=k!==void 0?k:Le;if(!N&&!L5(ke)&&!ke.defaultPrevented&&(!oe||oe==="_self")&&ke.button===0){ke.preventDefault(),C5.flushSync(()=>{s(!0)});const me=n.subscribe("onResolved",()=>{me(),s(!1)});n.navigate({...de,replace:w,resetScroll:E,hashScrollIntoView:x,startTransition:y,viewTransition:_,ignoreBlocker:F})}};if(ne)return{...U,ref:c,href:ne,...S&&{children:S},...k&&{target:k},...N&&{disabled:N},...T&&{style:T},...O&&{className:O},...R&&{onClick:R},...L&&{onFocus:L},...D&&{onMouseEnter:D},...I&&{onMouseLeave:I},...H&&{onTouchStart:H}};const ve=ke=>{N||ue&&xe()},Se=ve,Qe=ke=>{if(!(N||!ue))if(!ge)xe();else{const Le=ke.target;if(_o.has(Le))return;const oe=setTimeout(()=>{_o.delete(Le),xe()},ge);_o.set(Le,oe)}},kt=ke=>{if(N||!ue||!ge)return;const Le=ke.target,oe=_o.get(Le);oe&&(clearTimeout(oe),_o.delete(Le))},Je=be?Si(d,{})??T5:bf,ot=be?bf:Si(h,{})??bf,Xe=[O,Je.className,ot.className].filter(Boolean).join(" "),mt=(T||Je.style||ot.style)&&{...T,...Je.style,...ot.style};return{...U,...Je,...ot,href:z?.href,ref:c,onClick:So([R,De]),onFocus:So([L,ve]),onMouseEnter:So([D,Qe]),onMouseLeave:So([I,kt]),onTouchStart:So([H,Se]),disabled:!!N,target:k,...mt&&{style:mt},...Xe&&{className:Xe},...N&&A5,...be&&R5,...i&&N5}}const bf={},T5={className:"active"},A5={role:"link","aria-disabled":!0},R5={"data-status":"active","aria-current":"page"},N5={"data-transitioning":"transitioning"},_o=new WeakMap,O5={rootMargin:"100px"},So=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},eO=q.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:s,...l}=k5(i,t),c=typeof i.children=="function"?i.children({isActive:l["data-status"]==="active"}):i.children;if(!n){const{disabled:o,...d}=l;return q.createElement("a",d,c)}return q.createElement(n,l,c)});function L5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let I5=class extends ZN{constructor(t){super(t),this.useMatch=n=>Sr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Sr({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>A_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>T_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>k_({...n,from:this.id}),this.useLoaderData=n=>C_({...n,from:this.id}),this.useNavigate=()=>fu({from:this.fullPath}),this.Link=Yt.forwardRef((n,i)=>v.jsx(eO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function D5(e){return new I5(e)}class M5 extends d5{constructor(t){super(t),this.useMatch=n=>Sr({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Sr({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>A_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>T_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>k_({...n,from:this.id}),this.useLoaderData=n=>C_({...n,from:this.id}),this.useNavigate=()=>fu({from:this.fullPath}),this.Link=Yt.forwardRef((n,i)=>v.jsx(eO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function B5(e){return new M5(e)}function Mo(e){return typeof e=="object"?new Yx(e,{silent:!0}).createRoute(e):new Yx(e,{silent:!0}).createRoute}class Yx{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const s=D5(i);return s.isRoot=!1,s},this.silent=n?.silent}}class Xx{constructor(t){this.useMatch=n=>Sr({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Sr({from:this.options.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>A_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>T_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>k_({...n,from:this.options.id}),this.useLoaderData=n=>C_({...n,from:this.options.id}),this.useNavigate=()=>{const n=Fn();return fu({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Zx(e){return typeof e=="object"?new Xx(e):t=>new Xx({id:e,...t})}function F5(){const e=Fn(),t=q.useRef({router:e,mounted:!1}),[n,i]=q.useState(!1),{hasPendingMatches:s,isLoading:l}=vn({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),c=df(l),o=l||n||s,d=df(o),h=l||s,p=df(h);return e.startTransition=f=>{i(!0),q.startTransition(()=>{f(),i(!1)})},q.useEffect(()=>{const f=e.history.subscribe(({navigateOpts:g})=>{g?.skipTransitionerLoad||e.load()}),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return yr(e.latestLocation.publicHref)!==yr(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{f()}},[e,e.history]),yc(()=>{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(b){console.error(b)}})()},[e]),yc(()=>{c&&!l&&e.emit({type:"onLoad",...ia(e.state)})},[c,e,l]),yc(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...ia(e.state)})},[h,p,e]),yc(()=>{if(d&&!o){const f=ia(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(b=>({...b,status:"idle",resolvedLocation:b.location})),f.hrefChanged&&H4(e)}},[o,d,e]),null}function j5(e){const t=vn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return v.jsx(w_,{getResetKey:()=>t,onCatch:(n,i)=>{if(Dn(n))e.onCatch?.(n,i);else throw n},errorComponent:({error:n})=>{if(Dn(n))return e.fallback?.(n);throw n},children:e.children})}function P5(){return v.jsx("p",{children:"Not Found"})}function ss(e){return v.jsx(v.Fragment,{children:e.children})}function tO(e,t,n){return t.options.notFoundComponent?v.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?v.jsx(e.options.defaultNotFoundComponent,{...n}):v.jsx(P5,{})}function U5({children:e}){const t=Fn();return t.isServer?v.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function H5(){const e=Fn();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Dv)(e.latestLocation),i=n!==Dv(e.latestLocation)?n:void 0,s={storageKey:Xc,shouldScrollRestoration:!0};return i&&(s.key=i),v.jsx(U5,{children:`(${zN.toString()})(${v4(JSON.stringify(s))})`})}const nO=q.memo(function({matchId:t}){const n=Fn(),i=vn({select:E=>{const _=E.matches.find(S=>S.id===t);return zr(_),{routeId:_.routeId,ssr:_.ssr,_displayPending:_._displayPending}},structuralSharing:!0}),s=n.routesById[i.routeId],l=s.options.pendingComponent??n.options.defaultPendingComponent,c=l?v.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))?q.Suspense:ss,b=o?w_:ss,g=h?j5:ss,x=vn({select:E=>E.loadedAt}),w=vn({select:E=>{const _=E.matches.findIndex(S=>S.id===t);return E.matches[_-1]?.routeId}}),y=s.isRoot?s.options.shellComponent??ss:ss;return v.jsxs(y,{children:[v.jsx(hu.Provider,{value:t,children:v.jsx(f,{fallback:c,children:v.jsx(b,{getResetKey:()=>x,errorComponent:o||du,onCatch:(E,_)=>{if(Dn(E))throw E;d?.(E,_)},children:v.jsx(g,{fallback:E=>{if(!h||E.routeId&&E.routeId!==i.routeId||!E.routeId&&!s.isRoot)throw E;return q.createElement(h,E)},children:p||i._displayPending?v.jsx(m5,{fallback:c,children:v.jsx(Qx,{matchId:t})}):v.jsx(Qx,{matchId:t})})})})}),w===bn&&n.options.scrollRestoration?v.jsxs(v.Fragment,{children:[v.jsx(z5,{}),v.jsx(H5,{})]}):null]})});function z5(){const e=Fn(),t=q.useRef(void 0);return v.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ia(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Qx=q.memo(function({matchId:t}){const n=Fn(),{match:i,key:s,routeId:l}=vn({select:d=>{const h=d.matches.find(x=>x.id===t),p=h.routeId,b=(n.routesById[p].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:p,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:b?JSON.stringify(b):void 0,routeId:p,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),c=n.routesById[l],o=q.useMemo(()=>{const d=c.options.component??n.options.defaultComponent;return d?v.jsx(d,{},s):v.jsx(rO,{})},[s,c.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=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(i.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const p=ds();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 zr(Dn(i.error)),tO(n,c,i.error);if(i.status==="redirected")throw zr(Jn(i.error)),n.getMatch(i.id)?._nonReactive.loadPromise;if(i.status==="error"){if(n.isServer){const d=(c.options.errorComponent??n.options.defaultErrorComponent)||du;return v.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}})}throw i.error}return o}),rO=q.memo(function(){const t=Fn(),n=q.useContext(hu),i=vn({select:h=>h.matches.find(p=>p.id===n)?.routeId}),s=t.routesById[i],l=vn({select:h=>{const f=h.matches.find(b=>b.id===n);return zr(f),f.globalNotFound}}),c=vn({select:h=>{const p=h.matches,f=p.findIndex(b=>b.id===n);return p[f+1]?.id}}),o=t.options.defaultPendingComponent?v.jsx(t.options.defaultPendingComponent,{}):null;if(l)return tO(t,s,void 0);if(!c)return null;const d=v.jsx(nO,{matchId:c});return i===bn?v.jsx(q.Suspense,{fallback:o,children:d}):d});function q5(){const e=Fn(),n=e.routesById[bn].options.pendingComponent??e.options.defaultPendingComponent,i=n?v.jsx(n,{}):null,s=e.isServer||typeof document<"u"&&e.ssr?ss:q.Suspense,l=v.jsxs(s,{fallback:i,children:[!e.isServer&&v.jsx(F5,{}),v.jsx($5,{})]});return e.options.InnerWrap?v.jsx(e.options.InnerWrap,{children:l}):l}function $5(){const e=Fn(),t=vn({select:s=>s.matches[0]?.id}),n=vn({select:s=>s.loadedAt}),i=t?v.jsx(nO,{matchId:t}):null;return v.jsx(hu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:v.jsx(w_,{getResetKey:()=>n,errorComponent:du,onCatch:s=>{s.message||s.toString()},children:i})})}const G5=e=>new V5(e);class V5 extends n5{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Mo,globalThis.createLazyFileRoute=Zx):typeof window<"u"&&(window.createFileRoute=Mo,window.createLazyFileRoute=Zx);function W5({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=JN(),s=v.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?v.jsx(e.options.Wrap,{children:s}):s}function K5({router:e,...t}){return v.jsx(W5,{router:e,...t,children:v.jsx(q5,{})})}const pu=B5({component:Y5});function Y5(){return v.jsxs(v.Fragment,{children:[v.jsx(rO,{}),null]})}const X5=Mo("/")({beforeLoad:()=>{throw x_({to:"/sessions"})},component:()=>null}),it=q.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",c={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 v.jsx("button",{ref:s,className:`${l} ${c[t]} ${o[n]} ${e}`,...i})});it.displayName="Button";const Z5=q.forwardRef(({className:e="",children:t,...n},i)=>v.jsx("div",{ref:i,className:`bg-card text-card-foreground border border-border rounded-lg ${e}`,...n,children:t}));Z5.displayName="Card";const Q5=q.forwardRef(({className:e="",...t},n)=>v.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}));Q5.displayName="Input";const mu=q.forwardRef(({className:e="",...t},n)=>v.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}));mu.displayName="Textarea";const Jx=e=>{let t;const n=new Set,i=(h,p)=>{const f=typeof h=="function"?h(t):h;if(!Object.is(f,t)){const b=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(g=>g(t,b))}},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},J5=(e=>e?Jx(e):Jx),e6=e=>e;function t6(e,t=e6){const n=Yt.useSyncExternalStore(e.subscribe,Yt.useCallback(()=>t(e.getState()),[e,t]),Yt.useCallback(()=>t(e.getInitialState()),[e,t]));return Yt.useDebugValue(n),n}const ew=e=>{const t=J5(e),n=i=>t6(t,i);return Object.assign(n,t),n},lr=(e=>e?ew(e):ew),R_=lr(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 n6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),r6=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),tw=e=>{const t=r6(e);return t.charAt(0).toUpperCase()+t.slice(1)},iO=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),i6=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var a6={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 s6=q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:c,...o},d)=>q.createElement("svg",{ref:d,...a6,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:iO("lucide",s),...!l&&!i6(o)&&{"aria-hidden":"true"},...o},[...c.map(([h,p])=>q.createElement(h,p)),...Array.isArray(l)?l:[l]]));const Ee=(e,t)=>{const n=q.forwardRef(({className:i,...s},l)=>q.createElement(s6,{ref:l,iconNode:t,className:iO(`lucide-${n6(tw(e))}`,`lucide-${e}`,i),...s}));return n.displayName=tw(e),n};const o6=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],l6=Ee("arrow-down-to-line",o6);const c6=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],u6=Ee("arrow-down",c6);const d6=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],h6=Ee("arrow-left",d6);const f6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],p6=Ee("arrow-right",f6);const m6=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],aO=Ee("arrow-up-right",m6);const g6=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],sO=Ee("arrow-up",g6);const b6=[["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"}]],y6=Ee("bot",b6);const v6=[["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"}]],_6=Ee("braces",v6);const S6=[["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"}]],N_=Ee("brain",S6);const E6=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ua=Ee("check",E6);const x6=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bs=Ee("chevron-down",x6);const w6=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],C6=Ee("chevron-left",w6);const k6=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],en=Ee("chevron-right",k6);const T6=[["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"}]],Gr=Ee("circle-alert",T6);const A6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],R6=Ee("circle-check",A6);const N6=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],O6=Ee("circle-check-big",N6);const L6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],oO=Ee("circle-stop",L6);const I6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],lO=Ee("circle-x",I6);const D6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],M6=Ee("circle",D6);const B6=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cO=Ee("clock",B6);const F6=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],j6=Ee("code",F6);const P6=[["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"}]],nw=Ee("command",P6);const U6=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],uO=Ee("copy",U6);const H6=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],z6=Ee("credit-card",H6);const q6=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],$6=Ee("database",q6);const G6=[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]],rw=Ee("diff",G6);const V6=[["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"}]],dO=Ee("dollar-sign",V6);const W6=[["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"}]],K6=Ee("ellipsis-vertical",W6);const Y6=[["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"}]],da=Ee("external-link",Y6);const X6=[["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"}]],hO=Ee("file-code",X6);const Z6=[["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"}]],Q6=Ee("file-json",Z6);const J6=[["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"}]],ha=Ee("file-pen",J6);const eB=[["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"}]],fO=Ee("file-plus",eB);const tB=[["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"}]],gu=Ee("file-text",tB);const nB=[["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"}]],rB=Ee("file-type",nB);const iB=[["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"}]],aB=Ee("file-x",iB);const sB=[["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"}]],Ai=Ee("file",sB);const oB=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Bo=Ee("flask-conical",oB);const lB=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],cB=Ee("folder-open",lB);const uB=[["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"}]],pO=Ee("folder-tree",uB);const dB=[["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"}]],hB=Ee("folder",dB);const fB=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],pB=Ee("funnel",fB);const mB=[["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"}]],Bn=Ee("git-branch",mB);const gB=[["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"}]],Jc=Ee("git-commit-horizontal",gB);const bB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],yB=Ee("globe",bB);const vB=[["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"}]],mO=Ee("hash",vB);const _B=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],SB=Ee("history",_B);const EB=[["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"}]],gO=Ee("image",EB);const xB=[["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"}]],bO=Ee("keyboard",xB);const wB=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],CB=Ee("link-2",wB);const kB=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],TB=Ee("link",kB);const AB=[["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"}]],RB=Ee("list",AB);const NB=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],xi=Ee("loader-circle",NB);const OB=[["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"}]],yO=Ee("message-square",OB);const LB=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],IB=Ee("minimize-2",LB);const DB=[["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"}]],MB=Ee("octagon-x",DB);const BB=[["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"}]],iw=Ee("pencil",BB);const FB=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Fo=Ee("plus",FB);const jB=[["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"}]],vO=Ee("refresh-cw",jB);const PB=[["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"}]],_O=Ee("rotate-ccw",PB);const UB=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$o=Ee("search",UB);const HB=[["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"}]],jo=Ee("sparkles",HB);const zB=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],qB=Ee("split",zB);const $B=[["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"}]],GB=Ee("square-check-big",$B);const VB=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],fa=Ee("terminal",VB);const WB=[["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"}]],SO=Ee("trash-2",WB);const KB=[["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"}]],YB=Ee("upload",KB);const XB=[["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"}]],EO=Ee("user",XB);const ZB=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],er=Ee("x",ZB);function QB(){const{isOpen:e,title:t,message:n,confirmLabel:i,cancelLabel:s,variant:l,onConfirm:c,onCancel:o,closeConfirmation:d}=R_(),[h,p]=q.useState(!1);q.useEffect(()=>{e||p(!1)},[e]);const f=q.useCallback(async()=>{p(!0);try{await c(),d()}catch(x){console.error("Confirmation action failed:",x),p(!1)}},[c,d]),b=q.useCallback(()=>{o?.(),d()},[o,d]),g=x=>{x.target===x.currentTarget&&!h&&b()};return q.useEffect(()=>{const x=w=>{if(e&&!h){const y=w.target,E=y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.isContentEditable;(w.key==="Escape"||w.key==="q"&&!E)&&(w.preventDefault(),b()),w.key==="Enter"&&(w.preventDefault(),f())}};if(e)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,h,f,b]),e?v.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:g,onKeyDown:x=>{const w=x.target,y=w.tagName==="INPUT"||w.tagName==="TEXTAREA"||w.isContentEditable;(x.key==="Escape"||x.key==="q"&&!y)&&!h&&(x.preventDefault(),b())},children:v.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg max-w-md w-full mx-4",children:[v.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[l==="destructive"&&v.jsx(Gr,{className:"w-5 h-5 text-destructive"}),v.jsx("h2",{className:"text-lg font-semibold",children:t})]}),v.jsx("button",{type:"button",onClick:b,disabled:h,className:"p-1 hover:bg-muted rounded transition-colors disabled:opacity-50","aria-label":"Close",children:v.jsx(er,{className:"w-5 h-5"})})]}),v.jsx("div",{className:"p-4",children:v.jsx("p",{className:"text-muted-foreground",children:n})}),v.jsxs("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-border",children:[v.jsx("button",{type:"button",onClick:b,disabled:h,className:"px-4 py-2 text-sm font-medium rounded transition-colors hover:bg-muted disabled:opacity-50",children:s}),v.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}let JB=0;const fs=lr(e=>({toasts:[],addToast:t=>{const n=`toast-${++JB}`;return e(i=>({toasts:[...i.toasts,{...t,id:n}]})),n},removeToast:t=>e(n=>({toasts:n.toasts.filter(i=>i.id!==t)})),updateToast:(t,n)=>e(i=>({toasts:i.toasts.map(s=>s.id===t?{...s,...n}:s)})),clearToasts:()=>e({toasts:[]})}));function vr(e,t="default",n=4e3){const i=fs.getState().addToast({message:e,type:t,duration:n});return n>0&&setTimeout(()=>{fs.getState().removeToast(i)},n),i}vr.success=(e,t=4e3)=>vr(e,"success",t);vr.error=(e,t=5e3)=>vr(e,"error",t);vr.loading=e=>vr(e,"loading",0);const eF={default:v.jsx(z6,{className:"h-4 w-4"}),success:v.jsx(O6,{className:"h-4 w-4 text-green-500"}),error:v.jsx(lO,{className:"h-4 w-4 text-red-500"}),loading:v.jsx(xi,{className:"h-4 w-4 animate-spin"})};function tF({toast:e}){const[t,n]=q.useState(!1),i=fs(l=>l.removeToast);q.useEffect(()=>{requestAnimationFrame(()=>n(!0))},[]);const s=()=>{n(!1),setTimeout(()=>i(e.id),150)};return v.jsxs("div",{className:`
10
10
  flex items-center gap-3 px-4 py-3
11
11
  bg-card border border-border rounded-lg shadow-lg
12
12
  transition-all duration-150 ease-out cursor-pointer
@@ -93,31 +93,24 @@ ${y.url}`).join(`
93
93
  <path d="M26.9568 9.88184H22.1265L30.7753 31.7848H35.4917L26.9568 9.88184ZM13.028 9.88184L4.4917 31.7848H9.32203L11.2305 27.1793H20.2166L22.0126 31.6724H26.8444L18.0832 9.88184H13.028ZM12.5783 23.1361L15.4987 15.3853L18.5315 23.1361H12.5783Z" fill="currentColor"/>
94
94
  </svg>`,DQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
95
95
  <path d="M32.8377 17.282C33.2127 16.25 33.3072 15.218 33.2127 14.1875C33.1197 13.1571 32.7447 12.1251 32.2752 11.1876C31.4322 9.78209 30.2127 8.6571 28.8072 8.0001C27.3072 7.34461 25.7127 7.15711 24.1197 7.53211C23.3698 6.78212 22.5253 6.12512 21.5878 5.65713C20.6503 5.18913 19.5253 5.00013 18.4948 5.00013C16.8851 4.99074 15.3125 5.48246 13.9948 6.40712C12.6824 7.34311 11.7449 8.6571 11.2754 10.1571C10.1504 10.4376 9.21289 10.9071 8.27539 11.4696C7.4324 12.1251 6.77541 12.9696 6.21291 13.8126C5.36992 15.2195 5.08792 16.8125 5.27542 18.407C5.46399 19.9968 6.11605 21.496 7.1504 22.718C6.79608 23.7086 6.66795 24.7659 6.77541 25.8124C6.86991 26.8444 7.2449 27.8749 7.7129 28.8124C8.55739 30.2194 9.77538 31.3444 11.1824 31.9999C12.6824 32.6569 14.2753 32.8444 15.8698 32.4694C16.6198 33.2194 17.4628 33.8749 18.4003 34.3444C19.3378 34.8139 20.4628 34.9999 21.4948 34.9999C23.1043 35.0097 24.6769 34.5185 25.9947 33.5944C27.3072 32.6569 28.2447 31.3444 28.7127 29.8444C29.7719 29.6432 30.7682 29.1934 31.6197 28.5319C32.4627 27.8749 33.2127 27.1249 33.6822 26.1874C34.5251 24.7819 34.8071 23.1875 34.6196 21.5945C34.4322 20 33.8697 18.5015 32.8377 17.282ZM21.5878 33.0304C20.0878 33.0304 18.9628 32.5609 17.9323 31.7179C17.9323 31.7179 18.0253 31.6234 18.1198 31.6234L24.1197 28.1554C24.2862 28.0803 24.4196 27.9469 24.4947 27.7804C24.5698 27.636 24.6021 27.4731 24.5877 27.3109V18.875L27.1197 20.375V27.3124C27.1455 28.0547 27.0215 28.7945 26.755 29.4878C26.4885 30.181 26.085 30.8134 25.5687 31.3473C25.0523 31.8811 24.4337 32.3054 23.7497 32.5949C23.0658 32.8843 22.3305 33.0314 21.5878 33.0304ZM9.49488 27.8749C8.83789 26.7499 8.55739 25.4374 8.83789 24.125C8.83789 24.125 8.93239 24.2195 9.02539 24.2195L15.0253 27.6874C15.1693 27.7638 15.3325 27.7966 15.4948 27.7819C15.6823 27.7819 15.8698 27.7819 15.9628 27.6874L23.2753 23.4695V26.3749L17.1823 29.9374C16.5506 30.3042 15.8527 30.5427 15.1287 30.6393C14.4046 30.7358 13.6686 30.6884 12.9629 30.4999C11.4629 30.1249 10.2449 29.1874 9.49488 27.8749ZM7.9004 14.8445C8.56239 13.7234 9.58826 12.8627 10.8074 12.4056V19.532C10.8074 19.718 10.8074 19.907 10.9004 20C10.9755 20.1665 11.1089 20.2998 11.2754 20.375L18.5878 24.5944L16.0573 26.0944L10.0574 22.625C9.41842 22.2639 8.85742 21.7797 8.40684 21.2004C7.95627 20.6211 7.62506 19.9582 7.4324 19.25C7.05741 17.8445 7.1504 16.157 7.9004 14.8445ZM28.6197 19.625L21.3073 15.407L23.8377 13.9071L29.8377 17.375C30.7752 17.9375 31.5252 18.6875 31.9947 19.625C32.4642 20.5625 32.7447 21.5945 32.6502 22.7195C32.5603 23.7755 32.1699 24.7837 31.5252 25.6249C30.8697 26.4694 30.0252 27.1249 28.9947 27.4999V20.375C28.9947 20.1875 28.9947 20 28.9002 19.907C28.9002 19.907 28.8072 19.718 28.6197 19.625ZM31.1502 15.875C31.1502 15.875 31.0572 15.782 30.9627 15.782L24.9627 12.3126C24.7752 12.2196 24.6822 12.2196 24.4947 12.2196C24.3072 12.2196 24.1197 12.2196 24.0252 12.3126L16.7128 16.532V13.6251L22.8073 10.0626C23.7448 9.50009 24.7752 9.31259 25.9002 9.31259C26.9322 9.31259 27.9627 9.68759 28.9002 10.3446C29.7447 11.0001 30.4947 11.8446 30.8697 12.7821C31.2447 13.7196 31.3377 14.8445 31.1502 15.875ZM15.4003 21.125L12.8699 19.625V12.5946C12.8699 11.5626 13.1503 10.4376 13.7128 9.59459C14.2753 8.6571 15.1198 8.0001 16.0573 7.53211C17.0127 7.05249 18.0956 6.88812 19.1503 7.06261C20.1823 7.15711 21.2128 7.62511 22.0573 8.2821C22.0573 8.2821 21.9628 8.3751 21.8698 8.3751L15.8698 11.8446C15.7033 11.9197 15.57 12.0531 15.4948 12.2196C15.4003 12.4071 15.4003 12.5001 15.4003 12.6876V21.125ZM16.7128 18.125L19.9948 16.25L23.2753 18.125V21.875L19.9948 23.75L16.7128 21.875V18.125Z" fill="currentColor"/>
96
- </svg>
97
- `,MQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
96
+ </svg>`,MQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
98
97
  <path d="M37 20.034C27.8809 20.5837 20.5808 27.8809 20.0326 37H19.966C19.4163 27.8809 12.1177 20.5837 3 20.034V19.9674C12.1191 19.4163 19.4163 12.1191 19.966 3H20.0326C20.5822 12.1191 27.8809 19.4163 37 19.9674V20.034Z" fill="currentColor"/>
99
- </svg>
100
- `,BQ=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
98
+ </svg>`,BQ=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
101
99
  <path d="M3.10913 12.07C3.65512 12.07 5.76627 11.5988 6.85825 10.98C7.95023 10.3612 7.95023 10.3612 10.207 8.75965C13.0642 6.73196 15.0845 7.41088 18.3968 7.41088" fill="currentColor"/>
102
100
  <path d="M3.10913 12.07C3.65512 12.07 5.76627 11.5988 6.85825 10.98C7.95023 10.3612 7.95023 10.3612 10.207 8.75965C13.0642 6.73196 15.0845 7.41088 18.3968 7.41088" stroke="currentColor" stroke-width="3.27593"/>
103
101
  <path d="M21.6 7.43108L16.0037 10.6622V4.20001L21.6 7.43108Z" fill="currentColor" stroke="currentColor" stroke-width="0.0363992"/>
104
102
  <path d="M3 12.072C3.54599 12.072 5.65714 12.5432 6.74912 13.162C7.8411 13.7808 7.8411 13.7808 10.0978 15.3823C12.9551 17.41 14.9753 16.7311 18.2877 16.7311" fill="currentColor"/>
105
103
  <path d="M3 12.072C3.54599 12.072 5.65714 12.5432 6.74912 13.162C7.8411 13.7808 7.8411 13.7808 10.0978 15.3823C12.9551 17.41 14.9753 16.7311 18.2877 16.7311" stroke="currentColor" stroke-width="3.27593"/>
106
104
  <path d="M21.4909 16.7109L15.8945 13.4798V19.942L21.4909 16.7109Z" fill="currentColor" stroke="currentColor" stroke-width="0.0363992"/>
107
- </svg>
108
- `,FQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
105
+ </svg>`,FQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
109
106
  <path d="M20.056 4.50022C14.0839 4.44597 9.20616 9.15015 9.15036 15.0106C9.09611 20.8726 13.8855 25.6621 19.8576 25.7163H23.6085V21.7391H20.056C16.3252 21.7825 13.2671 18.8468 13.2237 15.1827C13.1787 11.5216 16.1702 8.52086 19.901 8.47746H20.056C23.7868 8.47746 26.8108 11.4457 26.8216 15.1083V24.8809C26.8216 28.5109 23.8085 31.4683 20.1211 31.5132C18.3617 31.5007 16.6759 30.8049 15.42 29.5726L12.551 32.3905C14.5529 34.3571 17.239 35.4715 20.0451 35.4998H20.1877C26.0823 35.413 30.8175 30.7212 30.85 24.9351V14.8603C30.7059 9.0928 25.9165 4.50022 20.056 4.50022Z" fill="currentColor"/>
110
- </svg>
111
- `,jQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
107
+ </svg>`,jQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
112
108
  <path d="M35.6638 9.91965C35.3251 9.75432 35.1785 10.0703 34.9811 10.2316C34.9131 10.2836 34.8558 10.3516 34.7985 10.413C34.3025 10.9423 33.7238 11.289 32.9678 11.2476C31.8625 11.1863 30.9186 11.533 30.0839 12.3783C29.9066 11.3356 29.3173 10.7143 28.4213 10.3143C27.9519 10.1063 27.4773 9.89965 27.148 9.44766C26.9186 9.12633 26.856 8.76767 26.7413 8.41568C26.668 8.20235 26.5946 7.98502 26.3506 7.94902C26.084 7.90769 25.98 8.13035 25.876 8.31702C25.4587 9.07967 25.2973 9.91965 25.3133 10.7703C25.3493 12.6849 26.1573 14.2102 27.764 15.2942C27.9466 15.4182 27.9933 15.5435 27.9359 15.7249C27.8266 16.0982 27.696 16.4609 27.5813 16.8355C27.508 17.0742 27.3986 17.1248 27.1426 17.0222C26.2777 16.6504 25.4919 16.1164 24.828 15.4489C23.6854 14.3449 22.6534 13.1263 21.3654 12.1716C21.067 11.9511 20.7606 11.7416 20.4468 11.5436C19.1335 10.2676 20.6201 9.21967 20.9641 9.09567C21.3241 8.965 21.0881 8.51968 19.9254 8.52501C18.7628 8.53035 17.6988 8.91834 16.3428 9.43699C16.1413 9.51421 15.934 9.57529 15.7229 9.61966C14.4557 9.38091 13.1598 9.33506 11.8789 9.48366C9.36565 9.76365 7.35902 10.953 5.88305 12.9809C4.10975 15.4182 3.69243 18.1888 4.20308 21.0768C4.74041 24.122 6.29504 26.6433 8.683 28.6139C11.1603 30.6579 14.0122 31.6592 17.2668 31.4672C19.2428 31.3539 21.4441 31.0886 23.9254 28.9873C24.552 29.2993 25.208 29.4233 26.2986 29.5166C27.1386 29.5953 27.9466 29.4766 28.5719 29.3459C29.5519 29.1379 29.4839 28.23 29.1306 28.0646C26.2573 26.726 26.888 27.2713 26.3133 26.83C27.7746 25.102 29.9746 23.3074 30.8359 17.4928C30.9026 17.0302 30.8452 16.7395 30.8359 16.3662C30.8306 16.1395 30.8826 16.0502 31.1426 16.0249C31.8639 15.95 32.5637 15.7349 33.2025 15.3915C35.0638 14.3742 35.8158 12.7049 35.9931 10.7023C36.0198 10.3956 35.9878 10.081 35.6638 9.91965ZM19.4414 27.9433C16.6562 25.754 15.3055 25.0327 14.7482 25.0634C14.2256 25.0954 14.3202 25.6913 14.4349 26.0807C14.5549 26.4647 14.7109 26.7286 14.9295 27.066C15.0815 27.2886 15.1855 27.6206 14.7789 27.87C13.8816 28.4246 12.3229 27.6833 12.2496 27.6473C10.435 26.578 8.91632 25.1673 7.84834 23.2381C6.81637 21.3808 6.21638 19.3888 6.11771 17.2622C6.09105 16.7475 6.24171 16.5662 6.7537 16.4729C7.42583 16.3442 8.11451 16.3267 8.79233 16.4209C11.6349 16.8368 14.0536 18.1075 16.0828 20.1194C17.2402 21.2661 18.1161 22.6354 19.0188 23.974C19.9788 25.3953 21.0108 26.75 22.3254 27.8593C22.7894 28.2486 23.1587 28.5446 23.5134 28.7619C22.4441 28.8819 20.6601 28.9086 19.4414 27.9433ZM20.7748 19.3568C20.7745 19.2906 20.7904 19.2253 20.8211 19.1666C20.8517 19.1078 20.8962 19.0575 20.9507 19.0198C21.0052 18.9821 21.068 18.9583 21.1337 18.9503C21.1995 18.9424 21.2662 18.9505 21.3281 18.9741C21.407 19.0024 21.475 19.0546 21.5228 19.1235C21.5706 19.1923 21.5958 19.2743 21.5947 19.3581C21.5949 19.4123 21.5843 19.4659 21.5636 19.5159C21.5428 19.5659 21.5123 19.6113 21.4738 19.6494C21.4354 19.6875 21.3897 19.7176 21.3395 19.7378C21.2893 19.7581 21.2356 19.7682 21.1814 19.7675C21.1277 19.7676 21.0745 19.7571 21.0248 19.7365C20.9752 19.7158 20.9302 19.6855 20.8925 19.6473C20.8548 19.609 20.825 19.5636 20.805 19.5138C20.785 19.4639 20.7739 19.4105 20.7748 19.3568ZM24.9213 21.4848C24.6547 21.5928 24.3893 21.6861 24.1347 21.6981C23.7516 21.7114 23.3756 21.5918 23.0707 21.3594C22.7054 21.0528 22.4441 20.8821 22.3347 20.3488C22.297 20.0881 22.3042 19.823 22.3561 19.5648C22.4494 19.1288 22.3454 18.8488 22.0374 18.5955C21.7881 18.3875 21.4694 18.3302 21.1201 18.3302C21.0005 18.3232 20.8843 18.2875 20.7814 18.2262C20.6348 18.1542 20.5148 17.9728 20.6294 17.7488C20.6668 17.6768 20.8428 17.5008 20.8854 17.4688C21.3601 17.1995 21.9081 17.2875 22.4134 17.4902C22.8827 17.6822 23.2374 18.0342 23.748 18.5328C24.2694 19.1341 24.364 19.3008 24.6613 19.7515C24.896 20.1048 25.1093 20.4674 25.2547 20.8821C25.344 21.1421 25.2293 21.3541 24.9213 21.4848Z" fill="currentColor"/>
113
- </svg>
114
- `,PQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
109
+ </svg>`,PQ=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
115
110
  <path d="M12.4579 15.6036L26.1529 35H20.0656L6.37059 15.6036H12.4579ZM12.4524 26.3764L15.4974 30.6909L12.4551 35H6.36377L12.4524 26.3764ZM33.6365 7.15727V35H28.647V14.2236L33.6365 7.15727ZM33.6365 5L20.0656 24.2205L17.0206 19.9073L27.5451 5H33.6365Z" fill="currentColor"/>
116
- </svg>
117
- `,fN=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
111
+ </svg>`,fN=`<svg width="24" height="24" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
118
112
  <path d="M20.1312 7.50002L17.4088 11.1913H5.81625L8.5375 7.50002H20.1325H20.1312ZM34.0675 28.81L31.3475 32.5H19.795L22.5125 28.81H34.0675ZM35 7.50002L16.58 32.5H5L23.42 7.50002H35Z" fill="currentColor"/>
119
- </svg>
120
- `,UQ=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
113
+ </svg>`,UQ=`<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
121
114
  <path
122
115
  shape-rendering="geometricPrecision"
123
116
  d="M9.8132 15.9038L9 18.75L8.1868 15.9038C7.75968 14.4089 6.59112 13.2403 5.09619 12.8132L2.25 12L5.09619 11.1868C6.59113 10.7597 7.75968 9.59112 8.1868 8.09619L9 5.25L9.8132 8.09619C10.2403 9.59113 11.4089 10.7597 12.9038 11.1868L15.75 12L12.9038 12.8132C11.4089 13.2403 10.2403 14.4089 9.8132 15.9038Z"
@@ -140,12 +133,10 @@ ${y.url}`).join(`
140
133
  stroke-linecap="round"
141
134
  stroke-linejoin="round"
142
135
  />
143
- </svg>
144
- `,HQ=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
136
+ </svg>`,HQ=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
145
137
  <path opacity="0.2" d="M19.2002 17.4H8.40017V13.8H15.6002V10.2H19.2002V17.4ZM8.40017 13.8H4.80017V10.2H8.40017V13.8Z" fill="currentColor"/>
146
138
  <path d="M8.40005 17.4H19.2001V21H4.80005V13.8H8.40005V17.4ZM15.6001 10.2V13.8H8.40005V10.2H15.6001ZM19.2001 10.2H15.6001V6.6H4.80005V3H19.2001V10.2Z" fill="currentColor"/>
147
- </svg>
148
- `,zQ={anthropic:IQ,openai:DQ,google:MQ,openrouter:BQ,groq:FQ,deepseek:jQ,xai:PQ,zai:fN,"zai-coding":fN,solforge:UQ,opencode:HQ},qQ=q.memo(function({provider:t,className:n="",size:i=16}){const s=zQ[t.toLowerCase()];return s?v.jsx("span",{className:`inline-flex items-center justify-center text-foreground/70 dark:text-foreground/80 ${n}`,style:{width:i,height:i},title:t,dangerouslySetInnerHTML:{__html:s.replace(/<svg/,`<svg width="${i}" height="${i}" style="width:${i}px;height:${i}px"`)}}):v.jsx("span",{className:`inline-flex items-center justify-center text-[10px] font-medium text-muted-foreground uppercase ${n}`,style:{width:i,height:i},title:t,children:t.slice(0,2)})}),pN=["Generating...","Cooking up something...","Thinking...","Processing...","Working on it...","Crafting response...","Brewing magic...","Computing..."];function $Q(e){const t=e.split("").reduce((n,i)=>n+i.charCodeAt(0),0);return pN[t%pN.length]}const GI=q.memo(function({sessionId:t,message:n,showHeader:i,hasNextAssistantMessage:s,onBranchCreated:l,compact:c,onNavigateToSession:o}){const{isQueued:d}=qI(t,n.id),[h,p]=q.useState(!1),[f,b]=q.useState(!1),[g,x]=q.useState(!1),w=n.parts||[],y=w.some(I=>I.toolName==="finish"),E=w.reduce((I,H,F)=>H.type==="tool_result"&&H.toolName==="progress_update"?F:I,-1),_=E>=0?w[E]:null,S=w.some(I=>!(I.type==="tool_result"&&I.toolName==="progress_update")),k=w.findIndex(I=>!(I.type==="tool_result"&&I.toolName==="progress_update")),N=n.status==="pending"&&!y&&!!_,T=n.status==="pending"&&!y&&!_&&!d,O=I=>I?new Date(I).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",R=n.status==="complete",L=q.useCallback(()=>{const I=w.filter(H=>H.type==="text").map(H=>{try{return JSON.parse(H.content||"{}")?.text||""}catch{return H.content||""}}).join(`
139
+ </svg>`,zQ={anthropic:IQ,openai:DQ,google:MQ,openrouter:BQ,groq:FQ,deepseek:jQ,xai:PQ,zai:fN,"zai-coding":fN,solforge:UQ,opencode:HQ},qQ=q.memo(function({provider:t,className:n="",size:i=16}){const s=zQ[t.toLowerCase()];return s?v.jsx("span",{className:`inline-flex items-center justify-center text-foreground/70 dark:text-foreground/80 ${n}`,style:{width:i,height:i},title:t,dangerouslySetInnerHTML:{__html:s.replace(/<svg/,`<svg width="${i}" height="${i}" style="width:${i}px;height:${i}px"`)}}):v.jsx("span",{className:`inline-flex items-center justify-center text-[10px] font-medium text-muted-foreground uppercase ${n}`,style:{width:i,height:i},title:t,children:t.slice(0,2)})}),pN=["Generating...","Cooking up something...","Thinking...","Processing...","Working on it...","Crafting response...","Brewing magic...","Computing..."];function $Q(e){const t=e.split("").reduce((n,i)=>n+i.charCodeAt(0),0);return pN[t%pN.length]}const GI=q.memo(function({sessionId:t,message:n,showHeader:i,hasNextAssistantMessage:s,onBranchCreated:l,compact:c,onNavigateToSession:o}){const{isQueued:d}=qI(t,n.id),[h,p]=q.useState(!1),[f,b]=q.useState(!1),[g,x]=q.useState(!1),w=n.parts||[],y=w.some(I=>I.toolName==="finish"),E=w.reduce((I,H,F)=>H.type==="tool_result"&&H.toolName==="progress_update"?F:I,-1),_=E>=0?w[E]:null,S=w.some(I=>!(I.type==="tool_result"&&I.toolName==="progress_update")),k=w.findIndex(I=>!(I.type==="tool_result"&&I.toolName==="progress_update")),N=n.status==="pending"&&!y&&!!_,T=n.status==="pending"&&!y&&!_&&!d,O=I=>I?new Date(I).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",R=n.status==="complete",L=q.useCallback(()=>{const I=w.filter(H=>H.type==="text").map(H=>{try{return JSON.parse(H.content||"{}")?.text||""}catch{return H.content||""}}).join(`
149
140
  `);navigator.clipboard.writeText(I),x(!0),setTimeout(()=>x(!1),2e3)},[w]),D=q.useCallback(()=>{b(!0)},[]);return d?null:v.jsxs("div",{className:"relative group",onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[i&&v.jsxs("div",{className:"pb-2 flex items-center justify-between",children:[v.jsxs("div",{className:"inline-flex items-center bg-violet-500/10 border border-violet-500/30 dark:bg-violet-500/5 dark:border-violet-500/20 rounded-full pr-3 md:pr-4 flex-shrink min-w-0",children:[v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-violet-500/50 bg-violet-500/20 dark:bg-violet-500/10",children:v.jsx(jo,{className:"h-3.5 w-3.5 text-violet-700 dark:text-violet-300"})}),v.jsxs("div",{className:"flex items-center gap-x-1.5 md:gap-x-2 text-xs md:text-sm text-muted-foreground pl-2 md:pl-3 min-w-0",children:[n.agent&&!c&&v.jsx("span",{className:"font-medium text-violet-700 dark:text-violet-300 whitespace-nowrap",children:n.agent}),n.provider&&v.jsxs(v.Fragment,{children:[!c&&n.agent&&v.jsx("span",{className:"text-muted-foreground/50",children:"·"}),v.jsx(qQ,{provider:n.provider,size:14,className:"opacity-70"})]}),n.model&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"hidden md:inline text-muted-foreground/50",children:"·"}),v.jsx("span",{className:`hidden md:inline text-muted-foreground ${c?"truncate max-w-[120px]":""}`,title:n.model,children:n.model})]}),n.createdAt&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground/50",children:"·"}),v.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:O(n.createdAt)})]})]})]}),h&&R&&t&&v.jsx("button",{type:"button",onClick:D,className:"ml-4 p-1.5 text-muted-foreground hover:text-primary transition-colors flex-shrink-0",title:"Branch from this message",children:v.jsx(Bn,{className:"h-4 w-4"})})]}),v.jsxs("div",{className:"relative ml-1",children:[w.map((I,H)=>{const F=H===w.length-1,W=I.type==="tool_result"&&I.toolName==="finish",K=(!F||s)&&!W,V=I.type==="tool_call"&&F;return I.type==="tool_result"&&I.toolName==="progress_update"?null:v.jsx(dN,{part:I,showLine:K,isFirstPart:H===k&&!i,isLastToolCall:V,onNavigateToSession:o,compact:c},I.id)}),N&&_&&v.jsx(dN,{part:_,showLine:s,isFirstPart:!S&&!i,isLastProgressUpdate:!0,compact:c},_.id),T&&v.jsxs("div",{className:"flex gap-3 pb-2 relative",children:[v.jsx("div",{className:"flex-shrink-0 w-6 flex items-start justify-center relative pt-0.5",children:v.jsx("div",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full relative bg-card text-violet-700 dark:bg-background dark:text-violet-300",children:v.jsx(jo,{className:"h-4 w-4"})})}),v.jsx("div",{className:"flex-1 pt-0.5",children:v.jsx("div",{className:"text-base text-foreground animate-pulse",children:$Q(n.id)})})]})]}),h&&R&&t&&v.jsxs("div",{className:"flex gap-2 mt-2 ml-7",children:[v.jsxs("button",{type:"button",onClick:D,className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 rounded transition-colors",children:[v.jsx(Bn,{className:"h-3 w-3"}),"Branch"]}),v.jsx("button",{type:"button",onClick:L,className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 rounded transition-colors",children:g?v.jsxs(v.Fragment,{children:[v.jsx(ua,{className:"h-3 w-3 text-green-500"}),"Copied"]}):v.jsxs(v.Fragment,{children:[v.jsx(uO,{className:"h-3 w-3"}),"Copy"]})})]}),f&&t&&v.jsx(LQ,{isOpen:f,onClose:()=>b(!1),sessionId:t,message:n,onBranchCreated:l})]})},(e,t)=>{const n=e.message.parts||[],i=t.message.parts||[];if(n.length!==i.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],c=i[s];if(l.id!==c.id||l.content!==c.content||l.contentJson!==c.contentJson||l.ephemeral!==c.ephemeral||l.completedAt!==c.completedAt)return!1}return e.message.id===t.message.id&&e.message.status===t.message.status&&e.message.completedAt===t.message.completedAt&&e.showHeader===t.showHeader&&e.hasNextAssistantMessage===t.hasNextAssistantMessage&&e.isLastMessage===t.isLastMessage&&e.sessionId===t.sessionId&&e.compact===t.compact&&e.onNavigateToSession===t.onNavigateToSession}),VI=q.memo(function({sessionId:t,message:n,nextAssistantMessageId:i}){const[s,l]=q.useState(null),c=n.parts||[],o=Ut(),{isQueued:d,position:h}=qI(t,i??""),p=Zv(I=>I.setPendingRestoreText),f=c.filter(I=>I.type==="text"),b=c.filter(I=>I.type==="image"),g=c.filter(I=>I.type==="file"),x=f[0];let w="";if(x){const I=x.contentJson||x.content;I&&typeof I=="object"&&"text"in I?w=String(I.text):typeof I=="string"?w=I:I&&(w=JSON.stringify(I,null,2))}const{researchContexts:y,cleanContent:E}=PU(w),_=[];for(const I of b)try{const H=I.contentJson||JSON.parse(I.content||"{}");if(H&&typeof H=="object"&&"data"in H){const F=H,W=`data:${F.mediaType};base64,${F.data}`;_.push({id:I.id,src:W})}}catch{}const S=[];for(const I of g)try{const H=I.contentJson||JSON.parse(I.content||"{}");if(H&&typeof H=="object"&&"type"in H){const F=H;if(F.type==="image"&&F.data){const W=`data:${F.mediaType};base64,${F.data}`;_.push({id:I.id,src:W})}else S.push({id:I.id,type:F.type,name:F.name})}}catch{}const k=I=>I?new Date(I).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",N=E.trim().length>0,T=_.length>0,O=S.length>0,R=y.length>0;if(!N&&!T&&!O&&!R)return null;const L=async()=>{if(!(!t||!i)){p(E);try{await pt.removeFromQueue(t,i),o.invalidateQueries({queryKey:["messages",t]})}catch(I){console.error("Failed to cancel queued message:",I)}}},D=async()=>{if(!(!t||!i))try{await pt.removeFromQueue(t,i),o.invalidateQueries({queryKey:["messages",t]})}catch(I){console.error("Failed to delete queued message:",I)}};return v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"relative pb-8 pt-6",children:v.jsxs("div",{className:"flex gap-3 md:gap-4 justify-end",children:[v.jsxs("div",{className:"flex flex-col items-end min-w-0 flex-1 max-w-[calc(100%-3rem)] md:max-w-2xl",children:[v.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground pb-2 justify-end",children:[v.jsx("span",{className:"font-medium text-emerald-700 dark:text-emerald-300",children:"You"}),n.createdAt&&v.jsx("span",{children:"·"}),n.createdAt&&v.jsx("span",{children:k(n.createdAt)}),d&&v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"·"}),v.jsxs("span",{className:"inline-flex items-center gap-1 text-amber-600 dark:text-amber-400",children:[v.jsx(cO,{className:"h-3 w-3"}),"Queued",h!==null&&h>0?` #${h+1}`:""]})]})]}),v.jsxs("div",{className:"inline-block max-w-full text-sm text-foreground leading-relaxed bg-emerald-500/5 border border-emerald-500/20 rounded-xl px-4 py-3 [word-break:break-word] overflow-hidden",children:[T&&v.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:_.map(I=>v.jsx("button",{type:"button",onClick:()=>l(I.src),className:"w-16 h-16 rounded-lg overflow-hidden bg-muted hover:ring-2 hover:ring-primary/50 transition-all",children:v.jsx("img",{src:I.src,alt:"Attachment",className:"w-full h-full object-cover"})},I.id))}),O&&v.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:S.map(I=>v.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-muted/50 border border-border",children:[I.type==="pdf"?v.jsx(Ai,{className:"w-4 h-4 text-red-500 flex-shrink-0"}):v.jsx(gu,{className:"w-4 h-4 text-blue-500 flex-shrink-0"}),v.jsx("span",{className:"text-xs truncate max-w-[150px]",children:I.name})]},I.id))}),R&&v.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:y.map(I=>v.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-teal-500/10 border border-teal-500/30",children:[v.jsx(Bo,{className:"w-4 h-4 text-teal-500 flex-shrink-0"}),v.jsx("span",{className:"text-xs text-teal-600 dark:text-teal-400",children:I.label})]},I.id))}),N&&v.jsx("div",{className:"prose prose-invert prose-sm [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_*]:[word-break:break-word] [&_*]:overflow-wrap-anywhere",children:v.jsx(JL,{remarkPlugins:[xI],children:E})})]}),d&&v.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[v.jsxs("button",{type:"button",onClick:L,className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-md bg-muted hover:bg-muted/80 text-muted-foreground hover:text-foreground transition-colors",title:"Cancel and restore to input",children:[v.jsx(_O,{className:"h-3 w-3"}),"Cancel"]}),v.jsxs("button",{type:"button",onClick:D,className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-md bg-destructive/10 hover:bg-destructive/20 text-destructive transition-colors",title:"Delete from queue",children:[v.jsx(SO,{className:"h-3 w-3"}),"Delete"]})]})]}),v.jsx("div",{className:"flex-shrink-0 w-8 flex items-start justify-center",children:v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-emerald-500/50 bg-emerald-500/20 dark:bg-emerald-500/10 relative bg-background",children:v.jsx(EO,{className:"h-4 w-4 text-emerald-700 dark:text-emerald-300"})})})]})}),s&&v.jsxs("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:()=>l(null),onKeyDown:I=>I.key==="Escape"&&l(null),tabIndex:-1,children:[v.jsx("button",{type:"button",onClick:()=>l(null),className:"absolute top-4 right-4 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors",children:v.jsx(er,{className:"w-6 h-6 text-white"})}),v.jsx("img",{src:s,alt:"Expanded attachment",className:"max-w-full max-h-full object-contain rounded-lg",onClick:I=>I.stopPropagation(),onKeyDown:I=>I.key==="Enter"&&I.stopPropagation()})]})]})},(e,t)=>{const n=e.message.parts?.[0],i=t.message.parts?.[0];return e.message.id===t.message.id&&n?.content===i?.content&&n?.contentJson===i?.contentJson&&e.message.createdAt===t.message.createdAt&&e.message.parts?.length===t.message.parts?.length&&e.sessionId===t.sessionId&&e.nextAssistantMessageId===t.nextAssistantMessageId});function GQ({session:e,onNavigateToSession:t}){const{data:n}=$I(e.sessionType==="branch"?e.id:void 0),i=q.useMemo(()=>{const h=e.totalInputTokens||0,p=e.totalOutputTokens||0;return h+p},[e.totalInputTokens,e.totalOutputTokens]),s=q.useMemo(()=>{const h=e.totalInputTokens||0,p=e.totalOutputTokens||0,f=30,b=60,g=h/1e6*f,x=p/1e6*b;return g+x},[e.totalInputTokens,e.totalOutputTokens]),l=h=>{if(!h)return"0s";const p=Math.floor(h/1e3),f=Math.floor(p/60),b=Math.floor(f/60);if(b>0){const g=f%60;return`${b}h ${g}m`}if(f>0){const g=p%60;return`${f}m ${g}s`}return`${p}s`},c=h=>h.toLocaleString("en-US"),o=e.sessionType==="branch",d=n?.parent;return v.jsx("div",{className:"border-b border-border bg-background/95 backdrop-blur-sm",children:v.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6",children:[o&&v.jsxs("div",{className:"flex items-center gap-2 mb-2 text-sm",children:[v.jsx(Bn,{className:"h-4 w-4 text-violet-500"}),v.jsx("span",{className:"text-violet-600 dark:text-violet-400",children:"Branch"}),d&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground",children:"from"}),v.jsxs("button",{type:"button",onClick:()=>t?.(d.id),className:"text-primary hover:underline flex items-center gap-1",children:[d.title||`Session ${d.id.slice(0,8)}`,v.jsx(aO,{className:"h-3 w-3"})]})]}),!d&&e.parentSessionId&&v.jsx("span",{className:"text-muted-foreground italic",children:"(parent deleted)"})]}),v.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-4",children:e.title||"Untitled Session"}),v.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx(mO,{className:"w-4 h-4"}),v.jsxs("div",{className:"flex flex-col",children:[v.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Total Tokens"}),v.jsx("span",{className:"text-foreground font-medium",children:c(i)}),(e.totalInputTokens||e.totalOutputTokens)&&v.jsxs("span",{className:"text-xs opacity-60",children:[c(e.totalInputTokens||0)," in /"," ",c(e.totalOutputTokens||0)," out"]})]})]}),v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx(cO,{className:"w-4 h-4"}),v.jsxs("div",{className:"flex flex-col",children:[v.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Tool Time"}),v.jsx("span",{className:"text-foreground font-medium",children:l(e.totalToolTimeMs)})]})]}),s>0&&v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx(dO,{className:"w-4 h-4"}),v.jsxs("div",{className:"flex flex-col",children:[v.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Est. Cost"}),v.jsxs("span",{className:"text-foreground font-medium",children:["$",s.toFixed(4)]})]})]}),v.jsx("div",{className:"flex items-center gap-2 text-muted-foreground ml-auto",children:v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Model"}),v.jsx("span",{className:"text-foreground font-medium",children:e.model}),v.jsxs("span",{className:"text-xs opacity-60",children:[e.provider," · ",e.agent]})]})})]})]})})}function VQ({session:e,isVisible:t,isGenerating:n,onNavigateToSession:i}){const{data:s}=$I(e.sessionType==="branch"?e.id:void 0),l=q.useMemo(()=>{const h=e.totalInputTokens||0,p=e.totalOutputTokens||0,f=30,b=60,g=h/1e6*f,x=p/1e6*b;return g+x},[e.totalInputTokens,e.totalOutputTokens]),c=h=>h.toLocaleString("en-US"),o=e.sessionType==="branch",d=s?.parent;return v.jsx("div",{className:`absolute top-0 left-0 right-0 h-14 border-b border-border bg-background/95 backdrop-blur-sm z-10 transition-transform duration-200 ${t?"translate-y-0":"-translate-y-full"}`,children:v.jsxs("div",{className:"h-full px-6 flex items-center justify-between gap-6 text-sm",children:[v.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2 text-muted-foreground",children:[o?v.jsx(Bn,{className:"w-4 h-4 flex-shrink-0 text-violet-500"}):v.jsx(yO,{className:"w-4 h-4 flex-shrink-0"}),v.jsx("span",{className:"text-foreground font-medium truncate",children:e.title||"Untitled Session"}),o&&d&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"text-muted-foreground hidden sm:inline",children:"from"}),v.jsxs("button",{type:"button",onClick:()=>i?.(d.id),className:"text-primary hover:underline flex items-center gap-0.5 truncate max-w-32",title:d.title||`Session ${d.id.slice(0,8)}`,children:[v.jsx("span",{className:"truncate",children:d.title||`Session ${d.id.slice(0,8)}`}),v.jsx(aO,{className:"h-3 w-3 flex-shrink-0"})]})]})]}),v.jsxs("div",{className:"flex-shrink-0 flex items-center gap-6",children:[n&&v.jsx($U,{sessionId:e.id}),v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx(mO,{className:"w-4 h-4"}),v.jsxs("span",{className:"text-foreground font-medium",children:[c(e.totalInputTokens||0)," /"," ",c(e.totalOutputTokens||0)]})]}),l>0&&v.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[v.jsx(dO,{className:"w-4 h-4"}),v.jsxs("span",{className:"text-foreground font-medium",children:["$",l.toFixed(4)]})]})]})]})})}const WQ=q.memo(function({messages:t,session:n,sessionId:i,isGenerating:s,onSelectSession:l}){const c=q.useRef(null),o=q.useRef(null),d=q.useRef(null),[h,p]=q.useState(!0),f=q.useRef(!0),[b,g]=q.useState(!1),x=q.useRef(!1),w=q.useRef(void 0),y=q.useRef(0),E=q.useRef(void 0),_=q.useRef(!1),S=q.useRef(n?.id),k=q.useRef(t.length),N=q.useRef(s),T=q.useRef(0),O=q.useRef(0),R=q.useCallback(()=>{const I=o.current;if(!I)return;const{scrollTop:H,scrollHeight:F,clientHeight:W}=I,K=F-H-W,V=F>T.current,X=H<O.current-5;T.current=F,O.current=H,K<100?(f.current=!0,p(!0)):X?(f.current=!1,p(!1),x.current=!0):!V&&f.current&&(f.current=!1,p(!1)),(X||!f.current&&K>=100)&&(w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{x.current=!1},150));const Z=d.current;if(Z){const P=Z.getBoundingClientRect(),M=I.getBoundingClientRect();g(P.bottom<M.top)}},[]);q.useEffect(()=>{const I=n?.id!==S.current;if(S.current=n?.id,I&&(_.current=!1),!_.current&&t.length>0){_.current=!0;const H=o.current;H&&(H.scrollTop=H.scrollHeight)}},[t.length,n?.id]),q.useEffect(()=>{const I=s&&!N.current,H=t.length>k.current;N.current=s,k.current=t.length,I?(x.current=!1,f.current=!0,p(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{const F=o.current;F&&(F.scrollTop=F.scrollHeight)})})):H&&!x.current&&!s&&(f.current=!0,p(!0))},[t.length,s]),q.useEffect(()=>{const I=o.current;if(!I||!h||x.current)return;y.current=I.scrollHeight-I.clientHeight;const H=()=>{const F=o.current;if(!F||x.current)return;const W=F.scrollTop,V=F.scrollHeight-F.clientHeight-W;if(Math.abs(V)<1){F.scrollTop=F.scrollHeight-F.clientHeight;return}if(Math.abs(V)<10){F.scrollTop=F.scrollHeight-F.clientHeight;return}F.scrollTop=W+V*.15,E.current=requestAnimationFrame(H)};E.current&&cancelAnimationFrame(E.current),E.current=requestAnimationFrame(H)},[t,h]),q.useEffect(()=>()=>{w.current&&clearTimeout(w.current),E.current&&cancelAnimationFrame(E.current)},[]);const L=()=>{x.current=!1,f.current=!0,p(!0);const I=o.current;I&&(I.scrollTop=I.scrollHeight)},D=q.useMemo(()=>t.filter(I=>I.role!=="system"),[t]);return t.length===0?v.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground text-sm",children:"No messages yet. Start a conversation below."}):v.jsxs("div",{className:"absolute inset-0 flex flex-col",children:[n&&v.jsx(VQ,{session:n,isVisible:b,isGenerating:s,onNavigateToSession:l}),v.jsxs("div",{ref:o,className:"flex-1 overflow-y-auto",onScroll:R,children:[v.jsx("div",{ref:d,children:n&&v.jsx(GQ,{session:n,onNavigateToSession:l})}),v.jsx("div",{className:"p-6 pb-64",children:v.jsxs("div",{className:"max-w-3xl mx-auto space-y-6",children:[D.map((I,H)=>{const F=D[H-1],W=D[H+1],K=H===D.length-1;if(I.role==="user"){const V=W&&W.role==="assistant"?W:void 0;return v.jsx(VI,{sessionId:i,message:I,isFirst:H===0,nextAssistantMessageId:V?.id},I.id)}if(I.role==="assistant"){const V=!F||F.role!=="assistant",X=W&&W.role==="assistant";return v.jsx(GI,{sessionId:i,message:I,showHeader:V,hasNextAssistantMessage:X,isLastMessage:K,onBranchCreated:l},I.id)}return null}),v.jsx("div",{ref:c})]})})]}),!h&&v.jsxs("button",{type:"button",onClick:L,className:"absolute bottom-36 left-1/2 -translate-x-1/2 flex items-center gap-2 px-4 py-2 bg-background border border-border rounded-full shadow-lg hover:bg-muted/50 transition-all text-sm text-foreground z-10",children:[v.jsx(u6,{className:"w-4 h-4"}),v.jsx("span",{children:"Scroll to bottom"})]})]})});class WI{abortController=null;handlers=new Map;running=!1;async connect(t){this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.running=!0;try{const n=await fetch(t,{headers:{Accept:"text/event-stream"},signal:this.abortController.signal});if(!n.ok){console.error("[SSE] Connection failed:",n.status);return}const i=n.body?.getReader();if(!i){console.error("[SSE] No response body");return}const s=new TextDecoder;let l="";for(;this.running;){const{done:c,value:o}=await i.read();if(c)break;l+=s.decode(o,{stream:!0});let d=l.indexOf(`
150
141
 
151
142
  `);for(;d!==-1;){const h=l.slice(0,d);l=l.slice(d+2);const p=h.split(`