cntx-ui 3.1.0 → 3.1.2

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.
@@ -46,7 +46,7 @@ var HN=Object.defineProperty;var $x=n=>{throw TypeError(n)};var WN=(n,e,t)=>e in
46
46
  `+X[h].replace(" at new "," at ");return i.displayName&&Re.includes("<anonymous>")&&(Re=Re.replace("<anonymous>",i.displayName)),Re}while(1<=h&&0<=m);break}}}finally{Ft=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?St(u):""}function An(i){switch(i.tag){case 26:case 27:case 5:return St(i.type);case 16:return St("Lazy");case 13:return St("Suspense");case 19:return St("SuspenseList");case 0:case 15:return $t(i.type,!1);case 11:return $t(i.type.render,!1);case 1:return $t(i.type,!0);case 31:return St("Activity");default:return""}}function gs(i){try{var a="";do a+=An(i),i=i.return;while(i);return a}catch(u){return`
47
47
  Error generating stack: `+u.message+`
48
48
  `+u.stack}}function Mt(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ts(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function nr(i){var a=Ts(i)?"checked":"value",u=Object.getOwnPropertyDescriptor(i.constructor.prototype,a),h=""+i[a];if(!i.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,w=u.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return m.call(this)},set:function(C){h=""+C,w.call(this,C)}}),Object.defineProperty(i,a,{enumerable:u.enumerable}),{getValue:function(){return h},setValue:function(C){h=""+C},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function gt(i){i._valueTracker||(i._valueTracker=nr(i))}function bn(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var u=a.getValue(),h="";return i&&(h=Ts(i)?i.checked?"true":"false":i.value),i=h,i!==u?(a.setValue(i),!0):!1}function Un(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var is=/[\n"\\]/g;function Nt(i){return i.replace(is,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function cc(i,a,u,h,m,w,C,B){i.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?i.type=C:i.removeAttribute("type"),a!=null?C==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+Mt(a)):i.value!==""+Mt(a)&&(i.value=""+Mt(a)):C!=="submit"&&C!=="reset"||i.removeAttribute("value"),a!=null?uc(i,C,Mt(a)):u!=null?uc(i,C,Mt(u)):h!=null&&i.removeAttribute("value"),m==null&&w!=null&&(i.defaultChecked=!!w),m!=null&&(i.checked=m&&typeof m!="function"&&typeof m!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?i.name=""+Mt(B):i.removeAttribute("name")}function of(i,a,u,h,m,w,C,B){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),a!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||a!=null))return;u=u!=null?""+Mt(u):"",a=a!=null?""+Mt(a):u,B||a===i.value||(i.value=a),i.defaultValue=a}h=h??m,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=B?i.checked:!!h,i.defaultChecked=!!h,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(i.name=C)}function uc(i,a,u){a==="number"&&Un(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function mi(i,a,u,h){if(i=i.options,a){a={};for(var m=0;m<u.length;m++)a["$"+u[m]]=!0;for(u=0;u<i.length;u++)m=a.hasOwnProperty("$"+i[u].value),i[u].selected!==m&&(i[u].selected=m),m&&h&&(i[u].defaultSelected=!0)}else{for(u=""+Mt(u),a=null,m=0;m<i.length;m++){if(i[m].value===u){i[m].selected=!0,h&&(i[m].defaultSelected=!0);return}a!==null||i[m].disabled||(a=i[m])}a!==null&&(a.selected=!0)}}function af(i,a,u){if(a!=null&&(a=""+Mt(a),a!==i.value&&(i.value=a),u==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=u!=null?""+Mt(u):""}function lf(i,a,u,h){if(a==null){if(h!=null){if(u!=null)throw Error(s(92));if(je(h)){if(1<h.length)throw Error(s(93));h=h[0]}u=h}u==null&&(u=""),a=u}u=Mt(a),i.defaultValue=u,h=i.textContent,h===u&&h!==""&&h!==null&&(i.value=h)}function yi(i,a){if(a){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=a;return}}i.textContent=a}var Ep=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 cf(i,a,u){var h=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":h?i.setProperty(a,u):typeof u!="number"||u===0||Ep.has(a)?a==="float"?i.cssFloat=u:i[a]=(""+u).trim():i[a]=u+"px"}function _v(i,a,u){if(a!=null&&typeof a!="object")throw Error(s(62));if(i=i.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||a!=null&&a.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var m in a)h=a[m],a.hasOwnProperty(m)&&u[m]!==h&&cf(i,m,h)}else for(var w in a)a.hasOwnProperty(w)&&cf(i,w,a[w])}function Ap(i){if(i.indexOf("-")===-1)return!1;switch(i){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 VC=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"]]),$C=/^[\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 uf(i){return $C.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var Rp=null;function Cp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var xa=null,Ta=null;function bv(i){var a=ye(i);if(a&&(i=a.stateNode)){var u=i[S]||null;e:switch(i=a.stateNode,a.type){case"input":if(cc(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Nt(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var h=u[a];if(h!==i&&h.form===i.form){var m=h[S]||null;if(!m)throw Error(s(90));cc(h,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(a=0;a<u.length;a++)h=u[a],h.form===i.form&&bn(h)}break e;case"textarea":af(i,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&mi(i,!!u.multiple,a,!1)}}}var Mp=!1;function vv(i,a,u){if(Mp)return i(a,u);Mp=!0;try{var h=i(a);return h}finally{if(Mp=!1,(xa!==null||Ta!==null)&&(Kf(),xa&&(a=xa,i=Ta,Ta=xa=null,bv(a),i)))for(a=0;a<i.length;a++)bv(i[a])}}function fc(i,a){var u=i.stateNode;if(u===null)return null;var h=u[S]||null;if(h===null)return null;u=h[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":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(s(231,a,typeof u));return u}var Lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Np=!1;if(Lr)try{var hc={};Object.defineProperty(hc,"passive",{get:function(){Np=!0}}),window.addEventListener("test",hc,hc),window.removeEventListener("test",hc,hc)}catch{Np=!1}var _i=null,Op=null,ff=null;function wv(){if(ff)return ff;var i,a=Op,u=a.length,h,m="value"in _i?_i.value:_i.textContent,w=m.length;for(i=0;i<u&&a[i]===m[i];i++);var C=u-i;for(h=1;h<=C&&a[u-h]===m[w-h];h++);return ff=m.slice(i,1<h?1-h:void 0)}function hf(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function df(){return!0}function xv(){return!1}function ms(i){function a(u,h,m,w,C){this._reactName=u,this._targetInst=m,this.type=h,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var B in i)i.hasOwnProperty(B)&&(u=i[B],this[B]=u?u(w):w[B]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?df:xv,this.isPropagationStopped=xv,this}return g(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=df)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=df)},persist:function(){},isPersistent:df}),a}var So={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pf=ms(So),dc=g({},So,{view:0,detail:0}),HC=ms(dc),Ip,kp,pc,gf=g({},dc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==pc&&(pc&&i.type==="mousemove"?(Ip=i.screenX-pc.screenX,kp=i.screenY-pc.screenY):kp=Ip=0,pc=i),Ip)},movementY:function(i){return"movementY"in i?i.movementY:kp}}),Tv=ms(gf),WC=g({},gf,{dataTransfer:0}),XC=ms(WC),qC=g({},dc,{relatedTarget:0}),Pp=ms(qC),YC=g({},So,{animationName:0,elapsedTime:0,pseudoElement:0}),KC=ms(YC),ZC=g({},So,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),QC=ms(ZC),GC=g({},So,{data:0}),Sv=ms(GC),JC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eM={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"},tM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nM(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=tM[i])?!!a[i]:!1}function Dp(){return nM}var sM=g({},dc,{key:function(i){if(i.key){var a=JC[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=hf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?eM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dp,charCode:function(i){return i.type==="keypress"?hf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?hf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),rM=ms(sM),iM=g({},gf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ev=ms(iM),oM=g({},dc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dp}),aM=ms(oM),lM=g({},So,{propertyName:0,elapsedTime:0,pseudoElement:0}),cM=ms(lM),uM=g({},gf,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),fM=ms(uM),hM=g({},So,{newState:0,oldState:0}),dM=ms(hM),pM=[9,13,27,32],Bp=Lr&&"CompositionEvent"in window,gc=null;Lr&&"documentMode"in document&&(gc=document.documentMode);var gM=Lr&&"TextEvent"in window&&!gc,Av=Lr&&(!Bp||gc&&8<gc&&11>=gc),Rv=" ",Cv=!1;function Mv(i,a){switch(i){case"keyup":return pM.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nv(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Sa=!1;function mM(i,a){switch(i){case"compositionend":return Nv(a);case"keypress":return a.which!==32?null:(Cv=!0,Rv);case"textInput":return i=a.data,i===Rv&&Cv?null:i;default:return null}}function yM(i,a){if(Sa)return i==="compositionend"||!Bp&&Mv(i,a)?(i=wv(),ff=Op=_i=null,Sa=!1,i):null;switch(i){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 Av&&a.locale!=="ko"?null:a.data;default:return null}}var _M={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 Ov(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!_M[i.type]:a==="textarea"}function Iv(i,a,u,h){xa?Ta?Ta.push(h):Ta=[h]:xa=h,a=th(a,"onChange"),0<a.length&&(u=new pf("onChange","change",null,u,h),i.push({event:u,listeners:a}))}var mc=null,yc=null;function bM(i){hx(i,0)}function mf(i){var a=Ee(i);if(bn(a))return i}function kv(i,a){if(i==="change")return a}var Pv=!1;if(Lr){var Up;if(Lr){var Fp="oninput"in document;if(!Fp){var Dv=document.createElement("div");Dv.setAttribute("oninput","return;"),Fp=typeof Dv.oninput=="function"}Up=Fp}else Up=!1;Pv=Up&&(!document.documentMode||9<document.documentMode)}function Bv(){mc&&(mc.detachEvent("onpropertychange",Uv),yc=mc=null)}function Uv(i){if(i.propertyName==="value"&&mf(yc)){var a=[];Iv(a,yc,i,Cp(i)),vv(bM,a)}}function vM(i,a,u){i==="focusin"?(Bv(),mc=a,yc=u,mc.attachEvent("onpropertychange",Uv)):i==="focusout"&&Bv()}function wM(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return mf(yc)}function xM(i,a){if(i==="click")return mf(a)}function TM(i,a){if(i==="input"||i==="change")return mf(a)}function SM(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var Ss=typeof Object.is=="function"?Object.is:SM;function _c(i,a){if(Ss(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var u=Object.keys(i),h=Object.keys(a);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var m=u[h];if(!at.call(a,m)||!Ss(i[m],a[m]))return!1}return!0}function Fv(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function jv(i,a){var u=Fv(i);i=0;for(var h;u;){if(u.nodeType===3){if(h=i+u.textContent.length,i<=a&&h>=a)return{node:u,offset:a-i};i=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Fv(u)}}function Lv(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?Lv(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function zv(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=Un(i.document);a instanceof i.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)i=a.contentWindow;else break;a=Un(i.document)}return a}function jp(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var EM=Lr&&"documentMode"in document&&11>=document.documentMode,Ea=null,Lp=null,bc=null,zp=!1;function Vv(i,a,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;zp||Ea==null||Ea!==Un(h)||(h=Ea,"selectionStart"in h&&jp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),bc&&_c(bc,h)||(bc=h,h=th(Lp,"onSelect"),0<h.length&&(a=new pf("onSelect","select",null,a,u),i.push({event:a,listeners:h}),a.target=Ea)))}function Eo(i,a){var u={};return u[i.toLowerCase()]=a.toLowerCase(),u["Webkit"+i]="webkit"+a,u["Moz"+i]="moz"+a,u}var Aa={animationend:Eo("Animation","AnimationEnd"),animationiteration:Eo("Animation","AnimationIteration"),animationstart:Eo("Animation","AnimationStart"),transitionrun:Eo("Transition","TransitionRun"),transitionstart:Eo("Transition","TransitionStart"),transitioncancel:Eo("Transition","TransitionCancel"),transitionend:Eo("Transition","TransitionEnd")},Vp={},$v={};Lr&&($v=document.createElement("div").style,"AnimationEvent"in window||(delete Aa.animationend.animation,delete Aa.animationiteration.animation,delete Aa.animationstart.animation),"TransitionEvent"in window||delete Aa.transitionend.transition);function Ao(i){if(Vp[i])return Vp[i];if(!Aa[i])return i;var a=Aa[i],u;for(u in a)if(a.hasOwnProperty(u)&&u in $v)return Vp[i]=a[u];return i}var Hv=Ao("animationend"),Wv=Ao("animationiteration"),Xv=Ao("animationstart"),AM=Ao("transitionrun"),RM=Ao("transitionstart"),CM=Ao("transitioncancel"),qv=Ao("transitionend"),Yv=new Map,$p="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(" ");$p.push("scrollEnd");function sr(i,a){Yv.set(i,a),tt(a,[i])}var Kv=new WeakMap;function js(i,a){if(typeof i=="object"&&i!==null){var u=Kv.get(i);return u!==void 0?u:(a={value:i,source:a,stack:gs(a)},Kv.set(i,a),a)}return{value:i,source:a,stack:gs(a)}}var Ls=[],Ra=0,Hp=0;function yf(){for(var i=Ra,a=Hp=Ra=0;a<i;){var u=Ls[a];Ls[a++]=null;var h=Ls[a];Ls[a++]=null;var m=Ls[a];Ls[a++]=null;var w=Ls[a];if(Ls[a++]=null,h!==null&&m!==null){var C=h.pending;C===null?m.next=m:(m.next=C.next,C.next=m),h.pending=m}w!==0&&Zv(u,m,w)}}function _f(i,a,u,h){Ls[Ra++]=i,Ls[Ra++]=a,Ls[Ra++]=u,Ls[Ra++]=h,Hp|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Wp(i,a,u,h){return _f(i,a,u,h),bf(i)}function Ca(i,a){return _f(i,null,null,a),bf(i)}function Zv(i,a,u){i.lanes|=u;var h=i.alternate;h!==null&&(h.lanes|=u);for(var m=!1,w=i.return;w!==null;)w.childLanes|=u,h=w.alternate,h!==null&&(h.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(m=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,m&&a!==null&&(m=31-rs(u),i=w.hiddenUpdates,h=i[m],h===null?i[m]=[a]:h.push(a),a.lane=u|536870912),w):null}function bf(i){if(50<Hc)throw Hc=0,Qg=null,Error(s(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var Ma={};function MM(i,a,u,h){this.tag=i,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=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Es(i,a,u,h){return new MM(i,a,u,h)}function Xp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function zr(i,a){var u=i.alternate;return u===null?(u=Es(i.tag,a,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=a,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,a=i.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function Qv(i,a){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,a=u.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function vf(i,a,u,h,m,w){var C=0;if(h=i,typeof i=="function")Xp(i)&&(C=1);else if(typeof i=="string")C=ON(i,u,Ce.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case ge:return i=Es(31,u,a,m),i.elementType=ge,i.lanes=w,i;case M:return Ro(u.children,m,w,a);case A:C=8,m|=24;break;case R:return i=Es(12,u,a,m|2),i.elementType=R,i.lanes=w,i;case H:return i=Es(13,u,a,m),i.elementType=H,i.lanes=w,i;case W:return i=Es(19,u,a,m),i.elementType=W,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case k:case I:C=10;break e;case U:C=9;break e;case V:C=11;break e;case ee:C=14;break e;case Q:C=16,h=null;break e}C=29,u=Error(s(130,i===null?"null":typeof i,"")),h=null}return a=Es(C,u,a,m),a.elementType=i,a.type=h,a.lanes=w,a}function Ro(i,a,u,h){return i=Es(7,i,h,a),i.lanes=u,i}function qp(i,a,u){return i=Es(6,i,null,a),i.lanes=u,i}function Yp(i,a,u){return a=Es(4,i.children!==null?i.children:[],i.key,a),a.lanes=u,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var Na=[],Oa=0,wf=null,xf=0,zs=[],Vs=0,Co=null,Vr=1,$r="";function Mo(i,a){Na[Oa++]=xf,Na[Oa++]=wf,wf=i,xf=a}function Gv(i,a,u){zs[Vs++]=Vr,zs[Vs++]=$r,zs[Vs++]=Co,Co=i;var h=Vr;i=$r;var m=32-rs(h)-1;h&=~(1<<m),u+=1;var w=32-rs(a)+m;if(30<w){var C=m-m%5;w=(h&(1<<C)-1).toString(32),h>>=C,m-=C,Vr=1<<32-rs(a)+m|u<<m|h,$r=w+i}else Vr=1<<w|u<<m|h,$r=i}function Kp(i){i.return!==null&&(Mo(i,1),Gv(i,1,0))}function Zp(i){for(;i===wf;)wf=Na[--Oa],Na[Oa]=null,xf=Na[--Oa],Na[Oa]=null;for(;i===Co;)Co=zs[--Vs],zs[Vs]=null,$r=zs[--Vs],zs[Vs]=null,Vr=zs[--Vs],zs[Vs]=null}var os=null,ln=null,It=!1,No=null,br=!1,Qp=Error(s(519));function Oo(i){var a=Error(s(418,""));throw xc(js(a,i)),Qp}function Jv(i){var a=i.stateNode,u=i.type,h=i.memoizedProps;switch(a[b]=i,a[S]=h,u){case"dialog":Tt("cancel",a),Tt("close",a);break;case"iframe":case"object":case"embed":Tt("load",a);break;case"video":case"audio":for(u=0;u<Xc.length;u++)Tt(Xc[u],a);break;case"source":Tt("error",a);break;case"img":case"image":case"link":Tt("error",a),Tt("load",a);break;case"details":Tt("toggle",a);break;case"input":Tt("invalid",a),of(a,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0),gt(a);break;case"select":Tt("invalid",a);break;case"textarea":Tt("invalid",a),lf(a,h.value,h.defaultValue,h.children),gt(a)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||h.suppressHydrationWarning===!0||mx(a.textContent,u)?(h.popover!=null&&(Tt("beforetoggle",a),Tt("toggle",a)),h.onScroll!=null&&Tt("scroll",a),h.onScrollEnd!=null&&Tt("scrollend",a),h.onClick!=null&&(a.onclick=nh),a=!0):a=!1,a||Oo(i)}function e0(i){for(os=i.return;os;)switch(os.tag){case 5:case 13:br=!1;return;case 27:case 3:br=!0;return;default:os=os.return}}function vc(i){if(i!==os)return!1;if(!It)return e0(i),It=!0,!1;var a=i.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||dm(i.type,i.memoizedProps)),u=!u),u&&ln&&Oo(i),e0(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));e:{for(i=i.nextSibling,a=0;i;){if(i.nodeType===8)if(u=i.data,u==="/$"){if(a===0){ln=ir(i.nextSibling);break e}a--}else u!=="$"&&u!=="$!"&&u!=="$?"||a++;i=i.nextSibling}ln=null}}else a===27?(a=ln,Pi(i.type)?(i=ym,ym=null,ln=i):ln=a):ln=os?ir(i.stateNode.nextSibling):null;return!0}function wc(){ln=os=null,It=!1}function t0(){var i=No;return i!==null&&(bs===null?bs=i:bs.push.apply(bs,i),No=null),i}function xc(i){No===null?No=[i]:No.push(i)}var Gp=Te(null),Io=null,Hr=null;function bi(i,a,u){he(Gp,a._currentValue),a._currentValue=u}function Wr(i){i._currentValue=Gp.current,Se(Gp)}function Jp(i,a,u){for(;i!==null;){var h=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,h!==null&&(h.childLanes|=a)):h!==null&&(h.childLanes&a)!==a&&(h.childLanes|=a),i===u)break;i=i.return}}function eg(i,a,u,h){var m=i.child;for(m!==null&&(m.return=i);m!==null;){var w=m.dependencies;if(w!==null){var C=m.child;w=w.firstContext;e:for(;w!==null;){var B=w;w=m;for(var X=0;X<a.length;X++)if(B.context===a[X]){w.lanes|=u,B=w.alternate,B!==null&&(B.lanes|=u),Jp(w.return,u,i),h||(C=null);break e}w=B.next}}else if(m.tag===18){if(C=m.return,C===null)throw Error(s(341));C.lanes|=u,w=C.alternate,w!==null&&(w.lanes|=u),Jp(C,u,i),C=null}else C=m.child;if(C!==null)C.return=m;else for(C=m;C!==null;){if(C===i){C=null;break}if(m=C.sibling,m!==null){m.return=C.return,C=m;break}C=C.return}m=C}}function Tc(i,a,u,h){i=null;for(var m=a,w=!1;m!==null;){if(!w){if((m.flags&524288)!==0)w=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var C=m.alternate;if(C===null)throw Error(s(387));if(C=C.memoizedProps,C!==null){var B=m.type;Ss(m.pendingProps.value,C.value)||(i!==null?i.push(B):i=[B])}}else if(m===xe.current){if(C=m.alternate,C===null)throw Error(s(387));C.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(i!==null?i.push(Gc):i=[Gc])}m=m.return}i!==null&&eg(a,i,u,h),a.flags|=262144}function Tf(i){for(i=i.firstContext;i!==null;){if(!Ss(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function ko(i){Io=i,Hr=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Zn(i){return n0(Io,i)}function Sf(i,a){return Io===null&&ko(i),n0(i,a)}function n0(i,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},Hr===null){if(i===null)throw Error(s(308));Hr=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else Hr=Hr.next=a;return u}var NM=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(u,h){i.push(h)}};this.abort=function(){a.aborted=!0,i.forEach(function(u){return u()})}},OM=n.unstable_scheduleCallback,IM=n.unstable_NormalPriority,Rn={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tg(){return{controller:new NM,data:new Map,refCount:0}}function Sc(i){i.refCount--,i.refCount===0&&OM(IM,function(){i.controller.abort()})}var Ec=null,ng=0,Ia=0,ka=null;function kM(i,a){if(Ec===null){var u=Ec=[];ng=0,Ia=rm(),ka={status:"pending",value:void 0,then:function(h){u.push(h)}}}return ng++,a.then(s0,s0),a}function s0(){if(--ng===0&&Ec!==null){ka!==null&&(ka.status="fulfilled");var i=Ec;Ec=null,Ia=0,ka=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function PM(i,a){var u=[],h={status:"pending",value:null,reason:null,then:function(m){u.push(m)}};return i.then(function(){h.status="fulfilled",h.value=a;for(var m=0;m<u.length;m++)(0,u[m])(a)},function(m){for(h.status="rejected",h.reason=m,m=0;m<u.length;m++)(0,u[m])(void 0)}),h}var r0=G.S;G.S=function(i,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&kM(i,a),r0!==null&&r0(i,a)};var Po=Te(null);function sg(){var i=Po.current;return i!==null?i:Jt.pooledCache}function Ef(i,a){a===null?he(Po,Po.current):he(Po,a.pool)}function i0(){var i=sg();return i===null?null:{parent:Rn._currentValue,pool:i}}var Ac=Error(s(460)),o0=Error(s(474)),Af=Error(s(542)),rg={then:function(){}};function a0(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Rf(){}function l0(i,a,u){switch(u=i[u],u===void 0?i.push(a):u!==a&&(a.then(Rf,Rf),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,u0(i),i;default:if(typeof a.status=="string")a.then(Rf,Rf);else{if(i=Jt,i!==null&&100<i.shellSuspendCounter)throw Error(s(482));i=a,i.status="pending",i.then(function(h){if(a.status==="pending"){var m=a;m.status="fulfilled",m.value=h}},function(h){if(a.status==="pending"){var m=a;m.status="rejected",m.reason=h}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,u0(i),i}throw Rc=a,Ac}}var Rc=null;function c0(){if(Rc===null)throw Error(s(459));var i=Rc;return Rc=null,i}function u0(i){if(i===Ac||i===Af)throw Error(s(483))}var vi=!1;function ig(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function og(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function wi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function xi(i,a,u){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(jt&2)!==0){var m=h.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),h.pending=a,a=bf(i),Zv(i,null,u),a}return _f(i,h,a,u),bf(i)}function Cc(i,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var h=a.lanes;h&=i.pendingLanes,u|=h,a.lanes=u,En(i,u)}}function ag(i,a){var u=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var m=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var C={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?m=w=C:w=w.next=C,u=u.next}while(u!==null);w===null?m=w=a:w=w.next=a}else m=w=a;u={baseState:h.baseState,firstBaseUpdate:m,lastBaseUpdate:w,shared:h.shared,callbacks:h.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=a:i.next=a,u.lastBaseUpdate=a}var lg=!1;function Mc(){if(lg){var i=ka;if(i!==null)throw i}}function Nc(i,a,u,h){lg=!1;var m=i.updateQueue;vi=!1;var w=m.firstBaseUpdate,C=m.lastBaseUpdate,B=m.shared.pending;if(B!==null){m.shared.pending=null;var X=B,de=X.next;X.next=null,C===null?w=de:C.next=de,C=X;var Re=i.alternate;Re!==null&&(Re=Re.updateQueue,B=Re.lastBaseUpdate,B!==C&&(B===null?Re.firstBaseUpdate=de:B.next=de,Re.lastBaseUpdate=X))}if(w!==null){var Ie=m.baseState;C=0,Re=de=X=null,B=w;do{var me=B.lane&-536870913,_e=me!==B.lane;if(_e?(At&me)===me:(h&me)===me){me!==0&&me===Ia&&(lg=!0),Re!==null&&(Re=Re.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var ut=i,it=B;me=a;var Xt=u;switch(it.tag){case 1:if(ut=it.payload,typeof ut=="function"){Ie=ut.call(Xt,Ie,me);break e}Ie=ut;break e;case 3:ut.flags=ut.flags&-65537|128;case 0:if(ut=it.payload,me=typeof ut=="function"?ut.call(Xt,Ie,me):ut,me==null)break e;Ie=g({},Ie,me);break e;case 2:vi=!0}}me=B.callback,me!==null&&(i.flags|=64,_e&&(i.flags|=8192),_e=m.callbacks,_e===null?m.callbacks=[me]:_e.push(me))}else _e={lane:me,tag:B.tag,payload:B.payload,callback:B.callback,next:null},Re===null?(de=Re=_e,X=Ie):Re=Re.next=_e,C|=me;if(B=B.next,B===null){if(B=m.shared.pending,B===null)break;_e=B,B=_e.next,_e.next=null,m.lastBaseUpdate=_e,m.shared.pending=null}}while(!0);Re===null&&(X=Ie),m.baseState=X,m.firstBaseUpdate=de,m.lastBaseUpdate=Re,w===null&&(m.shared.lanes=0),Ni|=C,i.lanes=C,i.memoizedState=Ie}}function f0(i,a){if(typeof i!="function")throw Error(s(191,i));i.call(a)}function h0(i,a){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)f0(u[i],a)}var Pa=Te(null),Cf=Te(0);function d0(i,a){i=Gr,he(Cf,i),he(Pa,a),Gr=i|a.baseLanes}function cg(){he(Cf,Gr),he(Pa,Pa.current)}function ug(){Gr=Cf.current,Se(Pa),Se(Cf)}var Ti=0,yt=null,Ht=null,vn=null,Mf=!1,Da=!1,Do=!1,Nf=0,Oc=0,Ba=null,DM=0;function gn(){throw Error(s(321))}function fg(i,a){if(a===null)return!1;for(var u=0;u<a.length&&u<i.length;u++)if(!Ss(i[u],a[u]))return!1;return!0}function hg(i,a,u,h,m,w){return Ti=w,yt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,G.H=i===null||i.memoizedState===null?Z0:Q0,Do=!1,w=u(h,m),Do=!1,Da&&(w=g0(a,u,h,m)),p0(i),w}function p0(i){G.H=Bf;var a=Ht!==null&&Ht.next!==null;if(Ti=0,vn=Ht=yt=null,Mf=!1,Oc=0,Ba=null,a)throw Error(s(300));i===null||Fn||(i=i.dependencies,i!==null&&Tf(i)&&(Fn=!0))}function g0(i,a,u,h){yt=i;var m=0;do{if(Da&&(Ba=null),Oc=0,Da=!1,25<=m)throw Error(s(301));if(m+=1,vn=Ht=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}G.H=VM,w=a(u,h)}while(Da);return w}function BM(){var i=G.H,a=i.useState()[0];return a=typeof a.then=="function"?Ic(a):a,i=i.useState()[0],(Ht!==null?Ht.memoizedState:null)!==i&&(yt.flags|=1024),a}function dg(){var i=Nf!==0;return Nf=0,i}function pg(i,a,u){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~u}function gg(i){if(Mf){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Mf=!1}Ti=0,vn=Ht=yt=null,Da=!1,Oc=Nf=0,Ba=null}function ys(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vn===null?yt.memoizedState=vn=i:vn=vn.next=i,vn}function wn(){if(Ht===null){var i=yt.alternate;i=i!==null?i.memoizedState:null}else i=Ht.next;var a=vn===null?yt.memoizedState:vn.next;if(a!==null)vn=a,Ht=i;else{if(i===null)throw yt.alternate===null?Error(s(467)):Error(s(310));Ht=i,i={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},vn===null?yt.memoizedState=vn=i:vn=vn.next=i}return vn}function mg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ic(i){var a=Oc;return Oc+=1,Ba===null&&(Ba=[]),i=l0(Ba,i,a),a=yt,(vn===null?a.memoizedState:vn.next)===null&&(a=a.alternate,G.H=a===null||a.memoizedState===null?Z0:Q0),i}function Of(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Ic(i);if(i.$$typeof===I)return Zn(i)}throw Error(s(438,String(i)))}function yg(i){var a=null,u=yt.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var h=yt.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(a={data:h.data.map(function(m){return m.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=mg(),yt.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(i),h=0;h<i;h++)u[h]=Ne;return a.index++,u}function Xr(i,a){return typeof a=="function"?a(i):a}function If(i){var a=wn();return _g(a,Ht,i)}function _g(i,a,u){var h=i.queue;if(h===null)throw Error(s(311));h.lastRenderedReducer=u;var m=i.baseQueue,w=h.pending;if(w!==null){if(m!==null){var C=m.next;m.next=w.next,w.next=C}a.baseQueue=m=w,h.pending=null}if(w=i.baseState,m===null)i.memoizedState=w;else{a=m.next;var B=C=null,X=null,de=a,Re=!1;do{var Ie=de.lane&-536870913;if(Ie!==de.lane?(At&Ie)===Ie:(Ti&Ie)===Ie){var me=de.revertLane;if(me===0)X!==null&&(X=X.next={lane:0,revertLane:0,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Ie===Ia&&(Re=!0);else if((Ti&me)===me){de=de.next,me===Ia&&(Re=!0);continue}else Ie={lane:0,revertLane:de.revertLane,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},X===null?(B=X=Ie,C=w):X=X.next=Ie,yt.lanes|=me,Ni|=me;Ie=de.action,Do&&u(w,Ie),w=de.hasEagerState?de.eagerState:u(w,Ie)}else me={lane:Ie,revertLane:de.revertLane,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},X===null?(B=X=me,C=w):X=X.next=me,yt.lanes|=Ie,Ni|=Ie;de=de.next}while(de!==null&&de!==a);if(X===null?C=w:X.next=B,!Ss(w,i.memoizedState)&&(Fn=!0,Re&&(u=ka,u!==null)))throw u;i.memoizedState=w,i.baseState=C,i.baseQueue=X,h.lastRenderedState=w}return m===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function bg(i){var a=wn(),u=a.queue;if(u===null)throw Error(s(311));u.lastRenderedReducer=i;var h=u.dispatch,m=u.pending,w=a.memoizedState;if(m!==null){u.pending=null;var C=m=m.next;do w=i(w,C.action),C=C.next;while(C!==m);Ss(w,a.memoizedState)||(Fn=!0),a.memoizedState=w,a.baseQueue===null&&(a.baseState=w),u.lastRenderedState=w}return[w,h]}function m0(i,a,u){var h=yt,m=wn(),w=It;if(w){if(u===void 0)throw Error(s(407));u=u()}else u=a();var C=!Ss((Ht||m).memoizedState,u);C&&(m.memoizedState=u,Fn=!0),m=m.queue;var B=b0.bind(null,h,m,i);if(kc(2048,8,B,[i]),m.getSnapshot!==a||C||vn!==null&&vn.memoizedState.tag&1){if(h.flags|=2048,Ua(9,kf(),_0.bind(null,h,m,u,a),null),Jt===null)throw Error(s(349));w||(Ti&124)!==0||y0(h,a,u)}return u}function y0(i,a,u){i.flags|=16384,i={getSnapshot:a,value:u},a=yt.updateQueue,a===null?(a=mg(),yt.updateQueue=a,a.stores=[i]):(u=a.stores,u===null?a.stores=[i]:u.push(i))}function _0(i,a,u,h){a.value=u,a.getSnapshot=h,v0(a)&&w0(i)}function b0(i,a,u){return u(function(){v0(a)&&w0(i)})}function v0(i){var a=i.getSnapshot;i=i.value;try{var u=a();return!Ss(i,u)}catch{return!0}}function w0(i){var a=Ca(i,2);a!==null&&Ns(a,i,2)}function vg(i){var a=ys();if(typeof i=="function"){var u=i;if(i=u(),Do){_r(!0);try{u()}finally{_r(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:i},a}function x0(i,a,u,h){return i.baseState=u,_g(i,Ht,typeof h=="function"?h:Xr)}function UM(i,a,u,h,m){if(Df(i))throw Error(s(485));if(i=a.action,i!==null){var w={payload:m,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){w.listeners.push(C)}};G.T!==null?u(!0):w.isTransition=!1,h(w),u=a.pending,u===null?(w.next=a.pending=w,T0(a,w)):(w.next=u.next,a.pending=u.next=w)}}function T0(i,a){var u=a.action,h=a.payload,m=i.state;if(a.isTransition){var w=G.T,C={};G.T=C;try{var B=u(m,h),X=G.S;X!==null&&X(C,B),S0(i,a,B)}catch(de){wg(i,a,de)}finally{G.T=w}}else try{w=u(m,h),S0(i,a,w)}catch(de){wg(i,a,de)}}function S0(i,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){E0(i,a,h)},function(h){return wg(i,a,h)}):E0(i,a,u)}function E0(i,a,u){a.status="fulfilled",a.value=u,A0(a),i.state=u,a=i.pending,a!==null&&(u=a.next,u===a?i.pending=null:(u=u.next,a.next=u,T0(i,u)))}function wg(i,a,u){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do a.status="rejected",a.reason=u,A0(a),a=a.next;while(a!==h)}i.action=null}function A0(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function R0(i,a){return a}function C0(i,a){if(It){var u=Jt.formState;if(u!==null){e:{var h=yt;if(It){if(ln){t:{for(var m=ln,w=br;m.nodeType!==8;){if(!w){m=null;break t}if(m=ir(m.nextSibling),m===null){m=null;break t}}w=m.data,m=w==="F!"||w==="F"?m:null}if(m){ln=ir(m.nextSibling),h=m.data==="F!";break e}}Oo(h)}h=!1}h&&(a=u[0])}}return u=ys(),u.memoizedState=u.baseState=a,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:R0,lastRenderedState:a},u.queue=h,u=q0.bind(null,yt,h),h.dispatch=u,h=vg(!1),w=Ag.bind(null,yt,!1,h.queue),h=ys(),m={state:a,dispatch:null,action:i,pending:null},h.queue=m,u=UM.bind(null,yt,m,w,u),m.dispatch=u,h.memoizedState=i,[a,u,!1]}function M0(i){var a=wn();return N0(a,Ht,i)}function N0(i,a,u){if(a=_g(i,a,R0)[0],i=If(Xr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var h=Ic(a)}catch(C){throw C===Ac?Af:C}else h=a;a=wn();var m=a.queue,w=m.dispatch;return u!==a.memoizedState&&(yt.flags|=2048,Ua(9,kf(),FM.bind(null,m,u),null)),[h,w,i]}function FM(i,a){i.action=a}function O0(i){var a=wn(),u=Ht;if(u!==null)return N0(a,u,i);wn(),a=a.memoizedState,u=wn();var h=u.queue.dispatch;return u.memoizedState=i,[a,h,!1]}function Ua(i,a,u,h){return i={tag:i,create:u,deps:h,inst:a,next:null},a=yt.updateQueue,a===null&&(a=mg(),yt.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=i.next=i:(h=u.next,u.next=i,i.next=h,a.lastEffect=i),i}function kf(){return{destroy:void 0,resource:void 0}}function I0(){return wn().memoizedState}function Pf(i,a,u,h){var m=ys();h=h===void 0?null:h,yt.flags|=i,m.memoizedState=Ua(1|a,kf(),u,h)}function kc(i,a,u,h){var m=wn();h=h===void 0?null:h;var w=m.memoizedState.inst;Ht!==null&&h!==null&&fg(h,Ht.memoizedState.deps)?m.memoizedState=Ua(a,w,u,h):(yt.flags|=i,m.memoizedState=Ua(1|a,w,u,h))}function k0(i,a){Pf(8390656,8,i,a)}function P0(i,a){kc(2048,8,i,a)}function D0(i,a){return kc(4,2,i,a)}function B0(i,a){return kc(4,4,i,a)}function U0(i,a){if(typeof a=="function"){i=i();var u=a(i);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function F0(i,a,u){u=u!=null?u.concat([i]):null,kc(4,4,U0.bind(null,a,i),u)}function xg(){}function j0(i,a){var u=wn();a=a===void 0?null:a;var h=u.memoizedState;return a!==null&&fg(a,h[1])?h[0]:(u.memoizedState=[i,a],i)}function L0(i,a){var u=wn();a=a===void 0?null:a;var h=u.memoizedState;if(a!==null&&fg(a,h[1]))return h[0];if(h=i(),Do){_r(!0);try{i()}finally{_r(!1)}}return u.memoizedState=[h,a],h}function Tg(i,a,u){return u===void 0||(Ti&1073741824)!==0?i.memoizedState=a:(i.memoizedState=u,i=$w(),yt.lanes|=i,Ni|=i,u)}function z0(i,a,u,h){return Ss(u,a)?u:Pa.current!==null?(i=Tg(i,u,h),Ss(i,a)||(Fn=!0),i):(Ti&42)===0?(Fn=!0,i.memoizedState=u):(i=$w(),yt.lanes|=i,Ni|=i,a)}function V0(i,a,u,h,m){var w=Ae.p;Ae.p=w!==0&&8>w?w:8;var C=G.T,B={};G.T=B,Ag(i,!1,a,u);try{var X=m(),de=G.S;if(de!==null&&de(B,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var Re=PM(X,h);Pc(i,a,Re,Ms(i))}else Pc(i,a,h,Ms(i))}catch(Ie){Pc(i,a,{then:function(){},status:"rejected",reason:Ie},Ms())}finally{Ae.p=w,G.T=C}}function jM(){}function Sg(i,a,u,h){if(i.tag!==5)throw Error(s(476));var m=$0(i).queue;V0(i,m,a,pe,u===null?jM:function(){return H0(i),u(h)})}function $0(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:pe},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xr,lastRenderedState:u},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function H0(i){var a=$0(i).next.queue;Pc(i,a,{},Ms())}function Eg(){return Zn(Gc)}function W0(){return wn().memoizedState}function X0(){return wn().memoizedState}function LM(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var u=Ms();i=wi(u);var h=xi(a,i,u);h!==null&&(Ns(h,a,u),Cc(h,a,u)),a={cache:tg()},i.payload=a;return}a=a.return}}function zM(i,a,u){var h=Ms();u={lane:h,revertLane:0,action:u,hasEagerState:!1,eagerState:null,next:null},Df(i)?Y0(a,u):(u=Wp(i,a,u,h),u!==null&&(Ns(u,i,h),K0(u,a,h)))}function q0(i,a,u){var h=Ms();Pc(i,a,u,h)}function Pc(i,a,u,h){var m={lane:h,revertLane:0,action:u,hasEagerState:!1,eagerState:null,next:null};if(Df(i))Y0(a,m);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=a.lastRenderedReducer,w!==null))try{var C=a.lastRenderedState,B=w(C,u);if(m.hasEagerState=!0,m.eagerState=B,Ss(B,C))return _f(i,a,m,0),Jt===null&&yf(),!1}catch{}finally{}if(u=Wp(i,a,m,h),u!==null)return Ns(u,i,h),K0(u,a,h),!0}return!1}function Ag(i,a,u,h){if(h={lane:2,revertLane:rm(),action:h,hasEagerState:!1,eagerState:null,next:null},Df(i)){if(a)throw Error(s(479))}else a=Wp(i,u,h,2),a!==null&&Ns(a,i,2)}function Df(i){var a=i.alternate;return i===yt||a!==null&&a===yt}function Y0(i,a){Da=Mf=!0;var u=i.pending;u===null?a.next=a:(a.next=u.next,u.next=a),i.pending=a}function K0(i,a,u){if((u&4194048)!==0){var h=a.lanes;h&=i.pendingLanes,u|=h,a.lanes=u,En(i,u)}}var Bf={readContext:Zn,use:Of,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useLayoutEffect:gn,useInsertionEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useSyncExternalStore:gn,useId:gn,useHostTransitionStatus:gn,useFormState:gn,useActionState:gn,useOptimistic:gn,useMemoCache:gn,useCacheRefresh:gn},Z0={readContext:Zn,use:Of,useCallback:function(i,a){return ys().memoizedState=[i,a===void 0?null:a],i},useContext:Zn,useEffect:k0,useImperativeHandle:function(i,a,u){u=u!=null?u.concat([i]):null,Pf(4194308,4,U0.bind(null,a,i),u)},useLayoutEffect:function(i,a){return Pf(4194308,4,i,a)},useInsertionEffect:function(i,a){Pf(4,2,i,a)},useMemo:function(i,a){var u=ys();a=a===void 0?null:a;var h=i();if(Do){_r(!0);try{i()}finally{_r(!1)}}return u.memoizedState=[h,a],h},useReducer:function(i,a,u){var h=ys();if(u!==void 0){var m=u(a);if(Do){_r(!0);try{u(a)}finally{_r(!1)}}}else m=a;return h.memoizedState=h.baseState=m,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:m},h.queue=i,i=i.dispatch=zM.bind(null,yt,i),[h.memoizedState,i]},useRef:function(i){var a=ys();return i={current:i},a.memoizedState=i},useState:function(i){i=vg(i);var a=i.queue,u=q0.bind(null,yt,a);return a.dispatch=u,[i.memoizedState,u]},useDebugValue:xg,useDeferredValue:function(i,a){var u=ys();return Tg(u,i,a)},useTransition:function(){var i=vg(!1);return i=V0.bind(null,yt,i.queue,!0,!1),ys().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,u){var h=yt,m=ys();if(It){if(u===void 0)throw Error(s(407));u=u()}else{if(u=a(),Jt===null)throw Error(s(349));(At&124)!==0||y0(h,a,u)}m.memoizedState=u;var w={value:u,getSnapshot:a};return m.queue=w,k0(b0.bind(null,h,w,i),[i]),h.flags|=2048,Ua(9,kf(),_0.bind(null,h,w,u,a),null),u},useId:function(){var i=ys(),a=Jt.identifierPrefix;if(It){var u=$r,h=Vr;u=(h&~(1<<32-rs(h)-1)).toString(32)+u,a="«"+a+"R"+u,u=Nf++,0<u&&(a+="H"+u.toString(32)),a+="»"}else u=DM++,a="«"+a+"r"+u.toString(32)+"»";return i.memoizedState=a},useHostTransitionStatus:Eg,useFormState:C0,useActionState:C0,useOptimistic:function(i){var a=ys();a.memoizedState=a.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=Ag.bind(null,yt,!0,u),u.dispatch=a,[i,a]},useMemoCache:yg,useCacheRefresh:function(){return ys().memoizedState=LM.bind(null,yt)}},Q0={readContext:Zn,use:Of,useCallback:j0,useContext:Zn,useEffect:P0,useImperativeHandle:F0,useInsertionEffect:D0,useLayoutEffect:B0,useMemo:L0,useReducer:If,useRef:I0,useState:function(){return If(Xr)},useDebugValue:xg,useDeferredValue:function(i,a){var u=wn();return z0(u,Ht.memoizedState,i,a)},useTransition:function(){var i=If(Xr)[0],a=wn().memoizedState;return[typeof i=="boolean"?i:Ic(i),a]},useSyncExternalStore:m0,useId:W0,useHostTransitionStatus:Eg,useFormState:M0,useActionState:M0,useOptimistic:function(i,a){var u=wn();return x0(u,Ht,i,a)},useMemoCache:yg,useCacheRefresh:X0},VM={readContext:Zn,use:Of,useCallback:j0,useContext:Zn,useEffect:P0,useImperativeHandle:F0,useInsertionEffect:D0,useLayoutEffect:B0,useMemo:L0,useReducer:bg,useRef:I0,useState:function(){return bg(Xr)},useDebugValue:xg,useDeferredValue:function(i,a){var u=wn();return Ht===null?Tg(u,i,a):z0(u,Ht.memoizedState,i,a)},useTransition:function(){var i=bg(Xr)[0],a=wn().memoizedState;return[typeof i=="boolean"?i:Ic(i),a]},useSyncExternalStore:m0,useId:W0,useHostTransitionStatus:Eg,useFormState:O0,useActionState:O0,useOptimistic:function(i,a){var u=wn();return Ht!==null?x0(u,Ht,i,a):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:yg,useCacheRefresh:X0},Fa=null,Dc=0;function Uf(i){var a=Dc;return Dc+=1,Fa===null&&(Fa=[]),l0(Fa,i,a)}function Bc(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function Ff(i,a){throw a.$$typeof===_?Error(s(525)):(i=Object.prototype.toString.call(a),Error(s(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function G0(i){var a=i._init;return a(i._payload)}function J0(i){function a(ae,J){if(i){var ue=ae.deletions;ue===null?(ae.deletions=[J],ae.flags|=16):ue.push(J)}}function u(ae,J){if(!i)return null;for(;J!==null;)a(ae,J),J=J.sibling;return null}function h(ae){for(var J=new Map;ae!==null;)ae.key!==null?J.set(ae.key,ae):J.set(ae.index,ae),ae=ae.sibling;return J}function m(ae,J){return ae=zr(ae,J),ae.index=0,ae.sibling=null,ae}function w(ae,J,ue){return ae.index=ue,i?(ue=ae.alternate,ue!==null?(ue=ue.index,ue<J?(ae.flags|=67108866,J):ue):(ae.flags|=67108866,J)):(ae.flags|=1048576,J)}function C(ae){return i&&ae.alternate===null&&(ae.flags|=67108866),ae}function B(ae,J,ue,Me){return J===null||J.tag!==6?(J=qp(ue,ae.mode,Me),J.return=ae,J):(J=m(J,ue),J.return=ae,J)}function X(ae,J,ue,Me){var Ye=ue.type;return Ye===M?Re(ae,J,ue.props.children,Me,ue.key):J!==null&&(J.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===Q&&G0(Ye)===J.type)?(J=m(J,ue.props),Bc(J,ue),J.return=ae,J):(J=vf(ue.type,ue.key,ue.props,null,ae.mode,Me),Bc(J,ue),J.return=ae,J)}function de(ae,J,ue,Me){return J===null||J.tag!==4||J.stateNode.containerInfo!==ue.containerInfo||J.stateNode.implementation!==ue.implementation?(J=Yp(ue,ae.mode,Me),J.return=ae,J):(J=m(J,ue.children||[]),J.return=ae,J)}function Re(ae,J,ue,Me,Ye){return J===null||J.tag!==7?(J=Ro(ue,ae.mode,Me,Ye),J.return=ae,J):(J=m(J,ue),J.return=ae,J)}function Ie(ae,J,ue){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=qp(""+J,ae.mode,ue),J.return=ae,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case x:return ue=vf(J.type,J.key,J.props,null,ae.mode,ue),Bc(ue,J),ue.return=ae,ue;case E:return J=Yp(J,ae.mode,ue),J.return=ae,J;case Q:var Me=J._init;return J=Me(J._payload),Ie(ae,J,ue)}if(je(J)||ve(J))return J=Ro(J,ae.mode,ue,null),J.return=ae,J;if(typeof J.then=="function")return Ie(ae,Uf(J),ue);if(J.$$typeof===I)return Ie(ae,Sf(ae,J),ue);Ff(ae,J)}return null}function me(ae,J,ue,Me){var Ye=J!==null?J.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Ye!==null?null:B(ae,J,""+ue,Me);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case x:return ue.key===Ye?X(ae,J,ue,Me):null;case E:return ue.key===Ye?de(ae,J,ue,Me):null;case Q:return Ye=ue._init,ue=Ye(ue._payload),me(ae,J,ue,Me)}if(je(ue)||ve(ue))return Ye!==null?null:Re(ae,J,ue,Me,null);if(typeof ue.then=="function")return me(ae,J,Uf(ue),Me);if(ue.$$typeof===I)return me(ae,J,Sf(ae,ue),Me);Ff(ae,ue)}return null}function _e(ae,J,ue,Me,Ye){if(typeof Me=="string"&&Me!==""||typeof Me=="number"||typeof Me=="bigint")return ae=ae.get(ue)||null,B(J,ae,""+Me,Ye);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case x:return ae=ae.get(Me.key===null?ue:Me.key)||null,X(J,ae,Me,Ye);case E:return ae=ae.get(Me.key===null?ue:Me.key)||null,de(J,ae,Me,Ye);case Q:var wt=Me._init;return Me=wt(Me._payload),_e(ae,J,ue,Me,Ye)}if(je(Me)||ve(Me))return ae=ae.get(ue)||null,Re(J,ae,Me,Ye,null);if(typeof Me.then=="function")return _e(ae,J,ue,Uf(Me),Ye);if(Me.$$typeof===I)return _e(ae,J,ue,Sf(J,Me),Ye);Ff(J,Me)}return null}function ut(ae,J,ue,Me){for(var Ye=null,wt=null,Je=J,lt=J=0,Ln=null;Je!==null&&lt<ue.length;lt++){Je.index>lt?(Ln=Je,Je=null):Ln=Je.sibling;var Ot=me(ae,Je,ue[lt],Me);if(Ot===null){Je===null&&(Je=Ln);break}i&&Je&&Ot.alternate===null&&a(ae,Je),J=w(Ot,J,lt),wt===null?Ye=Ot:wt.sibling=Ot,wt=Ot,Je=Ln}if(lt===ue.length)return u(ae,Je),It&&Mo(ae,lt),Ye;if(Je===null){for(;lt<ue.length;lt++)Je=Ie(ae,ue[lt],Me),Je!==null&&(J=w(Je,J,lt),wt===null?Ye=Je:wt.sibling=Je,wt=Je);return It&&Mo(ae,lt),Ye}for(Je=h(Je);lt<ue.length;lt++)Ln=_e(Je,ae,lt,ue[lt],Me),Ln!==null&&(i&&Ln.alternate!==null&&Je.delete(Ln.key===null?lt:Ln.key),J=w(Ln,J,lt),wt===null?Ye=Ln:wt.sibling=Ln,wt=Ln);return i&&Je.forEach(function(ji){return a(ae,ji)}),It&&Mo(ae,lt),Ye}function it(ae,J,ue,Me){if(ue==null)throw Error(s(151));for(var Ye=null,wt=null,Je=J,lt=J=0,Ln=null,Ot=ue.next();Je!==null&&!Ot.done;lt++,Ot=ue.next()){Je.index>lt?(Ln=Je,Je=null):Ln=Je.sibling;var ji=me(ae,Je,Ot.value,Me);if(ji===null){Je===null&&(Je=Ln);break}i&&Je&&ji.alternate===null&&a(ae,Je),J=w(ji,J,lt),wt===null?Ye=ji:wt.sibling=ji,wt=ji,Je=Ln}if(Ot.done)return u(ae,Je),It&&Mo(ae,lt),Ye;if(Je===null){for(;!Ot.done;lt++,Ot=ue.next())Ot=Ie(ae,Ot.value,Me),Ot!==null&&(J=w(Ot,J,lt),wt===null?Ye=Ot:wt.sibling=Ot,wt=Ot);return It&&Mo(ae,lt),Ye}for(Je=h(Je);!Ot.done;lt++,Ot=ue.next())Ot=_e(Je,ae,lt,Ot.value,Me),Ot!==null&&(i&&Ot.alternate!==null&&Je.delete(Ot.key===null?lt:Ot.key),J=w(Ot,J,lt),wt===null?Ye=Ot:wt.sibling=Ot,wt=Ot);return i&&Je.forEach(function($N){return a(ae,$N)}),It&&Mo(ae,lt),Ye}function Xt(ae,J,ue,Me){if(typeof ue=="object"&&ue!==null&&ue.type===M&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case x:e:{for(var Ye=ue.key;J!==null;){if(J.key===Ye){if(Ye=ue.type,Ye===M){if(J.tag===7){u(ae,J.sibling),Me=m(J,ue.props.children),Me.return=ae,ae=Me;break e}}else if(J.elementType===Ye||typeof Ye=="object"&&Ye!==null&&Ye.$$typeof===Q&&G0(Ye)===J.type){u(ae,J.sibling),Me=m(J,ue.props),Bc(Me,ue),Me.return=ae,ae=Me;break e}u(ae,J);break}else a(ae,J);J=J.sibling}ue.type===M?(Me=Ro(ue.props.children,ae.mode,Me,ue.key),Me.return=ae,ae=Me):(Me=vf(ue.type,ue.key,ue.props,null,ae.mode,Me),Bc(Me,ue),Me.return=ae,ae=Me)}return C(ae);case E:e:{for(Ye=ue.key;J!==null;){if(J.key===Ye)if(J.tag===4&&J.stateNode.containerInfo===ue.containerInfo&&J.stateNode.implementation===ue.implementation){u(ae,J.sibling),Me=m(J,ue.children||[]),Me.return=ae,ae=Me;break e}else{u(ae,J);break}else a(ae,J);J=J.sibling}Me=Yp(ue,ae.mode,Me),Me.return=ae,ae=Me}return C(ae);case Q:return Ye=ue._init,ue=Ye(ue._payload),Xt(ae,J,ue,Me)}if(je(ue))return ut(ae,J,ue,Me);if(ve(ue)){if(Ye=ve(ue),typeof Ye!="function")throw Error(s(150));return ue=Ye.call(ue),it(ae,J,ue,Me)}if(typeof ue.then=="function")return Xt(ae,J,Uf(ue),Me);if(ue.$$typeof===I)return Xt(ae,J,Sf(ae,ue),Me);Ff(ae,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,J!==null&&J.tag===6?(u(ae,J.sibling),Me=m(J,ue),Me.return=ae,ae=Me):(u(ae,J),Me=qp(ue,ae.mode,Me),Me.return=ae,ae=Me),C(ae)):u(ae,J)}return function(ae,J,ue,Me){try{Dc=0;var Ye=Xt(ae,J,ue,Me);return Fa=null,Ye}catch(Je){if(Je===Ac||Je===Af)throw Je;var wt=Es(29,Je,null,ae.mode);return wt.lanes=Me,wt.return=ae,wt}finally{}}}var ja=J0(!0),ew=J0(!1),$s=Te(null),vr=null;function Si(i){var a=i.alternate;he(Cn,Cn.current&1),he($s,i),vr===null&&(a===null||Pa.current!==null||a.memoizedState!==null)&&(vr=i)}function tw(i){if(i.tag===22){if(he(Cn,Cn.current),he($s,i),vr===null){var a=i.alternate;a!==null&&a.memoizedState!==null&&(vr=i)}}else Ei()}function Ei(){he(Cn,Cn.current),he($s,$s.current)}function qr(i){Se($s),vr===i&&(vr=null),Se(Cn)}var Cn=Te(0);function jf(i){for(var a=i;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||mm(u)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function Rg(i,a,u,h){a=i.memoizedState,u=u(h,a),u=u==null?a:g({},a,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var Cg={enqueueSetState:function(i,a,u){i=i._reactInternals;var h=Ms(),m=wi(h);m.payload=a,u!=null&&(m.callback=u),a=xi(i,m,h),a!==null&&(Ns(a,i,h),Cc(a,i,h))},enqueueReplaceState:function(i,a,u){i=i._reactInternals;var h=Ms(),m=wi(h);m.tag=1,m.payload=a,u!=null&&(m.callback=u),a=xi(i,m,h),a!==null&&(Ns(a,i,h),Cc(a,i,h))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var u=Ms(),h=wi(u);h.tag=2,a!=null&&(h.callback=a),a=xi(i,h,u),a!==null&&(Ns(a,i,u),Cc(a,i,u))}};function nw(i,a,u,h,m,w,C){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,w,C):a.prototype&&a.prototype.isPureReactComponent?!_c(u,h)||!_c(m,w):!0}function sw(i,a,u,h){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,h),a.state!==i&&Cg.enqueueReplaceState(a,a.state,null)}function Bo(i,a){var u=a;if("ref"in a){u={};for(var h in a)h!=="ref"&&(u[h]=a[h])}if(i=i.defaultProps){u===a&&(u=g({},u));for(var m in i)u[m]===void 0&&(u[m]=i[m])}return u}var Lf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function rw(i){Lf(i)}function iw(i){console.error(i)}function ow(i){Lf(i)}function zf(i,a){try{var u=i.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(h){setTimeout(function(){throw h})}}function aw(i,a,u){try{var h=i.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Mg(i,a,u){return u=wi(u),u.tag=3,u.payload={element:null},u.callback=function(){zf(i,a)},u}function lw(i){return i=wi(i),i.tag=3,i}function cw(i,a,u,h){var m=u.type.getDerivedStateFromError;if(typeof m=="function"){var w=h.value;i.payload=function(){return m(w)},i.callback=function(){aw(a,u,h)}}var C=u.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(i.callback=function(){aw(a,u,h),typeof m!="function"&&(Oi===null?Oi=new Set([this]):Oi.add(this));var B=h.stack;this.componentDidCatch(h.value,{componentStack:B!==null?B:""})})}function $M(i,a,u,h,m){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(a=u.alternate,a!==null&&Tc(a,u,m,!0),u=$s.current,u!==null){switch(u.tag){case 13:return vr===null?Jg():u.alternate===null&&cn===0&&(cn=3),u.flags&=-257,u.flags|=65536,u.lanes=m,h===rg?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([h]):a.add(h),tm(i,h,m)),!1;case 22:return u.flags|=65536,h===rg?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([h]):u.add(h)),tm(i,h,m)),!1}throw Error(s(435,u.tag))}return tm(i,h,m),Jg(),!1}if(It)return a=$s.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,h!==Qp&&(i=Error(s(422),{cause:h}),xc(js(i,u)))):(h!==Qp&&(a=Error(s(423),{cause:h}),xc(js(a,u))),i=i.current.alternate,i.flags|=65536,m&=-m,i.lanes|=m,h=js(h,u),m=Mg(i.stateNode,h,m),ag(i,m),cn!==4&&(cn=2)),!1;var w=Error(s(520),{cause:h});if(w=js(w,u),$c===null?$c=[w]:$c.push(w),cn!==4&&(cn=2),a===null)return!0;h=js(h,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,i=m&-m,u.lanes|=i,i=Mg(u.stateNode,h,i),ag(u,i),!1;case 1:if(a=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Oi===null||!Oi.has(w))))return u.flags|=65536,m&=-m,u.lanes|=m,m=lw(m),cw(m,i,u,h),ag(u,m),!1}u=u.return}while(u!==null);return!1}var uw=Error(s(461)),Fn=!1;function $n(i,a,u,h){a.child=i===null?ew(a,null,u,h):ja(a,i.child,u,h)}function fw(i,a,u,h,m){u=u.render;var w=a.ref;if("ref"in h){var C={};for(var B in h)B!=="ref"&&(C[B]=h[B])}else C=h;return ko(a),h=hg(i,a,u,C,w,m),B=dg(),i!==null&&!Fn?(pg(i,a,m),Yr(i,a,m)):(It&&B&&Kp(a),a.flags|=1,$n(i,a,h,m),a.child)}function hw(i,a,u,h,m){if(i===null){var w=u.type;return typeof w=="function"&&!Xp(w)&&w.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=w,dw(i,a,w,h,m)):(i=vf(u.type,null,h,a,a.mode,m),i.ref=a.ref,i.return=a,a.child=i)}if(w=i.child,!Ug(i,m)){var C=w.memoizedProps;if(u=u.compare,u=u!==null?u:_c,u(C,h)&&i.ref===a.ref)return Yr(i,a,m)}return a.flags|=1,i=zr(w,h),i.ref=a.ref,i.return=a,a.child=i}function dw(i,a,u,h,m){if(i!==null){var w=i.memoizedProps;if(_c(w,h)&&i.ref===a.ref)if(Fn=!1,a.pendingProps=h=w,Ug(i,m))(i.flags&131072)!==0&&(Fn=!0);else return a.lanes=i.lanes,Yr(i,a,m)}return Ng(i,a,u,h,m)}function pw(i,a,u){var h=a.pendingProps,m=h.children,w=i!==null?i.memoizedState:null;if(h.mode==="hidden"){if((a.flags&128)!==0){if(h=w!==null?w.baseLanes|u:u,i!==null){for(m=a.child=i.child,w=0;m!==null;)w=w|m.lanes|m.childLanes,m=m.sibling;a.childLanes=w&~h}else a.childLanes=0,a.child=null;return gw(i,a,h,u)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&Ef(a,w!==null?w.cachePool:null),w!==null?d0(a,w):cg(),tw(a);else return a.lanes=a.childLanes=536870912,gw(i,a,w!==null?w.baseLanes|u:u,u)}else w!==null?(Ef(a,w.cachePool),d0(a,w),Ei(),a.memoizedState=null):(i!==null&&Ef(a,null),cg(),Ei());return $n(i,a,m,u),a.child}function gw(i,a,u,h){var m=sg();return m=m===null?null:{parent:Rn._currentValue,pool:m},a.memoizedState={baseLanes:u,cachePool:m},i!==null&&Ef(a,null),cg(),tw(a),i!==null&&Tc(i,a,h,!0),null}function Vf(i,a){var u=a.ref;if(u===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(s(284));(i===null||i.ref!==u)&&(a.flags|=4194816)}}function Ng(i,a,u,h,m){return ko(a),u=hg(i,a,u,h,void 0,m),h=dg(),i!==null&&!Fn?(pg(i,a,m),Yr(i,a,m)):(It&&h&&Kp(a),a.flags|=1,$n(i,a,u,m),a.child)}function mw(i,a,u,h,m,w){return ko(a),a.updateQueue=null,u=g0(a,h,u,m),p0(i),h=dg(),i!==null&&!Fn?(pg(i,a,w),Yr(i,a,w)):(It&&h&&Kp(a),a.flags|=1,$n(i,a,u,w),a.child)}function yw(i,a,u,h,m){if(ko(a),a.stateNode===null){var w=Ma,C=u.contextType;typeof C=="object"&&C!==null&&(w=Zn(C)),w=new u(h,w),a.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Cg,a.stateNode=w,w._reactInternals=a,w=a.stateNode,w.props=h,w.state=a.memoizedState,w.refs={},ig(a),C=u.contextType,w.context=typeof C=="object"&&C!==null?Zn(C):Ma,w.state=a.memoizedState,C=u.getDerivedStateFromProps,typeof C=="function"&&(Rg(a,u,C,h),w.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(C=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),C!==w.state&&Cg.enqueueReplaceState(w,w.state,null),Nc(a,h,w,m),Mc(),w.state=a.memoizedState),typeof w.componentDidMount=="function"&&(a.flags|=4194308),h=!0}else if(i===null){w=a.stateNode;var B=a.memoizedProps,X=Bo(u,B);w.props=X;var de=w.context,Re=u.contextType;C=Ma,typeof Re=="object"&&Re!==null&&(C=Zn(Re));var Ie=u.getDerivedStateFromProps;Re=typeof Ie=="function"||typeof w.getSnapshotBeforeUpdate=="function",B=a.pendingProps!==B,Re||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(B||de!==C)&&sw(a,w,h,C),vi=!1;var me=a.memoizedState;w.state=me,Nc(a,h,w,m),Mc(),de=a.memoizedState,B||me!==de||vi?(typeof Ie=="function"&&(Rg(a,u,Ie,h),de=a.memoizedState),(X=vi||nw(a,u,X,h,me,de,C))?(Re||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(a.flags|=4194308)):(typeof w.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=h,a.memoizedState=de),w.props=h,w.state=de,w.context=C,h=X):(typeof w.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{w=a.stateNode,og(i,a),C=a.memoizedProps,Re=Bo(u,C),w.props=Re,Ie=a.pendingProps,me=w.context,de=u.contextType,X=Ma,typeof de=="object"&&de!==null&&(X=Zn(de)),B=u.getDerivedStateFromProps,(de=typeof B=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(C!==Ie||me!==X)&&sw(a,w,h,X),vi=!1,me=a.memoizedState,w.state=me,Nc(a,h,w,m),Mc();var _e=a.memoizedState;C!==Ie||me!==_e||vi||i!==null&&i.dependencies!==null&&Tf(i.dependencies)?(typeof B=="function"&&(Rg(a,u,B,h),_e=a.memoizedState),(Re=vi||nw(a,u,Re,h,me,_e,X)||i!==null&&i.dependencies!==null&&Tf(i.dependencies))?(de||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(h,_e,X),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(h,_e,X)),typeof w.componentDidUpdate=="function"&&(a.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof w.componentDidUpdate!="function"||C===i.memoizedProps&&me===i.memoizedState||(a.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&me===i.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=_e),w.props=h,w.state=_e,w.context=X,h=Re):(typeof w.componentDidUpdate!="function"||C===i.memoizedProps&&me===i.memoizedState||(a.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||C===i.memoizedProps&&me===i.memoizedState||(a.flags|=1024),h=!1)}return w=h,Vf(i,a),h=(a.flags&128)!==0,w||h?(w=a.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:w.render(),a.flags|=1,i!==null&&h?(a.child=ja(a,i.child,null,m),a.child=ja(a,null,u,m)):$n(i,a,u,m),a.memoizedState=w.state,i=a.child):i=Yr(i,a,m),i}function _w(i,a,u,h){return wc(),a.flags|=256,$n(i,a,u,h),a.child}var Og={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ig(i){return{baseLanes:i,cachePool:i0()}}function kg(i,a,u){return i=i!==null?i.childLanes&~u:0,a&&(i|=Hs),i}function bw(i,a,u){var h=a.pendingProps,m=!1,w=(a.flags&128)!==0,C;if((C=w)||(C=i!==null&&i.memoizedState===null?!1:(Cn.current&2)!==0),C&&(m=!0,a.flags&=-129),C=(a.flags&32)!==0,a.flags&=-33,i===null){if(It){if(m?Si(a):Ei(),It){var B=ln,X;if(X=B){e:{for(X=B,B=br;X.nodeType!==8;){if(!B){B=null;break e}if(X=ir(X.nextSibling),X===null){B=null;break e}}B=X}B!==null?(a.memoizedState={dehydrated:B,treeContext:Co!==null?{id:Vr,overflow:$r}:null,retryLane:536870912,hydrationErrors:null},X=Es(18,null,null,0),X.stateNode=B,X.return=a,a.child=X,os=a,ln=null,X=!0):X=!1}X||Oo(a)}if(B=a.memoizedState,B!==null&&(B=B.dehydrated,B!==null))return mm(B)?a.lanes=32:a.lanes=536870912,null;qr(a)}return B=h.children,h=h.fallback,m?(Ei(),m=a.mode,B=$f({mode:"hidden",children:B},m),h=Ro(h,m,u,null),B.return=a,h.return=a,B.sibling=h,a.child=B,m=a.child,m.memoizedState=Ig(u),m.childLanes=kg(i,C,u),a.memoizedState=Og,h):(Si(a),Pg(a,B))}if(X=i.memoizedState,X!==null&&(B=X.dehydrated,B!==null)){if(w)a.flags&256?(Si(a),a.flags&=-257,a=Dg(i,a,u)):a.memoizedState!==null?(Ei(),a.child=i.child,a.flags|=128,a=null):(Ei(),m=h.fallback,B=a.mode,h=$f({mode:"visible",children:h.children},B),m=Ro(m,B,u,null),m.flags|=2,h.return=a,m.return=a,h.sibling=m,a.child=h,ja(a,i.child,null,u),h=a.child,h.memoizedState=Ig(u),h.childLanes=kg(i,C,u),a.memoizedState=Og,a=m);else if(Si(a),mm(B)){if(C=B.nextSibling&&B.nextSibling.dataset,C)var de=C.dgst;C=de,h=Error(s(419)),h.stack="",h.digest=C,xc({value:h,source:null,stack:null}),a=Dg(i,a,u)}else if(Fn||Tc(i,a,u,!1),C=(u&i.childLanes)!==0,Fn||C){if(C=Jt,C!==null&&(h=u&-u,h=(h&42)!==0?1:gi(h),h=(h&(C.suspendedLanes|u))!==0?0:h,h!==0&&h!==X.retryLane))throw X.retryLane=h,Ca(i,h),Ns(C,i,h),uw;B.data==="$?"||Jg(),a=Dg(i,a,u)}else B.data==="$?"?(a.flags|=192,a.child=i.child,a=null):(i=X.treeContext,ln=ir(B.nextSibling),os=a,It=!0,No=null,br=!1,i!==null&&(zs[Vs++]=Vr,zs[Vs++]=$r,zs[Vs++]=Co,Vr=i.id,$r=i.overflow,Co=a),a=Pg(a,h.children),a.flags|=4096);return a}return m?(Ei(),m=h.fallback,B=a.mode,X=i.child,de=X.sibling,h=zr(X,{mode:"hidden",children:h.children}),h.subtreeFlags=X.subtreeFlags&65011712,de!==null?m=zr(de,m):(m=Ro(m,B,u,null),m.flags|=2),m.return=a,h.return=a,h.sibling=m,a.child=h,h=m,m=a.child,B=i.child.memoizedState,B===null?B=Ig(u):(X=B.cachePool,X!==null?(de=Rn._currentValue,X=X.parent!==de?{parent:de,pool:de}:X):X=i0(),B={baseLanes:B.baseLanes|u,cachePool:X}),m.memoizedState=B,m.childLanes=kg(i,C,u),a.memoizedState=Og,h):(Si(a),u=i.child,i=u.sibling,u=zr(u,{mode:"visible",children:h.children}),u.return=a,u.sibling=null,i!==null&&(C=a.deletions,C===null?(a.deletions=[i],a.flags|=16):C.push(i)),a.child=u,a.memoizedState=null,u)}function Pg(i,a){return a=$f({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function $f(i,a){return i=Es(22,i,null,a),i.lanes=0,i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},i}function Dg(i,a,u){return ja(a,i.child,null,u),i=Pg(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function vw(i,a,u){i.lanes|=a;var h=i.alternate;h!==null&&(h.lanes|=a),Jp(i.return,a,u)}function Bg(i,a,u,h,m){var w=i.memoizedState;w===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:m}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=h,w.tail=u,w.tailMode=m)}function ww(i,a,u){var h=a.pendingProps,m=h.revealOrder,w=h.tail;if($n(i,a,h.children,u),h=Cn.current,(h&2)!==0)h=h&1|2,a.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&vw(i,u,a);else if(i.tag===19)vw(i,u,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}switch(he(Cn,h),m){case"forwards":for(u=a.child,m=null;u!==null;)i=u.alternate,i!==null&&jf(i)===null&&(m=u),u=u.sibling;u=m,u===null?(m=a.child,a.child=null):(m=u.sibling,u.sibling=null),Bg(a,!1,m,u,w);break;case"backwards":for(u=null,m=a.child,a.child=null;m!==null;){if(i=m.alternate,i!==null&&jf(i)===null){a.child=m;break}i=m.sibling,m.sibling=u,u=m,m=i}Bg(a,!0,u,null,w);break;case"together":Bg(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Yr(i,a,u){if(i!==null&&(a.dependencies=i.dependencies),Ni|=a.lanes,(u&a.childLanes)===0)if(i!==null){if(Tc(i,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(s(153));if(a.child!==null){for(i=a.child,u=zr(i,i.pendingProps),a.child=u,u.return=a;i.sibling!==null;)i=i.sibling,u=u.sibling=zr(i,i.pendingProps),u.return=a;u.sibling=null}return a.child}function Ug(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&Tf(i)))}function HM(i,a,u){switch(a.tag){case 3:Ue(a,a.stateNode.containerInfo),bi(a,Rn,i.memoizedState.cache),wc();break;case 27:case 5:Ge(a);break;case 4:Ue(a,a.stateNode.containerInfo);break;case 10:bi(a,a.type,a.memoizedProps.value);break;case 13:var h=a.memoizedState;if(h!==null)return h.dehydrated!==null?(Si(a),a.flags|=128,null):(u&a.child.childLanes)!==0?bw(i,a,u):(Si(a),i=Yr(i,a,u),i!==null?i.sibling:null);Si(a);break;case 19:var m=(i.flags&128)!==0;if(h=(u&a.childLanes)!==0,h||(Tc(i,a,u,!1),h=(u&a.childLanes)!==0),m){if(h)return ww(i,a,u);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),he(Cn,Cn.current),h)break;return null;case 22:case 23:return a.lanes=0,pw(i,a,u);case 24:bi(a,Rn,i.memoizedState.cache)}return Yr(i,a,u)}function xw(i,a,u){if(i!==null)if(i.memoizedProps!==a.pendingProps)Fn=!0;else{if(!Ug(i,u)&&(a.flags&128)===0)return Fn=!1,HM(i,a,u);Fn=(i.flags&131072)!==0}else Fn=!1,It&&(a.flags&1048576)!==0&&Gv(a,xf,a.index);switch(a.lanes=0,a.tag){case 16:e:{i=a.pendingProps;var h=a.elementType,m=h._init;if(h=m(h._payload),a.type=h,typeof h=="function")Xp(h)?(i=Bo(h,i),a.tag=1,a=yw(null,a,h,i,u)):(a.tag=0,a=Ng(null,a,h,i,u));else{if(h!=null){if(m=h.$$typeof,m===V){a.tag=11,a=fw(null,a,h,i,u);break e}else if(m===ee){a.tag=14,a=hw(null,a,h,i,u);break e}}throw a=be(h)||h,Error(s(306,a,""))}}return a;case 0:return Ng(i,a,a.type,a.pendingProps,u);case 1:return h=a.type,m=Bo(h,a.pendingProps),yw(i,a,h,m,u);case 3:e:{if(Ue(a,a.stateNode.containerInfo),i===null)throw Error(s(387));h=a.pendingProps;var w=a.memoizedState;m=w.element,og(i,a),Nc(a,h,null,u);var C=a.memoizedState;if(h=C.cache,bi(a,Rn,h),h!==w.cache&&eg(a,[Rn],u,!0),Mc(),h=C.element,w.isDehydrated)if(w={element:h,isDehydrated:!1,cache:C.cache},a.updateQueue.baseState=w,a.memoizedState=w,a.flags&256){a=_w(i,a,h,u);break e}else if(h!==m){m=js(Error(s(424)),a),xc(m),a=_w(i,a,h,u);break e}else{switch(i=a.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(ln=ir(i.firstChild),os=a,It=!0,No=null,br=!0,u=ew(a,null,h,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(wc(),h===m){a=Yr(i,a,u);break e}$n(i,a,h,u)}a=a.child}return a;case 26:return Vf(i,a),i===null?(u=Ax(a.type,null,a.pendingProps,null))?a.memoizedState=u:It||(u=a.type,i=a.pendingProps,h=sh(Pe.current).createElement(u),h[b]=a,h[S]=i,Wn(h,u,i),Y(h),a.stateNode=h):a.memoizedState=Ax(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return Ge(a),i===null&&It&&(h=a.stateNode=Tx(a.type,a.pendingProps,Pe.current),os=a,br=!0,m=ln,Pi(a.type)?(ym=m,ln=ir(h.firstChild)):ln=m),$n(i,a,a.pendingProps.children,u),Vf(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&It&&((m=h=ln)&&(h=_N(h,a.type,a.pendingProps,br),h!==null?(a.stateNode=h,os=a,ln=ir(h.firstChild),br=!1,m=!0):m=!1),m||Oo(a)),Ge(a),m=a.type,w=a.pendingProps,C=i!==null?i.memoizedProps:null,h=w.children,dm(m,w)?h=null:C!==null&&dm(m,C)&&(a.flags|=32),a.memoizedState!==null&&(m=hg(i,a,BM,null,null,u),Gc._currentValue=m),Vf(i,a),$n(i,a,h,u),a.child;case 6:return i===null&&It&&((i=u=ln)&&(u=bN(u,a.pendingProps,br),u!==null?(a.stateNode=u,os=a,ln=null,i=!0):i=!1),i||Oo(a)),null;case 13:return bw(i,a,u);case 4:return Ue(a,a.stateNode.containerInfo),h=a.pendingProps,i===null?a.child=ja(a,null,h,u):$n(i,a,h,u),a.child;case 11:return fw(i,a,a.type,a.pendingProps,u);case 7:return $n(i,a,a.pendingProps,u),a.child;case 8:return $n(i,a,a.pendingProps.children,u),a.child;case 12:return $n(i,a,a.pendingProps.children,u),a.child;case 10:return h=a.pendingProps,bi(a,a.type,h.value),$n(i,a,h.children,u),a.child;case 9:return m=a.type._context,h=a.pendingProps.children,ko(a),m=Zn(m),h=h(m),a.flags|=1,$n(i,a,h,u),a.child;case 14:return hw(i,a,a.type,a.pendingProps,u);case 15:return dw(i,a,a.type,a.pendingProps,u);case 19:return ww(i,a,u);case 31:return h=a.pendingProps,u=a.mode,h={mode:h.mode,children:h.children},i===null?(u=$f(h,u),u.ref=a.ref,a.child=u,u.return=a,a=u):(u=zr(i.child,h),u.ref=a.ref,a.child=u,u.return=a,a=u),a;case 22:return pw(i,a,u);case 24:return ko(a),h=Zn(Rn),i===null?(m=sg(),m===null&&(m=Jt,w=tg(),m.pooledCache=w,w.refCount++,w!==null&&(m.pooledCacheLanes|=u),m=w),a.memoizedState={parent:h,cache:m},ig(a),bi(a,Rn,m)):((i.lanes&u)!==0&&(og(i,a),Nc(a,null,null,u),Mc()),m=i.memoizedState,w=a.memoizedState,m.parent!==h?(m={parent:h,cache:h},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),bi(a,Rn,h)):(h=w.cache,bi(a,Rn,h),h!==m.cache&&eg(a,[Rn],u,!0))),$n(i,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(s(156,a.tag))}function Kr(i){i.flags|=4}function Tw(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Ox(a)){if(a=$s.current,a!==null&&((At&4194048)===At?vr!==null:(At&62914560)!==At&&(At&536870912)===0||a!==vr))throw Rc=rg,o0;i.flags|=8192}}function Hf(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?lc():536870912,i.lanes|=a,$a|=a)}function Uc(i,a){if(!It)switch(i.tailMode){case"hidden":a=i.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function on(i){var a=i.alternate!==null&&i.alternate.child===i.child,u=0,h=0;if(a)for(var m=i.child;m!==null;)u|=m.lanes|m.childLanes,h|=m.subtreeFlags&65011712,h|=m.flags&65011712,m.return=i,m=m.sibling;else for(m=i.child;m!==null;)u|=m.lanes|m.childLanes,h|=m.subtreeFlags,h|=m.flags,m.return=i,m=m.sibling;return i.subtreeFlags|=h,i.childLanes=u,a}function WM(i,a,u){var h=a.pendingProps;switch(Zp(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return on(a),null;case 1:return on(a),null;case 3:return u=a.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),a.memoizedState.cache!==h&&(a.flags|=2048),Wr(Rn),et(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(vc(a)?Kr(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,t0())),on(a),null;case 26:return u=a.memoizedState,i===null?(Kr(a),u!==null?(on(a),Tw(a,u)):(on(a),a.flags&=-16777217)):u?u!==i.memoizedState?(Kr(a),on(a),Tw(a,u)):(on(a),a.flags&=-16777217):(i.memoizedProps!==h&&Kr(a),on(a),a.flags&=-16777217),null;case 27:ot(a),u=Pe.current;var m=a.type;if(i!==null&&a.stateNode!=null)i.memoizedProps!==h&&Kr(a);else{if(!h){if(a.stateNode===null)throw Error(s(166));return on(a),null}i=Ce.current,vc(a)?Jv(a):(i=Tx(m,h,u),a.stateNode=i,Kr(a))}return on(a),null;case 5:if(ot(a),u=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==h&&Kr(a);else{if(!h){if(a.stateNode===null)throw Error(s(166));return on(a),null}if(i=Ce.current,vc(a))Jv(a);else{switch(m=sh(Pe.current),i){case 1:i=m.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:i=m.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":i=m.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":i=m.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":i=m.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof h.is=="string"?m.createElement("select",{is:h.is}):m.createElement("select"),h.multiple?i.multiple=!0:h.size&&(i.size=h.size);break;default:i=typeof h.is=="string"?m.createElement(u,{is:h.is}):m.createElement(u)}}i[b]=a,i[S]=h;e:for(m=a.child;m!==null;){if(m.tag===5||m.tag===6)i.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===a)break e;for(;m.sibling===null;){if(m.return===null||m.return===a)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}a.stateNode=i;e:switch(Wn(i,u,h),u){case"button":case"input":case"select":case"textarea":i=!!h.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Kr(a)}}return on(a),a.flags&=-16777217,null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==h&&Kr(a);else{if(typeof h!="string"&&a.stateNode===null)throw Error(s(166));if(i=Pe.current,vc(a)){if(i=a.stateNode,u=a.memoizedProps,h=null,m=os,m!==null)switch(m.tag){case 27:case 5:h=m.memoizedProps}i[b]=a,i=!!(i.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||mx(i.nodeValue,u)),i||Oo(a)}else i=sh(i).createTextNode(h),i[b]=a,a.stateNode=i}return on(a),null;case 13:if(h=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(m=vc(a),h!==null&&h.dehydrated!==null){if(i===null){if(!m)throw Error(s(318));if(m=a.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(s(317));m[b]=a}else wc(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;on(a),m=!1}else m=t0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(qr(a),a):(qr(a),null)}if(qr(a),(a.flags&128)!==0)return a.lanes=u,a;if(u=h!==null,i=i!==null&&i.memoizedState!==null,u){h=a.child,m=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(m=h.alternate.memoizedState.cachePool.pool);var w=null;h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(w=h.memoizedState.cachePool.pool),w!==m&&(h.flags|=2048)}return u!==i&&u&&(a.child.flags|=8192),Hf(a,a.updateQueue),on(a),null;case 4:return et(),i===null&&lm(a.stateNode.containerInfo),on(a),null;case 10:return Wr(a.type),on(a),null;case 19:if(Se(Cn),m=a.memoizedState,m===null)return on(a),null;if(h=(a.flags&128)!==0,w=m.rendering,w===null)if(h)Uc(m,!1);else{if(cn!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(w=jf(i),w!==null){for(a.flags|=128,Uc(m,!1),i=w.updateQueue,a.updateQueue=i,Hf(a,i),a.subtreeFlags=0,i=u,u=a.child;u!==null;)Qv(u,i),u=u.sibling;return he(Cn,Cn.current&1|2),a.child}i=i.sibling}m.tail!==null&&an()>qf&&(a.flags|=128,h=!0,Uc(m,!1),a.lanes=4194304)}else{if(!h)if(i=jf(w),i!==null){if(a.flags|=128,h=!0,i=i.updateQueue,a.updateQueue=i,Hf(a,i),Uc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!w.alternate&&!It)return on(a),null}else 2*an()-m.renderingStartTime>qf&&u!==536870912&&(a.flags|=128,h=!0,Uc(m,!1),a.lanes=4194304);m.isBackwards?(w.sibling=a.child,a.child=w):(i=m.last,i!==null?i.sibling=w:a.child=w,m.last=w)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=an(),a.sibling=null,i=Cn.current,he(Cn,h?i&1|2:i&1),a):(on(a),null);case 22:case 23:return qr(a),ug(),h=a.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(a.flags|=8192):h&&(a.flags|=8192),h?(u&536870912)!==0&&(a.flags&128)===0&&(on(a),a.subtreeFlags&6&&(a.flags|=8192)):on(a),u=a.updateQueue,u!==null&&Hf(a,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==u&&(a.flags|=2048),i!==null&&Se(Po),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Wr(Rn),on(a),null;case 25:return null;case 30:return null}throw Error(s(156,a.tag))}function XM(i,a){switch(Zp(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return Wr(Rn),et(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return ot(a),null;case 13:if(qr(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(s(340));wc()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return Se(Cn),null;case 4:return et(),null;case 10:return Wr(a.type),null;case 22:case 23:return qr(a),ug(),i!==null&&Se(Po),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return Wr(Rn),null;case 25:return null;default:return null}}function Sw(i,a){switch(Zp(a),a.tag){case 3:Wr(Rn),et();break;case 26:case 27:case 5:ot(a);break;case 4:et();break;case 13:qr(a);break;case 19:Se(Cn);break;case 10:Wr(a.type);break;case 22:case 23:qr(a),ug(),i!==null&&Se(Po);break;case 24:Wr(Rn)}}function Fc(i,a){try{var u=a.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var m=h.next;u=m;do{if((u.tag&i)===i){h=void 0;var w=u.create,C=u.inst;h=w(),C.destroy=h}u=u.next}while(u!==m)}}catch(B){Zt(a,a.return,B)}}function Ai(i,a,u){try{var h=a.updateQueue,m=h!==null?h.lastEffect:null;if(m!==null){var w=m.next;h=w;do{if((h.tag&i)===i){var C=h.inst,B=C.destroy;if(B!==void 0){C.destroy=void 0,m=a;var X=u,de=B;try{de()}catch(Re){Zt(m,X,Re)}}}h=h.next}while(h!==w)}}catch(Re){Zt(a,a.return,Re)}}function Ew(i){var a=i.updateQueue;if(a!==null){var u=i.stateNode;try{h0(a,u)}catch(h){Zt(i,i.return,h)}}}function Aw(i,a,u){u.props=Bo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(h){Zt(i,a,h)}}function jc(i,a){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof u=="function"?i.refCleanup=u(h):u.current=h}}catch(m){Zt(i,a,m)}}function wr(i,a){var u=i.ref,h=i.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(m){Zt(i,a,m)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(m){Zt(i,a,m)}else u.current=null}function Rw(i){var a=i.type,u=i.memoizedProps,h=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(m){Zt(i,i.return,m)}}function Fg(i,a,u){try{var h=i.stateNode;dN(h,i.type,u,a),h[S]=a}catch(m){Zt(i,i.return,m)}}function Cw(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Pi(i.type)||i.tag===4}function jg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Cw(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Pi(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Lg(i,a,u){var h=i.tag;if(h===5||h===6)i=i.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(i),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=nh));else if(h!==4&&(h===27&&Pi(i.type)&&(u=i.stateNode,a=null),i=i.child,i!==null))for(Lg(i,a,u),i=i.sibling;i!==null;)Lg(i,a,u),i=i.sibling}function Wf(i,a,u){var h=i.tag;if(h===5||h===6)i=i.stateNode,a?u.insertBefore(i,a):u.appendChild(i);else if(h!==4&&(h===27&&Pi(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Wf(i,a,u),i=i.sibling;i!==null;)Wf(i,a,u),i=i.sibling}function Mw(i){var a=i.stateNode,u=i.memoizedProps;try{for(var h=i.type,m=a.attributes;m.length;)a.removeAttributeNode(m[0]);Wn(a,h,u),a[b]=i,a[S]=u}catch(w){Zt(i,i.return,w)}}var Zr=!1,mn=!1,zg=!1,Nw=typeof WeakSet=="function"?WeakSet:Set,jn=null;function qM(i,a){if(i=i.containerInfo,fm=ch,i=zv(i),jp(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var m=h.anchorOffset,w=h.focusNode;h=h.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var C=0,B=-1,X=-1,de=0,Re=0,Ie=i,me=null;t:for(;;){for(var _e;Ie!==u||m!==0&&Ie.nodeType!==3||(B=C+m),Ie!==w||h!==0&&Ie.nodeType!==3||(X=C+h),Ie.nodeType===3&&(C+=Ie.nodeValue.length),(_e=Ie.firstChild)!==null;)me=Ie,Ie=_e;for(;;){if(Ie===i)break t;if(me===u&&++de===m&&(B=C),me===w&&++Re===h&&(X=C),(_e=Ie.nextSibling)!==null)break;Ie=me,me=Ie.parentNode}Ie=_e}u=B===-1||X===-1?null:{start:B,end:X}}else u=null}u=u||{start:0,end:0}}else u=null;for(hm={focusedElem:i,selectionRange:u},ch=!1,jn=a;jn!==null;)if(a=jn,i=a.child,(a.subtreeFlags&1024)!==0&&i!==null)i.return=a,jn=i;else for(;jn!==null;){switch(a=jn,w=a.alternate,i=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,u=a,m=w.memoizedProps,w=w.memoizedState,h=u.stateNode;try{var ut=Bo(u.type,m,u.elementType===u.type);i=h.getSnapshotBeforeUpdate(ut,w),h.__reactInternalSnapshotBeforeUpdate=i}catch(it){Zt(u,u.return,it)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,u=i.nodeType,u===9)gm(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":gm(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(s(163))}if(i=a.sibling,i!==null){i.return=a.return,jn=i;break}jn=a.return}}function Ow(i,a,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:Ri(i,u),h&4&&Fc(5,u);break;case 1:if(Ri(i,u),h&4)if(i=u.stateNode,a===null)try{i.componentDidMount()}catch(C){Zt(u,u.return,C)}else{var m=Bo(u.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(m,a,i.__reactInternalSnapshotBeforeUpdate)}catch(C){Zt(u,u.return,C)}}h&64&&Ew(u),h&512&&jc(u,u.return);break;case 3:if(Ri(i,u),h&64&&(i=u.updateQueue,i!==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{h0(i,a)}catch(C){Zt(u,u.return,C)}}break;case 27:a===null&&h&4&&Mw(u);case 26:case 5:Ri(i,u),a===null&&h&4&&Rw(u),h&512&&jc(u,u.return);break;case 12:Ri(i,u);break;case 13:Ri(i,u),h&4&&Pw(i,u),h&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=nN.bind(null,u),vN(i,u))));break;case 22:if(h=u.memoizedState!==null||Zr,!h){a=a!==null&&a.memoizedState!==null||mn,m=Zr;var w=mn;Zr=h,(mn=a)&&!w?Ci(i,u,(u.subtreeFlags&8772)!==0):Ri(i,u),Zr=m,mn=w}break;case 30:break;default:Ri(i,u)}}function Iw(i){var a=i.alternate;a!==null&&(i.alternate=null,Iw(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&we(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var nn=null,_s=!1;function Qr(i,a,u){for(u=u.child;u!==null;)kw(i,a,u),u=u.sibling}function kw(i,a,u){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(pi,u)}catch{}switch(u.tag){case 26:mn||wr(u,a),Qr(i,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:mn||wr(u,a);var h=nn,m=_s;Pi(u.type)&&(nn=u.stateNode,_s=!1),Qr(i,a,u),Yc(u.stateNode),nn=h,_s=m;break;case 5:mn||wr(u,a);case 6:if(h=nn,m=_s,nn=null,Qr(i,a,u),nn=h,_s=m,nn!==null)if(_s)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(u.stateNode)}catch(w){Zt(u,a,w)}else try{nn.removeChild(u.stateNode)}catch(w){Zt(u,a,w)}break;case 18:nn!==null&&(_s?(i=nn,wx(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),nu(i)):wx(nn,u.stateNode));break;case 4:h=nn,m=_s,nn=u.stateNode.containerInfo,_s=!0,Qr(i,a,u),nn=h,_s=m;break;case 0:case 11:case 14:case 15:mn||Ai(2,u,a),mn||Ai(4,u,a),Qr(i,a,u);break;case 1:mn||(wr(u,a),h=u.stateNode,typeof h.componentWillUnmount=="function"&&Aw(u,a,h)),Qr(i,a,u);break;case 21:Qr(i,a,u);break;case 22:mn=(h=mn)||u.memoizedState!==null,Qr(i,a,u),mn=h;break;default:Qr(i,a,u)}}function Pw(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{nu(i)}catch(u){Zt(a,a.return,u)}}function YM(i){switch(i.tag){case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new Nw),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new Nw),a;default:throw Error(s(435,i.tag))}}function Vg(i,a){var u=YM(i);a.forEach(function(h){var m=sN.bind(null,i,h);u.has(h)||(u.add(h),h.then(m,m))})}function As(i,a){var u=a.deletions;if(u!==null)for(var h=0;h<u.length;h++){var m=u[h],w=i,C=a,B=C;e:for(;B!==null;){switch(B.tag){case 27:if(Pi(B.type)){nn=B.stateNode,_s=!1;break e}break;case 5:nn=B.stateNode,_s=!1;break e;case 3:case 4:nn=B.stateNode.containerInfo,_s=!0;break e}B=B.return}if(nn===null)throw Error(s(160));kw(w,C,m),nn=null,_s=!1,w=m.alternate,w!==null&&(w.return=null),m.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)Dw(a,i),a=a.sibling}var rr=null;function Dw(i,a){var u=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:As(a,i),Rs(i),h&4&&(Ai(3,i,i.return),Fc(3,i),Ai(5,i,i.return));break;case 1:As(a,i),Rs(i),h&512&&(mn||u===null||wr(u,u.return)),h&64&&Zr&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var m=rr;if(As(a,i),Rs(i),h&512&&(mn||u===null||wr(u,u.return)),h&4){var w=u!==null?u.memoizedState:null;if(h=i.memoizedState,u===null)if(h===null)if(i.stateNode===null){e:{h=i.type,u=i.memoizedProps,m=m.ownerDocument||m;t:switch(h){case"title":w=m.getElementsByTagName("title")[0],(!w||w[q]||w[b]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=m.createElement(h),m.head.insertBefore(w,m.querySelector("head > title"))),Wn(w,h,u),w[b]=i,Y(w),h=w;break e;case"link":var C=Mx("link","href",m).get(h+(u.href||""));if(C){for(var B=0;B<C.length;B++)if(w=C[B],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){C.splice(B,1);break t}}w=m.createElement(h),Wn(w,h,u),m.head.appendChild(w);break;case"meta":if(C=Mx("meta","content",m).get(h+(u.content||""))){for(B=0;B<C.length;B++)if(w=C[B],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){C.splice(B,1);break t}}w=m.createElement(h),Wn(w,h,u),m.head.appendChild(w);break;default:throw Error(s(468,h))}w[b]=i,Y(w),h=w}i.stateNode=h}else Nx(m,i.type,i.stateNode);else i.stateNode=Cx(m,h,i.memoizedProps);else w!==h?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,h===null?Nx(m,i.type,i.stateNode):Cx(m,h,i.memoizedProps)):h===null&&i.stateNode!==null&&Fg(i,i.memoizedProps,u.memoizedProps)}break;case 27:As(a,i),Rs(i),h&512&&(mn||u===null||wr(u,u.return)),u!==null&&h&4&&Fg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(As(a,i),Rs(i),h&512&&(mn||u===null||wr(u,u.return)),i.flags&32){m=i.stateNode;try{yi(m,"")}catch(_e){Zt(i,i.return,_e)}}h&4&&i.stateNode!=null&&(m=i.memoizedProps,Fg(i,m,u!==null?u.memoizedProps:m)),h&1024&&(zg=!0);break;case 6:if(As(a,i),Rs(i),h&4){if(i.stateNode===null)throw Error(s(162));h=i.memoizedProps,u=i.stateNode;try{u.nodeValue=h}catch(_e){Zt(i,i.return,_e)}}break;case 3:if(oh=null,m=rr,rr=rh(a.containerInfo),As(a,i),rr=m,Rs(i),h&4&&u!==null&&u.memoizedState.isDehydrated)try{nu(a.containerInfo)}catch(_e){Zt(i,i.return,_e)}zg&&(zg=!1,Bw(i));break;case 4:h=rr,rr=rh(i.stateNode.containerInfo),As(a,i),Rs(i),rr=h;break;case 12:As(a,i),Rs(i);break;case 13:As(a,i),Rs(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Yg=an()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Vg(i,h)));break;case 22:m=i.memoizedState!==null;var X=u!==null&&u.memoizedState!==null,de=Zr,Re=mn;if(Zr=de||m,mn=Re||X,As(a,i),mn=Re,Zr=de,Rs(i),h&8192)e:for(a=i.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(u===null||X||Zr||mn||Uo(i)),u=null,a=i;;){if(a.tag===5||a.tag===26){if(u===null){X=u=a;try{if(w=X.stateNode,m)C=w.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{B=X.stateNode;var Ie=X.memoizedProps.style,me=Ie!=null&&Ie.hasOwnProperty("display")?Ie.display:null;B.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(_e){Zt(X,X.return,_e)}}}else if(a.tag===6){if(u===null){X=a;try{X.stateNode.nodeValue=m?"":X.memoizedProps}catch(_e){Zt(X,X.return,_e)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}h&4&&(h=i.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,Vg(i,u))));break;case 19:As(a,i),Rs(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Vg(i,h)));break;case 30:break;case 21:break;default:As(a,i),Rs(i)}}function Rs(i){var a=i.flags;if(a&2){try{for(var u,h=i.return;h!==null;){if(Cw(h)){u=h;break}h=h.return}if(u==null)throw Error(s(160));switch(u.tag){case 27:var m=u.stateNode,w=jg(i);Wf(i,w,m);break;case 5:var C=u.stateNode;u.flags&32&&(yi(C,""),u.flags&=-33);var B=jg(i);Wf(i,B,C);break;case 3:case 4:var X=u.stateNode.containerInfo,de=jg(i);Lg(i,de,X);break;default:throw Error(s(161))}}catch(Re){Zt(i,i.return,Re)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function Bw(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;Bw(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function Ri(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Ow(i,a.alternate,a),a=a.sibling}function Uo(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:Ai(4,a,a.return),Uo(a);break;case 1:wr(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&Aw(a,a.return,u),Uo(a);break;case 27:Yc(a.stateNode);case 26:case 5:wr(a,a.return),Uo(a);break;case 22:a.memoizedState===null&&Uo(a);break;case 30:Uo(a);break;default:Uo(a)}i=i.sibling}}function Ci(i,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var h=a.alternate,m=i,w=a,C=w.flags;switch(w.tag){case 0:case 11:case 15:Ci(m,w,u),Fc(4,w);break;case 1:if(Ci(m,w,u),h=w,m=h.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(de){Zt(h,h.return,de)}if(h=w,m=h.updateQueue,m!==null){var B=h.stateNode;try{var X=m.shared.hiddenCallbacks;if(X!==null)for(m.shared.hiddenCallbacks=null,m=0;m<X.length;m++)f0(X[m],B)}catch(de){Zt(h,h.return,de)}}u&&C&64&&Ew(w),jc(w,w.return);break;case 27:Mw(w);case 26:case 5:Ci(m,w,u),u&&h===null&&C&4&&Rw(w),jc(w,w.return);break;case 12:Ci(m,w,u);break;case 13:Ci(m,w,u),u&&C&4&&Pw(m,w);break;case 22:w.memoizedState===null&&Ci(m,w,u),jc(w,w.return);break;case 30:break;default:Ci(m,w,u)}a=a.sibling}}function $g(i,a){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&Sc(u))}function Hg(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Sc(i))}function xr(i,a,u,h){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Uw(i,a,u,h),a=a.sibling}function Uw(i,a,u,h){var m=a.flags;switch(a.tag){case 0:case 11:case 15:xr(i,a,u,h),m&2048&&Fc(9,a);break;case 1:xr(i,a,u,h);break;case 3:xr(i,a,u,h),m&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Sc(i)));break;case 12:if(m&2048){xr(i,a,u,h),i=a.stateNode;try{var w=a.memoizedProps,C=w.id,B=w.onPostCommit;typeof B=="function"&&B(C,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(X){Zt(a,a.return,X)}}else xr(i,a,u,h);break;case 13:xr(i,a,u,h);break;case 23:break;case 22:w=a.stateNode,C=a.alternate,a.memoizedState!==null?w._visibility&2?xr(i,a,u,h):Lc(i,a):w._visibility&2?xr(i,a,u,h):(w._visibility|=2,La(i,a,u,h,(a.subtreeFlags&10256)!==0)),m&2048&&$g(C,a);break;case 24:xr(i,a,u,h),m&2048&&Hg(a.alternate,a);break;default:xr(i,a,u,h)}}function La(i,a,u,h,m){for(m=m&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var w=i,C=a,B=u,X=h,de=C.flags;switch(C.tag){case 0:case 11:case 15:La(w,C,B,X,m),Fc(8,C);break;case 23:break;case 22:var Re=C.stateNode;C.memoizedState!==null?Re._visibility&2?La(w,C,B,X,m):Lc(w,C):(Re._visibility|=2,La(w,C,B,X,m)),m&&de&2048&&$g(C.alternate,C);break;case 24:La(w,C,B,X,m),m&&de&2048&&Hg(C.alternate,C);break;default:La(w,C,B,X,m)}a=a.sibling}}function Lc(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=i,h=a,m=h.flags;switch(h.tag){case 22:Lc(u,h),m&2048&&$g(h.alternate,h);break;case 24:Lc(u,h),m&2048&&Hg(h.alternate,h);break;default:Lc(u,h)}a=a.sibling}}var zc=8192;function za(i){if(i.subtreeFlags&zc)for(i=i.child;i!==null;)Fw(i),i=i.sibling}function Fw(i){switch(i.tag){case 26:za(i),i.flags&zc&&i.memoizedState!==null&&kN(rr,i.memoizedState,i.memoizedProps);break;case 5:za(i);break;case 3:case 4:var a=rr;rr=rh(i.stateNode.containerInfo),za(i),rr=a;break;case 22:i.memoizedState===null&&(a=i.alternate,a!==null&&a.memoizedState!==null?(a=zc,zc=16777216,za(i),zc=a):za(i));break;default:za(i)}}function jw(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function Vc(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];jn=h,zw(h,i)}jw(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Lw(i),i=i.sibling}function Lw(i){switch(i.tag){case 0:case 11:case 15:Vc(i),i.flags&2048&&Ai(9,i,i.return);break;case 3:Vc(i);break;case 12:Vc(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Xf(i)):Vc(i);break;default:Vc(i)}}function Xf(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var h=a[u];jn=h,zw(h,i)}jw(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:Ai(8,a,a.return),Xf(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Xf(a));break;default:Xf(a)}i=i.sibling}}function zw(i,a){for(;jn!==null;){var u=jn;switch(u.tag){case 0:case 11:case 15:Ai(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Sc(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,jn=h;else e:for(u=i;jn!==null;){h=jn;var m=h.sibling,w=h.return;if(Iw(h),h===u){jn=null;break e}if(m!==null){m.return=w,jn=m;break e}jn=w}}}var KM={getCacheForType:function(i){var a=Zn(Rn),u=a.data.get(i);return u===void 0&&(u=i(),a.data.set(i,u)),u}},ZM=typeof WeakMap=="function"?WeakMap:Map,jt=0,Jt=null,xt=null,At=0,Lt=0,Cs=null,Mi=!1,Va=!1,Wg=!1,Gr=0,cn=0,Ni=0,Fo=0,Xg=0,Hs=0,$a=0,$c=null,bs=null,qg=!1,Yg=0,qf=1/0,Yf=null,Oi=null,Hn=0,Ii=null,Ha=null,Wa=0,Kg=0,Zg=null,Vw=null,Hc=0,Qg=null;function Ms(){if((jt&2)!==0&&At!==0)return At&-At;if(G.T!==null){var i=Ia;return i!==0?i:rm()}return v()}function $w(){Hs===0&&(Hs=(At&536870912)===0||It?xo():536870912);var i=$s.current;return i!==null&&(i.flags|=32),Hs}function Ns(i,a,u){(i===Jt&&(Lt===2||Lt===9)||i.cancelPendingCommit!==null)&&(Xa(i,0),ki(i,At,Hs,!1)),tr(i,u),((jt&2)===0||i!==Jt)&&(i===Jt&&((jt&2)===0&&(Fo|=u),cn===4&&ki(i,At,Hs,!1)),Tr(i))}function Hw(i,a,u){if((jt&6)!==0)throw Error(s(327));var h=!u&&(a&124)===0&&(a&i.expiredLanes)===0||wo(i,a),m=h?JM(i,a):em(i,a,!0),w=h;do{if(m===0){Va&&!h&&ki(i,a,0,!1);break}else{if(u=i.current.alternate,w&&!QM(u)){m=em(i,a,!1),w=!1;continue}if(m===2){if(w=a,i.errorRecoveryDisabledLanes&w)var C=0;else C=i.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){a=C;e:{var B=i;m=$c;var X=B.current.memoizedState.isDehydrated;if(X&&(Xa(B,C).flags|=256),C=em(B,C,!1),C!==2){if(Wg&&!X){B.errorRecoveryDisabledLanes|=w,Fo|=w,m=4;break e}w=bs,bs=m,w!==null&&(bs===null?bs=w:bs.push.apply(bs,w))}m=C}if(w=!1,m!==2)continue}}if(m===1){Xa(i,0),ki(i,a,0,!0);break}e:{switch(h=i,w=m,w){case 0:case 1:throw Error(s(345));case 4:if((a&4194048)!==a)break;case 6:ki(h,a,Hs,!Mi);break e;case 2:bs=null;break;case 3:case 5:break;default:throw Error(s(329))}if((a&62914560)===a&&(m=Yg+300-an(),10<m)){if(ki(h,a,Hs,!Mi),va(h,0,!0)!==0)break e;h.timeoutHandle=bx(Ww.bind(null,h,u,bs,Yf,qg,a,Hs,Fo,$a,Mi,w,2,-0,0),m);break e}Ww(h,u,bs,Yf,qg,a,Hs,Fo,$a,Mi,w,0,-0,0)}}break}while(!0);Tr(i)}function Ww(i,a,u,h,m,w,C,B,X,de,Re,Ie,me,_e){if(i.timeoutHandle=-1,Ie=a.subtreeFlags,(Ie&8192||(Ie&16785408)===16785408)&&(Qc={stylesheets:null,count:0,unsuspend:IN},Fw(a),Ie=PN(),Ie!==null)){i.cancelPendingCommit=Ie(Gw.bind(null,i,a,w,u,h,m,C,B,X,Re,1,me,_e)),ki(i,w,C,!de);return}Gw(i,a,w,u,h,m,C,B,X)}function QM(i){for(var a=i;;){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 h=0;h<u.length;h++){var m=u[h],w=m.getSnapshot;m=m.value;try{if(!Ss(w(),m))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ki(i,a,u,h){a&=~Xg,a&=~Fo,i.suspendedLanes|=a,i.pingedLanes&=~a,h&&(i.warmLanes|=a),h=i.expirationTimes;for(var m=a;0<m;){var w=31-rs(m),C=1<<w;h[w]=-1,m&=~C}u!==0&&To(i,u,a)}function Kf(){return(jt&6)===0?(Wc(0),!1):!0}function Gg(){if(xt!==null){if(Lt===0)var i=xt.return;else i=xt,Hr=Io=null,gg(i),Fa=null,Dc=0,i=xt;for(;i!==null;)Sw(i.alternate,i),i=i.return;xt=null}}function Xa(i,a){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,gN(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),Gg(),Jt=i,xt=u=zr(i.current,null),At=a,Lt=0,Cs=null,Mi=!1,Va=wo(i,a),Wg=!1,$a=Hs=Xg=Fo=Ni=cn=0,bs=$c=null,qg=!1,(a&8)!==0&&(a|=a&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=a;0<h;){var m=31-rs(h),w=1<<m;a|=i[m],h&=~w}return Gr=a,yf(),u}function Xw(i,a){yt=null,G.H=Bf,a===Ac||a===Af?(a=c0(),Lt=3):a===o0?(a=c0(),Lt=4):Lt=a===uw?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Cs=a,xt===null&&(cn=1,zf(i,js(a,i.current)))}function qw(){var i=G.H;return G.H=Bf,i===null?Bf:i}function Yw(){var i=G.A;return G.A=KM,i}function Jg(){cn=4,Mi||(At&4194048)!==At&&$s.current!==null||(Va=!0),(Ni&134217727)===0&&(Fo&134217727)===0||Jt===null||ki(Jt,At,Hs,!1)}function em(i,a,u){var h=jt;jt|=2;var m=qw(),w=Yw();(Jt!==i||At!==a)&&(Yf=null,Xa(i,a)),a=!1;var C=cn;e:do try{if(Lt!==0&&xt!==null){var B=xt,X=Cs;switch(Lt){case 8:Gg(),C=6;break e;case 3:case 2:case 9:case 6:$s.current===null&&(a=!0);var de=Lt;if(Lt=0,Cs=null,qa(i,B,X,de),u&&Va){C=0;break e}break;default:de=Lt,Lt=0,Cs=null,qa(i,B,X,de)}}GM(),C=cn;break}catch(Re){Xw(i,Re)}while(!0);return a&&i.shellSuspendCounter++,Hr=Io=null,jt=h,G.H=m,G.A=w,xt===null&&(Jt=null,At=0,yf()),C}function GM(){for(;xt!==null;)Kw(xt)}function JM(i,a){var u=jt;jt|=2;var h=qw(),m=Yw();Jt!==i||At!==a?(Yf=null,qf=an()+500,Xa(i,a)):Va=wo(i,a);e:do try{if(Lt!==0&&xt!==null){a=xt;var w=Cs;t:switch(Lt){case 1:Lt=0,Cs=null,qa(i,a,w,1);break;case 2:case 9:if(a0(w)){Lt=0,Cs=null,Zw(a);break}a=function(){Lt!==2&&Lt!==9||Jt!==i||(Lt=7),Tr(i)},w.then(a,a);break e;case 3:Lt=7;break e;case 4:Lt=5;break e;case 7:a0(w)?(Lt=0,Cs=null,Zw(a)):(Lt=0,Cs=null,qa(i,a,w,7));break;case 5:var C=null;switch(xt.tag){case 26:C=xt.memoizedState;case 5:case 27:var B=xt;if(!C||Ox(C)){Lt=0,Cs=null;var X=B.sibling;if(X!==null)xt=X;else{var de=B.return;de!==null?(xt=de,Zf(de)):xt=null}break t}}Lt=0,Cs=null,qa(i,a,w,5);break;case 6:Lt=0,Cs=null,qa(i,a,w,6);break;case 8:Gg(),cn=6;break e;default:throw Error(s(462))}}eN();break}catch(Re){Xw(i,Re)}while(!0);return Hr=Io=null,G.H=h,G.A=m,jt=u,xt!==null?0:(Jt=null,At=0,yf(),cn)}function eN(){for(;xt!==null&&!Dn();)Kw(xt)}function Kw(i){var a=xw(i.alternate,i,Gr);i.memoizedProps=i.pendingProps,a===null?Zf(i):xt=a}function Zw(i){var a=i,u=a.alternate;switch(a.tag){case 15:case 0:a=mw(u,a,a.pendingProps,a.type,void 0,At);break;case 11:a=mw(u,a,a.pendingProps,a.type.render,a.ref,At);break;case 5:gg(a);default:Sw(u,a),a=xt=Qv(a,Gr),a=xw(u,a,Gr)}i.memoizedProps=i.pendingProps,a===null?Zf(i):xt=a}function qa(i,a,u,h){Hr=Io=null,gg(a),Fa=null,Dc=0;var m=a.return;try{if($M(i,m,a,u,At)){cn=1,zf(i,js(u,i.current)),xt=null;return}}catch(w){if(m!==null)throw xt=m,w;cn=1,zf(i,js(u,i.current)),xt=null;return}a.flags&32768?(It||h===1?i=!0:Va||(At&536870912)!==0?i=!1:(Mi=i=!0,(h===2||h===9||h===3||h===6)&&(h=$s.current,h!==null&&h.tag===13&&(h.flags|=16384))),Qw(a,i)):Zf(a)}function Zf(i){var a=i;do{if((a.flags&32768)!==0){Qw(a,Mi);return}i=a.return;var u=WM(a.alternate,a,Gr);if(u!==null){xt=u;return}if(a=a.sibling,a!==null){xt=a;return}xt=a=i}while(a!==null);cn===0&&(cn=5)}function Qw(i,a){do{var u=XM(i.alternate,i);if(u!==null){u.flags&=32767,xt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(i=i.sibling,i!==null)){xt=i;return}xt=i=u}while(i!==null);cn=6,xt=null}function Gw(i,a,u,h,m,w,C,B,X){i.cancelPendingCommit=null;do Qf();while(Hn!==0);if((jt&6)!==0)throw Error(s(327));if(a!==null){if(a===i.current)throw Error(s(177));if(w=a.lanes|a.childLanes,w|=Hp,zC(i,u,w,C,B,X),i===Jt&&(xt=Jt=null,At=0),Ha=a,Ii=i,Wa=u,Kg=w,Zg=m,Vw=h,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,rN(ss,function(){return sx(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||h){h=G.T,G.T=null,m=Ae.p,Ae.p=2,C=jt,jt|=4;try{qM(i,a,u)}finally{jt=C,Ae.p=m,G.T=h}}Hn=1,Jw(),ex(),tx()}}function Jw(){if(Hn===1){Hn=0;var i=Ii,a=Ha,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=G.T,G.T=null;var h=Ae.p;Ae.p=2;var m=jt;jt|=4;try{Dw(a,i);var w=hm,C=zv(i.containerInfo),B=w.focusedElem,X=w.selectionRange;if(C!==B&&B&&B.ownerDocument&&Lv(B.ownerDocument.documentElement,B)){if(X!==null&&jp(B)){var de=X.start,Re=X.end;if(Re===void 0&&(Re=de),"selectionStart"in B)B.selectionStart=de,B.selectionEnd=Math.min(Re,B.value.length);else{var Ie=B.ownerDocument||document,me=Ie&&Ie.defaultView||window;if(me.getSelection){var _e=me.getSelection(),ut=B.textContent.length,it=Math.min(X.start,ut),Xt=X.end===void 0?it:Math.min(X.end,ut);!_e.extend&&it>Xt&&(C=Xt,Xt=it,it=C);var ae=jv(B,it),J=jv(B,Xt);if(ae&&J&&(_e.rangeCount!==1||_e.anchorNode!==ae.node||_e.anchorOffset!==ae.offset||_e.focusNode!==J.node||_e.focusOffset!==J.offset)){var ue=Ie.createRange();ue.setStart(ae.node,ae.offset),_e.removeAllRanges(),it>Xt?(_e.addRange(ue),_e.extend(J.node,J.offset)):(ue.setEnd(J.node,J.offset),_e.addRange(ue))}}}}for(Ie=[],_e=B;_e=_e.parentNode;)_e.nodeType===1&&Ie.push({element:_e,left:_e.scrollLeft,top:_e.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<Ie.length;B++){var Me=Ie[B];Me.element.scrollLeft=Me.left,Me.element.scrollTop=Me.top}}ch=!!fm,hm=fm=null}finally{jt=m,Ae.p=h,G.T=u}}i.current=a,Hn=2}}function ex(){if(Hn===2){Hn=0;var i=Ii,a=Ha,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=G.T,G.T=null;var h=Ae.p;Ae.p=2;var m=jt;jt|=4;try{Ow(i,a.alternate,a)}finally{jt=m,Ae.p=h,G.T=u}}Hn=3}}function tx(){if(Hn===4||Hn===3){Hn=0,ds();var i=Ii,a=Ha,u=Wa,h=Vw;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Hn=5:(Hn=0,Ha=Ii=null,nx(i,i.pendingLanes));var m=i.pendingLanes;if(m===0&&(Oi=null),O(u),a=a.stateNode,Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(pi,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=G.T,m=Ae.p,Ae.p=2,G.T=null;try{for(var w=i.onRecoverableError,C=0;C<h.length;C++){var B=h[C];w(B.value,{componentStack:B.stack})}}finally{G.T=a,Ae.p=m}}(Wa&3)!==0&&Qf(),Tr(i),m=i.pendingLanes,(u&4194090)!==0&&(m&42)!==0?i===Qg?Hc++:(Hc=0,Qg=i):Hc=0,Wc(0)}}function nx(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,Sc(a)))}function Qf(i){return Jw(),ex(),tx(),sx()}function sx(){if(Hn!==5)return!1;var i=Ii,a=Kg;Kg=0;var u=O(Wa),h=G.T,m=Ae.p;try{Ae.p=32>u?32:u,G.T=null,u=Zg,Zg=null;var w=Ii,C=Wa;if(Hn=0,Ha=Ii=null,Wa=0,(jt&6)!==0)throw Error(s(331));var B=jt;if(jt|=4,Lw(w.current),Uw(w,w.current,C,u),jt=B,Wc(0,!1),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(pi,w)}catch{}return!0}finally{Ae.p=m,G.T=h,nx(i,a)}}function rx(i,a,u){a=js(u,a),a=Mg(i.stateNode,a,2),i=xi(i,a,2),i!==null&&(tr(i,2),Tr(i))}function Zt(i,a,u){if(i.tag===3)rx(i,i,u);else for(;a!==null;){if(a.tag===3){rx(a,i,u);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Oi===null||!Oi.has(h))){i=js(u,i),u=lw(2),h=xi(a,u,2),h!==null&&(cw(u,h,a,i),tr(h,2),Tr(h));break}}a=a.return}}function tm(i,a,u){var h=i.pingCache;if(h===null){h=i.pingCache=new ZM;var m=new Set;h.set(a,m)}else m=h.get(a),m===void 0&&(m=new Set,h.set(a,m));m.has(u)||(Wg=!0,m.add(u),i=tN.bind(null,i,a,u),a.then(i,i))}function tN(i,a,u){var h=i.pingCache;h!==null&&h.delete(a),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Jt===i&&(At&u)===u&&(cn===4||cn===3&&(At&62914560)===At&&300>an()-Yg?(jt&2)===0&&Xa(i,0):Xg|=u,$a===At&&($a=0)),Tr(i)}function ix(i,a){a===0&&(a=lc()),i=Ca(i,a),i!==null&&(tr(i,a),Tr(i))}function nN(i){var a=i.memoizedState,u=0;a!==null&&(u=a.retryLane),ix(i,u)}function sN(i,a){var u=0;switch(i.tag){case 13:var h=i.stateNode,m=i.memoizedState;m!==null&&(u=m.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(s(314))}h!==null&&h.delete(a),ix(i,u)}function rN(i,a){return dt(i,a)}var Gf=null,Ya=null,nm=!1,Jf=!1,sm=!1,jo=0;function Tr(i){i!==Ya&&i.next===null&&(Ya===null?Gf=Ya=i:Ya=Ya.next=i),Jf=!0,nm||(nm=!0,oN())}function Wc(i,a){if(!sm&&Jf){sm=!0;do for(var u=!1,h=Gf;h!==null;){if(i!==0){var m=h.pendingLanes;if(m===0)var w=0;else{var C=h.suspendedLanes,B=h.pingedLanes;w=(1<<31-rs(42|i)+1)-1,w&=m&~(C&~B),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,cx(h,w))}else w=At,w=va(h,h===Jt?w:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(w&3)===0||wo(h,w)||(u=!0,cx(h,w));h=h.next}while(u);sm=!1}}function iN(){ox()}function ox(){Jf=nm=!1;var i=0;jo!==0&&(pN()&&(i=jo),jo=0);for(var a=an(),u=null,h=Gf;h!==null;){var m=h.next,w=ax(h,a);w===0?(h.next=null,u===null?Gf=m:u.next=m,m===null&&(Ya=u)):(u=h,(i!==0||(w&3)!==0)&&(Jf=!0)),h=m}Wc(i)}function ax(i,a){for(var u=i.suspendedLanes,h=i.pingedLanes,m=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var C=31-rs(w),B=1<<C,X=m[C];X===-1?((B&u)===0||(B&h)!==0)&&(m[C]=Sp(B,a)):X<=a&&(i.expiredLanes|=B),w&=~B}if(a=Jt,u=At,u=va(i,i===a?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,u===0||i===a&&(Lt===2||Lt===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&Vt(h),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||wo(i,u)){if(a=u&-u,a===i.callbackPriority)return a;switch(h!==null&&Vt(h),O(u)){case 2:case 8:u=_a;break;case 32:u=ss;break;case 268435456:u=hi;break;default:u=ss}return h=lx.bind(null,i),u=dt(u,h),i.callbackPriority=a,i.callbackNode=u,a}return h!==null&&h!==null&&Vt(h),i.callbackPriority=2,i.callbackNode=null,2}function lx(i,a){if(Hn!==0&&Hn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Qf()&&i.callbackNode!==u)return null;var h=At;return h=va(i,i===Jt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:(Hw(i,h,a),ax(i,an()),i.callbackNode!=null&&i.callbackNode===u?lx.bind(null,i):null)}function cx(i,a){if(Qf())return null;Hw(i,a,!0)}function oN(){mN(function(){(jt&6)!==0?dt(tn,iN):ox()})}function rm(){return jo===0&&(jo=xo()),jo}function ux(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:uf(""+i)}function fx(i,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,i.id&&u.setAttribute("form",i.id),a.parentNode.insertBefore(u,a),i=new FormData(i),u.parentNode.removeChild(u),i}function aN(i,a,u,h,m){if(a==="submit"&&u&&u.stateNode===m){var w=ux((m[S]||null).action),C=h.submitter;C&&(a=(a=C[S]||null)?ux(a.formAction):C.getAttribute("formAction"),a!==null&&(w=a,C=null));var B=new pf("action","action",null,h,m);i.push({event:B,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(jo!==0){var X=C?fx(m,C):new FormData(m);Sg(u,{pending:!0,data:X,method:m.method,action:w},null,X)}}else typeof w=="function"&&(B.preventDefault(),X=C?fx(m,C):new FormData(m),Sg(u,{pending:!0,data:X,method:m.method,action:w},w,X))},currentTarget:m}]})}}for(var im=0;im<$p.length;im++){var om=$p[im],lN=om.toLowerCase(),cN=om[0].toUpperCase()+om.slice(1);sr(lN,"on"+cN)}sr(Hv,"onAnimationEnd"),sr(Wv,"onAnimationIteration"),sr(Xv,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(AM,"onTransitionRun"),sr(RM,"onTransitionStart"),sr(CM,"onTransitionCancel"),sr(qv,"onTransitionEnd"),rt("onMouseEnter",["mouseout","mouseover"]),rt("onMouseLeave",["mouseout","mouseover"]),rt("onPointerEnter",["pointerout","pointerover"]),rt("onPointerLeave",["pointerout","pointerover"]),tt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),tt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),tt("onBeforeInput",["compositionend","keypress","textInput","paste"]),tt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),tt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),tt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xc="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(" "),uN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xc));function hx(i,a){a=(a&4)!==0;for(var u=0;u<i.length;u++){var h=i[u],m=h.event;h=h.listeners;e:{var w=void 0;if(a)for(var C=h.length-1;0<=C;C--){var B=h[C],X=B.instance,de=B.currentTarget;if(B=B.listener,X!==w&&m.isPropagationStopped())break e;w=B,m.currentTarget=de;try{w(m)}catch(Re){Lf(Re)}m.currentTarget=null,w=X}else for(C=0;C<h.length;C++){if(B=h[C],X=B.instance,de=B.currentTarget,B=B.listener,X!==w&&m.isPropagationStopped())break e;w=B,m.currentTarget=de;try{w(m)}catch(Re){Lf(Re)}m.currentTarget=null,w=X}}}}function Tt(i,a){var u=a[F];u===void 0&&(u=a[F]=new Set);var h=i+"__bubble";u.has(h)||(dx(a,i,2,!1),u.add(h))}function am(i,a,u){var h=0;a&&(h|=4),dx(u,i,h,a)}var eh="_reactListening"+Math.random().toString(36).slice(2);function lm(i){if(!i[eh]){i[eh]=!0,Le.forEach(function(u){u!=="selectionchange"&&(uN.has(u)||am(u,!1,i),am(u,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[eh]||(a[eh]=!0,am("selectionchange",!1,a))}}function dx(i,a,u,h){switch(Ux(a)){case 2:var m=UN;break;case 8:m=FN;break;default:m=xm}u=m.bind(null,a,u,i),m=void 0,!Np||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),h?m!==void 0?i.addEventListener(a,u,{capture:!0,passive:m}):i.addEventListener(a,u,!0):m!==void 0?i.addEventListener(a,u,{passive:m}):i.addEventListener(a,u,!1)}function cm(i,a,u,h,m){var w=h;if((a&1)===0&&(a&2)===0&&h!==null)e:for(;;){if(h===null)return;var C=h.tag;if(C===3||C===4){var B=h.stateNode.containerInfo;if(B===m)break;if(C===4)for(C=h.return;C!==null;){var X=C.tag;if((X===3||X===4)&&C.stateNode.containerInfo===m)return;C=C.return}for(;B!==null;){if(C=Fe(B),C===null)return;if(X=C.tag,X===5||X===6||X===26||X===27){h=w=C;continue e}B=B.parentNode}}h=h.return}vv(function(){var de=w,Re=Cp(u),Ie=[];e:{var me=Yv.get(i);if(me!==void 0){var _e=pf,ut=i;switch(i){case"keypress":if(hf(u)===0)break e;case"keydown":case"keyup":_e=rM;break;case"focusin":ut="focus",_e=Pp;break;case"focusout":ut="blur",_e=Pp;break;case"beforeblur":case"afterblur":_e=Pp;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":_e=Tv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_e=XC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_e=aM;break;case Hv:case Wv:case Xv:_e=KC;break;case qv:_e=cM;break;case"scroll":case"scrollend":_e=HC;break;case"wheel":_e=fM;break;case"copy":case"cut":case"paste":_e=QC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_e=Ev;break;case"toggle":case"beforetoggle":_e=dM}var it=(a&4)!==0,Xt=!it&&(i==="scroll"||i==="scrollend"),ae=it?me!==null?me+"Capture":null:me;it=[];for(var J=de,ue;J!==null;){var Me=J;if(ue=Me.stateNode,Me=Me.tag,Me!==5&&Me!==26&&Me!==27||ue===null||ae===null||(Me=fc(J,ae),Me!=null&&it.push(qc(J,Me,ue))),Xt)break;J=J.return}0<it.length&&(me=new _e(me,ut,null,u,Re),Ie.push({event:me,listeners:it}))}}if((a&7)===0){e:{if(me=i==="mouseover"||i==="pointerover",_e=i==="mouseout"||i==="pointerout",me&&u!==Rp&&(ut=u.relatedTarget||u.fromElement)&&(Fe(ut)||ut[P]))break e;if((_e||me)&&(me=Re.window===Re?Re:(me=Re.ownerDocument)?me.defaultView||me.parentWindow:window,_e?(ut=u.relatedTarget||u.toElement,_e=de,ut=ut?Fe(ut):null,ut!==null&&(Xt=o(ut),it=ut.tag,ut!==Xt||it!==5&&it!==27&&it!==6)&&(ut=null)):(_e=null,ut=de),_e!==ut)){if(it=Tv,Me="onMouseLeave",ae="onMouseEnter",J="mouse",(i==="pointerout"||i==="pointerover")&&(it=Ev,Me="onPointerLeave",ae="onPointerEnter",J="pointer"),Xt=_e==null?me:Ee(_e),ue=ut==null?me:Ee(ut),me=new it(Me,J+"leave",_e,u,Re),me.target=Xt,me.relatedTarget=ue,Me=null,Fe(Re)===de&&(it=new it(ae,J+"enter",ut,u,Re),it.target=ue,it.relatedTarget=Xt,Me=it),Xt=Me,_e&&ut)t:{for(it=_e,ae=ut,J=0,ue=it;ue;ue=Ka(ue))J++;for(ue=0,Me=ae;Me;Me=Ka(Me))ue++;for(;0<J-ue;)it=Ka(it),J--;for(;0<ue-J;)ae=Ka(ae),ue--;for(;J--;){if(it===ae||ae!==null&&it===ae.alternate)break t;it=Ka(it),ae=Ka(ae)}it=null}else it=null;_e!==null&&px(Ie,me,_e,it,!1),ut!==null&&Xt!==null&&px(Ie,Xt,ut,it,!0)}}e:{if(me=de?Ee(de):window,_e=me.nodeName&&me.nodeName.toLowerCase(),_e==="select"||_e==="input"&&me.type==="file")var Ye=kv;else if(Ov(me))if(Pv)Ye=TM;else{Ye=wM;var wt=vM}else _e=me.nodeName,!_e||_e.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?de&&Ap(de.elementType)&&(Ye=kv):Ye=xM;if(Ye&&(Ye=Ye(i,de))){Iv(Ie,Ye,u,Re);break e}wt&&wt(i,me,de),i==="focusout"&&de&&me.type==="number"&&de.memoizedProps.value!=null&&uc(me,"number",me.value)}switch(wt=de?Ee(de):window,i){case"focusin":(Ov(wt)||wt.contentEditable==="true")&&(Ea=wt,Lp=de,bc=null);break;case"focusout":bc=Lp=Ea=null;break;case"mousedown":zp=!0;break;case"contextmenu":case"mouseup":case"dragend":zp=!1,Vv(Ie,u,Re);break;case"selectionchange":if(EM)break;case"keydown":case"keyup":Vv(Ie,u,Re)}var Je;if(Bp)e:{switch(i){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else Sa?Mv(i,u)&&(lt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(lt="onCompositionStart");lt&&(Av&&u.locale!=="ko"&&(Sa||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&Sa&&(Je=wv()):(_i=Re,Op="value"in _i?_i.value:_i.textContent,Sa=!0)),wt=th(de,lt),0<wt.length&&(lt=new Sv(lt,i,null,u,Re),Ie.push({event:lt,listeners:wt}),Je?lt.data=Je:(Je=Nv(u),Je!==null&&(lt.data=Je)))),(Je=gM?mM(i,u):yM(i,u))&&(lt=th(de,"onBeforeInput"),0<lt.length&&(wt=new Sv("onBeforeInput","beforeinput",null,u,Re),Ie.push({event:wt,listeners:lt}),wt.data=Je)),aN(Ie,i,de,u,Re)}hx(Ie,a)})}function qc(i,a,u){return{instance:i,listener:a,currentTarget:u}}function th(i,a){for(var u=a+"Capture",h=[];i!==null;){var m=i,w=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||w===null||(m=fc(i,u),m!=null&&h.unshift(qc(i,m,w)),m=fc(i,a),m!=null&&h.push(qc(i,m,w))),i.tag===3)return h;i=i.return}return[]}function Ka(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function px(i,a,u,h,m){for(var w=a._reactName,C=[];u!==null&&u!==h;){var B=u,X=B.alternate,de=B.stateNode;if(B=B.tag,X!==null&&X===h)break;B!==5&&B!==26&&B!==27||de===null||(X=de,m?(de=fc(u,w),de!=null&&C.unshift(qc(u,de,X))):m||(de=fc(u,w),de!=null&&C.push(qc(u,de,X)))),u=u.return}C.length!==0&&i.push({event:a,listeners:C})}var fN=/\r\n?/g,hN=/\u0000|\uFFFD/g;function gx(i){return(typeof i=="string"?i:""+i).replace(fN,`
49
- `).replace(hN,"")}function mx(i,a){return a=gx(a),gx(i)===a}function nh(){}function Wt(i,a,u,h,m,w){switch(u){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||yi(i,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&yi(i,""+h);break;case"className":ke(i,"class",h);break;case"tabIndex":ke(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":ke(i,u,h);break;case"style":_v(i,h,w);break;case"data":if(a!=="object"){ke(i,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=uf(""+h),i.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){i.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 w=="function"&&(u==="formAction"?(a!=="input"&&Wt(i,a,"name",m.name,m,null),Wt(i,a,"formEncType",m.formEncType,m,null),Wt(i,a,"formMethod",m.formMethod,m,null),Wt(i,a,"formTarget",m.formTarget,m,null)):(Wt(i,a,"encType",m.encType,m,null),Wt(i,a,"method",m.method,m,null),Wt(i,a,"target",m.target,m,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=uf(""+h),i.setAttribute(u,h);break;case"onClick":h!=null&&(i.onclick=nh);break;case"onScroll":h!=null&&Tt("scroll",i);break;case"onScrollEnd":h!=null&&Tt("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(s(61));if(u=h.__html,u!=null){if(m.children!=null)throw Error(s(60));i.innerHTML=u}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}u=uf(""+h),i.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":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,""+h):i.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":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":h===!0?i.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,h):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(u,h):i.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(u):i.setAttribute(u,h);break;case"popover":Tt("beforetoggle",i),Tt("toggle",i),te(i,"popover",h);break;case"xlinkActuate":Ve(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Ve(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Ve(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Ve(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Ve(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Ve(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Ve(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Ve(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Ve(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":te(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=VC.get(u)||u,te(i,u,h))}}function um(i,a,u,h,m,w){switch(u){case"style":_v(i,h,w);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(s(61));if(u=h.__html,u!=null){if(m.children!=null)throw Error(s(60));i.innerHTML=u}}break;case"children":typeof h=="string"?yi(i,h):(typeof h=="number"||typeof h=="bigint")&&yi(i,""+h);break;case"onScroll":h!=null&&Tt("scroll",i);break;case"onScrollEnd":h!=null&&Tt("scrollend",i);break;case"onClick":h!=null&&(i.onclick=nh);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!We.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(m=u.endsWith("Capture"),a=u.slice(2,m?u.length-7:void 0),w=i[S]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(a,w,m),typeof h=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,h,m);break e}u in i?i[u]=h:h===!0?i.setAttribute(u,""):te(i,u,h)}}}function Wn(i,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Tt("error",i),Tt("load",i);var h=!1,m=!1,w;for(w in u)if(u.hasOwnProperty(w)){var C=u[w];if(C!=null)switch(w){case"src":h=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Wt(i,a,w,C,u,null)}}m&&Wt(i,a,"srcSet",u.srcSet,u,null),h&&Wt(i,a,"src",u.src,u,null);return;case"input":Tt("invalid",i);var B=w=C=m=null,X=null,de=null;for(h in u)if(u.hasOwnProperty(h)){var Re=u[h];if(Re!=null)switch(h){case"name":m=Re;break;case"type":C=Re;break;case"checked":X=Re;break;case"defaultChecked":de=Re;break;case"value":w=Re;break;case"defaultValue":B=Re;break;case"children":case"dangerouslySetInnerHTML":if(Re!=null)throw Error(s(137,a));break;default:Wt(i,a,h,Re,u,null)}}of(i,w,B,X,de,C,m,!1),gt(i);return;case"select":Tt("invalid",i),h=C=w=null;for(m in u)if(u.hasOwnProperty(m)&&(B=u[m],B!=null))switch(m){case"value":w=B;break;case"defaultValue":C=B;break;case"multiple":h=B;default:Wt(i,a,m,B,u,null)}a=w,u=C,i.multiple=!!h,a!=null?mi(i,!!h,a,!1):u!=null&&mi(i,!!h,u,!0);return;case"textarea":Tt("invalid",i),w=m=h=null;for(C in u)if(u.hasOwnProperty(C)&&(B=u[C],B!=null))switch(C){case"value":h=B;break;case"defaultValue":m=B;break;case"children":w=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(91));break;default:Wt(i,a,C,B,u,null)}lf(i,h,m,w),gt(i);return;case"option":for(X in u)if(u.hasOwnProperty(X)&&(h=u[X],h!=null))switch(X){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Wt(i,a,X,h,u,null)}return;case"dialog":Tt("beforetoggle",i),Tt("toggle",i),Tt("cancel",i),Tt("close",i);break;case"iframe":case"object":Tt("load",i);break;case"video":case"audio":for(h=0;h<Xc.length;h++)Tt(Xc[h],i);break;case"image":Tt("error",i),Tt("load",i);break;case"details":Tt("toggle",i);break;case"embed":case"source":case"link":Tt("error",i),Tt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in u)if(u.hasOwnProperty(de)&&(h=u[de],h!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Wt(i,a,de,h,u,null)}return;default:if(Ap(a)){for(Re in u)u.hasOwnProperty(Re)&&(h=u[Re],h!==void 0&&um(i,a,Re,h,u,void 0));return}}for(B in u)u.hasOwnProperty(B)&&(h=u[B],h!=null&&Wt(i,a,B,h,u,null))}function dN(i,a,u,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,w=null,C=null,B=null,X=null,de=null,Re=null;for(_e in u){var Ie=u[_e];if(u.hasOwnProperty(_e)&&Ie!=null)switch(_e){case"checked":break;case"value":break;case"defaultValue":X=Ie;default:h.hasOwnProperty(_e)||Wt(i,a,_e,null,h,Ie)}}for(var me in h){var _e=h[me];if(Ie=u[me],h.hasOwnProperty(me)&&(_e!=null||Ie!=null))switch(me){case"type":w=_e;break;case"name":m=_e;break;case"checked":de=_e;break;case"defaultChecked":Re=_e;break;case"value":C=_e;break;case"defaultValue":B=_e;break;case"children":case"dangerouslySetInnerHTML":if(_e!=null)throw Error(s(137,a));break;default:_e!==Ie&&Wt(i,a,me,_e,h,Ie)}}cc(i,C,B,X,de,Re,w,m);return;case"select":_e=C=B=me=null;for(w in u)if(X=u[w],u.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":_e=X;default:h.hasOwnProperty(w)||Wt(i,a,w,null,h,X)}for(m in h)if(w=h[m],X=u[m],h.hasOwnProperty(m)&&(w!=null||X!=null))switch(m){case"value":me=w;break;case"defaultValue":B=w;break;case"multiple":C=w;default:w!==X&&Wt(i,a,m,w,h,X)}a=B,u=C,h=_e,me!=null?mi(i,!!u,me,!1):!!h!=!!u&&(a!=null?mi(i,!!u,a,!0):mi(i,!!u,u?[]:"",!1));return;case"textarea":_e=me=null;for(B in u)if(m=u[B],u.hasOwnProperty(B)&&m!=null&&!h.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:Wt(i,a,B,null,h,m)}for(C in h)if(m=h[C],w=u[C],h.hasOwnProperty(C)&&(m!=null||w!=null))switch(C){case"value":me=m;break;case"defaultValue":_e=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(s(91));break;default:m!==w&&Wt(i,a,C,m,h,w)}af(i,me,_e);return;case"option":for(var ut in u)if(me=u[ut],u.hasOwnProperty(ut)&&me!=null&&!h.hasOwnProperty(ut))switch(ut){case"selected":i.selected=!1;break;default:Wt(i,a,ut,null,h,me)}for(X in h)if(me=h[X],_e=u[X],h.hasOwnProperty(X)&&me!==_e&&(me!=null||_e!=null))switch(X){case"selected":i.selected=me&&typeof me!="function"&&typeof me!="symbol";break;default:Wt(i,a,X,me,h,_e)}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 it in u)me=u[it],u.hasOwnProperty(it)&&me!=null&&!h.hasOwnProperty(it)&&Wt(i,a,it,null,h,me);for(de in h)if(me=h[de],_e=u[de],h.hasOwnProperty(de)&&me!==_e&&(me!=null||_e!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(s(137,a));break;default:Wt(i,a,de,me,h,_e)}return;default:if(Ap(a)){for(var Xt in u)me=u[Xt],u.hasOwnProperty(Xt)&&me!==void 0&&!h.hasOwnProperty(Xt)&&um(i,a,Xt,void 0,h,me);for(Re in h)me=h[Re],_e=u[Re],!h.hasOwnProperty(Re)||me===_e||me===void 0&&_e===void 0||um(i,a,Re,me,h,_e);return}}for(var ae in u)me=u[ae],u.hasOwnProperty(ae)&&me!=null&&!h.hasOwnProperty(ae)&&Wt(i,a,ae,null,h,me);for(Ie in h)me=h[Ie],_e=u[Ie],!h.hasOwnProperty(Ie)||me===_e||me==null&&_e==null||Wt(i,a,Ie,me,h,_e)}var fm=null,hm=null;function sh(i){return i.nodeType===9?i:i.ownerDocument}function yx(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _x(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function dm(i,a){return i==="textarea"||i==="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 pm=null;function pN(){var i=window.event;return i&&i.type==="popstate"?i===pm?!1:(pm=i,!0):(pm=null,!1)}var bx=typeof setTimeout=="function"?setTimeout:void 0,gN=typeof clearTimeout=="function"?clearTimeout:void 0,vx=typeof Promise=="function"?Promise:void 0,mN=typeof queueMicrotask=="function"?queueMicrotask:typeof vx<"u"?function(i){return vx.resolve(null).then(i).catch(yN)}:bx;function yN(i){setTimeout(function(){throw i})}function Pi(i){return i==="head"}function wx(i,a){var u=a,h=0,m=0;do{var w=u.nextSibling;if(i.removeChild(u),w&&w.nodeType===8)if(u=w.data,u==="/$"){if(0<h&&8>h){u=h;var C=i.ownerDocument;if(u&1&&Yc(C.documentElement),u&2&&Yc(C.body),u&4)for(u=C.head,Yc(u),C=u.firstChild;C;){var B=C.nextSibling,X=C.nodeName;C[q]||X==="SCRIPT"||X==="STYLE"||X==="LINK"&&C.rel.toLowerCase()==="stylesheet"||u.removeChild(C),C=B}}if(m===0){i.removeChild(w),nu(a);return}m--}else u==="$"||u==="$?"||u==="$!"?m++:h=u.charCodeAt(0)-48;else h=0;u=w}while(u);nu(a)}function gm(i){var a=i.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":gm(u),we(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function _N(i,a,u,h){for(;i.nodeType===1;){var m=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[q])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==m.rel||i.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||i.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||i.getAttribute("title")!==(m.title==null?null:m.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(m.src==null?null:m.src)||i.getAttribute("type")!==(m.type==null?null:m.type)||i.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var w=m.name==null?null:""+m.name;if(m.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=ir(i.nextSibling),i===null)break}return null}function bN(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=ir(i.nextSibling),i===null))return null;return i}function mm(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState==="complete"}function vN(i,a){var u=i.ownerDocument;if(i.data!=="$?"||u.readyState==="complete")a();else{var h=function(){a(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function ir(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return i}var ym=null;function xx(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"){if(a===0)return i;a--}else u==="/$"&&a++}i=i.previousSibling}return null}function Tx(i,a,u){switch(a=sh(u),i){case"html":if(i=a.documentElement,!i)throw Error(s(452));return i;case"head":if(i=a.head,!i)throw Error(s(453));return i;case"body":if(i=a.body,!i)throw Error(s(454));return i;default:throw Error(s(451))}}function Yc(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);we(i)}var Ws=new Map,Sx=new Set;function rh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Jr=Ae.d;Ae.d={f:wN,r:xN,D:TN,C:SN,L:EN,m:AN,X:CN,S:RN,M:MN};function wN(){var i=Jr.f(),a=Kf();return i||a}function xN(i){var a=ye(i);a!==null&&a.tag===5&&a.type==="form"?H0(a):Jr.r(i)}var Za=typeof document>"u"?null:document;function Ex(i,a,u){var h=Za;if(h&&typeof a=="string"&&a){var m=Nt(a);m='link[rel="'+i+'"][href="'+m+'"]',typeof u=="string"&&(m+='[crossorigin="'+u+'"]'),Sx.has(m)||(Sx.add(m),i={rel:i,crossOrigin:u,href:a},h.querySelector(m)===null&&(a=h.createElement("link"),Wn(a,"link",i),Y(a),h.head.appendChild(a)))}}function TN(i){Jr.D(i),Ex("dns-prefetch",i,null)}function SN(i,a){Jr.C(i,a),Ex("preconnect",i,a)}function EN(i,a,u){Jr.L(i,a,u);var h=Za;if(h&&i&&a){var m='link[rel="preload"][as="'+Nt(a)+'"]';a==="image"&&u&&u.imageSrcSet?(m+='[imagesrcset="'+Nt(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(m+='[imagesizes="'+Nt(u.imageSizes)+'"]')):m+='[href="'+Nt(i)+'"]';var w=m;switch(a){case"style":w=Qa(i);break;case"script":w=Ga(i)}Ws.has(w)||(i=g({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),Ws.set(w,i),h.querySelector(m)!==null||a==="style"&&h.querySelector(Kc(w))||a==="script"&&h.querySelector(Zc(w))||(a=h.createElement("link"),Wn(a,"link",i),Y(a),h.head.appendChild(a)))}}function AN(i,a){Jr.m(i,a);var u=Za;if(u&&i){var h=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Nt(h)+'"][href="'+Nt(i)+'"]',w=m;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Ga(i)}if(!Ws.has(w)&&(i=g({rel:"modulepreload",href:i},a),Ws.set(w,i),u.querySelector(m)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Zc(w)))return}h=u.createElement("link"),Wn(h,"link",i),Y(h),u.head.appendChild(h)}}}function RN(i,a,u){Jr.S(i,a,u);var h=Za;if(h&&i){var m=$e(h).hoistableStyles,w=Qa(i);a=a||"default";var C=m.get(w);if(!C){var B={loading:0,preload:null};if(C=h.querySelector(Kc(w)))B.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":a},u),(u=Ws.get(w))&&_m(i,u);var X=C=h.createElement("link");Y(X),Wn(X,"link",i),X._p=new Promise(function(de,Re){X.onload=de,X.onerror=Re}),X.addEventListener("load",function(){B.loading|=1}),X.addEventListener("error",function(){B.loading|=2}),B.loading|=4,ih(C,a,h)}C={type:"stylesheet",instance:C,count:1,state:B},m.set(w,C)}}}function CN(i,a){Jr.X(i,a);var u=Za;if(u&&i){var h=$e(u).hoistableScripts,m=Ga(i),w=h.get(m);w||(w=u.querySelector(Zc(m)),w||(i=g({src:i,async:!0},a),(a=Ws.get(m))&&bm(i,a),w=u.createElement("script"),Y(w),Wn(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},h.set(m,w))}}function MN(i,a){Jr.M(i,a);var u=Za;if(u&&i){var h=$e(u).hoistableScripts,m=Ga(i),w=h.get(m);w||(w=u.querySelector(Zc(m)),w||(i=g({src:i,async:!0,type:"module"},a),(a=Ws.get(m))&&bm(i,a),w=u.createElement("script"),Y(w),Wn(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},h.set(m,w))}}function Ax(i,a,u,h){var m=(m=Pe.current)?rh(m):null;if(!m)throw Error(s(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=Qa(u.href),u=$e(m).hoistableStyles,h=u.get(a),h||(h={type:"style",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Qa(u.href);var w=$e(m).hoistableStyles,C=w.get(i);if(C||(m=m.ownerDocument||m,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,C),(w=m.querySelector(Kc(i)))&&!w._p&&(C.instance=w,C.state.loading=5),Ws.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ws.set(i,u),w||NN(m,i,u,C.state))),a&&h===null)throw Error(s(528,""));return C}if(a&&h!==null)throw Error(s(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ga(u),u=$e(m).hoistableScripts,h=u.get(a),h||(h={type:"script",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,i))}}function Qa(i){return'href="'+Nt(i)+'"'}function Kc(i){return'link[rel="stylesheet"]['+i+"]"}function Rx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function NN(i,a,u,h){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?h.loading=1:(a=i.createElement("link"),h.preload=a,a.addEventListener("load",function(){return h.loading|=1}),a.addEventListener("error",function(){return h.loading|=2}),Wn(a,"link",u),Y(a),i.head.appendChild(a))}function Ga(i){return'[src="'+Nt(i)+'"]'}function Zc(i){return"script[async]"+i}function Cx(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var h=i.querySelector('style[data-href~="'+Nt(u.href)+'"]');if(h)return a.instance=h,Y(h),h;var m=g({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),Y(h),Wn(h,"style",m),ih(h,u.precedence,i),a.instance=h;case"stylesheet":m=Qa(u.href);var w=i.querySelector(Kc(m));if(w)return a.state.loading|=4,a.instance=w,Y(w),w;h=Rx(u),(m=Ws.get(m))&&_m(h,m),w=(i.ownerDocument||i).createElement("link"),Y(w);var C=w;return C._p=new Promise(function(B,X){C.onload=B,C.onerror=X}),Wn(w,"link",h),a.state.loading|=4,ih(w,u.precedence,i),a.instance=w;case"script":return w=Ga(u.src),(m=i.querySelector(Zc(w)))?(a.instance=m,Y(m),m):(h=u,(m=Ws.get(w))&&(h=g({},u),bm(h,m)),i=i.ownerDocument||i,m=i.createElement("script"),Y(m),Wn(m,"link",h),i.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(h=a.instance,a.state.loading|=4,ih(h,u.precedence,i));return a.instance}function ih(i,a,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=h.length?h[h.length-1]:null,w=m,C=0;C<h.length;C++){var B=h[C];if(B.dataset.precedence===a)w=B;else if(w!==m)break}w?w.parentNode.insertBefore(i,w.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function _m(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function bm(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var oh=null;function Mx(i,a,u){if(oh===null){var h=new Map,m=oh=new Map;m.set(u,h)}else m=oh,h=m.get(u),h||(h=new Map,m.set(u,h));if(h.has(i))return h;for(h.set(i,null),u=u.getElementsByTagName(i),m=0;m<u.length;m++){var w=u[m];if(!(w[q]||w[b]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var C=w.getAttribute(a)||"";C=i+C;var B=h.get(C);B?B.push(w):h.set(C,[w])}}return h}function Nx(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function ON(i,a,u){if(u===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Ox(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var Qc=null;function IN(){}function kN(i,a,u){if(Qc===null)throw Error(s(475));var h=Qc;if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var m=Qa(u.href),w=i.querySelector(Kc(m));if(w){i=w._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=ah.bind(h),i.then(h,h)),a.state.loading|=4,a.instance=w,Y(w);return}w=i.ownerDocument||i,u=Rx(u),(m=Ws.get(m))&&_m(u,m),w=w.createElement("link"),Y(w);var C=w;C._p=new Promise(function(B,X){C.onload=B,C.onerror=X}),Wn(w,"link",u),a.instance=w}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(h.count++,a=ah.bind(h),i.addEventListener("load",a),i.addEventListener("error",a))}}function PN(){if(Qc===null)throw Error(s(475));var i=Qc;return i.stylesheets&&i.count===0&&vm(i,i.stylesheets),0<i.count?function(a){var u=setTimeout(function(){if(i.stylesheets&&vm(i,i.stylesheets),i.unsuspend){var h=i.unsuspend;i.unsuspend=null,h()}},6e4);return i.unsuspend=a,function(){i.unsuspend=null,clearTimeout(u)}}:null}function ah(){if(this.count--,this.count===0){if(this.stylesheets)vm(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var lh=null;function vm(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,lh=new Map,a.forEach(DN,i),lh=null,ah.call(i))}function DN(i,a){if(!(a.state.loading&4)){var u=lh.get(i);if(u)var h=u.get(null);else{u=new Map,lh.set(i,u);for(var m=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<m.length;w++){var C=m[w];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(u.set(C.dataset.precedence,C),h=C)}h&&u.set(null,h)}m=a.instance,C=m.getAttribute("data-precedence"),w=u.get(C)||h,w===h&&u.set(null,m),u.set(C,m),this.count++,h=ah.bind(this),m.addEventListener("load",h),m.addEventListener("error",h),w?w.parentNode.insertBefore(m,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(m,i.firstChild)),a.state.loading|=4}}var Gc={$$typeof:I,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function BN(i,a,u,h,m,w,C,B){this.tag=1,this.containerInfo=i,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=wa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wa(0),this.hiddenUpdates=wa(null),this.identifierPrefix=h,this.onUncaughtError=m,this.onCaughtError=w,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function Ix(i,a,u,h,m,w,C,B,X,de,Re,Ie){return i=new BN(i,a,u,C,B,X,de,Ie),a=1,w===!0&&(a|=24),w=Es(3,null,null,a),i.current=w,w.stateNode=i,a=tg(),a.refCount++,i.pooledCache=a,a.refCount++,w.memoizedState={element:h,isDehydrated:u,cache:a},ig(w),i}function kx(i){return i?(i=Ma,i):Ma}function Px(i,a,u,h,m,w){m=kx(m),h.context===null?h.context=m:h.pendingContext=m,h=wi(a),h.payload={element:u},w=w===void 0?null:w,w!==null&&(h.callback=w),u=xi(i,h,a),u!==null&&(Ns(u,i,a),Cc(u,i,a))}function Dx(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function wm(i,a){Dx(i,a),(i=i.alternate)&&Dx(i,a)}function Bx(i){if(i.tag===13){var a=Ca(i,67108864);a!==null&&Ns(a,i,67108864),wm(i,67108864)}}var ch=!0;function UN(i,a,u,h){var m=G.T;G.T=null;var w=Ae.p;try{Ae.p=2,xm(i,a,u,h)}finally{Ae.p=w,G.T=m}}function FN(i,a,u,h){var m=G.T;G.T=null;var w=Ae.p;try{Ae.p=8,xm(i,a,u,h)}finally{Ae.p=w,G.T=m}}function xm(i,a,u,h){if(ch){var m=Tm(h);if(m===null)cm(i,a,h,uh,u),Fx(i,h);else if(LN(m,i,a,u,h))h.stopPropagation();else if(Fx(i,h),a&4&&-1<jN.indexOf(i)){for(;m!==null;){var w=ye(m);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var C=jr(w.pendingLanes);if(C!==0){var B=w;for(B.pendingLanes|=2,B.entangledLanes|=2;C;){var X=1<<31-rs(C);B.entanglements[1]|=X,C&=~X}Tr(w),(jt&6)===0&&(qf=an()+500,Wc(0))}}break;case 13:B=Ca(w,2),B!==null&&Ns(B,w,2),Kf(),wm(w,2)}if(w=Tm(h),w===null&&cm(i,a,h,uh,u),w===m)break;m=w}m!==null&&h.stopPropagation()}else cm(i,a,h,null,u)}}function Tm(i){return i=Cp(i),Sm(i)}var uh=null;function Sm(i){if(uh=null,i=Fe(i),i!==null){var a=o(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return uh=i,null}function Ux(i){switch(i){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(pn()){case tn:return 2;case _a:return 8;case ss:case ps:return 32;case hi:return 268435456;default:return 32}default:return 32}}var Em=!1,Di=null,Bi=null,Ui=null,Jc=new Map,eu=new Map,Fi=[],jN="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 Fx(i,a){switch(i){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Bi=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":Jc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(a.pointerId)}}function tu(i,a,u,h,m,w){return i===null||i.nativeEvent!==w?(i={blockedOn:a,domEventName:u,eventSystemFlags:h,nativeEvent:w,targetContainers:[m]},a!==null&&(a=ye(a),a!==null&&Bx(a)),i):(i.eventSystemFlags|=h,a=i.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),i)}function LN(i,a,u,h,m){switch(a){case"focusin":return Di=tu(Di,i,a,u,h,m),!0;case"dragenter":return Bi=tu(Bi,i,a,u,h,m),!0;case"mouseover":return Ui=tu(Ui,i,a,u,h,m),!0;case"pointerover":var w=m.pointerId;return Jc.set(w,tu(Jc.get(w)||null,i,a,u,h,m)),!0;case"gotpointercapture":return w=m.pointerId,eu.set(w,tu(eu.get(w)||null,i,a,u,h,m)),!0}return!1}function jx(i){var a=Fe(i.target);if(a!==null){var u=o(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,y(i.priority,function(){if(u.tag===13){var h=Ms();h=gi(h);var m=Ca(u,h);m!==null&&Ns(m,u,h),wm(u,h)}});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function fh(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=Tm(i.nativeEvent);if(u===null){u=i.nativeEvent;var h=new u.constructor(u.type,u);Rp=h,u.target.dispatchEvent(h),Rp=null}else return a=ye(u),a!==null&&Bx(a),i.blockedOn=u,!1;a.shift()}return!0}function Lx(i,a,u){fh(i)&&u.delete(a)}function zN(){Em=!1,Di!==null&&fh(Di)&&(Di=null),Bi!==null&&fh(Bi)&&(Bi=null),Ui!==null&&fh(Ui)&&(Ui=null),Jc.forEach(Lx),eu.forEach(Lx)}function hh(i,a){i.blockedOn===a&&(i.blockedOn=null,Em||(Em=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,zN)))}var dh=null;function zx(i){dh!==i&&(dh=i,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){dh===i&&(dh=null);for(var a=0;a<i.length;a+=3){var u=i[a],h=i[a+1],m=i[a+2];if(typeof h!="function"){if(Sm(h||u)===null)continue;break}var w=ye(u);w!==null&&(i.splice(a,3),a-=3,Sg(w,{pending:!0,data:m,method:u.method,action:h},h,m))}}))}function nu(i){function a(X){return hh(X,i)}Di!==null&&hh(Di,i),Bi!==null&&hh(Bi,i),Ui!==null&&hh(Ui,i),Jc.forEach(a),eu.forEach(a);for(var u=0;u<Fi.length;u++){var h=Fi[u];h.blockedOn===i&&(h.blockedOn=null)}for(;0<Fi.length&&(u=Fi[0],u.blockedOn===null);)jx(u),u.blockedOn===null&&Fi.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var m=u[h],w=u[h+1],C=m[S]||null;if(typeof w=="function")C||zx(u);else if(C){var B=null;if(w&&w.hasAttribute("formAction")){if(m=w,C=w[S]||null)B=C.formAction;else if(Sm(m)!==null)continue}else B=C.action;typeof B=="function"?u[h+1]=B:(u.splice(h,3),h-=3),zx(u)}}}function Am(i){this._internalRoot=i}ph.prototype.render=Am.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(s(409));var u=a.current,h=Ms();Px(u,h,i,a,null,null)},ph.prototype.unmount=Am.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;Px(i.current,2,null,i,null,null),Kf(),a[P]=null}};function ph(i){this._internalRoot=i}ph.prototype.unstable_scheduleHydration=function(i){if(i){var a=v();i={blockedOn:null,target:i,priority:a};for(var u=0;u<Fi.length&&a!==0&&a<Fi[u].priority;u++);Fi.splice(u,0,i),u===0&&jx(i)}};var Vx=e.version;if(Vx!=="19.1.0")throw Error(s(527,Vx,"19.1.0"));Ae.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(s(188)):(i=Object.keys(i).join(","),Error(s(268,i)));return i=f(a),i=i!==null?d(i):null,i=i===null?null:i.stateNode,i};var VN={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gh.isDisabled&&gh.supportsFiber)try{pi=gh.inject(VN),Bn=gh}catch{}}return ru.createRoot=function(i,a){if(!r(i))throw Error(s(299));var u=!1,h="",m=rw,w=iw,C=ow,B=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(w=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(B=a.unstable_transitionCallbacks)),a=Ix(i,1,!1,null,null,u,h,m,w,C,B,null),i[P]=a.current,lm(i),new Am(a)},ru.hydrateRoot=function(i,a,u){if(!r(i))throw Error(s(299));var h=!1,m="",w=rw,C=iw,B=ow,X=null,de=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(m=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(C=u.onCaughtError),u.onRecoverableError!==void 0&&(B=u.onRecoverableError),u.unstable_transitionCallbacks!==void 0&&(X=u.unstable_transitionCallbacks),u.formState!==void 0&&(de=u.formState)),a=Ix(i,1,!0,a,u??null,h,m,w,C,B,X,de),a.context=kx(null),u=a.current,h=Ms(),h=gi(h),m=wi(h),m.callback=null,xi(u,m,h),u=h,a.current.lanes=u,tr(a,u),Tr(a),i[P]=a.current,lm(i),new ph(a)},ru.version="19.1.0",ru}var Jx;function eO(){if(Jx)return Nm.exports;Jx=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Nm.exports=JN(),Nm.exports}var tO=eO(),Jl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},oa=typeof window>"u"||"Deno"in globalThis;function us(){}function nO(n,e){return typeof n=="function"?n(e):n}function Iy(n){return typeof n=="number"&&n>=0&&n!==1/0}function mS(n,e){return Math.max(n+(e||0)-Date.now(),0)}function uo(n,e){return typeof n=="function"?n(e):n}function hr(n,e){return typeof n=="function"?n(e):n}function e1(n,e){const{type:t="all",exact:s,fetchStatus:r,predicate:o,queryKey:l,stale:c}=n;if(l){if(s){if(e.queryHash!==rb(l,e.options))return!1}else if(!Ou(e.queryKey,l))return!1}if(t!=="all"){const f=e.isActive();if(t==="active"&&!f||t==="inactive"&&f)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||r&&r!==e.state.fetchStatus||o&&!o(e))}function t1(n,e){const{exact:t,status:s,predicate:r,mutationKey:o}=n;if(o){if(!e.options.mutationKey)return!1;if(t){if(aa(e.options.mutationKey)!==aa(o))return!1}else if(!Ou(e.options.mutationKey,o))return!1}return!(s&&e.state.status!==s||r&&!r(e))}function rb(n,e){return((e==null?void 0:e.queryKeyHashFn)||aa)(n)}function aa(n){return JSON.stringify(n,(e,t)=>ky(t)?Object.keys(t).sort().reduce((s,r)=>(s[r]=t[r],s),{}):t)}function Ou(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Ou(n[t],e[t])):!1}function yS(n,e){if(n===e)return n;const t=n1(n)&&n1(e);if(t||ky(n)&&ky(e)){const s=t?n:Object.keys(n),r=s.length,o=t?e:Object.keys(e),l=o.length,c=t?[]:{},f=new Set(s);let d=0;for(let g=0;g<l;g++){const _=t?g:o[g];(!t&&f.has(_)||t)&&n[_]===void 0&&e[_]===void 0?(c[_]=void 0,d++):(c[_]=yS(n[_],e[_]),c[_]===n[_]&&n[_]!==void 0&&d++)}return r===l&&d===r?n:c}return e}function nd(n,e){if(!e||Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}function n1(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ky(n){if(!s1(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!s1(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function s1(n){return Object.prototype.toString.call(n)==="[object Object]"}function sO(n){return new Promise(e=>{setTimeout(e,n)})}function Py(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?yS(n,e):e}function rO(n,e,t=0){const s=[...n,e];return t&&s.length>t?s.slice(1):s}function iO(n,e,t=0){const s=[e,...n];return t&&s.length>t?s.slice(0,-1):s}var ib=Symbol();function _S(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===ib?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function bS(n,e){return typeof n=="function"?n(...e):!!n}var qo,Qi,Ml,sS,oO=(sS=class extends Jl{constructor(){super();st(this,qo);st(this,Qi);st(this,Ml);Xe(this,Ml,e=>{if(!oa&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){Z(this,Qi)||this.setEventListener(Z(this,Ml))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,Qi))==null||e.call(this),Xe(this,Qi,void 0))}setEventListener(e){var t;Xe(this,Ml,e),(t=Z(this,Qi))==null||t.call(this),Xe(this,Qi,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){Z(this,qo)!==e&&(Xe(this,qo,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof Z(this,qo)=="boolean"?Z(this,qo):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},qo=new WeakMap,Qi=new WeakMap,Ml=new WeakMap,sS),ob=new oO,Nl,Gi,Ol,rS,aO=(rS=class extends Jl{constructor(){super();st(this,Nl,!0);st(this,Gi);st(this,Ol);Xe(this,Ol,e=>{if(!oa&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}})}onSubscribe(){Z(this,Gi)||this.setEventListener(Z(this,Ol))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,Gi))==null||e.call(this),Xe(this,Gi,void 0))}setEventListener(e){var t;Xe(this,Ol,e),(t=Z(this,Gi))==null||t.call(this),Xe(this,Gi,e(this.setOnline.bind(this)))}setOnline(e){Z(this,Nl)!==e&&(Xe(this,Nl,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return Z(this,Nl)}},Nl=new WeakMap,Gi=new WeakMap,Ol=new WeakMap,rS),sd=new aO;function Dy(){let n,e;const t=new Promise((r,o)=>{n=r,e=o});t.status="pending",t.catch(()=>{});function s(r){Object.assign(t,r),delete t.resolve,delete t.reject}return t.resolve=r=>{s({status:"fulfilled",value:r}),n(r)},t.reject=r=>{s({status:"rejected",reason:r}),e(r)},t}function lO(n){return Math.min(1e3*2**n,3e4)}function vS(n){return(n??"online")==="online"?sd.isOnline():!0}var wS=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Pm(n){return n instanceof wS}function xS(n){let e=!1,t=0,s=!1,r;const o=Dy(),l=A=>{var R;s||(x(new wS(A)),(R=n.abort)==null||R.call(n))},c=()=>{e=!0},f=()=>{e=!1},d=()=>ob.isFocused()&&(n.networkMode==="always"||sd.isOnline())&&n.canRun(),g=()=>vS(n.networkMode)&&n.canRun(),_=A=>{var R;s||(s=!0,(R=n.onSuccess)==null||R.call(n,A),r==null||r(),o.resolve(A))},x=A=>{var R;s||(s=!0,(R=n.onError)==null||R.call(n,A),r==null||r(),o.reject(A))},E=()=>new Promise(A=>{var R;r=k=>{(s||d())&&A(k)},(R=n.onPause)==null||R.call(n)}).then(()=>{var A;r=void 0,s||(A=n.onContinue)==null||A.call(n)}),M=()=>{if(s)return;let A;const R=t===0?n.initialPromise:void 0;try{A=R??n.fn()}catch(k){A=Promise.reject(k)}Promise.resolve(A).then(_).catch(k=>{var W;if(s)return;const U=n.retry??(oa?0:3),I=n.retryDelay??lO,V=typeof I=="function"?I(t,k):I,H=U===!0||typeof U=="number"&&t<U||typeof U=="function"&&U(t,k);if(e||!H){x(k);return}t++,(W=n.onFail)==null||W.call(n,t,k),sO(V).then(()=>d()?void 0:E()).then(()=>{e?x(k):M()})})};return{promise:o,cancel:l,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:f,canStart:g,start:()=>(g()?M():E().then(M),o)}}var cO=n=>setTimeout(n,0);function uO(){let n=[],e=0,t=c=>{c()},s=c=>{c()},r=cO;const o=c=>{e?n.push(c):r(()=>{t(c)})},l=()=>{const c=n;n=[],c.length&&r(()=>{s(()=>{c.forEach(f=>{t(f)})})})};return{batch:c=>{let f;e++;try{f=c()}finally{e--,e||l()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{r=c}}}var In=uO(),Yo,iS,TS=(iS=class{constructor(){st(this,Yo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Iy(this.gcTime)&&Xe(this,Yo,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(oa?1/0:5*60*1e3))}clearGcTimeout(){Z(this,Yo)&&(clearTimeout(Z(this,Yo)),Xe(this,Yo,void 0))}},Yo=new WeakMap,iS),Il,kl,Xs,Ko,es,Vu,Zo,ur,ti,oS,fO=(oS=class extends TS{constructor(e){super();st(this,ur);st(this,Il);st(this,kl);st(this,Xs);st(this,Ko);st(this,es);st(this,Vu);st(this,Zo);Xe(this,Zo,!1),Xe(this,Vu,e.defaultOptions),this.setOptions(e.options),this.observers=[],Xe(this,Ko,e.client),Xe(this,Xs,Z(this,Ko).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Xe(this,Il,hO(this.options)),this.state=e.state??Z(this,Il),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Z(this,es))==null?void 0:e.promise}setOptions(e){this.options={...Z(this,Vu),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,Xs).remove(this)}setData(e,t){const s=Py(this.state.data,e,this.options);return pt(this,ur,ti).call(this,{data:s,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),s}setState(e,t){pt(this,ur,ti).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var s,r;const t=(s=Z(this,es))==null?void 0:s.promise;return(r=Z(this,es))==null||r.cancel(e),t?t.then(us).catch(us):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Z(this,Il))}isActive(){return this.observers.some(e=>hr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ib||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>uo(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:!mS(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=Z(this,es))==null||t.continue()}onOnline(){var t;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=Z(this,es))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Z(this,Xs).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(Z(this,es)&&(Z(this,Zo)?Z(this,es).cancel({revert:!0}):Z(this,es).cancelRetry()),this.scheduleGc()),Z(this,Xs).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||pt(this,ur,ti).call(this,{type:"invalidate"})}fetch(e,t){var d,g,_;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(Z(this,es))return Z(this,es).continueRetry(),Z(this,es).promise}if(e&&this.setOptions(e),!this.options.queryFn){const x=this.observers.find(E=>E.options.queryFn);x&&this.setOptions(x.options)}const s=new AbortController,r=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(Xe(this,Zo,!0),s.signal)})},o=()=>{const x=_S(this.options,t),M=(()=>{const A={client:Z(this,Ko),queryKey:this.queryKey,meta:this.meta};return r(A),A})();return Xe(this,Zo,!1),this.options.persister?this.options.persister(x,M,this):x(M)},c=(()=>{const x={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:Z(this,Ko),state:this.state,fetchFn:o};return r(x),x})();(d=this.options.behavior)==null||d.onFetch(c,this),Xe(this,kl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=c.fetchOptions)==null?void 0:g.meta))&&pt(this,ur,ti).call(this,{type:"fetch",meta:(_=c.fetchOptions)==null?void 0:_.meta});const f=x=>{var E,M,A,R;Pm(x)&&x.silent||pt(this,ur,ti).call(this,{type:"error",error:x}),Pm(x)||((M=(E=Z(this,Xs).config).onError)==null||M.call(E,x,this),(R=(A=Z(this,Xs).config).onSettled)==null||R.call(A,this.state.data,x,this)),this.scheduleGc()};return Xe(this,es,xS({initialPromise:t==null?void 0:t.initialPromise,fn:c.fetchFn,abort:s.abort.bind(s),onSuccess:x=>{var E,M,A,R;if(x===void 0){f(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(x)}catch(k){f(k);return}(M=(E=Z(this,Xs).config).onSuccess)==null||M.call(E,x,this),(R=(A=Z(this,Xs).config).onSettled)==null||R.call(A,x,this.state.error,this),this.scheduleGc()},onError:f,onFail:(x,E)=>{pt(this,ur,ti).call(this,{type:"failed",failureCount:x,error:E})},onPause:()=>{pt(this,ur,ti).call(this,{type:"pause"})},onContinue:()=>{pt(this,ur,ti).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0})),Z(this,es).start()}},Il=new WeakMap,kl=new WeakMap,Xs=new WeakMap,Ko=new WeakMap,es=new WeakMap,Vu=new WeakMap,Zo=new WeakMap,ur=new WeakSet,ti=function(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...SS(s.data,this.options),fetchMeta:e.meta??null};case"success":return{...s,data:e.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Pm(r)&&r.revert&&Z(this,kl)?{...Z(this,kl),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),In.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),Z(this,Xs).notify({query:this,type:"updated",action:e})})},oS);function SS(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vS(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function hO(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,s=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Rr,aS,dO=(aS=class extends Jl{constructor(e={}){super();st(this,Rr);this.config=e,Xe(this,Rr,new Map)}build(e,t,s){const r=t.queryKey,o=t.queryHash??rb(r,t);let l=this.get(o);return l||(l=new fO({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(l)),l}add(e){Z(this,Rr).has(e.queryHash)||(Z(this,Rr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=Z(this,Rr).get(e.queryHash);t&&(e.destroy(),t===e&&Z(this,Rr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){In.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Z(this,Rr).get(e)}getAll(){return[...Z(this,Rr).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>e1(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>e1(e,s)):t}notify(e){In.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){In.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){In.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Rr=new WeakMap,aS),Cr,ls,Qo,Mr,Xi,lS,pO=(lS=class extends TS{constructor(e){super();st(this,Mr);st(this,Cr);st(this,ls);st(this,Qo);this.mutationId=e.mutationId,Xe(this,ls,e.mutationCache),Xe(this,Cr,[]),this.state=e.state||ES(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Z(this,Cr).includes(e)||(Z(this,Cr).push(e),this.clearGcTimeout(),Z(this,ls).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Xe(this,Cr,Z(this,Cr).filter(t=>t!==e)),this.scheduleGc(),Z(this,ls).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Z(this,Cr).length||(this.state.status==="pending"?this.scheduleGc():Z(this,ls).remove(this))}continue(){var e;return((e=Z(this,Qo))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,c,f,d,g,_,x,E,M,A,R,k,U,I,V,H,W,ee,Q;const t=()=>{pt(this,Mr,Xi).call(this,{type:"continue"})};Xe(this,Qo,xS({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(ge,Ne)=>{pt(this,Mr,Xi).call(this,{type:"failed",failureCount:ge,error:Ne})},onPause:()=>{pt(this,Mr,Xi).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,ls).canRun(this)}));const s=this.state.status==="pending",r=!Z(this,Qo).canStart();try{if(s)t();else{pt(this,Mr,Xi).call(this,{type:"pending",variables:e,isPaused:r}),await((l=(o=Z(this,ls).config).onMutate)==null?void 0:l.call(o,e,this));const Ne=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,e));Ne!==this.state.context&&pt(this,Mr,Xi).call(this,{type:"pending",context:Ne,variables:e,isPaused:r})}const ge=await Z(this,Qo).start();return await((g=(d=Z(this,ls).config).onSuccess)==null?void 0:g.call(d,ge,e,this.state.context,this)),await((x=(_=this.options).onSuccess)==null?void 0:x.call(_,ge,e,this.state.context)),await((M=(E=Z(this,ls).config).onSettled)==null?void 0:M.call(E,ge,null,this.state.variables,this.state.context,this)),await((R=(A=this.options).onSettled)==null?void 0:R.call(A,ge,null,e,this.state.context)),pt(this,Mr,Xi).call(this,{type:"success",data:ge}),ge}catch(ge){try{throw await((U=(k=Z(this,ls).config).onError)==null?void 0:U.call(k,ge,e,this.state.context,this)),await((V=(I=this.options).onError)==null?void 0:V.call(I,ge,e,this.state.context)),await((W=(H=Z(this,ls).config).onSettled)==null?void 0:W.call(H,void 0,ge,this.state.variables,this.state.context,this)),await((Q=(ee=this.options).onSettled)==null?void 0:Q.call(ee,void 0,ge,e,this.state.context)),ge}finally{pt(this,Mr,Xi).call(this,{type:"error",error:ge})}}finally{Z(this,ls).runNext(this)}}},Cr=new WeakMap,ls=new WeakMap,Qo=new WeakMap,Mr=new WeakSet,Xi=function(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),In.batch(()=>{Z(this,Cr).forEach(s=>{s.onMutationUpdate(e)}),Z(this,ls).notify({mutation:this,type:"updated",action:e})})},lS);function ES(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ri,fr,$u,cS,gO=(cS=class extends Jl{constructor(e={}){super();st(this,ri);st(this,fr);st(this,$u);this.config=e,Xe(this,ri,new Set),Xe(this,fr,new Map),Xe(this,$u,0)}build(e,t,s){const r=new pO({mutationCache:this,mutationId:++mh(this,$u)._,options:e.defaultMutationOptions(t),state:s});return this.add(r),r}add(e){Z(this,ri).add(e);const t=yh(e);if(typeof t=="string"){const s=Z(this,fr).get(t);s?s.push(e):Z(this,fr).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Z(this,ri).delete(e)){const t=yh(e);if(typeof t=="string"){const s=Z(this,fr).get(t);if(s)if(s.length>1){const r=s.indexOf(e);r!==-1&&s.splice(r,1)}else s[0]===e&&Z(this,fr).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=yh(e);if(typeof t=="string"){const s=Z(this,fr).get(t),r=s==null?void 0:s.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){var s;const t=yh(e);if(typeof t=="string"){const r=(s=Z(this,fr).get(t))==null?void 0:s.find(o=>o!==e&&o.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){In.batch(()=>{Z(this,ri).forEach(e=>{this.notify({type:"removed",mutation:e})}),Z(this,ri).clear(),Z(this,fr).clear()})}getAll(){return Array.from(Z(this,ri))}find(e){const t={exact:!0,...e};return this.getAll().find(s=>t1(t,s))}findAll(e={}){return this.getAll().filter(t=>t1(e,t))}notify(e){In.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return In.batch(()=>Promise.all(e.map(t=>t.continue().catch(us))))}},ri=new WeakMap,fr=new WeakMap,$u=new WeakMap,cS);function yh(n){var e;return(e=n.options.scope)==null?void 0:e.id}function r1(n){return{onFetch:(e,t)=>{var g,_,x,E,M;const s=e.options,r=(x=(_=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:_.fetchMore)==null?void 0:x.direction,o=((E=e.state.data)==null?void 0:E.pages)||[],l=((M=e.state.data)==null?void 0:M.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let A=!1;const R=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(e.signal.aborted?A=!0:e.signal.addEventListener("abort",()=>{A=!0}),e.signal)})},k=_S(e.options,e.fetchOptions),U=async(I,V,H)=>{if(A)return Promise.reject();if(V==null&&I.pages.length)return Promise.resolve(I);const ee=(()=>{const ne={client:e.client,queryKey:e.queryKey,pageParam:V,direction:H?"backward":"forward",meta:e.options.meta};return R(ne),ne})(),Q=await k(ee),{maxPages:ge}=e.options,Ne=H?iO:rO;return{pages:Ne(I.pages,Q,ge),pageParams:Ne(I.pageParams,V,ge)}};if(r&&o.length){const I=r==="backward",V=I?mO:i1,H={pages:o,pageParams:l},W=V(s,H);c=await U(H,W,I)}else{const I=n??o.length;do{const V=f===0?l[0]??s.initialPageParam:i1(s,c);if(f>0&&V==null)break;c=await U(c,V),f++}while(f<I)}return c};e.options.persister?e.fetchFn=()=>{var A,R;return(R=(A=e.options).persister)==null?void 0:R.call(A,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=d}}}function i1(n,{pages:e,pageParams:t}){const s=e.length-1;return e.length>0?n.getNextPageParam(e[s],e,t[s],t):void 0}function mO(n,{pages:e,pageParams:t}){var s;return e.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,e[0],e,t[0],t):void 0}var fn,Ji,eo,Pl,Dl,to,Bl,Ul,uS,AS=(uS=class{constructor(n={}){st(this,fn);st(this,Ji);st(this,eo);st(this,Pl);st(this,Dl);st(this,to);st(this,Bl);st(this,Ul);Xe(this,fn,n.queryCache||new dO),Xe(this,Ji,n.mutationCache||new gO),Xe(this,eo,n.defaultOptions||{}),Xe(this,Pl,new Map),Xe(this,Dl,new Map),Xe(this,to,0)}mount(){mh(this,to)._++,Z(this,to)===1&&(Xe(this,Bl,ob.subscribe(async n=>{n&&(await this.resumePausedMutations(),Z(this,fn).onFocus())})),Xe(this,Ul,sd.subscribe(async n=>{n&&(await this.resumePausedMutations(),Z(this,fn).onOnline())})))}unmount(){var n,e;mh(this,to)._--,Z(this,to)===0&&((n=Z(this,Bl))==null||n.call(this),Xe(this,Bl,void 0),(e=Z(this,Ul))==null||e.call(this),Xe(this,Ul,void 0))}isFetching(n){return Z(this,fn).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return Z(this,Ji).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=Z(this,fn).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=Z(this,fn).build(this,e),s=t.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(uo(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(n){return Z(this,fn).findAll(n).map(({queryKey:e,state:t})=>{const s=t.data;return[e,s]})}setQueryData(n,e,t){const s=this.defaultQueryOptions({queryKey:n}),r=Z(this,fn).get(s.queryHash),o=r==null?void 0:r.state.data,l=nO(e,o);if(l!==void 0)return Z(this,fn).build(this,s).setData(l,{...t,manual:!0})}setQueriesData(n,e,t){return In.batch(()=>Z(this,fn).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=Z(this,fn).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=Z(this,fn);In.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=Z(this,fn);return In.batch(()=>(t.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},s=In.batch(()=>Z(this,fn).findAll(n).map(r=>r.cancel(t)));return Promise.all(s).then(us).catch(us)}invalidateQueries(n,e={}){return In.batch(()=>(Z(this,fn).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},s=In.batch(()=>Z(this,fn).findAll(n).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let o=r.fetch(void 0,t);return t.throwOnError||(o=o.catch(us)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(us)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=Z(this,fn).build(this,e);return t.isStaleByTime(uo(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(us).catch(us)}fetchInfiniteQuery(n){return n.behavior=r1(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(us).catch(us)}ensureInfiniteQueryData(n){return n.behavior=r1(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return sd.isOnline()?Z(this,Ji).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,fn)}getMutationCache(){return Z(this,Ji)}getDefaultOptions(){return Z(this,eo)}setDefaultOptions(n){Xe(this,eo,n)}setQueryDefaults(n,e){Z(this,Pl).set(aa(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...Z(this,Pl).values()],t={};return e.forEach(s=>{Ou(n,s.queryKey)&&Object.assign(t,s.defaultOptions)}),t}setMutationDefaults(n,e){Z(this,Dl).set(aa(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...Z(this,Dl).values()],t={};return e.forEach(s=>{Ou(n,s.mutationKey)&&Object.assign(t,s.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...Z(this,eo).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=rb(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ib&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...Z(this,eo).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){Z(this,fn).clear(),Z(this,Ji).clear()}},fn=new WeakMap,Ji=new WeakMap,eo=new WeakMap,Pl=new WeakMap,Dl=new WeakMap,to=new WeakMap,Bl=new WeakMap,Ul=new WeakMap,uS),vs,Et,Hu,cs,Go,Fl,no,so,Wu,jl,Ll,Jo,ea,ro,zl,Bt,uu,By,Uy,Fy,jy,Ly,zy,Vy,RS,fS,yO=(fS=class extends Jl{constructor(e,t){super();st(this,Bt);st(this,vs);st(this,Et);st(this,Hu);st(this,cs);st(this,Go);st(this,Fl);st(this,no);st(this,so);st(this,Wu);st(this,jl);st(this,Ll);st(this,Jo);st(this,ea);st(this,ro);st(this,zl,new Set);this.options=t,Xe(this,vs,e),Xe(this,so,null),Xe(this,no,Dy()),this.options.experimental_prefetchInRender||Z(this,no).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Z(this,Et).addObserver(this),o1(Z(this,Et),this.options)?pt(this,Bt,uu).call(this):this.updateResult(),pt(this,Bt,jy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $y(Z(this,Et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $y(Z(this,Et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,pt(this,Bt,Ly).call(this),pt(this,Bt,zy).call(this),Z(this,Et).removeObserver(this)}setOptions(e){const t=this.options,s=Z(this,Et);if(this.options=Z(this,vs).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hr(this.options.enabled,Z(this,Et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");pt(this,Bt,Vy).call(this),Z(this,Et).setOptions(this.options),t._defaulted&&!nd(this.options,t)&&Z(this,vs).getQueryCache().notify({type:"observerOptionsUpdated",query:Z(this,Et),observer:this});const r=this.hasListeners();r&&a1(Z(this,Et),s,this.options,t)&&pt(this,Bt,uu).call(this),this.updateResult(),r&&(Z(this,Et)!==s||hr(this.options.enabled,Z(this,Et))!==hr(t.enabled,Z(this,Et))||uo(this.options.staleTime,Z(this,Et))!==uo(t.staleTime,Z(this,Et)))&&pt(this,Bt,By).call(this);const o=pt(this,Bt,Uy).call(this);r&&(Z(this,Et)!==s||hr(this.options.enabled,Z(this,Et))!==hr(t.enabled,Z(this,Et))||o!==Z(this,ro))&&pt(this,Bt,Fy).call(this,o)}getOptimisticResult(e){const t=Z(this,vs).getQueryCache().build(Z(this,vs),e),s=this.createResult(t,e);return bO(this,s)&&(Xe(this,cs,s),Xe(this,Fl,this.options),Xe(this,Go,Z(this,Et).state)),s}getCurrentResult(){return Z(this,cs)}trackResult(e,t){return new Proxy(e,{get:(s,r)=>(this.trackProp(r),t==null||t(r),Reflect.get(s,r))})}trackProp(e){Z(this,zl).add(e)}getCurrentQuery(){return Z(this,Et)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=Z(this,vs).defaultQueryOptions(e),s=Z(this,vs).getQueryCache().build(Z(this,vs),t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return pt(this,Bt,uu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Z(this,cs)))}createResult(e,t){var ge;const s=Z(this,Et),r=this.options,o=Z(this,cs),l=Z(this,Go),c=Z(this,Fl),d=e!==s?e.state:Z(this,Hu),{state:g}=e;let _={...g},x=!1,E;if(t._optimisticResults){const Ne=this.hasListeners(),ne=!Ne&&o1(e,t),ve=Ne&&a1(e,s,t,r);(ne||ve)&&(_={..._,...SS(g.data,e.options)}),t._optimisticResults==="isRestoring"&&(_.fetchStatus="idle")}let{error:M,errorUpdatedAt:A,status:R}=_;E=_.data;let k=!1;if(t.placeholderData!==void 0&&E===void 0&&R==="pending"){let Ne;o!=null&&o.isPlaceholderData&&t.placeholderData===(c==null?void 0:c.placeholderData)?(Ne=o.data,k=!0):Ne=typeof t.placeholderData=="function"?t.placeholderData((ge=Z(this,Ll))==null?void 0:ge.state.data,Z(this,Ll)):t.placeholderData,Ne!==void 0&&(R="success",E=Py(o==null?void 0:o.data,Ne,t),x=!0)}if(t.select&&E!==void 0&&!k)if(o&&E===(l==null?void 0:l.data)&&t.select===Z(this,Wu))E=Z(this,jl);else try{Xe(this,Wu,t.select),E=t.select(E),E=Py(o==null?void 0:o.data,E,t),Xe(this,jl,E),Xe(this,so,null)}catch(Ne){Xe(this,so,Ne)}Z(this,so)&&(M=Z(this,so),E=Z(this,jl),A=Date.now(),R="error");const U=_.fetchStatus==="fetching",I=R==="pending",V=R==="error",H=I&&U,W=E!==void 0,Q={status:R,fetchStatus:_.fetchStatus,isPending:I,isSuccess:R==="success",isError:V,isInitialLoading:H,isLoading:H,data:E,dataUpdatedAt:_.dataUpdatedAt,error:M,errorUpdatedAt:A,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:_.dataUpdateCount>0||_.errorUpdateCount>0,isFetchedAfterMount:_.dataUpdateCount>d.dataUpdateCount||_.errorUpdateCount>d.errorUpdateCount,isFetching:U,isRefetching:U&&!I,isLoadingError:V&&!W,isPaused:_.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:V&&W,isStale:ab(e,t),refetch:this.refetch,promise:Z(this,no)};if(this.options.experimental_prefetchInRender){const Ne=De=>{Q.status==="error"?De.reject(Q.error):Q.data!==void 0&&De.resolve(Q.data)},ne=()=>{const De=Xe(this,no,Q.promise=Dy());Ne(De)},ve=Z(this,no);switch(ve.status){case"pending":e.queryHash===s.queryHash&&Ne(ve);break;case"fulfilled":(Q.status==="error"||Q.data!==ve.value)&&ne();break;case"rejected":(Q.status!=="error"||Q.error!==ve.reason)&&ne();break}}return Q}updateResult(){const e=Z(this,cs),t=this.createResult(Z(this,Et),this.options);if(Xe(this,Go,Z(this,Et).state),Xe(this,Fl,this.options),Z(this,Go).data!==void 0&&Xe(this,Ll,Z(this,Et)),nd(t,e))return;Xe(this,cs,t);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!Z(this,zl).size)return!0;const l=new Set(o??Z(this,zl));return this.options.throwOnError&&l.add("error"),Object.keys(Z(this,cs)).some(c=>{const f=c;return Z(this,cs)[f]!==e[f]&&l.has(f)})};pt(this,Bt,RS).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&pt(this,Bt,jy).call(this)}},vs=new WeakMap,Et=new WeakMap,Hu=new WeakMap,cs=new WeakMap,Go=new WeakMap,Fl=new WeakMap,no=new WeakMap,so=new WeakMap,Wu=new WeakMap,jl=new WeakMap,Ll=new WeakMap,Jo=new WeakMap,ea=new WeakMap,ro=new WeakMap,zl=new WeakMap,Bt=new WeakSet,uu=function(e){pt(this,Bt,Vy).call(this);let t=Z(this,Et).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(us)),t},By=function(){pt(this,Bt,Ly).call(this);const e=uo(this.options.staleTime,Z(this,Et));if(oa||Z(this,cs).isStale||!Iy(e))return;const s=mS(Z(this,cs).dataUpdatedAt,e)+1;Xe(this,Jo,setTimeout(()=>{Z(this,cs).isStale||this.updateResult()},s))},Uy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Z(this,Et)):this.options.refetchInterval)??!1},Fy=function(e){pt(this,Bt,zy).call(this),Xe(this,ro,e),!(oa||hr(this.options.enabled,Z(this,Et))===!1||!Iy(Z(this,ro))||Z(this,ro)===0)&&Xe(this,ea,setInterval(()=>{(this.options.refetchIntervalInBackground||ob.isFocused())&&pt(this,Bt,uu).call(this)},Z(this,ro)))},jy=function(){pt(this,Bt,By).call(this),pt(this,Bt,Fy).call(this,pt(this,Bt,Uy).call(this))},Ly=function(){Z(this,Jo)&&(clearTimeout(Z(this,Jo)),Xe(this,Jo,void 0))},zy=function(){Z(this,ea)&&(clearInterval(Z(this,ea)),Xe(this,ea,void 0))},Vy=function(){const e=Z(this,vs).getQueryCache().build(Z(this,vs),this.options);if(e===Z(this,Et))return;const t=Z(this,Et);Xe(this,Et,e),Xe(this,Hu,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},RS=function(e){In.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(Z(this,cs))}),Z(this,vs).getQueryCache().notify({query:Z(this,Et),type:"observerResultsUpdated"})})},fS);function _O(n,e){return hr(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function o1(n,e){return _O(n,e)||n.state.data!==void 0&&$y(n,e,e.refetchOnMount)}function $y(n,e,t){if(hr(e.enabled,n)!==!1&&uo(e.staleTime,n)!=="static"){const s=typeof t=="function"?t(n):t;return s==="always"||s!==!1&&ab(n,e)}return!1}function a1(n,e,t,s){return(n!==e||hr(s.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&ab(n,t)}function ab(n,e){return hr(e.enabled,n)!==!1&&n.isStaleByTime(uo(e.staleTime,n))}function bO(n,e){return!nd(n.getCurrentResult(),e)}var io,oo,ws,ii,li,$h,Hy,hS,vO=(hS=class extends Jl{constructor(t,s){super();st(this,li);st(this,io);st(this,oo);st(this,ws);st(this,ii);Xe(this,io,t),this.setOptions(s),this.bindMethods(),pt(this,li,$h).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=Z(this,io).defaultMutationOptions(t),nd(this.options,s)||Z(this,io).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Z(this,ws),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&aa(s.mutationKey)!==aa(this.options.mutationKey)?this.reset():((r=Z(this,ws))==null?void 0:r.state.status)==="pending"&&Z(this,ws).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=Z(this,ws))==null||t.removeObserver(this)}onMutationUpdate(t){pt(this,li,$h).call(this),pt(this,li,Hy).call(this,t)}getCurrentResult(){return Z(this,oo)}reset(){var t;(t=Z(this,ws))==null||t.removeObserver(this),Xe(this,ws,void 0),pt(this,li,$h).call(this),pt(this,li,Hy).call(this)}mutate(t,s){var r;return Xe(this,ii,s),(r=Z(this,ws))==null||r.removeObserver(this),Xe(this,ws,Z(this,io).getMutationCache().build(Z(this,io),this.options)),Z(this,ws).addObserver(this),Z(this,ws).execute(t)}},io=new WeakMap,oo=new WeakMap,ws=new WeakMap,ii=new WeakMap,li=new WeakSet,$h=function(){var s;const t=((s=Z(this,ws))==null?void 0:s.state)??ES();Xe(this,oo,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Hy=function(t){In.batch(()=>{var s,r,o,l,c,f,d,g;if(Z(this,ii)&&this.hasListeners()){const _=Z(this,oo).variables,x=Z(this,oo).context;(t==null?void 0:t.type)==="success"?((r=(s=Z(this,ii)).onSuccess)==null||r.call(s,t.data,_,x),(l=(o=Z(this,ii)).onSettled)==null||l.call(o,t.data,null,_,x)):(t==null?void 0:t.type)==="error"&&((f=(c=Z(this,ii)).onError)==null||f.call(c,t.error,_,x),(g=(d=Z(this,ii)).onSettled)==null||g.call(d,void 0,t.error,_,x))}this.listeners.forEach(_=>{_(Z(this,oo))})})},hS),CS=N.createContext(void 0),Xu=n=>{const e=N.useContext(CS);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},MS=({client:n,children:e})=>(N.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),T.jsx(CS.Provider,{value:n,children:e})),NS=N.createContext(!1),wO=()=>N.useContext(NS);NS.Provider;function xO(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var TO=N.createContext(xO()),SO=()=>N.useContext(TO),EO=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},AO=n=>{N.useEffect(()=>{n.clearReset()},[n])},RO=({result:n,errorResetBoundary:e,throwOnError:t,query:s,suspense:r})=>n.isError&&!e.isReset()&&!n.isFetching&&s&&(r&&n.data===void 0||bS(t,[n.error,s])),CO=n=>{if(n.suspense){const e=s=>s==="static"?s:Math.max(s??1e3,1e3),t=n.staleTime;n.staleTime=typeof t=="function"?(...s)=>e(t(...s)):e(t),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},MO=(n,e)=>n.isLoading&&n.isFetching&&!e,NO=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,l1=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function OO(n,e,t){var _,x,E,M,A;const s=wO(),r=SO(),o=Xu(),l=o.defaultQueryOptions(n);(x=(_=o.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||x.call(_,l),l._optimisticResults=s?"isRestoring":"optimistic",CO(l),EO(l,r),AO(r);const c=!o.getQueryCache().get(l.queryHash),[f]=N.useState(()=>new e(o,l)),d=f.getOptimisticResult(l),g=!s&&n.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(R=>{const k=g?f.subscribe(In.batchCalls(R)):us;return f.updateResult(),k},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),N.useEffect(()=>{f.setOptions(l)},[l,f]),NO(l,d))throw l1(l,f,r);if(RO({result:d,errorResetBoundary:r,throwOnError:l.throwOnError,query:o.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw d.error;if((M=(E=o.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||M.call(E,l,d),l.experimental_prefetchInRender&&!oa&&MO(d,s)){const R=c?l1(l,f,r):(A=o.getQueryCache().get(l.queryHash))==null?void 0:A.promise;R==null||R.catch(us).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?d:f.trackResult(d)}function po(n,e){return OO(n,yO)}function OS(n,e){const t=Xu(),[s]=N.useState(()=>new vO(t,n));N.useEffect(()=>{s.setOptions(n)},[s,n]);const r=N.useSyncExternalStore(N.useCallback(l=>s.subscribe(In.batchCalls(l)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),o=N.useCallback((l,c)=>{s.mutate(l,c).catch(us)},[s]);if(r.error&&bS(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}var ec=gS();const IO=tb(ec);function vt(n,e,{checkForDefaultPrevented:t=!0}={}){return function(r){if(n==null||n(r),t===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function c1(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}function IS(...n){return e=>{let t=!1;const s=n.map(r=>{const o=c1(r,e);return!t&&typeof o=="function"&&(t=!0),o});if(t)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():c1(n[r],null)}}}}function _n(...n){return N.useCallback(IS(...n),n)}function tc(n,e=[]){let t=[];function s(o,l){const c=N.createContext(l),f=t.length;t=[...t,l];const d=_=>{var k;const{scope:x,children:E,...M}=_,A=((k=x==null?void 0:x[n])==null?void 0:k[f])||c,R=N.useMemo(()=>M,Object.values(M));return T.jsx(A.Provider,{value:R,children:E})};d.displayName=o+"Provider";function g(_,x){var A;const E=((A=x==null?void 0:x[n])==null?void 0:A[f])||c,M=N.useContext(E);if(M)return M;if(l!==void 0)return l;throw new Error(`\`${_}\` must be used within \`${o}\``)}return[d,g]}const r=()=>{const o=t.map(l=>N.createContext(l));return function(c){const f=(c==null?void 0:c[n])||o;return N.useMemo(()=>({[`__scope${n}`]:{...c,[n]:f}}),[c,f])}};return r.scopeName=n,[s,kO(r,...e)]}function kO(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const s=n.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(o){const l=s.reduce((c,{useScope:f,scopeName:d})=>{const _=f(o)[`__scope${d}`];return{...c,..._}},{});return N.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])}};return t.scopeName=e.scopeName,t}function Iu(n){const e=PO(n),t=N.forwardRef((s,r)=>{const{children:o,...l}=s,c=N.Children.toArray(o),f=c.find(BO);if(f){const d=f.props.children,g=c.map(_=>_===f?N.Children.count(d)>1?N.Children.only(null):N.isValidElement(d)?d.props.children:null:_);return T.jsx(e,{...l,ref:r,children:N.isValidElement(d)?N.cloneElement(d,void 0,g):null})}return T.jsx(e,{...l,ref:r,children:o})});return t.displayName=`${n}.Slot`,t}var kS=Iu("Slot");function PO(n){const e=N.forwardRef((t,s)=>{const{children:r,...o}=t;if(N.isValidElement(r)){const l=FO(r),c=UO(o,r.props);return r.type!==N.Fragment&&(c.ref=s?IS(s,l):l),N.cloneElement(r,c)}return N.Children.count(r)>1?N.Children.only(null):null});return e.displayName=`${n}.SlotClone`,e}var DO=Symbol("radix.slottable");function BO(n){return N.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===DO}function UO(n,e){const t={...e};for(const s in e){const r=n[s],o=e[s];/^on[A-Z]/.test(s)?r&&o?t[s]=(...c)=>{const f=o(...c);return r(...c),f}:r&&(t[s]=r):s==="style"?t[s]={...r,...o}:s==="className"&&(t[s]=[r,o].filter(Boolean).join(" "))}return{...n,...t}}function FO(n){var s,r;let e=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(r=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function lb(n){const e=n+"CollectionProvider",[t,s]=tc(e),[r,o]=t(e,{collectionRef:{current:null},itemMap:new Map}),l=A=>{const{scope:R,children:k}=A,U=Wi.useRef(null),I=Wi.useRef(new Map).current;return T.jsx(r,{scope:R,itemMap:I,collectionRef:U,children:k})};l.displayName=e;const c=n+"CollectionSlot",f=Iu(c),d=Wi.forwardRef((A,R)=>{const{scope:k,children:U}=A,I=o(c,k),V=_n(R,I.collectionRef);return T.jsx(f,{ref:V,children:U})});d.displayName=c;const g=n+"CollectionItemSlot",_="data-radix-collection-item",x=Iu(g),E=Wi.forwardRef((A,R)=>{const{scope:k,children:U,...I}=A,V=Wi.useRef(null),H=_n(R,V),W=o(g,k);return Wi.useEffect(()=>(W.itemMap.set(V,{ref:V,...I}),()=>void W.itemMap.delete(V))),T.jsx(x,{[_]:"",ref:H,children:U})});E.displayName=g;function M(A){const R=o(n+"CollectionConsumer",A);return Wi.useCallback(()=>{const U=R.collectionRef.current;if(!U)return[];const I=Array.from(U.querySelectorAll(`[${_}]`));return Array.from(R.itemMap.values()).sort((W,ee)=>I.indexOf(W.ref.current)-I.indexOf(ee.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:l,Slot:d,ItemSlot:E},M,s]}var jO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rt=jO.reduce((n,e)=>{const t=Iu(`Primitive.${e}`),s=N.forwardRef((r,o)=>{const{asChild:l,...c}=r,f=l?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(f,{...c,ref:o})});return s.displayName=`Primitive.${e}`,{...n,[e]:s}},{});function PS(n,e){n&&ec.flushSync(()=>n.dispatchEvent(e))}function Gs(n){const e=N.useRef(n);return N.useEffect(()=>{e.current=n}),N.useMemo(()=>(...t)=>{var s;return(s=e.current)==null?void 0:s.call(e,...t)},[])}function LO(n,e=globalThis==null?void 0:globalThis.document){const t=Gs(n);N.useEffect(()=>{const s=r=>{r.key==="Escape"&&t(r)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[t,e])}var zO="DismissableLayer",Wy="dismissableLayer.update",VO="dismissableLayer.pointerDownOutside",$O="dismissableLayer.focusOutside",u1,DS=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cb=N.forwardRef((n,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...f}=n,d=N.useContext(DS),[g,_]=N.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=N.useState({}),M=_n(e,ee=>_(ee)),A=Array.from(d.layers),[R]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),k=A.indexOf(R),U=g?A.indexOf(g):-1,I=d.layersWithOutsidePointerEventsDisabled.size>0,V=U>=k,H=WO(ee=>{const Q=ee.target,ge=[...d.branches].some(Ne=>Ne.contains(Q));!V||ge||(r==null||r(ee),l==null||l(ee),ee.defaultPrevented||c==null||c())},x),W=XO(ee=>{const Q=ee.target;[...d.branches].some(Ne=>Ne.contains(Q))||(o==null||o(ee),l==null||l(ee),ee.defaultPrevented||c==null||c())},x);return LO(ee=>{U===d.layers.size-1&&(s==null||s(ee),!ee.defaultPrevented&&c&&(ee.preventDefault(),c()))},x),N.useEffect(()=>{if(g)return t&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(u1=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(g)),d.layers.add(g),f1(),()=>{t&&d.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=u1)}},[g,x,t,d]),N.useEffect(()=>()=>{g&&(d.layers.delete(g),d.layersWithOutsidePointerEventsDisabled.delete(g),f1())},[g,d]),N.useEffect(()=>{const ee=()=>E({});return document.addEventListener(Wy,ee),()=>document.removeEventListener(Wy,ee)},[]),T.jsx(Rt.div,{...f,ref:M,style:{pointerEvents:I?V?"auto":"none":void 0,...n.style},onFocusCapture:vt(n.onFocusCapture,W.onFocusCapture),onBlurCapture:vt(n.onBlurCapture,W.onBlurCapture),onPointerDownCapture:vt(n.onPointerDownCapture,H.onPointerDownCapture)})});cb.displayName=zO;var HO="DismissableLayerBranch",BS=N.forwardRef((n,e)=>{const t=N.useContext(DS),s=N.useRef(null),r=_n(e,s);return N.useEffect(()=>{const o=s.current;if(o)return t.branches.add(o),()=>{t.branches.delete(o)}},[t.branches]),T.jsx(Rt.div,{...n,ref:r})});BS.displayName=HO;function WO(n,e=globalThis==null?void 0:globalThis.document){const t=Gs(n),s=N.useRef(!1),r=N.useRef(()=>{});return N.useEffect(()=>{const o=c=>{if(c.target&&!s.current){let f=function(){US(VO,t,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=f,e.addEventListener("click",r.current,{once:!0})):f()}else e.removeEventListener("click",r.current);s.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",o),e.removeEventListener("click",r.current)}},[e,t]),{onPointerDownCapture:()=>s.current=!0}}function XO(n,e=globalThis==null?void 0:globalThis.document){const t=Gs(n),s=N.useRef(!1);return N.useEffect(()=>{const r=o=>{o.target&&!s.current&&US($O,t,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function f1(){const n=new CustomEvent(Wy);document.dispatchEvent(n)}function US(n,e,t,{discrete:s}){const r=t.originalEvent.target,o=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(n,e,{once:!0}),s?PS(r,o):r.dispatchEvent(o)}var qO=cb,YO=BS,Kn=globalThis!=null&&globalThis.document?N.useLayoutEffect:()=>{},KO="Portal",ub=N.forwardRef((n,e)=>{var c;const{container:t,...s}=n,[r,o]=N.useState(!1);Kn(()=>o(!0),[]);const l=t||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?IO.createPortal(T.jsx(Rt.div,{...s,ref:e}),l):null});ub.displayName=KO;function ZO(n,e){return N.useReducer((t,s)=>e[t][s]??t,n)}var fb=n=>{const{present:e,children:t}=n,s=QO(e),r=typeof t=="function"?t({present:s.isPresent}):N.Children.only(t),o=_n(s.ref,GO(r));return typeof t=="function"||s.isPresent?N.cloneElement(r,{ref:o}):null};fb.displayName="Presence";function QO(n){const[e,t]=N.useState(),s=N.useRef(null),r=N.useRef(n),o=N.useRef("none"),l=n?"mounted":"unmounted",[c,f]=ZO(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const d=_h(s.current);o.current=c==="mounted"?d:"none"},[c]),Kn(()=>{const d=s.current,g=r.current;if(g!==n){const x=o.current,E=_h(d);n?f("MOUNT"):E==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(g&&x!==E?"ANIMATION_OUT":"UNMOUNT"),r.current=n}},[n,f]),Kn(()=>{if(e){let d;const g=e.ownerDocument.defaultView??window,_=E=>{const A=_h(s.current).includes(E.animationName);if(E.target===e&&A&&(f("ANIMATION_END"),!r.current)){const R=e.style.animationFillMode;e.style.animationFillMode="forwards",d=g.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=R)})}},x=E=>{E.target===e&&(o.current=_h(s.current))};return e.addEventListener("animationstart",x),e.addEventListener("animationcancel",_),e.addEventListener("animationend",_),()=>{g.clearTimeout(d),e.removeEventListener("animationstart",x),e.removeEventListener("animationcancel",_),e.removeEventListener("animationend",_)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:N.useCallback(d=>{s.current=d?getComputedStyle(d):null,t(d)},[])}}function _h(n){return(n==null?void 0:n.animationName)||"none"}function GO(n){var s,r;let e=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(r=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var JO=sb[" useInsertionEffect ".trim().toString()]||Kn;function ku({prop:n,defaultProp:e,onChange:t=()=>{},caller:s}){const[r,o,l]=eI({defaultProp:e,onChange:t}),c=n!==void 0,f=c?n:r;{const g=N.useRef(n!==void 0);N.useEffect(()=>{const _=g.current;_!==c&&console.warn(`${s} is changing from ${_?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=c},[c,s])}const d=N.useCallback(g=>{var _;if(c){const x=tI(g)?g(n):g;x!==n&&((_=l.current)==null||_.call(l,x))}else o(g)},[c,n,o,l]);return[f,d]}function eI({defaultProp:n,onChange:e}){const[t,s]=N.useState(n),r=N.useRef(t),o=N.useRef(e);return JO(()=>{o.current=e},[e]),N.useEffect(()=>{var l;r.current!==t&&((l=o.current)==null||l.call(o,t),r.current=t)},[t,r]),[t,s,o]}function tI(n){return typeof n=="function"}var FS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nI="VisuallyHidden",hb=N.forwardRef((n,e)=>T.jsx(Rt.span,{...n,ref:e,style:{...FS,...n.style}}));hb.displayName=nI;var db="ToastProvider",[pb,sI,rI]=lb("Toast"),[jS,tX]=tc("Toast",[rI]),[iI,tp]=jS(db),LS=n=>{const{__scopeToast:e,label:t="Notification",duration:s=5e3,swipeDirection:r="right",swipeThreshold:o=50,children:l}=n,[c,f]=N.useState(null),[d,g]=N.useState(0),_=N.useRef(!1),x=N.useRef(!1);return t.trim()||console.error(`Invalid prop \`label\` supplied to \`${db}\`. Expected non-empty \`string\`.`),T.jsx(pb.Provider,{scope:e,children:T.jsx(iI,{scope:e,label:t,duration:s,swipeDirection:r,swipeThreshold:o,toastCount:d,viewport:c,onViewportChange:f,onToastAdd:N.useCallback(()=>g(E=>E+1),[]),onToastRemove:N.useCallback(()=>g(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:_,isClosePausedRef:x,children:l})})};LS.displayName=db;var zS="ToastViewport",oI=["F8"],Xy="toast.viewportPause",qy="toast.viewportResume",VS=N.forwardRef((n,e)=>{const{__scopeToast:t,hotkey:s=oI,label:r="Notifications ({hotkey})",...o}=n,l=tp(zS,t),c=sI(t),f=N.useRef(null),d=N.useRef(null),g=N.useRef(null),_=N.useRef(null),x=_n(e,_,l.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=l.toastCount>0;N.useEffect(()=>{const R=k=>{var I;s.length!==0&&s.every(V=>k[V]||k.code===V)&&((I=_.current)==null||I.focus())};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[s]),N.useEffect(()=>{const R=f.current,k=_.current;if(M&&R&&k){const U=()=>{if(!l.isClosePausedRef.current){const W=new CustomEvent(Xy);k.dispatchEvent(W),l.isClosePausedRef.current=!0}},I=()=>{if(l.isClosePausedRef.current){const W=new CustomEvent(qy);k.dispatchEvent(W),l.isClosePausedRef.current=!1}},V=W=>{!R.contains(W.relatedTarget)&&I()},H=()=>{R.contains(document.activeElement)||I()};return R.addEventListener("focusin",U),R.addEventListener("focusout",V),R.addEventListener("pointermove",U),R.addEventListener("pointerleave",H),window.addEventListener("blur",U),window.addEventListener("focus",I),()=>{R.removeEventListener("focusin",U),R.removeEventListener("focusout",V),R.removeEventListener("pointermove",U),R.removeEventListener("pointerleave",H),window.removeEventListener("blur",U),window.removeEventListener("focus",I)}}},[M,l.isClosePausedRef]);const A=N.useCallback(({tabbingDirection:R})=>{const U=c().map(I=>{const V=I.ref.current,H=[V,...bI(V)];return R==="forwards"?H:H.reverse()});return(R==="forwards"?U.reverse():U).flat()},[c]);return N.useEffect(()=>{const R=_.current;if(R){const k=U=>{var H,W,ee;const I=U.altKey||U.ctrlKey||U.metaKey;if(U.key==="Tab"&&!I){const Q=document.activeElement,ge=U.shiftKey;if(U.target===R&&ge){(H=d.current)==null||H.focus();return}const ve=A({tabbingDirection:ge?"backwards":"forwards"}),De=ve.findIndex(be=>be===Q);Dm(ve.slice(De+1))?U.preventDefault():ge?(W=d.current)==null||W.focus():(ee=g.current)==null||ee.focus()}};return R.addEventListener("keydown",k),()=>R.removeEventListener("keydown",k)}},[c,A]),T.jsxs(YO,{ref:f,role:"region","aria-label":r.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:M?void 0:"none"},children:[M&&T.jsx(Yy,{ref:d,onFocusFromOutsideViewport:()=>{const R=A({tabbingDirection:"forwards"});Dm(R)}}),T.jsx(pb.Slot,{scope:t,children:T.jsx(Rt.ol,{tabIndex:-1,...o,ref:x})}),M&&T.jsx(Yy,{ref:g,onFocusFromOutsideViewport:()=>{const R=A({tabbingDirection:"backwards"});Dm(R)}})]})});VS.displayName=zS;var $S="ToastFocusProxy",Yy=N.forwardRef((n,e)=>{const{__scopeToast:t,onFocusFromOutsideViewport:s,...r}=n,o=tp($S,t);return T.jsx(hb,{"aria-hidden":!0,tabIndex:0,...r,ref:e,style:{position:"fixed"},onFocus:l=>{var d;const c=l.relatedTarget;!((d=o.viewport)!=null&&d.contains(c))&&s()}})});Yy.displayName=$S;var qu="Toast",aI="toast.swipeStart",lI="toast.swipeMove",cI="toast.swipeCancel",uI="toast.swipeEnd",HS=N.forwardRef((n,e)=>{const{forceMount:t,open:s,defaultOpen:r,onOpenChange:o,...l}=n,[c,f]=ku({prop:s,defaultProp:r??!0,onChange:o,caller:qu});return T.jsx(fb,{present:t||c,children:T.jsx(dI,{open:c,...l,ref:e,onClose:()=>f(!1),onPause:Gs(n.onPause),onResume:Gs(n.onResume),onSwipeStart:vt(n.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:vt(n.onSwipeMove,d=>{const{x:g,y:_}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${_}px`)}),onSwipeCancel:vt(n.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:vt(n.onSwipeEnd,d=>{const{x:g,y:_}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${_}px`),f(!1)})})})});HS.displayName=qu;var[fI,hI]=jS(qu,{onClose(){}}),dI=N.forwardRef((n,e)=>{const{__scopeToast:t,type:s="foreground",duration:r,open:o,onClose:l,onEscapeKeyDown:c,onPause:f,onResume:d,onSwipeStart:g,onSwipeMove:_,onSwipeCancel:x,onSwipeEnd:E,...M}=n,A=tp(qu,t),[R,k]=N.useState(null),U=_n(e,be=>k(be)),I=N.useRef(null),V=N.useRef(null),H=r||A.duration,W=N.useRef(0),ee=N.useRef(H),Q=N.useRef(0),{onToastAdd:ge,onToastRemove:Ne}=A,ne=Gs(()=>{var je;(R==null?void 0:R.contains(document.activeElement))&&((je=A.viewport)==null||je.focus()),l()}),ve=N.useCallback(be=>{!be||be===1/0||(window.clearTimeout(Q.current),W.current=new Date().getTime(),Q.current=window.setTimeout(ne,be))},[ne]);N.useEffect(()=>{const be=A.viewport;if(be){const je=()=>{ve(ee.current),d==null||d()},G=()=>{const Ae=new Date().getTime()-W.current;ee.current=ee.current-Ae,window.clearTimeout(Q.current),f==null||f()};return be.addEventListener(Xy,G),be.addEventListener(qy,je),()=>{be.removeEventListener(Xy,G),be.removeEventListener(qy,je)}}},[A.viewport,H,f,d,ve]),N.useEffect(()=>{o&&!A.isClosePausedRef.current&&ve(H)},[o,H,A.isClosePausedRef,ve]),N.useEffect(()=>(ge(),()=>Ne()),[ge,Ne]);const De=N.useMemo(()=>R?QS(R):null,[R]);return A.viewport?T.jsxs(T.Fragment,{children:[De&&T.jsx(pI,{__scopeToast:t,role:"status","aria-live":s==="foreground"?"assertive":"polite","aria-atomic":!0,children:De}),T.jsx(fI,{scope:t,onClose:ne,children:ec.createPortal(T.jsx(pb.ItemSlot,{scope:t,children:T.jsx(qO,{asChild:!0,onEscapeKeyDown:vt(c,()=>{A.isFocusedToastEscapeKeyDownRef.current||ne(),A.isFocusedToastEscapeKeyDownRef.current=!1}),children:T.jsx(Rt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":A.swipeDirection,...M,ref:U,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:vt(n.onKeyDown,be=>{be.key==="Escape"&&(c==null||c(be.nativeEvent),be.nativeEvent.defaultPrevented||(A.isFocusedToastEscapeKeyDownRef.current=!0,ne()))}),onPointerDown:vt(n.onPointerDown,be=>{be.button===0&&(I.current={x:be.clientX,y:be.clientY})}),onPointerMove:vt(n.onPointerMove,be=>{if(!I.current)return;const je=be.clientX-I.current.x,G=be.clientY-I.current.y,Ae=!!V.current,pe=["left","right"].includes(A.swipeDirection),qe=["left","up"].includes(A.swipeDirection)?Math.min:Math.max,K=pe?qe(0,je):0,Te=pe?0:qe(0,G),Se=be.pointerType==="touch"?10:2,he={x:K,y:Te},Ce={originalEvent:be,delta:he};Ae?(V.current=he,bh(lI,_,Ce,{discrete:!1})):h1(he,A.swipeDirection,Se)?(V.current=he,bh(aI,g,Ce,{discrete:!1}),be.target.setPointerCapture(be.pointerId)):(Math.abs(je)>Se||Math.abs(G)>Se)&&(I.current=null)}),onPointerUp:vt(n.onPointerUp,be=>{const je=V.current,G=be.target;if(G.hasPointerCapture(be.pointerId)&&G.releasePointerCapture(be.pointerId),V.current=null,I.current=null,je){const Ae=be.currentTarget,pe={originalEvent:be,delta:je};h1(je,A.swipeDirection,A.swipeThreshold)?bh(uI,E,pe,{discrete:!0}):bh(cI,x,pe,{discrete:!0}),Ae.addEventListener("click",qe=>qe.preventDefault(),{once:!0})}})})})}),A.viewport)})]}):null}),pI=n=>{const{__scopeToast:e,children:t,...s}=n,r=tp(qu,e),[o,l]=N.useState(!1),[c,f]=N.useState(!1);return yI(()=>l(!0)),N.useEffect(()=>{const d=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:T.jsx(ub,{asChild:!0,children:T.jsx(hb,{...s,children:o&&T.jsxs(T.Fragment,{children:[r.label," ",t]})})})},gI="ToastTitle",WS=N.forwardRef((n,e)=>{const{__scopeToast:t,...s}=n;return T.jsx(Rt.div,{...s,ref:e})});WS.displayName=gI;var mI="ToastDescription",XS=N.forwardRef((n,e)=>{const{__scopeToast:t,...s}=n;return T.jsx(Rt.div,{...s,ref:e})});XS.displayName=mI;var qS="ToastAction",YS=N.forwardRef((n,e)=>{const{altText:t,...s}=n;return t.trim()?T.jsx(ZS,{altText:t,asChild:!0,children:T.jsx(gb,{...s,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${qS}\`. Expected non-empty \`string\`.`),null)});YS.displayName=qS;var KS="ToastClose",gb=N.forwardRef((n,e)=>{const{__scopeToast:t,...s}=n,r=hI(KS,t);return T.jsx(ZS,{asChild:!0,children:T.jsx(Rt.button,{type:"button",...s,ref:e,onClick:vt(n.onClick,r.onClose)})})});gb.displayName=KS;var ZS=N.forwardRef((n,e)=>{const{__scopeToast:t,altText:s,...r}=n;return T.jsx(Rt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...r,ref:e})});function QS(n){const e=[];return Array.from(n.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&e.push(s.textContent),_I(s)){const r=s.ariaHidden||s.hidden||s.style.display==="none",o=s.dataset.radixToastAnnounceExclude==="";if(!r)if(o){const l=s.dataset.radixToastAnnounceAlt;l&&e.push(l)}else e.push(...QS(s))}}),e}function bh(n,e,t,{discrete:s}){const r=t.originalEvent.currentTarget,o=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:t});e&&r.addEventListener(n,e,{once:!0}),s?PS(r,o):r.dispatchEvent(o)}var h1=(n,e,t=0)=>{const s=Math.abs(n.x),r=Math.abs(n.y),o=s>r;return e==="left"||e==="right"?o&&s>t:!o&&r>t};function yI(n=()=>{}){const e=Gs(n);Kn(()=>{let t=0,s=0;return t=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(t),window.cancelAnimationFrame(s)}},[e])}function _I(n){return n.nodeType===n.ELEMENT_NODE}function bI(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function Dm(n){const e=document.activeElement;return n.some(t=>t===e?!0:(t.focus(),document.activeElement!==e))}var vI=LS,GS=VS,JS=HS,e3=WS,t3=XS,n3=YS,s3=gb;function r3(n){var e,t,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var r=n.length;for(e=0;e<r;e++)n[e]&&(t=r3(n[e]))&&(s&&(s+=" "),s+=t)}else for(t in n)n[t]&&(s&&(s+=" "),s+=t);return s}function i3(){for(var n,e,t=0,s="",r=arguments.length;t<r;t++)(n=arguments[t])&&(e=r3(n))&&(s&&(s+=" "),s+=e);return s}const d1=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,p1=i3,np=(n,e)=>t=>{var s;if((e==null?void 0:e.variants)==null)return p1(n,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:r,defaultVariants:o}=e,l=Object.keys(r).map(d=>{const g=t==null?void 0:t[d],_=o==null?void 0:o[d];if(g===null)return null;const x=d1(g)||d1(_);return r[d][x]}),c=t&&Object.entries(t).reduce((d,g)=>{let[_,x]=g;return x===void 0||(d[_]=x),d},{}),f=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((d,g)=>{let{class:_,className:x,...E}=g;return Object.entries(E).every(M=>{let[A,R]=M;return Array.isArray(R)?R.includes({...o,...c}[A]):{...o,...c}[A]===R})?[...d,_,x]:d},[]);return p1(n,l,f,t==null?void 0:t.class,t==null?void 0:t.className)};/**
49
+ `).replace(hN,"")}function mx(i,a){return a=gx(a),gx(i)===a}function nh(){}function Wt(i,a,u,h,m,w){switch(u){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||yi(i,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&yi(i,""+h);break;case"className":ke(i,"class",h);break;case"tabIndex":ke(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":ke(i,u,h);break;case"style":_v(i,h,w);break;case"data":if(a!=="object"){ke(i,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=uf(""+h),i.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){i.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 w=="function"&&(u==="formAction"?(a!=="input"&&Wt(i,a,"name",m.name,m,null),Wt(i,a,"formEncType",m.formEncType,m,null),Wt(i,a,"formMethod",m.formMethod,m,null),Wt(i,a,"formTarget",m.formTarget,m,null)):(Wt(i,a,"encType",m.encType,m,null),Wt(i,a,"method",m.method,m,null),Wt(i,a,"target",m.target,m,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(u);break}h=uf(""+h),i.setAttribute(u,h);break;case"onClick":h!=null&&(i.onclick=nh);break;case"onScroll":h!=null&&Tt("scroll",i);break;case"onScrollEnd":h!=null&&Tt("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(s(61));if(u=h.__html,u!=null){if(m.children!=null)throw Error(s(60));i.innerHTML=u}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}u=uf(""+h),i.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":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,""+h):i.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":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":h===!0?i.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(u,h):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(u,h):i.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(u):i.setAttribute(u,h);break;case"popover":Tt("beforetoggle",i),Tt("toggle",i),te(i,"popover",h);break;case"xlinkActuate":Ve(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Ve(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Ve(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Ve(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Ve(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Ve(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Ve(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Ve(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Ve(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":te(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=VC.get(u)||u,te(i,u,h))}}function um(i,a,u,h,m,w){switch(u){case"style":_v(i,h,w);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(s(61));if(u=h.__html,u!=null){if(m.children!=null)throw Error(s(60));i.innerHTML=u}}break;case"children":typeof h=="string"?yi(i,h):(typeof h=="number"||typeof h=="bigint")&&yi(i,""+h);break;case"onScroll":h!=null&&Tt("scroll",i);break;case"onScrollEnd":h!=null&&Tt("scrollend",i);break;case"onClick":h!=null&&(i.onclick=nh);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!We.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(m=u.endsWith("Capture"),a=u.slice(2,m?u.length-7:void 0),w=i[S]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(a,w,m),typeof h=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,h,m);break e}u in i?i[u]=h:h===!0?i.setAttribute(u,""):te(i,u,h)}}}function Wn(i,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Tt("error",i),Tt("load",i);var h=!1,m=!1,w;for(w in u)if(u.hasOwnProperty(w)){var C=u[w];if(C!=null)switch(w){case"src":h=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Wt(i,a,w,C,u,null)}}m&&Wt(i,a,"srcSet",u.srcSet,u,null),h&&Wt(i,a,"src",u.src,u,null);return;case"input":Tt("invalid",i);var B=w=C=m=null,X=null,de=null;for(h in u)if(u.hasOwnProperty(h)){var Re=u[h];if(Re!=null)switch(h){case"name":m=Re;break;case"type":C=Re;break;case"checked":X=Re;break;case"defaultChecked":de=Re;break;case"value":w=Re;break;case"defaultValue":B=Re;break;case"children":case"dangerouslySetInnerHTML":if(Re!=null)throw Error(s(137,a));break;default:Wt(i,a,h,Re,u,null)}}of(i,w,B,X,de,C,m,!1),gt(i);return;case"select":Tt("invalid",i),h=C=w=null;for(m in u)if(u.hasOwnProperty(m)&&(B=u[m],B!=null))switch(m){case"value":w=B;break;case"defaultValue":C=B;break;case"multiple":h=B;default:Wt(i,a,m,B,u,null)}a=w,u=C,i.multiple=!!h,a!=null?mi(i,!!h,a,!1):u!=null&&mi(i,!!h,u,!0);return;case"textarea":Tt("invalid",i),w=m=h=null;for(C in u)if(u.hasOwnProperty(C)&&(B=u[C],B!=null))switch(C){case"value":h=B;break;case"defaultValue":m=B;break;case"children":w=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(91));break;default:Wt(i,a,C,B,u,null)}lf(i,h,m,w),gt(i);return;case"option":for(X in u)if(u.hasOwnProperty(X)&&(h=u[X],h!=null))switch(X){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Wt(i,a,X,h,u,null)}return;case"dialog":Tt("beforetoggle",i),Tt("toggle",i),Tt("cancel",i),Tt("close",i);break;case"iframe":case"object":Tt("load",i);break;case"video":case"audio":for(h=0;h<Xc.length;h++)Tt(Xc[h],i);break;case"image":Tt("error",i),Tt("load",i);break;case"details":Tt("toggle",i);break;case"embed":case"source":case"link":Tt("error",i),Tt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in u)if(u.hasOwnProperty(de)&&(h=u[de],h!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,a));default:Wt(i,a,de,h,u,null)}return;default:if(Ap(a)){for(Re in u)u.hasOwnProperty(Re)&&(h=u[Re],h!==void 0&&um(i,a,Re,h,u,void 0));return}}for(B in u)u.hasOwnProperty(B)&&(h=u[B],h!=null&&Wt(i,a,B,h,u,null))}function dN(i,a,u,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,w=null,C=null,B=null,X=null,de=null,Re=null;for(_e in u){var Ie=u[_e];if(u.hasOwnProperty(_e)&&Ie!=null)switch(_e){case"checked":break;case"value":break;case"defaultValue":X=Ie;default:h.hasOwnProperty(_e)||Wt(i,a,_e,null,h,Ie)}}for(var me in h){var _e=h[me];if(Ie=u[me],h.hasOwnProperty(me)&&(_e!=null||Ie!=null))switch(me){case"type":w=_e;break;case"name":m=_e;break;case"checked":de=_e;break;case"defaultChecked":Re=_e;break;case"value":C=_e;break;case"defaultValue":B=_e;break;case"children":case"dangerouslySetInnerHTML":if(_e!=null)throw Error(s(137,a));break;default:_e!==Ie&&Wt(i,a,me,_e,h,Ie)}}cc(i,C,B,X,de,Re,w,m);return;case"select":_e=C=B=me=null;for(w in u)if(X=u[w],u.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":_e=X;default:h.hasOwnProperty(w)||Wt(i,a,w,null,h,X)}for(m in h)if(w=h[m],X=u[m],h.hasOwnProperty(m)&&(w!=null||X!=null))switch(m){case"value":me=w;break;case"defaultValue":B=w;break;case"multiple":C=w;default:w!==X&&Wt(i,a,m,w,h,X)}a=B,u=C,h=_e,me!=null?mi(i,!!u,me,!1):!!h!=!!u&&(a!=null?mi(i,!!u,a,!0):mi(i,!!u,u?[]:"",!1));return;case"textarea":_e=me=null;for(B in u)if(m=u[B],u.hasOwnProperty(B)&&m!=null&&!h.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:Wt(i,a,B,null,h,m)}for(C in h)if(m=h[C],w=u[C],h.hasOwnProperty(C)&&(m!=null||w!=null))switch(C){case"value":me=m;break;case"defaultValue":_e=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(s(91));break;default:m!==w&&Wt(i,a,C,m,h,w)}af(i,me,_e);return;case"option":for(var ut in u)if(me=u[ut],u.hasOwnProperty(ut)&&me!=null&&!h.hasOwnProperty(ut))switch(ut){case"selected":i.selected=!1;break;default:Wt(i,a,ut,null,h,me)}for(X in h)if(me=h[X],_e=u[X],h.hasOwnProperty(X)&&me!==_e&&(me!=null||_e!=null))switch(X){case"selected":i.selected=me&&typeof me!="function"&&typeof me!="symbol";break;default:Wt(i,a,X,me,h,_e)}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 it in u)me=u[it],u.hasOwnProperty(it)&&me!=null&&!h.hasOwnProperty(it)&&Wt(i,a,it,null,h,me);for(de in h)if(me=h[de],_e=u[de],h.hasOwnProperty(de)&&me!==_e&&(me!=null||_e!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(s(137,a));break;default:Wt(i,a,de,me,h,_e)}return;default:if(Ap(a)){for(var Xt in u)me=u[Xt],u.hasOwnProperty(Xt)&&me!==void 0&&!h.hasOwnProperty(Xt)&&um(i,a,Xt,void 0,h,me);for(Re in h)me=h[Re],_e=u[Re],!h.hasOwnProperty(Re)||me===_e||me===void 0&&_e===void 0||um(i,a,Re,me,h,_e);return}}for(var ae in u)me=u[ae],u.hasOwnProperty(ae)&&me!=null&&!h.hasOwnProperty(ae)&&Wt(i,a,ae,null,h,me);for(Ie in h)me=h[Ie],_e=u[Ie],!h.hasOwnProperty(Ie)||me===_e||me==null&&_e==null||Wt(i,a,Ie,me,h,_e)}var fm=null,hm=null;function sh(i){return i.nodeType===9?i:i.ownerDocument}function yx(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _x(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function dm(i,a){return i==="textarea"||i==="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 pm=null;function pN(){var i=window.event;return i&&i.type==="popstate"?i===pm?!1:(pm=i,!0):(pm=null,!1)}var bx=typeof setTimeout=="function"?setTimeout:void 0,gN=typeof clearTimeout=="function"?clearTimeout:void 0,vx=typeof Promise=="function"?Promise:void 0,mN=typeof queueMicrotask=="function"?queueMicrotask:typeof vx<"u"?function(i){return vx.resolve(null).then(i).catch(yN)}:bx;function yN(i){setTimeout(function(){throw i})}function Pi(i){return i==="head"}function wx(i,a){var u=a,h=0,m=0;do{var w=u.nextSibling;if(i.removeChild(u),w&&w.nodeType===8)if(u=w.data,u==="/$"){if(0<h&&8>h){u=h;var C=i.ownerDocument;if(u&1&&Yc(C.documentElement),u&2&&Yc(C.body),u&4)for(u=C.head,Yc(u),C=u.firstChild;C;){var B=C.nextSibling,X=C.nodeName;C[q]||X==="SCRIPT"||X==="STYLE"||X==="LINK"&&C.rel.toLowerCase()==="stylesheet"||u.removeChild(C),C=B}}if(m===0){i.removeChild(w),nu(a);return}m--}else u==="$"||u==="$?"||u==="$!"?m++:h=u.charCodeAt(0)-48;else h=0;u=w}while(u);nu(a)}function gm(i){var a=i.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":gm(u),we(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function _N(i,a,u,h){for(;i.nodeType===1;){var m=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[q])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==m.rel||i.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||i.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||i.getAttribute("title")!==(m.title==null?null:m.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(m.src==null?null:m.src)||i.getAttribute("type")!==(m.type==null?null:m.type)||i.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var w=m.name==null?null:""+m.name;if(m.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=ir(i.nextSibling),i===null)break}return null}function bN(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=ir(i.nextSibling),i===null))return null;return i}function mm(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState==="complete"}function vN(i,a){var u=i.ownerDocument;if(i.data!=="$?"||u.readyState==="complete")a();else{var h=function(){a(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function ir(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return i}var ym=null;function xx(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"){if(a===0)return i;a--}else u==="/$"&&a++}i=i.previousSibling}return null}function Tx(i,a,u){switch(a=sh(u),i){case"html":if(i=a.documentElement,!i)throw Error(s(452));return i;case"head":if(i=a.head,!i)throw Error(s(453));return i;case"body":if(i=a.body,!i)throw Error(s(454));return i;default:throw Error(s(451))}}function Yc(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);we(i)}var Ws=new Map,Sx=new Set;function rh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Jr=Ae.d;Ae.d={f:wN,r:xN,D:TN,C:SN,L:EN,m:AN,X:CN,S:RN,M:MN};function wN(){var i=Jr.f(),a=Kf();return i||a}function xN(i){var a=ye(i);a!==null&&a.tag===5&&a.type==="form"?H0(a):Jr.r(i)}var Za=typeof document>"u"?null:document;function Ex(i,a,u){var h=Za;if(h&&typeof a=="string"&&a){var m=Nt(a);m='link[rel="'+i+'"][href="'+m+'"]',typeof u=="string"&&(m+='[crossorigin="'+u+'"]'),Sx.has(m)||(Sx.add(m),i={rel:i,crossOrigin:u,href:a},h.querySelector(m)===null&&(a=h.createElement("link"),Wn(a,"link",i),Y(a),h.head.appendChild(a)))}}function TN(i){Jr.D(i),Ex("dns-prefetch",i,null)}function SN(i,a){Jr.C(i,a),Ex("preconnect",i,a)}function EN(i,a,u){Jr.L(i,a,u);var h=Za;if(h&&i&&a){var m='link[rel="preload"][as="'+Nt(a)+'"]';a==="image"&&u&&u.imageSrcSet?(m+='[imagesrcset="'+Nt(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(m+='[imagesizes="'+Nt(u.imageSizes)+'"]')):m+='[href="'+Nt(i)+'"]';var w=m;switch(a){case"style":w=Qa(i);break;case"script":w=Ga(i)}Ws.has(w)||(i=g({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),Ws.set(w,i),h.querySelector(m)!==null||a==="style"&&h.querySelector(Kc(w))||a==="script"&&h.querySelector(Zc(w))||(a=h.createElement("link"),Wn(a,"link",i),Y(a),h.head.appendChild(a)))}}function AN(i,a){Jr.m(i,a);var u=Za;if(u&&i){var h=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+Nt(h)+'"][href="'+Nt(i)+'"]',w=m;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Ga(i)}if(!Ws.has(w)&&(i=g({rel:"modulepreload",href:i},a),Ws.set(w,i),u.querySelector(m)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Zc(w)))return}h=u.createElement("link"),Wn(h,"link",i),Y(h),u.head.appendChild(h)}}}function RN(i,a,u){Jr.S(i,a,u);var h=Za;if(h&&i){var m=$e(h).hoistableStyles,w=Qa(i);a=a||"default";var C=m.get(w);if(!C){var B={loading:0,preload:null};if(C=h.querySelector(Kc(w)))B.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":a},u),(u=Ws.get(w))&&_m(i,u);var X=C=h.createElement("link");Y(X),Wn(X,"link",i),X._p=new Promise(function(de,Re){X.onload=de,X.onerror=Re}),X.addEventListener("load",function(){B.loading|=1}),X.addEventListener("error",function(){B.loading|=2}),B.loading|=4,ih(C,a,h)}C={type:"stylesheet",instance:C,count:1,state:B},m.set(w,C)}}}function CN(i,a){Jr.X(i,a);var u=Za;if(u&&i){var h=$e(u).hoistableScripts,m=Ga(i),w=h.get(m);w||(w=u.querySelector(Zc(m)),w||(i=g({src:i,async:!0},a),(a=Ws.get(m))&&bm(i,a),w=u.createElement("script"),Y(w),Wn(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},h.set(m,w))}}function MN(i,a){Jr.M(i,a);var u=Za;if(u&&i){var h=$e(u).hoistableScripts,m=Ga(i),w=h.get(m);w||(w=u.querySelector(Zc(m)),w||(i=g({src:i,async:!0,type:"module"},a),(a=Ws.get(m))&&bm(i,a),w=u.createElement("script"),Y(w),Wn(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},h.set(m,w))}}function Ax(i,a,u,h){var m=(m=Pe.current)?rh(m):null;if(!m)throw Error(s(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=Qa(u.href),u=$e(m).hoistableStyles,h=u.get(a),h||(h={type:"style",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=Qa(u.href);var w=$e(m).hoistableStyles,C=w.get(i);if(C||(m=m.ownerDocument||m,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,C),(w=m.querySelector(Kc(i)))&&!w._p&&(C.instance=w,C.state.loading=5),Ws.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Ws.set(i,u),w||NN(m,i,u,C.state))),a&&h===null)throw Error(s(528,""));return C}if(a&&h!==null)throw Error(s(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ga(u),u=$e(m).hoistableScripts,h=u.get(a),h||(h={type:"script",instance:null,count:0,state:null},u.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,i))}}function Qa(i){return'href="'+Nt(i)+'"'}function Kc(i){return'link[rel="stylesheet"]['+i+"]"}function Rx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function NN(i,a,u,h){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?h.loading=1:(a=i.createElement("link"),h.preload=a,a.addEventListener("load",function(){return h.loading|=1}),a.addEventListener("error",function(){return h.loading|=2}),Wn(a,"link",u),Y(a),i.head.appendChild(a))}function Ga(i){return'[src="'+Nt(i)+'"]'}function Zc(i){return"script[async]"+i}function Cx(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var h=i.querySelector('style[data-href~="'+Nt(u.href)+'"]');if(h)return a.instance=h,Y(h),h;var m=g({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),Y(h),Wn(h,"style",m),ih(h,u.precedence,i),a.instance=h;case"stylesheet":m=Qa(u.href);var w=i.querySelector(Kc(m));if(w)return a.state.loading|=4,a.instance=w,Y(w),w;h=Rx(u),(m=Ws.get(m))&&_m(h,m),w=(i.ownerDocument||i).createElement("link"),Y(w);var C=w;return C._p=new Promise(function(B,X){C.onload=B,C.onerror=X}),Wn(w,"link",h),a.state.loading|=4,ih(w,u.precedence,i),a.instance=w;case"script":return w=Ga(u.src),(m=i.querySelector(Zc(w)))?(a.instance=m,Y(m),m):(h=u,(m=Ws.get(w))&&(h=g({},u),bm(h,m)),i=i.ownerDocument||i,m=i.createElement("script"),Y(m),Wn(m,"link",h),i.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(s(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(h=a.instance,a.state.loading|=4,ih(h,u.precedence,i));return a.instance}function ih(i,a,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=h.length?h[h.length-1]:null,w=m,C=0;C<h.length;C++){var B=h[C];if(B.dataset.precedence===a)w=B;else if(w!==m)break}w?w.parentNode.insertBefore(i,w.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function _m(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function bm(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var oh=null;function Mx(i,a,u){if(oh===null){var h=new Map,m=oh=new Map;m.set(u,h)}else m=oh,h=m.get(u),h||(h=new Map,m.set(u,h));if(h.has(i))return h;for(h.set(i,null),u=u.getElementsByTagName(i),m=0;m<u.length;m++){var w=u[m];if(!(w[q]||w[b]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var C=w.getAttribute(a)||"";C=i+C;var B=h.get(C);B?B.push(w):h.set(C,[w])}}return h}function Nx(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function ON(i,a,u){if(u===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Ox(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var Qc=null;function IN(){}function kN(i,a,u){if(Qc===null)throw Error(s(475));var h=Qc;if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var m=Qa(u.href),w=i.querySelector(Kc(m));if(w){i=w._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(h.count++,h=ah.bind(h),i.then(h,h)),a.state.loading|=4,a.instance=w,Y(w);return}w=i.ownerDocument||i,u=Rx(u),(m=Ws.get(m))&&_m(u,m),w=w.createElement("link"),Y(w);var C=w;C._p=new Promise(function(B,X){C.onload=B,C.onerror=X}),Wn(w,"link",u),a.instance=w}h.stylesheets===null&&(h.stylesheets=new Map),h.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(h.count++,a=ah.bind(h),i.addEventListener("load",a),i.addEventListener("error",a))}}function PN(){if(Qc===null)throw Error(s(475));var i=Qc;return i.stylesheets&&i.count===0&&vm(i,i.stylesheets),0<i.count?function(a){var u=setTimeout(function(){if(i.stylesheets&&vm(i,i.stylesheets),i.unsuspend){var h=i.unsuspend;i.unsuspend=null,h()}},6e4);return i.unsuspend=a,function(){i.unsuspend=null,clearTimeout(u)}}:null}function ah(){if(this.count--,this.count===0){if(this.stylesheets)vm(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var lh=null;function vm(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,lh=new Map,a.forEach(DN,i),lh=null,ah.call(i))}function DN(i,a){if(!(a.state.loading&4)){var u=lh.get(i);if(u)var h=u.get(null);else{u=new Map,lh.set(i,u);for(var m=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<m.length;w++){var C=m[w];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(u.set(C.dataset.precedence,C),h=C)}h&&u.set(null,h)}m=a.instance,C=m.getAttribute("data-precedence"),w=u.get(C)||h,w===h&&u.set(null,m),u.set(C,m),this.count++,h=ah.bind(this),m.addEventListener("load",h),m.addEventListener("error",h),w?w.parentNode.insertBefore(m,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(m,i.firstChild)),a.state.loading|=4}}var Gc={$$typeof:I,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function BN(i,a,u,h,m,w,C,B){this.tag=1,this.containerInfo=i,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=wa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wa(0),this.hiddenUpdates=wa(null),this.identifierPrefix=h,this.onUncaughtError=m,this.onCaughtError=w,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=B,this.incompleteTransitions=new Map}function Ix(i,a,u,h,m,w,C,B,X,de,Re,Ie){return i=new BN(i,a,u,C,B,X,de,Ie),a=1,w===!0&&(a|=24),w=Es(3,null,null,a),i.current=w,w.stateNode=i,a=tg(),a.refCount++,i.pooledCache=a,a.refCount++,w.memoizedState={element:h,isDehydrated:u,cache:a},ig(w),i}function kx(i){return i?(i=Ma,i):Ma}function Px(i,a,u,h,m,w){m=kx(m),h.context===null?h.context=m:h.pendingContext=m,h=wi(a),h.payload={element:u},w=w===void 0?null:w,w!==null&&(h.callback=w),u=xi(i,h,a),u!==null&&(Ns(u,i,a),Cc(u,i,a))}function Dx(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function wm(i,a){Dx(i,a),(i=i.alternate)&&Dx(i,a)}function Bx(i){if(i.tag===13){var a=Ca(i,67108864);a!==null&&Ns(a,i,67108864),wm(i,67108864)}}var ch=!0;function UN(i,a,u,h){var m=G.T;G.T=null;var w=Ae.p;try{Ae.p=2,xm(i,a,u,h)}finally{Ae.p=w,G.T=m}}function FN(i,a,u,h){var m=G.T;G.T=null;var w=Ae.p;try{Ae.p=8,xm(i,a,u,h)}finally{Ae.p=w,G.T=m}}function xm(i,a,u,h){if(ch){var m=Tm(h);if(m===null)cm(i,a,h,uh,u),Fx(i,h);else if(LN(m,i,a,u,h))h.stopPropagation();else if(Fx(i,h),a&4&&-1<jN.indexOf(i)){for(;m!==null;){var w=ye(m);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var C=jr(w.pendingLanes);if(C!==0){var B=w;for(B.pendingLanes|=2,B.entangledLanes|=2;C;){var X=1<<31-rs(C);B.entanglements[1]|=X,C&=~X}Tr(w),(jt&6)===0&&(qf=an()+500,Wc(0))}}break;case 13:B=Ca(w,2),B!==null&&Ns(B,w,2),Kf(),wm(w,2)}if(w=Tm(h),w===null&&cm(i,a,h,uh,u),w===m)break;m=w}m!==null&&h.stopPropagation()}else cm(i,a,h,null,u)}}function Tm(i){return i=Cp(i),Sm(i)}var uh=null;function Sm(i){if(uh=null,i=Fe(i),i!==null){var a=o(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return uh=i,null}function Ux(i){switch(i){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(pn()){case tn:return 2;case _a:return 8;case ss:case ps:return 32;case hi:return 268435456;default:return 32}default:return 32}}var Em=!1,Di=null,Bi=null,Ui=null,Jc=new Map,eu=new Map,Fi=[],jN="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 Fx(i,a){switch(i){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":Bi=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":Jc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(a.pointerId)}}function tu(i,a,u,h,m,w){return i===null||i.nativeEvent!==w?(i={blockedOn:a,domEventName:u,eventSystemFlags:h,nativeEvent:w,targetContainers:[m]},a!==null&&(a=ye(a),a!==null&&Bx(a)),i):(i.eventSystemFlags|=h,a=i.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),i)}function LN(i,a,u,h,m){switch(a){case"focusin":return Di=tu(Di,i,a,u,h,m),!0;case"dragenter":return Bi=tu(Bi,i,a,u,h,m),!0;case"mouseover":return Ui=tu(Ui,i,a,u,h,m),!0;case"pointerover":var w=m.pointerId;return Jc.set(w,tu(Jc.get(w)||null,i,a,u,h,m)),!0;case"gotpointercapture":return w=m.pointerId,eu.set(w,tu(eu.get(w)||null,i,a,u,h,m)),!0}return!1}function jx(i){var a=Fe(i.target);if(a!==null){var u=o(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,y(i.priority,function(){if(u.tag===13){var h=Ms();h=gi(h);var m=Ca(u,h);m!==null&&Ns(m,u,h),wm(u,h)}});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function fh(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=Tm(i.nativeEvent);if(u===null){u=i.nativeEvent;var h=new u.constructor(u.type,u);Rp=h,u.target.dispatchEvent(h),Rp=null}else return a=ye(u),a!==null&&Bx(a),i.blockedOn=u,!1;a.shift()}return!0}function Lx(i,a,u){fh(i)&&u.delete(a)}function zN(){Em=!1,Di!==null&&fh(Di)&&(Di=null),Bi!==null&&fh(Bi)&&(Bi=null),Ui!==null&&fh(Ui)&&(Ui=null),Jc.forEach(Lx),eu.forEach(Lx)}function hh(i,a){i.blockedOn===a&&(i.blockedOn=null,Em||(Em=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,zN)))}var dh=null;function zx(i){dh!==i&&(dh=i,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){dh===i&&(dh=null);for(var a=0;a<i.length;a+=3){var u=i[a],h=i[a+1],m=i[a+2];if(typeof h!="function"){if(Sm(h||u)===null)continue;break}var w=ye(u);w!==null&&(i.splice(a,3),a-=3,Sg(w,{pending:!0,data:m,method:u.method,action:h},h,m))}}))}function nu(i){function a(X){return hh(X,i)}Di!==null&&hh(Di,i),Bi!==null&&hh(Bi,i),Ui!==null&&hh(Ui,i),Jc.forEach(a),eu.forEach(a);for(var u=0;u<Fi.length;u++){var h=Fi[u];h.blockedOn===i&&(h.blockedOn=null)}for(;0<Fi.length&&(u=Fi[0],u.blockedOn===null);)jx(u),u.blockedOn===null&&Fi.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var m=u[h],w=u[h+1],C=m[S]||null;if(typeof w=="function")C||zx(u);else if(C){var B=null;if(w&&w.hasAttribute("formAction")){if(m=w,C=w[S]||null)B=C.formAction;else if(Sm(m)!==null)continue}else B=C.action;typeof B=="function"?u[h+1]=B:(u.splice(h,3),h-=3),zx(u)}}}function Am(i){this._internalRoot=i}ph.prototype.render=Am.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(s(409));var u=a.current,h=Ms();Px(u,h,i,a,null,null)},ph.prototype.unmount=Am.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;Px(i.current,2,null,i,null,null),Kf(),a[P]=null}};function ph(i){this._internalRoot=i}ph.prototype.unstable_scheduleHydration=function(i){if(i){var a=v();i={blockedOn:null,target:i,priority:a};for(var u=0;u<Fi.length&&a!==0&&a<Fi[u].priority;u++);Fi.splice(u,0,i),u===0&&jx(i)}};var Vx=e.version;if(Vx!=="19.1.0")throw Error(s(527,Vx,"19.1.0"));Ae.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(s(188)):(i=Object.keys(i).join(","),Error(s(268,i)));return i=f(a),i=i!==null?d(i):null,i=i===null?null:i.stateNode,i};var VN={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gh.isDisabled&&gh.supportsFiber)try{pi=gh.inject(VN),Bn=gh}catch{}}return ru.createRoot=function(i,a){if(!r(i))throw Error(s(299));var u=!1,h="",m=rw,w=iw,C=ow,B=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(w=a.onCaughtError),a.onRecoverableError!==void 0&&(C=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(B=a.unstable_transitionCallbacks)),a=Ix(i,1,!1,null,null,u,h,m,w,C,B,null),i[P]=a.current,lm(i),new Am(a)},ru.hydrateRoot=function(i,a,u){if(!r(i))throw Error(s(299));var h=!1,m="",w=rw,C=iw,B=ow,X=null,de=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(m=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(C=u.onCaughtError),u.onRecoverableError!==void 0&&(B=u.onRecoverableError),u.unstable_transitionCallbacks!==void 0&&(X=u.unstable_transitionCallbacks),u.formState!==void 0&&(de=u.formState)),a=Ix(i,1,!0,a,u??null,h,m,w,C,B,X,de),a.context=kx(null),u=a.current,h=Ms(),h=gi(h),m=wi(h),m.callback=null,xi(u,m,h),u=h,a.current.lanes=u,tr(a,u),Tr(a),i[P]=a.current,lm(i),new ph(a)},ru.version="19.1.0",ru}var Jx;function eO(){if(Jx)return Nm.exports;Jx=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Nm.exports=JN(),Nm.exports}var tO=eO(),Jl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},oa=typeof window>"u"||"Deno"in globalThis;function us(){}function nO(n,e){return typeof n=="function"?n(e):n}function Iy(n){return typeof n=="number"&&n>=0&&n!==1/0}function mS(n,e){return Math.max(n+(e||0)-Date.now(),0)}function uo(n,e){return typeof n=="function"?n(e):n}function hr(n,e){return typeof n=="function"?n(e):n}function e1(n,e){const{type:t="all",exact:s,fetchStatus:r,predicate:o,queryKey:l,stale:c}=n;if(l){if(s){if(e.queryHash!==rb(l,e.options))return!1}else if(!Ou(e.queryKey,l))return!1}if(t!=="all"){const f=e.isActive();if(t==="active"&&!f||t==="inactive"&&f)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||r&&r!==e.state.fetchStatus||o&&!o(e))}function t1(n,e){const{exact:t,status:s,predicate:r,mutationKey:o}=n;if(o){if(!e.options.mutationKey)return!1;if(t){if(aa(e.options.mutationKey)!==aa(o))return!1}else if(!Ou(e.options.mutationKey,o))return!1}return!(s&&e.state.status!==s||r&&!r(e))}function rb(n,e){return((e==null?void 0:e.queryKeyHashFn)||aa)(n)}function aa(n){return JSON.stringify(n,(e,t)=>ky(t)?Object.keys(t).sort().reduce((s,r)=>(s[r]=t[r],s),{}):t)}function Ou(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Ou(n[t],e[t])):!1}function yS(n,e){if(n===e)return n;const t=n1(n)&&n1(e);if(t||ky(n)&&ky(e)){const s=t?n:Object.keys(n),r=s.length,o=t?e:Object.keys(e),l=o.length,c=t?[]:{},f=new Set(s);let d=0;for(let g=0;g<l;g++){const _=t?g:o[g];(!t&&f.has(_)||t)&&n[_]===void 0&&e[_]===void 0?(c[_]=void 0,d++):(c[_]=yS(n[_],e[_]),c[_]===n[_]&&n[_]!==void 0&&d++)}return r===l&&d===r?n:c}return e}function nd(n,e){if(!e||Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}function n1(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function ky(n){if(!s1(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!s1(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function s1(n){return Object.prototype.toString.call(n)==="[object Object]"}function sO(n){return new Promise(e=>{setTimeout(e,n)})}function Py(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?yS(n,e):e}function rO(n,e,t=0){const s=[...n,e];return t&&s.length>t?s.slice(1):s}function iO(n,e,t=0){const s=[e,...n];return t&&s.length>t?s.slice(0,-1):s}var ib=Symbol();function _S(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===ib?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function bS(n,e){return typeof n=="function"?n(...e):!!n}var qo,Qi,Ml,sS,oO=(sS=class extends Jl{constructor(){super();st(this,qo);st(this,Qi);st(this,Ml);Xe(this,Ml,e=>{if(!oa&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){Z(this,Qi)||this.setEventListener(Z(this,Ml))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,Qi))==null||e.call(this),Xe(this,Qi,void 0))}setEventListener(e){var t;Xe(this,Ml,e),(t=Z(this,Qi))==null||t.call(this),Xe(this,Qi,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){Z(this,qo)!==e&&(Xe(this,qo,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof Z(this,qo)=="boolean"?Z(this,qo):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},qo=new WeakMap,Qi=new WeakMap,Ml=new WeakMap,sS),ob=new oO,Nl,Gi,Ol,rS,aO=(rS=class extends Jl{constructor(){super();st(this,Nl,!0);st(this,Gi);st(this,Ol);Xe(this,Ol,e=>{if(!oa&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}})}onSubscribe(){Z(this,Gi)||this.setEventListener(Z(this,Ol))}onUnsubscribe(){var e;this.hasListeners()||((e=Z(this,Gi))==null||e.call(this),Xe(this,Gi,void 0))}setEventListener(e){var t;Xe(this,Ol,e),(t=Z(this,Gi))==null||t.call(this),Xe(this,Gi,e(this.setOnline.bind(this)))}setOnline(e){Z(this,Nl)!==e&&(Xe(this,Nl,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return Z(this,Nl)}},Nl=new WeakMap,Gi=new WeakMap,Ol=new WeakMap,rS),sd=new aO;function Dy(){let n,e;const t=new Promise((r,o)=>{n=r,e=o});t.status="pending",t.catch(()=>{});function s(r){Object.assign(t,r),delete t.resolve,delete t.reject}return t.resolve=r=>{s({status:"fulfilled",value:r}),n(r)},t.reject=r=>{s({status:"rejected",reason:r}),e(r)},t}function lO(n){return Math.min(1e3*2**n,3e4)}function vS(n){return(n??"online")==="online"?sd.isOnline():!0}var wS=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Pm(n){return n instanceof wS}function xS(n){let e=!1,t=0,s=!1,r;const o=Dy(),l=A=>{var R;s||(x(new wS(A)),(R=n.abort)==null||R.call(n))},c=()=>{e=!0},f=()=>{e=!1},d=()=>ob.isFocused()&&(n.networkMode==="always"||sd.isOnline())&&n.canRun(),g=()=>vS(n.networkMode)&&n.canRun(),_=A=>{var R;s||(s=!0,(R=n.onSuccess)==null||R.call(n,A),r==null||r(),o.resolve(A))},x=A=>{var R;s||(s=!0,(R=n.onError)==null||R.call(n,A),r==null||r(),o.reject(A))},E=()=>new Promise(A=>{var R;r=k=>{(s||d())&&A(k)},(R=n.onPause)==null||R.call(n)}).then(()=>{var A;r=void 0,s||(A=n.onContinue)==null||A.call(n)}),M=()=>{if(s)return;let A;const R=t===0?n.initialPromise:void 0;try{A=R??n.fn()}catch(k){A=Promise.reject(k)}Promise.resolve(A).then(_).catch(k=>{var W;if(s)return;const U=n.retry??(oa?0:3),I=n.retryDelay??lO,V=typeof I=="function"?I(t,k):I,H=U===!0||typeof U=="number"&&t<U||typeof U=="function"&&U(t,k);if(e||!H){x(k);return}t++,(W=n.onFail)==null||W.call(n,t,k),sO(V).then(()=>d()?void 0:E()).then(()=>{e?x(k):M()})})};return{promise:o,cancel:l,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:f,canStart:g,start:()=>(g()?M():E().then(M),o)}}var cO=n=>setTimeout(n,0);function uO(){let n=[],e=0,t=c=>{c()},s=c=>{c()},r=cO;const o=c=>{e?n.push(c):r(()=>{t(c)})},l=()=>{const c=n;n=[],c.length&&r(()=>{s(()=>{c.forEach(f=>{t(f)})})})};return{batch:c=>{let f;e++;try{f=c()}finally{e--,e||l()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{r=c}}}var In=uO(),Yo,iS,TS=(iS=class{constructor(){st(this,Yo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Iy(this.gcTime)&&Xe(this,Yo,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(oa?1/0:5*60*1e3))}clearGcTimeout(){Z(this,Yo)&&(clearTimeout(Z(this,Yo)),Xe(this,Yo,void 0))}},Yo=new WeakMap,iS),Il,kl,Xs,Ko,es,Vu,Zo,ur,ti,oS,fO=(oS=class extends TS{constructor(e){super();st(this,ur);st(this,Il);st(this,kl);st(this,Xs);st(this,Ko);st(this,es);st(this,Vu);st(this,Zo);Xe(this,Zo,!1),Xe(this,Vu,e.defaultOptions),this.setOptions(e.options),this.observers=[],Xe(this,Ko,e.client),Xe(this,Xs,Z(this,Ko).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Xe(this,Il,hO(this.options)),this.state=e.state??Z(this,Il),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Z(this,es))==null?void 0:e.promise}setOptions(e){this.options={...Z(this,Vu),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Z(this,Xs).remove(this)}setData(e,t){const s=Py(this.state.data,e,this.options);return pt(this,ur,ti).call(this,{data:s,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),s}setState(e,t){pt(this,ur,ti).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var s,r;const t=(s=Z(this,es))==null?void 0:s.promise;return(r=Z(this,es))==null||r.cancel(e),t?t.then(us).catch(us):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Z(this,Il))}isActive(){return this.observers.some(e=>hr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ib||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>uo(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:!mS(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=Z(this,es))==null||t.continue()}onOnline(){var t;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=Z(this,es))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Z(this,Xs).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(Z(this,es)&&(Z(this,Zo)?Z(this,es).cancel({revert:!0}):Z(this,es).cancelRetry()),this.scheduleGc()),Z(this,Xs).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||pt(this,ur,ti).call(this,{type:"invalidate"})}fetch(e,t){var d,g,_;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(Z(this,es))return Z(this,es).continueRetry(),Z(this,es).promise}if(e&&this.setOptions(e),!this.options.queryFn){const x=this.observers.find(E=>E.options.queryFn);x&&this.setOptions(x.options)}const s=new AbortController,r=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(Xe(this,Zo,!0),s.signal)})},o=()=>{const x=_S(this.options,t),M=(()=>{const A={client:Z(this,Ko),queryKey:this.queryKey,meta:this.meta};return r(A),A})();return Xe(this,Zo,!1),this.options.persister?this.options.persister(x,M,this):x(M)},c=(()=>{const x={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:Z(this,Ko),state:this.state,fetchFn:o};return r(x),x})();(d=this.options.behavior)==null||d.onFetch(c,this),Xe(this,kl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=c.fetchOptions)==null?void 0:g.meta))&&pt(this,ur,ti).call(this,{type:"fetch",meta:(_=c.fetchOptions)==null?void 0:_.meta});const f=x=>{var E,M,A,R;Pm(x)&&x.silent||pt(this,ur,ti).call(this,{type:"error",error:x}),Pm(x)||((M=(E=Z(this,Xs).config).onError)==null||M.call(E,x,this),(R=(A=Z(this,Xs).config).onSettled)==null||R.call(A,this.state.data,x,this)),this.scheduleGc()};return Xe(this,es,xS({initialPromise:t==null?void 0:t.initialPromise,fn:c.fetchFn,abort:s.abort.bind(s),onSuccess:x=>{var E,M,A,R;if(x===void 0){f(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(x)}catch(k){f(k);return}(M=(E=Z(this,Xs).config).onSuccess)==null||M.call(E,x,this),(R=(A=Z(this,Xs).config).onSettled)==null||R.call(A,x,this.state.error,this),this.scheduleGc()},onError:f,onFail:(x,E)=>{pt(this,ur,ti).call(this,{type:"failed",failureCount:x,error:E})},onPause:()=>{pt(this,ur,ti).call(this,{type:"pause"})},onContinue:()=>{pt(this,ur,ti).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0})),Z(this,es).start()}},Il=new WeakMap,kl=new WeakMap,Xs=new WeakMap,Ko=new WeakMap,es=new WeakMap,Vu=new WeakMap,Zo=new WeakMap,ur=new WeakSet,ti=function(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...SS(s.data,this.options),fetchMeta:e.meta??null};case"success":return{...s,data:e.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Pm(r)&&r.revert&&Z(this,kl)?{...Z(this,kl),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),In.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),Z(this,Xs).notify({query:this,type:"updated",action:e})})},oS);function SS(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vS(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function hO(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,s=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Rr,aS,dO=(aS=class extends Jl{constructor(e={}){super();st(this,Rr);this.config=e,Xe(this,Rr,new Map)}build(e,t,s){const r=t.queryKey,o=t.queryHash??rb(r,t);let l=this.get(o);return l||(l=new fO({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(l)),l}add(e){Z(this,Rr).has(e.queryHash)||(Z(this,Rr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=Z(this,Rr).get(e.queryHash);t&&(e.destroy(),t===e&&Z(this,Rr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){In.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Z(this,Rr).get(e)}getAll(){return[...Z(this,Rr).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>e1(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>e1(e,s)):t}notify(e){In.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){In.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){In.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Rr=new WeakMap,aS),Cr,ls,Qo,Mr,Xi,lS,pO=(lS=class extends TS{constructor(e){super();st(this,Mr);st(this,Cr);st(this,ls);st(this,Qo);this.mutationId=e.mutationId,Xe(this,ls,e.mutationCache),Xe(this,Cr,[]),this.state=e.state||ES(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Z(this,Cr).includes(e)||(Z(this,Cr).push(e),this.clearGcTimeout(),Z(this,ls).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Xe(this,Cr,Z(this,Cr).filter(t=>t!==e)),this.scheduleGc(),Z(this,ls).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Z(this,Cr).length||(this.state.status==="pending"?this.scheduleGc():Z(this,ls).remove(this))}continue(){var e;return((e=Z(this,Qo))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,c,f,d,g,_,x,E,M,A,R,k,U,I,V,H,W,ee,Q;const t=()=>{pt(this,Mr,Xi).call(this,{type:"continue"})};Xe(this,Qo,xS({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(ge,Ne)=>{pt(this,Mr,Xi).call(this,{type:"failed",failureCount:ge,error:Ne})},onPause:()=>{pt(this,Mr,Xi).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Z(this,ls).canRun(this)}));const s=this.state.status==="pending",r=!Z(this,Qo).canStart();try{if(s)t();else{pt(this,Mr,Xi).call(this,{type:"pending",variables:e,isPaused:r}),await((l=(o=Z(this,ls).config).onMutate)==null?void 0:l.call(o,e,this));const Ne=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,e));Ne!==this.state.context&&pt(this,Mr,Xi).call(this,{type:"pending",context:Ne,variables:e,isPaused:r})}const ge=await Z(this,Qo).start();return await((g=(d=Z(this,ls).config).onSuccess)==null?void 0:g.call(d,ge,e,this.state.context,this)),await((x=(_=this.options).onSuccess)==null?void 0:x.call(_,ge,e,this.state.context)),await((M=(E=Z(this,ls).config).onSettled)==null?void 0:M.call(E,ge,null,this.state.variables,this.state.context,this)),await((R=(A=this.options).onSettled)==null?void 0:R.call(A,ge,null,e,this.state.context)),pt(this,Mr,Xi).call(this,{type:"success",data:ge}),ge}catch(ge){try{throw await((U=(k=Z(this,ls).config).onError)==null?void 0:U.call(k,ge,e,this.state.context,this)),await((V=(I=this.options).onError)==null?void 0:V.call(I,ge,e,this.state.context)),await((W=(H=Z(this,ls).config).onSettled)==null?void 0:W.call(H,void 0,ge,this.state.variables,this.state.context,this)),await((Q=(ee=this.options).onSettled)==null?void 0:Q.call(ee,void 0,ge,e,this.state.context)),ge}finally{pt(this,Mr,Xi).call(this,{type:"error",error:ge})}}finally{Z(this,ls).runNext(this)}}},Cr=new WeakMap,ls=new WeakMap,Qo=new WeakMap,Mr=new WeakSet,Xi=function(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),In.batch(()=>{Z(this,Cr).forEach(s=>{s.onMutationUpdate(e)}),Z(this,ls).notify({mutation:this,type:"updated",action:e})})},lS);function ES(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ri,fr,$u,cS,gO=(cS=class extends Jl{constructor(e={}){super();st(this,ri);st(this,fr);st(this,$u);this.config=e,Xe(this,ri,new Set),Xe(this,fr,new Map),Xe(this,$u,0)}build(e,t,s){const r=new pO({mutationCache:this,mutationId:++mh(this,$u)._,options:e.defaultMutationOptions(t),state:s});return this.add(r),r}add(e){Z(this,ri).add(e);const t=yh(e);if(typeof t=="string"){const s=Z(this,fr).get(t);s?s.push(e):Z(this,fr).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(Z(this,ri).delete(e)){const t=yh(e);if(typeof t=="string"){const s=Z(this,fr).get(t);if(s)if(s.length>1){const r=s.indexOf(e);r!==-1&&s.splice(r,1)}else s[0]===e&&Z(this,fr).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=yh(e);if(typeof t=="string"){const s=Z(this,fr).get(t),r=s==null?void 0:s.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){var s;const t=yh(e);if(typeof t=="string"){const r=(s=Z(this,fr).get(t))==null?void 0:s.find(o=>o!==e&&o.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){In.batch(()=>{Z(this,ri).forEach(e=>{this.notify({type:"removed",mutation:e})}),Z(this,ri).clear(),Z(this,fr).clear()})}getAll(){return Array.from(Z(this,ri))}find(e){const t={exact:!0,...e};return this.getAll().find(s=>t1(t,s))}findAll(e={}){return this.getAll().filter(t=>t1(e,t))}notify(e){In.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return In.batch(()=>Promise.all(e.map(t=>t.continue().catch(us))))}},ri=new WeakMap,fr=new WeakMap,$u=new WeakMap,cS);function yh(n){var e;return(e=n.options.scope)==null?void 0:e.id}function r1(n){return{onFetch:(e,t)=>{var g,_,x,E,M;const s=e.options,r=(x=(_=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:_.fetchMore)==null?void 0:x.direction,o=((E=e.state.data)==null?void 0:E.pages)||[],l=((M=e.state.data)==null?void 0:M.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let A=!1;const R=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(e.signal.aborted?A=!0:e.signal.addEventListener("abort",()=>{A=!0}),e.signal)})},k=_S(e.options,e.fetchOptions),U=async(I,V,H)=>{if(A)return Promise.reject();if(V==null&&I.pages.length)return Promise.resolve(I);const ee=(()=>{const ne={client:e.client,queryKey:e.queryKey,pageParam:V,direction:H?"backward":"forward",meta:e.options.meta};return R(ne),ne})(),Q=await k(ee),{maxPages:ge}=e.options,Ne=H?iO:rO;return{pages:Ne(I.pages,Q,ge),pageParams:Ne(I.pageParams,V,ge)}};if(r&&o.length){const I=r==="backward",V=I?mO:i1,H={pages:o,pageParams:l},W=V(s,H);c=await U(H,W,I)}else{const I=n??o.length;do{const V=f===0?l[0]??s.initialPageParam:i1(s,c);if(f>0&&V==null)break;c=await U(c,V),f++}while(f<I)}return c};e.options.persister?e.fetchFn=()=>{var A,R;return(R=(A=e.options).persister)==null?void 0:R.call(A,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=d}}}function i1(n,{pages:e,pageParams:t}){const s=e.length-1;return e.length>0?n.getNextPageParam(e[s],e,t[s],t):void 0}function mO(n,{pages:e,pageParams:t}){var s;return e.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,e[0],e,t[0],t):void 0}var fn,Ji,eo,Pl,Dl,to,Bl,Ul,uS,AS=(uS=class{constructor(n={}){st(this,fn);st(this,Ji);st(this,eo);st(this,Pl);st(this,Dl);st(this,to);st(this,Bl);st(this,Ul);Xe(this,fn,n.queryCache||new dO),Xe(this,Ji,n.mutationCache||new gO),Xe(this,eo,n.defaultOptions||{}),Xe(this,Pl,new Map),Xe(this,Dl,new Map),Xe(this,to,0)}mount(){mh(this,to)._++,Z(this,to)===1&&(Xe(this,Bl,ob.subscribe(async n=>{n&&(await this.resumePausedMutations(),Z(this,fn).onFocus())})),Xe(this,Ul,sd.subscribe(async n=>{n&&(await this.resumePausedMutations(),Z(this,fn).onOnline())})))}unmount(){var n,e;mh(this,to)._--,Z(this,to)===0&&((n=Z(this,Bl))==null||n.call(this),Xe(this,Bl,void 0),(e=Z(this,Ul))==null||e.call(this),Xe(this,Ul,void 0))}isFetching(n){return Z(this,fn).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return Z(this,Ji).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=Z(this,fn).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=Z(this,fn).build(this,e),s=t.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(uo(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(n){return Z(this,fn).findAll(n).map(({queryKey:e,state:t})=>{const s=t.data;return[e,s]})}setQueryData(n,e,t){const s=this.defaultQueryOptions({queryKey:n}),r=Z(this,fn).get(s.queryHash),o=r==null?void 0:r.state.data,l=nO(e,o);if(l!==void 0)return Z(this,fn).build(this,s).setData(l,{...t,manual:!0})}setQueriesData(n,e,t){return In.batch(()=>Z(this,fn).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=Z(this,fn).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=Z(this,fn);In.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=Z(this,fn);return In.batch(()=>(t.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},s=In.batch(()=>Z(this,fn).findAll(n).map(r=>r.cancel(t)));return Promise.all(s).then(us).catch(us)}invalidateQueries(n,e={}){return In.batch(()=>(Z(this,fn).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},s=In.batch(()=>Z(this,fn).findAll(n).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let o=r.fetch(void 0,t);return t.throwOnError||(o=o.catch(us)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(us)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=Z(this,fn).build(this,e);return t.isStaleByTime(uo(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(us).catch(us)}fetchInfiniteQuery(n){return n.behavior=r1(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(us).catch(us)}ensureInfiniteQueryData(n){return n.behavior=r1(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return sd.isOnline()?Z(this,Ji).resumePausedMutations():Promise.resolve()}getQueryCache(){return Z(this,fn)}getMutationCache(){return Z(this,Ji)}getDefaultOptions(){return Z(this,eo)}setDefaultOptions(n){Xe(this,eo,n)}setQueryDefaults(n,e){Z(this,Pl).set(aa(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...Z(this,Pl).values()],t={};return e.forEach(s=>{Ou(n,s.queryKey)&&Object.assign(t,s.defaultOptions)}),t}setMutationDefaults(n,e){Z(this,Dl).set(aa(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...Z(this,Dl).values()],t={};return e.forEach(s=>{Ou(n,s.mutationKey)&&Object.assign(t,s.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...Z(this,eo).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=rb(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===ib&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...Z(this,eo).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){Z(this,fn).clear(),Z(this,Ji).clear()}},fn=new WeakMap,Ji=new WeakMap,eo=new WeakMap,Pl=new WeakMap,Dl=new WeakMap,to=new WeakMap,Bl=new WeakMap,Ul=new WeakMap,uS),vs,Et,Hu,cs,Go,Fl,no,so,Wu,jl,Ll,Jo,ea,ro,zl,Bt,uu,By,Uy,Fy,jy,Ly,zy,Vy,RS,fS,yO=(fS=class extends Jl{constructor(e,t){super();st(this,Bt);st(this,vs);st(this,Et);st(this,Hu);st(this,cs);st(this,Go);st(this,Fl);st(this,no);st(this,so);st(this,Wu);st(this,jl);st(this,Ll);st(this,Jo);st(this,ea);st(this,ro);st(this,zl,new Set);this.options=t,Xe(this,vs,e),Xe(this,so,null),Xe(this,no,Dy()),this.options.experimental_prefetchInRender||Z(this,no).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Z(this,Et).addObserver(this),o1(Z(this,Et),this.options)?pt(this,Bt,uu).call(this):this.updateResult(),pt(this,Bt,jy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $y(Z(this,Et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $y(Z(this,Et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,pt(this,Bt,Ly).call(this),pt(this,Bt,zy).call(this),Z(this,Et).removeObserver(this)}setOptions(e){const t=this.options,s=Z(this,Et);if(this.options=Z(this,vs).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hr(this.options.enabled,Z(this,Et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");pt(this,Bt,Vy).call(this),Z(this,Et).setOptions(this.options),t._defaulted&&!nd(this.options,t)&&Z(this,vs).getQueryCache().notify({type:"observerOptionsUpdated",query:Z(this,Et),observer:this});const r=this.hasListeners();r&&a1(Z(this,Et),s,this.options,t)&&pt(this,Bt,uu).call(this),this.updateResult(),r&&(Z(this,Et)!==s||hr(this.options.enabled,Z(this,Et))!==hr(t.enabled,Z(this,Et))||uo(this.options.staleTime,Z(this,Et))!==uo(t.staleTime,Z(this,Et)))&&pt(this,Bt,By).call(this);const o=pt(this,Bt,Uy).call(this);r&&(Z(this,Et)!==s||hr(this.options.enabled,Z(this,Et))!==hr(t.enabled,Z(this,Et))||o!==Z(this,ro))&&pt(this,Bt,Fy).call(this,o)}getOptimisticResult(e){const t=Z(this,vs).getQueryCache().build(Z(this,vs),e),s=this.createResult(t,e);return bO(this,s)&&(Xe(this,cs,s),Xe(this,Fl,this.options),Xe(this,Go,Z(this,Et).state)),s}getCurrentResult(){return Z(this,cs)}trackResult(e,t){return new Proxy(e,{get:(s,r)=>(this.trackProp(r),t==null||t(r),Reflect.get(s,r))})}trackProp(e){Z(this,zl).add(e)}getCurrentQuery(){return Z(this,Et)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=Z(this,vs).defaultQueryOptions(e),s=Z(this,vs).getQueryCache().build(Z(this,vs),t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return pt(this,Bt,uu).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),Z(this,cs)))}createResult(e,t){var ge;const s=Z(this,Et),r=this.options,o=Z(this,cs),l=Z(this,Go),c=Z(this,Fl),d=e!==s?e.state:Z(this,Hu),{state:g}=e;let _={...g},x=!1,E;if(t._optimisticResults){const Ne=this.hasListeners(),ne=!Ne&&o1(e,t),ve=Ne&&a1(e,s,t,r);(ne||ve)&&(_={..._,...SS(g.data,e.options)}),t._optimisticResults==="isRestoring"&&(_.fetchStatus="idle")}let{error:M,errorUpdatedAt:A,status:R}=_;E=_.data;let k=!1;if(t.placeholderData!==void 0&&E===void 0&&R==="pending"){let Ne;o!=null&&o.isPlaceholderData&&t.placeholderData===(c==null?void 0:c.placeholderData)?(Ne=o.data,k=!0):Ne=typeof t.placeholderData=="function"?t.placeholderData((ge=Z(this,Ll))==null?void 0:ge.state.data,Z(this,Ll)):t.placeholderData,Ne!==void 0&&(R="success",E=Py(o==null?void 0:o.data,Ne,t),x=!0)}if(t.select&&E!==void 0&&!k)if(o&&E===(l==null?void 0:l.data)&&t.select===Z(this,Wu))E=Z(this,jl);else try{Xe(this,Wu,t.select),E=t.select(E),E=Py(o==null?void 0:o.data,E,t),Xe(this,jl,E),Xe(this,so,null)}catch(Ne){Xe(this,so,Ne)}Z(this,so)&&(M=Z(this,so),E=Z(this,jl),A=Date.now(),R="error");const U=_.fetchStatus==="fetching",I=R==="pending",V=R==="error",H=I&&U,W=E!==void 0,Q={status:R,fetchStatus:_.fetchStatus,isPending:I,isSuccess:R==="success",isError:V,isInitialLoading:H,isLoading:H,data:E,dataUpdatedAt:_.dataUpdatedAt,error:M,errorUpdatedAt:A,failureCount:_.fetchFailureCount,failureReason:_.fetchFailureReason,errorUpdateCount:_.errorUpdateCount,isFetched:_.dataUpdateCount>0||_.errorUpdateCount>0,isFetchedAfterMount:_.dataUpdateCount>d.dataUpdateCount||_.errorUpdateCount>d.errorUpdateCount,isFetching:U,isRefetching:U&&!I,isLoadingError:V&&!W,isPaused:_.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:V&&W,isStale:ab(e,t),refetch:this.refetch,promise:Z(this,no)};if(this.options.experimental_prefetchInRender){const Ne=De=>{Q.status==="error"?De.reject(Q.error):Q.data!==void 0&&De.resolve(Q.data)},ne=()=>{const De=Xe(this,no,Q.promise=Dy());Ne(De)},ve=Z(this,no);switch(ve.status){case"pending":e.queryHash===s.queryHash&&Ne(ve);break;case"fulfilled":(Q.status==="error"||Q.data!==ve.value)&&ne();break;case"rejected":(Q.status!=="error"||Q.error!==ve.reason)&&ne();break}}return Q}updateResult(){const e=Z(this,cs),t=this.createResult(Z(this,Et),this.options);if(Xe(this,Go,Z(this,Et).state),Xe(this,Fl,this.options),Z(this,Go).data!==void 0&&Xe(this,Ll,Z(this,Et)),nd(t,e))return;Xe(this,cs,t);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!Z(this,zl).size)return!0;const l=new Set(o??Z(this,zl));return this.options.throwOnError&&l.add("error"),Object.keys(Z(this,cs)).some(c=>{const f=c;return Z(this,cs)[f]!==e[f]&&l.has(f)})};pt(this,Bt,RS).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&pt(this,Bt,jy).call(this)}},vs=new WeakMap,Et=new WeakMap,Hu=new WeakMap,cs=new WeakMap,Go=new WeakMap,Fl=new WeakMap,no=new WeakMap,so=new WeakMap,Wu=new WeakMap,jl=new WeakMap,Ll=new WeakMap,Jo=new WeakMap,ea=new WeakMap,ro=new WeakMap,zl=new WeakMap,Bt=new WeakSet,uu=function(e){pt(this,Bt,Vy).call(this);let t=Z(this,Et).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(us)),t},By=function(){pt(this,Bt,Ly).call(this);const e=uo(this.options.staleTime,Z(this,Et));if(oa||Z(this,cs).isStale||!Iy(e))return;const s=mS(Z(this,cs).dataUpdatedAt,e)+1;Xe(this,Jo,setTimeout(()=>{Z(this,cs).isStale||this.updateResult()},s))},Uy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Z(this,Et)):this.options.refetchInterval)??!1},Fy=function(e){pt(this,Bt,zy).call(this),Xe(this,ro,e),!(oa||hr(this.options.enabled,Z(this,Et))===!1||!Iy(Z(this,ro))||Z(this,ro)===0)&&Xe(this,ea,setInterval(()=>{(this.options.refetchIntervalInBackground||ob.isFocused())&&pt(this,Bt,uu).call(this)},Z(this,ro)))},jy=function(){pt(this,Bt,By).call(this),pt(this,Bt,Fy).call(this,pt(this,Bt,Uy).call(this))},Ly=function(){Z(this,Jo)&&(clearTimeout(Z(this,Jo)),Xe(this,Jo,void 0))},zy=function(){Z(this,ea)&&(clearInterval(Z(this,ea)),Xe(this,ea,void 0))},Vy=function(){const e=Z(this,vs).getQueryCache().build(Z(this,vs),this.options);if(e===Z(this,Et))return;const t=Z(this,Et);Xe(this,Et,e),Xe(this,Hu,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},RS=function(e){In.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(Z(this,cs))}),Z(this,vs).getQueryCache().notify({query:Z(this,Et),type:"observerResultsUpdated"})})},fS);function _O(n,e){return hr(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function o1(n,e){return _O(n,e)||n.state.data!==void 0&&$y(n,e,e.refetchOnMount)}function $y(n,e,t){if(hr(e.enabled,n)!==!1&&uo(e.staleTime,n)!=="static"){const s=typeof t=="function"?t(n):t;return s==="always"||s!==!1&&ab(n,e)}return!1}function a1(n,e,t,s){return(n!==e||hr(s.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&ab(n,t)}function ab(n,e){return hr(e.enabled,n)!==!1&&n.isStaleByTime(uo(e.staleTime,n))}function bO(n,e){return!nd(n.getCurrentResult(),e)}var io,oo,ws,ii,li,$h,Hy,hS,vO=(hS=class extends Jl{constructor(t,s){super();st(this,li);st(this,io);st(this,oo);st(this,ws);st(this,ii);Xe(this,io,t),this.setOptions(s),this.bindMethods(),pt(this,li,$h).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=Z(this,io).defaultMutationOptions(t),nd(this.options,s)||Z(this,io).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Z(this,ws),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&aa(s.mutationKey)!==aa(this.options.mutationKey)?this.reset():((r=Z(this,ws))==null?void 0:r.state.status)==="pending"&&Z(this,ws).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=Z(this,ws))==null||t.removeObserver(this)}onMutationUpdate(t){pt(this,li,$h).call(this),pt(this,li,Hy).call(this,t)}getCurrentResult(){return Z(this,oo)}reset(){var t;(t=Z(this,ws))==null||t.removeObserver(this),Xe(this,ws,void 0),pt(this,li,$h).call(this),pt(this,li,Hy).call(this)}mutate(t,s){var r;return Xe(this,ii,s),(r=Z(this,ws))==null||r.removeObserver(this),Xe(this,ws,Z(this,io).getMutationCache().build(Z(this,io),this.options)),Z(this,ws).addObserver(this),Z(this,ws).execute(t)}},io=new WeakMap,oo=new WeakMap,ws=new WeakMap,ii=new WeakMap,li=new WeakSet,$h=function(){var s;const t=((s=Z(this,ws))==null?void 0:s.state)??ES();Xe(this,oo,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Hy=function(t){In.batch(()=>{var s,r,o,l,c,f,d,g;if(Z(this,ii)&&this.hasListeners()){const _=Z(this,oo).variables,x=Z(this,oo).context;(t==null?void 0:t.type)==="success"?((r=(s=Z(this,ii)).onSuccess)==null||r.call(s,t.data,_,x),(l=(o=Z(this,ii)).onSettled)==null||l.call(o,t.data,null,_,x)):(t==null?void 0:t.type)==="error"&&((f=(c=Z(this,ii)).onError)==null||f.call(c,t.error,_,x),(g=(d=Z(this,ii)).onSettled)==null||g.call(d,void 0,t.error,_,x))}this.listeners.forEach(_=>{_(Z(this,oo))})})},hS),CS=N.createContext(void 0),Xu=n=>{const e=N.useContext(CS);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},MS=({client:n,children:e})=>(N.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),T.jsx(CS.Provider,{value:n,children:e})),NS=N.createContext(!1),wO=()=>N.useContext(NS);NS.Provider;function xO(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var TO=N.createContext(xO()),SO=()=>N.useContext(TO),EO=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},AO=n=>{N.useEffect(()=>{n.clearReset()},[n])},RO=({result:n,errorResetBoundary:e,throwOnError:t,query:s,suspense:r})=>n.isError&&!e.isReset()&&!n.isFetching&&s&&(r&&n.data===void 0||bS(t,[n.error,s])),CO=n=>{if(n.suspense){const e=s=>s==="static"?s:Math.max(s??1e3,1e3),t=n.staleTime;n.staleTime=typeof t=="function"?(...s)=>e(t(...s)):e(t),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},MO=(n,e)=>n.isLoading&&n.isFetching&&!e,NO=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,l1=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function OO(n,e,t){var _,x,E,M,A;const s=wO(),r=SO(),o=Xu(),l=o.defaultQueryOptions(n);(x=(_=o.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||x.call(_,l),l._optimisticResults=s?"isRestoring":"optimistic",CO(l),EO(l,r),AO(r);const c=!o.getQueryCache().get(l.queryHash),[f]=N.useState(()=>new e(o,l)),d=f.getOptimisticResult(l),g=!s&&n.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(R=>{const k=g?f.subscribe(In.batchCalls(R)):us;return f.updateResult(),k},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),N.useEffect(()=>{f.setOptions(l)},[l,f]),NO(l,d))throw l1(l,f,r);if(RO({result:d,errorResetBoundary:r,throwOnError:l.throwOnError,query:o.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw d.error;if((M=(E=o.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||M.call(E,l,d),l.experimental_prefetchInRender&&!oa&&MO(d,s)){const R=c?l1(l,f,r):(A=o.getQueryCache().get(l.queryHash))==null?void 0:A.promise;R==null||R.catch(us).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?d:f.trackResult(d)}function po(n,e){return OO(n,yO)}function OS(n,e){const t=Xu(),[s]=N.useState(()=>new vO(t,n));N.useEffect(()=>{s.setOptions(n)},[s,n]);const r=N.useSyncExternalStore(N.useCallback(l=>s.subscribe(In.batchCalls(l)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),o=N.useCallback((l,c)=>{s.mutate(l,c).catch(us)},[s]);if(r.error&&bS(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}var ec=gS();const IO=tb(ec);function vt(n,e,{checkForDefaultPrevented:t=!0}={}){return function(r){if(n==null||n(r),t===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function c1(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}function IS(...n){return e=>{let t=!1;const s=n.map(r=>{const o=c1(r,e);return!t&&typeof o=="function"&&(t=!0),o});if(t)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():c1(n[r],null)}}}}function _n(...n){return N.useCallback(IS(...n),n)}function tc(n,e=[]){let t=[];function s(o,l){const c=N.createContext(l),f=t.length;t=[...t,l];const d=_=>{var k;const{scope:x,children:E,...M}=_,A=((k=x==null?void 0:x[n])==null?void 0:k[f])||c,R=N.useMemo(()=>M,Object.values(M));return T.jsx(A.Provider,{value:R,children:E})};d.displayName=o+"Provider";function g(_,x){var A;const E=((A=x==null?void 0:x[n])==null?void 0:A[f])||c,M=N.useContext(E);if(M)return M;if(l!==void 0)return l;throw new Error(`\`${_}\` must be used within \`${o}\``)}return[d,g]}const r=()=>{const o=t.map(l=>N.createContext(l));return function(c){const f=(c==null?void 0:c[n])||o;return N.useMemo(()=>({[`__scope${n}`]:{...c,[n]:f}}),[c,f])}};return r.scopeName=n,[s,kO(r,...e)]}function kO(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const s=n.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(o){const l=s.reduce((c,{useScope:f,scopeName:d})=>{const _=f(o)[`__scope${d}`];return{...c,..._}},{});return N.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])}};return t.scopeName=e.scopeName,t}function Iu(n){const e=PO(n),t=N.forwardRef((s,r)=>{const{children:o,...l}=s,c=N.Children.toArray(o),f=c.find(BO);if(f){const d=f.props.children,g=c.map(_=>_===f?N.Children.count(d)>1?N.Children.only(null):N.isValidElement(d)?d.props.children:null:_);return T.jsx(e,{...l,ref:r,children:N.isValidElement(d)?N.cloneElement(d,void 0,g):null})}return T.jsx(e,{...l,ref:r,children:o})});return t.displayName=`${n}.Slot`,t}var kS=Iu("Slot");function PO(n){const e=N.forwardRef((t,s)=>{const{children:r,...o}=t;if(N.isValidElement(r)){const l=FO(r),c=UO(o,r.props);return r.type!==N.Fragment&&(c.ref=s?IS(s,l):l),N.cloneElement(r,c)}return N.Children.count(r)>1?N.Children.only(null):null});return e.displayName=`${n}.SlotClone`,e}var DO=Symbol("radix.slottable");function BO(n){return N.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===DO}function UO(n,e){const t={...e};for(const s in e){const r=n[s],o=e[s];/^on[A-Z]/.test(s)?r&&o?t[s]=(...c)=>{const f=o(...c);return r(...c),f}:r&&(t[s]=r):s==="style"?t[s]={...r,...o}:s==="className"&&(t[s]=[r,o].filter(Boolean).join(" "))}return{...n,...t}}function FO(n){var s,r;let e=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(r=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}function lb(n){const e=n+"CollectionProvider",[t,s]=tc(e),[r,o]=t(e,{collectionRef:{current:null},itemMap:new Map}),l=A=>{const{scope:R,children:k}=A,U=Wi.useRef(null),I=Wi.useRef(new Map).current;return T.jsx(r,{scope:R,itemMap:I,collectionRef:U,children:k})};l.displayName=e;const c=n+"CollectionSlot",f=Iu(c),d=Wi.forwardRef((A,R)=>{const{scope:k,children:U}=A,I=o(c,k),V=_n(R,I.collectionRef);return T.jsx(f,{ref:V,children:U})});d.displayName=c;const g=n+"CollectionItemSlot",_="data-radix-collection-item",x=Iu(g),E=Wi.forwardRef((A,R)=>{const{scope:k,children:U,...I}=A,V=Wi.useRef(null),H=_n(R,V),W=o(g,k);return Wi.useEffect(()=>(W.itemMap.set(V,{ref:V,...I}),()=>void W.itemMap.delete(V))),T.jsx(x,{[_]:"",ref:H,children:U})});E.displayName=g;function M(A){const R=o(n+"CollectionConsumer",A);return Wi.useCallback(()=>{const U=R.collectionRef.current;if(!U)return[];const I=Array.from(U.querySelectorAll(`[${_}]`));return Array.from(R.itemMap.values()).sort((W,ee)=>I.indexOf(W.ref.current)-I.indexOf(ee.ref.current))},[R.collectionRef,R.itemMap])}return[{Provider:l,Slot:d,ItemSlot:E},M,s]}var jO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Rt=jO.reduce((n,e)=>{const t=Iu(`Primitive.${e}`),s=N.forwardRef((r,o)=>{const{asChild:l,...c}=r,f=l?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(f,{...c,ref:o})});return s.displayName=`Primitive.${e}`,{...n,[e]:s}},{});function PS(n,e){n&&ec.flushSync(()=>n.dispatchEvent(e))}function Gs(n){const e=N.useRef(n);return N.useEffect(()=>{e.current=n}),N.useMemo(()=>(...t)=>{var s;return(s=e.current)==null?void 0:s.call(e,...t)},[])}function LO(n,e=globalThis==null?void 0:globalThis.document){const t=Gs(n);N.useEffect(()=>{const s=r=>{r.key==="Escape"&&t(r)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[t,e])}var zO="DismissableLayer",Wy="dismissableLayer.update",VO="dismissableLayer.pointerDownOutside",$O="dismissableLayer.focusOutside",u1,DS=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cb=N.forwardRef((n,e)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:o,onInteractOutside:l,onDismiss:c,...f}=n,d=N.useContext(DS),[g,_]=N.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=N.useState({}),M=_n(e,ee=>_(ee)),A=Array.from(d.layers),[R]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),k=A.indexOf(R),U=g?A.indexOf(g):-1,I=d.layersWithOutsidePointerEventsDisabled.size>0,V=U>=k,H=WO(ee=>{const Q=ee.target,ge=[...d.branches].some(Ne=>Ne.contains(Q));!V||ge||(r==null||r(ee),l==null||l(ee),ee.defaultPrevented||c==null||c())},x),W=XO(ee=>{const Q=ee.target;[...d.branches].some(Ne=>Ne.contains(Q))||(o==null||o(ee),l==null||l(ee),ee.defaultPrevented||c==null||c())},x);return LO(ee=>{U===d.layers.size-1&&(s==null||s(ee),!ee.defaultPrevented&&c&&(ee.preventDefault(),c()))},x),N.useEffect(()=>{if(g)return t&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(u1=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(g)),d.layers.add(g),f1(),()=>{t&&d.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=u1)}},[g,x,t,d]),N.useEffect(()=>()=>{g&&(d.layers.delete(g),d.layersWithOutsidePointerEventsDisabled.delete(g),f1())},[g,d]),N.useEffect(()=>{const ee=()=>E({});return document.addEventListener(Wy,ee),()=>document.removeEventListener(Wy,ee)},[]),T.jsx(Rt.div,{...f,ref:M,style:{pointerEvents:I?V?"auto":"none":void 0,...n.style},onFocusCapture:vt(n.onFocusCapture,W.onFocusCapture),onBlurCapture:vt(n.onBlurCapture,W.onBlurCapture),onPointerDownCapture:vt(n.onPointerDownCapture,H.onPointerDownCapture)})});cb.displayName=zO;var HO="DismissableLayerBranch",BS=N.forwardRef((n,e)=>{const t=N.useContext(DS),s=N.useRef(null),r=_n(e,s);return N.useEffect(()=>{const o=s.current;if(o)return t.branches.add(o),()=>{t.branches.delete(o)}},[t.branches]),T.jsx(Rt.div,{...n,ref:r})});BS.displayName=HO;function WO(n,e=globalThis==null?void 0:globalThis.document){const t=Gs(n),s=N.useRef(!1),r=N.useRef(()=>{});return N.useEffect(()=>{const o=c=>{if(c.target&&!s.current){let f=function(){US(VO,t,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=f,e.addEventListener("click",r.current,{once:!0})):f()}else e.removeEventListener("click",r.current);s.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",o),e.removeEventListener("click",r.current)}},[e,t]),{onPointerDownCapture:()=>s.current=!0}}function XO(n,e=globalThis==null?void 0:globalThis.document){const t=Gs(n),s=N.useRef(!1);return N.useEffect(()=>{const r=o=>{o.target&&!s.current&&US($O,t,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function f1(){const n=new CustomEvent(Wy);document.dispatchEvent(n)}function US(n,e,t,{discrete:s}){const r=t.originalEvent.target,o=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(n,e,{once:!0}),s?PS(r,o):r.dispatchEvent(o)}var qO=cb,YO=BS,Kn=globalThis!=null&&globalThis.document?N.useLayoutEffect:()=>{},KO="Portal",ub=N.forwardRef((n,e)=>{var c;const{container:t,...s}=n,[r,o]=N.useState(!1);Kn(()=>o(!0),[]);const l=t||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return l?IO.createPortal(T.jsx(Rt.div,{...s,ref:e}),l):null});ub.displayName=KO;function ZO(n,e){return N.useReducer((t,s)=>e[t][s]??t,n)}var fb=n=>{const{present:e,children:t}=n,s=QO(e),r=typeof t=="function"?t({present:s.isPresent}):N.Children.only(t),o=_n(s.ref,GO(r));return typeof t=="function"||s.isPresent?N.cloneElement(r,{ref:o}):null};fb.displayName="Presence";function QO(n){const[e,t]=N.useState(),s=N.useRef(null),r=N.useRef(n),o=N.useRef("none"),l=n?"mounted":"unmounted",[c,f]=ZO(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const d=_h(s.current);o.current=c==="mounted"?d:"none"},[c]),Kn(()=>{const d=s.current,g=r.current;if(g!==n){const x=o.current,E=_h(d);n?f("MOUNT"):E==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(g&&x!==E?"ANIMATION_OUT":"UNMOUNT"),r.current=n}},[n,f]),Kn(()=>{if(e){let d;const g=e.ownerDocument.defaultView??window,_=E=>{const A=_h(s.current).includes(E.animationName);if(E.target===e&&A&&(f("ANIMATION_END"),!r.current)){const R=e.style.animationFillMode;e.style.animationFillMode="forwards",d=g.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=R)})}},x=E=>{E.target===e&&(o.current=_h(s.current))};return e.addEventListener("animationstart",x),e.addEventListener("animationcancel",_),e.addEventListener("animationend",_),()=>{g.clearTimeout(d),e.removeEventListener("animationstart",x),e.removeEventListener("animationcancel",_),e.removeEventListener("animationend",_)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:N.useCallback(d=>{s.current=d?getComputedStyle(d):null,t(d)},[])}}function _h(n){return(n==null?void 0:n.animationName)||"none"}function GO(n){var s,r;let e=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=(r=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:r.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}var JO=sb[" useInsertionEffect ".trim().toString()]||Kn;function ku({prop:n,defaultProp:e,onChange:t=()=>{},caller:s}){const[r,o,l]=eI({defaultProp:e,onChange:t}),c=n!==void 0,f=c?n:r;{const g=N.useRef(n!==void 0);N.useEffect(()=>{const _=g.current;_!==c&&console.warn(`${s} is changing from ${_?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=c},[c,s])}const d=N.useCallback(g=>{var _;if(c){const x=tI(g)?g(n):g;x!==n&&((_=l.current)==null||_.call(l,x))}else o(g)},[c,n,o,l]);return[f,d]}function eI({defaultProp:n,onChange:e}){const[t,s]=N.useState(n),r=N.useRef(t),o=N.useRef(e);return JO(()=>{o.current=e},[e]),N.useEffect(()=>{var l;r.current!==t&&((l=o.current)==null||l.call(o,t),r.current=t)},[t,r]),[t,s,o]}function tI(n){return typeof n=="function"}var FS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),nI="VisuallyHidden",hb=N.forwardRef((n,e)=>T.jsx(Rt.span,{...n,ref:e,style:{...FS,...n.style}}));hb.displayName=nI;var db="ToastProvider",[pb,sI,rI]=lb("Toast"),[jS]=tc("Toast",[rI]),[iI,tp]=jS(db),LS=n=>{const{__scopeToast:e,label:t="Notification",duration:s=5e3,swipeDirection:r="right",swipeThreshold:o=50,children:l}=n,[c,f]=N.useState(null),[d,g]=N.useState(0),_=N.useRef(!1),x=N.useRef(!1);return t.trim()||console.error(`Invalid prop \`label\` supplied to \`${db}\`. Expected non-empty \`string\`.`),T.jsx(pb.Provider,{scope:e,children:T.jsx(iI,{scope:e,label:t,duration:s,swipeDirection:r,swipeThreshold:o,toastCount:d,viewport:c,onViewportChange:f,onToastAdd:N.useCallback(()=>g(E=>E+1),[]),onToastRemove:N.useCallback(()=>g(E=>E-1),[]),isFocusedToastEscapeKeyDownRef:_,isClosePausedRef:x,children:l})})};LS.displayName=db;var zS="ToastViewport",oI=["F8"],Xy="toast.viewportPause",qy="toast.viewportResume",VS=N.forwardRef((n,e)=>{const{__scopeToast:t,hotkey:s=oI,label:r="Notifications ({hotkey})",...o}=n,l=tp(zS,t),c=sI(t),f=N.useRef(null),d=N.useRef(null),g=N.useRef(null),_=N.useRef(null),x=_n(e,_,l.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=l.toastCount>0;N.useEffect(()=>{const R=k=>{var I;s.length!==0&&s.every(V=>k[V]||k.code===V)&&((I=_.current)==null||I.focus())};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[s]),N.useEffect(()=>{const R=f.current,k=_.current;if(M&&R&&k){const U=()=>{if(!l.isClosePausedRef.current){const W=new CustomEvent(Xy);k.dispatchEvent(W),l.isClosePausedRef.current=!0}},I=()=>{if(l.isClosePausedRef.current){const W=new CustomEvent(qy);k.dispatchEvent(W),l.isClosePausedRef.current=!1}},V=W=>{!R.contains(W.relatedTarget)&&I()},H=()=>{R.contains(document.activeElement)||I()};return R.addEventListener("focusin",U),R.addEventListener("focusout",V),R.addEventListener("pointermove",U),R.addEventListener("pointerleave",H),window.addEventListener("blur",U),window.addEventListener("focus",I),()=>{R.removeEventListener("focusin",U),R.removeEventListener("focusout",V),R.removeEventListener("pointermove",U),R.removeEventListener("pointerleave",H),window.removeEventListener("blur",U),window.removeEventListener("focus",I)}}},[M,l.isClosePausedRef]);const A=N.useCallback(({tabbingDirection:R})=>{const U=c().map(I=>{const V=I.ref.current,H=[V,...bI(V)];return R==="forwards"?H:H.reverse()});return(R==="forwards"?U.reverse():U).flat()},[c]);return N.useEffect(()=>{const R=_.current;if(R){const k=U=>{var H,W,ee;const I=U.altKey||U.ctrlKey||U.metaKey;if(U.key==="Tab"&&!I){const Q=document.activeElement,ge=U.shiftKey;if(U.target===R&&ge){(H=d.current)==null||H.focus();return}const ve=A({tabbingDirection:ge?"backwards":"forwards"}),De=ve.findIndex(be=>be===Q);Dm(ve.slice(De+1))?U.preventDefault():ge?(W=d.current)==null||W.focus():(ee=g.current)==null||ee.focus()}};return R.addEventListener("keydown",k),()=>R.removeEventListener("keydown",k)}},[c,A]),T.jsxs(YO,{ref:f,role:"region","aria-label":r.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:M?void 0:"none"},children:[M&&T.jsx(Yy,{ref:d,onFocusFromOutsideViewport:()=>{const R=A({tabbingDirection:"forwards"});Dm(R)}}),T.jsx(pb.Slot,{scope:t,children:T.jsx(Rt.ol,{tabIndex:-1,...o,ref:x})}),M&&T.jsx(Yy,{ref:g,onFocusFromOutsideViewport:()=>{const R=A({tabbingDirection:"backwards"});Dm(R)}})]})});VS.displayName=zS;var $S="ToastFocusProxy",Yy=N.forwardRef((n,e)=>{const{__scopeToast:t,onFocusFromOutsideViewport:s,...r}=n,o=tp($S,t);return T.jsx(hb,{"aria-hidden":!0,tabIndex:0,...r,ref:e,style:{position:"fixed"},onFocus:l=>{var d;const c=l.relatedTarget;!((d=o.viewport)!=null&&d.contains(c))&&s()}})});Yy.displayName=$S;var qu="Toast",aI="toast.swipeStart",lI="toast.swipeMove",cI="toast.swipeCancel",uI="toast.swipeEnd",HS=N.forwardRef((n,e)=>{const{forceMount:t,open:s,defaultOpen:r,onOpenChange:o,...l}=n,[c,f]=ku({prop:s,defaultProp:r??!0,onChange:o,caller:qu});return T.jsx(fb,{present:t||c,children:T.jsx(dI,{open:c,...l,ref:e,onClose:()=>f(!1),onPause:Gs(n.onPause),onResume:Gs(n.onResume),onSwipeStart:vt(n.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:vt(n.onSwipeMove,d=>{const{x:g,y:_}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${_}px`)}),onSwipeCancel:vt(n.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:vt(n.onSwipeEnd,d=>{const{x:g,y:_}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${_}px`),f(!1)})})})});HS.displayName=qu;var[fI,hI]=jS(qu,{onClose(){}}),dI=N.forwardRef((n,e)=>{const{__scopeToast:t,type:s="foreground",duration:r,open:o,onClose:l,onEscapeKeyDown:c,onPause:f,onResume:d,onSwipeStart:g,onSwipeMove:_,onSwipeCancel:x,onSwipeEnd:E,...M}=n,A=tp(qu,t),[R,k]=N.useState(null),U=_n(e,be=>k(be)),I=N.useRef(null),V=N.useRef(null),H=r||A.duration,W=N.useRef(0),ee=N.useRef(H),Q=N.useRef(0),{onToastAdd:ge,onToastRemove:Ne}=A,ne=Gs(()=>{var je;(R==null?void 0:R.contains(document.activeElement))&&((je=A.viewport)==null||je.focus()),l()}),ve=N.useCallback(be=>{!be||be===1/0||(window.clearTimeout(Q.current),W.current=new Date().getTime(),Q.current=window.setTimeout(ne,be))},[ne]);N.useEffect(()=>{const be=A.viewport;if(be){const je=()=>{ve(ee.current),d==null||d()},G=()=>{const Ae=new Date().getTime()-W.current;ee.current=ee.current-Ae,window.clearTimeout(Q.current),f==null||f()};return be.addEventListener(Xy,G),be.addEventListener(qy,je),()=>{be.removeEventListener(Xy,G),be.removeEventListener(qy,je)}}},[A.viewport,H,f,d,ve]),N.useEffect(()=>{o&&!A.isClosePausedRef.current&&ve(H)},[o,H,A.isClosePausedRef,ve]),N.useEffect(()=>(ge(),()=>Ne()),[ge,Ne]);const De=N.useMemo(()=>R?QS(R):null,[R]);return A.viewport?T.jsxs(T.Fragment,{children:[De&&T.jsx(pI,{__scopeToast:t,role:"status","aria-live":s==="foreground"?"assertive":"polite","aria-atomic":!0,children:De}),T.jsx(fI,{scope:t,onClose:ne,children:ec.createPortal(T.jsx(pb.ItemSlot,{scope:t,children:T.jsx(qO,{asChild:!0,onEscapeKeyDown:vt(c,()=>{A.isFocusedToastEscapeKeyDownRef.current||ne(),A.isFocusedToastEscapeKeyDownRef.current=!1}),children:T.jsx(Rt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":A.swipeDirection,...M,ref:U,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:vt(n.onKeyDown,be=>{be.key==="Escape"&&(c==null||c(be.nativeEvent),be.nativeEvent.defaultPrevented||(A.isFocusedToastEscapeKeyDownRef.current=!0,ne()))}),onPointerDown:vt(n.onPointerDown,be=>{be.button===0&&(I.current={x:be.clientX,y:be.clientY})}),onPointerMove:vt(n.onPointerMove,be=>{if(!I.current)return;const je=be.clientX-I.current.x,G=be.clientY-I.current.y,Ae=!!V.current,pe=["left","right"].includes(A.swipeDirection),qe=["left","up"].includes(A.swipeDirection)?Math.min:Math.max,K=pe?qe(0,je):0,Te=pe?0:qe(0,G),Se=be.pointerType==="touch"?10:2,he={x:K,y:Te},Ce={originalEvent:be,delta:he};Ae?(V.current=he,bh(lI,_,Ce,{discrete:!1})):h1(he,A.swipeDirection,Se)?(V.current=he,bh(aI,g,Ce,{discrete:!1}),be.target.setPointerCapture(be.pointerId)):(Math.abs(je)>Se||Math.abs(G)>Se)&&(I.current=null)}),onPointerUp:vt(n.onPointerUp,be=>{const je=V.current,G=be.target;if(G.hasPointerCapture(be.pointerId)&&G.releasePointerCapture(be.pointerId),V.current=null,I.current=null,je){const Ae=be.currentTarget,pe={originalEvent:be,delta:je};h1(je,A.swipeDirection,A.swipeThreshold)?bh(uI,E,pe,{discrete:!0}):bh(cI,x,pe,{discrete:!0}),Ae.addEventListener("click",qe=>qe.preventDefault(),{once:!0})}})})})}),A.viewport)})]}):null}),pI=n=>{const{__scopeToast:e,children:t,...s}=n,r=tp(qu,e),[o,l]=N.useState(!1),[c,f]=N.useState(!1);return yI(()=>l(!0)),N.useEffect(()=>{const d=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(d)},[]),c?null:T.jsx(ub,{asChild:!0,children:T.jsx(hb,{...s,children:o&&T.jsxs(T.Fragment,{children:[r.label," ",t]})})})},gI="ToastTitle",WS=N.forwardRef((n,e)=>{const{__scopeToast:t,...s}=n;return T.jsx(Rt.div,{...s,ref:e})});WS.displayName=gI;var mI="ToastDescription",XS=N.forwardRef((n,e)=>{const{__scopeToast:t,...s}=n;return T.jsx(Rt.div,{...s,ref:e})});XS.displayName=mI;var qS="ToastAction",YS=N.forwardRef((n,e)=>{const{altText:t,...s}=n;return t.trim()?T.jsx(ZS,{altText:t,asChild:!0,children:T.jsx(gb,{...s,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${qS}\`. Expected non-empty \`string\`.`),null)});YS.displayName=qS;var KS="ToastClose",gb=N.forwardRef((n,e)=>{const{__scopeToast:t,...s}=n,r=hI(KS,t);return T.jsx(ZS,{asChild:!0,children:T.jsx(Rt.button,{type:"button",...s,ref:e,onClick:vt(n.onClick,r.onClose)})})});gb.displayName=KS;var ZS=N.forwardRef((n,e)=>{const{__scopeToast:t,altText:s,...r}=n;return T.jsx(Rt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...r,ref:e})});function QS(n){const e=[];return Array.from(n.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&e.push(s.textContent),_I(s)){const r=s.ariaHidden||s.hidden||s.style.display==="none",o=s.dataset.radixToastAnnounceExclude==="";if(!r)if(o){const l=s.dataset.radixToastAnnounceAlt;l&&e.push(l)}else e.push(...QS(s))}}),e}function bh(n,e,t,{discrete:s}){const r=t.originalEvent.currentTarget,o=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:t});e&&r.addEventListener(n,e,{once:!0}),s?PS(r,o):r.dispatchEvent(o)}var h1=(n,e,t=0)=>{const s=Math.abs(n.x),r=Math.abs(n.y),o=s>r;return e==="left"||e==="right"?o&&s>t:!o&&r>t};function yI(n=()=>{}){const e=Gs(n);Kn(()=>{let t=0,s=0;return t=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(t),window.cancelAnimationFrame(s)}},[e])}function _I(n){return n.nodeType===n.ELEMENT_NODE}function bI(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function Dm(n){const e=document.activeElement;return n.some(t=>t===e?!0:(t.focus(),document.activeElement!==e))}var vI=LS,GS=VS,JS=HS,e3=WS,t3=XS,n3=YS,s3=gb;function r3(n){var e,t,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var r=n.length;for(e=0;e<r;e++)n[e]&&(t=r3(n[e]))&&(s&&(s+=" "),s+=t)}else for(t in n)n[t]&&(s&&(s+=" "),s+=t);return s}function i3(){for(var n,e,t=0,s="",r=arguments.length;t<r;t++)(n=arguments[t])&&(e=r3(n))&&(s&&(s+=" "),s+=e);return s}const d1=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,p1=i3,np=(n,e)=>t=>{var s;if((e==null?void 0:e.variants)==null)return p1(n,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:r,defaultVariants:o}=e,l=Object.keys(r).map(d=>{const g=t==null?void 0:t[d],_=o==null?void 0:o[d];if(g===null)return null;const x=d1(g)||d1(_);return r[d][x]}),c=t&&Object.entries(t).reduce((d,g)=>{let[_,x]=g;return x===void 0||(d[_]=x),d},{}),f=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((d,g)=>{let{class:_,className:x,...E}=g;return Object.entries(E).every(M=>{let[A,R]=M;return Array.isArray(R)?R.includes({...o,...c}[A]):{...o,...c}[A]===R})?[...d,_,x]:d},[]);return p1(n,l,f,t==null?void 0:t.class,t==null?void 0:t.className)};/**
50
50
  * @license lucide-react v0.513.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
@@ -291,7 +291,7 @@ Error generating stack: `+u.message+`
291
291
  *
292
292
  * This source code is licensed under the ISC license.
293
293
  * See the LICENSE file in the root directory of this source tree.
294
- */const Lk=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],bb=ft("zap",Lk),vb="-",zk=n=>{const e=$k(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:l=>{const c=l.split(vb);return c[0]===""&&c.length!==1&&c.shift(),p3(c,e)||Vk(l)},getConflictingClassGroupIds:(l,c)=>{const f=t[l]||[];return c&&s[l]?[...f,...s[l]]:f}}},p3=(n,e)=>{var l;if(n.length===0)return e.classGroupId;const t=n[0],s=e.nextPart.get(t),r=s?p3(n.slice(1),s):void 0;if(r)return r;if(e.validators.length===0)return;const o=n.join(vb);return(l=e.validators.find(({validator:c})=>c(o)))==null?void 0:l.classGroupId},b1=/^\[(.+)\]$/,Vk=n=>{if(b1.test(n)){const e=b1.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},$k=n=>{const{theme:e,classGroups:t}=n,s={nextPart:new Map,validators:[]};for(const r in t)Qy(t[r],s,r,e);return s},Qy=(n,e,t,s)=>{n.forEach(r=>{if(typeof r=="string"){const o=r===""?e:v1(e,r);o.classGroupId=t;return}if(typeof r=="function"){if(Hk(r)){Qy(r(s),e,t,s);return}e.validators.push({validator:r,classGroupId:t});return}Object.entries(r).forEach(([o,l])=>{Qy(l,v1(e,o),t,s)})})},v1=(n,e)=>{let t=n;return e.split(vb).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},Hk=n=>n.isThemeGetter,Wk=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const r=(o,l)=>{t.set(o,l),e++,e>n&&(e=0,s=t,t=new Map)};return{get(o){let l=t.get(o);if(l!==void 0)return l;if((l=s.get(o))!==void 0)return r(o,l),l},set(o,l){t.has(o)?t.set(o,l):r(o,l)}}},Gy="!",Jy=":",Xk=Jy.length,qk=n=>{const{prefix:e,experimentalParseClassName:t}=n;let s=r=>{const o=[];let l=0,c=0,f=0,d;for(let M=0;M<r.length;M++){let A=r[M];if(l===0&&c===0){if(A===Jy){o.push(r.slice(f,M)),f=M+Xk;continue}if(A==="/"){d=M;continue}}A==="["?l++:A==="]"?l--:A==="("?c++:A===")"&&c--}const g=o.length===0?r:r.substring(f),_=Yk(g),x=_!==g,E=d&&d>f?d-f:void 0;return{modifiers:o,hasImportantModifier:x,baseClassName:_,maybePostfixModifierPosition:E}};if(e){const r=e+Jy,o=s;s=l=>l.startsWith(r)?o(l.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(t){const r=s;s=o=>t({className:o,parseClassName:r})}return s},Yk=n=>n.endsWith(Gy)?n.substring(0,n.length-1):n.startsWith(Gy)?n.substring(1):n,Kk=n=>{const e=Object.fromEntries(n.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const r=[];let o=[];return s.forEach(l=>{l[0]==="["||e[l]?(r.push(...o.sort(),l),o=[]):o.push(l)}),r.push(...o.sort()),r}},Zk=n=>({cache:Wk(n.cacheSize),parseClassName:qk(n),sortModifiers:Kk(n),...zk(n)}),Qk=/\s+/,Gk=(n,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o}=e,l=[],c=n.trim().split(Qk);let f="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:_,modifiers:x,hasImportantModifier:E,baseClassName:M,maybePostfixModifierPosition:A}=t(g);if(_){f=g+(f.length>0?" "+f:f);continue}let R=!!A,k=s(R?M.substring(0,A):M);if(!k){if(!R){f=g+(f.length>0?" "+f:f);continue}if(k=s(M),!k){f=g+(f.length>0?" "+f:f);continue}R=!1}const U=o(x).join(":"),I=E?U+Gy:U,V=I+k;if(l.includes(V))continue;l.push(V);const H=r(k,R);for(let W=0;W<H.length;++W){const ee=H[W];l.push(I+ee)}f=g+(f.length>0?" "+f:f)}return f};function Jk(){let n=0,e,t,s="";for(;n<arguments.length;)(e=arguments[n++])&&(t=g3(e))&&(s&&(s+=" "),s+=t);return s}const g3=n=>{if(typeof n=="string")return n;let e,t="";for(let s=0;s<n.length;s++)n[s]&&(e=g3(n[s]))&&(t&&(t+=" "),t+=e);return t};function e4(n,...e){let t,s,r,o=l;function l(f){const d=e.reduce((g,_)=>_(g),n());return t=Zk(d),s=t.cache.get,r=t.cache.set,o=c,c(f)}function c(f){const d=s(f);if(d)return d;const g=Gk(f,t);return r(f,g),g}return function(){return o(Jk.apply(null,arguments))}}const Mn=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},m3=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,y3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,t4=/^\d+\/\d+$/,n4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,r4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,i4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,o4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=n=>t4.test(n),bt=n=>!!n&&!Number.isNaN(Number(n)),Li=n=>!!n&&Number.isInteger(Number(n)),Bm=n=>n.endsWith("%")&&bt(n.slice(0,-1)),ei=n=>n4.test(n),a4=()=>!0,l4=n=>s4.test(n)&&!r4.test(n),_3=()=>!1,c4=n=>i4.test(n),u4=n=>o4.test(n),f4=n=>!Ke(n)&&!Ze(n),h4=n=>nc(n,w3,_3),Ke=n=>m3.test(n),Lo=n=>nc(n,x3,l4),Um=n=>nc(n,y4,bt),w1=n=>nc(n,b3,_3),d4=n=>nc(n,v3,u4),vh=n=>nc(n,T3,c4),Ze=n=>y3.test(n),iu=n=>sc(n,x3),p4=n=>sc(n,_4),x1=n=>sc(n,b3),g4=n=>sc(n,w3),m4=n=>sc(n,v3),wh=n=>sc(n,T3,!0),nc=(n,e,t)=>{const s=m3.exec(n);return s?s[1]?e(s[1]):t(s[2]):!1},sc=(n,e,t=!1)=>{const s=y3.exec(n);return s?s[1]?e(s[1]):t:!1},b3=n=>n==="position"||n==="percentage",v3=n=>n==="image"||n==="url",w3=n=>n==="length"||n==="size"||n==="bg-size",x3=n=>n==="length",y4=n=>n==="number",_4=n=>n==="family-name",T3=n=>n==="shadow",b4=()=>{const n=Mn("color"),e=Mn("font"),t=Mn("text"),s=Mn("font-weight"),r=Mn("tracking"),o=Mn("leading"),l=Mn("breakpoint"),c=Mn("container"),f=Mn("spacing"),d=Mn("radius"),g=Mn("shadow"),_=Mn("inset-shadow"),x=Mn("text-shadow"),E=Mn("drop-shadow"),M=Mn("blur"),A=Mn("perspective"),R=Mn("aspect"),k=Mn("ease"),U=Mn("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...V(),Ze,Ke],W=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto","contain","none"],Q=()=>[Ze,Ke,f],ge=()=>[el,"full","auto",...Q()],Ne=()=>[Li,"none","subgrid",Ze,Ke],ne=()=>["auto",{span:["full",Li,Ze,Ke]},Li,Ze,Ke],ve=()=>[Li,"auto",Ze,Ke],De=()=>["auto","min","max","fr",Ze,Ke],be=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],je=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...Q()],Ae=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Q()],pe=()=>[n,Ze,Ke],qe=()=>[...V(),x1,w1,{position:[Ze,Ke]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Te=()=>["auto","cover","contain",g4,h4,{size:[Ze,Ke]}],Se=()=>[Bm,iu,Lo],he=()=>["","none","full",d,Ze,Ke],Ce=()=>["",bt,iu,Lo],fe=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[bt,Bm,x1,w1],Ue=()=>["","none",M,Ze,Ke],et=()=>["none",bt,Ze,Ke],Ge=()=>["none",bt,Ze,Ke],ot=()=>[bt,Ze,Ke],at=()=>[el,"full",...Q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ei],breakpoint:[ei],color:[a4],container:[ei],"drop-shadow":[ei],ease:["in","out","in-out"],font:[f4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ei],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ei],shadow:[ei],spacing:["px",bt],text:[ei],"text-shadow":[ei],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,Ke,Ze,R]}],container:["container"],columns:[{columns:[bt,Ke,Ze,c]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:H()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ge()}],"inset-x":[{"inset-x":ge()}],"inset-y":[{"inset-y":ge()}],start:[{start:ge()}],end:[{end:ge()}],top:[{top:ge()}],right:[{right:ge()}],bottom:[{bottom:ge()}],left:[{left:ge()}],visibility:["visible","invisible","collapse"],z:[{z:[Li,"auto",Ze,Ke]}],basis:[{basis:[el,"full","auto",c,...Q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[bt,el,"auto","initial","none",Ke]}],grow:[{grow:["",bt,Ze,Ke]}],shrink:[{shrink:["",bt,Ze,Ke]}],order:[{order:[Li,"first","last","none",Ze,Ke]}],"grid-cols":[{"grid-cols":Ne()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":ve()}],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":Ne()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":De()}],"auto-rows":[{"auto-rows":De()}],gap:[{gap:Q()}],"gap-x":[{"gap-x":Q()}],"gap-y":[{"gap-y":Q()}],"justify-content":[{justify:[...be(),"normal"]}],"justify-items":[{"justify-items":[...je(),"normal"]}],"justify-self":[{"justify-self":["auto",...je()]}],"align-content":[{content:["normal",...be()]}],"align-items":[{items:[...je(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...je(),{baseline:["","last"]}]}],"place-content":[{"place-content":be()}],"place-items":[{"place-items":[...je(),"baseline"]}],"place-self":[{"place-self":["auto",...je()]}],p:[{p:Q()}],px:[{px:Q()}],py:[{py:Q()}],ps:[{ps:Q()}],pe:[{pe:Q()}],pt:[{pt:Q()}],pr:[{pr:Q()}],pb:[{pb:Q()}],pl:[{pl:Q()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":Q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Q()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ae()}],w:[{w:[c,"screen",...Ae()]}],"min-w":[{"min-w":[c,"screen","none",...Ae()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...Ae()]}],h:[{h:["screen","lh",...Ae()]}],"min-h":[{"min-h":["screen","lh","none",...Ae()]}],"max-h":[{"max-h":["screen","lh",...Ae()]}],"font-size":[{text:["base",t,iu,Lo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Ze,Um]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bm,Ke]}],"font-family":[{font:[p4,Ke,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,Ze,Ke]}],"line-clamp":[{"line-clamp":[bt,"none",Ze,Um]}],leading:[{leading:[o,...Q()]}],"list-image":[{"list-image":["none",Ze,Ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ze,Ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:pe()}],"text-color":[{text:pe()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[bt,"from-font","auto",Ze,Lo]}],"text-decoration-color":[{decoration:pe()}],"underline-offset":[{"underline-offset":[bt,"auto",Ze,Ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze,Ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ze,Ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:qe()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:Te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Li,Ze,Ke],radial:["",Ze,Ke],conic:[Li,Ze,Ke]},m4,d4]}],"bg-color":[{bg:pe()}],"gradient-from-pos":[{from:Se()}],"gradient-via-pos":[{via:Se()}],"gradient-to-pos":[{to:Se()}],"gradient-from":[{from:pe()}],"gradient-via":[{via:pe()}],"gradient-to":[{to:pe()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:Ce()}],"border-w-x":[{"border-x":Ce()}],"border-w-y":[{"border-y":Ce()}],"border-w-s":[{"border-s":Ce()}],"border-w-e":[{"border-e":Ce()}],"border-w-t":[{"border-t":Ce()}],"border-w-r":[{"border-r":Ce()}],"border-w-b":[{"border-b":Ce()}],"border-w-l":[{"border-l":Ce()}],"divide-x":[{"divide-x":Ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:pe()}],"border-color-x":[{"border-x":pe()}],"border-color-y":[{"border-y":pe()}],"border-color-s":[{"border-s":pe()}],"border-color-e":[{"border-e":pe()}],"border-color-t":[{"border-t":pe()}],"border-color-r":[{"border-r":pe()}],"border-color-b":[{"border-b":pe()}],"border-color-l":[{"border-l":pe()}],"divide-color":[{divide:pe()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[bt,Ze,Ke]}],"outline-w":[{outline:["",bt,iu,Lo]}],"outline-color":[{outline:pe()}],shadow:[{shadow:["","none",g,wh,vh]}],"shadow-color":[{shadow:pe()}],"inset-shadow":[{"inset-shadow":["none",_,wh,vh]}],"inset-shadow-color":[{"inset-shadow":pe()}],"ring-w":[{ring:Ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:pe()}],"ring-offset-w":[{"ring-offset":[bt,Lo]}],"ring-offset-color":[{"ring-offset":pe()}],"inset-ring-w":[{"inset-ring":Ce()}],"inset-ring-color":[{"inset-ring":pe()}],"text-shadow":[{"text-shadow":["none",x,wh,vh]}],"text-shadow-color":[{"text-shadow":pe()}],opacity:[{opacity:[bt,Ze,Ke]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[bt]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":pe()}],"mask-image-linear-to-color":[{"mask-linear-to":pe()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":pe()}],"mask-image-t-to-color":[{"mask-t-to":pe()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":pe()}],"mask-image-r-to-color":[{"mask-r-to":pe()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":pe()}],"mask-image-b-to-color":[{"mask-b-to":pe()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":pe()}],"mask-image-l-to-color":[{"mask-l-to":pe()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":pe()}],"mask-image-x-to-color":[{"mask-x-to":pe()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":pe()}],"mask-image-y-to-color":[{"mask-y-to":pe()}],"mask-image-radial":[{"mask-radial":[Ze,Ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":pe()}],"mask-image-radial-to-color":[{"mask-radial-to":pe()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[bt]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":pe()}],"mask-image-conic-to-color":[{"mask-conic-to":pe()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:qe()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:Te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ze,Ke]}],filter:[{filter:["","none",Ze,Ke]}],blur:[{blur:Ue()}],brightness:[{brightness:[bt,Ze,Ke]}],contrast:[{contrast:[bt,Ze,Ke]}],"drop-shadow":[{"drop-shadow":["","none",E,wh,vh]}],"drop-shadow-color":[{"drop-shadow":pe()}],grayscale:[{grayscale:["",bt,Ze,Ke]}],"hue-rotate":[{"hue-rotate":[bt,Ze,Ke]}],invert:[{invert:["",bt,Ze,Ke]}],saturate:[{saturate:[bt,Ze,Ke]}],sepia:[{sepia:["",bt,Ze,Ke]}],"backdrop-filter":[{"backdrop-filter":["","none",Ze,Ke]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[bt,Ze,Ke]}],"backdrop-contrast":[{"backdrop-contrast":[bt,Ze,Ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",bt,Ze,Ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[bt,Ze,Ke]}],"backdrop-invert":[{"backdrop-invert":["",bt,Ze,Ke]}],"backdrop-opacity":[{"backdrop-opacity":[bt,Ze,Ke]}],"backdrop-saturate":[{"backdrop-saturate":[bt,Ze,Ke]}],"backdrop-sepia":[{"backdrop-sepia":["",bt,Ze,Ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Q()}],"border-spacing-x":[{"border-spacing-x":Q()}],"border-spacing-y":[{"border-spacing-y":Q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ze,Ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[bt,"initial",Ze,Ke]}],ease:[{ease:["linear","initial",k,Ze,Ke]}],delay:[{delay:[bt,Ze,Ke]}],animate:[{animate:["none",U,Ze,Ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,Ze,Ke]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:et()}],"rotate-x":[{"rotate-x":et()}],"rotate-y":[{"rotate-y":et()}],"rotate-z":[{"rotate-z":et()}],scale:[{scale:Ge()}],"scale-x":[{"scale-x":Ge()}],"scale-y":[{"scale-y":Ge()}],"scale-z":[{"scale-z":Ge()}],"scale-3d":["scale-3d"],skew:[{skew:ot()}],"skew-x":[{"skew-x":ot()}],"skew-y":[{"skew-y":ot()}],transform:[{transform:[Ze,Ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:at()}],"translate-x":[{"translate-x":at()}],"translate-y":[{"translate-y":at()}],"translate-z":[{"translate-z":at()}],"translate-none":["translate-none"],accent:[{accent:pe()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:pe()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ze,Ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ze,Ke]}],fill:[{fill:["none",...pe()]}],"stroke-w":[{stroke:[bt,iu,Lo,Um]}],stroke:[{stroke:["none",...pe()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},v4=e4(b4);function zt(...n){return v4(i3(n))}const w4=np("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive border-destructive bg-card text-card-foreground",success:"border-[color:var(--color-success)] bg-card text-card-foreground",warning:"border-[color:var(--color-warning)] bg-card text-card-foreground",info:"border-[color:var(--color-info)] bg-card text-card-foreground"}},defaultVariants:{variant:"default"}}),x4=vI,S3=N.forwardRef(({className:n,...e},t)=>T.jsx(GS,{ref:t,className:zt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] gap-2",n),...e}));S3.displayName=GS.displayName;const E3=N.forwardRef(({className:n,variant:e,...t},s)=>T.jsx(JS,{ref:s,className:zt(w4({variant:e}),n),...t}));E3.displayName=JS.displayName;const T4=N.forwardRef(({className:n,...e},t)=>T.jsx(n3,{ref:t,className:zt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-thin ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...e}));T4.displayName=n3.displayName;const A3=N.forwardRef(({className:n,...e},t)=>T.jsx(s3,{ref:t,className:zt("absolute right-2 top-2 rounded-md p-1 text-foreground/30 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-80 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...e,children:T.jsx(_b,{className:"h-4 w-4"})}));A3.displayName=s3.displayName;const R3=N.forwardRef(({className:n,...e},t)=>T.jsx(e3,{ref:t,className:zt("text-xs font-thin",n),...e}));R3.displayName=e3.displayName;const C3=N.forwardRef(({className:n,...e},t)=>T.jsx(t3,{ref:t,className:zt("text-xs opacity-70",n),...e}));C3.displayName=t3.displayName;const M3=N.forwardRef(({className:n,variant:e="default",...t},s)=>{const r={default:id,destructive:LI,success:gl,warning:fu,info:id}[e],o={default:"text-muted-foreground",destructive:"text-destructive",success:"text-[color:var(--color-success)]",warning:"text-[color:var(--color-warning)]",info:"text-[color:var(--color-info)]"}[e];return T.jsx("div",{ref:s,className:zt("flex-shrink-0",n),...t,children:T.jsx(r,{className:zt("h-4 w-4",o)})})});M3.displayName="ToastIcon";const T1=(n,e)=>{const t={default:"text-foreground",destructive:"text-destructive",success:"text-[color:var(--color-success)]",warning:"text-[color:var(--color-warning)]",info:"text-[color:var(--color-info)]"},s={success:["added","created","saved","completed","success","done"],destructive:["error","failed","deleted","removed","warning"],warning:["warning","caution","alert"],info:["info","note","updated","changed"]};let r=n;return r=r.replace(/([^\s]+\.[a-zA-Z0-9]+)/g,"<strong>$1</strong>"),r=r.replace(/([^\s]*\/[^\s]+)/g,"<strong>$1</strong>"),Object.entries(s).forEach(([o,l])=>{l.forEach(c=>{const f=new RegExp(`\\b(${c})\\b`,"gi"),d=t[o];r=r.replace(f,`<span class="${d} font-medium">$1</span>`)})}),{__html:r}},S4=3,E4=5e3;let Fm=0;function A4(){return Fm=(Fm+1)%Number.MAX_SAFE_INTEGER,Fm.toString()}const jm=new Map,S1=n=>{if(jm.has(n))return;const e=setTimeout(()=>{jm.delete(n),wu({type:"REMOVE_TOAST",toastId:n})},E4);jm.set(n,e)},R4=(n,e)=>{switch(e.type){case"ADD_TOAST":return{...n,toasts:[e.toast,...n.toasts].slice(0,S4)};case"UPDATE_TOAST":return{...n,toasts:n.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{const{toastId:t}=e;return t?S1(t):n.toasts.forEach(s=>{S1(s.id)}),{...n,toasts:n.toasts.map(s=>s.id===t||t===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return e.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(t=>t.id!==e.toastId)}}},Hh=[];let Wh={toasts:[]};function wu(n){Wh=R4(Wh,n),Hh.forEach(e=>{e(Wh)})}function hu({...n}){const e=A4(),t=r=>wu({type:"UPDATE_TOAST",toast:{...r,id:e}}),s=()=>wu({type:"DISMISS_TOAST",toastId:e});return wu({type:"ADD_TOAST",toast:{...n,id:e,open:!0,onOpenChange:r=>{r||s()}}}),{id:e,dismiss:s,update:t}}function C4(){const[n,e]=N.useState(Wh);return N.useEffect(()=>(Hh.push(e),()=>{const t=Hh.indexOf(e);t>-1&&Hh.splice(t,1)}),[n]),{...n,toast:hu,dismiss:t=>wu({type:"DISMISS_TOAST",toastId:t})}}function M4(){const{toasts:n}=C4();return T.jsxs(x4,{children:[n.map(function({id:e,title:t,description:s,action:r,variant:o,...l}){return T.jsxs(E3,{variant:o,...l,children:[T.jsxs("div",{className:"flex items-start gap-3",children:[T.jsx(M3,{variant:o}),T.jsxs("div",{className:"grid gap-1 flex-1",children:[t&&T.jsx(R3,{dangerouslySetInnerHTML:T1(String(t))}),s&&T.jsx(C3,{dangerouslySetInnerHTML:T1(String(s))})]})]}),r,T.jsx(A3,{})]},e)}),T.jsx(S3,{})]})}var N4=(n,e,t,s,r,o,l,c)=>{let f=document.documentElement,d=["light","dark"];function g(E){(Array.isArray(n)?n:[n]).forEach(M=>{let A=M==="class",R=A&&o?r.map(k=>o[k]||k):r;A?(f.classList.remove(...R),f.classList.add(o&&o[E]?o[E]:E)):f.setAttribute(M,E)}),_(E)}function _(E){c&&d.includes(E)&&(f.style.colorScheme=E)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)g(s);else try{let E=localStorage.getItem(e)||t,M=l&&E==="system"?x():E;g(M)}catch{}},E1=["light","dark"],N3="(prefers-color-scheme: dark)",O4=typeof window>"u",wb=N.createContext(void 0),I4={setTheme:n=>{},themes:[]},k4=()=>{var n;return(n=N.useContext(wb))!=null?n:I4},P4=n=>N.useContext(wb)?N.createElement(N.Fragment,null,n.children):N.createElement(B4,{...n}),D4=["light","dark"],B4=({forcedTheme:n,disableTransitionOnChange:e=!1,enableSystem:t=!0,enableColorScheme:s=!0,storageKey:r="theme",themes:o=D4,defaultTheme:l=t?"system":"light",attribute:c="data-theme",value:f,children:d,nonce:g,scriptProps:_})=>{let[x,E]=N.useState(()=>F4(r,l)),[M,A]=N.useState(()=>x==="system"?Lm():x),R=f?Object.values(f):o,k=N.useCallback(H=>{let W=H;if(!W)return;H==="system"&&t&&(W=Lm());let ee=f?f[W]:W,Q=e?j4(g):null,ge=document.documentElement,Ne=ne=>{ne==="class"?(ge.classList.remove(...R),ee&&ge.classList.add(ee)):ne.startsWith("data-")&&(ee?ge.setAttribute(ne,ee):ge.removeAttribute(ne))};if(Array.isArray(c)?c.forEach(Ne):Ne(c),s){let ne=E1.includes(l)?l:null,ve=E1.includes(W)?W:ne;ge.style.colorScheme=ve}Q==null||Q()},[g]),U=N.useCallback(H=>{let W=typeof H=="function"?H(x):H;E(W);try{localStorage.setItem(r,W)}catch{}},[x]),I=N.useCallback(H=>{let W=Lm(H);A(W),x==="system"&&t&&!n&&k("system")},[x,n]);N.useEffect(()=>{let H=window.matchMedia(N3);return H.addListener(I),I(H),()=>H.removeListener(I)},[I]),N.useEffect(()=>{let H=W=>{W.key===r&&(W.newValue?E(W.newValue):U(l))};return window.addEventListener("storage",H),()=>window.removeEventListener("storage",H)},[U]),N.useEffect(()=>{k(n??x)},[n,x]);let V=N.useMemo(()=>({theme:x,setTheme:U,forcedTheme:n,resolvedTheme:x==="system"?M:x,themes:t?[...o,"system"]:o,systemTheme:t?M:void 0}),[x,U,n,M,t,o]);return N.createElement(wb.Provider,{value:V},N.createElement(U4,{forcedTheme:n,storageKey:r,attribute:c,enableSystem:t,enableColorScheme:s,defaultTheme:l,value:f,themes:o,nonce:g,scriptProps:_}),d)},U4=N.memo(({forcedTheme:n,storageKey:e,attribute:t,enableSystem:s,enableColorScheme:r,defaultTheme:o,value:l,themes:c,nonce:f,scriptProps:d})=>{let g=JSON.stringify([t,e,o,n,c,l,s,r]).slice(1,-1);return N.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${N4.toString()})(${g})`}})}),F4=(n,e)=>{if(O4)return;let t;try{t=localStorage.getItem(n)||void 0}catch{}return t||e},j4=n=>{let e=document.createElement("style");return n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},Lm=n=>(n||(n=window.matchMedia(N3)),n.matches?"dark":"light");function L4({children:n,...e}){return T.jsx(P4,{...e,children:n})}const z4=np("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-thin transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Pn({className:n,variant:e,size:t,asChild:s=!1,...r}){const o=s?kS:"button";return T.jsx(o,{"data-slot":"button",className:zt(z4({variant:e,size:t,className:n})),...r})}const V4=np("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-thin w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function kn({className:n,variant:e,asChild:t=!1,...s}){const r=t?kS:"span";return T.jsx(r,{"data-slot":"badge",className:zt(V4({variant:e}),n),...s})}var $4=sb[" useId ".trim().toString()]||(()=>{}),H4=0;function Yu(n){const[e,t]=N.useState($4());return Kn(()=>{t(s=>s??String(H4++))},[n]),e?`radix-${e}`:""}var W4=N.createContext(void 0);function xb(n){const e=N.useContext(W4);return n||e||"ltr"}var zm="rovingFocusGroup.onEntryFocus",X4={bubbles:!1,cancelable:!0},Ku="RovingFocusGroup",[e_,O3,q4]=lb(Ku),[Y4,I3]=tc(Ku,[q4]),[K4,Z4]=Y4(Ku),k3=N.forwardRef((n,e)=>T.jsx(e_.Provider,{scope:n.__scopeRovingFocusGroup,children:T.jsx(e_.Slot,{scope:n.__scopeRovingFocusGroup,children:T.jsx(Q4,{...n,ref:e})})}));k3.displayName=Ku;var Q4=N.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:s,loop:r=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:g=!1,..._}=n,x=N.useRef(null),E=_n(e,x),M=xb(o),[A,R]=ku({prop:l,defaultProp:c??null,onChange:f,caller:Ku}),[k,U]=N.useState(!1),I=Gs(d),V=O3(t),H=N.useRef(!1),[W,ee]=N.useState(0);return N.useEffect(()=>{const Q=x.current;if(Q)return Q.addEventListener(zm,I),()=>Q.removeEventListener(zm,I)},[I]),T.jsx(K4,{scope:t,orientation:s,dir:M,loop:r,currentTabStopId:A,onItemFocus:N.useCallback(Q=>R(Q),[R]),onItemShiftTab:N.useCallback(()=>U(!0),[]),onFocusableItemAdd:N.useCallback(()=>ee(Q=>Q+1),[]),onFocusableItemRemove:N.useCallback(()=>ee(Q=>Q-1),[]),children:T.jsx(Rt.div,{tabIndex:k||W===0?-1:0,"data-orientation":s,..._,ref:E,style:{outline:"none",...n.style},onMouseDown:vt(n.onMouseDown,()=>{H.current=!0}),onFocus:vt(n.onFocus,Q=>{const ge=!H.current;if(Q.target===Q.currentTarget&&ge&&!k){const Ne=new CustomEvent(zm,X4);if(Q.currentTarget.dispatchEvent(Ne),!Ne.defaultPrevented){const ne=V().filter(G=>G.focusable),ve=ne.find(G=>G.active),De=ne.find(G=>G.id===A),je=[ve,De,...ne].filter(Boolean).map(G=>G.ref.current);B3(je,g)}}H.current=!1}),onBlur:vt(n.onBlur,()=>U(!1))})})}),P3="RovingFocusGroupItem",D3=N.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:s=!0,active:r=!1,tabStopId:o,children:l,...c}=n,f=Yu(),d=o||f,g=Z4(P3,t),_=g.currentTabStopId===d,x=O3(t),{onFocusableItemAdd:E,onFocusableItemRemove:M,currentTabStopId:A}=g;return N.useEffect(()=>{if(s)return E(),()=>M()},[s,E,M]),T.jsx(e_.ItemSlot,{scope:t,id:d,focusable:s,active:r,children:T.jsx(Rt.span,{tabIndex:_?0:-1,"data-orientation":g.orientation,...c,ref:e,onMouseDown:vt(n.onMouseDown,R=>{s?g.onItemFocus(d):R.preventDefault()}),onFocus:vt(n.onFocus,()=>g.onItemFocus(d)),onKeyDown:vt(n.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){g.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const k=eP(R,g.orientation,g.dir);if(k!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let I=x().filter(V=>V.focusable).map(V=>V.ref.current);if(k==="last")I.reverse();else if(k==="prev"||k==="next"){k==="prev"&&I.reverse();const V=I.indexOf(R.currentTarget);I=g.loop?tP(I,V+1):I.slice(V+1)}setTimeout(()=>B3(I))}}),children:typeof l=="function"?l({isCurrentTabStop:_,hasTabStop:A!=null}):l})})});D3.displayName=P3;var G4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function J4(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function eP(n,e,t){const s=J4(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return G4[s]}function B3(n,e=!1){const t=document.activeElement;for(const s of n)if(s===t||(s.focus({preventScroll:e}),document.activeElement!==t))return}function tP(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var nP=k3,sP=D3,sp="Tabs",[rP,nX]=tc(sp,[I3]),U3=I3(),[iP,Tb]=rP(sp),F3=N.forwardRef((n,e)=>{const{__scopeTabs:t,value:s,onValueChange:r,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...d}=n,g=xb(c),[_,x]=ku({prop:s,onChange:r,defaultProp:o??"",caller:sp});return T.jsx(iP,{scope:t,baseId:Yu(),value:_,onValueChange:x,orientation:l,dir:g,activationMode:f,children:T.jsx(Rt.div,{dir:g,"data-orientation":l,...d,ref:e})})});F3.displayName=sp;var j3="TabsList",L3=N.forwardRef((n,e)=>{const{__scopeTabs:t,loop:s=!0,...r}=n,o=Tb(j3,t),l=U3(t);return T.jsx(nP,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:s,children:T.jsx(Rt.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:e})})});L3.displayName=j3;var z3="TabsTrigger",V3=N.forwardRef((n,e)=>{const{__scopeTabs:t,value:s,disabled:r=!1,...o}=n,l=Tb(z3,t),c=U3(t),f=W3(l.baseId,s),d=X3(l.baseId,s),g=s===l.value;return T.jsx(sP,{asChild:!0,...c,focusable:!r,active:g,children:T.jsx(Rt.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":d,"data-state":g?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:f,...o,ref:e,onMouseDown:vt(n.onMouseDown,_=>{!r&&_.button===0&&_.ctrlKey===!1?l.onValueChange(s):_.preventDefault()}),onKeyDown:vt(n.onKeyDown,_=>{[" ","Enter"].includes(_.key)&&l.onValueChange(s)}),onFocus:vt(n.onFocus,()=>{const _=l.activationMode!=="manual";!g&&!r&&_&&l.onValueChange(s)})})})});V3.displayName=z3;var $3="TabsContent",H3=N.forwardRef((n,e)=>{const{__scopeTabs:t,value:s,forceMount:r,children:o,...l}=n,c=Tb($3,t),f=W3(c.baseId,s),d=X3(c.baseId,s),g=s===c.value,_=N.useRef(g);return N.useEffect(()=>{const x=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(x)},[]),T.jsx(fb,{present:r||g,children:({present:x})=>T.jsx(Rt.div,{"data-state":g?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!x,id:d,tabIndex:0,...l,ref:e,style:{...n.style,animationDuration:_.current?"0s":void 0},children:x&&o})})});H3.displayName=$3;function W3(n,e){return`${n}-trigger-${e}`}function X3(n,e){return`${n}-content-${e}`}var oP=F3,aP=L3,lP=V3,cP=H3;function Zu({className:n,...e}){return T.jsx(oP,{"data-slot":"tabs",className:zt("flex flex-col gap-2",n),...e})}function Qu({className:n,...e}){return T.jsx(aP,{"data-slot":"tabs-list",className:zt("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",n),...e})}function Us({className:n,...e}){return T.jsx(lP,{"data-slot":"tabs-trigger",className:zt("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-thin whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...e})}function Ys({className:n,...e}){return T.jsx(cP,{"data-slot":"tabs-content",className:zt("flex-1 outline-none",n),...e})}const Yn={success:(n,e)=>hu({variant:"success",title:n,description:e}),error:(n,e)=>hu({variant:"destructive",title:n,description:e}),info:(n,e)=>hu({variant:"info",title:n,description:e}),warning:(n,e,t)=>hu({variant:"warning",title:n,description:e,duration:t==null?void 0:t.duration})},uP=n=>{if(n===0)return"0 B";const e=1024,t=["B","KB","MB","GB"],s=Math.floor(Math.log(n)/Math.log(e));return parseFloat((n/Math.pow(e,s)).toFixed(1))+" "+t[s]},fP=()=>{const{data:n={}}=po({queryKey:["fileSizes"],queryFn:async()=>{const e=await fetch("http://localhost:3333/api/files");if(!e.ok)throw new Error("Failed to fetch files");const t=await e.json(),s={};return t.forEach(r=>{s[r.path]=r.size||0}),s},refetchInterval:3e4});return n};function yn({className:n,...e}){return T.jsx("div",{"data-slot":"card",className:zt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...e})}function hs({className:n,...e}){return T.jsx("div",{"data-slot":"card-header",className:zt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",n),...e})}function xs({className:n,...e}){return T.jsx("div",{"data-slot":"card-title",className:zt("leading-none font-thin",n),...e})}function Vn({className:n,...e}){return T.jsx("div",{"data-slot":"card-content",className:zt("px-6",n),...e})}const hP=({bundle:n,isSelected:e,onSelect:t})=>{const s=n.name.startsWith("smart:"),r=s?n.name.replace("smart:",""):n.name;return T.jsxs(yn,{className:`cursor-pointer transition-all border-vesper bg-vesper-card hover:border-vesper-accent ${e?"ring-1 ring-primary border-primary":""}`,onClick:()=>t(n.name),children:[T.jsx(hs,{className:"pb-2",children:T.jsxs("div",{className:"flex flex-col gap-2",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[s?T.jsx(bb,{className:"w-3 h-3 text-vesper-accent"}):T.jsx(RI,{className:"w-3 h-3 text-muted-foreground"}),T.jsx("h3",{className:"text-sm font-thin truncate color-vesper-fg",children:r})]}),T.jsx(kn,{variant:"outline",className:"text-[10px] font-thin uppercase tracking-tighter border-vesper color-vesper-muted px-1 h-4",children:s?"Smart":"Manual"})]}),T.jsxs("div",{className:"flex items-center gap-1.5",children:[T.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${n.changed?"bg-vesper-warning animate-pulse":"bg-vesper-success"}`}),T.jsx("span",{className:"text-[10px] font-thin uppercase tracking-widest color-vesper-muted",children:n.changed?"Syncing":"In Context"})]})]})}),T.jsx(Vn,{className:"pt-0",children:T.jsxs("div",{className:"flex flex-col gap-1 mt-1",children:[T.jsxs("div",{className:"flex items-center justify-between text-[11px] font-thin color-vesper-muted",children:[T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx(yb,{className:"w-3 h-3"}),T.jsxs("span",{children:[n.fileCount," units"]})]}),T.jsx("span",{children:uP(n.size)})]}),n.generated&&T.jsxs("div",{className:"flex items-center gap-1 text-[9px] font-thin color-vesper-muted mt-2 opacity-50",children:[T.jsx(WI,{className:"w-2.5 h-2.5"}),T.jsxs("span",{children:["Synced ",new Date(n.generated).toLocaleTimeString()]})]})]})})]})};function A1(n,[e,t]){return Math.min(t,Math.max(e,n))}var Vm=0;function dP(){N.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??R1()),document.body.insertAdjacentElement("beforeend",n[1]??R1()),Vm++,()=>{Vm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Vm--}},[])}function R1(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var $m="focusScope.autoFocusOnMount",Hm="focusScope.autoFocusOnUnmount",C1={bubbles:!1,cancelable:!0},pP="FocusScope",q3=N.forwardRef((n,e)=>{const{loop:t=!1,trapped:s=!1,onMountAutoFocus:r,onUnmountAutoFocus:o,...l}=n,[c,f]=N.useState(null),d=Gs(r),g=Gs(o),_=N.useRef(null),x=_n(e,A=>f(A)),E=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(s){let A=function(I){if(E.paused||!c)return;const V=I.target;c.contains(V)?_.current=V:qi(_.current,{select:!0})},R=function(I){if(E.paused||!c)return;const V=I.relatedTarget;V!==null&&(c.contains(V)||qi(_.current,{select:!0}))},k=function(I){if(document.activeElement===document.body)for(const H of I)H.removedNodes.length>0&&qi(c)};document.addEventListener("focusin",A),document.addEventListener("focusout",R);const U=new MutationObserver(k);return c&&U.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",A),document.removeEventListener("focusout",R),U.disconnect()}}},[s,c,E.paused]),N.useEffect(()=>{if(c){N1.add(E);const A=document.activeElement;if(!c.contains(A)){const k=new CustomEvent($m,C1);c.addEventListener($m,d),c.dispatchEvent(k),k.defaultPrevented||(gP(vP(Y3(c)),{select:!0}),document.activeElement===A&&qi(c))}return()=>{c.removeEventListener($m,d),setTimeout(()=>{const k=new CustomEvent(Hm,C1);c.addEventListener(Hm,g),c.dispatchEvent(k),k.defaultPrevented||qi(A??document.body,{select:!0}),c.removeEventListener(Hm,g),N1.remove(E)},0)}}},[c,d,g,E]);const M=N.useCallback(A=>{if(!t&&!s||E.paused)return;const R=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,k=document.activeElement;if(R&&k){const U=A.currentTarget,[I,V]=mP(U);I&&V?!A.shiftKey&&k===V?(A.preventDefault(),t&&qi(I,{select:!0})):A.shiftKey&&k===I&&(A.preventDefault(),t&&qi(V,{select:!0})):k===U&&A.preventDefault()}},[t,s,E.paused]);return T.jsx(Rt.div,{tabIndex:-1,...l,ref:x,onKeyDown:M})});q3.displayName=pP;function gP(n,{select:e=!1}={}){const t=document.activeElement;for(const s of n)if(qi(s,{select:e}),document.activeElement!==t)return}function mP(n){const e=Y3(n),t=M1(e,n),s=M1(e.reverse(),n);return[t,s]}function Y3(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function M1(n,e){for(const t of n)if(!yP(t,{upTo:e}))return t}function yP(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function _P(n){return n instanceof HTMLInputElement&&"select"in n}function qi(n,{select:e=!1}={}){if(n&&n.focus){const t=document.activeElement;n.focus({preventScroll:!0}),n!==t&&_P(n)&&e&&n.select()}}var N1=bP();function bP(){let n=[];return{add(e){const t=n[0];e!==t&&(t==null||t.pause()),n=O1(n,e),n.unshift(e)},remove(e){var t;n=O1(n,e),(t=n[0])==null||t.resume()}}}function O1(n,e){const t=[...n],s=t.indexOf(e);return s!==-1&&t.splice(s,1),t}function vP(n){return n.filter(e=>e.tagName!=="A")}const wP=["top","right","bottom","left"],go=Math.min,Ps=Math.max,od=Math.round,xh=Math.floor,Pr=n=>({x:n,y:n}),xP={left:"right",right:"left",bottom:"top",top:"bottom"},TP={start:"end",end:"start"};function t_(n,e,t){return Ps(n,go(e,t))}function ci(n,e){return typeof n=="function"?n(e):n}function ui(n){return n.split("-")[0]}function rc(n){return n.split("-")[1]}function Sb(n){return n==="x"?"y":"x"}function Eb(n){return n==="y"?"height":"width"}function Ir(n){return["top","bottom"].includes(ui(n))?"y":"x"}function Ab(n){return Sb(Ir(n))}function SP(n,e,t){t===void 0&&(t=!1);const s=rc(n),r=Ab(n),o=Eb(r);let l=r==="x"?s===(t?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(l=ad(l)),[l,ad(l)]}function EP(n){const e=ad(n);return[n_(n),e,n_(e)]}function n_(n){return n.replace(/start|end/g,e=>TP[e])}function AP(n,e,t){const s=["left","right"],r=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(n){case"top":case"bottom":return t?e?r:s:e?s:r;case"left":case"right":return e?o:l;default:return[]}}function RP(n,e,t,s){const r=rc(n);let o=AP(ui(n),t==="start",s);return r&&(o=o.map(l=>l+"-"+r),e&&(o=o.concat(o.map(n_)))),o}function ad(n){return n.replace(/left|right|bottom|top/g,e=>xP[e])}function CP(n){return{top:0,right:0,bottom:0,left:0,...n}}function K3(n){return typeof n!="number"?CP(n):{top:n,right:n,bottom:n,left:n}}function ld(n){const{x:e,y:t,width:s,height:r}=n;return{width:s,height:r,top:t,left:e,right:e+s,bottom:t+r,x:e,y:t}}function I1(n,e,t){let{reference:s,floating:r}=n;const o=Ir(e),l=Ab(e),c=Eb(l),f=ui(e),d=o==="y",g=s.x+s.width/2-r.width/2,_=s.y+s.height/2-r.height/2,x=s[c]/2-r[c]/2;let E;switch(f){case"top":E={x:g,y:s.y-r.height};break;case"bottom":E={x:g,y:s.y+s.height};break;case"right":E={x:s.x+s.width,y:_};break;case"left":E={x:s.x-r.width,y:_};break;default:E={x:s.x,y:s.y}}switch(rc(e)){case"start":E[l]-=x*(t&&d?-1:1);break;case"end":E[l]+=x*(t&&d?-1:1);break}return E}const MP=async(n,e,t)=>{const{placement:s="bottom",strategy:r="absolute",middleware:o=[],platform:l}=t,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(e));let d=await l.getElementRects({reference:n,floating:e,strategy:r}),{x:g,y:_}=I1(d,s,f),x=s,E={},M=0;for(let A=0;A<c.length;A++){const{name:R,fn:k}=c[A],{x:U,y:I,data:V,reset:H}=await k({x:g,y:_,initialPlacement:s,placement:x,strategy:r,middlewareData:E,rects:d,platform:l,elements:{reference:n,floating:e}});g=U??g,_=I??_,E={...E,[R]:{...E[R],...V}},H&&M<=50&&(M++,typeof H=="object"&&(H.placement&&(x=H.placement),H.rects&&(d=H.rects===!0?await l.getElementRects({reference:n,floating:e,strategy:r}):H.rects),{x:g,y:_}=I1(d,x,f)),A=-1)}return{x:g,y:_,placement:x,strategy:r,middlewareData:E}};async function Pu(n,e){var t;e===void 0&&(e={});const{x:s,y:r,platform:o,rects:l,elements:c,strategy:f}=n,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:_="floating",altBoundary:x=!1,padding:E=0}=ci(e,n),M=K3(E),R=c[x?_==="floating"?"reference":"floating":_],k=ld(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(R)))==null||t?R:R.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:g,strategy:f})),U=_==="floating"?{x:s,y:r,width:l.floating.width,height:l.floating.height}:l.reference,I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),V=await(o.isElement==null?void 0:o.isElement(I))?await(o.getScale==null?void 0:o.getScale(I))||{x:1,y:1}:{x:1,y:1},H=ld(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:U,offsetParent:I,strategy:f}):U);return{top:(k.top-H.top+M.top)/V.y,bottom:(H.bottom-k.bottom+M.bottom)/V.y,left:(k.left-H.left+M.left)/V.x,right:(H.right-k.right+M.right)/V.x}}const NP=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:s,placement:r,rects:o,platform:l,elements:c,middlewareData:f}=e,{element:d,padding:g=0}=ci(n,e)||{};if(d==null)return{};const _=K3(g),x={x:t,y:s},E=Ab(r),M=Eb(E),A=await l.getDimensions(d),R=E==="y",k=R?"top":"left",U=R?"bottom":"right",I=R?"clientHeight":"clientWidth",V=o.reference[M]+o.reference[E]-x[E]-o.floating[M],H=x[E]-o.reference[E],W=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let ee=W?W[I]:0;(!ee||!await(l.isElement==null?void 0:l.isElement(W)))&&(ee=c.floating[I]||o.floating[M]);const Q=V/2-H/2,ge=ee/2-A[M]/2-1,Ne=go(_[k],ge),ne=go(_[U],ge),ve=Ne,De=ee-A[M]-ne,be=ee/2-A[M]/2+Q,je=t_(ve,be,De),G=!f.arrow&&rc(r)!=null&&be!==je&&o.reference[M]/2-(be<ve?Ne:ne)-A[M]/2<0,Ae=G?be<ve?be-ve:be-De:0;return{[E]:x[E]+Ae,data:{[E]:je,centerOffset:be-je-Ae,...G&&{alignmentOffset:Ae}},reset:G}}}),OP=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,s;const{placement:r,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:d}=e,{mainAxis:g=!0,crossAxis:_=!0,fallbackPlacements:x,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:A=!0,...R}=ci(n,e);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const k=ui(r),U=Ir(c),I=ui(c)===c,V=await(f.isRTL==null?void 0:f.isRTL(d.floating)),H=x||(I||!A?[ad(c)]:EP(c)),W=M!=="none";!x&&W&&H.push(...RP(c,A,M,V));const ee=[c,...H],Q=await Pu(e,R),ge=[];let Ne=((s=o.flip)==null?void 0:s.overflows)||[];if(g&&ge.push(Q[k]),_){const be=SP(r,l,V);ge.push(Q[be[0]],Q[be[1]])}if(Ne=[...Ne,{placement:r,overflows:ge}],!ge.every(be=>be<=0)){var ne,ve;const be=(((ne=o.flip)==null?void 0:ne.index)||0)+1,je=ee[be];if(je&&(!(_==="alignment"?U!==Ir(je):!1)||Ne.every(pe=>pe.overflows[0]>0&&Ir(pe.placement)===U)))return{data:{index:be,overflows:Ne},reset:{placement:je}};let G=(ve=Ne.filter(Ae=>Ae.overflows[0]<=0).sort((Ae,pe)=>Ae.overflows[1]-pe.overflows[1])[0])==null?void 0:ve.placement;if(!G)switch(E){case"bestFit":{var De;const Ae=(De=Ne.filter(pe=>{if(W){const qe=Ir(pe.placement);return qe===U||qe==="y"}return!0}).map(pe=>[pe.placement,pe.overflows.filter(qe=>qe>0).reduce((qe,K)=>qe+K,0)]).sort((pe,qe)=>pe[1]-qe[1])[0])==null?void 0:De[0];Ae&&(G=Ae);break}case"initialPlacement":G=c;break}if(r!==G)return{reset:{placement:G}}}return{}}}};function k1(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function P1(n){return wP.some(e=>n[e]>=0)}const IP=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:s="referenceHidden",...r}=ci(n,e);switch(s){case"referenceHidden":{const o=await Pu(e,{...r,elementContext:"reference"}),l=k1(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:P1(l)}}}case"escaped":{const o=await Pu(e,{...r,altBoundary:!0}),l=k1(o,t.floating);return{data:{escapedOffsets:l,escaped:P1(l)}}}default:return{}}}}};async function kP(n,e){const{placement:t,platform:s,elements:r}=n,o=await(s.isRTL==null?void 0:s.isRTL(r.floating)),l=ui(t),c=rc(t),f=Ir(t)==="y",d=["left","top"].includes(l)?-1:1,g=o&&f?-1:1,_=ci(e,n);let{mainAxis:x,crossAxis:E,alignmentAxis:M}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return c&&typeof M=="number"&&(E=c==="end"?M*-1:M),f?{x:E*g,y:x*d}:{x:x*d,y:E*g}}const PP=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,s;const{x:r,y:o,placement:l,middlewareData:c}=e,f=await kP(e,n);return l===((t=c.offset)==null?void 0:t.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:r+f.x,y:o+f.y,data:{...f,placement:l}}}}},DP=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:s,placement:r}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:R=>{let{x:k,y:U}=R;return{x:k,y:U}}},...f}=ci(n,e),d={x:t,y:s},g=await Pu(e,f),_=Ir(ui(r)),x=Sb(_);let E=d[x],M=d[_];if(o){const R=x==="y"?"top":"left",k=x==="y"?"bottom":"right",U=E+g[R],I=E-g[k];E=t_(U,E,I)}if(l){const R=_==="y"?"top":"left",k=_==="y"?"bottom":"right",U=M+g[R],I=M-g[k];M=t_(U,M,I)}const A=c.fn({...e,[x]:E,[_]:M});return{...A,data:{x:A.x-t,y:A.y-s,enabled:{[x]:o,[_]:l}}}}}},BP=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:s,placement:r,rects:o,middlewareData:l}=e,{offset:c=0,mainAxis:f=!0,crossAxis:d=!0}=ci(n,e),g={x:t,y:s},_=Ir(r),x=Sb(_);let E=g[x],M=g[_];const A=ci(c,e),R=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:0,crossAxis:0,...A};if(f){const I=x==="y"?"height":"width",V=o.reference[x]-o.floating[I]+R.mainAxis,H=o.reference[x]+o.reference[I]-R.mainAxis;E<V?E=V:E>H&&(E=H)}if(d){var k,U;const I=x==="y"?"width":"height",V=["top","left"].includes(ui(r)),H=o.reference[_]-o.floating[I]+(V&&((k=l.offset)==null?void 0:k[_])||0)+(V?0:R.crossAxis),W=o.reference[_]+o.reference[I]+(V?0:((U=l.offset)==null?void 0:U[_])||0)-(V?R.crossAxis:0);M<H?M=H:M>W&&(M=W)}return{[x]:E,[_]:M}}}},UP=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,s;const{placement:r,rects:o,platform:l,elements:c}=e,{apply:f=()=>{},...d}=ci(n,e),g=await Pu(e,d),_=ui(r),x=rc(r),E=Ir(r)==="y",{width:M,height:A}=o.floating;let R,k;_==="top"||_==="bottom"?(R=_,k=x===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(k=_,R=x==="end"?"top":"bottom");const U=A-g.top-g.bottom,I=M-g.left-g.right,V=go(A-g[R],U),H=go(M-g[k],I),W=!e.middlewareData.shift;let ee=V,Q=H;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(Q=I),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(ee=U),W&&!x){const Ne=Ps(g.left,0),ne=Ps(g.right,0),ve=Ps(g.top,0),De=Ps(g.bottom,0);E?Q=M-2*(Ne!==0||ne!==0?Ne+ne:Ps(g.left,g.right)):ee=A-2*(ve!==0||De!==0?ve+De:Ps(g.top,g.bottom))}await f({...e,availableWidth:Q,availableHeight:ee});const ge=await l.getDimensions(c.floating);return M!==ge.width||A!==ge.height?{reset:{rects:!0}}:{}}}};function rp(){return typeof window<"u"}function ic(n){return Z3(n)?(n.nodeName||"").toLowerCase():"#document"}function Fs(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Fr(n){var e;return(e=(Z3(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Z3(n){return rp()?n instanceof Node||n instanceof Fs(n).Node:!1}function gr(n){return rp()?n instanceof Element||n instanceof Fs(n).Element:!1}function Dr(n){return rp()?n instanceof HTMLElement||n instanceof Fs(n).HTMLElement:!1}function D1(n){return!rp()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Fs(n).ShadowRoot}function Gu(n){const{overflow:e,overflowX:t,overflowY:s,display:r}=mr(n);return/auto|scroll|overlay|hidden|clip/.test(e+s+t)&&!["inline","contents"].includes(r)}function FP(n){return["table","td","th"].includes(ic(n))}function ip(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function Rb(n){const e=Cb(),t=gr(n)?mr(n):n;return["transform","translate","scale","rotate","perspective"].some(s=>t[s]?t[s]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(t.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(t.contain||"").includes(s))}function jP(n){let e=mo(n);for(;Dr(e)&&!Vl(e);){if(Rb(e))return e;if(ip(e))return null;e=mo(e)}return null}function Cb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vl(n){return["html","body","#document"].includes(ic(n))}function mr(n){return Fs(n).getComputedStyle(n)}function op(n){return gr(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function mo(n){if(ic(n)==="html")return n;const e=n.assignedSlot||n.parentNode||D1(n)&&n.host||Fr(n);return D1(e)?e.host:e}function Q3(n){const e=mo(n);return Vl(e)?n.ownerDocument?n.ownerDocument.body:n.body:Dr(e)&&Gu(e)?e:Q3(e)}function Du(n,e,t){var s;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=Q3(n),o=r===((s=n.ownerDocument)==null?void 0:s.body),l=Fs(r);if(o){const c=s_(l);return e.concat(l,l.visualViewport||[],Gu(r)?r:[],c&&t?Du(c):[])}return e.concat(r,Du(r,[],t))}function s_(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function G3(n){const e=mr(n);let t=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const r=Dr(n),o=r?n.offsetWidth:t,l=r?n.offsetHeight:s,c=od(t)!==o||od(s)!==l;return c&&(t=o,s=l),{width:t,height:s,$:c}}function Mb(n){return gr(n)?n:n.contextElement}function Sl(n){const e=Mb(n);if(!Dr(e))return Pr(1);const t=e.getBoundingClientRect(),{width:s,height:r,$:o}=G3(e);let l=(o?od(t.width):t.width)/s,c=(o?od(t.height):t.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const LP=Pr(0);function J3(n){const e=Fs(n);return!Cb()||!e.visualViewport?LP:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zP(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Fs(n)?!1:e}function la(n,e,t,s){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),o=Mb(n);let l=Pr(1);e&&(s?gr(s)&&(l=Sl(s)):l=Sl(n));const c=zP(o,t,s)?J3(o):Pr(0);let f=(r.left+c.x)/l.x,d=(r.top+c.y)/l.y,g=r.width/l.x,_=r.height/l.y;if(o){const x=Fs(o),E=s&&gr(s)?Fs(s):s;let M=x,A=s_(M);for(;A&&s&&E!==M;){const R=Sl(A),k=A.getBoundingClientRect(),U=mr(A),I=k.left+(A.clientLeft+parseFloat(U.paddingLeft))*R.x,V=k.top+(A.clientTop+parseFloat(U.paddingTop))*R.y;f*=R.x,d*=R.y,g*=R.x,_*=R.y,f+=I,d+=V,M=Fs(A),A=s_(M)}}return ld({width:g,height:_,x:f,y:d})}function Nb(n,e){const t=op(n).scrollLeft;return e?e.left+t:la(Fr(n)).left+t}function eE(n,e,t){t===void 0&&(t=!1);const s=n.getBoundingClientRect(),r=s.left+e.scrollLeft-(t?0:Nb(n,s)),o=s.top+e.scrollTop;return{x:r,y:o}}function VP(n){let{elements:e,rect:t,offsetParent:s,strategy:r}=n;const o=r==="fixed",l=Fr(s),c=e?ip(e.floating):!1;if(s===l||c&&o)return t;let f={scrollLeft:0,scrollTop:0},d=Pr(1);const g=Pr(0),_=Dr(s);if((_||!_&&!o)&&((ic(s)!=="body"||Gu(l))&&(f=op(s)),Dr(s))){const E=la(s);d=Sl(s),g.x=E.x+s.clientLeft,g.y=E.y+s.clientTop}const x=l&&!_&&!o?eE(l,f,!0):Pr(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-f.scrollLeft*d.x+g.x+x.x,y:t.y*d.y-f.scrollTop*d.y+g.y+x.y}}function $P(n){return Array.from(n.getClientRects())}function HP(n){const e=Fr(n),t=op(n),s=n.ownerDocument.body,r=Ps(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=Ps(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let l=-t.scrollLeft+Nb(n);const c=-t.scrollTop;return mr(s).direction==="rtl"&&(l+=Ps(e.clientWidth,s.clientWidth)-r),{width:r,height:o,x:l,y:c}}function WP(n,e){const t=Fs(n),s=Fr(n),r=t.visualViewport;let o=s.clientWidth,l=s.clientHeight,c=0,f=0;if(r){o=r.width,l=r.height;const d=Cb();(!d||d&&e==="fixed")&&(c=r.offsetLeft,f=r.offsetTop)}return{width:o,height:l,x:c,y:f}}function XP(n,e){const t=la(n,!0,e==="fixed"),s=t.top+n.clientTop,r=t.left+n.clientLeft,o=Dr(n)?Sl(n):Pr(1),l=n.clientWidth*o.x,c=n.clientHeight*o.y,f=r*o.x,d=s*o.y;return{width:l,height:c,x:f,y:d}}function B1(n,e,t){let s;if(e==="viewport")s=WP(n,t);else if(e==="document")s=HP(Fr(n));else if(gr(e))s=XP(e,t);else{const r=J3(n);s={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ld(s)}function tE(n,e){const t=mo(n);return t===e||!gr(t)||Vl(t)?!1:mr(t).position==="fixed"||tE(t,e)}function qP(n,e){const t=e.get(n);if(t)return t;let s=Du(n,[],!1).filter(c=>gr(c)&&ic(c)!=="body"),r=null;const o=mr(n).position==="fixed";let l=o?mo(n):n;for(;gr(l)&&!Vl(l);){const c=mr(l),f=Rb(l);!f&&c.position==="fixed"&&(r=null),(o?!f&&!r:!f&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Gu(l)&&!f&&tE(n,l))?s=s.filter(g=>g!==l):r=c,l=mo(l)}return e.set(n,s),s}function YP(n){let{element:e,boundary:t,rootBoundary:s,strategy:r}=n;const l=[...t==="clippingAncestors"?ip(e)?[]:qP(e,this._c):[].concat(t),s],c=l[0],f=l.reduce((d,g)=>{const _=B1(e,g,r);return d.top=Ps(_.top,d.top),d.right=go(_.right,d.right),d.bottom=go(_.bottom,d.bottom),d.left=Ps(_.left,d.left),d},B1(e,c,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function KP(n){const{width:e,height:t}=G3(n);return{width:e,height:t}}function ZP(n,e,t){const s=Dr(e),r=Fr(e),o=t==="fixed",l=la(n,!0,o,e);let c={scrollLeft:0,scrollTop:0};const f=Pr(0);function d(){f.x=Nb(r)}if(s||!s&&!o)if((ic(e)!=="body"||Gu(r))&&(c=op(e)),s){const E=la(e,!0,o,e);f.x=E.x+e.clientLeft,f.y=E.y+e.clientTop}else r&&d();o&&!s&&r&&d();const g=r&&!s&&!o?eE(r,c):Pr(0),_=l.left+c.scrollLeft-f.x-g.x,x=l.top+c.scrollTop-f.y-g.y;return{x:_,y:x,width:l.width,height:l.height}}function Wm(n){return mr(n).position==="static"}function U1(n,e){if(!Dr(n)||mr(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return Fr(n)===t&&(t=t.ownerDocument.body),t}function nE(n,e){const t=Fs(n);if(ip(n))return t;if(!Dr(n)){let r=mo(n);for(;r&&!Vl(r);){if(gr(r)&&!Wm(r))return r;r=mo(r)}return t}let s=U1(n,e);for(;s&&FP(s)&&Wm(s);)s=U1(s,e);return s&&Vl(s)&&Wm(s)&&!Rb(s)?t:s||jP(n)||t}const QP=async function(n){const e=this.getOffsetParent||nE,t=this.getDimensions,s=await t(n.floating);return{reference:ZP(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function GP(n){return mr(n).direction==="rtl"}const JP={convertOffsetParentRelativeRectToViewportRelativeRect:VP,getDocumentElement:Fr,getClippingRect:YP,getOffsetParent:nE,getElementRects:QP,getClientRects:$P,getDimensions:KP,getScale:Sl,isElement:gr,isRTL:GP};function sE(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function eD(n,e){let t=null,s;const r=Fr(n);function o(){var c;clearTimeout(s),(c=t)==null||c.disconnect(),t=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const d=n.getBoundingClientRect(),{left:g,top:_,width:x,height:E}=d;if(c||e(),!x||!E)return;const M=xh(_),A=xh(r.clientWidth-(g+x)),R=xh(r.clientHeight-(_+E)),k=xh(g),I={rootMargin:-M+"px "+-A+"px "+-R+"px "+-k+"px",threshold:Ps(0,go(1,f))||1};let V=!0;function H(W){const ee=W[0].intersectionRatio;if(ee!==f){if(!V)return l();ee?l(!1,ee):s=setTimeout(()=>{l(!1,1e-7)},1e3)}ee===1&&!sE(d,n.getBoundingClientRect())&&l(),V=!1}try{t=new IntersectionObserver(H,{...I,root:r.ownerDocument})}catch{t=new IntersectionObserver(H,I)}t.observe(n)}return l(!0),o}function tD(n,e,t,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,d=Mb(n),g=r||o?[...d?Du(d):[],...Du(e)]:[];g.forEach(k=>{r&&k.addEventListener("scroll",t,{passive:!0}),o&&k.addEventListener("resize",t)});const _=d&&c?eD(d,t):null;let x=-1,E=null;l&&(E=new ResizeObserver(k=>{let[U]=k;U&&U.target===d&&E&&(E.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var I;(I=E)==null||I.observe(e)})),t()}),d&&!f&&E.observe(d),E.observe(e));let M,A=f?la(n):null;f&&R();function R(){const k=la(n);A&&!sE(A,k)&&t(),A=k,M=requestAnimationFrame(R)}return t(),()=>{var k;g.forEach(U=>{r&&U.removeEventListener("scroll",t),o&&U.removeEventListener("resize",t)}),_==null||_(),(k=E)==null||k.disconnect(),E=null,f&&cancelAnimationFrame(M)}}const nD=PP,sD=DP,rD=OP,iD=UP,oD=IP,F1=NP,aD=BP,lD=(n,e,t)=>{const s=new Map,r={platform:JP,...t},o={...r.platform,_c:s};return MP(n,e,{...r,platform:o})};var cD=typeof document<"u",uD=function(){},Xh=cD?N.useLayoutEffect:uD;function cd(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,s,r;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(s=t;s--!==0;)if(!cd(n[s],e[s]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(e).length)return!1;for(s=t;s--!==0;)if(!{}.hasOwnProperty.call(e,r[s]))return!1;for(s=t;s--!==0;){const o=r[s];if(!(o==="_owner"&&n.$$typeof)&&!cd(n[o],e[o]))return!1}return!0}return n!==n&&e!==e}function rE(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function j1(n,e){const t=rE(n);return Math.round(e*t)/t}function Xm(n){const e=N.useRef(n);return Xh(()=>{e.current=n}),e}function fD(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:s=[],platform:r,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=n,[g,_]=N.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[x,E]=N.useState(s);cd(x,s)||E(s);const[M,A]=N.useState(null),[R,k]=N.useState(null),U=N.useCallback(pe=>{pe!==W.current&&(W.current=pe,A(pe))},[]),I=N.useCallback(pe=>{pe!==ee.current&&(ee.current=pe,k(pe))},[]),V=o||M,H=l||R,W=N.useRef(null),ee=N.useRef(null),Q=N.useRef(g),ge=f!=null,Ne=Xm(f),ne=Xm(r),ve=Xm(d),De=N.useCallback(()=>{if(!W.current||!ee.current)return;const pe={placement:e,strategy:t,middleware:x};ne.current&&(pe.platform=ne.current),lD(W.current,ee.current,pe).then(qe=>{const K={...qe,isPositioned:ve.current!==!1};be.current&&!cd(Q.current,K)&&(Q.current=K,ec.flushSync(()=>{_(K)}))})},[x,e,t,ne,ve]);Xh(()=>{d===!1&&Q.current.isPositioned&&(Q.current.isPositioned=!1,_(pe=>({...pe,isPositioned:!1})))},[d]);const be=N.useRef(!1);Xh(()=>(be.current=!0,()=>{be.current=!1}),[]),Xh(()=>{if(V&&(W.current=V),H&&(ee.current=H),V&&H){if(Ne.current)return Ne.current(V,H,De);De()}},[V,H,De,Ne,ge]);const je=N.useMemo(()=>({reference:W,floating:ee,setReference:U,setFloating:I}),[U,I]),G=N.useMemo(()=>({reference:V,floating:H}),[V,H]),Ae=N.useMemo(()=>{const pe={position:t,left:0,top:0};if(!G.floating)return pe;const qe=j1(G.floating,g.x),K=j1(G.floating,g.y);return c?{...pe,transform:"translate("+qe+"px, "+K+"px)",...rE(G.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:qe,top:K}},[t,c,G.floating,g.x,g.y]);return N.useMemo(()=>({...g,update:De,refs:je,elements:G,floatingStyles:Ae}),[g,De,je,G,Ae])}const hD=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:s,padding:r}=typeof n=="function"?n(t):n;return s&&e(s)?s.current!=null?F1({element:s.current,padding:r}).fn(t):{}:s?F1({element:s,padding:r}).fn(t):{}}}},dD=(n,e)=>({...nD(n),options:[n,e]}),pD=(n,e)=>({...sD(n),options:[n,e]}),gD=(n,e)=>({...aD(n),options:[n,e]}),mD=(n,e)=>({...rD(n),options:[n,e]}),yD=(n,e)=>({...iD(n),options:[n,e]}),_D=(n,e)=>({...oD(n),options:[n,e]}),bD=(n,e)=>({...hD(n),options:[n,e]});var vD="Arrow",iE=N.forwardRef((n,e)=>{const{children:t,width:s=10,height:r=5,...o}=n;return T.jsx(Rt.svg,{...o,ref:e,width:s,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});iE.displayName=vD;var wD=iE;function xD(n){const[e,t]=N.useState(void 0);return Kn(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const o=r[0];let l,c;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,c=d.blockSize}else l=n.offsetWidth,c=n.offsetHeight;t({width:l,height:c})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else t(void 0)},[n]),e}var Ob="Popper",[oE,aE]=tc(Ob),[TD,lE]=oE(Ob),cE=n=>{const{__scopePopper:e,children:t}=n,[s,r]=N.useState(null);return T.jsx(TD,{scope:e,anchor:s,onAnchorChange:r,children:t})};cE.displayName=Ob;var uE="PopperAnchor",fE=N.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:s,...r}=n,o=lE(uE,t),l=N.useRef(null),c=_n(e,l);return N.useEffect(()=>{o.onAnchorChange((s==null?void 0:s.current)||l.current)}),s?null:T.jsx(Rt.div,{...r,ref:c})});fE.displayName=uE;var Ib="PopperContent",[SD,ED]=oE(Ib),hE=N.forwardRef((n,e)=>{var xe,Ue,et,Ge,ot,at;const{__scopePopper:t,side:s="bottom",sideOffset:r=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:_="partial",hideWhenDetached:x=!1,updatePositionStrategy:E="optimized",onPlaced:M,...A}=n,R=lE(Ib,t),[k,U]=N.useState(null),I=_n(e,dt=>U(dt)),[V,H]=N.useState(null),W=xD(V),ee=(W==null?void 0:W.width)??0,Q=(W==null?void 0:W.height)??0,ge=s+(o!=="center"?"-"+o:""),Ne=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},ne=Array.isArray(d)?d:[d],ve=ne.length>0,De={padding:Ne,boundary:ne.filter(RD),altBoundary:ve},{refs:be,floatingStyles:je,placement:G,isPositioned:Ae,middlewareData:pe}=fD({strategy:"fixed",placement:ge,whileElementsMounted:(...dt)=>tD(...dt,{animationFrame:E==="always"}),elements:{reference:R.anchor},middleware:[dD({mainAxis:r+Q,alignmentAxis:l}),f&&pD({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?gD():void 0,...De}),f&&mD({...De}),yD({...De,apply:({elements:dt,rects:Vt,availableWidth:Dn,availableHeight:ds})=>{const{width:an,height:pn}=Vt.reference,tn=dt.floating.style;tn.setProperty("--radix-popper-available-width",`${Dn}px`),tn.setProperty("--radix-popper-available-height",`${ds}px`),tn.setProperty("--radix-popper-anchor-width",`${an}px`),tn.setProperty("--radix-popper-anchor-height",`${pn}px`)}}),V&&bD({element:V,padding:c}),CD({arrowWidth:ee,arrowHeight:Q}),x&&_D({strategy:"referenceHidden",...De})]}),[qe,K]=gE(G),Te=Gs(M);Kn(()=>{Ae&&(Te==null||Te())},[Ae,Te]);const Se=(xe=pe.arrow)==null?void 0:xe.x,he=(Ue=pe.arrow)==null?void 0:Ue.y,Ce=((et=pe.arrow)==null?void 0:et.centerOffset)!==0,[fe,Pe]=N.useState();return Kn(()=>{k&&Pe(window.getComputedStyle(k).zIndex)},[k]),T.jsx("div",{ref:be.setFloating,"data-radix-popper-content-wrapper":"",style:{...je,transform:Ae?je.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(Ge=pe.transformOrigin)==null?void 0:Ge.x,(ot=pe.transformOrigin)==null?void 0:ot.y].join(" "),...((at=pe.hide)==null?void 0:at.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:T.jsx(SD,{scope:t,placedSide:qe,onArrowChange:H,arrowX:Se,arrowY:he,shouldHideArrow:Ce,children:T.jsx(Rt.div,{"data-side":qe,"data-align":K,...A,ref:I,style:{...A.style,animation:Ae?void 0:"none"}})})})});hE.displayName=Ib;var dE="PopperArrow",AD={top:"bottom",right:"left",bottom:"top",left:"right"},pE=N.forwardRef(function(e,t){const{__scopePopper:s,...r}=e,o=ED(dE,s),l=AD[o.placedSide];return T.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:T.jsx(wD,{...r,ref:t,style:{...r.style,display:"block"}})})});pE.displayName=dE;function RD(n){return n!==null}var CD=n=>({name:"transformOrigin",options:n,fn(e){var R,k,U;const{placement:t,rects:s,middlewareData:r}=e,l=((R=r.arrow)==null?void 0:R.centerOffset)!==0,c=l?0:n.arrowWidth,f=l?0:n.arrowHeight,[d,g]=gE(t),_={start:"0%",center:"50%",end:"100%"}[g],x=(((k=r.arrow)==null?void 0:k.x)??0)+c/2,E=(((U=r.arrow)==null?void 0:U.y)??0)+f/2;let M="",A="";return d==="bottom"?(M=l?_:`${x}px`,A=`${-f}px`):d==="top"?(M=l?_:`${x}px`,A=`${s.floating.height+f}px`):d==="right"?(M=`${-f}px`,A=l?_:`${E}px`):d==="left"&&(M=`${s.floating.width+f}px`,A=l?_:`${E}px`),{data:{x:M,y:A}}}});function gE(n){const[e,t="center"]=n.split("-");return[e,t]}var MD=cE,ND=fE,OD=hE,ID=pE;function kD(n){const e=N.useRef({value:n,previous:n});return N.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var PD=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},tl=new WeakMap,Th=new WeakMap,Sh={},qm=0,mE=function(n){return n&&(n.host||mE(n.parentNode))},DD=function(n,e){return e.map(function(t){if(n.contains(t))return t;var s=mE(t);return s&&n.contains(s)?s:(console.error("aria-hidden",t,"in not contained inside",n,". Doing nothing"),null)}).filter(function(t){return!!t})},BD=function(n,e,t,s){var r=DD(e,Array.isArray(n)?n:[n]);Sh[t]||(Sh[t]=new WeakMap);var o=Sh[t],l=[],c=new Set,f=new Set(r),d=function(_){!_||c.has(_)||(c.add(_),d(_.parentNode))};r.forEach(d);var g=function(_){!_||f.has(_)||Array.prototype.forEach.call(_.children,function(x){if(c.has(x))g(x);else try{var E=x.getAttribute(s),M=E!==null&&E!=="false",A=(tl.get(x)||0)+1,R=(o.get(x)||0)+1;tl.set(x,A),o.set(x,R),l.push(x),A===1&&M&&Th.set(x,!0),R===1&&x.setAttribute(t,"true"),M||x.setAttribute(s,"true")}catch(k){console.error("aria-hidden: cannot operate on ",x,k)}})};return g(e),c.clear(),qm++,function(){l.forEach(function(_){var x=tl.get(_)-1,E=o.get(_)-1;tl.set(_,x),o.set(_,E),x||(Th.has(_)||_.removeAttribute(s),Th.delete(_)),E||_.removeAttribute(t)}),qm--,qm||(tl=new WeakMap,tl=new WeakMap,Th=new WeakMap,Sh={})}},UD=function(n,e,t){t===void 0&&(t="data-aria-hidden");var s=Array.from(Array.isArray(n)?n:[n]),r=PD(n);return r?(s.push.apply(s,Array.from(r.querySelectorAll("[aria-live], script"))),BD(s,r,t,"aria-hidden")):function(){return null}},Nr=function(){return Nr=Object.assign||function(e){for(var t,s=1,r=arguments.length;s<r;s++){t=arguments[s];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Nr.apply(this,arguments)};function yE(n,e){var t={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(t[s[r]]=n[s[r]]);return t}function FD(n,e,t){if(t||arguments.length===2)for(var s=0,r=e.length,o;s<r;s++)(o||!(s in e))&&(o||(o=Array.prototype.slice.call(e,0,s)),o[s]=e[s]);return n.concat(o||Array.prototype.slice.call(e))}var qh="right-scroll-bar-position",Yh="width-before-scroll-bar",jD="with-scroll-bars-hidden",LD="--removed-body-scroll-bar-size";function Ym(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}function zD(n,e){var t=N.useState(function(){return{value:n,callback:e,facade:{get current(){return t.value},set current(s){var r=t.value;r!==s&&(t.value=s,t.callback(s,r))}}}})[0];return t.callback=e,t.facade}var VD=typeof window<"u"?N.useLayoutEffect:N.useEffect,L1=new WeakMap;function $D(n,e){var t=zD(null,function(s){return n.forEach(function(r){return Ym(r,s)})});return VD(function(){var s=L1.get(t);if(s){var r=new Set(s),o=new Set(n),l=t.current;r.forEach(function(c){o.has(c)||Ym(c,null)}),o.forEach(function(c){r.has(c)||Ym(c,l)})}L1.set(t,n)},[n]),t}function HD(n){return n}function WD(n,e){e===void 0&&(e=HD);var t=[],s=!1,r={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:n},useMedium:function(o){var l=e(o,s);return t.push(l),function(){t=t.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(s=!0;t.length;){var l=t;t=[],l.forEach(o)}t={push:function(c){return o(c)},filter:function(){return t}}},assignMedium:function(o){s=!0;var l=[];if(t.length){var c=t;t=[],c.forEach(o),l=t}var f=function(){var g=l;l=[],g.forEach(o)},d=function(){return Promise.resolve().then(f)};d(),t={push:function(g){l.push(g),d()},filter:function(g){return l=l.filter(g),t}}}};return r}function XD(n){n===void 0&&(n={});var e=WD(null);return e.options=Nr({async:!0,ssr:!1},n),e}var _E=function(n){var e=n.sideCar,t=yE(n,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=e.read();if(!s)throw new Error("Sidecar medium not found");return N.createElement(s,Nr({},t))};_E.isSideCarExport=!0;function qD(n,e){return n.useMedium(e),_E}var bE=XD(),Km=function(){},ap=N.forwardRef(function(n,e){var t=N.useRef(null),s=N.useState({onScrollCapture:Km,onWheelCapture:Km,onTouchMoveCapture:Km}),r=s[0],o=s[1],l=n.forwardProps,c=n.children,f=n.className,d=n.removeScrollBar,g=n.enabled,_=n.shards,x=n.sideCar,E=n.noRelative,M=n.noIsolation,A=n.inert,R=n.allowPinchZoom,k=n.as,U=k===void 0?"div":k,I=n.gapMode,V=yE(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),H=x,W=$D([t,e]),ee=Nr(Nr({},V),r);return N.createElement(N.Fragment,null,g&&N.createElement(H,{sideCar:bE,removeScrollBar:d,shards:_,noRelative:E,noIsolation:M,inert:A,setCallbacks:o,allowPinchZoom:!!R,lockRef:t,gapMode:I}),l?N.cloneElement(N.Children.only(c),Nr(Nr({},ee),{ref:W})):N.createElement(U,Nr({},ee,{className:f,ref:W}),c))});ap.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ap.classNames={fullWidth:Yh,zeroRight:qh};var YD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KD(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var e=YD();return e&&n.setAttribute("nonce",e),n}function ZD(n,e){n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}function QD(n){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(n)}var GD=function(){var n=0,e=null;return{add:function(t){n==0&&(e=KD())&&(ZD(e,t),QD(e)),n++},remove:function(){n--,!n&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},JD=function(){var n=GD();return function(e,t){N.useEffect(function(){return n.add(e),function(){n.remove()}},[e&&t])}},vE=function(){var n=JD(),e=function(t){var s=t.styles,r=t.dynamic;return n(s,r),null};return e},e6={left:0,top:0,right:0,gap:0},Zm=function(n){return parseInt(n||"",10)||0},t6=function(n){var e=window.getComputedStyle(document.body),t=e[n==="padding"?"paddingLeft":"marginLeft"],s=e[n==="padding"?"paddingTop":"marginTop"],r=e[n==="padding"?"paddingRight":"marginRight"];return[Zm(t),Zm(s),Zm(r)]},n6=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return e6;var e=t6(n),t=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-t+e[2]-e[0])}},s6=vE(),El="data-scroll-locked",r6=function(n,e,t,s){var r=n.left,o=n.top,l=n.right,c=n.gap;return t===void 0&&(t="margin"),`
294
+ */const Lk=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],bb=ft("zap",Lk),vb="-",zk=n=>{const e=$k(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:l=>{const c=l.split(vb);return c[0]===""&&c.length!==1&&c.shift(),p3(c,e)||Vk(l)},getConflictingClassGroupIds:(l,c)=>{const f=t[l]||[];return c&&s[l]?[...f,...s[l]]:f}}},p3=(n,e)=>{var l;if(n.length===0)return e.classGroupId;const t=n[0],s=e.nextPart.get(t),r=s?p3(n.slice(1),s):void 0;if(r)return r;if(e.validators.length===0)return;const o=n.join(vb);return(l=e.validators.find(({validator:c})=>c(o)))==null?void 0:l.classGroupId},b1=/^\[(.+)\]$/,Vk=n=>{if(b1.test(n)){const e=b1.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},$k=n=>{const{theme:e,classGroups:t}=n,s={nextPart:new Map,validators:[]};for(const r in t)Qy(t[r],s,r,e);return s},Qy=(n,e,t,s)=>{n.forEach(r=>{if(typeof r=="string"){const o=r===""?e:v1(e,r);o.classGroupId=t;return}if(typeof r=="function"){if(Hk(r)){Qy(r(s),e,t,s);return}e.validators.push({validator:r,classGroupId:t});return}Object.entries(r).forEach(([o,l])=>{Qy(l,v1(e,o),t,s)})})},v1=(n,e)=>{let t=n;return e.split(vb).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},Hk=n=>n.isThemeGetter,Wk=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const r=(o,l)=>{t.set(o,l),e++,e>n&&(e=0,s=t,t=new Map)};return{get(o){let l=t.get(o);if(l!==void 0)return l;if((l=s.get(o))!==void 0)return r(o,l),l},set(o,l){t.has(o)?t.set(o,l):r(o,l)}}},Gy="!",Jy=":",Xk=Jy.length,qk=n=>{const{prefix:e,experimentalParseClassName:t}=n;let s=r=>{const o=[];let l=0,c=0,f=0,d;for(let M=0;M<r.length;M++){let A=r[M];if(l===0&&c===0){if(A===Jy){o.push(r.slice(f,M)),f=M+Xk;continue}if(A==="/"){d=M;continue}}A==="["?l++:A==="]"?l--:A==="("?c++:A===")"&&c--}const g=o.length===0?r:r.substring(f),_=Yk(g),x=_!==g,E=d&&d>f?d-f:void 0;return{modifiers:o,hasImportantModifier:x,baseClassName:_,maybePostfixModifierPosition:E}};if(e){const r=e+Jy,o=s;s=l=>l.startsWith(r)?o(l.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(t){const r=s;s=o=>t({className:o,parseClassName:r})}return s},Yk=n=>n.endsWith(Gy)?n.substring(0,n.length-1):n.startsWith(Gy)?n.substring(1):n,Kk=n=>{const e=Object.fromEntries(n.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const r=[];let o=[];return s.forEach(l=>{l[0]==="["||e[l]?(r.push(...o.sort(),l),o=[]):o.push(l)}),r.push(...o.sort()),r}},Zk=n=>({cache:Wk(n.cacheSize),parseClassName:qk(n),sortModifiers:Kk(n),...zk(n)}),Qk=/\s+/,Gk=(n,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:o}=e,l=[],c=n.trim().split(Qk);let f="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:_,modifiers:x,hasImportantModifier:E,baseClassName:M,maybePostfixModifierPosition:A}=t(g);if(_){f=g+(f.length>0?" "+f:f);continue}let R=!!A,k=s(R?M.substring(0,A):M);if(!k){if(!R){f=g+(f.length>0?" "+f:f);continue}if(k=s(M),!k){f=g+(f.length>0?" "+f:f);continue}R=!1}const U=o(x).join(":"),I=E?U+Gy:U,V=I+k;if(l.includes(V))continue;l.push(V);const H=r(k,R);for(let W=0;W<H.length;++W){const ee=H[W];l.push(I+ee)}f=g+(f.length>0?" "+f:f)}return f};function Jk(){let n=0,e,t,s="";for(;n<arguments.length;)(e=arguments[n++])&&(t=g3(e))&&(s&&(s+=" "),s+=t);return s}const g3=n=>{if(typeof n=="string")return n;let e,t="";for(let s=0;s<n.length;s++)n[s]&&(e=g3(n[s]))&&(t&&(t+=" "),t+=e);return t};function e4(n,...e){let t,s,r,o=l;function l(f){const d=e.reduce((g,_)=>_(g),n());return t=Zk(d),s=t.cache.get,r=t.cache.set,o=c,c(f)}function c(f){const d=s(f);if(d)return d;const g=Gk(f,t);return r(f,g),g}return function(){return o(Jk.apply(null,arguments))}}const Mn=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},m3=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,y3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,t4=/^\d+\/\d+$/,n4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,s4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,r4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,i4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,o4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=n=>t4.test(n),bt=n=>!!n&&!Number.isNaN(Number(n)),Li=n=>!!n&&Number.isInteger(Number(n)),Bm=n=>n.endsWith("%")&&bt(n.slice(0,-1)),ei=n=>n4.test(n),a4=()=>!0,l4=n=>s4.test(n)&&!r4.test(n),_3=()=>!1,c4=n=>i4.test(n),u4=n=>o4.test(n),f4=n=>!Ke(n)&&!Ze(n),h4=n=>nc(n,w3,_3),Ke=n=>m3.test(n),Lo=n=>nc(n,x3,l4),Um=n=>nc(n,y4,bt),w1=n=>nc(n,b3,_3),d4=n=>nc(n,v3,u4),vh=n=>nc(n,T3,c4),Ze=n=>y3.test(n),iu=n=>sc(n,x3),p4=n=>sc(n,_4),x1=n=>sc(n,b3),g4=n=>sc(n,w3),m4=n=>sc(n,v3),wh=n=>sc(n,T3,!0),nc=(n,e,t)=>{const s=m3.exec(n);return s?s[1]?e(s[1]):t(s[2]):!1},sc=(n,e,t=!1)=>{const s=y3.exec(n);return s?s[1]?e(s[1]):t:!1},b3=n=>n==="position"||n==="percentage",v3=n=>n==="image"||n==="url",w3=n=>n==="length"||n==="size"||n==="bg-size",x3=n=>n==="length",y4=n=>n==="number",_4=n=>n==="family-name",T3=n=>n==="shadow",b4=()=>{const n=Mn("color"),e=Mn("font"),t=Mn("text"),s=Mn("font-weight"),r=Mn("tracking"),o=Mn("leading"),l=Mn("breakpoint"),c=Mn("container"),f=Mn("spacing"),d=Mn("radius"),g=Mn("shadow"),_=Mn("inset-shadow"),x=Mn("text-shadow"),E=Mn("drop-shadow"),M=Mn("blur"),A=Mn("perspective"),R=Mn("aspect"),k=Mn("ease"),U=Mn("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...V(),Ze,Ke],W=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto","contain","none"],Q=()=>[Ze,Ke,f],ge=()=>[el,"full","auto",...Q()],Ne=()=>[Li,"none","subgrid",Ze,Ke],ne=()=>["auto",{span:["full",Li,Ze,Ke]},Li,Ze,Ke],ve=()=>[Li,"auto",Ze,Ke],De=()=>["auto","min","max","fr",Ze,Ke],be=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],je=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...Q()],Ae=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Q()],pe=()=>[n,Ze,Ke],qe=()=>[...V(),x1,w1,{position:[Ze,Ke]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Te=()=>["auto","cover","contain",g4,h4,{size:[Ze,Ke]}],Se=()=>[Bm,iu,Lo],he=()=>["","none","full",d,Ze,Ke],Ce=()=>["",bt,iu,Lo],fe=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[bt,Bm,x1,w1],Ue=()=>["","none",M,Ze,Ke],et=()=>["none",bt,Ze,Ke],Ge=()=>["none",bt,Ze,Ke],ot=()=>[bt,Ze,Ke],at=()=>[el,"full",...Q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ei],breakpoint:[ei],color:[a4],container:[ei],"drop-shadow":[ei],ease:["in","out","in-out"],font:[f4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ei],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ei],shadow:[ei],spacing:["px",bt],text:[ei],"text-shadow":[ei],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,Ke,Ze,R]}],container:["container"],columns:[{columns:[bt,Ke,Ze,c]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:H()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ge()}],"inset-x":[{"inset-x":ge()}],"inset-y":[{"inset-y":ge()}],start:[{start:ge()}],end:[{end:ge()}],top:[{top:ge()}],right:[{right:ge()}],bottom:[{bottom:ge()}],left:[{left:ge()}],visibility:["visible","invisible","collapse"],z:[{z:[Li,"auto",Ze,Ke]}],basis:[{basis:[el,"full","auto",c,...Q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[bt,el,"auto","initial","none",Ke]}],grow:[{grow:["",bt,Ze,Ke]}],shrink:[{shrink:["",bt,Ze,Ke]}],order:[{order:[Li,"first","last","none",Ze,Ke]}],"grid-cols":[{"grid-cols":Ne()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":ve()}],"col-end":[{"col-end":ve()}],"grid-rows":[{"grid-rows":Ne()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":ve()}],"row-end":[{"row-end":ve()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":De()}],"auto-rows":[{"auto-rows":De()}],gap:[{gap:Q()}],"gap-x":[{"gap-x":Q()}],"gap-y":[{"gap-y":Q()}],"justify-content":[{justify:[...be(),"normal"]}],"justify-items":[{"justify-items":[...je(),"normal"]}],"justify-self":[{"justify-self":["auto",...je()]}],"align-content":[{content:["normal",...be()]}],"align-items":[{items:[...je(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...je(),{baseline:["","last"]}]}],"place-content":[{"place-content":be()}],"place-items":[{"place-items":[...je(),"baseline"]}],"place-self":[{"place-self":["auto",...je()]}],p:[{p:Q()}],px:[{px:Q()}],py:[{py:Q()}],ps:[{ps:Q()}],pe:[{pe:Q()}],pt:[{pt:Q()}],pr:[{pr:Q()}],pb:[{pb:Q()}],pl:[{pl:Q()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":Q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Q()}],"space-y-reverse":["space-y-reverse"],size:[{size:Ae()}],w:[{w:[c,"screen",...Ae()]}],"min-w":[{"min-w":[c,"screen","none",...Ae()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...Ae()]}],h:[{h:["screen","lh",...Ae()]}],"min-h":[{"min-h":["screen","lh","none",...Ae()]}],"max-h":[{"max-h":["screen","lh",...Ae()]}],"font-size":[{text:["base",t,iu,Lo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Ze,Um]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bm,Ke]}],"font-family":[{font:[p4,Ke,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,Ze,Ke]}],"line-clamp":[{"line-clamp":[bt,"none",Ze,Um]}],leading:[{leading:[o,...Q()]}],"list-image":[{"list-image":["none",Ze,Ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ze,Ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:pe()}],"text-color":[{text:pe()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[bt,"from-font","auto",Ze,Lo]}],"text-decoration-color":[{decoration:pe()}],"underline-offset":[{"underline-offset":[bt,"auto",Ze,Ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze,Ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ze,Ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:qe()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:Te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Li,Ze,Ke],radial:["",Ze,Ke],conic:[Li,Ze,Ke]},m4,d4]}],"bg-color":[{bg:pe()}],"gradient-from-pos":[{from:Se()}],"gradient-via-pos":[{via:Se()}],"gradient-to-pos":[{to:Se()}],"gradient-from":[{from:pe()}],"gradient-via":[{via:pe()}],"gradient-to":[{to:pe()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:Ce()}],"border-w-x":[{"border-x":Ce()}],"border-w-y":[{"border-y":Ce()}],"border-w-s":[{"border-s":Ce()}],"border-w-e":[{"border-e":Ce()}],"border-w-t":[{"border-t":Ce()}],"border-w-r":[{"border-r":Ce()}],"border-w-b":[{"border-b":Ce()}],"border-w-l":[{"border-l":Ce()}],"divide-x":[{"divide-x":Ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:pe()}],"border-color-x":[{"border-x":pe()}],"border-color-y":[{"border-y":pe()}],"border-color-s":[{"border-s":pe()}],"border-color-e":[{"border-e":pe()}],"border-color-t":[{"border-t":pe()}],"border-color-r":[{"border-r":pe()}],"border-color-b":[{"border-b":pe()}],"border-color-l":[{"border-l":pe()}],"divide-color":[{divide:pe()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[bt,Ze,Ke]}],"outline-w":[{outline:["",bt,iu,Lo]}],"outline-color":[{outline:pe()}],shadow:[{shadow:["","none",g,wh,vh]}],"shadow-color":[{shadow:pe()}],"inset-shadow":[{"inset-shadow":["none",_,wh,vh]}],"inset-shadow-color":[{"inset-shadow":pe()}],"ring-w":[{ring:Ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:pe()}],"ring-offset-w":[{"ring-offset":[bt,Lo]}],"ring-offset-color":[{"ring-offset":pe()}],"inset-ring-w":[{"inset-ring":Ce()}],"inset-ring-color":[{"inset-ring":pe()}],"text-shadow":[{"text-shadow":["none",x,wh,vh]}],"text-shadow-color":[{"text-shadow":pe()}],opacity:[{opacity:[bt,Ze,Ke]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[bt]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":pe()}],"mask-image-linear-to-color":[{"mask-linear-to":pe()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":pe()}],"mask-image-t-to-color":[{"mask-t-to":pe()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":pe()}],"mask-image-r-to-color":[{"mask-r-to":pe()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":pe()}],"mask-image-b-to-color":[{"mask-b-to":pe()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":pe()}],"mask-image-l-to-color":[{"mask-l-to":pe()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":pe()}],"mask-image-x-to-color":[{"mask-x-to":pe()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":pe()}],"mask-image-y-to-color":[{"mask-y-to":pe()}],"mask-image-radial":[{"mask-radial":[Ze,Ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":pe()}],"mask-image-radial-to-color":[{"mask-radial-to":pe()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[bt]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":pe()}],"mask-image-conic-to-color":[{"mask-conic-to":pe()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:qe()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:Te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ze,Ke]}],filter:[{filter:["","none",Ze,Ke]}],blur:[{blur:Ue()}],brightness:[{brightness:[bt,Ze,Ke]}],contrast:[{contrast:[bt,Ze,Ke]}],"drop-shadow":[{"drop-shadow":["","none",E,wh,vh]}],"drop-shadow-color":[{"drop-shadow":pe()}],grayscale:[{grayscale:["",bt,Ze,Ke]}],"hue-rotate":[{"hue-rotate":[bt,Ze,Ke]}],invert:[{invert:["",bt,Ze,Ke]}],saturate:[{saturate:[bt,Ze,Ke]}],sepia:[{sepia:["",bt,Ze,Ke]}],"backdrop-filter":[{"backdrop-filter":["","none",Ze,Ke]}],"backdrop-blur":[{"backdrop-blur":Ue()}],"backdrop-brightness":[{"backdrop-brightness":[bt,Ze,Ke]}],"backdrop-contrast":[{"backdrop-contrast":[bt,Ze,Ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",bt,Ze,Ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[bt,Ze,Ke]}],"backdrop-invert":[{"backdrop-invert":["",bt,Ze,Ke]}],"backdrop-opacity":[{"backdrop-opacity":[bt,Ze,Ke]}],"backdrop-saturate":[{"backdrop-saturate":[bt,Ze,Ke]}],"backdrop-sepia":[{"backdrop-sepia":["",bt,Ze,Ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Q()}],"border-spacing-x":[{"border-spacing-x":Q()}],"border-spacing-y":[{"border-spacing-y":Q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ze,Ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[bt,"initial",Ze,Ke]}],ease:[{ease:["linear","initial",k,Ze,Ke]}],delay:[{delay:[bt,Ze,Ke]}],animate:[{animate:["none",U,Ze,Ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,Ze,Ke]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:et()}],"rotate-x":[{"rotate-x":et()}],"rotate-y":[{"rotate-y":et()}],"rotate-z":[{"rotate-z":et()}],scale:[{scale:Ge()}],"scale-x":[{"scale-x":Ge()}],"scale-y":[{"scale-y":Ge()}],"scale-z":[{"scale-z":Ge()}],"scale-3d":["scale-3d"],skew:[{skew:ot()}],"skew-x":[{"skew-x":ot()}],"skew-y":[{"skew-y":ot()}],transform:[{transform:[Ze,Ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:at()}],"translate-x":[{"translate-x":at()}],"translate-y":[{"translate-y":at()}],"translate-z":[{"translate-z":at()}],"translate-none":["translate-none"],accent:[{accent:pe()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:pe()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ze,Ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ze,Ke]}],fill:[{fill:["none",...pe()]}],"stroke-w":[{stroke:[bt,iu,Lo,Um]}],stroke:[{stroke:["none",...pe()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},v4=e4(b4);function zt(...n){return v4(i3(n))}const w4=np("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive border-destructive bg-card text-card-foreground",success:"border-[color:var(--color-success)] bg-card text-card-foreground",warning:"border-[color:var(--color-warning)] bg-card text-card-foreground",info:"border-[color:var(--color-info)] bg-card text-card-foreground"}},defaultVariants:{variant:"default"}}),x4=vI,S3=N.forwardRef(({className:n,...e},t)=>T.jsx(GS,{ref:t,className:zt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px] gap-2",n),...e}));S3.displayName=GS.displayName;const E3=N.forwardRef(({className:n,variant:e,...t},s)=>T.jsx(JS,{ref:s,className:zt(w4({variant:e}),n),...t}));E3.displayName=JS.displayName;const T4=N.forwardRef(({className:n,...e},t)=>T.jsx(n3,{ref:t,className:zt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-thin ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...e}));T4.displayName=n3.displayName;const A3=N.forwardRef(({className:n,...e},t)=>T.jsx(s3,{ref:t,className:zt("absolute right-2 top-2 rounded-md p-1 text-foreground/30 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-80 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...e,children:T.jsx(_b,{className:"h-4 w-4"})}));A3.displayName=s3.displayName;const R3=N.forwardRef(({className:n,...e},t)=>T.jsx(e3,{ref:t,className:zt("text-xs font-thin",n),...e}));R3.displayName=e3.displayName;const C3=N.forwardRef(({className:n,...e},t)=>T.jsx(t3,{ref:t,className:zt("text-xs opacity-70",n),...e}));C3.displayName=t3.displayName;const M3=N.forwardRef(({className:n,variant:e="default",...t},s)=>{const r={default:id,destructive:LI,success:gl,warning:fu,info:id}[e],o={default:"text-muted-foreground",destructive:"text-destructive",success:"text-[color:var(--color-success)]",warning:"text-[color:var(--color-warning)]",info:"text-[color:var(--color-info)]"}[e];return T.jsx("div",{ref:s,className:zt("flex-shrink-0",n),...t,children:T.jsx(r,{className:zt("h-4 w-4",o)})})});M3.displayName="ToastIcon";const T1=(n,e)=>{const t={default:"text-foreground",destructive:"text-destructive",success:"text-[color:var(--color-success)]",warning:"text-[color:var(--color-warning)]",info:"text-[color:var(--color-info)]"},s={success:["added","created","saved","completed","success","done"],destructive:["error","failed","deleted","removed","warning"],warning:["warning","caution","alert"],info:["info","note","updated","changed"]};let r=n;return r=r.replace(/([^\s]+\.[a-zA-Z0-9]+)/g,"<strong>$1</strong>"),r=r.replace(/([^\s]*\/[^\s]+)/g,"<strong>$1</strong>"),Object.entries(s).forEach(([o,l])=>{l.forEach(c=>{const f=new RegExp(`\\b(${c})\\b`,"gi"),d=t[o];r=r.replace(f,`<span class="${d} font-medium">$1</span>`)})}),{__html:r}},S4=3,E4=5e3;let Fm=0;function A4(){return Fm=(Fm+1)%Number.MAX_SAFE_INTEGER,Fm.toString()}const jm=new Map,S1=n=>{if(jm.has(n))return;const e=setTimeout(()=>{jm.delete(n),wu({type:"REMOVE_TOAST",toastId:n})},E4);jm.set(n,e)},R4=(n,e)=>{switch(e.type){case"ADD_TOAST":return{...n,toasts:[e.toast,...n.toasts].slice(0,S4)};case"UPDATE_TOAST":return{...n,toasts:n.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case"DISMISS_TOAST":{const{toastId:t}=e;return t?S1(t):n.toasts.forEach(s=>{S1(s.id)}),{...n,toasts:n.toasts.map(s=>s.id===t||t===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return e.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(t=>t.id!==e.toastId)}}},Hh=[];let Wh={toasts:[]};function wu(n){Wh=R4(Wh,n),Hh.forEach(e=>{e(Wh)})}function hu({...n}){const e=A4(),t=r=>wu({type:"UPDATE_TOAST",toast:{...r,id:e}}),s=()=>wu({type:"DISMISS_TOAST",toastId:e});return wu({type:"ADD_TOAST",toast:{...n,id:e,open:!0,onOpenChange:r=>{r||s()}}}),{id:e,dismiss:s,update:t}}function C4(){const[n,e]=N.useState(Wh);return N.useEffect(()=>(Hh.push(e),()=>{const t=Hh.indexOf(e);t>-1&&Hh.splice(t,1)}),[n]),{...n,toast:hu,dismiss:t=>wu({type:"DISMISS_TOAST",toastId:t})}}function M4(){const{toasts:n}=C4();return T.jsxs(x4,{children:[n.map(function({id:e,title:t,description:s,action:r,variant:o,...l}){return T.jsxs(E3,{variant:o,...l,children:[T.jsxs("div",{className:"flex items-start gap-3",children:[T.jsx(M3,{variant:o}),T.jsxs("div",{className:"grid gap-1 flex-1",children:[t&&T.jsx(R3,{dangerouslySetInnerHTML:T1(String(t))}),s&&T.jsx(C3,{dangerouslySetInnerHTML:T1(String(s))})]})]}),r,T.jsx(A3,{})]},e)}),T.jsx(S3,{})]})}var N4=(n,e,t,s,r,o,l,c)=>{let f=document.documentElement,d=["light","dark"];function g(E){(Array.isArray(n)?n:[n]).forEach(M=>{let A=M==="class",R=A&&o?r.map(k=>o[k]||k):r;A?(f.classList.remove(...R),f.classList.add(o&&o[E]?o[E]:E)):f.setAttribute(M,E)}),_(E)}function _(E){c&&d.includes(E)&&(f.style.colorScheme=E)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)g(s);else try{let E=localStorage.getItem(e)||t,M=l&&E==="system"?x():E;g(M)}catch{}},E1=["light","dark"],N3="(prefers-color-scheme: dark)",O4=typeof window>"u",wb=N.createContext(void 0),I4={setTheme:n=>{},themes:[]},k4=()=>{var n;return(n=N.useContext(wb))!=null?n:I4},P4=n=>N.useContext(wb)?N.createElement(N.Fragment,null,n.children):N.createElement(B4,{...n}),D4=["light","dark"],B4=({forcedTheme:n,disableTransitionOnChange:e=!1,enableSystem:t=!0,enableColorScheme:s=!0,storageKey:r="theme",themes:o=D4,defaultTheme:l=t?"system":"light",attribute:c="data-theme",value:f,children:d,nonce:g,scriptProps:_})=>{let[x,E]=N.useState(()=>F4(r,l)),[M,A]=N.useState(()=>x==="system"?Lm():x),R=f?Object.values(f):o,k=N.useCallback(H=>{let W=H;if(!W)return;H==="system"&&t&&(W=Lm());let ee=f?f[W]:W,Q=e?j4(g):null,ge=document.documentElement,Ne=ne=>{ne==="class"?(ge.classList.remove(...R),ee&&ge.classList.add(ee)):ne.startsWith("data-")&&(ee?ge.setAttribute(ne,ee):ge.removeAttribute(ne))};if(Array.isArray(c)?c.forEach(Ne):Ne(c),s){let ne=E1.includes(l)?l:null,ve=E1.includes(W)?W:ne;ge.style.colorScheme=ve}Q==null||Q()},[g]),U=N.useCallback(H=>{let W=typeof H=="function"?H(x):H;E(W);try{localStorage.setItem(r,W)}catch{}},[x]),I=N.useCallback(H=>{let W=Lm(H);A(W),x==="system"&&t&&!n&&k("system")},[x,n]);N.useEffect(()=>{let H=window.matchMedia(N3);return H.addListener(I),I(H),()=>H.removeListener(I)},[I]),N.useEffect(()=>{let H=W=>{W.key===r&&(W.newValue?E(W.newValue):U(l))};return window.addEventListener("storage",H),()=>window.removeEventListener("storage",H)},[U]),N.useEffect(()=>{k(n??x)},[n,x]);let V=N.useMemo(()=>({theme:x,setTheme:U,forcedTheme:n,resolvedTheme:x==="system"?M:x,themes:t?[...o,"system"]:o,systemTheme:t?M:void 0}),[x,U,n,M,t,o]);return N.createElement(wb.Provider,{value:V},N.createElement(U4,{forcedTheme:n,storageKey:r,attribute:c,enableSystem:t,enableColorScheme:s,defaultTheme:l,value:f,themes:o,nonce:g,scriptProps:_}),d)},U4=N.memo(({forcedTheme:n,storageKey:e,attribute:t,enableSystem:s,enableColorScheme:r,defaultTheme:o,value:l,themes:c,nonce:f,scriptProps:d})=>{let g=JSON.stringify([t,e,o,n,c,l,s,r]).slice(1,-1);return N.createElement("script",{...d,suppressHydrationWarning:!0,nonce:typeof window>"u"?f:"",dangerouslySetInnerHTML:{__html:`(${N4.toString()})(${g})`}})}),F4=(n,e)=>{if(O4)return;let t;try{t=localStorage.getItem(n)||void 0}catch{}return t||e},j4=n=>{let e=document.createElement("style");return n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},Lm=n=>(n||(n=window.matchMedia(N3)),n.matches?"dark":"light");function L4({children:n,...e}){return T.jsx(P4,{...e,children:n})}const z4=np("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-thin transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Pn({className:n,variant:e,size:t,asChild:s=!1,...r}){const o=s?kS:"button";return T.jsx(o,{"data-slot":"button",className:zt(z4({variant:e,size:t,className:n})),...r})}const V4=np("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-thin w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function kn({className:n,variant:e,asChild:t=!1,...s}){const r=t?kS:"span";return T.jsx(r,{"data-slot":"badge",className:zt(V4({variant:e}),n),...s})}var $4=sb[" useId ".trim().toString()]||(()=>{}),H4=0;function Yu(n){const[e,t]=N.useState($4());return Kn(()=>{t(s=>s??String(H4++))},[n]),e?`radix-${e}`:""}var W4=N.createContext(void 0);function xb(n){const e=N.useContext(W4);return n||e||"ltr"}var zm="rovingFocusGroup.onEntryFocus",X4={bubbles:!1,cancelable:!0},Ku="RovingFocusGroup",[e_,O3,q4]=lb(Ku),[Y4,I3]=tc(Ku,[q4]),[K4,Z4]=Y4(Ku),k3=N.forwardRef((n,e)=>T.jsx(e_.Provider,{scope:n.__scopeRovingFocusGroup,children:T.jsx(e_.Slot,{scope:n.__scopeRovingFocusGroup,children:T.jsx(Q4,{...n,ref:e})})}));k3.displayName=Ku;var Q4=N.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:s,loop:r=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:g=!1,..._}=n,x=N.useRef(null),E=_n(e,x),M=xb(o),[A,R]=ku({prop:l,defaultProp:c??null,onChange:f,caller:Ku}),[k,U]=N.useState(!1),I=Gs(d),V=O3(t),H=N.useRef(!1),[W,ee]=N.useState(0);return N.useEffect(()=>{const Q=x.current;if(Q)return Q.addEventListener(zm,I),()=>Q.removeEventListener(zm,I)},[I]),T.jsx(K4,{scope:t,orientation:s,dir:M,loop:r,currentTabStopId:A,onItemFocus:N.useCallback(Q=>R(Q),[R]),onItemShiftTab:N.useCallback(()=>U(!0),[]),onFocusableItemAdd:N.useCallback(()=>ee(Q=>Q+1),[]),onFocusableItemRemove:N.useCallback(()=>ee(Q=>Q-1),[]),children:T.jsx(Rt.div,{tabIndex:k||W===0?-1:0,"data-orientation":s,..._,ref:E,style:{outline:"none",...n.style},onMouseDown:vt(n.onMouseDown,()=>{H.current=!0}),onFocus:vt(n.onFocus,Q=>{const ge=!H.current;if(Q.target===Q.currentTarget&&ge&&!k){const Ne=new CustomEvent(zm,X4);if(Q.currentTarget.dispatchEvent(Ne),!Ne.defaultPrevented){const ne=V().filter(G=>G.focusable),ve=ne.find(G=>G.active),De=ne.find(G=>G.id===A),je=[ve,De,...ne].filter(Boolean).map(G=>G.ref.current);B3(je,g)}}H.current=!1}),onBlur:vt(n.onBlur,()=>U(!1))})})}),P3="RovingFocusGroupItem",D3=N.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:s=!0,active:r=!1,tabStopId:o,children:l,...c}=n,f=Yu(),d=o||f,g=Z4(P3,t),_=g.currentTabStopId===d,x=O3(t),{onFocusableItemAdd:E,onFocusableItemRemove:M,currentTabStopId:A}=g;return N.useEffect(()=>{if(s)return E(),()=>M()},[s,E,M]),T.jsx(e_.ItemSlot,{scope:t,id:d,focusable:s,active:r,children:T.jsx(Rt.span,{tabIndex:_?0:-1,"data-orientation":g.orientation,...c,ref:e,onMouseDown:vt(n.onMouseDown,R=>{s?g.onItemFocus(d):R.preventDefault()}),onFocus:vt(n.onFocus,()=>g.onItemFocus(d)),onKeyDown:vt(n.onKeyDown,R=>{if(R.key==="Tab"&&R.shiftKey){g.onItemShiftTab();return}if(R.target!==R.currentTarget)return;const k=eP(R,g.orientation,g.dir);if(k!==void 0){if(R.metaKey||R.ctrlKey||R.altKey||R.shiftKey)return;R.preventDefault();let I=x().filter(V=>V.focusable).map(V=>V.ref.current);if(k==="last")I.reverse();else if(k==="prev"||k==="next"){k==="prev"&&I.reverse();const V=I.indexOf(R.currentTarget);I=g.loop?tP(I,V+1):I.slice(V+1)}setTimeout(()=>B3(I))}}),children:typeof l=="function"?l({isCurrentTabStop:_,hasTabStop:A!=null}):l})})});D3.displayName=P3;var G4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function J4(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function eP(n,e,t){const s=J4(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return G4[s]}function B3(n,e=!1){const t=document.activeElement;for(const s of n)if(s===t||(s.focus({preventScroll:e}),document.activeElement!==t))return}function tP(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var nP=k3,sP=D3,sp="Tabs",[rP]=tc(sp,[I3]),U3=I3(),[iP,Tb]=rP(sp),F3=N.forwardRef((n,e)=>{const{__scopeTabs:t,value:s,onValueChange:r,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...d}=n,g=xb(c),[_,x]=ku({prop:s,onChange:r,defaultProp:o??"",caller:sp});return T.jsx(iP,{scope:t,baseId:Yu(),value:_,onValueChange:x,orientation:l,dir:g,activationMode:f,children:T.jsx(Rt.div,{dir:g,"data-orientation":l,...d,ref:e})})});F3.displayName=sp;var j3="TabsList",L3=N.forwardRef((n,e)=>{const{__scopeTabs:t,loop:s=!0,...r}=n,o=Tb(j3,t),l=U3(t);return T.jsx(nP,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:s,children:T.jsx(Rt.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:e})})});L3.displayName=j3;var z3="TabsTrigger",V3=N.forwardRef((n,e)=>{const{__scopeTabs:t,value:s,disabled:r=!1,...o}=n,l=Tb(z3,t),c=U3(t),f=W3(l.baseId,s),d=X3(l.baseId,s),g=s===l.value;return T.jsx(sP,{asChild:!0,...c,focusable:!r,active:g,children:T.jsx(Rt.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":d,"data-state":g?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:f,...o,ref:e,onMouseDown:vt(n.onMouseDown,_=>{!r&&_.button===0&&_.ctrlKey===!1?l.onValueChange(s):_.preventDefault()}),onKeyDown:vt(n.onKeyDown,_=>{[" ","Enter"].includes(_.key)&&l.onValueChange(s)}),onFocus:vt(n.onFocus,()=>{const _=l.activationMode!=="manual";!g&&!r&&_&&l.onValueChange(s)})})})});V3.displayName=z3;var $3="TabsContent",H3=N.forwardRef((n,e)=>{const{__scopeTabs:t,value:s,forceMount:r,children:o,...l}=n,c=Tb($3,t),f=W3(c.baseId,s),d=X3(c.baseId,s),g=s===c.value,_=N.useRef(g);return N.useEffect(()=>{const x=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(x)},[]),T.jsx(fb,{present:r||g,children:({present:x})=>T.jsx(Rt.div,{"data-state":g?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!x,id:d,tabIndex:0,...l,ref:e,style:{...n.style,animationDuration:_.current?"0s":void 0},children:x&&o})})});H3.displayName=$3;function W3(n,e){return`${n}-trigger-${e}`}function X3(n,e){return`${n}-content-${e}`}var oP=F3,aP=L3,lP=V3,cP=H3;function Zu({className:n,...e}){return T.jsx(oP,{"data-slot":"tabs",className:zt("flex flex-col gap-2",n),...e})}function Qu({className:n,...e}){return T.jsx(aP,{"data-slot":"tabs-list",className:zt("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",n),...e})}function Us({className:n,...e}){return T.jsx(lP,{"data-slot":"tabs-trigger",className:zt("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-thin whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...e})}function Ys({className:n,...e}){return T.jsx(cP,{"data-slot":"tabs-content",className:zt("flex-1 outline-none",n),...e})}const Yn={success:(n,e)=>hu({variant:"success",title:n,description:e}),error:(n,e)=>hu({variant:"destructive",title:n,description:e}),info:(n,e)=>hu({variant:"info",title:n,description:e}),warning:(n,e,t)=>hu({variant:"warning",title:n,description:e,duration:t==null?void 0:t.duration})},uP=n=>{if(n===0)return"0 B";const e=1024,t=["B","KB","MB","GB"],s=Math.floor(Math.log(n)/Math.log(e));return parseFloat((n/Math.pow(e,s)).toFixed(1))+" "+t[s]},fP=()=>{const{data:n={}}=po({queryKey:["fileSizes"],queryFn:async()=>{const e=await fetch("http://localhost:3333/api/files");if(!e.ok)throw new Error("Failed to fetch files");const t=await e.json(),s={};return t.forEach(r=>{s[r.path]=r.size||0}),s},refetchInterval:3e4});return n};function yn({className:n,...e}){return T.jsx("div",{"data-slot":"card",className:zt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...e})}function hs({className:n,...e}){return T.jsx("div",{"data-slot":"card-header",className:zt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",n),...e})}function xs({className:n,...e}){return T.jsx("div",{"data-slot":"card-title",className:zt("leading-none font-thin",n),...e})}function Vn({className:n,...e}){return T.jsx("div",{"data-slot":"card-content",className:zt("px-6",n),...e})}const hP=({bundle:n,isSelected:e,onSelect:t})=>{const s=n.name.startsWith("smart:"),r=s?n.name.replace("smart:",""):n.name;return T.jsxs(yn,{className:`cursor-pointer transition-all border-vesper bg-vesper-card hover:border-vesper-accent ${e?"ring-1 ring-primary border-primary":""}`,onClick:()=>t(n.name),children:[T.jsx(hs,{className:"pb-2",children:T.jsxs("div",{className:"flex flex-col gap-2",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[s?T.jsx(bb,{className:"w-3 h-3 text-vesper-accent"}):T.jsx(RI,{className:"w-3 h-3 text-muted-foreground"}),T.jsx("h3",{className:"text-sm font-thin truncate color-vesper-fg",children:r})]}),T.jsx(kn,{variant:"outline",className:"text-[10px] font-thin uppercase tracking-tighter border-vesper color-vesper-muted px-1 h-4",children:s?"Smart":"Manual"})]}),T.jsxs("div",{className:"flex items-center gap-1.5",children:[T.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${n.changed?"bg-vesper-warning animate-pulse":"bg-vesper-success"}`}),T.jsx("span",{className:"text-[10px] font-thin uppercase tracking-widest color-vesper-muted",children:n.changed?"Syncing":"In Context"})]})]})}),T.jsx(Vn,{className:"pt-0",children:T.jsxs("div",{className:"flex flex-col gap-1 mt-1",children:[T.jsxs("div",{className:"flex items-center justify-between text-[11px] font-thin color-vesper-muted",children:[T.jsxs("div",{className:"flex items-center gap-1",children:[T.jsx(yb,{className:"w-3 h-3"}),T.jsxs("span",{children:[n.fileCount," units"]})]}),T.jsx("span",{children:uP(n.size)})]}),n.generated&&T.jsxs("div",{className:"flex items-center gap-1 text-[9px] font-thin color-vesper-muted mt-2 opacity-50",children:[T.jsx(WI,{className:"w-2.5 h-2.5"}),T.jsxs("span",{children:["Synced ",new Date(n.generated).toLocaleTimeString()]})]})]})})]})};function A1(n,[e,t]){return Math.min(t,Math.max(e,n))}var Vm=0;function dP(){N.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??R1()),document.body.insertAdjacentElement("beforeend",n[1]??R1()),Vm++,()=>{Vm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Vm--}},[])}function R1(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var $m="focusScope.autoFocusOnMount",Hm="focusScope.autoFocusOnUnmount",C1={bubbles:!1,cancelable:!0},pP="FocusScope",q3=N.forwardRef((n,e)=>{const{loop:t=!1,trapped:s=!1,onMountAutoFocus:r,onUnmountAutoFocus:o,...l}=n,[c,f]=N.useState(null),d=Gs(r),g=Gs(o),_=N.useRef(null),x=_n(e,A=>f(A)),E=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(s){let A=function(I){if(E.paused||!c)return;const V=I.target;c.contains(V)?_.current=V:qi(_.current,{select:!0})},R=function(I){if(E.paused||!c)return;const V=I.relatedTarget;V!==null&&(c.contains(V)||qi(_.current,{select:!0}))},k=function(I){if(document.activeElement===document.body)for(const H of I)H.removedNodes.length>0&&qi(c)};document.addEventListener("focusin",A),document.addEventListener("focusout",R);const U=new MutationObserver(k);return c&&U.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",A),document.removeEventListener("focusout",R),U.disconnect()}}},[s,c,E.paused]),N.useEffect(()=>{if(c){N1.add(E);const A=document.activeElement;if(!c.contains(A)){const k=new CustomEvent($m,C1);c.addEventListener($m,d),c.dispatchEvent(k),k.defaultPrevented||(gP(vP(Y3(c)),{select:!0}),document.activeElement===A&&qi(c))}return()=>{c.removeEventListener($m,d),setTimeout(()=>{const k=new CustomEvent(Hm,C1);c.addEventListener(Hm,g),c.dispatchEvent(k),k.defaultPrevented||qi(A??document.body,{select:!0}),c.removeEventListener(Hm,g),N1.remove(E)},0)}}},[c,d,g,E]);const M=N.useCallback(A=>{if(!t&&!s||E.paused)return;const R=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,k=document.activeElement;if(R&&k){const U=A.currentTarget,[I,V]=mP(U);I&&V?!A.shiftKey&&k===V?(A.preventDefault(),t&&qi(I,{select:!0})):A.shiftKey&&k===I&&(A.preventDefault(),t&&qi(V,{select:!0})):k===U&&A.preventDefault()}},[t,s,E.paused]);return T.jsx(Rt.div,{tabIndex:-1,...l,ref:x,onKeyDown:M})});q3.displayName=pP;function gP(n,{select:e=!1}={}){const t=document.activeElement;for(const s of n)if(qi(s,{select:e}),document.activeElement!==t)return}function mP(n){const e=Y3(n),t=M1(e,n),s=M1(e.reverse(),n);return[t,s]}function Y3(n){const e=[],t=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)e.push(t.currentNode);return e}function M1(n,e){for(const t of n)if(!yP(t,{upTo:e}))return t}function yP(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function _P(n){return n instanceof HTMLInputElement&&"select"in n}function qi(n,{select:e=!1}={}){if(n&&n.focus){const t=document.activeElement;n.focus({preventScroll:!0}),n!==t&&_P(n)&&e&&n.select()}}var N1=bP();function bP(){let n=[];return{add(e){const t=n[0];e!==t&&(t==null||t.pause()),n=O1(n,e),n.unshift(e)},remove(e){var t;n=O1(n,e),(t=n[0])==null||t.resume()}}}function O1(n,e){const t=[...n],s=t.indexOf(e);return s!==-1&&t.splice(s,1),t}function vP(n){return n.filter(e=>e.tagName!=="A")}const wP=["top","right","bottom","left"],go=Math.min,Ps=Math.max,od=Math.round,xh=Math.floor,Pr=n=>({x:n,y:n}),xP={left:"right",right:"left",bottom:"top",top:"bottom"},TP={start:"end",end:"start"};function t_(n,e,t){return Ps(n,go(e,t))}function ci(n,e){return typeof n=="function"?n(e):n}function ui(n){return n.split("-")[0]}function rc(n){return n.split("-")[1]}function Sb(n){return n==="x"?"y":"x"}function Eb(n){return n==="y"?"height":"width"}function Ir(n){return["top","bottom"].includes(ui(n))?"y":"x"}function Ab(n){return Sb(Ir(n))}function SP(n,e,t){t===void 0&&(t=!1);const s=rc(n),r=Ab(n),o=Eb(r);let l=r==="x"?s===(t?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(l=ad(l)),[l,ad(l)]}function EP(n){const e=ad(n);return[n_(n),e,n_(e)]}function n_(n){return n.replace(/start|end/g,e=>TP[e])}function AP(n,e,t){const s=["left","right"],r=["right","left"],o=["top","bottom"],l=["bottom","top"];switch(n){case"top":case"bottom":return t?e?r:s:e?s:r;case"left":case"right":return e?o:l;default:return[]}}function RP(n,e,t,s){const r=rc(n);let o=AP(ui(n),t==="start",s);return r&&(o=o.map(l=>l+"-"+r),e&&(o=o.concat(o.map(n_)))),o}function ad(n){return n.replace(/left|right|bottom|top/g,e=>xP[e])}function CP(n){return{top:0,right:0,bottom:0,left:0,...n}}function K3(n){return typeof n!="number"?CP(n):{top:n,right:n,bottom:n,left:n}}function ld(n){const{x:e,y:t,width:s,height:r}=n;return{width:s,height:r,top:t,left:e,right:e+s,bottom:t+r,x:e,y:t}}function I1(n,e,t){let{reference:s,floating:r}=n;const o=Ir(e),l=Ab(e),c=Eb(l),f=ui(e),d=o==="y",g=s.x+s.width/2-r.width/2,_=s.y+s.height/2-r.height/2,x=s[c]/2-r[c]/2;let E;switch(f){case"top":E={x:g,y:s.y-r.height};break;case"bottom":E={x:g,y:s.y+s.height};break;case"right":E={x:s.x+s.width,y:_};break;case"left":E={x:s.x-r.width,y:_};break;default:E={x:s.x,y:s.y}}switch(rc(e)){case"start":E[l]-=x*(t&&d?-1:1);break;case"end":E[l]+=x*(t&&d?-1:1);break}return E}const MP=async(n,e,t)=>{const{placement:s="bottom",strategy:r="absolute",middleware:o=[],platform:l}=t,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(e));let d=await l.getElementRects({reference:n,floating:e,strategy:r}),{x:g,y:_}=I1(d,s,f),x=s,E={},M=0;for(let A=0;A<c.length;A++){const{name:R,fn:k}=c[A],{x:U,y:I,data:V,reset:H}=await k({x:g,y:_,initialPlacement:s,placement:x,strategy:r,middlewareData:E,rects:d,platform:l,elements:{reference:n,floating:e}});g=U??g,_=I??_,E={...E,[R]:{...E[R],...V}},H&&M<=50&&(M++,typeof H=="object"&&(H.placement&&(x=H.placement),H.rects&&(d=H.rects===!0?await l.getElementRects({reference:n,floating:e,strategy:r}):H.rects),{x:g,y:_}=I1(d,x,f)),A=-1)}return{x:g,y:_,placement:x,strategy:r,middlewareData:E}};async function Pu(n,e){var t;e===void 0&&(e={});const{x:s,y:r,platform:o,rects:l,elements:c,strategy:f}=n,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:_="floating",altBoundary:x=!1,padding:E=0}=ci(e,n),M=K3(E),R=c[x?_==="floating"?"reference":"floating":_],k=ld(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(R)))==null||t?R:R.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:d,rootBoundary:g,strategy:f})),U=_==="floating"?{x:s,y:r,width:l.floating.width,height:l.floating.height}:l.reference,I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),V=await(o.isElement==null?void 0:o.isElement(I))?await(o.getScale==null?void 0:o.getScale(I))||{x:1,y:1}:{x:1,y:1},H=ld(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:U,offsetParent:I,strategy:f}):U);return{top:(k.top-H.top+M.top)/V.y,bottom:(H.bottom-k.bottom+M.bottom)/V.y,left:(k.left-H.left+M.left)/V.x,right:(H.right-k.right+M.right)/V.x}}const NP=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:s,placement:r,rects:o,platform:l,elements:c,middlewareData:f}=e,{element:d,padding:g=0}=ci(n,e)||{};if(d==null)return{};const _=K3(g),x={x:t,y:s},E=Ab(r),M=Eb(E),A=await l.getDimensions(d),R=E==="y",k=R?"top":"left",U=R?"bottom":"right",I=R?"clientHeight":"clientWidth",V=o.reference[M]+o.reference[E]-x[E]-o.floating[M],H=x[E]-o.reference[E],W=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let ee=W?W[I]:0;(!ee||!await(l.isElement==null?void 0:l.isElement(W)))&&(ee=c.floating[I]||o.floating[M]);const Q=V/2-H/2,ge=ee/2-A[M]/2-1,Ne=go(_[k],ge),ne=go(_[U],ge),ve=Ne,De=ee-A[M]-ne,be=ee/2-A[M]/2+Q,je=t_(ve,be,De),G=!f.arrow&&rc(r)!=null&&be!==je&&o.reference[M]/2-(be<ve?Ne:ne)-A[M]/2<0,Ae=G?be<ve?be-ve:be-De:0;return{[E]:x[E]+Ae,data:{[E]:je,centerOffset:be-je-Ae,...G&&{alignmentOffset:Ae}},reset:G}}}),OP=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,s;const{placement:r,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:d}=e,{mainAxis:g=!0,crossAxis:_=!0,fallbackPlacements:x,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:A=!0,...R}=ci(n,e);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const k=ui(r),U=Ir(c),I=ui(c)===c,V=await(f.isRTL==null?void 0:f.isRTL(d.floating)),H=x||(I||!A?[ad(c)]:EP(c)),W=M!=="none";!x&&W&&H.push(...RP(c,A,M,V));const ee=[c,...H],Q=await Pu(e,R),ge=[];let Ne=((s=o.flip)==null?void 0:s.overflows)||[];if(g&&ge.push(Q[k]),_){const be=SP(r,l,V);ge.push(Q[be[0]],Q[be[1]])}if(Ne=[...Ne,{placement:r,overflows:ge}],!ge.every(be=>be<=0)){var ne,ve;const be=(((ne=o.flip)==null?void 0:ne.index)||0)+1,je=ee[be];if(je&&(!(_==="alignment"?U!==Ir(je):!1)||Ne.every(pe=>pe.overflows[0]>0&&Ir(pe.placement)===U)))return{data:{index:be,overflows:Ne},reset:{placement:je}};let G=(ve=Ne.filter(Ae=>Ae.overflows[0]<=0).sort((Ae,pe)=>Ae.overflows[1]-pe.overflows[1])[0])==null?void 0:ve.placement;if(!G)switch(E){case"bestFit":{var De;const Ae=(De=Ne.filter(pe=>{if(W){const qe=Ir(pe.placement);return qe===U||qe==="y"}return!0}).map(pe=>[pe.placement,pe.overflows.filter(qe=>qe>0).reduce((qe,K)=>qe+K,0)]).sort((pe,qe)=>pe[1]-qe[1])[0])==null?void 0:De[0];Ae&&(G=Ae);break}case"initialPlacement":G=c;break}if(r!==G)return{reset:{placement:G}}}return{}}}};function k1(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function P1(n){return wP.some(e=>n[e]>=0)}const IP=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:s="referenceHidden",...r}=ci(n,e);switch(s){case"referenceHidden":{const o=await Pu(e,{...r,elementContext:"reference"}),l=k1(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:P1(l)}}}case"escaped":{const o=await Pu(e,{...r,altBoundary:!0}),l=k1(o,t.floating);return{data:{escapedOffsets:l,escaped:P1(l)}}}default:return{}}}}};async function kP(n,e){const{placement:t,platform:s,elements:r}=n,o=await(s.isRTL==null?void 0:s.isRTL(r.floating)),l=ui(t),c=rc(t),f=Ir(t)==="y",d=["left","top"].includes(l)?-1:1,g=o&&f?-1:1,_=ci(e,n);let{mainAxis:x,crossAxis:E,alignmentAxis:M}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return c&&typeof M=="number"&&(E=c==="end"?M*-1:M),f?{x:E*g,y:x*d}:{x:x*d,y:E*g}}const PP=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,s;const{x:r,y:o,placement:l,middlewareData:c}=e,f=await kP(e,n);return l===((t=c.offset)==null?void 0:t.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:r+f.x,y:o+f.y,data:{...f,placement:l}}}}},DP=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:s,placement:r}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:R=>{let{x:k,y:U}=R;return{x:k,y:U}}},...f}=ci(n,e),d={x:t,y:s},g=await Pu(e,f),_=Ir(ui(r)),x=Sb(_);let E=d[x],M=d[_];if(o){const R=x==="y"?"top":"left",k=x==="y"?"bottom":"right",U=E+g[R],I=E-g[k];E=t_(U,E,I)}if(l){const R=_==="y"?"top":"left",k=_==="y"?"bottom":"right",U=M+g[R],I=M-g[k];M=t_(U,M,I)}const A=c.fn({...e,[x]:E,[_]:M});return{...A,data:{x:A.x-t,y:A.y-s,enabled:{[x]:o,[_]:l}}}}}},BP=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:s,placement:r,rects:o,middlewareData:l}=e,{offset:c=0,mainAxis:f=!0,crossAxis:d=!0}=ci(n,e),g={x:t,y:s},_=Ir(r),x=Sb(_);let E=g[x],M=g[_];const A=ci(c,e),R=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:0,crossAxis:0,...A};if(f){const I=x==="y"?"height":"width",V=o.reference[x]-o.floating[I]+R.mainAxis,H=o.reference[x]+o.reference[I]-R.mainAxis;E<V?E=V:E>H&&(E=H)}if(d){var k,U;const I=x==="y"?"width":"height",V=["top","left"].includes(ui(r)),H=o.reference[_]-o.floating[I]+(V&&((k=l.offset)==null?void 0:k[_])||0)+(V?0:R.crossAxis),W=o.reference[_]+o.reference[I]+(V?0:((U=l.offset)==null?void 0:U[_])||0)-(V?R.crossAxis:0);M<H?M=H:M>W&&(M=W)}return{[x]:E,[_]:M}}}},UP=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,s;const{placement:r,rects:o,platform:l,elements:c}=e,{apply:f=()=>{},...d}=ci(n,e),g=await Pu(e,d),_=ui(r),x=rc(r),E=Ir(r)==="y",{width:M,height:A}=o.floating;let R,k;_==="top"||_==="bottom"?(R=_,k=x===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(k=_,R=x==="end"?"top":"bottom");const U=A-g.top-g.bottom,I=M-g.left-g.right,V=go(A-g[R],U),H=go(M-g[k],I),W=!e.middlewareData.shift;let ee=V,Q=H;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(Q=I),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(ee=U),W&&!x){const Ne=Ps(g.left,0),ne=Ps(g.right,0),ve=Ps(g.top,0),De=Ps(g.bottom,0);E?Q=M-2*(Ne!==0||ne!==0?Ne+ne:Ps(g.left,g.right)):ee=A-2*(ve!==0||De!==0?ve+De:Ps(g.top,g.bottom))}await f({...e,availableWidth:Q,availableHeight:ee});const ge=await l.getDimensions(c.floating);return M!==ge.width||A!==ge.height?{reset:{rects:!0}}:{}}}};function rp(){return typeof window<"u"}function ic(n){return Z3(n)?(n.nodeName||"").toLowerCase():"#document"}function Fs(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Fr(n){var e;return(e=(Z3(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Z3(n){return rp()?n instanceof Node||n instanceof Fs(n).Node:!1}function gr(n){return rp()?n instanceof Element||n instanceof Fs(n).Element:!1}function Dr(n){return rp()?n instanceof HTMLElement||n instanceof Fs(n).HTMLElement:!1}function D1(n){return!rp()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Fs(n).ShadowRoot}function Gu(n){const{overflow:e,overflowX:t,overflowY:s,display:r}=mr(n);return/auto|scroll|overlay|hidden|clip/.test(e+s+t)&&!["inline","contents"].includes(r)}function FP(n){return["table","td","th"].includes(ic(n))}function ip(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function Rb(n){const e=Cb(),t=gr(n)?mr(n):n;return["transform","translate","scale","rotate","perspective"].some(s=>t[s]?t[s]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(t.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(t.contain||"").includes(s))}function jP(n){let e=mo(n);for(;Dr(e)&&!Vl(e);){if(Rb(e))return e;if(ip(e))return null;e=mo(e)}return null}function Cb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Vl(n){return["html","body","#document"].includes(ic(n))}function mr(n){return Fs(n).getComputedStyle(n)}function op(n){return gr(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function mo(n){if(ic(n)==="html")return n;const e=n.assignedSlot||n.parentNode||D1(n)&&n.host||Fr(n);return D1(e)?e.host:e}function Q3(n){const e=mo(n);return Vl(e)?n.ownerDocument?n.ownerDocument.body:n.body:Dr(e)&&Gu(e)?e:Q3(e)}function Du(n,e,t){var s;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=Q3(n),o=r===((s=n.ownerDocument)==null?void 0:s.body),l=Fs(r);if(o){const c=s_(l);return e.concat(l,l.visualViewport||[],Gu(r)?r:[],c&&t?Du(c):[])}return e.concat(r,Du(r,[],t))}function s_(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function G3(n){const e=mr(n);let t=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const r=Dr(n),o=r?n.offsetWidth:t,l=r?n.offsetHeight:s,c=od(t)!==o||od(s)!==l;return c&&(t=o,s=l),{width:t,height:s,$:c}}function Mb(n){return gr(n)?n:n.contextElement}function Sl(n){const e=Mb(n);if(!Dr(e))return Pr(1);const t=e.getBoundingClientRect(),{width:s,height:r,$:o}=G3(e);let l=(o?od(t.width):t.width)/s,c=(o?od(t.height):t.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const LP=Pr(0);function J3(n){const e=Fs(n);return!Cb()||!e.visualViewport?LP:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zP(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Fs(n)?!1:e}function la(n,e,t,s){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),o=Mb(n);let l=Pr(1);e&&(s?gr(s)&&(l=Sl(s)):l=Sl(n));const c=zP(o,t,s)?J3(o):Pr(0);let f=(r.left+c.x)/l.x,d=(r.top+c.y)/l.y,g=r.width/l.x,_=r.height/l.y;if(o){const x=Fs(o),E=s&&gr(s)?Fs(s):s;let M=x,A=s_(M);for(;A&&s&&E!==M;){const R=Sl(A),k=A.getBoundingClientRect(),U=mr(A),I=k.left+(A.clientLeft+parseFloat(U.paddingLeft))*R.x,V=k.top+(A.clientTop+parseFloat(U.paddingTop))*R.y;f*=R.x,d*=R.y,g*=R.x,_*=R.y,f+=I,d+=V,M=Fs(A),A=s_(M)}}return ld({width:g,height:_,x:f,y:d})}function Nb(n,e){const t=op(n).scrollLeft;return e?e.left+t:la(Fr(n)).left+t}function eE(n,e,t){t===void 0&&(t=!1);const s=n.getBoundingClientRect(),r=s.left+e.scrollLeft-(t?0:Nb(n,s)),o=s.top+e.scrollTop;return{x:r,y:o}}function VP(n){let{elements:e,rect:t,offsetParent:s,strategy:r}=n;const o=r==="fixed",l=Fr(s),c=e?ip(e.floating):!1;if(s===l||c&&o)return t;let f={scrollLeft:0,scrollTop:0},d=Pr(1);const g=Pr(0),_=Dr(s);if((_||!_&&!o)&&((ic(s)!=="body"||Gu(l))&&(f=op(s)),Dr(s))){const E=la(s);d=Sl(s),g.x=E.x+s.clientLeft,g.y=E.y+s.clientTop}const x=l&&!_&&!o?eE(l,f,!0):Pr(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-f.scrollLeft*d.x+g.x+x.x,y:t.y*d.y-f.scrollTop*d.y+g.y+x.y}}function $P(n){return Array.from(n.getClientRects())}function HP(n){const e=Fr(n),t=op(n),s=n.ownerDocument.body,r=Ps(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=Ps(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let l=-t.scrollLeft+Nb(n);const c=-t.scrollTop;return mr(s).direction==="rtl"&&(l+=Ps(e.clientWidth,s.clientWidth)-r),{width:r,height:o,x:l,y:c}}function WP(n,e){const t=Fs(n),s=Fr(n),r=t.visualViewport;let o=s.clientWidth,l=s.clientHeight,c=0,f=0;if(r){o=r.width,l=r.height;const d=Cb();(!d||d&&e==="fixed")&&(c=r.offsetLeft,f=r.offsetTop)}return{width:o,height:l,x:c,y:f}}function XP(n,e){const t=la(n,!0,e==="fixed"),s=t.top+n.clientTop,r=t.left+n.clientLeft,o=Dr(n)?Sl(n):Pr(1),l=n.clientWidth*o.x,c=n.clientHeight*o.y,f=r*o.x,d=s*o.y;return{width:l,height:c,x:f,y:d}}function B1(n,e,t){let s;if(e==="viewport")s=WP(n,t);else if(e==="document")s=HP(Fr(n));else if(gr(e))s=XP(e,t);else{const r=J3(n);s={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ld(s)}function tE(n,e){const t=mo(n);return t===e||!gr(t)||Vl(t)?!1:mr(t).position==="fixed"||tE(t,e)}function qP(n,e){const t=e.get(n);if(t)return t;let s=Du(n,[],!1).filter(c=>gr(c)&&ic(c)!=="body"),r=null;const o=mr(n).position==="fixed";let l=o?mo(n):n;for(;gr(l)&&!Vl(l);){const c=mr(l),f=Rb(l);!f&&c.position==="fixed"&&(r=null),(o?!f&&!r:!f&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Gu(l)&&!f&&tE(n,l))?s=s.filter(g=>g!==l):r=c,l=mo(l)}return e.set(n,s),s}function YP(n){let{element:e,boundary:t,rootBoundary:s,strategy:r}=n;const l=[...t==="clippingAncestors"?ip(e)?[]:qP(e,this._c):[].concat(t),s],c=l[0],f=l.reduce((d,g)=>{const _=B1(e,g,r);return d.top=Ps(_.top,d.top),d.right=go(_.right,d.right),d.bottom=go(_.bottom,d.bottom),d.left=Ps(_.left,d.left),d},B1(e,c,r));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function KP(n){const{width:e,height:t}=G3(n);return{width:e,height:t}}function ZP(n,e,t){const s=Dr(e),r=Fr(e),o=t==="fixed",l=la(n,!0,o,e);let c={scrollLeft:0,scrollTop:0};const f=Pr(0);function d(){f.x=Nb(r)}if(s||!s&&!o)if((ic(e)!=="body"||Gu(r))&&(c=op(e)),s){const E=la(e,!0,o,e);f.x=E.x+e.clientLeft,f.y=E.y+e.clientTop}else r&&d();o&&!s&&r&&d();const g=r&&!s&&!o?eE(r,c):Pr(0),_=l.left+c.scrollLeft-f.x-g.x,x=l.top+c.scrollTop-f.y-g.y;return{x:_,y:x,width:l.width,height:l.height}}function Wm(n){return mr(n).position==="static"}function U1(n,e){if(!Dr(n)||mr(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return Fr(n)===t&&(t=t.ownerDocument.body),t}function nE(n,e){const t=Fs(n);if(ip(n))return t;if(!Dr(n)){let r=mo(n);for(;r&&!Vl(r);){if(gr(r)&&!Wm(r))return r;r=mo(r)}return t}let s=U1(n,e);for(;s&&FP(s)&&Wm(s);)s=U1(s,e);return s&&Vl(s)&&Wm(s)&&!Rb(s)?t:s||jP(n)||t}const QP=async function(n){const e=this.getOffsetParent||nE,t=this.getDimensions,s=await t(n.floating);return{reference:ZP(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function GP(n){return mr(n).direction==="rtl"}const JP={convertOffsetParentRelativeRectToViewportRelativeRect:VP,getDocumentElement:Fr,getClippingRect:YP,getOffsetParent:nE,getElementRects:QP,getClientRects:$P,getDimensions:KP,getScale:Sl,isElement:gr,isRTL:GP};function sE(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function eD(n,e){let t=null,s;const r=Fr(n);function o(){var c;clearTimeout(s),(c=t)==null||c.disconnect(),t=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const d=n.getBoundingClientRect(),{left:g,top:_,width:x,height:E}=d;if(c||e(),!x||!E)return;const M=xh(_),A=xh(r.clientWidth-(g+x)),R=xh(r.clientHeight-(_+E)),k=xh(g),I={rootMargin:-M+"px "+-A+"px "+-R+"px "+-k+"px",threshold:Ps(0,go(1,f))||1};let V=!0;function H(W){const ee=W[0].intersectionRatio;if(ee!==f){if(!V)return l();ee?l(!1,ee):s=setTimeout(()=>{l(!1,1e-7)},1e3)}ee===1&&!sE(d,n.getBoundingClientRect())&&l(),V=!1}try{t=new IntersectionObserver(H,{...I,root:r.ownerDocument})}catch{t=new IntersectionObserver(H,I)}t.observe(n)}return l(!0),o}function tD(n,e,t,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,d=Mb(n),g=r||o?[...d?Du(d):[],...Du(e)]:[];g.forEach(k=>{r&&k.addEventListener("scroll",t,{passive:!0}),o&&k.addEventListener("resize",t)});const _=d&&c?eD(d,t):null;let x=-1,E=null;l&&(E=new ResizeObserver(k=>{let[U]=k;U&&U.target===d&&E&&(E.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var I;(I=E)==null||I.observe(e)})),t()}),d&&!f&&E.observe(d),E.observe(e));let M,A=f?la(n):null;f&&R();function R(){const k=la(n);A&&!sE(A,k)&&t(),A=k,M=requestAnimationFrame(R)}return t(),()=>{var k;g.forEach(U=>{r&&U.removeEventListener("scroll",t),o&&U.removeEventListener("resize",t)}),_==null||_(),(k=E)==null||k.disconnect(),E=null,f&&cancelAnimationFrame(M)}}const nD=PP,sD=DP,rD=OP,iD=UP,oD=IP,F1=NP,aD=BP,lD=(n,e,t)=>{const s=new Map,r={platform:JP,...t},o={...r.platform,_c:s};return MP(n,e,{...r,platform:o})};var cD=typeof document<"u",uD=function(){},Xh=cD?N.useLayoutEffect:uD;function cd(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,s,r;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(s=t;s--!==0;)if(!cd(n[s],e[s]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(e).length)return!1;for(s=t;s--!==0;)if(!{}.hasOwnProperty.call(e,r[s]))return!1;for(s=t;s--!==0;){const o=r[s];if(!(o==="_owner"&&n.$$typeof)&&!cd(n[o],e[o]))return!1}return!0}return n!==n&&e!==e}function rE(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function j1(n,e){const t=rE(n);return Math.round(e*t)/t}function Xm(n){const e=N.useRef(n);return Xh(()=>{e.current=n}),e}function fD(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:s=[],platform:r,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=n,[g,_]=N.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[x,E]=N.useState(s);cd(x,s)||E(s);const[M,A]=N.useState(null),[R,k]=N.useState(null),U=N.useCallback(pe=>{pe!==W.current&&(W.current=pe,A(pe))},[]),I=N.useCallback(pe=>{pe!==ee.current&&(ee.current=pe,k(pe))},[]),V=o||M,H=l||R,W=N.useRef(null),ee=N.useRef(null),Q=N.useRef(g),ge=f!=null,Ne=Xm(f),ne=Xm(r),ve=Xm(d),De=N.useCallback(()=>{if(!W.current||!ee.current)return;const pe={placement:e,strategy:t,middleware:x};ne.current&&(pe.platform=ne.current),lD(W.current,ee.current,pe).then(qe=>{const K={...qe,isPositioned:ve.current!==!1};be.current&&!cd(Q.current,K)&&(Q.current=K,ec.flushSync(()=>{_(K)}))})},[x,e,t,ne,ve]);Xh(()=>{d===!1&&Q.current.isPositioned&&(Q.current.isPositioned=!1,_(pe=>({...pe,isPositioned:!1})))},[d]);const be=N.useRef(!1);Xh(()=>(be.current=!0,()=>{be.current=!1}),[]),Xh(()=>{if(V&&(W.current=V),H&&(ee.current=H),V&&H){if(Ne.current)return Ne.current(V,H,De);De()}},[V,H,De,Ne,ge]);const je=N.useMemo(()=>({reference:W,floating:ee,setReference:U,setFloating:I}),[U,I]),G=N.useMemo(()=>({reference:V,floating:H}),[V,H]),Ae=N.useMemo(()=>{const pe={position:t,left:0,top:0};if(!G.floating)return pe;const qe=j1(G.floating,g.x),K=j1(G.floating,g.y);return c?{...pe,transform:"translate("+qe+"px, "+K+"px)",...rE(G.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:qe,top:K}},[t,c,G.floating,g.x,g.y]);return N.useMemo(()=>({...g,update:De,refs:je,elements:G,floatingStyles:Ae}),[g,De,je,G,Ae])}const hD=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:s,padding:r}=typeof n=="function"?n(t):n;return s&&e(s)?s.current!=null?F1({element:s.current,padding:r}).fn(t):{}:s?F1({element:s,padding:r}).fn(t):{}}}},dD=(n,e)=>({...nD(n),options:[n,e]}),pD=(n,e)=>({...sD(n),options:[n,e]}),gD=(n,e)=>({...aD(n),options:[n,e]}),mD=(n,e)=>({...rD(n),options:[n,e]}),yD=(n,e)=>({...iD(n),options:[n,e]}),_D=(n,e)=>({...oD(n),options:[n,e]}),bD=(n,e)=>({...hD(n),options:[n,e]});var vD="Arrow",iE=N.forwardRef((n,e)=>{const{children:t,width:s=10,height:r=5,...o}=n;return T.jsx(Rt.svg,{...o,ref:e,width:s,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:T.jsx("polygon",{points:"0,0 30,0 15,10"})})});iE.displayName=vD;var wD=iE;function xD(n){const[e,t]=N.useState(void 0);return Kn(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const o=r[0];let l,c;if("borderBoxSize"in o){const f=o.borderBoxSize,d=Array.isArray(f)?f[0]:f;l=d.inlineSize,c=d.blockSize}else l=n.offsetWidth,c=n.offsetHeight;t({width:l,height:c})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else t(void 0)},[n]),e}var Ob="Popper",[oE,aE]=tc(Ob),[TD,lE]=oE(Ob),cE=n=>{const{__scopePopper:e,children:t}=n,[s,r]=N.useState(null);return T.jsx(TD,{scope:e,anchor:s,onAnchorChange:r,children:t})};cE.displayName=Ob;var uE="PopperAnchor",fE=N.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:s,...r}=n,o=lE(uE,t),l=N.useRef(null),c=_n(e,l);return N.useEffect(()=>{o.onAnchorChange((s==null?void 0:s.current)||l.current)}),s?null:T.jsx(Rt.div,{...r,ref:c})});fE.displayName=uE;var Ib="PopperContent",[SD,ED]=oE(Ib),hE=N.forwardRef((n,e)=>{var xe,Ue,et,Ge,ot,at;const{__scopePopper:t,side:s="bottom",sideOffset:r=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:_="partial",hideWhenDetached:x=!1,updatePositionStrategy:E="optimized",onPlaced:M,...A}=n,R=lE(Ib,t),[k,U]=N.useState(null),I=_n(e,dt=>U(dt)),[V,H]=N.useState(null),W=xD(V),ee=(W==null?void 0:W.width)??0,Q=(W==null?void 0:W.height)??0,ge=s+(o!=="center"?"-"+o:""),Ne=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},ne=Array.isArray(d)?d:[d],ve=ne.length>0,De={padding:Ne,boundary:ne.filter(RD),altBoundary:ve},{refs:be,floatingStyles:je,placement:G,isPositioned:Ae,middlewareData:pe}=fD({strategy:"fixed",placement:ge,whileElementsMounted:(...dt)=>tD(...dt,{animationFrame:E==="always"}),elements:{reference:R.anchor},middleware:[dD({mainAxis:r+Q,alignmentAxis:l}),f&&pD({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?gD():void 0,...De}),f&&mD({...De}),yD({...De,apply:({elements:dt,rects:Vt,availableWidth:Dn,availableHeight:ds})=>{const{width:an,height:pn}=Vt.reference,tn=dt.floating.style;tn.setProperty("--radix-popper-available-width",`${Dn}px`),tn.setProperty("--radix-popper-available-height",`${ds}px`),tn.setProperty("--radix-popper-anchor-width",`${an}px`),tn.setProperty("--radix-popper-anchor-height",`${pn}px`)}}),V&&bD({element:V,padding:c}),CD({arrowWidth:ee,arrowHeight:Q}),x&&_D({strategy:"referenceHidden",...De})]}),[qe,K]=gE(G),Te=Gs(M);Kn(()=>{Ae&&(Te==null||Te())},[Ae,Te]);const Se=(xe=pe.arrow)==null?void 0:xe.x,he=(Ue=pe.arrow)==null?void 0:Ue.y,Ce=((et=pe.arrow)==null?void 0:et.centerOffset)!==0,[fe,Pe]=N.useState();return Kn(()=>{k&&Pe(window.getComputedStyle(k).zIndex)},[k]),T.jsx("div",{ref:be.setFloating,"data-radix-popper-content-wrapper":"",style:{...je,transform:Ae?je.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(Ge=pe.transformOrigin)==null?void 0:Ge.x,(ot=pe.transformOrigin)==null?void 0:ot.y].join(" "),...((at=pe.hide)==null?void 0:at.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:T.jsx(SD,{scope:t,placedSide:qe,onArrowChange:H,arrowX:Se,arrowY:he,shouldHideArrow:Ce,children:T.jsx(Rt.div,{"data-side":qe,"data-align":K,...A,ref:I,style:{...A.style,animation:Ae?void 0:"none"}})})})});hE.displayName=Ib;var dE="PopperArrow",AD={top:"bottom",right:"left",bottom:"top",left:"right"},pE=N.forwardRef(function(e,t){const{__scopePopper:s,...r}=e,o=ED(dE,s),l=AD[o.placedSide];return T.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:T.jsx(wD,{...r,ref:t,style:{...r.style,display:"block"}})})});pE.displayName=dE;function RD(n){return n!==null}var CD=n=>({name:"transformOrigin",options:n,fn(e){var R,k,U;const{placement:t,rects:s,middlewareData:r}=e,l=((R=r.arrow)==null?void 0:R.centerOffset)!==0,c=l?0:n.arrowWidth,f=l?0:n.arrowHeight,[d,g]=gE(t),_={start:"0%",center:"50%",end:"100%"}[g],x=(((k=r.arrow)==null?void 0:k.x)??0)+c/2,E=(((U=r.arrow)==null?void 0:U.y)??0)+f/2;let M="",A="";return d==="bottom"?(M=l?_:`${x}px`,A=`${-f}px`):d==="top"?(M=l?_:`${x}px`,A=`${s.floating.height+f}px`):d==="right"?(M=`${-f}px`,A=l?_:`${E}px`):d==="left"&&(M=`${s.floating.width+f}px`,A=l?_:`${E}px`),{data:{x:M,y:A}}}});function gE(n){const[e,t="center"]=n.split("-");return[e,t]}var MD=cE,ND=fE,OD=hE,ID=pE;function kD(n){const e=N.useRef({value:n,previous:n});return N.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var PD=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},tl=new WeakMap,Th=new WeakMap,Sh={},qm=0,mE=function(n){return n&&(n.host||mE(n.parentNode))},DD=function(n,e){return e.map(function(t){if(n.contains(t))return t;var s=mE(t);return s&&n.contains(s)?s:(console.error("aria-hidden",t,"in not contained inside",n,". Doing nothing"),null)}).filter(function(t){return!!t})},BD=function(n,e,t,s){var r=DD(e,Array.isArray(n)?n:[n]);Sh[t]||(Sh[t]=new WeakMap);var o=Sh[t],l=[],c=new Set,f=new Set(r),d=function(_){!_||c.has(_)||(c.add(_),d(_.parentNode))};r.forEach(d);var g=function(_){!_||f.has(_)||Array.prototype.forEach.call(_.children,function(x){if(c.has(x))g(x);else try{var E=x.getAttribute(s),M=E!==null&&E!=="false",A=(tl.get(x)||0)+1,R=(o.get(x)||0)+1;tl.set(x,A),o.set(x,R),l.push(x),A===1&&M&&Th.set(x,!0),R===1&&x.setAttribute(t,"true"),M||x.setAttribute(s,"true")}catch(k){console.error("aria-hidden: cannot operate on ",x,k)}})};return g(e),c.clear(),qm++,function(){l.forEach(function(_){var x=tl.get(_)-1,E=o.get(_)-1;tl.set(_,x),o.set(_,E),x||(Th.has(_)||_.removeAttribute(s),Th.delete(_)),E||_.removeAttribute(t)}),qm--,qm||(tl=new WeakMap,tl=new WeakMap,Th=new WeakMap,Sh={})}},UD=function(n,e,t){t===void 0&&(t="data-aria-hidden");var s=Array.from(Array.isArray(n)?n:[n]),r=PD(n);return r?(s.push.apply(s,Array.from(r.querySelectorAll("[aria-live], script"))),BD(s,r,t,"aria-hidden")):function(){return null}},Nr=function(){return Nr=Object.assign||function(e){for(var t,s=1,r=arguments.length;s<r;s++){t=arguments[s];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Nr.apply(this,arguments)};function yE(n,e){var t={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(t[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(n);r<s.length;r++)e.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(n,s[r])&&(t[s[r]]=n[s[r]]);return t}function FD(n,e,t){if(t||arguments.length===2)for(var s=0,r=e.length,o;s<r;s++)(o||!(s in e))&&(o||(o=Array.prototype.slice.call(e,0,s)),o[s]=e[s]);return n.concat(o||Array.prototype.slice.call(e))}var qh="right-scroll-bar-position",Yh="width-before-scroll-bar",jD="with-scroll-bars-hidden",LD="--removed-body-scroll-bar-size";function Ym(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}function zD(n,e){var t=N.useState(function(){return{value:n,callback:e,facade:{get current(){return t.value},set current(s){var r=t.value;r!==s&&(t.value=s,t.callback(s,r))}}}})[0];return t.callback=e,t.facade}var VD=typeof window<"u"?N.useLayoutEffect:N.useEffect,L1=new WeakMap;function $D(n,e){var t=zD(null,function(s){return n.forEach(function(r){return Ym(r,s)})});return VD(function(){var s=L1.get(t);if(s){var r=new Set(s),o=new Set(n),l=t.current;r.forEach(function(c){o.has(c)||Ym(c,null)}),o.forEach(function(c){r.has(c)||Ym(c,l)})}L1.set(t,n)},[n]),t}function HD(n){return n}function WD(n,e){e===void 0&&(e=HD);var t=[],s=!1,r={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:n},useMedium:function(o){var l=e(o,s);return t.push(l),function(){t=t.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(s=!0;t.length;){var l=t;t=[],l.forEach(o)}t={push:function(c){return o(c)},filter:function(){return t}}},assignMedium:function(o){s=!0;var l=[];if(t.length){var c=t;t=[],c.forEach(o),l=t}var f=function(){var g=l;l=[],g.forEach(o)},d=function(){return Promise.resolve().then(f)};d(),t={push:function(g){l.push(g),d()},filter:function(g){return l=l.filter(g),t}}}};return r}function XD(n){n===void 0&&(n={});var e=WD(null);return e.options=Nr({async:!0,ssr:!1},n),e}var _E=function(n){var e=n.sideCar,t=yE(n,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=e.read();if(!s)throw new Error("Sidecar medium not found");return N.createElement(s,Nr({},t))};_E.isSideCarExport=!0;function qD(n,e){return n.useMedium(e),_E}var bE=XD(),Km=function(){},ap=N.forwardRef(function(n,e){var t=N.useRef(null),s=N.useState({onScrollCapture:Km,onWheelCapture:Km,onTouchMoveCapture:Km}),r=s[0],o=s[1],l=n.forwardProps,c=n.children,f=n.className,d=n.removeScrollBar,g=n.enabled,_=n.shards,x=n.sideCar,E=n.noRelative,M=n.noIsolation,A=n.inert,R=n.allowPinchZoom,k=n.as,U=k===void 0?"div":k,I=n.gapMode,V=yE(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),H=x,W=$D([t,e]),ee=Nr(Nr({},V),r);return N.createElement(N.Fragment,null,g&&N.createElement(H,{sideCar:bE,removeScrollBar:d,shards:_,noRelative:E,noIsolation:M,inert:A,setCallbacks:o,allowPinchZoom:!!R,lockRef:t,gapMode:I}),l?N.cloneElement(N.Children.only(c),Nr(Nr({},ee),{ref:W})):N.createElement(U,Nr({},ee,{className:f,ref:W}),c))});ap.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ap.classNames={fullWidth:Yh,zeroRight:qh};var YD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KD(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var e=YD();return e&&n.setAttribute("nonce",e),n}function ZD(n,e){n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}function QD(n){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(n)}var GD=function(){var n=0,e=null;return{add:function(t){n==0&&(e=KD())&&(ZD(e,t),QD(e)),n++},remove:function(){n--,!n&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},JD=function(){var n=GD();return function(e,t){N.useEffect(function(){return n.add(e),function(){n.remove()}},[e&&t])}},vE=function(){var n=JD(),e=function(t){var s=t.styles,r=t.dynamic;return n(s,r),null};return e},e6={left:0,top:0,right:0,gap:0},Zm=function(n){return parseInt(n||"",10)||0},t6=function(n){var e=window.getComputedStyle(document.body),t=e[n==="padding"?"paddingLeft":"marginLeft"],s=e[n==="padding"?"paddingTop":"marginTop"],r=e[n==="padding"?"paddingRight":"marginRight"];return[Zm(t),Zm(s),Zm(r)]},n6=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return e6;var e=t6(n),t=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-t+e[2]-e[0])}},s6=vE(),El="data-scroll-locked",r6=function(n,e,t,s){var r=n.left,o=n.top,l=n.right,c=n.gap;return t===void 0&&(t="margin"),`
295
295
  .`.concat(jD,` {
296
296
  overflow: hidden `).concat(s,`;
297
297
  padding-right: `).concat(c,"px ").concat(s,`;
@@ -331,7 +331,7 @@ Error generating stack: `+u.message+`
331
331
  `)},z1=function(){var n=parseInt(document.body.getAttribute(El)||"0",10);return isFinite(n)?n:0},i6=function(){N.useEffect(function(){return document.body.setAttribute(El,(z1()+1).toString()),function(){var n=z1()-1;n<=0?document.body.removeAttribute(El):document.body.setAttribute(El,n.toString())}},[])},o6=function(n){var e=n.noRelative,t=n.noImportant,s=n.gapMode,r=s===void 0?"margin":s;i6();var o=N.useMemo(function(){return n6(r)},[r]);return N.createElement(s6,{styles:r6(o,!e,r,t?"":"!important")})},r_=!1;if(typeof window<"u")try{var Eh=Object.defineProperty({},"passive",{get:function(){return r_=!0,!0}});window.addEventListener("test",Eh,Eh),window.removeEventListener("test",Eh,Eh)}catch{r_=!1}var nl=r_?{passive:!1}:!1,a6=function(n){return n.tagName==="TEXTAREA"},wE=function(n,e){if(!(n instanceof Element))return!1;var t=window.getComputedStyle(n);return t[e]!=="hidden"&&!(t.overflowY===t.overflowX&&!a6(n)&&t[e]==="visible")},l6=function(n){return wE(n,"overflowY")},c6=function(n){return wE(n,"overflowX")},V1=function(n,e){var t=e.ownerDocument,s=e;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var r=xE(n,s);if(r){var o=TE(n,s),l=o[1],c=o[2];if(l>c)return!0}s=s.parentNode}while(s&&s!==t.body);return!1},u6=function(n){var e=n.scrollTop,t=n.scrollHeight,s=n.clientHeight;return[e,t,s]},f6=function(n){var e=n.scrollLeft,t=n.scrollWidth,s=n.clientWidth;return[e,t,s]},xE=function(n,e){return n==="v"?l6(e):c6(e)},TE=function(n,e){return n==="v"?u6(e):f6(e)},h6=function(n,e){return n==="h"&&e==="rtl"?-1:1},d6=function(n,e,t,s,r){var o=h6(n,window.getComputedStyle(e).direction),l=o*s,c=t.target,f=e.contains(c),d=!1,g=l>0,_=0,x=0;do{if(!c)break;var E=TE(n,c),M=E[0],A=E[1],R=E[2],k=A-R-o*M;(M||k)&&xE(n,c)&&(_+=k,x+=M);var U=c.parentNode;c=U&&U.nodeType===Node.DOCUMENT_FRAGMENT_NODE?U.host:U}while(!f&&c!==document.body||f&&(e.contains(c)||e===c));return(g&&Math.abs(_)<1||!g&&Math.abs(x)<1)&&(d=!0),d},Ah=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},$1=function(n){return[n.deltaX,n.deltaY]},H1=function(n){return n&&"current"in n?n.current:n},p6=function(n,e){return n[0]===e[0]&&n[1]===e[1]},g6=function(n){return`
332
332
  .block-interactivity-`.concat(n,` {pointer-events: none;}
333
333
  .allow-interactivity-`).concat(n,` {pointer-events: all;}
334
- `)},m6=0,sl=[];function y6(n){var e=N.useRef([]),t=N.useRef([0,0]),s=N.useRef(),r=N.useState(m6++)[0],o=N.useState(vE)[0],l=N.useRef(n);N.useEffect(function(){l.current=n},[n]),N.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(r));var A=FD([n.lockRef.current],(n.shards||[]).map(H1),!0).filter(Boolean);return A.forEach(function(R){return R.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),A.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(r))})}}},[n.inert,n.lockRef.current,n.shards]);var c=N.useCallback(function(A,R){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!l.current.allowPinchZoom;var k=Ah(A),U=t.current,I="deltaX"in A?A.deltaX:U[0]-k[0],V="deltaY"in A?A.deltaY:U[1]-k[1],H,W=A.target,ee=Math.abs(I)>Math.abs(V)?"h":"v";if("touches"in A&&ee==="h"&&W.type==="range")return!1;var Q=V1(ee,W);if(!Q)return!0;if(Q?H=ee:(H=ee==="v"?"h":"v",Q=V1(ee,W)),!Q)return!1;if(!s.current&&"changedTouches"in A&&(I||V)&&(s.current=H),!H)return!0;var ge=s.current||H;return d6(ge,R,A,ge==="h"?I:V)},[]),f=N.useCallback(function(A){var R=A;if(!(!sl.length||sl[sl.length-1]!==o)){var k="deltaY"in R?$1(R):Ah(R),U=e.current.filter(function(H){return H.name===R.type&&(H.target===R.target||R.target===H.shadowParent)&&p6(H.delta,k)})[0];if(U&&U.should){R.cancelable&&R.preventDefault();return}if(!U){var I=(l.current.shards||[]).map(H1).filter(Boolean).filter(function(H){return H.contains(R.target)}),V=I.length>0?c(R,I[0]):!l.current.noIsolation;V&&R.cancelable&&R.preventDefault()}}},[]),d=N.useCallback(function(A,R,k,U){var I={name:A,delta:R,target:k,should:U,shadowParent:_6(k)};e.current.push(I),setTimeout(function(){e.current=e.current.filter(function(V){return V!==I})},1)},[]),g=N.useCallback(function(A){t.current=Ah(A),s.current=void 0},[]),_=N.useCallback(function(A){d(A.type,$1(A),A.target,c(A,n.lockRef.current))},[]),x=N.useCallback(function(A){d(A.type,Ah(A),A.target,c(A,n.lockRef.current))},[]);N.useEffect(function(){return sl.push(o),n.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:x}),document.addEventListener("wheel",f,nl),document.addEventListener("touchmove",f,nl),document.addEventListener("touchstart",g,nl),function(){sl=sl.filter(function(A){return A!==o}),document.removeEventListener("wheel",f,nl),document.removeEventListener("touchmove",f,nl),document.removeEventListener("touchstart",g,nl)}},[]);var E=n.removeScrollBar,M=n.inert;return N.createElement(N.Fragment,null,M?N.createElement(o,{styles:g6(r)}):null,E?N.createElement(o6,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function _6(n){for(var e=null;n!==null;)n instanceof ShadowRoot&&(e=n.host,n=n.host),n=n.parentNode;return e}const b6=qD(bE,y6);var SE=N.forwardRef(function(n,e){return N.createElement(ap,Nr({},n,{ref:e,sideCar:b6}))});SE.classNames=ap.classNames;var v6=[" ","Enter","ArrowUp","ArrowDown"],w6=[" ","Enter"],ca="Select",[lp,cp,x6]=lb(ca),[oc,sX]=tc(ca,[x6,aE]),up=aE(),[T6,_o]=oc(ca),[S6,E6]=oc(ca),EE=n=>{const{__scopeSelect:e,children:t,open:s,defaultOpen:r,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:d,name:g,autoComplete:_,disabled:x,required:E,form:M}=n,A=up(e),[R,k]=N.useState(null),[U,I]=N.useState(null),[V,H]=N.useState(!1),W=xb(d),[ee,Q]=ku({prop:s,defaultProp:r??!1,onChange:o,caller:ca}),[ge,Ne]=ku({prop:l,defaultProp:c,onChange:f,caller:ca}),ne=N.useRef(null),ve=R?M||!!R.closest("form"):!0,[De,be]=N.useState(new Set),je=Array.from(De).map(G=>G.props.value).join(";");return T.jsx(MD,{...A,children:T.jsxs(T6,{required:E,scope:e,trigger:R,onTriggerChange:k,valueNode:U,onValueNodeChange:I,valueNodeHasChildren:V,onValueNodeHasChildrenChange:H,contentId:Yu(),value:ge,onValueChange:Ne,open:ee,onOpenChange:Q,dir:W,triggerPointerDownPosRef:ne,disabled:x,children:[T.jsx(lp.Provider,{scope:e,children:T.jsx(S6,{scope:n.__scopeSelect,onNativeOptionAdd:N.useCallback(G=>{be(Ae=>new Set(Ae).add(G))},[]),onNativeOptionRemove:N.useCallback(G=>{be(Ae=>{const pe=new Set(Ae);return pe.delete(G),pe})},[]),children:t})}),ve?T.jsxs(qE,{"aria-hidden":!0,required:E,tabIndex:-1,name:g,autoComplete:_,value:ge,onChange:G=>Ne(G.target.value),disabled:x,form:M,children:[ge===void 0?T.jsx("option",{value:""}):null,Array.from(De)]},je):null]})})};EE.displayName=ca;var AE="SelectTrigger",RE=N.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:s=!1,...r}=n,o=up(t),l=_o(AE,t),c=l.disabled||s,f=_n(e,l.onTriggerChange),d=cp(t),g=N.useRef("touch"),[_,x,E]=KE(A=>{const R=d().filter(I=>!I.disabled),k=R.find(I=>I.value===l.value),U=ZE(R,A,k);U!==void 0&&l.onValueChange(U.value)}),M=A=>{c||(l.onOpenChange(!0),E()),A&&(l.triggerPointerDownPosRef.current={x:Math.round(A.pageX),y:Math.round(A.pageY)})};return T.jsx(ND,{asChild:!0,...o,children:T.jsx(Rt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":YE(l.value)?"":void 0,...r,ref:f,onClick:vt(r.onClick,A=>{A.currentTarget.focus(),g.current!=="mouse"&&M(A)}),onPointerDown:vt(r.onPointerDown,A=>{g.current=A.pointerType;const R=A.target;R.hasPointerCapture(A.pointerId)&&R.releasePointerCapture(A.pointerId),A.button===0&&A.ctrlKey===!1&&A.pointerType==="mouse"&&(M(A),A.preventDefault())}),onKeyDown:vt(r.onKeyDown,A=>{const R=_.current!=="";!(A.ctrlKey||A.altKey||A.metaKey)&&A.key.length===1&&x(A.key),!(R&&A.key===" ")&&v6.includes(A.key)&&(M(),A.preventDefault())})})})});RE.displayName=AE;var CE="SelectValue",ME=N.forwardRef((n,e)=>{const{__scopeSelect:t,className:s,style:r,children:o,placeholder:l="",...c}=n,f=_o(CE,t),{onValueNodeHasChildrenChange:d}=f,g=o!==void 0,_=_n(e,f.onValueNodeChange);return Kn(()=>{d(g)},[d,g]),T.jsx(Rt.span,{...c,ref:_,style:{pointerEvents:"none"},children:YE(f.value)?T.jsx(T.Fragment,{children:l}):o})});ME.displayName=CE;var A6="SelectIcon",NE=N.forwardRef((n,e)=>{const{__scopeSelect:t,children:s,...r}=n;return T.jsx(Rt.span,{"aria-hidden":!0,...r,ref:e,children:s||"▼"})});NE.displayName=A6;var R6="SelectPortal",OE=n=>T.jsx(ub,{asChild:!0,...n});OE.displayName=R6;var ua="SelectContent",IE=N.forwardRef((n,e)=>{const t=_o(ua,n.__scopeSelect),[s,r]=N.useState();if(Kn(()=>{r(new DocumentFragment)},[]),!t.open){const o=s;return o?ec.createPortal(T.jsx(kE,{scope:n.__scopeSelect,children:T.jsx(lp.Slot,{scope:n.__scopeSelect,children:T.jsx("div",{children:n.children})})}),o):null}return T.jsx(PE,{...n,ref:e})});IE.displayName=ua;var lr=10,[kE,bo]=oc(ua),C6="SelectContentImpl",M6=Iu("SelectContent.RemoveScroll"),PE=N.forwardRef((n,e)=>{const{__scopeSelect:t,position:s="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:d,alignOffset:g,arrowPadding:_,collisionBoundary:x,collisionPadding:E,sticky:M,hideWhenDetached:A,avoidCollisions:R,...k}=n,U=_o(ua,t),[I,V]=N.useState(null),[H,W]=N.useState(null),ee=_n(e,xe=>V(xe)),[Q,ge]=N.useState(null),[Ne,ne]=N.useState(null),ve=cp(t),[De,be]=N.useState(!1),je=N.useRef(!1);N.useEffect(()=>{if(I)return UD(I)},[I]),dP();const G=N.useCallback(xe=>{const[Ue,...et]=ve().map(at=>at.ref.current),[Ge]=et.slice(-1),ot=document.activeElement;for(const at of xe)if(at===ot||(at==null||at.scrollIntoView({block:"nearest"}),at===Ue&&H&&(H.scrollTop=0),at===Ge&&H&&(H.scrollTop=H.scrollHeight),at==null||at.focus(),document.activeElement!==ot))return},[ve,H]),Ae=N.useCallback(()=>G([Q,I]),[G,Q,I]);N.useEffect(()=>{De&&Ae()},[De,Ae]);const{onOpenChange:pe,triggerPointerDownPosRef:qe}=U;N.useEffect(()=>{if(I){let xe={x:0,y:0};const Ue=Ge=>{var ot,at;xe={x:Math.abs(Math.round(Ge.pageX)-(((ot=qe.current)==null?void 0:ot.x)??0)),y:Math.abs(Math.round(Ge.pageY)-(((at=qe.current)==null?void 0:at.y)??0))}},et=Ge=>{xe.x<=10&&xe.y<=10?Ge.preventDefault():I.contains(Ge.target)||pe(!1),document.removeEventListener("pointermove",Ue),qe.current=null};return qe.current!==null&&(document.addEventListener("pointermove",Ue),document.addEventListener("pointerup",et,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ue),document.removeEventListener("pointerup",et,{capture:!0})}}},[I,pe,qe]),N.useEffect(()=>{const xe=()=>pe(!1);return window.addEventListener("blur",xe),window.addEventListener("resize",xe),()=>{window.removeEventListener("blur",xe),window.removeEventListener("resize",xe)}},[pe]);const[K,Te]=KE(xe=>{const Ue=ve().filter(ot=>!ot.disabled),et=Ue.find(ot=>ot.ref.current===document.activeElement),Ge=ZE(Ue,xe,et);Ge&&setTimeout(()=>Ge.ref.current.focus())}),Se=N.useCallback((xe,Ue,et)=>{const Ge=!je.current&&!et;(U.value!==void 0&&U.value===Ue||Ge)&&(ge(xe),Ge&&(je.current=!0))},[U.value]),he=N.useCallback(()=>I==null?void 0:I.focus(),[I]),Ce=N.useCallback((xe,Ue,et)=>{const Ge=!je.current&&!et;(U.value!==void 0&&U.value===Ue||Ge)&&ne(xe)},[U.value]),fe=s==="popper"?i_:DE,Pe=fe===i_?{side:c,sideOffset:f,align:d,alignOffset:g,arrowPadding:_,collisionBoundary:x,collisionPadding:E,sticky:M,hideWhenDetached:A,avoidCollisions:R}:{};return T.jsx(kE,{scope:t,content:I,viewport:H,onViewportChange:W,itemRefCallback:Se,selectedItem:Q,onItemLeave:he,itemTextRefCallback:Ce,focusSelectedItem:Ae,selectedItemText:Ne,position:s,isPositioned:De,searchRef:K,children:T.jsx(SE,{as:M6,allowPinchZoom:!0,children:T.jsx(q3,{asChild:!0,trapped:U.open,onMountAutoFocus:xe=>{xe.preventDefault()},onUnmountAutoFocus:vt(r,xe=>{var Ue;(Ue=U.trigger)==null||Ue.focus({preventScroll:!0}),xe.preventDefault()}),children:T.jsx(cb,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:xe=>xe.preventDefault(),onDismiss:()=>U.onOpenChange(!1),children:T.jsx(fe,{role:"listbox",id:U.contentId,"data-state":U.open?"open":"closed",dir:U.dir,onContextMenu:xe=>xe.preventDefault(),...k,...Pe,onPlaced:()=>be(!0),ref:ee,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:vt(k.onKeyDown,xe=>{const Ue=xe.ctrlKey||xe.altKey||xe.metaKey;if(xe.key==="Tab"&&xe.preventDefault(),!Ue&&xe.key.length===1&&Te(xe.key),["ArrowUp","ArrowDown","Home","End"].includes(xe.key)){let Ge=ve().filter(ot=>!ot.disabled).map(ot=>ot.ref.current);if(["ArrowUp","End"].includes(xe.key)&&(Ge=Ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(xe.key)){const ot=xe.target,at=Ge.indexOf(ot);Ge=Ge.slice(at+1)}setTimeout(()=>G(Ge)),xe.preventDefault()}})})})})})})});PE.displayName=C6;var N6="SelectItemAlignedPosition",DE=N.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:s,...r}=n,o=_o(ua,t),l=bo(ua,t),[c,f]=N.useState(null),[d,g]=N.useState(null),_=_n(e,ee=>g(ee)),x=cp(t),E=N.useRef(!1),M=N.useRef(!0),{viewport:A,selectedItem:R,selectedItemText:k,focusSelectedItem:U}=l,I=N.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&A&&R&&k){const ee=o.trigger.getBoundingClientRect(),Q=d.getBoundingClientRect(),ge=o.valueNode.getBoundingClientRect(),Ne=k.getBoundingClientRect();if(o.dir!=="rtl"){const ot=Ne.left-Q.left,at=ge.left-ot,dt=ee.left-at,Vt=ee.width+dt,Dn=Math.max(Vt,Q.width),ds=window.innerWidth-lr,an=A1(at,[lr,Math.max(lr,ds-Dn)]);c.style.minWidth=Vt+"px",c.style.left=an+"px"}else{const ot=Q.right-Ne.right,at=window.innerWidth-ge.right-ot,dt=window.innerWidth-ee.right-at,Vt=ee.width+dt,Dn=Math.max(Vt,Q.width),ds=window.innerWidth-lr,an=A1(at,[lr,Math.max(lr,ds-Dn)]);c.style.minWidth=Vt+"px",c.style.right=an+"px"}const ne=x(),ve=window.innerHeight-lr*2,De=A.scrollHeight,be=window.getComputedStyle(d),je=parseInt(be.borderTopWidth,10),G=parseInt(be.paddingTop,10),Ae=parseInt(be.borderBottomWidth,10),pe=parseInt(be.paddingBottom,10),qe=je+G+De+pe+Ae,K=Math.min(R.offsetHeight*5,qe),Te=window.getComputedStyle(A),Se=parseInt(Te.paddingTop,10),he=parseInt(Te.paddingBottom,10),Ce=ee.top+ee.height/2-lr,fe=ve-Ce,Pe=R.offsetHeight/2,xe=R.offsetTop+Pe,Ue=je+G+xe,et=qe-Ue;if(Ue<=Ce){const ot=ne.length>0&&R===ne[ne.length-1].ref.current;c.style.bottom="0px";const at=d.clientHeight-A.offsetTop-A.offsetHeight,dt=Math.max(fe,Pe+(ot?he:0)+at+Ae),Vt=Ue+dt;c.style.height=Vt+"px"}else{const ot=ne.length>0&&R===ne[0].ref.current;c.style.top="0px";const dt=Math.max(Ce,je+A.offsetTop+(ot?Se:0)+Pe)+et;c.style.height=dt+"px",A.scrollTop=Ue-Ce+A.offsetTop}c.style.margin=`${lr}px 0`,c.style.minHeight=K+"px",c.style.maxHeight=ve+"px",s==null||s(),requestAnimationFrame(()=>E.current=!0)}},[x,o.trigger,o.valueNode,c,d,A,R,k,o.dir,s]);Kn(()=>I(),[I]);const[V,H]=N.useState();Kn(()=>{d&&H(window.getComputedStyle(d).zIndex)},[d]);const W=N.useCallback(ee=>{ee&&M.current===!0&&(I(),U==null||U(),M.current=!1)},[I,U]);return T.jsx(I6,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:E,onScrollButtonChange:W,children:T.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:V},children:T.jsx(Rt.div,{...r,ref:_,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});DE.displayName=N6;var O6="SelectPopperPosition",i_=N.forwardRef((n,e)=>{const{__scopeSelect:t,align:s="start",collisionPadding:r=lr,...o}=n,l=up(t);return T.jsx(OD,{...l,...o,ref:e,align:s,collisionPadding:r,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});i_.displayName=O6;var[I6,kb]=oc(ua,{}),o_="SelectViewport",BE=N.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:s,...r}=n,o=bo(o_,t),l=kb(o_,t),c=_n(e,o.onViewportChange),f=N.useRef(0);return T.jsxs(T.Fragment,{children:[T.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),T.jsx(lp.Slot,{scope:t,children:T.jsx(Rt.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:vt(r.onScroll,d=>{const g=d.currentTarget,{contentWrapper:_,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&_){const E=Math.abs(f.current-g.scrollTop);if(E>0){const M=window.innerHeight-lr*2,A=parseFloat(_.style.minHeight),R=parseFloat(_.style.height),k=Math.max(A,R);if(k<M){const U=k+E,I=Math.min(M,U),V=U-I;_.style.height=I+"px",_.style.bottom==="0px"&&(g.scrollTop=V>0?V:0,_.style.justifyContent="flex-end")}}}f.current=g.scrollTop})})})]})});BE.displayName=o_;var UE="SelectGroup",[k6,P6]=oc(UE),D6=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=Yu();return T.jsx(k6,{scope:t,id:r,children:T.jsx(Rt.div,{role:"group","aria-labelledby":r,...s,ref:e})})});D6.displayName=UE;var FE="SelectLabel",jE=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=P6(FE,t);return T.jsx(Rt.div,{id:r.id,...s,ref:e})});jE.displayName=FE;var ud="SelectItem",[B6,LE]=oc(ud),zE=N.forwardRef((n,e)=>{const{__scopeSelect:t,value:s,disabled:r=!1,textValue:o,...l}=n,c=_o(ud,t),f=bo(ud,t),d=c.value===s,[g,_]=N.useState(o??""),[x,E]=N.useState(!1),M=_n(e,U=>{var I;return(I=f.itemRefCallback)==null?void 0:I.call(f,U,s,r)}),A=Yu(),R=N.useRef("touch"),k=()=>{r||(c.onValueChange(s),c.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return T.jsx(B6,{scope:t,value:s,disabled:r,textId:A,isSelected:d,onItemTextChange:N.useCallback(U=>{_(I=>I||((U==null?void 0:U.textContent)??"").trim())},[]),children:T.jsx(lp.ItemSlot,{scope:t,value:s,disabled:r,textValue:g,children:T.jsx(Rt.div,{role:"option","aria-labelledby":A,"data-highlighted":x?"":void 0,"aria-selected":d&&x,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...l,ref:M,onFocus:vt(l.onFocus,()=>E(!0)),onBlur:vt(l.onBlur,()=>E(!1)),onClick:vt(l.onClick,()=>{R.current!=="mouse"&&k()}),onPointerUp:vt(l.onPointerUp,()=>{R.current==="mouse"&&k()}),onPointerDown:vt(l.onPointerDown,U=>{R.current=U.pointerType}),onPointerMove:vt(l.onPointerMove,U=>{var I;R.current=U.pointerType,r?(I=f.onItemLeave)==null||I.call(f):R.current==="mouse"&&U.currentTarget.focus({preventScroll:!0})}),onPointerLeave:vt(l.onPointerLeave,U=>{var I;U.currentTarget===document.activeElement&&((I=f.onItemLeave)==null||I.call(f))}),onKeyDown:vt(l.onKeyDown,U=>{var V;((V=f.searchRef)==null?void 0:V.current)!==""&&U.key===" "||(w6.includes(U.key)&&k(),U.key===" "&&U.preventDefault())})})})})});zE.displayName=ud;var du="SelectItemText",VE=N.forwardRef((n,e)=>{const{__scopeSelect:t,className:s,style:r,...o}=n,l=_o(du,t),c=bo(du,t),f=LE(du,t),d=E6(du,t),[g,_]=N.useState(null),x=_n(e,k=>_(k),f.onItemTextChange,k=>{var U;return(U=c.itemTextRefCallback)==null?void 0:U.call(c,k,f.value,f.disabled)}),E=g==null?void 0:g.textContent,M=N.useMemo(()=>T.jsx("option",{value:f.value,disabled:f.disabled,children:E},f.value),[f.disabled,f.value,E]),{onNativeOptionAdd:A,onNativeOptionRemove:R}=d;return Kn(()=>(A(M),()=>R(M)),[A,R,M]),T.jsxs(T.Fragment,{children:[T.jsx(Rt.span,{id:f.textId,...o,ref:x}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ec.createPortal(o.children,l.valueNode):null]})});VE.displayName=du;var $E="SelectItemIndicator",HE=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n;return LE($E,t).isSelected?T.jsx(Rt.span,{"aria-hidden":!0,...s,ref:e}):null});HE.displayName=$E;var a_="SelectScrollUpButton",U6=N.forwardRef((n,e)=>{const t=bo(a_,n.__scopeSelect),s=kb(a_,n.__scopeSelect),[r,o]=N.useState(!1),l=_n(e,s.onScrollButtonChange);return Kn(()=>{if(t.viewport&&t.isPositioned){let c=function(){const d=f.scrollTop>0;o(d)};const f=t.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?T.jsx(WE,{...n,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=t;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});U6.displayName=a_;var l_="SelectScrollDownButton",F6=N.forwardRef((n,e)=>{const t=bo(l_,n.__scopeSelect),s=kb(l_,n.__scopeSelect),[r,o]=N.useState(!1),l=_n(e,s.onScrollButtonChange);return Kn(()=>{if(t.viewport&&t.isPositioned){let c=function(){const d=f.scrollHeight-f.clientHeight,g=Math.ceil(f.scrollTop)<d;o(g)};const f=t.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?T.jsx(WE,{...n,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=t;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});F6.displayName=l_;var WE=N.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:s,...r}=n,o=bo("SelectScrollButton",t),l=N.useRef(null),c=cp(t),f=N.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return N.useEffect(()=>()=>f(),[f]),Kn(()=>{var g;const d=c().find(_=>_.ref.current===document.activeElement);(g=d==null?void 0:d.ref.current)==null||g.scrollIntoView({block:"nearest"})},[c]),T.jsx(Rt.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:vt(r.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(s,50))}),onPointerMove:vt(r.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(s,50))}),onPointerLeave:vt(r.onPointerLeave,()=>{f()})})}),j6="SelectSeparator",XE=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n;return T.jsx(Rt.div,{"aria-hidden":!0,...s,ref:e})});XE.displayName=j6;var c_="SelectArrow",L6=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=up(t),o=_o(c_,t),l=bo(c_,t);return o.open&&l.position==="popper"?T.jsx(ID,{...r,...s,ref:e}):null});L6.displayName=c_;var z6="SelectBubbleInput",qE=N.forwardRef(({__scopeSelect:n,value:e,...t},s)=>{const r=N.useRef(null),o=_n(s,r),l=kD(e);return N.useEffect(()=>{const c=r.current;if(!c)return;const f=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==e&&g){const _=new Event("change",{bubbles:!0});g.call(c,e),c.dispatchEvent(_)}},[l,e]),T.jsx(Rt.select,{...t,style:{...FS,...t.style},ref:o,defaultValue:e})});qE.displayName=z6;function YE(n){return n===""||n===void 0}function KE(n){const e=Gs(n),t=N.useRef(""),s=N.useRef(0),r=N.useCallback(l=>{const c=t.current+l;e(c),function f(d){t.current=d,window.clearTimeout(s.current),d!==""&&(s.current=window.setTimeout(()=>f(""),1e3))}(c)},[e]),o=N.useCallback(()=>{t.current="",window.clearTimeout(s.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(s.current),[]),[t,r,o]}function ZE(n,e,t){const r=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,o=t?n.indexOf(t):-1;let l=V6(n,Math.max(o,0));r.length===1&&(l=l.filter(d=>d!==t));const f=l.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return f!==t?f:void 0}function V6(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var $6=EE,QE=RE,H6=ME,W6=NE,X6=OE,GE=IE,q6=BE,JE=jE,eA=zE,Y6=VE,K6=HE,tA=XE;const nA=$6,sA=H6,Pb=N.forwardRef(({className:n,children:e,...t},s)=>T.jsxs(QE,{ref:s,className:zt("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),...t,children:[e,T.jsx(W6,{asChild:!0,children:T.jsx(a3,{className:"h-4 w-4 opacity-50"})})]}));Pb.displayName=QE.displayName;const Db=N.forwardRef(({className:n,children:e,position:t="popper",...s},r)=>T.jsx(X6,{children:T.jsx(GE,{ref:r,className:zt("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:t,...s,children:T.jsx(q6,{className:zt("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e})})}));Db.displayName=GE.displayName;const Z6=N.forwardRef(({className:n,...e},t)=>T.jsx(JE,{ref:t,className:zt("py-1.5 pl-8 pr-2 text-sm font-thin",n),...e}));Z6.displayName=JE.displayName;const ml=N.forwardRef(({className:n,children:e,...t},s)=>T.jsxs(eA,{ref:s,className:zt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...t,children:[T.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:T.jsx(K6,{children:T.jsx(DI,{className:"h-4 w-4"})})}),T.jsx(Y6,{children:e})]}));ml.displayName=eA.displayName;const Q6=N.forwardRef(({className:n,...e},t)=>T.jsx(tA,{ref:t,className:zt("-mx-1 my-1 h-px bg-muted",n),...e}));Q6.displayName=tA.displayName;const Bb=N.createContext(null);Bb.displayName="PanelGroupContext";const Bs={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandleId:"data-panel-resize-handle-id"},Ub=10,Al=N.useLayoutEffect,W1=sb.useId,G6=typeof W1=="function"?W1:()=>null;let J6=0;function rA(n=null){const e=G6(),t=N.useRef(n||e||null);return t.current===null&&(t.current=""+J6++),n??t.current}function iA({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:o,id:l,maxSize:c,minSize:f,onCollapse:d,onExpand:g,onResize:_,order:x,style:E,tagName:M="div",...A}){const R=N.useContext(Bb);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:k,expandPanel:U,getPanelSize:I,getPanelStyle:V,groupId:H,isPanelCollapsed:W,reevaluatePanelConstraints:ee,registerPanel:Q,resizePanel:ge,unregisterPanel:Ne}=R,ne=rA(l),ve=N.useRef({callbacks:{onCollapse:d,onExpand:g,onResize:_},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:c,minSize:f},id:ne,idIsFromProps:l!==void 0,order:x});N.useRef({didLogMissingDefaultSizeWarning:!1}),Al(()=>{const{callbacks:be,constraints:je}=ve.current,G={...je};ve.current.id=ne,ve.current.idIsFromProps=l!==void 0,ve.current.order=x,be.onCollapse=d,be.onExpand=g,be.onResize=_,je.collapsedSize=t,je.collapsible=s,je.defaultSize=r,je.maxSize=c,je.minSize=f,(G.collapsedSize!==je.collapsedSize||G.collapsible!==je.collapsible||G.maxSize!==je.maxSize||G.minSize!==je.minSize)&&ee(ve.current,G)}),Al(()=>{const be=ve.current;return Q(be),()=>{Ne(be)}},[x,ne,Q,Ne]),N.useImperativeHandle(o,()=>({collapse:()=>{k(ve.current)},expand:be=>{U(ve.current,be)},getId(){return ne},getSize(){return I(ve.current)},isCollapsed(){return W(ve.current)},isExpanded(){return!W(ve.current)},resize:be=>{ge(ve.current,be)}}),[k,U,I,W,ne,ge]);const De=V(ve.current,r);return N.createElement(M,{...A,children:n,className:e,id:ne,style:{...De,...E},[Bs.groupId]:H,[Bs.panel]:"",[Bs.panelCollapsible]:s||void 0,[Bs.panelId]:ne,[Bs.panelSize]:parseFloat(""+De.flexGrow).toFixed(1)})}const eB=N.forwardRef((n,e)=>N.createElement(iA,{...n,forwardedRef:e}));iA.displayName="Panel";eB.displayName="forwardRef(Panel)";function oA(n){return n.type==="keydown"}function aA(n){return n.type.startsWith("pointer")}function lA(n){return n.type.startsWith("mouse")}function tB(n){if(aA(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(lA(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function nB(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const sB=1,rB=2,iB=4,oB=8;nB();let aB=new Map;function Qm(n,e){aB.set(n,e)}function lB(){const[n,e]=N.useState(0);return N.useCallback(()=>e(t=>t+1),[])}function Ct(n,e){if(!n)throw console.error(e),Error(e)}function fa(n,e,t=Ub){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function oi(n,e,t=Ub){return fa(n,e,t)===0}function Is(n,e,t){return fa(n,e,t)===0}function cB(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],o=e[s];if(!Is(r,o,t))return!1}return!0}function yl({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];Ct(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:o,maxSize:l=100,minSize:c=0}=s;if(fa(t,c)<0)if(o){const f=(r+c)/2;fa(t,f)<0?t=r:t=c}else t=c;return t=Math.min(l,t),t=parseFloat(t.toFixed(Ub)),t}function pu({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:o}){if(Is(n,0))return e;const l=[...e],[c,f]=s;Ct(c!=null,"Invalid first pivot index"),Ct(f!=null,"Invalid second pivot index");let d=0;if(o==="keyboard"){{const _=n<0?f:c,x=t[_];Ct(x,`Panel constraints not found for index ${_}`);const{collapsedSize:E=0,collapsible:M,minSize:A=0}=x;if(M){const R=e[_];if(Ct(R!=null,`Previous layout not found for panel index ${_}`),Is(R,E)){const k=A-R;fa(k,Math.abs(n))>0&&(n=n<0?0-k:k)}}}{const _=n<0?c:f,x=t[_];Ct(x,`No panel constraints found for index ${_}`);const{collapsedSize:E=0,collapsible:M,minSize:A=0}=x;if(M){const R=e[_];if(Ct(R!=null,`Previous layout not found for panel index ${_}`),Is(R,A)){const k=R-E;fa(k,Math.abs(n))>0&&(n=n<0?0-k:k)}}}}{const _=n<0?1:-1;let x=n<0?f:c,E=0;for(;;){const A=e[x];Ct(A!=null,`Previous layout not found for panel index ${x}`);const k=yl({panelConstraints:t,panelIndex:x,size:100})-A;if(E+=k,x+=_,x<0||x>=t.length)break}const M=Math.min(Math.abs(n),Math.abs(E));n=n<0?0-M:M}{let x=n<0?c:f;for(;x>=0&&x<t.length;){const E=Math.abs(n)-Math.abs(d),M=e[x];Ct(M!=null,`Previous layout not found for panel index ${x}`);const A=M-E,R=yl({panelConstraints:t,panelIndex:x,size:A});if(!Is(M,R)&&(d+=M-R,l[x]=R,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?x--:x++}}if(cB(r,l))return r;{const _=n<0?f:c,x=e[_];Ct(x!=null,`Previous layout not found for panel index ${_}`);const E=x+d,M=yl({panelConstraints:t,panelIndex:_,size:E});if(l[_]=M,!Is(M,E)){let A=E-M,k=n<0?f:c;for(;k>=0&&k<t.length;){const U=l[k];Ct(U!=null,`Previous layout not found for panel index ${k}`);const I=U+A,V=yl({panelConstraints:t,panelIndex:k,size:I});if(Is(U,V)||(A-=V-U,l[k]=V),Is(A,0))break;n>0?k--:k++}}}const g=l.reduce((_,x)=>x+_,0);return Is(g,100)?l:r}function uB({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,o=0,l=0;const c=t[0];Ct(c!=null,"No pivot index found"),e.forEach((_,x)=>{const{constraints:E}=_,{maxSize:M=100,minSize:A=0}=E;x===c?(s=A,r=M):(o+=A,l+=M)});const f=Math.min(r,100-o),d=Math.max(s,100-l),g=n[c];return{valueMax:f,valueMin:d,valueNow:g}}function fd(n,e=document){return Array.from(e.querySelectorAll(`[${Bs.resizeHandleId}][data-panel-group-id="${n}"]`))}function fB(n,e,t=document){const r=fd(n,t).findIndex(o=>o.getAttribute(Bs.resizeHandleId)===e);return r??null}function cA(n,e,t){const s=fB(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function hB(n){return n instanceof HTMLElement?!0:typeof n=="object"&&n!==null&&"tagName"in n&&"getAttribute"in n}function uA(n,e=document){if(hB(e)&&e.dataset.panelGroupId==n)return e;const t=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return t||null}function Fb(n,e=document){const t=e.querySelector(`[${Bs.resizeHandleId}="${n}"]`);return t||null}function dB(n,e,t,s=document){var r,o,l,c;const f=Fb(e,s),d=fd(n,s),g=f?d.indexOf(f):-1,_=(r=(o=t[g])===null||o===void 0?void 0:o.id)!==null&&r!==void 0?r:null,x=(l=(c=t[g+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[_,x]}function pB({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:o,setLayout:l}){N.useRef({didWarnAboutMissingResizeHandle:!1}),Al(()=>{if(!o)return;const c=fd(t,o);for(let f=0;f<r.length-1;f++){const{valueMax:d,valueMin:g,valueNow:_}=uB({layout:s,panelsArray:r,pivotIndices:[f,f+1]}),x=c[f];if(x!=null){const E=r[f];Ct(E,`No panel data found for index "${f}"`),x.setAttribute("aria-controls",E.id),x.setAttribute("aria-valuemax",""+Math.round(d)),x.setAttribute("aria-valuemin",""+Math.round(g)),x.setAttribute("aria-valuenow",_!=null?""+Math.round(_):"")}}return()=>{c.forEach((f,d)=>{f.removeAttribute("aria-controls"),f.removeAttribute("aria-valuemax"),f.removeAttribute("aria-valuemin"),f.removeAttribute("aria-valuenow")})}},[t,s,r,o]),N.useEffect(()=>{if(!o)return;const c=e.current;Ct(c,"Eager values not found");const{panelDataArray:f}=c,d=uA(t,o);Ct(d!=null,`No group found for id "${t}"`);const g=fd(t,o);Ct(g,`No resize handles found for group id "${t}"`);const _=g.map(x=>{const E=x.getAttribute(Bs.resizeHandleId);Ct(E,"Resize handle element has no handle id attribute");const[M,A]=dB(t,E,f,o);if(M==null||A==null)return()=>{};const R=k=>{if(!k.defaultPrevented)switch(k.key){case"Enter":{k.preventDefault();const U=f.findIndex(I=>I.id===M);if(U>=0){const I=f[U];Ct(I,`No panel data found for index ${U}`);const V=s[U],{collapsedSize:H=0,collapsible:W,minSize:ee=0}=I.constraints;if(V!=null&&W){const Q=pu({delta:Is(V,H)?ee-H:H-V,initialLayout:s,panelConstraints:f.map(ge=>ge.constraints),pivotIndices:cA(t,E,o),prevLayout:s,trigger:"keyboard"});s!==Q&&l(Q)}}break}}};return x.addEventListener("keydown",R),()=>{x.removeEventListener("keydown",R)}});return()=>{_.forEach(x=>x())}},[o,n,e,t,s,r,l])}function X1(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function fA(n,e){const t=n==="horizontal",{x:s,y:r}=tB(e);return t?s:r}function gB(n,e,t,s,r){const o=t==="horizontal",l=Fb(e,r);Ct(l,`No resize handle element found for id "${e}"`);const c=l.getAttribute(Bs.groupId);Ct(c,"Resize handle element has no group id attribute");let{initialCursorPosition:f}=s;const d=fA(t,n),g=uA(c,r);Ct(g,`No group element found for id "${c}"`);const _=g.getBoundingClientRect(),x=o?_.width:_.height;return(d-f)/x*100}function mB(n,e,t,s,r,o){if(oA(n)){const l=t==="horizontal";let c=0;n.shiftKey?c=100:r!=null?c=r:c=10;let f=0;switch(n.key){case"ArrowDown":f=l?0:c;break;case"ArrowLeft":f=l?-c:0;break;case"ArrowRight":f=l?c:0;break;case"ArrowUp":f=l?0:-c;break;case"End":f=100;break;case"Home":f=-100;break}return f}else return s==null?0:gB(n,e,t,s,o)}function yB({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let s=0,r=100;for(let o=0;o<n.length;o++){const l=t[o];Ct(l,`Panel constraints not found for index ${o}`);const{defaultSize:c}=l;c!=null&&(s++,e[o]=c,r-=c)}for(let o=0;o<n.length;o++){const l=t[o];Ct(l,`Panel constraints not found for index ${o}`);const{defaultSize:c}=l;if(c!=null)continue;const f=n.length-s,d=r/f;s++,e[o]=d,r-=d}return e}function rl(n,e,t){e.forEach((s,r)=>{const o=n[r];Ct(o,`Panel data not found for index ${r}`);const{callbacks:l,constraints:c,id:f}=o,{collapsedSize:d=0,collapsible:g}=c,_=t[f];if(_==null||s!==_){t[f]=s;const{onCollapse:x,onExpand:E,onResize:M}=l;M&&M(s,_),g&&(x||E)&&(E&&(_==null||oi(_,d))&&!oi(s,d)&&E(),x&&(_==null||!oi(_,d))&&oi(s,d)&&x())}})}function Rh(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function _B({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:o=3}){const l=t[r];let c;return l==null?c=n!=null?n.toPrecision(o):"1":s.length===1?c="1":c=l.toPrecision(o),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function bB(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function q1(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function hA(n){return`react-resizable-panels:${n}`}function dA(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:o}=e;return r?s:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function pA(n,e){try{const t=hA(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function vB(n,e,t){var s,r;const o=(s=pA(n,t))!==null&&s!==void 0?s:{},l=dA(e);return(r=o[l])!==null&&r!==void 0?r:null}function wB(n,e,t,s,r){var o;const l=hA(n),c=dA(e),f=(o=pA(n,r))!==null&&o!==void 0?o:{};f[c]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(l,JSON.stringify(f))}catch(d){console.error(d)}}function Y1({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!Is(s,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];Ct(l!=null,`No layout data found for index ${o}`);const c=100/s*l;t[o]=c}let r=0;for(let o=0;o<e.length;o++){const l=t[o];Ct(l!=null,`No layout data found for index ${o}`);const c=yl({panelConstraints:e,panelIndex:o,size:l});l!=c&&(r+=l-c,t[o]=c)}if(!Is(r,0))for(let o=0;o<e.length;o++){const l=t[o];Ct(l!=null,`No layout data found for index ${o}`);const c=l+r,f=yl({panelConstraints:e,panelIndex:o,size:c});if(l!==f&&(r-=f-l,t[o]=f,Is(r,0)))break}return t}const xB=100,gu={getItem:n=>(q1(gu),gu.getItem(n)),setItem:(n,e)=>{q1(gu),gu.setItem(n,e)}},K1={};function gA({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:o=null,onLayout:l=null,keyboardResizeBy:c=null,storage:f=gu,style:d,tagName:g="div",..._}){const x=rA(o),E=N.useRef(null),[M,A]=N.useState(null),[R,k]=N.useState([]),U=lB(),I=N.useRef({}),V=N.useRef(new Map),H=N.useRef(0),W=N.useRef({autoSaveId:n,direction:s,dragState:M,id:x,keyboardResizeBy:c,onLayout:l,storage:f}),ee=N.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});N.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),N.useImperativeHandle(r,()=>({getId:()=>W.current.id,getLayout:()=>{const{layout:he}=ee.current;return he},setLayout:he=>{const{onLayout:Ce}=W.current,{layout:fe,panelDataArray:Pe}=ee.current,xe=Y1({layout:he,panelConstraints:Pe.map(Ue=>Ue.constraints)});X1(fe,xe)||(k(xe),ee.current.layout=xe,Ce&&Ce(xe),rl(Pe,xe,I.current))}}),[]),Al(()=>{W.current.autoSaveId=n,W.current.direction=s,W.current.dragState=M,W.current.id=x,W.current.onLayout=l,W.current.storage=f}),pB({committedValuesRef:W,eagerValuesRef:ee,groupId:x,layout:R,panelDataArray:ee.current.panelDataArray,setLayout:k,panelGroupElement:E.current}),N.useEffect(()=>{const{panelDataArray:he}=ee.current;if(n){if(R.length===0||R.length!==he.length)return;let Ce=K1[n];Ce==null&&(Ce=bB(wB,xB),K1[n]=Ce);const fe=[...he],Pe=new Map(V.current);Ce(n,fe,Pe,R,f)}},[n,R,f]),N.useEffect(()=>{});const Q=N.useCallback(he=>{const{onLayout:Ce}=W.current,{layout:fe,panelDataArray:Pe}=ee.current;if(he.constraints.collapsible){const xe=Pe.map(ot=>ot.constraints),{collapsedSize:Ue=0,panelSize:et,pivotIndices:Ge}=zo(Pe,he,fe);if(Ct(et!=null,`Panel size not found for panel "${he.id}"`),!oi(et,Ue)){V.current.set(he.id,et);const at=dl(Pe,he)===Pe.length-1?et-Ue:Ue-et,dt=pu({delta:at,initialLayout:fe,panelConstraints:xe,pivotIndices:Ge,prevLayout:fe,trigger:"imperative-api"});Rh(fe,dt)||(k(dt),ee.current.layout=dt,Ce&&Ce(dt),rl(Pe,dt,I.current))}}},[]),ge=N.useCallback((he,Ce)=>{const{onLayout:fe}=W.current,{layout:Pe,panelDataArray:xe}=ee.current;if(he.constraints.collapsible){const Ue=xe.map(Vt=>Vt.constraints),{collapsedSize:et=0,panelSize:Ge=0,minSize:ot=0,pivotIndices:at}=zo(xe,he,Pe),dt=Ce??ot;if(oi(Ge,et)){const Vt=V.current.get(he.id),Dn=Vt!=null&&Vt>=dt?Vt:dt,an=dl(xe,he)===xe.length-1?Ge-Dn:Dn-Ge,pn=pu({delta:an,initialLayout:Pe,panelConstraints:Ue,pivotIndices:at,prevLayout:Pe,trigger:"imperative-api"});Rh(Pe,pn)||(k(pn),ee.current.layout=pn,fe&&fe(pn),rl(xe,pn,I.current))}}},[]),Ne=N.useCallback(he=>{const{layout:Ce,panelDataArray:fe}=ee.current,{panelSize:Pe}=zo(fe,he,Ce);return Ct(Pe!=null,`Panel size not found for panel "${he.id}"`),Pe},[]),ne=N.useCallback((he,Ce)=>{const{panelDataArray:fe}=ee.current,Pe=dl(fe,he);return _B({defaultSize:Ce,dragState:M,layout:R,panelData:fe,panelIndex:Pe})},[M,R]),ve=N.useCallback(he=>{const{layout:Ce,panelDataArray:fe}=ee.current,{collapsedSize:Pe=0,collapsible:xe,panelSize:Ue}=zo(fe,he,Ce);return Ct(Ue!=null,`Panel size not found for panel "${he.id}"`),xe===!0&&oi(Ue,Pe)},[]),De=N.useCallback(he=>{const{layout:Ce,panelDataArray:fe}=ee.current,{collapsedSize:Pe=0,collapsible:xe,panelSize:Ue}=zo(fe,he,Ce);return Ct(Ue!=null,`Panel size not found for panel "${he.id}"`),!xe||fa(Ue,Pe)>0},[]),be=N.useCallback(he=>{const{panelDataArray:Ce}=ee.current;Ce.push(he),Ce.sort((fe,Pe)=>{const xe=fe.order,Ue=Pe.order;return xe==null&&Ue==null?0:xe==null?-1:Ue==null?1:xe-Ue}),ee.current.panelDataArrayChanged=!0,U()},[U]);Al(()=>{if(ee.current.panelDataArrayChanged){ee.current.panelDataArrayChanged=!1;const{autoSaveId:he,onLayout:Ce,storage:fe}=W.current,{layout:Pe,panelDataArray:xe}=ee.current;let Ue=null;if(he){const Ge=vB(he,xe,fe);Ge&&(V.current=new Map(Object.entries(Ge.expandToSizes)),Ue=Ge.layout)}Ue==null&&(Ue=yB({panelDataArray:xe}));const et=Y1({layout:Ue,panelConstraints:xe.map(Ge=>Ge.constraints)});X1(Pe,et)||(k(et),ee.current.layout=et,Ce&&Ce(et),rl(xe,et,I.current))}}),Al(()=>{const he=ee.current;return()=>{he.layout=[]}},[]);const je=N.useCallback(he=>{let Ce=!1;const fe=E.current;return fe&&window.getComputedStyle(fe,null).getPropertyValue("direction")==="rtl"&&(Ce=!0),function(xe){xe.preventDefault();const Ue=E.current;if(!Ue)return()=>null;const{direction:et,dragState:Ge,id:ot,keyboardResizeBy:at,onLayout:dt}=W.current,{layout:Vt,panelDataArray:Dn}=ee.current,{initialLayout:ds}=Ge??{},an=cA(ot,he,Ue);let pn=mB(xe,he,et,Ge,at,Ue);const tn=et==="horizontal";tn&&Ce&&(pn=-pn);const _a=Dn.map(hi=>hi.constraints),ss=pu({delta:pn,initialLayout:ds??Vt,panelConstraints:_a,pivotIndices:an,prevLayout:Vt,trigger:oA(xe)?"keyboard":"mouse-or-touch"}),ps=!Rh(Vt,ss);(aA(xe)||lA(xe))&&H.current!=pn&&(H.current=pn,!ps&&pn!==0?tn?Qm(he,pn<0?sB:rB):Qm(he,pn<0?iB:oB):Qm(he,0)),ps&&(k(ss),ee.current.layout=ss,dt&&dt(ss),rl(Dn,ss,I.current))}},[]),G=N.useCallback((he,Ce)=>{const{onLayout:fe}=W.current,{layout:Pe,panelDataArray:xe}=ee.current,Ue=xe.map(Vt=>Vt.constraints),{panelSize:et,pivotIndices:Ge}=zo(xe,he,Pe);Ct(et!=null,`Panel size not found for panel "${he.id}"`);const at=dl(xe,he)===xe.length-1?et-Ce:Ce-et,dt=pu({delta:at,initialLayout:Pe,panelConstraints:Ue,pivotIndices:Ge,prevLayout:Pe,trigger:"imperative-api"});Rh(Pe,dt)||(k(dt),ee.current.layout=dt,fe&&fe(dt),rl(xe,dt,I.current))},[]),Ae=N.useCallback((he,Ce)=>{const{layout:fe,panelDataArray:Pe}=ee.current,{collapsedSize:xe=0,collapsible:Ue}=Ce,{collapsedSize:et=0,collapsible:Ge,maxSize:ot=100,minSize:at=0}=he.constraints,{panelSize:dt}=zo(Pe,he,fe);dt!=null&&(Ue&&Ge&&oi(dt,xe)?oi(xe,et)||G(he,et):dt<at?G(he,at):dt>ot&&G(he,ot))},[G]),pe=N.useCallback((he,Ce)=>{const{direction:fe}=W.current,{layout:Pe}=ee.current;if(!E.current)return;const xe=Fb(he,E.current);Ct(xe,`Drag handle element not found for id "${he}"`);const Ue=fA(fe,Ce);A({dragHandleId:he,dragHandleRect:xe.getBoundingClientRect(),initialCursorPosition:Ue,initialLayout:Pe})},[]),qe=N.useCallback(()=>{A(null)},[]),K=N.useCallback(he=>{const{panelDataArray:Ce}=ee.current,fe=dl(Ce,he);fe>=0&&(Ce.splice(fe,1),delete I.current[he.id],ee.current.panelDataArrayChanged=!0,U())},[U]),Te=N.useMemo(()=>({collapsePanel:Q,direction:s,dragState:M,expandPanel:ge,getPanelSize:Ne,getPanelStyle:ne,groupId:x,isPanelCollapsed:ve,isPanelExpanded:De,reevaluatePanelConstraints:Ae,registerPanel:be,registerResizeHandle:je,resizePanel:G,startDragging:pe,stopDragging:qe,unregisterPanel:K,panelGroupElement:E.current}),[Q,M,s,ge,Ne,ne,x,ve,De,Ae,be,je,G,pe,qe,K]),Se={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return N.createElement(Bb.Provider,{value:Te},N.createElement(g,{..._,children:e,className:t,id:o,ref:E,style:{...Se,...d},[Bs.group]:"",[Bs.groupDirection]:s,[Bs.groupId]:x}))}const TB=N.forwardRef((n,e)=>N.createElement(gA,{...n,forwardedRef:e}));gA.displayName="PanelGroup";TB.displayName="forwardRef(PanelGroup)";function dl(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function zo(n,e,t){const s=dl(n,e),o=s===n.length-1?[s-1,s]:[s,s+1],l=t[s];return{...e.constraints,panelSize:l,pivotIndices:o}}const SB=async()=>{const n=await fetch("http://localhost:3333/api/bundles");if(!n.ok)throw new Error("Failed to fetch bundles");return n.json()},Z1=n=>{const e={name:"",path:"",type:"directory",children:[]},t=new Set,s=new Map;n.forEach(o=>{o.files.forEach(l=>{t.add(l),s.has(l)||s.set(l,[]),s.get(l).push(o.name)})}),t.forEach(o=>{const l=o.split("/");let c=e;l.forEach((f,d)=>{const g=d===l.length-1,_=l.slice(0,d+1).join("/");c.children||(c.children=[]);let x=c.children.find(E=>E.name===f);x||(x={name:f,path:_,type:g?"file":"directory",children:g?void 0:[],bundles:g?s.get(o):void 0},c.children.push(x)),g||(c=x)})});const r=o=>{o.children&&(o.children.sort((l,c)=>l.type!==c.type?l.type==="directory"?-1:1:l.name.localeCompare(c.name)),o.children.forEach(r))};return r(e),e},EB=n=>{if(n===0)return"0 B";const e=1024,t=["B","KB","MB","GB"],s=Math.floor(Math.log(n)/Math.log(e));return parseFloat((n/Math.pow(e,s)).toFixed(1))+" "+t[s]};function mA({node:n,level:e,expandedDirs:t,onToggleDir:s}){const r=t.has(n.path),o=e*16;if(n.type==="directory")return T.jsxs("div",{children:[T.jsxs("div",{className:"flex items-center gap-2 py-1 px-2 hover:bg-muted/50 rounded cursor-pointer",style:{paddingLeft:`${o+8}px`},onClick:()=>s(n.path),children:[r?T.jsx(a3,{className:"w-4 h-4 text-muted-foreground"}):T.jsx(FI,{className:"w-4 h-4 text-muted-foreground"}),r?T.jsx(ok,{className:"w-4 h-4 text-[color:var(--color-info)]"}):T.jsx(lk,{className:"w-4 h-4 text-[color:var(--color-info)]"}),T.jsx("span",{className:"text-xs font-thin",children:n.name}),n.children&&T.jsxs("span",{className:"text-xs text-muted-foreground ml-auto",children:[n.children.length," items"]})]}),r&&n.children&&T.jsx("div",{children:n.children.map(c=>T.jsx(mA,{node:c,level:e+1,expandedDirs:t,onToggleDir:s},c.path))})]});const l=c=>{var g;const f=(g=c.split(".").pop())==null?void 0:g.toLowerCase(),d="w-4 h-4";switch(f){case"js":case"ts":case"jsx":case"tsx":return T.jsx(Ja,{className:`${d} text-[color:var(--color-warning)]`});case"json":return T.jsx(Ja,{className:`${d} text-[color:var(--color-success)]`});case"md":return T.jsx(Ja,{className:`${d} text-[color:var(--color-info)]/80`});case"css":case"scss":return T.jsx(Ja,{className:`${d} text-[color:var(--color-type-styles)]`});case"html":return T.jsx(Ja,{className:`${d} text-[color:var(--color-type-configuration)]`});default:return T.jsx(Ja,{className:`${d} text-muted-foreground`})}};return T.jsxs("div",{className:"flex items-center gap-2 py-1 px-2 hover:bg-muted/50 rounded",style:{paddingLeft:`${o+24}px`},children:[l(n.name),T.jsx("span",{className:"text-xs font-mono",children:n.name}),n.bundles&&n.bundles.length>0&&T.jsx("div",{className:"flex gap-1 ml-2",children:n.bundles.map(c=>T.jsx(kn,{variant:"outline",className:"text-xs px-1 py-0 h-4",children:c},c))}),n.size&&T.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:EB(n.size)})]})}function AB(){const[n,e]=N.useState(new Set([""])),{data:t,isLoading:s}=po({queryKey:["bundles"],queryFn:SB,refetchInterval:5e3}),r=d=>{const g=new Set(n);g.has(d)?g.delete(d):g.add(d),e(g)},o=()=>{if(!t)return;const d=Z1(t),g=new Set,_=x=>{var E;x.type==="directory"&&(g.add(x.path),(E=x.children)==null||E.forEach(_))};_(d),e(g)},l=()=>{e(new Set([""]))};if(s)return T.jsx("div",{children:"Loading file tree..."});if(!t)return T.jsx("div",{children:"No bundles found"});const c=Z1(t),f=t.reduce((d,g)=>d+g.files.length,0);return T.jsxs("div",{className:"space-y-4",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex gap-1",children:[T.jsx(Pn,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:o,children:"Expand All"}),T.jsx(Pn,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:l,children:"Collapse All"})]}),T.jsxs("div",{className:"text-xs text-muted-foreground font-thin",children:[f," files tracked"]})]}),T.jsx(yn,{className:"p-4",children:T.jsx("div",{className:"space-y-1 max-h-96 overflow-y-auto",children:c.children&&c.children.length>0?c.children.map(d=>T.jsx(mA,{node:d,level:0,expandedDirs:n,onToggleDir:r},d.path)):T.jsx("div",{className:"text-center text-muted-foreground py-8",children:"No files found"})})}),T.jsxs(yn,{className:"p-4",children:[T.jsx("h3",{className:"text-xs font-thin mb-2",children:"Bundle Legend"}),T.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(d=>T.jsxs(kn,{variant:"outline",children:[d.name," (",d.files.length,")"]},d.name))})]})]})}const RB=()=>T.jsxs(yn,{children:[T.jsxs(hs,{children:[T.jsxs(xs,{className:"flex items-center gap-2",children:[T.jsx(d3,{className:"w-4 h-4"}),"Project Files"]}),T.jsx("p",{className:"text-sm text-muted-foreground",children:"Browse and explore all files in your project with bundle information."})]}),T.jsx(Vn,{children:T.jsx(AB,{})})]});function yA({className:n,type:e,...t}){return T.jsx("input",{type:e,"data-slot":"input",className:zt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-thin disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n),...t})}const CB=async()=>{const n=await fetch("http://localhost:3333/api/bundles");if(!n.ok)throw new Error("Failed to fetch bundles");return n.json()},MB=async()=>{const n=await fetch("http://localhost:3333/api/files");if(!n.ok)throw new Error("Failed to fetch files");return(await n.json()).map(t=>t.path)};function NB(){const n=Xu(),[e,t]=N.useState(null),[s,r]=N.useState(new Set),[o,l]=N.useState(new Set),[c,f]=N.useState(null),[d,g]=N.useState(new Map),[_,x]=N.useState(!1);fP();const{data:E=[],isLoading:M,isFetching:A,dataUpdatedAt:R}=po({queryKey:["bundles"],queryFn:CB,refetchInterval:5e3,refetchOnWindowFocus:!0}),{data:k=[],isFetching:U,dataUpdatedAt:I}=po({queryKey:["allFiles"],queryFn:MB,refetchInterval:3e4,refetchOnWindowFocus:!0});N.useEffect(()=>{const W=Math.max(R,I);W>0&&f(new Date(W))},[R,I]),N.useEffect(()=>{const W=new WebSocket("ws://localhost:3333");return W.onopen=()=>{console.log("Bundle updates WebSocket connected")},W.onmessage=ee=>{try{const Q=JSON.parse(ee.data);switch(console.log("WebSocket message received:",Q),Q.type){case"bundle-sync-started":g(ge=>new Map(ge).set(Q.bundleName,{changed:!0,lastSync:new Date(Q.timestamp)})),Yn.info(`Syncing ${Q.bundleName}`);break;case"bundle-sync-completed":g(ge=>new Map(ge).set(Q.bundleName,{changed:!1,lastSync:new Date(Q.timestamp)})),Yn.success(`Synced ${Q.bundleName}`),n.invalidateQueries({queryKey:["bundles"]});break;case"bundle-sync-failed":g(ge=>new Map(ge).set(Q.bundleName,{changed:!0,lastSync:new Date(Q.timestamp)})),Yn.error(`Sync failed for ${Q.bundleName}`,Q.error);break;case"bundle-file-changed":g(ge=>new Map(ge).set(Q.bundleName,{changed:!0,lastSync:new Date(Q.timestamp)}));break}}catch(Q){console.error("Error parsing bundle update:",Q)}},W.onclose=()=>{console.log("Bundle updates WebSocket disconnected")},W.onerror=ee=>{console.error("Bundle updates WebSocket error:",ee)},()=>{W.close()}},[n]);const V=N.useCallback(W=>{t(e===W?null:W)},[e]),H=N.useMemo(()=>E.map(W=>{const ee=d.get(W.name);return{...W,changed:(ee==null?void 0:ee.changed)??W.changed,lastSync:ee==null?void 0:ee.lastSync}}),[E,d]);return M?T.jsx("div",{children:"Loading bundles..."}):E?T.jsxs("div",{className:"h-full flex flex-col relative",children:[T.jsxs(Zu,{defaultValue:"bundles",className:"w-full flex-1 flex flex-col min-h-0",children:[T.jsxs(Qu,{className:"grid w-full grid-cols-3 bg-background",children:[T.jsxs(Us,{value:"bundles",className:"flex items-center gap-2",children:[T.jsx(Ky,{className:"w-4 h-4 text-muted-foreground/75"}),"Bundles"]}),T.jsxs(Us,{value:"files",className:"flex items-center gap-2",children:[T.jsx(d3,{className:"w-4 h-4 text-muted-foreground/75"}),"Project Files"]}),T.jsxs(Us,{value:"analysis",className:"flex items-center gap-2",children:[T.jsx(m1,{className:"w-4 h-4 text-muted-foreground/75"}),"File Analysis"]})]}),T.jsx(Ys,{value:"bundles",className:"flex-1 overflow-y-auto",children:T.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:H&&Array.isArray(H)?H.map(W=>T.jsx(hP,{bundle:W,isSelected:e===W.name,onSelect:V,lastRefresh:c||void 0},W.name)):T.jsx("div",{children:"No bundles available"})})}),T.jsx(Ys,{value:"files",className:"space-y-4",children:T.jsx(RB,{})}),T.jsx(Ys,{value:"analysis",className:"space-y-4",children:T.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[T.jsx(m1,{className:"w-12 h-12 mx-auto mb-4 opacity-20"}),T.jsx("p",{className:"text-sm font-thin uppercase tracking-widest",children:"Semantic Analysis Active"}),T.jsx("p",{className:"text-xs mt-2 opacity-50",children:"Viewing automated context mapping..."})]})})]}),e&&(()=>{var ee;const W=E.find(Q=>Q.name===e);return W?T.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-10 z-50 bg-background flex flex-col",children:[T.jsxs("div",{className:"sticky top-0 bg-background border-b p-4 flex justify-between items-center flex-shrink-0",children:[T.jsxs("h3",{className:"font-thin text-sm flex items-center gap-2",children:[T.jsx(Ky,{className:"w-4 h-4 text-muted-foreground"}),e," Details"]}),T.jsx(Pn,{variant:"ghost",size:"sm",onClick:()=>t(null),children:T.jsx(_b,{className:"w-4 h-4"})})]}),T.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto p-6",children:T.jsxs("div",{className:"space-y-4",children:[T.jsx("h4",{className:"text-xs font-thin uppercase tracking-widest color-vesper-muted",children:"Included Files"}),T.jsx("ul",{className:"list-none pl-0 space-y-1",children:(ee=W.files)==null?void 0:ee.map(Q=>T.jsx("li",{className:"text-xs font-thin mono py-1 border-b border-vesper/50",children:Q},Q))})]})})]}):null})()]}):T.jsx("div",{children:"No bundles found"})}const OB=np("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function IB({className:n,variant:e,...t}){return T.jsx("div",{"data-slot":"alert",role:"alert",className:zt(OB({variant:e}),n),...t})}function kB({className:n,...e}){return T.jsx("div",{"data-slot":"alert-description",className:zt("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",n),...e})}const Q1=[{path:"/api/status",method:"GET",description:"Server status and health"},{path:"/api/bundles",method:"GET",description:"List all bundles"},{path:"/api/config",method:"GET",description:"Get bundle configuration"},{path:"/api/files",method:"GET",description:"Get file tree"},{path:"/api/semantic-chunks",method:"GET",description:"Get semantic analysis"},{path:"/api/vector-db/status",method:"GET",description:"Vector database status"},{path:"/api/mcp-status",method:"GET",description:"MCP server status"}],il=[{name:"list_bundles",description:"List all available file bundles",group:"Bundle Management"},{name:"get_bundle",description:"Get the content of a specific bundle",group:"Bundle Management"},{name:"generate_bundle",description:"Regenerate a specific bundle",group:"Bundle Management"},{name:"create_bundle",description:"Create a new bundle with specified patterns",group:"Bundle Management"},{name:"update_bundle",description:"Update an existing bundle's patterns",group:"Bundle Management"},{name:"delete_bundle",description:"Delete an existing bundle",group:"Bundle Management"},{name:"get_file_tree",description:"Get the project file tree",group:"Project Exploration"},{name:"get_project_status",description:"Get current project status and bundle information",group:"Project Exploration"},{name:"update_cntxignore",description:"Update the .cntxignore file with new ignore patterns",group:"Project Exploration"},{name:"get_semantic_chunks",description:"Get function-level semantic chunks from the codebase",group:"Semantic Analysis"},{name:"get_semantic_chunks_filtered",description:"Get semantic chunks filtered by purpose, type, complexity, or bundle",group:"Semantic Analysis"},{name:"analyze_bundle_suggestions",description:"Analyze codebase and suggest optimal bundle organization",group:"Semantic Analysis"},{name:"read_file",description:"Read contents of a specific file with bundle context and metadata",group:"File Operations"},{name:"write_file",description:"Write content to a file with validation and safety checks",group:"File Operations"}],PB=async()=>{const n=await fetch("http://localhost:3333/api/status");if(!n.ok)throw new Error("Failed to fetch server status");return n.json()},DB=async n=>{const e=Date.now();try{const t=await fetch(`http://localhost:3333${n.path}`),s=Date.now()-e;return t.ok?{...n,status:"success",responseTime:s}:{...n,status:"error",responseTime:s,error:`HTTP ${t.status}`}}catch(t){const s=Date.now()-e;return{...n,status:"error",responseTime:s,error:t instanceof Error?t.message:"Unknown error"}}},BB=async n=>{try{const e=await fetch("http://localhost:3333/api/mcp-status");return e.ok?(await e.json()).enabled?{...n,status:"available"}:{...n,status:"error",error:"MCP server not enabled"}:{...n,status:"error",error:"MCP status unavailable"}}catch(e){return{...n,status:"error",error:e instanceof Error?e.message:"Unknown error"}}};function UB(){var H,W,ee,Q,ge,Ne;const[n,e]=N.useState([]),[t,s]=N.useState([]),[r,o]=N.useState(!1),[l,c]=N.useState("All"),{data:f,isLoading:d,error:g,refetch:_}=po({queryKey:["server-status"],queryFn:PB,refetchInterval:5e3}),x=async()=>{o(!0);try{const ne=await Promise.all(Q1.map(ve=>DB(ve)));e(ne)}catch(ne){console.error("Failed to run endpoint tests:",ne)}finally{o(!1)}},E=async()=>{o(!0);try{const ne=await Promise.all(il.map(ve=>BB(ve)));s(ne)}catch(ne){console.error("Failed to run MCP tests:",ne)}finally{o(!1)}},M=ne=>{if(ne<60)return`${Math.floor(ne)}s`;if(ne<3600)return`${Math.floor(ne/60)}m ${Math.floor(ne%60)}s`;const ve=Math.floor(ne/3600),De=Math.floor(ne%3600/60);return`${ve}h ${De}m`},A=ne=>{const ve=ne/1024/1024;return`${Math.round(ve)}MB`},R=()=>["All",...new Set(il.map(ve=>ve.group))],k=()=>l==="All"?il:il.filter(ne=>ne.group===l),U=()=>k().reduce((De,be)=>(De[be.group]||(De[be.group]=[]),De[be.group].push(be),De),{}),I=(ne,ve)=>{var De,be,je,G,Ae;if(typeof ne=="string")return ne.length>100?ne.substring(0,100)+"...":ne;if(Array.isArray(ne))return`Array with ${ne.length} items`;if(typeof ne=="object"&&ne!==null){const pe=Object.keys(ne);if(ve.includes("/api/status"))return`Uptime: ${Math.floor(ne.uptime||0)}s, Memory: ${Math.round((((De=ne.memory)==null?void 0:De.heapUsed)||0)/1024/1024)}MB, Files: ${ne.totalFiles||0}`;if(ve.includes("/api/bundles"))return`${ne.length||pe.length} bundles found`;if(ve.includes("/api/semantic-chunks"))return`${((be=ne.chunks)==null?void 0:be.length)||0} chunks, ${((je=ne.summary)==null?void 0:je.totalFunctions)||0} functions`;if(ve.includes("/api/vector-db/status"))return`${((G=ne.stats)==null?void 0:G.totalChunks)||0} chunks indexed with ${((Ae=ne.stats)==null?void 0:Ae.modelName)||"unknown model"}`;const qe=pe.slice(0,3).map(K=>{const Te=ne[K];return typeof Te=="object"?`${K}: ${Array.isArray(Te)?`[${Te.length}]`:"{object}"}`:`${K}: ${String(Te).substring(0,20)}`}).join(", ");return pe.length>3?`${qe}... (+${pe.length-3} more)`:qe}return String(ne).substring(0,100)},V=async ne=>{const ve=Date.now();try{const De=await fetch(`http://localhost:3333${ne.path}`),be=Date.now()-ve;if(De.ok){const je=await De.json(),G=I(je,ne.path);Yn.success(`${ne.path} (${be}ms)`,G)}else Yn.error(`${ne.path} failed`,`HTTP ${De.status} (${be}ms)`)}catch(De){const be=Date.now()-ve;Yn.error(`${ne.path} error`,`${De instanceof Error?De.message:"Unknown error"} (${be}ms)`)}};return d?T.jsx(yn,{children:T.jsx(Vn,{className:"pt-6",children:T.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[T.jsx(Zy,{className:"w-4 h-4 animate-spin"}),"Checking system status..."]})})}):g?T.jsx(yn,{children:T.jsx(Vn,{className:"p-4",children:T.jsxs("div",{className:"text-center space-y-2",children:[T.jsx(fu,{className:"h-6 w-6 mx-auto text-red-500"}),T.jsx("p",{className:"text-sm font-medium",children:"Failed to connect to server"}),T.jsx("p",{className:"text-xs text-muted-foreground",children:"Make sure the cntx-ui server is running on localhost:3333"}),T.jsxs(Pn,{variant:"outline",size:"sm",onClick:()=>_(),children:[T.jsx(Zy,{className:"w-4 h-4 mr-2"}),"Retry"]})]})})}):T.jsxs("div",{className:"space-y-4",children:[T.jsxs(yn,{children:[T.jsx(hs,{children:T.jsxs(xs,{className:"flex items-center gap-2",children:[T.jsx(Ak,{className:"w-5 h-5"}),"Server Status",T.jsx(gl,{className:"w-4 h-4 text-green-600"})]})}),T.jsxs(Vn,{children:[T.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[T.jsxs("div",{children:[T.jsx("div",{className:"text-muted-foreground",children:"Uptime"}),T.jsx("div",{className:"font-medium",children:M((f==null?void 0:f.uptime)||0)})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-muted-foreground",children:"Memory"}),T.jsx("div",{className:"font-medium",children:A(((H=f==null?void 0:f.memory)==null?void 0:H.heapUsed)||0)})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-muted-foreground",children:"Total Files"}),T.jsx("div",{className:"font-medium",children:(f==null?void 0:f.totalFiles)||0})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-muted-foreground",children:"Bundles"}),T.jsx("div",{className:"font-medium",children:((W=f==null?void 0:f.bundles)==null?void 0:W.length)||0})]})]}),T.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[T.jsx(kn,{variant:f!=null&&f.scanning?"destructive":"secondary",children:f!=null&&f.scanning?"Scanning":"Idle"}),T.jsxs(kn,{variant:(ee=f==null?void 0:f.mcp)!=null&&ee.enabled?"default":"secondary",children:["MCP: ",(Q=f==null?void 0:f.mcp)!=null&&Q.enabled?"Enabled":"Disabled"]})]})]})]}),T.jsxs(Zu,{defaultValue:"endpoints",className:"w-full",children:[T.jsxs(Qu,{className:"grid w-full grid-cols-3",children:[T.jsxs(Us,{value:"endpoints",className:"flex items-center gap-2",children:[T.jsx(mb,{className:"w-4 h-4"}),"API Endpoints"]}),T.jsxs(Us,{value:"mcp",className:"flex items-center gap-2",children:[T.jsx(bb,{className:"w-4 h-4"}),"MCP Tools"]}),T.jsxs(Us,{value:"bundle-sync",className:"flex items-center gap-2",children:[T.jsx(id,{className:"w-4 h-4"}),"Bundle Sync"]})]}),T.jsx(Ys,{value:"endpoints",className:"space-y-4",children:T.jsxs(yn,{children:[T.jsx(hs,{children:T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(xs,{className:"text-lg",children:"API Endpoints"}),T.jsxs(Pn,{onClick:x,disabled:r,size:"sm",variant:"outline",children:[T.jsx(_1,{className:"w-4 h-4 mr-2"}),r?"Testing...":"Test All"]})]})}),T.jsx(Vn,{children:T.jsx("div",{className:"space-y-2",children:Q1.map(ne=>{const ve=n.find(De=>De.path===ne.path);return T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-muted/30 rounded-lg",children:[T.jsxs("div",{className:"flex-1",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(kn,{variant:"outline",className:"text-xs",children:ne.method}),T.jsx("code",{className:"text-sm",children:ne.path})]}),T.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:ne.description})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(Pn,{variant:"ghost",size:"sm",onClick:()=>V(ne),className:"h-7 w-7 p-0",title:`Test ${ne.path}`,children:T.jsx(c3,{className:"w-3 h-3"})}),ve&&T.jsxs(T.Fragment,{children:[T.jsxs("span",{className:"text-xs text-muted-foreground",children:[ve.responseTime,"ms"]}),ve.status==="success"?T.jsx(gl,{className:"w-4 h-4 text-green-600"}):ve.status==="error"?T.jsx("div",{title:ve.error,children:T.jsx(fu,{className:"w-4 h-4 text-red-600"})}):T.jsx("div",{className:"w-4 h-4 bg-gray-300 rounded-full"})]})]})]},ne.path)})})})]})}),T.jsx(Ys,{value:"mcp",className:"space-y-4",children:T.jsxs(yn,{children:[T.jsx(hs,{children:T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(xs,{className:"text-lg",children:"MCP Tools"}),T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs(nA,{value:l,onValueChange:c,children:[T.jsx(Pb,{className:"w-48",children:T.jsx(sA,{placeholder:"Filter by group"})}),T.jsx(Db,{children:R().map(ne=>T.jsxs(ml,{value:ne,children:[ne," ",ne==="All"?`(${il.length})`:`(${il.filter(ve=>ve.group===ne).length})`]},ne))})]}),T.jsxs(Pn,{onClick:E,disabled:r||!((ge=f==null?void 0:f.mcp)!=null&&ge.enabled),size:"sm",variant:"outline",children:[T.jsx(_1,{className:"w-4 h-4 mr-2"}),r?"Testing...":"Test All"]})]})]})}),T.jsxs(Vn,{children:[!((Ne=f==null?void 0:f.mcp)!=null&&Ne.enabled)&&T.jsxs(IB,{className:"mb-4",children:[T.jsx(id,{className:"w-4 h-4"}),T.jsx(kB,{children:"MCP server is not enabled. MCP tools will not be available."})]}),T.jsx("div",{className:"space-y-4",children:l==="All"?Object.entries(U()).map(([ne,ve])=>T.jsxs("div",{className:"space-y-2",children:[T.jsxs("div",{className:"flex items-center gap-2 pb-2 border-b",children:[T.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:ne}),T.jsxs(kn,{variant:"outline",className:"text-xs",children:[ve.length," tools"]})]}),T.jsx("div",{className:"space-y-2",children:ve.map(De=>{const be=t.find(je=>je.name===De.name);return T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-muted/30 rounded-lg",children:[T.jsxs("div",{className:"flex-1",children:[T.jsx("div",{className:"font-medium text-sm",children:De.name}),T.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:De.description})]}),T.jsx("div",{className:"flex items-center gap-2",children:be?be.status==="available"?T.jsx(gl,{className:"w-4 h-4 text-green-600"}):T.jsx("div",{title:be.error,children:T.jsx(fu,{className:"w-4 h-4 text-red-600"})}):T.jsx("div",{className:"w-4 h-4 bg-gray-300 rounded-full"})})]},De.name)})})]},ne)):T.jsx("div",{className:"space-y-2",children:k().map(ne=>{const ve=t.find(De=>De.name===ne.name);return T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-muted/30 rounded-lg",children:[T.jsxs("div",{className:"flex-1",children:[T.jsx("div",{className:"font-medium text-sm",children:ne.name}),T.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:ne.description})]}),T.jsx("div",{className:"flex items-center gap-2",children:ve?ve.status==="available"?T.jsx(gl,{className:"w-4 h-4 text-green-600"}):T.jsx("div",{title:ve.error,children:T.jsx(fu,{className:"w-4 h-4 text-red-600"})}):T.jsx("div",{className:"w-4 h-4 bg-gray-300 rounded-full"})})]},ne.name)})})})]})]})})]})]})}function FB(){const[n,e]=N.useState(""),[t,s]=N.useState(null),[r,o]=N.useState(!1),{data:l,isLoading:c}=po({queryKey:["initial-chunks"],queryFn:async()=>(await(await fetch("http://localhost:3333/api/semantic-chunks")).json()).chunks}),f=async _=>{if(_.preventDefault(),!n.trim()){s(null);return}o(!0);try{const x=await fetch("http://localhost:3333/api/semantic-search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n,limit:15})});if(x.ok){const E=await x.json();s(E.results)}}catch{Yn.error("Semantic search failed")}finally{o(!1)}},d=t||l||[],g=async(_,x)=>{try{await fetch("http://localhost:3333/api/open-file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:_,line:x})}),Yn.success(`Opening ${_}`)}catch{Yn.error("Failed to open editor")}};return T.jsxs("div",{className:"space-y-6",children:[T.jsxs("header",{className:"flex flex-col gap-4",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsxs("h1",{className:"text-lg font-thin tracking-tight flex items-center gap-2",children:[T.jsx(qI,{className:"w-4 h-4 text-vesper-accent"}),"Repository Intelligence"]}),T.jsx("p",{className:"text-xs text-muted-foreground font-thin",children:"Surgical code chunks indexed for agents"})]}),T.jsxs(kn,{variant:"outline",className:"border-vesper font-thin text-[10px] uppercase tracking-widest",children:[(l==null?void 0:l.length)||0," Chunks Indexed"]})]}),T.jsxs("form",{onSubmit:f,className:"relative max-w-2xl",children:[T.jsx(f3,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),T.jsx(yA,{value:n,onChange:_=>e(_.target.value),placeholder:"Search code by meaning (e.g. 'handle file exports' or 'react components')",className:"pl-10 bg-vesper-card border-vesper text-sm h-10"}),r&&T.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:T.jsx(bb,{className:"w-3 h-3 animate-pulse text-vesper-accent"})})]})]}),c?T.jsxs("div",{className:"flex flex-col items-center justify-center py-20 opacity-50",children:[T.jsx(NI,{className:"w-10 h-10 animate-pulse mb-4 text-vesper-accent"}),T.jsx("span",{className:"text-xs font-thin tracking-widest uppercase",children:"Analyzing Codebase Intelligence..."})]}):T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(_=>{var x;return T.jsxs(yn,{className:"border-vesper bg-vesper-card hover:border-vesper-accent transition-all group",children:[T.jsx(hs,{className:"pb-3",children:T.jsxs("div",{className:"flex items-start justify-between",children:[T.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[T.jsx(yb,{className:"w-4 h-4 text-muted-foreground mt-1"}),T.jsxs("div",{className:"min-w-0",children:[T.jsx(xs,{className:"text-sm font-bold truncate color-vesper-fg",children:_.name}),T.jsx("div",{className:"text-[10px] mono color-vesper-muted truncate mt-0.5",children:_.filePath})]})]}),T.jsx("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:T.jsx(Pn,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>g(_.filePath,_.startLine),children:T.jsx(l3,{className:"w-3 h-3"})})})]})}),T.jsxs(Vn,{className:"space-y-3",children:[T.jsxs("p",{className:"text-[11px] color-vesper-fg line-clamp-2 italic leading-relaxed",children:['"',_.purpose,'"']}),T.jsxs("div",{className:"flex flex-wrap gap-2",children:[T.jsx(kn,{variant:"outline",className:"text-[9px] font-thin uppercase border-vesper color-vesper-muted px-1.5 h-4",children:_.subtype||_.type}),T.jsxs(kn,{variant:"outline",className:"text-[9px] font-thin uppercase border-vesper color-vesper-muted px-1.5 h-4",children:["Complexity: ",((x=_.complexity)==null?void 0:x.score)||0]}),_.similarity&&T.jsxs(kn,{variant:"outline",className:"text-[9px] font-thin uppercase border-vesper-accent color-vesper-accent px-1.5 h-4",children:["Match: ",Math.round(_.similarity*100),"%"]})]})]})]},_.id)})})]})}function G1(){const{theme:n,setTheme:e}=k4();return T.jsxs(Pn,{variant:"ghost",size:"sm",onClick:()=>e(n==="light"?"dark":"light"),className:"h-8 w-8 p-0",children:[T.jsx(Ok,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),T.jsx(gk,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),T.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function hd(n,e){if(!n)throw new Error(e||"loader assertion failed.")}const jb=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),J1=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);J1&&parseFloat(J1[1]);const Ch=globalThis,ol=globalThis.process||{},jB=globalThis.navigator||{};function _A(n){var s,r;if(typeof window<"u"&&((s=window.process)==null?void 0:s.type)==="renderer"||typeof process<"u"&&((r=process.versions)!=null&&r.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function ga(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||_A()}function LB(n){return ga()?_A()?"Electron":(jB.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const bA="4.1.0";function zB(n){try{const e=window[n],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}class VB{constructor(e,t,s="sessionStorage"){this.storage=zB(s),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function $B(n){let e;return n<10?e=`${n.toFixed(2)}ms`:n<100?e=`${n.toFixed(1)}ms`:n<1e3?e=`${n.toFixed(0)}ms`:e=`${(n/1e3).toFixed(2)}s`,e}function HB(n,e=8){const t=Math.max(e-n.length,0);return`${" ".repeat(t)}${n}`}var dd;(function(n){n[n.BLACK=30]="BLACK",n[n.RED=31]="RED",n[n.GREEN=32]="GREEN",n[n.YELLOW=33]="YELLOW",n[n.BLUE=34]="BLUE",n[n.MAGENTA=35]="MAGENTA",n[n.CYAN=36]="CYAN",n[n.WHITE=37]="WHITE",n[n.BRIGHT_BLACK=90]="BRIGHT_BLACK",n[n.BRIGHT_RED=91]="BRIGHT_RED",n[n.BRIGHT_GREEN=92]="BRIGHT_GREEN",n[n.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",n[n.BRIGHT_BLUE=94]="BRIGHT_BLUE",n[n.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",n[n.BRIGHT_CYAN=96]="BRIGHT_CYAN",n[n.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(dd||(dd={}));const WB=10;function e2(n){return typeof n!="string"?n:(n=n.toUpperCase(),dd[n]||dd.WHITE)}function XB(n,e,t){return!ga&&typeof n=="string"&&(e&&(n=`\x1B[${e2(e)}m${n}\x1B[39m`),t&&(n=`\x1B[${e2(t)+WB}m${n}\x1B[49m`)),n}function qB(n,e=["constructor"]){const t=Object.getPrototypeOf(n),s=Object.getOwnPropertyNames(t),r=n;for(const o of s){const l=r[o];typeof l=="function"&&(e.find(c=>o===c)||(r[o]=l.bind(n)))}}function Lb(n,e){if(!n)throw new Error("Assertion failed")}function al(){var e,t,s;let n;if(ga()&&Ch.performance)n=(t=(e=Ch==null?void 0:Ch.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in ol){const r=(s=ol==null?void 0:ol.hrtime)==null?void 0:s.call(ol);n=r[0]*1e3+r[1]/1e6}else n=Date.now();return n}const ll={debug:ga()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},YB={enabled:!0,level:0};function cl(){}const t2={},n2={once:!0};class Ju{constructor({id:e}={id:""}){this.VERSION=bA,this._startTs=al(),this._deltaTs=al(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new VB(`__probe-${this.id}__`,YB),this.timeStamp(`${this.id} started`),qB(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((al()-this._startTs).toPrecision(10))}getDelta(){return Number((al()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,ll.warn,arguments,n2)}error(e){return this._getLogFunction(0,e,ll.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,ll.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,ll.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,ll.debug||ll.info,arguments,n2)}table(e,t,s){return t?this._getLogFunction(e,t,console.table||cl,s&&[s],{tag:ZB(t)}):cl}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||cl)}group(e,t,s={collapsed:!1}){const r=s2({logLevel:e,message:t,opts:s}),{collapsed:o}=s;return r.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(e,t,s={}){return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||cl)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=vA(e)}_getLogFunction(e,t,s,r,o){if(this._shouldLog(e)){o=s2({logLevel:e,message:t,args:r,opts:o}),s=s||o.method,Lb(s),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=al();const l=o.tag||o.message;if(o.once&&l)if(!t2[l])t2[l]=al();else return cl;return t=KB(this.id,o.message,o),s.bind(console,t,...o.args)}return cl}}Ju.VERSION=bA;function vA(n){if(!n)return 0;let e;switch(typeof n){case"number":e=n;break;case"object":e=n.logLevel||n.priority||0;break;default:return 0}return Lb(Number.isFinite(e)&&e>=0),e}function s2(n){const{logLevel:e,message:t}=n;n.logLevel=vA(e);const s=n.args?Array.from(n.args):[];for(;s.length&&s.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&s.unshift(t),n.message=e;break;case"object":Object.assign(n,e);break}typeof n.message=="function"&&(n.message=n.message());const r=typeof n.message;return Lb(r==="string"||r==="object"),Object.assign(n,{args:s},n.opts)}function KB(n,e,t){if(typeof e=="string"){const s=t.time?HB($B(t.total)):"";e=t.time?`${n}: ${s} ${e}`:`${n}: ${e}`,e=XB(e,t.color,t.background)}return e}function ZB(n){for(const e in n)for(const t in n[e])return t||"untitled";return"empty"}const Gm="4.3.3",QB=Gm[0]>="0"&&Gm[0]<="9"?`v${Gm}`:"";function GB(){const n=new Ju({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=n,globalThis.loaders.version=QB,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=n,n}const JB=GB();function eU(n,e){return wA(n||{},e)}function wA(n,e,t=0){if(t>3)return e;const s={...n};for(const[r,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?s[r]=wA(s[r]||{},e[r],t+1):s[r]=e[r];return s}const tU="latest";function nU(){var n;return(n=globalThis._loadersgl_)!=null&&n.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.3"),globalThis._loadersgl_.version}const sU=nU();function yo(n,e){if(!n)throw new Error(e||"loaders.gl assertion failed.")}const ta=typeof process!="object"||String(process)!=="[object process]"||process.browser,rU=typeof window<"u"&&typeof window.orientation<"u",r2=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);r2&&parseFloat(r2[1]);class iU{constructor(e,t){D(this,"name");D(this,"workerThread");D(this,"isRunning",!0);D(this,"result");D(this,"_resolve",()=>{});D(this,"_reject",()=>{});this.name=e,this.workerThread=t,this.result=new Promise((s,r)=>{this._resolve=s,this._reject=r})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){yo(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){yo(this.isRunning),this.isRunning=!1,this._reject(e)}}class Jm{terminate(){}}const ey=new Map;function oU(n){yo(n.source&&!n.url||!n.source&&n.url);let e=ey.get(n.source||n.url);return e||(n.url&&(e=aU(n.url),ey.set(n.url,e)),n.source&&(e=xA(n.source),ey.set(n.source,e))),yo(e),e}function aU(n){if(!n.startsWith("http"))return n;const e=lU(n);return xA(e)}function xA(n){const e=new Blob([n],{type:"application/javascript"});return URL.createObjectURL(e)}function lU(n){return`try {
334
+ `)},m6=0,sl=[];function y6(n){var e=N.useRef([]),t=N.useRef([0,0]),s=N.useRef(),r=N.useState(m6++)[0],o=N.useState(vE)[0],l=N.useRef(n);N.useEffect(function(){l.current=n},[n]),N.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(r));var A=FD([n.lockRef.current],(n.shards||[]).map(H1),!0).filter(Boolean);return A.forEach(function(R){return R.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),A.forEach(function(R){return R.classList.remove("allow-interactivity-".concat(r))})}}},[n.inert,n.lockRef.current,n.shards]);var c=N.useCallback(function(A,R){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!l.current.allowPinchZoom;var k=Ah(A),U=t.current,I="deltaX"in A?A.deltaX:U[0]-k[0],V="deltaY"in A?A.deltaY:U[1]-k[1],H,W=A.target,ee=Math.abs(I)>Math.abs(V)?"h":"v";if("touches"in A&&ee==="h"&&W.type==="range")return!1;var Q=V1(ee,W);if(!Q)return!0;if(Q?H=ee:(H=ee==="v"?"h":"v",Q=V1(ee,W)),!Q)return!1;if(!s.current&&"changedTouches"in A&&(I||V)&&(s.current=H),!H)return!0;var ge=s.current||H;return d6(ge,R,A,ge==="h"?I:V)},[]),f=N.useCallback(function(A){var R=A;if(!(!sl.length||sl[sl.length-1]!==o)){var k="deltaY"in R?$1(R):Ah(R),U=e.current.filter(function(H){return H.name===R.type&&(H.target===R.target||R.target===H.shadowParent)&&p6(H.delta,k)})[0];if(U&&U.should){R.cancelable&&R.preventDefault();return}if(!U){var I=(l.current.shards||[]).map(H1).filter(Boolean).filter(function(H){return H.contains(R.target)}),V=I.length>0?c(R,I[0]):!l.current.noIsolation;V&&R.cancelable&&R.preventDefault()}}},[]),d=N.useCallback(function(A,R,k,U){var I={name:A,delta:R,target:k,should:U,shadowParent:_6(k)};e.current.push(I),setTimeout(function(){e.current=e.current.filter(function(V){return V!==I})},1)},[]),g=N.useCallback(function(A){t.current=Ah(A),s.current=void 0},[]),_=N.useCallback(function(A){d(A.type,$1(A),A.target,c(A,n.lockRef.current))},[]),x=N.useCallback(function(A){d(A.type,Ah(A),A.target,c(A,n.lockRef.current))},[]);N.useEffect(function(){return sl.push(o),n.setCallbacks({onScrollCapture:_,onWheelCapture:_,onTouchMoveCapture:x}),document.addEventListener("wheel",f,nl),document.addEventListener("touchmove",f,nl),document.addEventListener("touchstart",g,nl),function(){sl=sl.filter(function(A){return A!==o}),document.removeEventListener("wheel",f,nl),document.removeEventListener("touchmove",f,nl),document.removeEventListener("touchstart",g,nl)}},[]);var E=n.removeScrollBar,M=n.inert;return N.createElement(N.Fragment,null,M?N.createElement(o,{styles:g6(r)}):null,E?N.createElement(o6,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function _6(n){for(var e=null;n!==null;)n instanceof ShadowRoot&&(e=n.host,n=n.host),n=n.parentNode;return e}const b6=qD(bE,y6);var SE=N.forwardRef(function(n,e){return N.createElement(ap,Nr({},n,{ref:e,sideCar:b6}))});SE.classNames=ap.classNames;var v6=[" ","Enter","ArrowUp","ArrowDown"],w6=[" ","Enter"],ca="Select",[lp,cp,x6]=lb(ca),[oc]=tc(ca,[x6,aE]),up=aE(),[T6,_o]=oc(ca),[S6,E6]=oc(ca),EE=n=>{const{__scopeSelect:e,children:t,open:s,defaultOpen:r,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:d,name:g,autoComplete:_,disabled:x,required:E,form:M}=n,A=up(e),[R,k]=N.useState(null),[U,I]=N.useState(null),[V,H]=N.useState(!1),W=xb(d),[ee,Q]=ku({prop:s,defaultProp:r??!1,onChange:o,caller:ca}),[ge,Ne]=ku({prop:l,defaultProp:c,onChange:f,caller:ca}),ne=N.useRef(null),ve=R?M||!!R.closest("form"):!0,[De,be]=N.useState(new Set),je=Array.from(De).map(G=>G.props.value).join(";");return T.jsx(MD,{...A,children:T.jsxs(T6,{required:E,scope:e,trigger:R,onTriggerChange:k,valueNode:U,onValueNodeChange:I,valueNodeHasChildren:V,onValueNodeHasChildrenChange:H,contentId:Yu(),value:ge,onValueChange:Ne,open:ee,onOpenChange:Q,dir:W,triggerPointerDownPosRef:ne,disabled:x,children:[T.jsx(lp.Provider,{scope:e,children:T.jsx(S6,{scope:n.__scopeSelect,onNativeOptionAdd:N.useCallback(G=>{be(Ae=>new Set(Ae).add(G))},[]),onNativeOptionRemove:N.useCallback(G=>{be(Ae=>{const pe=new Set(Ae);return pe.delete(G),pe})},[]),children:t})}),ve?T.jsxs(qE,{"aria-hidden":!0,required:E,tabIndex:-1,name:g,autoComplete:_,value:ge,onChange:G=>Ne(G.target.value),disabled:x,form:M,children:[ge===void 0?T.jsx("option",{value:""}):null,Array.from(De)]},je):null]})})};EE.displayName=ca;var AE="SelectTrigger",RE=N.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:s=!1,...r}=n,o=up(t),l=_o(AE,t),c=l.disabled||s,f=_n(e,l.onTriggerChange),d=cp(t),g=N.useRef("touch"),[_,x,E]=KE(A=>{const R=d().filter(I=>!I.disabled),k=R.find(I=>I.value===l.value),U=ZE(R,A,k);U!==void 0&&l.onValueChange(U.value)}),M=A=>{c||(l.onOpenChange(!0),E()),A&&(l.triggerPointerDownPosRef.current={x:Math.round(A.pageX),y:Math.round(A.pageY)})};return T.jsx(ND,{asChild:!0,...o,children:T.jsx(Rt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":YE(l.value)?"":void 0,...r,ref:f,onClick:vt(r.onClick,A=>{A.currentTarget.focus(),g.current!=="mouse"&&M(A)}),onPointerDown:vt(r.onPointerDown,A=>{g.current=A.pointerType;const R=A.target;R.hasPointerCapture(A.pointerId)&&R.releasePointerCapture(A.pointerId),A.button===0&&A.ctrlKey===!1&&A.pointerType==="mouse"&&(M(A),A.preventDefault())}),onKeyDown:vt(r.onKeyDown,A=>{const R=_.current!=="";!(A.ctrlKey||A.altKey||A.metaKey)&&A.key.length===1&&x(A.key),!(R&&A.key===" ")&&v6.includes(A.key)&&(M(),A.preventDefault())})})})});RE.displayName=AE;var CE="SelectValue",ME=N.forwardRef((n,e)=>{const{__scopeSelect:t,className:s,style:r,children:o,placeholder:l="",...c}=n,f=_o(CE,t),{onValueNodeHasChildrenChange:d}=f,g=o!==void 0,_=_n(e,f.onValueNodeChange);return Kn(()=>{d(g)},[d,g]),T.jsx(Rt.span,{...c,ref:_,style:{pointerEvents:"none"},children:YE(f.value)?T.jsx(T.Fragment,{children:l}):o})});ME.displayName=CE;var A6="SelectIcon",NE=N.forwardRef((n,e)=>{const{__scopeSelect:t,children:s,...r}=n;return T.jsx(Rt.span,{"aria-hidden":!0,...r,ref:e,children:s||"▼"})});NE.displayName=A6;var R6="SelectPortal",OE=n=>T.jsx(ub,{asChild:!0,...n});OE.displayName=R6;var ua="SelectContent",IE=N.forwardRef((n,e)=>{const t=_o(ua,n.__scopeSelect),[s,r]=N.useState();if(Kn(()=>{r(new DocumentFragment)},[]),!t.open){const o=s;return o?ec.createPortal(T.jsx(kE,{scope:n.__scopeSelect,children:T.jsx(lp.Slot,{scope:n.__scopeSelect,children:T.jsx("div",{children:n.children})})}),o):null}return T.jsx(PE,{...n,ref:e})});IE.displayName=ua;var lr=10,[kE,bo]=oc(ua),C6="SelectContentImpl",M6=Iu("SelectContent.RemoveScroll"),PE=N.forwardRef((n,e)=>{const{__scopeSelect:t,position:s="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:d,alignOffset:g,arrowPadding:_,collisionBoundary:x,collisionPadding:E,sticky:M,hideWhenDetached:A,avoidCollisions:R,...k}=n,U=_o(ua,t),[I,V]=N.useState(null),[H,W]=N.useState(null),ee=_n(e,xe=>V(xe)),[Q,ge]=N.useState(null),[Ne,ne]=N.useState(null),ve=cp(t),[De,be]=N.useState(!1),je=N.useRef(!1);N.useEffect(()=>{if(I)return UD(I)},[I]),dP();const G=N.useCallback(xe=>{const[Ue,...et]=ve().map(at=>at.ref.current),[Ge]=et.slice(-1),ot=document.activeElement;for(const at of xe)if(at===ot||(at==null||at.scrollIntoView({block:"nearest"}),at===Ue&&H&&(H.scrollTop=0),at===Ge&&H&&(H.scrollTop=H.scrollHeight),at==null||at.focus(),document.activeElement!==ot))return},[ve,H]),Ae=N.useCallback(()=>G([Q,I]),[G,Q,I]);N.useEffect(()=>{De&&Ae()},[De,Ae]);const{onOpenChange:pe,triggerPointerDownPosRef:qe}=U;N.useEffect(()=>{if(I){let xe={x:0,y:0};const Ue=Ge=>{var ot,at;xe={x:Math.abs(Math.round(Ge.pageX)-(((ot=qe.current)==null?void 0:ot.x)??0)),y:Math.abs(Math.round(Ge.pageY)-(((at=qe.current)==null?void 0:at.y)??0))}},et=Ge=>{xe.x<=10&&xe.y<=10?Ge.preventDefault():I.contains(Ge.target)||pe(!1),document.removeEventListener("pointermove",Ue),qe.current=null};return qe.current!==null&&(document.addEventListener("pointermove",Ue),document.addEventListener("pointerup",et,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ue),document.removeEventListener("pointerup",et,{capture:!0})}}},[I,pe,qe]),N.useEffect(()=>{const xe=()=>pe(!1);return window.addEventListener("blur",xe),window.addEventListener("resize",xe),()=>{window.removeEventListener("blur",xe),window.removeEventListener("resize",xe)}},[pe]);const[K,Te]=KE(xe=>{const Ue=ve().filter(ot=>!ot.disabled),et=Ue.find(ot=>ot.ref.current===document.activeElement),Ge=ZE(Ue,xe,et);Ge&&setTimeout(()=>Ge.ref.current.focus())}),Se=N.useCallback((xe,Ue,et)=>{const Ge=!je.current&&!et;(U.value!==void 0&&U.value===Ue||Ge)&&(ge(xe),Ge&&(je.current=!0))},[U.value]),he=N.useCallback(()=>I==null?void 0:I.focus(),[I]),Ce=N.useCallback((xe,Ue,et)=>{const Ge=!je.current&&!et;(U.value!==void 0&&U.value===Ue||Ge)&&ne(xe)},[U.value]),fe=s==="popper"?i_:DE,Pe=fe===i_?{side:c,sideOffset:f,align:d,alignOffset:g,arrowPadding:_,collisionBoundary:x,collisionPadding:E,sticky:M,hideWhenDetached:A,avoidCollisions:R}:{};return T.jsx(kE,{scope:t,content:I,viewport:H,onViewportChange:W,itemRefCallback:Se,selectedItem:Q,onItemLeave:he,itemTextRefCallback:Ce,focusSelectedItem:Ae,selectedItemText:Ne,position:s,isPositioned:De,searchRef:K,children:T.jsx(SE,{as:M6,allowPinchZoom:!0,children:T.jsx(q3,{asChild:!0,trapped:U.open,onMountAutoFocus:xe=>{xe.preventDefault()},onUnmountAutoFocus:vt(r,xe=>{var Ue;(Ue=U.trigger)==null||Ue.focus({preventScroll:!0}),xe.preventDefault()}),children:T.jsx(cb,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:xe=>xe.preventDefault(),onDismiss:()=>U.onOpenChange(!1),children:T.jsx(fe,{role:"listbox",id:U.contentId,"data-state":U.open?"open":"closed",dir:U.dir,onContextMenu:xe=>xe.preventDefault(),...k,...Pe,onPlaced:()=>be(!0),ref:ee,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:vt(k.onKeyDown,xe=>{const Ue=xe.ctrlKey||xe.altKey||xe.metaKey;if(xe.key==="Tab"&&xe.preventDefault(),!Ue&&xe.key.length===1&&Te(xe.key),["ArrowUp","ArrowDown","Home","End"].includes(xe.key)){let Ge=ve().filter(ot=>!ot.disabled).map(ot=>ot.ref.current);if(["ArrowUp","End"].includes(xe.key)&&(Ge=Ge.slice().reverse()),["ArrowUp","ArrowDown"].includes(xe.key)){const ot=xe.target,at=Ge.indexOf(ot);Ge=Ge.slice(at+1)}setTimeout(()=>G(Ge)),xe.preventDefault()}})})})})})})});PE.displayName=C6;var N6="SelectItemAlignedPosition",DE=N.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:s,...r}=n,o=_o(ua,t),l=bo(ua,t),[c,f]=N.useState(null),[d,g]=N.useState(null),_=_n(e,ee=>g(ee)),x=cp(t),E=N.useRef(!1),M=N.useRef(!0),{viewport:A,selectedItem:R,selectedItemText:k,focusSelectedItem:U}=l,I=N.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&d&&A&&R&&k){const ee=o.trigger.getBoundingClientRect(),Q=d.getBoundingClientRect(),ge=o.valueNode.getBoundingClientRect(),Ne=k.getBoundingClientRect();if(o.dir!=="rtl"){const ot=Ne.left-Q.left,at=ge.left-ot,dt=ee.left-at,Vt=ee.width+dt,Dn=Math.max(Vt,Q.width),ds=window.innerWidth-lr,an=A1(at,[lr,Math.max(lr,ds-Dn)]);c.style.minWidth=Vt+"px",c.style.left=an+"px"}else{const ot=Q.right-Ne.right,at=window.innerWidth-ge.right-ot,dt=window.innerWidth-ee.right-at,Vt=ee.width+dt,Dn=Math.max(Vt,Q.width),ds=window.innerWidth-lr,an=A1(at,[lr,Math.max(lr,ds-Dn)]);c.style.minWidth=Vt+"px",c.style.right=an+"px"}const ne=x(),ve=window.innerHeight-lr*2,De=A.scrollHeight,be=window.getComputedStyle(d),je=parseInt(be.borderTopWidth,10),G=parseInt(be.paddingTop,10),Ae=parseInt(be.borderBottomWidth,10),pe=parseInt(be.paddingBottom,10),qe=je+G+De+pe+Ae,K=Math.min(R.offsetHeight*5,qe),Te=window.getComputedStyle(A),Se=parseInt(Te.paddingTop,10),he=parseInt(Te.paddingBottom,10),Ce=ee.top+ee.height/2-lr,fe=ve-Ce,Pe=R.offsetHeight/2,xe=R.offsetTop+Pe,Ue=je+G+xe,et=qe-Ue;if(Ue<=Ce){const ot=ne.length>0&&R===ne[ne.length-1].ref.current;c.style.bottom="0px";const at=d.clientHeight-A.offsetTop-A.offsetHeight,dt=Math.max(fe,Pe+(ot?he:0)+at+Ae),Vt=Ue+dt;c.style.height=Vt+"px"}else{const ot=ne.length>0&&R===ne[0].ref.current;c.style.top="0px";const dt=Math.max(Ce,je+A.offsetTop+(ot?Se:0)+Pe)+et;c.style.height=dt+"px",A.scrollTop=Ue-Ce+A.offsetTop}c.style.margin=`${lr}px 0`,c.style.minHeight=K+"px",c.style.maxHeight=ve+"px",s==null||s(),requestAnimationFrame(()=>E.current=!0)}},[x,o.trigger,o.valueNode,c,d,A,R,k,o.dir,s]);Kn(()=>I(),[I]);const[V,H]=N.useState();Kn(()=>{d&&H(window.getComputedStyle(d).zIndex)},[d]);const W=N.useCallback(ee=>{ee&&M.current===!0&&(I(),U==null||U(),M.current=!1)},[I,U]);return T.jsx(I6,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:E,onScrollButtonChange:W,children:T.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:V},children:T.jsx(Rt.div,{...r,ref:_,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});DE.displayName=N6;var O6="SelectPopperPosition",i_=N.forwardRef((n,e)=>{const{__scopeSelect:t,align:s="start",collisionPadding:r=lr,...o}=n,l=up(t);return T.jsx(OD,{...l,...o,ref:e,align:s,collisionPadding:r,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});i_.displayName=O6;var[I6,kb]=oc(ua,{}),o_="SelectViewport",BE=N.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:s,...r}=n,o=bo(o_,t),l=kb(o_,t),c=_n(e,o.onViewportChange),f=N.useRef(0);return T.jsxs(T.Fragment,{children:[T.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),T.jsx(lp.Slot,{scope:t,children:T.jsx(Rt.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:vt(r.onScroll,d=>{const g=d.currentTarget,{contentWrapper:_,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&_){const E=Math.abs(f.current-g.scrollTop);if(E>0){const M=window.innerHeight-lr*2,A=parseFloat(_.style.minHeight),R=parseFloat(_.style.height),k=Math.max(A,R);if(k<M){const U=k+E,I=Math.min(M,U),V=U-I;_.style.height=I+"px",_.style.bottom==="0px"&&(g.scrollTop=V>0?V:0,_.style.justifyContent="flex-end")}}}f.current=g.scrollTop})})})]})});BE.displayName=o_;var UE="SelectGroup",[k6,P6]=oc(UE),D6=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=Yu();return T.jsx(k6,{scope:t,id:r,children:T.jsx(Rt.div,{role:"group","aria-labelledby":r,...s,ref:e})})});D6.displayName=UE;var FE="SelectLabel",jE=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=P6(FE,t);return T.jsx(Rt.div,{id:r.id,...s,ref:e})});jE.displayName=FE;var ud="SelectItem",[B6,LE]=oc(ud),zE=N.forwardRef((n,e)=>{const{__scopeSelect:t,value:s,disabled:r=!1,textValue:o,...l}=n,c=_o(ud,t),f=bo(ud,t),d=c.value===s,[g,_]=N.useState(o??""),[x,E]=N.useState(!1),M=_n(e,U=>{var I;return(I=f.itemRefCallback)==null?void 0:I.call(f,U,s,r)}),A=Yu(),R=N.useRef("touch"),k=()=>{r||(c.onValueChange(s),c.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return T.jsx(B6,{scope:t,value:s,disabled:r,textId:A,isSelected:d,onItemTextChange:N.useCallback(U=>{_(I=>I||((U==null?void 0:U.textContent)??"").trim())},[]),children:T.jsx(lp.ItemSlot,{scope:t,value:s,disabled:r,textValue:g,children:T.jsx(Rt.div,{role:"option","aria-labelledby":A,"data-highlighted":x?"":void 0,"aria-selected":d&&x,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...l,ref:M,onFocus:vt(l.onFocus,()=>E(!0)),onBlur:vt(l.onBlur,()=>E(!1)),onClick:vt(l.onClick,()=>{R.current!=="mouse"&&k()}),onPointerUp:vt(l.onPointerUp,()=>{R.current==="mouse"&&k()}),onPointerDown:vt(l.onPointerDown,U=>{R.current=U.pointerType}),onPointerMove:vt(l.onPointerMove,U=>{var I;R.current=U.pointerType,r?(I=f.onItemLeave)==null||I.call(f):R.current==="mouse"&&U.currentTarget.focus({preventScroll:!0})}),onPointerLeave:vt(l.onPointerLeave,U=>{var I;U.currentTarget===document.activeElement&&((I=f.onItemLeave)==null||I.call(f))}),onKeyDown:vt(l.onKeyDown,U=>{var V;((V=f.searchRef)==null?void 0:V.current)!==""&&U.key===" "||(w6.includes(U.key)&&k(),U.key===" "&&U.preventDefault())})})})})});zE.displayName=ud;var du="SelectItemText",VE=N.forwardRef((n,e)=>{const{__scopeSelect:t,className:s,style:r,...o}=n,l=_o(du,t),c=bo(du,t),f=LE(du,t),d=E6(du,t),[g,_]=N.useState(null),x=_n(e,k=>_(k),f.onItemTextChange,k=>{var U;return(U=c.itemTextRefCallback)==null?void 0:U.call(c,k,f.value,f.disabled)}),E=g==null?void 0:g.textContent,M=N.useMemo(()=>T.jsx("option",{value:f.value,disabled:f.disabled,children:E},f.value),[f.disabled,f.value,E]),{onNativeOptionAdd:A,onNativeOptionRemove:R}=d;return Kn(()=>(A(M),()=>R(M)),[A,R,M]),T.jsxs(T.Fragment,{children:[T.jsx(Rt.span,{id:f.textId,...o,ref:x}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ec.createPortal(o.children,l.valueNode):null]})});VE.displayName=du;var $E="SelectItemIndicator",HE=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n;return LE($E,t).isSelected?T.jsx(Rt.span,{"aria-hidden":!0,...s,ref:e}):null});HE.displayName=$E;var a_="SelectScrollUpButton",U6=N.forwardRef((n,e)=>{const t=bo(a_,n.__scopeSelect),s=kb(a_,n.__scopeSelect),[r,o]=N.useState(!1),l=_n(e,s.onScrollButtonChange);return Kn(()=>{if(t.viewport&&t.isPositioned){let c=function(){const d=f.scrollTop>0;o(d)};const f=t.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?T.jsx(WE,{...n,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=t;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});U6.displayName=a_;var l_="SelectScrollDownButton",F6=N.forwardRef((n,e)=>{const t=bo(l_,n.__scopeSelect),s=kb(l_,n.__scopeSelect),[r,o]=N.useState(!1),l=_n(e,s.onScrollButtonChange);return Kn(()=>{if(t.viewport&&t.isPositioned){let c=function(){const d=f.scrollHeight-f.clientHeight,g=Math.ceil(f.scrollTop)<d;o(g)};const f=t.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?T.jsx(WE,{...n,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=t;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});F6.displayName=l_;var WE=N.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:s,...r}=n,o=bo("SelectScrollButton",t),l=N.useRef(null),c=cp(t),f=N.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return N.useEffect(()=>()=>f(),[f]),Kn(()=>{var g;const d=c().find(_=>_.ref.current===document.activeElement);(g=d==null?void 0:d.ref.current)==null||g.scrollIntoView({block:"nearest"})},[c]),T.jsx(Rt.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:vt(r.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(s,50))}),onPointerMove:vt(r.onPointerMove,()=>{var d;(d=o.onItemLeave)==null||d.call(o),l.current===null&&(l.current=window.setInterval(s,50))}),onPointerLeave:vt(r.onPointerLeave,()=>{f()})})}),j6="SelectSeparator",XE=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n;return T.jsx(Rt.div,{"aria-hidden":!0,...s,ref:e})});XE.displayName=j6;var c_="SelectArrow",L6=N.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=up(t),o=_o(c_,t),l=bo(c_,t);return o.open&&l.position==="popper"?T.jsx(ID,{...r,...s,ref:e}):null});L6.displayName=c_;var z6="SelectBubbleInput",qE=N.forwardRef(({__scopeSelect:n,value:e,...t},s)=>{const r=N.useRef(null),o=_n(s,r),l=kD(e);return N.useEffect(()=>{const c=r.current;if(!c)return;const f=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(f,"value").set;if(l!==e&&g){const _=new Event("change",{bubbles:!0});g.call(c,e),c.dispatchEvent(_)}},[l,e]),T.jsx(Rt.select,{...t,style:{...FS,...t.style},ref:o,defaultValue:e})});qE.displayName=z6;function YE(n){return n===""||n===void 0}function KE(n){const e=Gs(n),t=N.useRef(""),s=N.useRef(0),r=N.useCallback(l=>{const c=t.current+l;e(c),function f(d){t.current=d,window.clearTimeout(s.current),d!==""&&(s.current=window.setTimeout(()=>f(""),1e3))}(c)},[e]),o=N.useCallback(()=>{t.current="",window.clearTimeout(s.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(s.current),[]),[t,r,o]}function ZE(n,e,t){const r=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,o=t?n.indexOf(t):-1;let l=V6(n,Math.max(o,0));r.length===1&&(l=l.filter(d=>d!==t));const f=l.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return f!==t?f:void 0}function V6(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var $6=EE,QE=RE,H6=ME,W6=NE,X6=OE,GE=IE,q6=BE,JE=jE,eA=zE,Y6=VE,K6=HE,tA=XE;const nA=$6,sA=H6,Pb=N.forwardRef(({className:n,children:e,...t},s)=>T.jsxs(QE,{ref:s,className:zt("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),...t,children:[e,T.jsx(W6,{asChild:!0,children:T.jsx(a3,{className:"h-4 w-4 opacity-50"})})]}));Pb.displayName=QE.displayName;const Db=N.forwardRef(({className:n,children:e,position:t="popper",...s},r)=>T.jsx(X6,{children:T.jsx(GE,{ref:r,className:zt("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:t,...s,children:T.jsx(q6,{className:zt("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e})})}));Db.displayName=GE.displayName;const Z6=N.forwardRef(({className:n,...e},t)=>T.jsx(JE,{ref:t,className:zt("py-1.5 pl-8 pr-2 text-sm font-thin",n),...e}));Z6.displayName=JE.displayName;const ml=N.forwardRef(({className:n,children:e,...t},s)=>T.jsxs(eA,{ref:s,className:zt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...t,children:[T.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:T.jsx(K6,{children:T.jsx(DI,{className:"h-4 w-4"})})}),T.jsx(Y6,{children:e})]}));ml.displayName=eA.displayName;const Q6=N.forwardRef(({className:n,...e},t)=>T.jsx(tA,{ref:t,className:zt("-mx-1 my-1 h-px bg-muted",n),...e}));Q6.displayName=tA.displayName;const Bb=N.createContext(null);Bb.displayName="PanelGroupContext";const Bs={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandleId:"data-panel-resize-handle-id"},Ub=10,Al=N.useLayoutEffect,W1=sb.useId,G6=typeof W1=="function"?W1:()=>null;let J6=0;function rA(n=null){const e=G6(),t=N.useRef(n||e||null);return t.current===null&&(t.current=""+J6++),n??t.current}function iA({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:o,id:l,maxSize:c,minSize:f,onCollapse:d,onExpand:g,onResize:_,order:x,style:E,tagName:M="div",...A}){const R=N.useContext(Bb);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:k,expandPanel:U,getPanelSize:I,getPanelStyle:V,groupId:H,isPanelCollapsed:W,reevaluatePanelConstraints:ee,registerPanel:Q,resizePanel:ge,unregisterPanel:Ne}=R,ne=rA(l),ve=N.useRef({callbacks:{onCollapse:d,onExpand:g,onResize:_},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:c,minSize:f},id:ne,idIsFromProps:l!==void 0,order:x});N.useRef({didLogMissingDefaultSizeWarning:!1}),Al(()=>{const{callbacks:be,constraints:je}=ve.current,G={...je};ve.current.id=ne,ve.current.idIsFromProps=l!==void 0,ve.current.order=x,be.onCollapse=d,be.onExpand=g,be.onResize=_,je.collapsedSize=t,je.collapsible=s,je.defaultSize=r,je.maxSize=c,je.minSize=f,(G.collapsedSize!==je.collapsedSize||G.collapsible!==je.collapsible||G.maxSize!==je.maxSize||G.minSize!==je.minSize)&&ee(ve.current,G)}),Al(()=>{const be=ve.current;return Q(be),()=>{Ne(be)}},[x,ne,Q,Ne]),N.useImperativeHandle(o,()=>({collapse:()=>{k(ve.current)},expand:be=>{U(ve.current,be)},getId(){return ne},getSize(){return I(ve.current)},isCollapsed(){return W(ve.current)},isExpanded(){return!W(ve.current)},resize:be=>{ge(ve.current,be)}}),[k,U,I,W,ne,ge]);const De=V(ve.current,r);return N.createElement(M,{...A,children:n,className:e,id:ne,style:{...De,...E},[Bs.groupId]:H,[Bs.panel]:"",[Bs.panelCollapsible]:s||void 0,[Bs.panelId]:ne,[Bs.panelSize]:parseFloat(""+De.flexGrow).toFixed(1)})}const eB=N.forwardRef((n,e)=>N.createElement(iA,{...n,forwardedRef:e}));iA.displayName="Panel";eB.displayName="forwardRef(Panel)";function oA(n){return n.type==="keydown"}function aA(n){return n.type.startsWith("pointer")}function lA(n){return n.type.startsWith("mouse")}function tB(n){if(aA(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(lA(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function nB(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}const sB=1,rB=2,iB=4,oB=8;nB();let aB=new Map;function Qm(n,e){aB.set(n,e)}function lB(){const[n,e]=N.useState(0);return N.useCallback(()=>e(t=>t+1),[])}function Ct(n,e){if(!n)throw console.error(e),Error(e)}function fa(n,e,t=Ub){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function oi(n,e,t=Ub){return fa(n,e,t)===0}function Is(n,e,t){return fa(n,e,t)===0}function cB(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],o=e[s];if(!Is(r,o,t))return!1}return!0}function yl({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];Ct(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:o,maxSize:l=100,minSize:c=0}=s;if(fa(t,c)<0)if(o){const f=(r+c)/2;fa(t,f)<0?t=r:t=c}else t=c;return t=Math.min(l,t),t=parseFloat(t.toFixed(Ub)),t}function pu({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:o}){if(Is(n,0))return e;const l=[...e],[c,f]=s;Ct(c!=null,"Invalid first pivot index"),Ct(f!=null,"Invalid second pivot index");let d=0;if(o==="keyboard"){{const _=n<0?f:c,x=t[_];Ct(x,`Panel constraints not found for index ${_}`);const{collapsedSize:E=0,collapsible:M,minSize:A=0}=x;if(M){const R=e[_];if(Ct(R!=null,`Previous layout not found for panel index ${_}`),Is(R,E)){const k=A-R;fa(k,Math.abs(n))>0&&(n=n<0?0-k:k)}}}{const _=n<0?c:f,x=t[_];Ct(x,`No panel constraints found for index ${_}`);const{collapsedSize:E=0,collapsible:M,minSize:A=0}=x;if(M){const R=e[_];if(Ct(R!=null,`Previous layout not found for panel index ${_}`),Is(R,A)){const k=R-E;fa(k,Math.abs(n))>0&&(n=n<0?0-k:k)}}}}{const _=n<0?1:-1;let x=n<0?f:c,E=0;for(;;){const A=e[x];Ct(A!=null,`Previous layout not found for panel index ${x}`);const k=yl({panelConstraints:t,panelIndex:x,size:100})-A;if(E+=k,x+=_,x<0||x>=t.length)break}const M=Math.min(Math.abs(n),Math.abs(E));n=n<0?0-M:M}{let x=n<0?c:f;for(;x>=0&&x<t.length;){const E=Math.abs(n)-Math.abs(d),M=e[x];Ct(M!=null,`Previous layout not found for panel index ${x}`);const A=M-E,R=yl({panelConstraints:t,panelIndex:x,size:A});if(!Is(M,R)&&(d+=M-R,l[x]=R,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?x--:x++}}if(cB(r,l))return r;{const _=n<0?f:c,x=e[_];Ct(x!=null,`Previous layout not found for panel index ${_}`);const E=x+d,M=yl({panelConstraints:t,panelIndex:_,size:E});if(l[_]=M,!Is(M,E)){let A=E-M,k=n<0?f:c;for(;k>=0&&k<t.length;){const U=l[k];Ct(U!=null,`Previous layout not found for panel index ${k}`);const I=U+A,V=yl({panelConstraints:t,panelIndex:k,size:I});if(Is(U,V)||(A-=V-U,l[k]=V),Is(A,0))break;n>0?k--:k++}}}const g=l.reduce((_,x)=>x+_,0);return Is(g,100)?l:r}function uB({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,o=0,l=0;const c=t[0];Ct(c!=null,"No pivot index found"),e.forEach((_,x)=>{const{constraints:E}=_,{maxSize:M=100,minSize:A=0}=E;x===c?(s=A,r=M):(o+=A,l+=M)});const f=Math.min(r,100-o),d=Math.max(s,100-l),g=n[c];return{valueMax:f,valueMin:d,valueNow:g}}function fd(n,e=document){return Array.from(e.querySelectorAll(`[${Bs.resizeHandleId}][data-panel-group-id="${n}"]`))}function fB(n,e,t=document){const r=fd(n,t).findIndex(o=>o.getAttribute(Bs.resizeHandleId)===e);return r??null}function cA(n,e,t){const s=fB(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function hB(n){return n instanceof HTMLElement?!0:typeof n=="object"&&n!==null&&"tagName"in n&&"getAttribute"in n}function uA(n,e=document){if(hB(e)&&e.dataset.panelGroupId==n)return e;const t=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return t||null}function Fb(n,e=document){const t=e.querySelector(`[${Bs.resizeHandleId}="${n}"]`);return t||null}function dB(n,e,t,s=document){var r,o,l,c;const f=Fb(e,s),d=fd(n,s),g=f?d.indexOf(f):-1,_=(r=(o=t[g])===null||o===void 0?void 0:o.id)!==null&&r!==void 0?r:null,x=(l=(c=t[g+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[_,x]}function pB({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:o,setLayout:l}){N.useRef({didWarnAboutMissingResizeHandle:!1}),Al(()=>{if(!o)return;const c=fd(t,o);for(let f=0;f<r.length-1;f++){const{valueMax:d,valueMin:g,valueNow:_}=uB({layout:s,panelsArray:r,pivotIndices:[f,f+1]}),x=c[f];if(x!=null){const E=r[f];Ct(E,`No panel data found for index "${f}"`),x.setAttribute("aria-controls",E.id),x.setAttribute("aria-valuemax",""+Math.round(d)),x.setAttribute("aria-valuemin",""+Math.round(g)),x.setAttribute("aria-valuenow",_!=null?""+Math.round(_):"")}}return()=>{c.forEach((f,d)=>{f.removeAttribute("aria-controls"),f.removeAttribute("aria-valuemax"),f.removeAttribute("aria-valuemin"),f.removeAttribute("aria-valuenow")})}},[t,s,r,o]),N.useEffect(()=>{if(!o)return;const c=e.current;Ct(c,"Eager values not found");const{panelDataArray:f}=c,d=uA(t,o);Ct(d!=null,`No group found for id "${t}"`);const g=fd(t,o);Ct(g,`No resize handles found for group id "${t}"`);const _=g.map(x=>{const E=x.getAttribute(Bs.resizeHandleId);Ct(E,"Resize handle element has no handle id attribute");const[M,A]=dB(t,E,f,o);if(M==null||A==null)return()=>{};const R=k=>{if(!k.defaultPrevented)switch(k.key){case"Enter":{k.preventDefault();const U=f.findIndex(I=>I.id===M);if(U>=0){const I=f[U];Ct(I,`No panel data found for index ${U}`);const V=s[U],{collapsedSize:H=0,collapsible:W,minSize:ee=0}=I.constraints;if(V!=null&&W){const Q=pu({delta:Is(V,H)?ee-H:H-V,initialLayout:s,panelConstraints:f.map(ge=>ge.constraints),pivotIndices:cA(t,E,o),prevLayout:s,trigger:"keyboard"});s!==Q&&l(Q)}}break}}};return x.addEventListener("keydown",R),()=>{x.removeEventListener("keydown",R)}});return()=>{_.forEach(x=>x())}},[o,n,e,t,s,r,l])}function X1(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function fA(n,e){const t=n==="horizontal",{x:s,y:r}=tB(e);return t?s:r}function gB(n,e,t,s,r){const o=t==="horizontal",l=Fb(e,r);Ct(l,`No resize handle element found for id "${e}"`);const c=l.getAttribute(Bs.groupId);Ct(c,"Resize handle element has no group id attribute");let{initialCursorPosition:f}=s;const d=fA(t,n),g=uA(c,r);Ct(g,`No group element found for id "${c}"`);const _=g.getBoundingClientRect(),x=o?_.width:_.height;return(d-f)/x*100}function mB(n,e,t,s,r,o){if(oA(n)){const l=t==="horizontal";let c=0;n.shiftKey?c=100:r!=null?c=r:c=10;let f=0;switch(n.key){case"ArrowDown":f=l?0:c;break;case"ArrowLeft":f=l?-c:0;break;case"ArrowRight":f=l?c:0;break;case"ArrowUp":f=l?0:-c;break;case"End":f=100;break;case"Home":f=-100;break}return f}else return s==null?0:gB(n,e,t,s,o)}function yB({panelDataArray:n}){const e=Array(n.length),t=n.map(o=>o.constraints);let s=0,r=100;for(let o=0;o<n.length;o++){const l=t[o];Ct(l,`Panel constraints not found for index ${o}`);const{defaultSize:c}=l;c!=null&&(s++,e[o]=c,r-=c)}for(let o=0;o<n.length;o++){const l=t[o];Ct(l,`Panel constraints not found for index ${o}`);const{defaultSize:c}=l;if(c!=null)continue;const f=n.length-s,d=r/f;s++,e[o]=d,r-=d}return e}function rl(n,e,t){e.forEach((s,r)=>{const o=n[r];Ct(o,`Panel data not found for index ${r}`);const{callbacks:l,constraints:c,id:f}=o,{collapsedSize:d=0,collapsible:g}=c,_=t[f];if(_==null||s!==_){t[f]=s;const{onCollapse:x,onExpand:E,onResize:M}=l;M&&M(s,_),g&&(x||E)&&(E&&(_==null||oi(_,d))&&!oi(s,d)&&E(),x&&(_==null||!oi(_,d))&&oi(s,d)&&x())}})}function Rh(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function _B({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:o=3}){const l=t[r];let c;return l==null?c=n!=null?n.toPrecision(o):"1":s.length===1?c="1":c=l.toPrecision(o),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function bB(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function q1(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function hA(n){return`react-resizable-panels:${n}`}function dA(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:o}=e;return r?s:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function pA(n,e){try{const t=hA(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function vB(n,e,t){var s,r;const o=(s=pA(n,t))!==null&&s!==void 0?s:{},l=dA(e);return(r=o[l])!==null&&r!==void 0?r:null}function wB(n,e,t,s,r){var o;const l=hA(n),c=dA(e),f=(o=pA(n,r))!==null&&o!==void 0?o:{};f[c]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(l,JSON.stringify(f))}catch(d){console.error(d)}}function Y1({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((o,l)=>o+l,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!Is(s,100)&&t.length>0)for(let o=0;o<e.length;o++){const l=t[o];Ct(l!=null,`No layout data found for index ${o}`);const c=100/s*l;t[o]=c}let r=0;for(let o=0;o<e.length;o++){const l=t[o];Ct(l!=null,`No layout data found for index ${o}`);const c=yl({panelConstraints:e,panelIndex:o,size:l});l!=c&&(r+=l-c,t[o]=c)}if(!Is(r,0))for(let o=0;o<e.length;o++){const l=t[o];Ct(l!=null,`No layout data found for index ${o}`);const c=l+r,f=yl({panelConstraints:e,panelIndex:o,size:c});if(l!==f&&(r-=f-l,t[o]=f,Is(r,0)))break}return t}const xB=100,gu={getItem:n=>(q1(gu),gu.getItem(n)),setItem:(n,e)=>{q1(gu),gu.setItem(n,e)}},K1={};function gA({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:o=null,onLayout:l=null,keyboardResizeBy:c=null,storage:f=gu,style:d,tagName:g="div",..._}){const x=rA(o),E=N.useRef(null),[M,A]=N.useState(null),[R,k]=N.useState([]),U=lB(),I=N.useRef({}),V=N.useRef(new Map),H=N.useRef(0),W=N.useRef({autoSaveId:n,direction:s,dragState:M,id:x,keyboardResizeBy:c,onLayout:l,storage:f}),ee=N.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});N.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),N.useImperativeHandle(r,()=>({getId:()=>W.current.id,getLayout:()=>{const{layout:he}=ee.current;return he},setLayout:he=>{const{onLayout:Ce}=W.current,{layout:fe,panelDataArray:Pe}=ee.current,xe=Y1({layout:he,panelConstraints:Pe.map(Ue=>Ue.constraints)});X1(fe,xe)||(k(xe),ee.current.layout=xe,Ce&&Ce(xe),rl(Pe,xe,I.current))}}),[]),Al(()=>{W.current.autoSaveId=n,W.current.direction=s,W.current.dragState=M,W.current.id=x,W.current.onLayout=l,W.current.storage=f}),pB({committedValuesRef:W,eagerValuesRef:ee,groupId:x,layout:R,panelDataArray:ee.current.panelDataArray,setLayout:k,panelGroupElement:E.current}),N.useEffect(()=>{const{panelDataArray:he}=ee.current;if(n){if(R.length===0||R.length!==he.length)return;let Ce=K1[n];Ce==null&&(Ce=bB(wB,xB),K1[n]=Ce);const fe=[...he],Pe=new Map(V.current);Ce(n,fe,Pe,R,f)}},[n,R,f]),N.useEffect(()=>{});const Q=N.useCallback(he=>{const{onLayout:Ce}=W.current,{layout:fe,panelDataArray:Pe}=ee.current;if(he.constraints.collapsible){const xe=Pe.map(ot=>ot.constraints),{collapsedSize:Ue=0,panelSize:et,pivotIndices:Ge}=zo(Pe,he,fe);if(Ct(et!=null,`Panel size not found for panel "${he.id}"`),!oi(et,Ue)){V.current.set(he.id,et);const at=dl(Pe,he)===Pe.length-1?et-Ue:Ue-et,dt=pu({delta:at,initialLayout:fe,panelConstraints:xe,pivotIndices:Ge,prevLayout:fe,trigger:"imperative-api"});Rh(fe,dt)||(k(dt),ee.current.layout=dt,Ce&&Ce(dt),rl(Pe,dt,I.current))}}},[]),ge=N.useCallback((he,Ce)=>{const{onLayout:fe}=W.current,{layout:Pe,panelDataArray:xe}=ee.current;if(he.constraints.collapsible){const Ue=xe.map(Vt=>Vt.constraints),{collapsedSize:et=0,panelSize:Ge=0,minSize:ot=0,pivotIndices:at}=zo(xe,he,Pe),dt=Ce??ot;if(oi(Ge,et)){const Vt=V.current.get(he.id),Dn=Vt!=null&&Vt>=dt?Vt:dt,an=dl(xe,he)===xe.length-1?Ge-Dn:Dn-Ge,pn=pu({delta:an,initialLayout:Pe,panelConstraints:Ue,pivotIndices:at,prevLayout:Pe,trigger:"imperative-api"});Rh(Pe,pn)||(k(pn),ee.current.layout=pn,fe&&fe(pn),rl(xe,pn,I.current))}}},[]),Ne=N.useCallback(he=>{const{layout:Ce,panelDataArray:fe}=ee.current,{panelSize:Pe}=zo(fe,he,Ce);return Ct(Pe!=null,`Panel size not found for panel "${he.id}"`),Pe},[]),ne=N.useCallback((he,Ce)=>{const{panelDataArray:fe}=ee.current,Pe=dl(fe,he);return _B({defaultSize:Ce,dragState:M,layout:R,panelData:fe,panelIndex:Pe})},[M,R]),ve=N.useCallback(he=>{const{layout:Ce,panelDataArray:fe}=ee.current,{collapsedSize:Pe=0,collapsible:xe,panelSize:Ue}=zo(fe,he,Ce);return Ct(Ue!=null,`Panel size not found for panel "${he.id}"`),xe===!0&&oi(Ue,Pe)},[]),De=N.useCallback(he=>{const{layout:Ce,panelDataArray:fe}=ee.current,{collapsedSize:Pe=0,collapsible:xe,panelSize:Ue}=zo(fe,he,Ce);return Ct(Ue!=null,`Panel size not found for panel "${he.id}"`),!xe||fa(Ue,Pe)>0},[]),be=N.useCallback(he=>{const{panelDataArray:Ce}=ee.current;Ce.push(he),Ce.sort((fe,Pe)=>{const xe=fe.order,Ue=Pe.order;return xe==null&&Ue==null?0:xe==null?-1:Ue==null?1:xe-Ue}),ee.current.panelDataArrayChanged=!0,U()},[U]);Al(()=>{if(ee.current.panelDataArrayChanged){ee.current.panelDataArrayChanged=!1;const{autoSaveId:he,onLayout:Ce,storage:fe}=W.current,{layout:Pe,panelDataArray:xe}=ee.current;let Ue=null;if(he){const Ge=vB(he,xe,fe);Ge&&(V.current=new Map(Object.entries(Ge.expandToSizes)),Ue=Ge.layout)}Ue==null&&(Ue=yB({panelDataArray:xe}));const et=Y1({layout:Ue,panelConstraints:xe.map(Ge=>Ge.constraints)});X1(Pe,et)||(k(et),ee.current.layout=et,Ce&&Ce(et),rl(xe,et,I.current))}}),Al(()=>{const he=ee.current;return()=>{he.layout=[]}},[]);const je=N.useCallback(he=>{let Ce=!1;const fe=E.current;return fe&&window.getComputedStyle(fe,null).getPropertyValue("direction")==="rtl"&&(Ce=!0),function(xe){xe.preventDefault();const Ue=E.current;if(!Ue)return()=>null;const{direction:et,dragState:Ge,id:ot,keyboardResizeBy:at,onLayout:dt}=W.current,{layout:Vt,panelDataArray:Dn}=ee.current,{initialLayout:ds}=Ge??{},an=cA(ot,he,Ue);let pn=mB(xe,he,et,Ge,at,Ue);const tn=et==="horizontal";tn&&Ce&&(pn=-pn);const _a=Dn.map(hi=>hi.constraints),ss=pu({delta:pn,initialLayout:ds??Vt,panelConstraints:_a,pivotIndices:an,prevLayout:Vt,trigger:oA(xe)?"keyboard":"mouse-or-touch"}),ps=!Rh(Vt,ss);(aA(xe)||lA(xe))&&H.current!=pn&&(H.current=pn,!ps&&pn!==0?tn?Qm(he,pn<0?sB:rB):Qm(he,pn<0?iB:oB):Qm(he,0)),ps&&(k(ss),ee.current.layout=ss,dt&&dt(ss),rl(Dn,ss,I.current))}},[]),G=N.useCallback((he,Ce)=>{const{onLayout:fe}=W.current,{layout:Pe,panelDataArray:xe}=ee.current,Ue=xe.map(Vt=>Vt.constraints),{panelSize:et,pivotIndices:Ge}=zo(xe,he,Pe);Ct(et!=null,`Panel size not found for panel "${he.id}"`);const at=dl(xe,he)===xe.length-1?et-Ce:Ce-et,dt=pu({delta:at,initialLayout:Pe,panelConstraints:Ue,pivotIndices:Ge,prevLayout:Pe,trigger:"imperative-api"});Rh(Pe,dt)||(k(dt),ee.current.layout=dt,fe&&fe(dt),rl(xe,dt,I.current))},[]),Ae=N.useCallback((he,Ce)=>{const{layout:fe,panelDataArray:Pe}=ee.current,{collapsedSize:xe=0,collapsible:Ue}=Ce,{collapsedSize:et=0,collapsible:Ge,maxSize:ot=100,minSize:at=0}=he.constraints,{panelSize:dt}=zo(Pe,he,fe);dt!=null&&(Ue&&Ge&&oi(dt,xe)?oi(xe,et)||G(he,et):dt<at?G(he,at):dt>ot&&G(he,ot))},[G]),pe=N.useCallback((he,Ce)=>{const{direction:fe}=W.current,{layout:Pe}=ee.current;if(!E.current)return;const xe=Fb(he,E.current);Ct(xe,`Drag handle element not found for id "${he}"`);const Ue=fA(fe,Ce);A({dragHandleId:he,dragHandleRect:xe.getBoundingClientRect(),initialCursorPosition:Ue,initialLayout:Pe})},[]),qe=N.useCallback(()=>{A(null)},[]),K=N.useCallback(he=>{const{panelDataArray:Ce}=ee.current,fe=dl(Ce,he);fe>=0&&(Ce.splice(fe,1),delete I.current[he.id],ee.current.panelDataArrayChanged=!0,U())},[U]),Te=N.useMemo(()=>({collapsePanel:Q,direction:s,dragState:M,expandPanel:ge,getPanelSize:Ne,getPanelStyle:ne,groupId:x,isPanelCollapsed:ve,isPanelExpanded:De,reevaluatePanelConstraints:Ae,registerPanel:be,registerResizeHandle:je,resizePanel:G,startDragging:pe,stopDragging:qe,unregisterPanel:K,panelGroupElement:E.current}),[Q,M,s,ge,Ne,ne,x,ve,De,Ae,be,je,G,pe,qe,K]),Se={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return N.createElement(Bb.Provider,{value:Te},N.createElement(g,{..._,children:e,className:t,id:o,ref:E,style:{...Se,...d},[Bs.group]:"",[Bs.groupDirection]:s,[Bs.groupId]:x}))}const TB=N.forwardRef((n,e)=>N.createElement(gA,{...n,forwardedRef:e}));gA.displayName="PanelGroup";TB.displayName="forwardRef(PanelGroup)";function dl(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function zo(n,e,t){const s=dl(n,e),o=s===n.length-1?[s-1,s]:[s,s+1],l=t[s];return{...e.constraints,panelSize:l,pivotIndices:o}}const SB=async()=>{const n=await fetch("http://localhost:3333/api/bundles");if(!n.ok)throw new Error("Failed to fetch bundles");return n.json()},Z1=n=>{const e={name:"",path:"",type:"directory",children:[]},t=new Set,s=new Map;n.forEach(o=>{o.files.forEach(l=>{t.add(l),s.has(l)||s.set(l,[]),s.get(l).push(o.name)})}),t.forEach(o=>{const l=o.split("/");let c=e;l.forEach((f,d)=>{const g=d===l.length-1,_=l.slice(0,d+1).join("/");c.children||(c.children=[]);let x=c.children.find(E=>E.name===f);x||(x={name:f,path:_,type:g?"file":"directory",children:g?void 0:[],bundles:g?s.get(o):void 0},c.children.push(x)),g||(c=x)})});const r=o=>{o.children&&(o.children.sort((l,c)=>l.type!==c.type?l.type==="directory"?-1:1:l.name.localeCompare(c.name)),o.children.forEach(r))};return r(e),e},EB=n=>{if(n===0)return"0 B";const e=1024,t=["B","KB","MB","GB"],s=Math.floor(Math.log(n)/Math.log(e));return parseFloat((n/Math.pow(e,s)).toFixed(1))+" "+t[s]};function mA({node:n,level:e,expandedDirs:t,onToggleDir:s}){const r=t.has(n.path),o=e*16;if(n.type==="directory")return T.jsxs("div",{children:[T.jsxs("div",{className:"flex items-center gap-2 py-1 px-2 hover:bg-muted/50 rounded cursor-pointer",style:{paddingLeft:`${o+8}px`},onClick:()=>s(n.path),children:[r?T.jsx(a3,{className:"w-4 h-4 text-muted-foreground"}):T.jsx(FI,{className:"w-4 h-4 text-muted-foreground"}),r?T.jsx(ok,{className:"w-4 h-4 text-[color:var(--color-info)]"}):T.jsx(lk,{className:"w-4 h-4 text-[color:var(--color-info)]"}),T.jsx("span",{className:"text-xs font-thin",children:n.name}),n.children&&T.jsxs("span",{className:"text-xs text-muted-foreground ml-auto",children:[n.children.length," items"]})]}),r&&n.children&&T.jsx("div",{children:n.children.map(c=>T.jsx(mA,{node:c,level:e+1,expandedDirs:t,onToggleDir:s},c.path))})]});const l=c=>{var g;const f=(g=c.split(".").pop())==null?void 0:g.toLowerCase(),d="w-4 h-4";switch(f){case"js":case"ts":case"jsx":case"tsx":return T.jsx(Ja,{className:`${d} text-[color:var(--color-warning)]`});case"json":return T.jsx(Ja,{className:`${d} text-[color:var(--color-success)]`});case"md":return T.jsx(Ja,{className:`${d} text-[color:var(--color-info)]/80`});case"css":case"scss":return T.jsx(Ja,{className:`${d} text-[color:var(--color-type-styles)]`});case"html":return T.jsx(Ja,{className:`${d} text-[color:var(--color-type-configuration)]`});default:return T.jsx(Ja,{className:`${d} text-muted-foreground`})}};return T.jsxs("div",{className:"flex items-center gap-2 py-1 px-2 hover:bg-muted/50 rounded",style:{paddingLeft:`${o+24}px`},children:[l(n.name),T.jsx("span",{className:"text-xs font-mono",children:n.name}),n.bundles&&n.bundles.length>0&&T.jsx("div",{className:"flex gap-1 ml-2",children:n.bundles.map(c=>T.jsx(kn,{variant:"outline",className:"text-xs px-1 py-0 h-4",children:c},c))}),n.size&&T.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:EB(n.size)})]})}function AB(){const[n,e]=N.useState(new Set([""])),{data:t,isLoading:s}=po({queryKey:["bundles"],queryFn:SB,refetchInterval:5e3}),r=d=>{const g=new Set(n);g.has(d)?g.delete(d):g.add(d),e(g)},o=()=>{if(!t)return;const d=Z1(t),g=new Set,_=x=>{var E;x.type==="directory"&&(g.add(x.path),(E=x.children)==null||E.forEach(_))};_(d),e(g)},l=()=>{e(new Set([""]))};if(s)return T.jsx("div",{children:"Loading file tree..."});if(!t)return T.jsx("div",{children:"No bundles found"});const c=Z1(t),f=t.reduce((d,g)=>d+g.files.length,0);return T.jsxs("div",{className:"space-y-4",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{className:"flex gap-1",children:[T.jsx(Pn,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:o,children:"Expand All"}),T.jsx(Pn,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:l,children:"Collapse All"})]}),T.jsxs("div",{className:"text-xs text-muted-foreground font-thin",children:[f," files tracked"]})]}),T.jsx(yn,{className:"p-4",children:T.jsx("div",{className:"space-y-1 max-h-96 overflow-y-auto",children:c.children&&c.children.length>0?c.children.map(d=>T.jsx(mA,{node:d,level:0,expandedDirs:n,onToggleDir:r},d.path)):T.jsx("div",{className:"text-center text-muted-foreground py-8",children:"No files found"})})}),T.jsxs(yn,{className:"p-4",children:[T.jsx("h3",{className:"text-xs font-thin mb-2",children:"Bundle Legend"}),T.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(d=>T.jsxs(kn,{variant:"outline",children:[d.name," (",d.files.length,")"]},d.name))})]})]})}const RB=()=>T.jsxs(yn,{children:[T.jsxs(hs,{children:[T.jsxs(xs,{className:"flex items-center gap-2",children:[T.jsx(d3,{className:"w-4 h-4"}),"Project Files"]}),T.jsx("p",{className:"text-sm text-muted-foreground",children:"Browse and explore all files in your project with bundle information."})]}),T.jsx(Vn,{children:T.jsx(AB,{})})]});function yA({className:n,type:e,...t}){return T.jsx("input",{type:e,"data-slot":"input",className:zt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-thin disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n),...t})}const CB=async()=>{const n=await fetch("http://localhost:3333/api/bundles");if(!n.ok)throw new Error("Failed to fetch bundles");return n.json()},MB=async()=>{const n=await fetch("http://localhost:3333/api/files");if(!n.ok)throw new Error("Failed to fetch files");return(await n.json()).map(t=>t.path)};function NB(){const n=Xu(),[e,t]=N.useState(null),[s,r]=N.useState(new Set),[o,l]=N.useState(new Set),[c,f]=N.useState(null),[d,g]=N.useState(new Map),[_,x]=N.useState(!1);fP();const{data:E=[],isLoading:M,isFetching:A,dataUpdatedAt:R}=po({queryKey:["bundles"],queryFn:CB,refetchInterval:5e3,refetchOnWindowFocus:!0}),{data:k=[],isFetching:U,dataUpdatedAt:I}=po({queryKey:["allFiles"],queryFn:MB,refetchInterval:3e4,refetchOnWindowFocus:!0});N.useEffect(()=>{const W=Math.max(R,I);W>0&&f(new Date(W))},[R,I]),N.useEffect(()=>{const W=new WebSocket("ws://localhost:3333");return W.onopen=()=>{console.log("Bundle updates WebSocket connected")},W.onmessage=ee=>{try{const Q=JSON.parse(ee.data);switch(console.log("WebSocket message received:",Q),Q.type){case"bundle-sync-started":g(ge=>new Map(ge).set(Q.bundleName,{changed:!0,lastSync:new Date(Q.timestamp)})),Yn.info(`Syncing ${Q.bundleName}`);break;case"bundle-sync-completed":g(ge=>new Map(ge).set(Q.bundleName,{changed:!1,lastSync:new Date(Q.timestamp)})),Yn.success(`Synced ${Q.bundleName}`),n.invalidateQueries({queryKey:["bundles"]});break;case"bundle-sync-failed":g(ge=>new Map(ge).set(Q.bundleName,{changed:!0,lastSync:new Date(Q.timestamp)})),Yn.error(`Sync failed for ${Q.bundleName}`,Q.error);break;case"bundle-file-changed":g(ge=>new Map(ge).set(Q.bundleName,{changed:!0,lastSync:new Date(Q.timestamp)}));break}}catch(Q){console.error("Error parsing bundle update:",Q)}},W.onclose=()=>{console.log("Bundle updates WebSocket disconnected")},W.onerror=ee=>{console.error("Bundle updates WebSocket error:",ee)},()=>{W.close()}},[n]);const V=N.useCallback(W=>{t(e===W?null:W)},[e]),H=N.useMemo(()=>E.map(W=>{const ee=d.get(W.name);return{...W,changed:(ee==null?void 0:ee.changed)??W.changed,lastSync:ee==null?void 0:ee.lastSync}}),[E,d]);return M?T.jsx("div",{children:"Loading bundles..."}):E?T.jsxs("div",{className:"h-full flex flex-col relative",children:[T.jsxs(Zu,{defaultValue:"bundles",className:"w-full flex-1 flex flex-col min-h-0",children:[T.jsxs(Qu,{className:"grid w-full grid-cols-3 bg-background",children:[T.jsxs(Us,{value:"bundles",className:"flex items-center gap-2",children:[T.jsx(Ky,{className:"w-4 h-4 text-muted-foreground/75"}),"Bundles"]}),T.jsxs(Us,{value:"files",className:"flex items-center gap-2",children:[T.jsx(d3,{className:"w-4 h-4 text-muted-foreground/75"}),"Project Files"]}),T.jsxs(Us,{value:"analysis",className:"flex items-center gap-2",children:[T.jsx(m1,{className:"w-4 h-4 text-muted-foreground/75"}),"File Analysis"]})]}),T.jsx(Ys,{value:"bundles",className:"flex-1 overflow-y-auto",children:T.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:H&&Array.isArray(H)?H.map(W=>T.jsx(hP,{bundle:W,isSelected:e===W.name,onSelect:V,lastRefresh:c||void 0},W.name)):T.jsx("div",{children:"No bundles available"})})}),T.jsx(Ys,{value:"files",className:"space-y-4",children:T.jsx(RB,{})}),T.jsx(Ys,{value:"analysis",className:"space-y-4",children:T.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[T.jsx(m1,{className:"w-12 h-12 mx-auto mb-4 opacity-20"}),T.jsx("p",{className:"text-sm font-thin uppercase tracking-widest",children:"Semantic Analysis Active"}),T.jsx("p",{className:"text-xs mt-2 opacity-50",children:"Viewing automated context mapping..."})]})})]}),e&&(()=>{var ee;const W=E.find(Q=>Q.name===e);return W?T.jsxs("div",{className:"fixed top-0 left-0 right-0 bottom-10 z-50 bg-background flex flex-col",children:[T.jsxs("div",{className:"sticky top-0 bg-background border-b p-4 flex justify-between items-center flex-shrink-0",children:[T.jsxs("h3",{className:"font-thin text-sm flex items-center gap-2",children:[T.jsx(Ky,{className:"w-4 h-4 text-muted-foreground"}),e," Details"]}),T.jsx(Pn,{variant:"ghost",size:"sm",onClick:()=>t(null),children:T.jsx(_b,{className:"w-4 h-4"})})]}),T.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto p-6",children:T.jsxs("div",{className:"space-y-4",children:[T.jsx("h4",{className:"text-xs font-thin uppercase tracking-widest color-vesper-muted",children:"Included Files"}),T.jsx("ul",{className:"list-none pl-0 space-y-1",children:(ee=W.files)==null?void 0:ee.map(Q=>T.jsx("li",{className:"text-xs font-thin mono py-1 border-b border-vesper/50",children:Q},Q))})]})})]}):null})()]}):T.jsx("div",{children:"No bundles found"})}const OB=np("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function IB({className:n,variant:e,...t}){return T.jsx("div",{"data-slot":"alert",role:"alert",className:zt(OB({variant:e}),n),...t})}function kB({className:n,...e}){return T.jsx("div",{"data-slot":"alert-description",className:zt("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",n),...e})}const Q1=[{path:"/api/status",method:"GET",description:"Server status and health"},{path:"/api/bundles",method:"GET",description:"List all bundles"},{path:"/api/config",method:"GET",description:"Get bundle configuration"},{path:"/api/files",method:"GET",description:"Get file tree"},{path:"/api/semantic-chunks",method:"GET",description:"Get semantic analysis"},{path:"/api/vector-db/status",method:"GET",description:"Vector database status"},{path:"/api/mcp-status",method:"GET",description:"MCP server status"}],il=[{name:"list_bundles",description:"List all available file bundles",group:"Bundle Management"},{name:"get_bundle",description:"Get the content of a specific bundle",group:"Bundle Management"},{name:"generate_bundle",description:"Regenerate a specific bundle",group:"Bundle Management"},{name:"create_bundle",description:"Create a new bundle with specified patterns",group:"Bundle Management"},{name:"update_bundle",description:"Update an existing bundle's patterns",group:"Bundle Management"},{name:"delete_bundle",description:"Delete an existing bundle",group:"Bundle Management"},{name:"get_file_tree",description:"Get the project file tree",group:"Project Exploration"},{name:"get_project_status",description:"Get current project status and bundle information",group:"Project Exploration"},{name:"update_cntxignore",description:"Update the .cntxignore file with new ignore patterns",group:"Project Exploration"},{name:"get_semantic_chunks",description:"Get function-level semantic chunks from the codebase",group:"Semantic Analysis"},{name:"get_semantic_chunks_filtered",description:"Get semantic chunks filtered by purpose, type, complexity, or bundle",group:"Semantic Analysis"},{name:"analyze_bundle_suggestions",description:"Analyze codebase and suggest optimal bundle organization",group:"Semantic Analysis"},{name:"read_file",description:"Read contents of a specific file with bundle context and metadata",group:"File Operations"},{name:"write_file",description:"Write content to a file with validation and safety checks",group:"File Operations"}],PB=async()=>{const n=await fetch("http://localhost:3333/api/status");if(!n.ok)throw new Error("Failed to fetch server status");return n.json()},DB=async n=>{const e=Date.now();try{const t=await fetch(`http://localhost:3333${n.path}`),s=Date.now()-e;return t.ok?{...n,status:"success",responseTime:s}:{...n,status:"error",responseTime:s,error:`HTTP ${t.status}`}}catch(t){const s=Date.now()-e;return{...n,status:"error",responseTime:s,error:t instanceof Error?t.message:"Unknown error"}}},BB=async n=>{try{const e=await fetch("http://localhost:3333/api/mcp-status");return e.ok?(await e.json()).enabled?{...n,status:"available"}:{...n,status:"error",error:"MCP server not enabled"}:{...n,status:"error",error:"MCP status unavailable"}}catch(e){return{...n,status:"error",error:e instanceof Error?e.message:"Unknown error"}}};function UB(){var H,W,ee,Q,ge,Ne;const[n,e]=N.useState([]),[t,s]=N.useState([]),[r,o]=N.useState(!1),[l,c]=N.useState("All"),{data:f,isLoading:d,error:g,refetch:_}=po({queryKey:["server-status"],queryFn:PB,refetchInterval:5e3}),x=async()=>{o(!0);try{const ne=await Promise.all(Q1.map(ve=>DB(ve)));e(ne)}catch(ne){console.error("Failed to run endpoint tests:",ne)}finally{o(!1)}},E=async()=>{o(!0);try{const ne=await Promise.all(il.map(ve=>BB(ve)));s(ne)}catch(ne){console.error("Failed to run MCP tests:",ne)}finally{o(!1)}},M=ne=>{if(ne<60)return`${Math.floor(ne)}s`;if(ne<3600)return`${Math.floor(ne/60)}m ${Math.floor(ne%60)}s`;const ve=Math.floor(ne/3600),De=Math.floor(ne%3600/60);return`${ve}h ${De}m`},A=ne=>{const ve=ne/1024/1024;return`${Math.round(ve)}MB`},R=()=>["All",...new Set(il.map(ve=>ve.group))],k=()=>l==="All"?il:il.filter(ne=>ne.group===l),U=()=>k().reduce((De,be)=>(De[be.group]||(De[be.group]=[]),De[be.group].push(be),De),{}),I=(ne,ve)=>{var De,be,je,G,Ae;if(typeof ne=="string")return ne.length>100?ne.substring(0,100)+"...":ne;if(Array.isArray(ne))return`Array with ${ne.length} items`;if(typeof ne=="object"&&ne!==null){const pe=Object.keys(ne);if(ve.includes("/api/status"))return`Uptime: ${Math.floor(ne.uptime||0)}s, Memory: ${Math.round((((De=ne.memory)==null?void 0:De.heapUsed)||0)/1024/1024)}MB, Files: ${ne.totalFiles||0}`;if(ve.includes("/api/bundles"))return`${ne.length||pe.length} bundles found`;if(ve.includes("/api/semantic-chunks"))return`${((be=ne.chunks)==null?void 0:be.length)||0} chunks, ${((je=ne.summary)==null?void 0:je.totalFunctions)||0} functions`;if(ve.includes("/api/vector-db/status"))return`${((G=ne.stats)==null?void 0:G.totalChunks)||0} chunks indexed with ${((Ae=ne.stats)==null?void 0:Ae.modelName)||"unknown model"}`;const qe=pe.slice(0,3).map(K=>{const Te=ne[K];return typeof Te=="object"?`${K}: ${Array.isArray(Te)?`[${Te.length}]`:"{object}"}`:`${K}: ${String(Te).substring(0,20)}`}).join(", ");return pe.length>3?`${qe}... (+${pe.length-3} more)`:qe}return String(ne).substring(0,100)},V=async ne=>{const ve=Date.now();try{const De=await fetch(`http://localhost:3333${ne.path}`),be=Date.now()-ve;if(De.ok){const je=await De.json(),G=I(je,ne.path);Yn.success(`${ne.path} (${be}ms)`,G)}else Yn.error(`${ne.path} failed`,`HTTP ${De.status} (${be}ms)`)}catch(De){const be=Date.now()-ve;Yn.error(`${ne.path} error`,`${De instanceof Error?De.message:"Unknown error"} (${be}ms)`)}};return d?T.jsx(yn,{children:T.jsx(Vn,{className:"pt-6",children:T.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[T.jsx(Zy,{className:"w-4 h-4 animate-spin"}),"Checking system status..."]})})}):g?T.jsx(yn,{children:T.jsx(Vn,{className:"p-4",children:T.jsxs("div",{className:"text-center space-y-2",children:[T.jsx(fu,{className:"h-6 w-6 mx-auto text-red-500"}),T.jsx("p",{className:"text-sm font-medium",children:"Failed to connect to server"}),T.jsx("p",{className:"text-xs text-muted-foreground",children:"Make sure the cntx-ui server is running on localhost:3333"}),T.jsxs(Pn,{variant:"outline",size:"sm",onClick:()=>_(),children:[T.jsx(Zy,{className:"w-4 h-4 mr-2"}),"Retry"]})]})})}):T.jsxs("div",{className:"space-y-4",children:[T.jsxs(yn,{children:[T.jsx(hs,{children:T.jsxs(xs,{className:"flex items-center gap-2",children:[T.jsx(Ak,{className:"w-5 h-5"}),"Server Status",T.jsx(gl,{className:"w-4 h-4 text-green-600"})]})}),T.jsxs(Vn,{children:[T.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[T.jsxs("div",{children:[T.jsx("div",{className:"text-muted-foreground",children:"Uptime"}),T.jsx("div",{className:"font-medium",children:M((f==null?void 0:f.uptime)||0)})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-muted-foreground",children:"Memory"}),T.jsx("div",{className:"font-medium",children:A(((H=f==null?void 0:f.memory)==null?void 0:H.heapUsed)||0)})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-muted-foreground",children:"Total Files"}),T.jsx("div",{className:"font-medium",children:(f==null?void 0:f.totalFiles)||0})]}),T.jsxs("div",{children:[T.jsx("div",{className:"text-muted-foreground",children:"Bundles"}),T.jsx("div",{className:"font-medium",children:((W=f==null?void 0:f.bundles)==null?void 0:W.length)||0})]})]}),T.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[T.jsx(kn,{variant:f!=null&&f.scanning?"destructive":"secondary",children:f!=null&&f.scanning?"Scanning":"Idle"}),T.jsxs(kn,{variant:(ee=f==null?void 0:f.mcp)!=null&&ee.enabled?"default":"secondary",children:["MCP: ",(Q=f==null?void 0:f.mcp)!=null&&Q.enabled?"Enabled":"Disabled"]})]})]})]}),T.jsxs(Zu,{defaultValue:"endpoints",className:"w-full",children:[T.jsxs(Qu,{className:"grid w-full grid-cols-3",children:[T.jsxs(Us,{value:"endpoints",className:"flex items-center gap-2",children:[T.jsx(mb,{className:"w-4 h-4"}),"API Endpoints"]}),T.jsxs(Us,{value:"mcp",className:"flex items-center gap-2",children:[T.jsx(bb,{className:"w-4 h-4"}),"MCP Tools"]}),T.jsxs(Us,{value:"bundle-sync",className:"flex items-center gap-2",children:[T.jsx(id,{className:"w-4 h-4"}),"Bundle Sync"]})]}),T.jsx(Ys,{value:"endpoints",className:"space-y-4",children:T.jsxs(yn,{children:[T.jsx(hs,{children:T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(xs,{className:"text-lg",children:"API Endpoints"}),T.jsxs(Pn,{onClick:x,disabled:r,size:"sm",variant:"outline",children:[T.jsx(_1,{className:"w-4 h-4 mr-2"}),r?"Testing...":"Test All"]})]})}),T.jsx(Vn,{children:T.jsx("div",{className:"space-y-2",children:Q1.map(ne=>{const ve=n.find(De=>De.path===ne.path);return T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-muted/30 rounded-lg",children:[T.jsxs("div",{className:"flex-1",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(kn,{variant:"outline",className:"text-xs",children:ne.method}),T.jsx("code",{className:"text-sm",children:ne.path})]}),T.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:ne.description})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(Pn,{variant:"ghost",size:"sm",onClick:()=>V(ne),className:"h-7 w-7 p-0",title:`Test ${ne.path}`,children:T.jsx(c3,{className:"w-3 h-3"})}),ve&&T.jsxs(T.Fragment,{children:[T.jsxs("span",{className:"text-xs text-muted-foreground",children:[ve.responseTime,"ms"]}),ve.status==="success"?T.jsx(gl,{className:"w-4 h-4 text-green-600"}):ve.status==="error"?T.jsx("div",{title:ve.error,children:T.jsx(fu,{className:"w-4 h-4 text-red-600"})}):T.jsx("div",{className:"w-4 h-4 bg-gray-300 rounded-full"})]})]})]},ne.path)})})})]})}),T.jsx(Ys,{value:"mcp",className:"space-y-4",children:T.jsxs(yn,{children:[T.jsx(hs,{children:T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx(xs,{className:"text-lg",children:"MCP Tools"}),T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs(nA,{value:l,onValueChange:c,children:[T.jsx(Pb,{className:"w-48",children:T.jsx(sA,{placeholder:"Filter by group"})}),T.jsx(Db,{children:R().map(ne=>T.jsxs(ml,{value:ne,children:[ne," ",ne==="All"?`(${il.length})`:`(${il.filter(ve=>ve.group===ne).length})`]},ne))})]}),T.jsxs(Pn,{onClick:E,disabled:r||!((ge=f==null?void 0:f.mcp)!=null&&ge.enabled),size:"sm",variant:"outline",children:[T.jsx(_1,{className:"w-4 h-4 mr-2"}),r?"Testing...":"Test All"]})]})]})}),T.jsxs(Vn,{children:[!((Ne=f==null?void 0:f.mcp)!=null&&Ne.enabled)&&T.jsxs(IB,{className:"mb-4",children:[T.jsx(id,{className:"w-4 h-4"}),T.jsx(kB,{children:"MCP server is not enabled. MCP tools will not be available."})]}),T.jsx("div",{className:"space-y-4",children:l==="All"?Object.entries(U()).map(([ne,ve])=>T.jsxs("div",{className:"space-y-2",children:[T.jsxs("div",{className:"flex items-center gap-2 pb-2 border-b",children:[T.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:ne}),T.jsxs(kn,{variant:"outline",className:"text-xs",children:[ve.length," tools"]})]}),T.jsx("div",{className:"space-y-2",children:ve.map(De=>{const be=t.find(je=>je.name===De.name);return T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-muted/30 rounded-lg",children:[T.jsxs("div",{className:"flex-1",children:[T.jsx("div",{className:"font-medium text-sm",children:De.name}),T.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:De.description})]}),T.jsx("div",{className:"flex items-center gap-2",children:be?be.status==="available"?T.jsx(gl,{className:"w-4 h-4 text-green-600"}):T.jsx("div",{title:be.error,children:T.jsx(fu,{className:"w-4 h-4 text-red-600"})}):T.jsx("div",{className:"w-4 h-4 bg-gray-300 rounded-full"})})]},De.name)})})]},ne)):T.jsx("div",{className:"space-y-2",children:k().map(ne=>{const ve=t.find(De=>De.name===ne.name);return T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 bg-muted/30 rounded-lg",children:[T.jsxs("div",{className:"flex-1",children:[T.jsx("div",{className:"font-medium text-sm",children:ne.name}),T.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:ne.description})]}),T.jsx("div",{className:"flex items-center gap-2",children:ve?ve.status==="available"?T.jsx(gl,{className:"w-4 h-4 text-green-600"}):T.jsx("div",{title:ve.error,children:T.jsx(fu,{className:"w-4 h-4 text-red-600"})}):T.jsx("div",{className:"w-4 h-4 bg-gray-300 rounded-full"})})]},ne.name)})})})]})]})})]})]})}function FB(){const[n,e]=N.useState(""),[t,s]=N.useState(null),[r,o]=N.useState(!1),{data:l,isLoading:c}=po({queryKey:["initial-chunks"],queryFn:async()=>(await(await fetch("http://localhost:3333/api/semantic-chunks")).json()).chunks}),f=async _=>{if(_.preventDefault(),!n.trim()){s(null);return}o(!0);try{const x=await fetch("http://localhost:3333/api/semantic-search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:n,limit:15})});if(x.ok){const E=await x.json();s(E.results)}}catch{Yn.error("Semantic search failed")}finally{o(!1)}},d=t||l||[],g=async(_,x)=>{try{await fetch("http://localhost:3333/api/open-file",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:_,line:x})}),Yn.success(`Opening ${_}`)}catch{Yn.error("Failed to open editor")}};return T.jsxs("div",{className:"space-y-6",children:[T.jsxs("header",{className:"flex flex-col gap-4",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsxs("div",{children:[T.jsxs("h1",{className:"text-lg font-thin tracking-tight flex items-center gap-2",children:[T.jsx(qI,{className:"w-4 h-4 text-vesper-accent"}),"Repository Intelligence"]}),T.jsx("p",{className:"text-xs text-muted-foreground font-thin",children:"Surgical code chunks indexed for agents"})]}),T.jsxs(kn,{variant:"outline",className:"border-vesper font-thin text-[10px] uppercase tracking-widest",children:[(l==null?void 0:l.length)||0," Chunks Indexed"]})]}),T.jsxs("form",{onSubmit:f,className:"relative max-w-2xl",children:[T.jsx(f3,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),T.jsx(yA,{value:n,onChange:_=>e(_.target.value),placeholder:"Search code by meaning (e.g. 'handle file exports' or 'react components')",className:"pl-10 bg-vesper-card border-vesper text-sm h-10"}),r&&T.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:T.jsx(bb,{className:"w-3 h-3 animate-pulse text-vesper-accent"})})]})]}),c?T.jsxs("div",{className:"flex flex-col items-center justify-center py-20 opacity-50",children:[T.jsx(NI,{className:"w-10 h-10 animate-pulse mb-4 text-vesper-accent"}),T.jsx("span",{className:"text-xs font-thin tracking-widest uppercase",children:"Analyzing Codebase Intelligence..."})]}):T.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(_=>{var x;return T.jsxs(yn,{className:"border-vesper bg-vesper-card hover:border-vesper-accent transition-all group",children:[T.jsx(hs,{className:"pb-3",children:T.jsxs("div",{className:"flex items-start justify-between",children:[T.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[T.jsx(yb,{className:"w-4 h-4 text-muted-foreground mt-1"}),T.jsxs("div",{className:"min-w-0",children:[T.jsx(xs,{className:"text-sm font-bold truncate color-vesper-fg",children:_.name}),T.jsx("div",{className:"text-[10px] mono color-vesper-muted truncate mt-0.5",children:_.filePath})]})]}),T.jsx("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:T.jsx(Pn,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>g(_.filePath,_.startLine),children:T.jsx(l3,{className:"w-3 h-3"})})})]})}),T.jsxs(Vn,{className:"space-y-3",children:[T.jsxs("p",{className:"text-[11px] color-vesper-fg line-clamp-2 italic leading-relaxed",children:['"',_.purpose,'"']}),T.jsxs("div",{className:"flex flex-wrap gap-2",children:[T.jsx(kn,{variant:"outline",className:"text-[9px] font-thin uppercase border-vesper color-vesper-muted px-1.5 h-4",children:_.subtype||_.type}),T.jsxs(kn,{variant:"outline",className:"text-[9px] font-thin uppercase border-vesper color-vesper-muted px-1.5 h-4",children:["Complexity: ",((x=_.complexity)==null?void 0:x.score)||0]}),_.similarity&&T.jsxs(kn,{variant:"outline",className:"text-[9px] font-thin uppercase border-vesper-accent color-vesper-accent px-1.5 h-4",children:["Match: ",Math.round(_.similarity*100),"%"]})]})]})]},_.id)})})]})}function G1(){const{theme:n,setTheme:e}=k4();return T.jsxs(Pn,{variant:"ghost",size:"sm",onClick:()=>e(n==="light"?"dark":"light"),className:"h-8 w-8 p-0",children:[T.jsx(Ok,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),T.jsx(gk,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),T.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}function hd(n,e){if(!n)throw new Error(e||"loader assertion failed.")}const jb=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),J1=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);J1&&parseFloat(J1[1]);const Ch=globalThis,ol=globalThis.process||{},jB=globalThis.navigator||{};function _A(n){var s,r;if(typeof window<"u"&&((s=window.process)==null?void 0:s.type)==="renderer"||typeof process<"u"&&((r=process.versions)!=null&&r.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function ga(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||_A()}function LB(n){return ga()?_A()?"Electron":(jB.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const bA="4.1.0";function zB(n){try{const e=window[n],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}class VB{constructor(e,t,s="sessionStorage"){this.storage=zB(s),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}function $B(n){let e;return n<10?e=`${n.toFixed(2)}ms`:n<100?e=`${n.toFixed(1)}ms`:n<1e3?e=`${n.toFixed(0)}ms`:e=`${(n/1e3).toFixed(2)}s`,e}function HB(n,e=8){const t=Math.max(e-n.length,0);return`${" ".repeat(t)}${n}`}var dd;(function(n){n[n.BLACK=30]="BLACK",n[n.RED=31]="RED",n[n.GREEN=32]="GREEN",n[n.YELLOW=33]="YELLOW",n[n.BLUE=34]="BLUE",n[n.MAGENTA=35]="MAGENTA",n[n.CYAN=36]="CYAN",n[n.WHITE=37]="WHITE",n[n.BRIGHT_BLACK=90]="BRIGHT_BLACK",n[n.BRIGHT_RED=91]="BRIGHT_RED",n[n.BRIGHT_GREEN=92]="BRIGHT_GREEN",n[n.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",n[n.BRIGHT_BLUE=94]="BRIGHT_BLUE",n[n.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",n[n.BRIGHT_CYAN=96]="BRIGHT_CYAN",n[n.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(dd||(dd={}));const WB=10;function e2(n){return typeof n!="string"?n:(n=n.toUpperCase(),dd[n]||dd.WHITE)}function XB(n,e,t){return!ga&&typeof n=="string"&&(e&&(n=`\x1B[${e2(e)}m${n}\x1B[39m`),t&&(n=`\x1B[${e2(t)+WB}m${n}\x1B[49m`)),n}function qB(n,e=["constructor"]){const t=Object.getPrototypeOf(n),s=Object.getOwnPropertyNames(t),r=n;for(const o of s){const l=r[o];typeof l=="function"&&(e.find(c=>o===c)||(r[o]=l.bind(n)))}}function Lb(n,e){if(!n)throw new Error("Assertion failed")}function al(){var e,t,s;let n;if(ga()&&Ch.performance)n=(t=(e=Ch==null?void 0:Ch.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in ol){const r=(s=ol==null?void 0:ol.hrtime)==null?void 0:s.call(ol);n=r[0]*1e3+r[1]/1e6}else n=Date.now();return n}const ll={debug:ga()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},YB={enabled:!0,level:0};function cl(){}const t2={},n2={once:!0};class Ju{constructor({id:e}={id:""}){this.VERSION=bA,this._startTs=al(),this._deltaTs=al(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new VB(`__probe-${this.id}__`,YB),this.timeStamp(`${this.id} started`),qB(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((al()-this._startTs).toPrecision(10))}getDelta(){return Number((al()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,ll.warn,arguments,n2)}error(e){return this._getLogFunction(0,e,ll.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,ll.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,ll.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,ll.debug||ll.info,arguments,n2)}table(e,t,s){return t?this._getLogFunction(e,t,console.table||cl,s&&[s],{tag:ZB(t)}):cl}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||cl)}group(e,t,s={collapsed:!1}){const r=s2({logLevel:e,message:t,opts:s}),{collapsed:o}=s;return r.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(e,t,s={}){return this.group(e,t,Object.assign({},s,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||cl)}withGroup(e,t,s){this.group(e,t)();try{s()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=vA(e)}_getLogFunction(e,t,s,r,o){if(this._shouldLog(e)){o=s2({logLevel:e,message:t,args:r,opts:o}),s=s||o.method,Lb(s),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=al();const l=o.tag||o.message;if(o.once&&l)if(!t2[l])t2[l]=al();else return cl;return t=KB(this.id,o.message,o),s.bind(console,t,...o.args)}return cl}}Ju.VERSION=bA;function vA(n){if(!n)return 0;let e;switch(typeof n){case"number":e=n;break;case"object":e=n.logLevel||n.priority||0;break;default:return 0}return Lb(Number.isFinite(e)&&e>=0),e}function s2(n){const{logLevel:e,message:t}=n;n.logLevel=vA(e);const s=n.args?Array.from(n.args):[];for(;s.length&&s.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&s.unshift(t),n.message=e;break;case"object":Object.assign(n,e);break}typeof n.message=="function"&&(n.message=n.message());const r=typeof n.message;return Lb(r==="string"||r==="object"),Object.assign(n,{args:s},n.opts)}function KB(n,e,t){if(typeof e=="string"){const s=t.time?HB($B(t.total)):"";e=t.time?`${n}: ${s} ${e}`:`${n}: ${e}`,e=XB(e,t.color,t.background)}return e}function ZB(n){for(const e in n)for(const t in n[e])return t||"untitled";return"empty"}const Gm="4.3.3",QB=Gm[0]>="0"&&Gm[0]<="9"?`v${Gm}`:"";function GB(){const n=new Ju({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=n,globalThis.loaders.version=QB,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=n,n}const JB=GB();function eU(n,e){return wA(n||{},e)}function wA(n,e,t=0){if(t>3)return e;const s={...n};for(const[r,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?s[r]=wA(s[r]||{},e[r],t+1):s[r]=e[r];return s}const tU="latest";function nU(){var n;return(n=globalThis._loadersgl_)!=null&&n.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.3"),globalThis._loadersgl_.version}const sU=nU();function yo(n,e){if(!n)throw new Error(e||"loaders.gl assertion failed.")}const ta=typeof process!="object"||String(process)!=="[object process]"||process.browser,rU=typeof window<"u"&&typeof window.orientation<"u",r2=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);r2&&parseFloat(r2[1]);class iU{constructor(e,t){D(this,"name");D(this,"workerThread");D(this,"isRunning",!0);D(this,"result");D(this,"_resolve",()=>{});D(this,"_reject",()=>{});this.name=e,this.workerThread=t,this.result=new Promise((s,r)=>{this._resolve=s,this._reject=r})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){yo(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){yo(this.isRunning),this.isRunning=!1,this._reject(e)}}class Jm{terminate(){}}const ey=new Map;function oU(n){yo(n.source&&!n.url||!n.source&&n.url);let e=ey.get(n.source||n.url);return e||(n.url&&(e=aU(n.url),ey.set(n.url,e)),n.source&&(e=xA(n.source),ey.set(n.source,e))),yo(e),e}function aU(n){if(!n.startsWith("http"))return n;const e=lU(n);return xA(e)}function xA(n){const e=new Blob([n],{type:"application/javascript"});return URL.createObjectURL(e)}function lU(n){return`try {
335
335
  importScripts('${n}');
336
336
  } catch (error) {
337
337
  console.error(error);