@tanstack/cta-ui 0.35.0 → 0.36.0

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 @@ function Y3(n,e){for(var t=0;t<e.length;t++){const i=e[t];if(typeof i!="string"&
46
46
  `+N[d].replace(" at new "," at ");return o.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",o.displayName)),ne}while(1<=d&&0<=g);break}}}finally{Ep=!1,Error.prepareStackTrace=f}return(f=o?o.displayName||o.name:"")?Io(f):""}function XE(o){switch(o.tag){case 26:case 27:case 5:return Io(o.type);case 16:return Io("Lazy");case 13:return Io("Suspense");case 19:return Io("SuspenseList");case 0:case 15:return _p(o.type,!1);case 11:return _p(o.type.render,!1);case 1:return _p(o.type,!0);case 31:return Io("Activity");default:return""}}function bb(o){try{var l="";do l+=XE(o),o=o.return;while(o);return l}catch(f){return`
47
47
  Error generating stack: `+f.message+`
48
48
  `+f.stack}}function ii(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function xb(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function LE(o){var l=xb(o)?"checked":"value",f=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),d=""+o[l];if(!o.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var g=f.get,y=f.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return g.call(this)},set:function(Q){d=""+Q,y.call(this,Q)}}),Object.defineProperty(o,l,{enumerable:f.enumerable}),{getValue:function(){return d},setValue:function(Q){d=""+Q},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ef(o){o._valueTracker||(o._valueTracker=LE(o))}function Sb(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var f=l.getValue(),d="";return o&&(d=xb(o)?o.checked?"true":"false":o.value),o=d,o!==f?(l.setValue(o),!0):!1}function tf(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var zE=/[\n"\\]/g;function ri(o){return o.replace(zE,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Dp(o,l,f,d,g,y,Q,P){o.name="",Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?o.type=Q:o.removeAttribute("type"),l!=null?Q==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+ii(l)):o.value!==""+ii(l)&&(o.value=""+ii(l)):Q!=="submit"&&Q!=="reset"||o.removeAttribute("value"),l!=null?jp(o,Q,ii(l)):f!=null?jp(o,Q,ii(f)):d!=null&&o.removeAttribute("value"),g==null&&y!=null&&(o.defaultChecked=!!y),g!=null&&(o.checked=g&&typeof g!="function"&&typeof g!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?o.name=""+ii(P):o.removeAttribute("name")}function wb(o,l,f,d,g,y,Q,P){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(o.type=y),l!=null||f!=null){if(!(y!=="submit"&&y!=="reset"||l!=null))return;f=f!=null?""+ii(f):"",l=l!=null?""+ii(l):f,P||l===o.value||(o.value=l),o.defaultValue=l}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,o.checked=P?o.checked:!!d,o.defaultChecked=!!d,Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"&&(o.name=Q)}function jp(o,l,f){l==="number"&&tf(o.ownerDocument)===o||o.defaultValue===""+f||(o.defaultValue=""+f)}function Wo(o,l,f,d){if(o=o.options,l){l={};for(var g=0;g<f.length;g++)l["$"+f[g]]=!0;for(f=0;f<o.length;f++)g=l.hasOwnProperty("$"+o[f].value),o[f].selected!==g&&(o[f].selected=g),g&&d&&(o[f].defaultSelected=!0)}else{for(f=""+ii(f),l=null,g=0;g<o.length;g++){if(o[g].value===f){o[g].selected=!0,d&&(o[g].defaultSelected=!0);return}l!==null||o[g].disabled||(l=o[g])}l!==null&&(l.selected=!0)}}function kb(o,l,f){if(l!=null&&(l=""+ii(l),l!==o.value&&(o.value=l),f==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=f!=null?""+ii(f):""}function Qb(o,l,f,d){if(l==null){if(d!=null){if(f!=null)throw Error(i(92));if(ce(d)){if(1<d.length)throw Error(i(93));d=d[0]}f=d}f==null&&(f=""),l=f}f=ii(l),o.defaultValue=f,d=o.textContent,d===f&&d!==""&&d!==null&&(o.value=d)}function Ho(o,l){if(l){var f=o.firstChild;if(f&&f===o.lastChild&&f.nodeType===3){f.nodeValue=l;return}}o.textContent=l}var qE=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 Cb(o,l,f){var d=l.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?d?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":d?o.setProperty(l,f):typeof f!="number"||f===0||qE.has(l)?l==="float"?o.cssFloat=f:o[l]=(""+f).trim():o[l]=f+"px"}function Tb(o,l,f){if(l!=null&&typeof l!="object")throw Error(i(62));if(o=o.style,f!=null){for(var d in f)!f.hasOwnProperty(d)||l!=null&&l.hasOwnProperty(d)||(d.indexOf("--")===0?o.setProperty(d,""):d==="float"?o.cssFloat="":o[d]="");for(var g in l)d=l[g],l.hasOwnProperty(g)&&f[g]!==d&&Cb(o,g,d)}else for(var y in l)l.hasOwnProperty(y)&&Cb(o,y,l[y])}function Np(o){if(o.indexOf("-")===-1)return!1;switch(o){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 BE=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"]]),VE=/^[\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 nf(o){return VE.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}var Zp=null;function Xp(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Fo=null,Ko=null;function Pb(o){var l=Yo(o);if(l&&(o=l.stateNode)){var f=o[lt]||null;e:switch(o=l.stateNode,l.type){case"input":if(Dp(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),l=f.name,f.type==="radio"&&l!=null){for(f=o;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+ri(""+l)+'"][type="radio"]'),l=0;l<f.length;l++){var d=f[l];if(d!==o&&d.form===o.form){var g=d[lt]||null;if(!g)throw Error(i(90));Dp(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(l=0;l<f.length;l++)d=f[l],d.form===o.form&&Sb(d)}break e;case"textarea":kb(o,f.value,f.defaultValue);break e;case"select":l=f.value,l!=null&&Wo(o,!!f.multiple,l,!1)}}}var Lp=!1;function Ab(o,l,f){if(Lp)return o(l,f);Lp=!0;try{var d=o(l);return d}finally{if(Lp=!1,(Fo!==null||Ko!==null)&&(qf(),Fo&&(l=Fo,o=Ko,Ko=Fo=null,Pb(l),o)))for(l=0;l<o.length;l++)Pb(o[l])}}function Rl(o,l){var f=o.stateNode;if(f===null)return null;var d=f[lt]||null;if(d===null)return null;f=d[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(o=o.type,d=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!d;break e;default:o=!1}if(o)return null;if(f&&typeof f!="function")throw Error(i(231,l,typeof f));return f}var Pr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zp=!1;if(Pr)try{var $l={};Object.defineProperty($l,"passive",{get:function(){zp=!0}}),window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{zp=!1}var os=null,qp=null,rf=null;function Mb(){if(rf)return rf;var o,l=qp,f=l.length,d,g="value"in os?os.value:os.textContent,y=g.length;for(o=0;o<f&&l[o]===g[o];o++);var Q=f-o;for(d=1;d<=Q&&l[f-d]===g[y-d];d++);return rf=g.slice(o,1<d?1-d:void 0)}function sf(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function of(){return!0}function Rb(){return!1}function wn(o){function l(f,d,g,y,Q){this._reactName=f,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=Q,this.currentTarget=null;for(var P in o)o.hasOwnProperty(P)&&(f=o[P],this[P]=f?f(y):y[P]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?of:Rb,this.isPropagationStopped=Rb,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=of)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=of)},persist:function(){},isPersistent:of}),l}var Fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},af=wn(Fs),El=p({},Fs,{view:0,detail:0}),YE=wn(El),Bp,Vp,_l,lf=p({},El,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Up,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==_l&&(_l&&o.type==="mousemove"?(Bp=o.screenX-_l.screenX,Vp=o.screenY-_l.screenY):Vp=Bp=0,_l=o),Bp)},movementY:function(o){return"movementY"in o?o.movementY:Vp}}),$b=wn(lf),UE=p({},lf,{dataTransfer:0}),GE=wn(UE),IE=p({},El,{relatedTarget:0}),Yp=wn(IE),WE=p({},Fs,{animationName:0,elapsedTime:0,pseudoElement:0}),HE=wn(WE),FE=p({},Fs,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),KE=wn(FE),JE=p({},Fs,{data:0}),Eb=wn(JE),e5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t5={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"},n5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i5(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=n5[o])?!!l[o]:!1}function Up(){return i5}var r5=p({},El,{key:function(o){if(o.key){var l=e5[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=sf(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?t5[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Up,charCode:function(o){return o.type==="keypress"?sf(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?sf(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),s5=wn(r5),o5=p({},lf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_b=wn(o5),a5=p({},El,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Up}),l5=wn(a5),c5=p({},Fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),u5=wn(c5),f5=p({},lf,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),h5=wn(f5),d5=p({},Fs,{newState:0,oldState:0}),p5=wn(d5),m5=[9,13,27,32],Gp=Pr&&"CompositionEvent"in window,Dl=null;Pr&&"documentMode"in document&&(Dl=document.documentMode);var g5=Pr&&"TextEvent"in window&&!Dl,Db=Pr&&(!Gp||Dl&&8<Dl&&11>=Dl),jb=" ",Nb=!1;function Zb(o,l){switch(o){case"keyup":return m5.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xb(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Jo=!1;function O5(o,l){switch(o){case"compositionend":return Xb(l);case"keypress":return l.which!==32?null:(Nb=!0,jb);case"textInput":return o=l.data,o===jb&&Nb?null:o;default:return null}}function y5(o,l){if(Jo)return o==="compositionend"||!Gp&&Zb(o,l)?(o=Mb(),rf=qp=os=null,Jo=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Db&&l.locale!=="ko"?null:l.data;default:return null}}var v5={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 Lb(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!v5[o.type]:l==="textarea"}function zb(o,l,f,d){Fo?Ko?Ko.push(d):Ko=[d]:Fo=d,l=If(l,"onChange"),0<l.length&&(f=new af("onChange","change",null,f,d),o.push({event:f,listeners:l}))}var jl=null,Nl=null;function b5(o){xS(o,0)}function cf(o){var l=Ml(o);if(Sb(l))return o}function qb(o,l){if(o==="change")return l}var Bb=!1;if(Pr){var Ip;if(Pr){var Wp="oninput"in document;if(!Wp){var Vb=document.createElement("div");Vb.setAttribute("oninput","return;"),Wp=typeof Vb.oninput=="function"}Ip=Wp}else Ip=!1;Bb=Ip&&(!document.documentMode||9<document.documentMode)}function Yb(){jl&&(jl.detachEvent("onpropertychange",Ub),Nl=jl=null)}function Ub(o){if(o.propertyName==="value"&&cf(Nl)){var l=[];zb(l,Nl,o,Xp(o)),Ab(b5,l)}}function x5(o,l,f){o==="focusin"?(Yb(),jl=l,Nl=f,jl.attachEvent("onpropertychange",Ub)):o==="focusout"&&Yb()}function S5(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return cf(Nl)}function w5(o,l){if(o==="click")return cf(l)}function k5(o,l){if(o==="input"||o==="change")return cf(l)}function Q5(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Nn=typeof Object.is=="function"?Object.is:Q5;function Zl(o,l){if(Nn(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var f=Object.keys(o),d=Object.keys(l);if(f.length!==d.length)return!1;for(d=0;d<f.length;d++){var g=f[d];if(!me.call(l,g)||!Nn(o[g],l[g]))return!1}return!0}function Gb(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Ib(o,l){var f=Gb(o);o=0;for(var d;f;){if(f.nodeType===3){if(d=o+f.textContent.length,o<=l&&d>=l)return{node:f,offset:l-o};o=d}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=Gb(f)}}function Wb(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?Wb(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function Hb(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=tf(o.document);l instanceof o.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)o=l.contentWindow;else break;l=tf(o.document)}return l}function Hp(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var C5=Pr&&"documentMode"in document&&11>=document.documentMode,ea=null,Fp=null,Xl=null,Kp=!1;function Fb(o,l,f){var d=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Kp||ea==null||ea!==tf(d)||(d=ea,"selectionStart"in d&&Hp(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Xl&&Zl(Xl,d)||(Xl=d,d=If(Fp,"onSelect"),0<d.length&&(l=new af("onSelect","select",null,l,f),o.push({event:l,listeners:d}),l.target=ea)))}function Ks(o,l){var f={};return f[o.toLowerCase()]=l.toLowerCase(),f["Webkit"+o]="webkit"+l,f["Moz"+o]="moz"+l,f}var ta={animationend:Ks("Animation","AnimationEnd"),animationiteration:Ks("Animation","AnimationIteration"),animationstart:Ks("Animation","AnimationStart"),transitionrun:Ks("Transition","TransitionRun"),transitionstart:Ks("Transition","TransitionStart"),transitioncancel:Ks("Transition","TransitionCancel"),transitionend:Ks("Transition","TransitionEnd")},Jp={},Kb={};Pr&&(Kb=document.createElement("div").style,"AnimationEvent"in window||(delete ta.animationend.animation,delete ta.animationiteration.animation,delete ta.animationstart.animation),"TransitionEvent"in window||delete ta.transitionend.transition);function Js(o){if(Jp[o])return Jp[o];if(!ta[o])return o;var l=ta[o],f;for(f in l)if(l.hasOwnProperty(f)&&f in Kb)return Jp[o]=l[f];return o}var Jb=Js("animationend"),e1=Js("animationiteration"),t1=Js("animationstart"),T5=Js("transitionrun"),P5=Js("transitionstart"),A5=Js("transitioncancel"),n1=Js("transitionend"),i1=new Map,em="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(" ");em.push("scrollEnd");function Ti(o,l){i1.set(o,l),Hs(l,[o])}var r1=new WeakMap;function si(o,l){if(typeof o=="object"&&o!==null){var f=r1.get(o);return f!==void 0?f:(l={value:o,source:l,stack:bb(l)},r1.set(o,l),l)}return{value:o,source:l,stack:bb(l)}}var oi=[],na=0,tm=0;function uf(){for(var o=na,l=tm=na=0;l<o;){var f=oi[l];oi[l++]=null;var d=oi[l];oi[l++]=null;var g=oi[l];oi[l++]=null;var y=oi[l];if(oi[l++]=null,d!==null&&g!==null){var Q=d.pending;Q===null?g.next=g:(g.next=Q.next,Q.next=g),d.pending=g}y!==0&&s1(f,g,y)}}function ff(o,l,f,d){oi[na++]=o,oi[na++]=l,oi[na++]=f,oi[na++]=d,tm|=d,o.lanes|=d,o=o.alternate,o!==null&&(o.lanes|=d)}function nm(o,l,f,d){return ff(o,l,f,d),hf(o)}function ia(o,l){return ff(o,null,null,l),hf(o)}function s1(o,l,f){o.lanes|=f;var d=o.alternate;d!==null&&(d.lanes|=f);for(var g=!1,y=o.return;y!==null;)y.childLanes|=f,d=y.alternate,d!==null&&(d.childLanes|=f),y.tag===22&&(o=y.stateNode,o===null||o._visibility&1||(g=!0)),o=y,y=y.return;return o.tag===3?(y=o.stateNode,g&&l!==null&&(g=31-Qt(f),o=y.hiddenUpdates,d=o[g],d===null?o[g]=[l]:d.push(l),l.lane=f|536870912),y):null}function hf(o){if(50<uc)throw uc=0,lg=null,Error(i(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var ra={};function M5(o,l,f,d){this.tag=o,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zn(o,l,f,d){return new M5(o,l,f,d)}function im(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Ar(o,l){var f=o.alternate;return f===null?(f=Zn(o.tag,l,o.key,o.mode),f.elementType=o.elementType,f.type=o.type,f.stateNode=o.stateNode,f.alternate=o,o.alternate=f):(f.pendingProps=l,f.type=o.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=o.flags&65011712,f.childLanes=o.childLanes,f.lanes=o.lanes,f.child=o.child,f.memoizedProps=o.memoizedProps,f.memoizedState=o.memoizedState,f.updateQueue=o.updateQueue,l=o.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=o.sibling,f.index=o.index,f.ref=o.ref,f.refCleanup=o.refCleanup,f}function o1(o,l){o.flags&=65011714;var f=o.alternate;return f===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=f.childLanes,o.lanes=f.lanes,o.child=f.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=f.memoizedProps,o.memoizedState=f.memoizedState,o.updateQueue=f.updateQueue,o.type=f.type,l=f.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function df(o,l,f,d,g,y){var Q=0;if(d=o,typeof o=="function")im(o)&&(Q=1);else if(typeof o=="string")Q=$3(o,f,oe.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case Y:return o=Zn(31,f,l,g),o.elementType=Y,o.lanes=y,o;case b:return eo(f.children,g,y,l);case x:Q=8,g|=24;break;case w:return o=Zn(12,f,l,g|2),o.elementType=w,o.lanes=y,o;case R:return o=Zn(13,f,l,g),o.elementType=R,o.lanes=y,o;case _:return o=Zn(19,f,l,g),o.elementType=_,o.lanes=y,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case k:case A:Q=10;break e;case T:Q=9;break e;case $:Q=11;break e;case D:Q=14;break e;case j:Q=16,d=null;break e}Q=29,f=Error(i(130,o===null?"null":typeof o,"")),d=null}return l=Zn(Q,f,l,g),l.elementType=o,l.type=d,l.lanes=y,l}function eo(o,l,f,d){return o=Zn(7,o,d,l),o.lanes=f,o}function rm(o,l,f){return o=Zn(6,o,null,l),o.lanes=f,o}function sm(o,l,f){return l=Zn(4,o.children!==null?o.children:[],o.key,l),l.lanes=f,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var sa=[],oa=0,pf=null,mf=0,ai=[],li=0,to=null,Mr=1,Rr="";function no(o,l){sa[oa++]=mf,sa[oa++]=pf,pf=o,mf=l}function a1(o,l,f){ai[li++]=Mr,ai[li++]=Rr,ai[li++]=to,to=o;var d=Mr;o=Rr;var g=32-Qt(d)-1;d&=~(1<<g),f+=1;var y=32-Qt(l)+g;if(30<y){var Q=g-g%5;y=(d&(1<<Q)-1).toString(32),d>>=Q,g-=Q,Mr=1<<32-Qt(l)+g|f<<g|d,Rr=y+o}else Mr=1<<y|f<<g|d,Rr=o}function om(o){o.return!==null&&(no(o,1),a1(o,1,0))}function am(o){for(;o===pf;)pf=sa[--oa],sa[oa]=null,mf=sa[--oa],sa[oa]=null;for(;o===to;)to=ai[--li],ai[li]=null,Rr=ai[--li],ai[li]=null,Mr=ai[--li],ai[li]=null}var On=null,bt=null,Ge=!1,io=null,Bi=!1,lm=Error(i(519));function ro(o){var l=Error(i(418,""));throw ql(si(l,o)),lm}function l1(o){var l=o.stateNode,f=o.type,d=o.memoizedProps;switch(l[Tt]=o,l[lt]=d,f){case"dialog":Ze("cancel",l),Ze("close",l);break;case"iframe":case"object":case"embed":Ze("load",l);break;case"video":case"audio":for(f=0;f<hc.length;f++)Ze(hc[f],l);break;case"source":Ze("error",l);break;case"img":case"image":case"link":Ze("error",l),Ze("load",l);break;case"details":Ze("toggle",l);break;case"input":Ze("invalid",l),wb(l,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0),ef(l);break;case"select":Ze("invalid",l);break;case"textarea":Ze("invalid",l),Qb(l,d.value,d.defaultValue,d.children),ef(l)}f=d.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||l.textContent===""+f||d.suppressHydrationWarning===!0||QS(l.textContent,f)?(d.popover!=null&&(Ze("beforetoggle",l),Ze("toggle",l)),d.onScroll!=null&&Ze("scroll",l),d.onScrollEnd!=null&&Ze("scrollend",l),d.onClick!=null&&(l.onclick=Wf),l=!0):l=!1,l||ro(o)}function c1(o){for(On=o.return;On;)switch(On.tag){case 5:case 13:Bi=!1;return;case 27:case 3:Bi=!0;return;default:On=On.return}}function Ll(o){if(o!==On)return!1;if(!Ge)return c1(o),Ge=!0,!1;var l=o.tag,f;if((f=l!==3&&l!==27)&&((f=l===5)&&(f=o.type,f=!(f!=="form"&&f!=="button")||kg(o.type,o.memoizedProps)),f=!f),f&&bt&&ro(o),c1(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));e:{for(o=o.nextSibling,l=0;o;){if(o.nodeType===8)if(f=o.data,f==="/$"){if(l===0){bt=Ai(o.nextSibling);break e}l--}else f!=="$"&&f!=="$!"&&f!=="$?"||l++;o=o.nextSibling}bt=null}}else l===27?(l=bt,Ss(o.type)?(o=Pg,Pg=null,bt=o):bt=l):bt=On?Ai(o.stateNode.nextSibling):null;return!0}function zl(){bt=On=null,Ge=!1}function u1(){var o=io;return o!==null&&(Cn===null?Cn=o:Cn.push.apply(Cn,o),io=null),o}function ql(o){io===null?io=[o]:io.push(o)}var cm=q(null),so=null,$r=null;function as(o,l,f){F(cm,l._currentValue),l._currentValue=f}function Er(o){o._currentValue=cm.current,te(cm)}function um(o,l,f){for(;o!==null;){var d=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,d!==null&&(d.childLanes|=l)):d!==null&&(d.childLanes&l)!==l&&(d.childLanes|=l),o===f)break;o=o.return}}function fm(o,l,f,d){var g=o.child;for(g!==null&&(g.return=o);g!==null;){var y=g.dependencies;if(y!==null){var Q=g.child;y=y.firstContext;e:for(;y!==null;){var P=y;y=g;for(var N=0;N<l.length;N++)if(P.context===l[N]){y.lanes|=f,P=y.alternate,P!==null&&(P.lanes|=f),um(y.return,f,o),d||(Q=null);break e}y=P.next}}else if(g.tag===18){if(Q=g.return,Q===null)throw Error(i(341));Q.lanes|=f,y=Q.alternate,y!==null&&(y.lanes|=f),um(Q,f,o),Q=null}else Q=g.child;if(Q!==null)Q.return=g;else for(Q=g;Q!==null;){if(Q===o){Q=null;break}if(g=Q.sibling,g!==null){g.return=Q.return,Q=g;break}Q=Q.return}g=Q}}function Bl(o,l,f,d){o=null;for(var g=l,y=!1;g!==null;){if(!y){if((g.flags&524288)!==0)y=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var Q=g.alternate;if(Q===null)throw Error(i(387));if(Q=Q.memoizedProps,Q!==null){var P=g.type;Nn(g.pendingProps.value,Q.value)||(o!==null?o.push(P):o=[P])}}else if(g===de.current){if(Q=g.alternate,Q===null)throw Error(i(387));Q.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(o!==null?o.push(yc):o=[yc])}g=g.return}o!==null&&fm(l,o,f,d),l.flags|=262144}function gf(o){for(o=o.firstContext;o!==null;){if(!Nn(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function oo(o){so=o,$r=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function cn(o){return f1(so,o)}function Of(o,l){return so===null&&oo(o),f1(o,l)}function f1(o,l){var f=l._currentValue;if(l={context:l,memoizedValue:f,next:null},$r===null){if(o===null)throw Error(i(308));$r=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else $r=$r.next=l;return f}var R5=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(f,d){o.push(d)}};this.abort=function(){l.aborted=!0,o.forEach(function(f){return f()})}},$5=n.unstable_scheduleCallback,E5=n.unstable_NormalPriority,Bt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function hm(){return{controller:new R5,data:new Map,refCount:0}}function Vl(o){o.refCount--,o.refCount===0&&$5(E5,function(){o.controller.abort()})}var Yl=null,dm=0,aa=0,la=null;function _5(o,l){if(Yl===null){var f=Yl=[];dm=0,aa=mg(),la={status:"pending",value:void 0,then:function(d){f.push(d)}}}return dm++,l.then(h1,h1),l}function h1(){if(--dm===0&&Yl!==null){la!==null&&(la.status="fulfilled");var o=Yl;Yl=null,aa=0,la=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function D5(o,l){var f=[],d={status:"pending",value:null,reason:null,then:function(g){f.push(g)}};return o.then(function(){d.status="fulfilled",d.value=l;for(var g=0;g<f.length;g++)(0,f[g])(l)},function(g){for(d.status="rejected",d.reason=g,g=0;g<f.length;g++)(0,f[g])(void 0)}),d}var d1=Z.S;Z.S=function(o,l){typeof l=="object"&&l!==null&&typeof l.then=="function"&&_5(o,l),d1!==null&&d1(o,l)};var ao=q(null);function pm(){var o=ao.current;return o!==null?o:ct.pooledCache}function yf(o,l){l===null?F(ao,ao.current):F(ao,l.pool)}function p1(){var o=pm();return o===null?null:{parent:Bt._currentValue,pool:o}}var Ul=Error(i(460)),m1=Error(i(474)),vf=Error(i(542)),mm={then:function(){}};function g1(o){return o=o.status,o==="fulfilled"||o==="rejected"}function bf(){}function O1(o,l,f){switch(f=o[f],f===void 0?o.push(l):f!==l&&(l.then(bf,bf),l=f),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,v1(o),o;default:if(typeof l.status=="string")l.then(bf,bf);else{if(o=ct,o!==null&&100<o.shellSuspendCounter)throw Error(i(482));o=l,o.status="pending",o.then(function(d){if(l.status==="pending"){var g=l;g.status="fulfilled",g.value=d}},function(d){if(l.status==="pending"){var g=l;g.status="rejected",g.reason=d}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,v1(o),o}throw Gl=l,Ul}}var Gl=null;function y1(){if(Gl===null)throw Error(i(459));var o=Gl;return Gl=null,o}function v1(o){if(o===Ul||o===vf)throw Error(i(483))}var ls=!1;function gm(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Om(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function cs(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function us(o,l,f){var d=o.updateQueue;if(d===null)return null;if(d=d.shared,(He&2)!==0){var g=d.pending;return g===null?l.next=l:(l.next=g.next,g.next=l),d.pending=l,l=hf(o),s1(o,null,f),l}return ff(o,d,l,f),hf(o)}function Il(o,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194048)!==0)){var d=l.lanes;d&=o.pendingLanes,f|=d,l.lanes=f,dt(o,f)}}function ym(o,l){var f=o.updateQueue,d=o.alternate;if(d!==null&&(d=d.updateQueue,f===d)){var g=null,y=null;if(f=f.firstBaseUpdate,f!==null){do{var Q={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};y===null?g=y=Q:y=y.next=Q,f=f.next}while(f!==null);y===null?g=y=l:y=y.next=l}else g=y=l;f={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,callbacks:d.callbacks},o.updateQueue=f;return}o=f.lastBaseUpdate,o===null?f.firstBaseUpdate=l:o.next=l,f.lastBaseUpdate=l}var vm=!1;function Wl(){if(vm){var o=la;if(o!==null)throw o}}function Hl(o,l,f,d){vm=!1;var g=o.updateQueue;ls=!1;var y=g.firstBaseUpdate,Q=g.lastBaseUpdate,P=g.shared.pending;if(P!==null){g.shared.pending=null;var N=P,V=N.next;N.next=null,Q===null?y=V:Q.next=V,Q=N;var ne=o.alternate;ne!==null&&(ne=ne.updateQueue,P=ne.lastBaseUpdate,P!==Q&&(P===null?ne.firstBaseUpdate=V:P.next=V,ne.lastBaseUpdate=N))}if(y!==null){var se=g.baseState;Q=0,ne=V=N=null,P=y;do{var G=P.lane&-536870913,H=G!==P.lane;if(H?(qe&G)===G:(d&G)===G){G!==0&&G===aa&&(vm=!0),ne!==null&&(ne=ne.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Pe=o,Qe=P;G=l;var tt=f;switch(Qe.tag){case 1:if(Pe=Qe.payload,typeof Pe=="function"){se=Pe.call(tt,se,G);break e}se=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Qe.payload,G=typeof Pe=="function"?Pe.call(tt,se,G):Pe,G==null)break e;se=p({},se,G);break e;case 2:ls=!0}}G=P.callback,G!==null&&(o.flags|=64,H&&(o.flags|=8192),H=g.callbacks,H===null?g.callbacks=[G]:H.push(G))}else H={lane:G,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ne===null?(V=ne=H,N=se):ne=ne.next=H,Q|=G;if(P=P.next,P===null){if(P=g.shared.pending,P===null)break;H=P,P=H.next,H.next=null,g.lastBaseUpdate=H,g.shared.pending=null}}while(!0);ne===null&&(N=se),g.baseState=N,g.firstBaseUpdate=V,g.lastBaseUpdate=ne,y===null&&(g.shared.lanes=0),ys|=Q,o.lanes=Q,o.memoizedState=se}}function b1(o,l){if(typeof o!="function")throw Error(i(191,o));o.call(l)}function x1(o,l){var f=o.callbacks;if(f!==null)for(o.callbacks=null,o=0;o<f.length;o++)b1(f[o],l)}var ca=q(null),xf=q(0);function S1(o,l){o=Lr,F(xf,o),F(ca,l),Lr=o|l.baseLanes}function bm(){F(xf,Lr),F(ca,ca.current)}function xm(){Lr=xf.current,te(ca),te(xf)}var fs=0,Ee=null,Je=null,Et=null,Sf=!1,ua=!1,lo=!1,wf=0,Fl=0,fa=null,j5=0;function Pt(){throw Error(i(321))}function Sm(o,l){if(l===null)return!1;for(var f=0;f<l.length&&f<o.length;f++)if(!Nn(o[f],l[f]))return!1;return!0}function wm(o,l,f,d,g,y){return fs=y,Ee=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Z.H=o===null||o.memoizedState===null?sx:ox,lo=!1,y=f(d,g),lo=!1,ua&&(y=k1(l,f,d,g)),w1(o),y}function w1(o){Z.H=Af;var l=Je!==null&&Je.next!==null;if(fs=0,Et=Je=Ee=null,Sf=!1,Fl=0,fa=null,l)throw Error(i(300));o===null||Wt||(o=o.dependencies,o!==null&&gf(o)&&(Wt=!0))}function k1(o,l,f,d){Ee=o;var g=0;do{if(ua&&(fa=null),Fl=0,ua=!1,25<=g)throw Error(i(301));if(g+=1,Et=Je=null,o.updateQueue!=null){var y=o.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}Z.H=B5,y=l(f,d)}while(ua);return y}function N5(){var o=Z.H,l=o.useState()[0];return l=typeof l.then=="function"?Kl(l):l,o=o.useState()[0],(Je!==null?Je.memoizedState:null)!==o&&(Ee.flags|=1024),l}function km(){var o=wf!==0;return wf=0,o}function Qm(o,l,f){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~f}function Cm(o){if(Sf){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}Sf=!1}fs=0,Et=Je=Ee=null,ua=!1,Fl=wf=0,fa=null}function kn(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?Ee.memoizedState=Et=o:Et=Et.next=o,Et}function _t(){if(Je===null){var o=Ee.alternate;o=o!==null?o.memoizedState:null}else o=Je.next;var l=Et===null?Ee.memoizedState:Et.next;if(l!==null)Et=l,Je=o;else{if(o===null)throw Ee.alternate===null?Error(i(467)):Error(i(310));Je=o,o={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},Et===null?Ee.memoizedState=Et=o:Et=Et.next=o}return Et}function Tm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kl(o){var l=Fl;return Fl+=1,fa===null&&(fa=[]),o=O1(fa,o,l),l=Ee,(Et===null?l.memoizedState:Et.next)===null&&(l=l.alternate,Z.H=l===null||l.memoizedState===null?sx:ox),o}function kf(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Kl(o);if(o.$$typeof===A)return cn(o)}throw Error(i(438,String(o)))}function Pm(o){var l=null,f=Ee.updateQueue;if(f!==null&&(l=f.memoCache),l==null){var d=Ee.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(l={data:d.data.map(function(g){return g.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),f===null&&(f=Tm(),Ee.updateQueue=f),f.memoCache=l,f=l.data[l.index],f===void 0)for(f=l.data[l.index]=Array(o),d=0;d<o;d++)f[d]=J;return l.index++,f}function _r(o,l){return typeof l=="function"?l(o):l}function Qf(o){var l=_t();return Am(l,Je,o)}function Am(o,l,f){var d=o.queue;if(d===null)throw Error(i(311));d.lastRenderedReducer=f;var g=o.baseQueue,y=d.pending;if(y!==null){if(g!==null){var Q=g.next;g.next=y.next,y.next=Q}l.baseQueue=g=y,d.pending=null}if(y=o.baseState,g===null)o.memoizedState=y;else{l=g.next;var P=Q=null,N=null,V=l,ne=!1;do{var se=V.lane&-536870913;if(se!==V.lane?(qe&se)===se:(fs&se)===se){var G=V.revertLane;if(G===0)N!==null&&(N=N.next={lane:0,revertLane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),se===aa&&(ne=!0);else if((fs&G)===G){V=V.next,G===aa&&(ne=!0);continue}else se={lane:0,revertLane:V.revertLane,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},N===null?(P=N=se,Q=y):N=N.next=se,Ee.lanes|=G,ys|=G;se=V.action,lo&&f(y,se),y=V.hasEagerState?V.eagerState:f(y,se)}else G={lane:se,revertLane:V.revertLane,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},N===null?(P=N=G,Q=y):N=N.next=G,Ee.lanes|=se,ys|=se;V=V.next}while(V!==null&&V!==l);if(N===null?Q=y:N.next=P,!Nn(y,o.memoizedState)&&(Wt=!0,ne&&(f=la,f!==null)))throw f;o.memoizedState=y,o.baseState=Q,o.baseQueue=N,d.lastRenderedState=y}return g===null&&(d.lanes=0),[o.memoizedState,d.dispatch]}function Mm(o){var l=_t(),f=l.queue;if(f===null)throw Error(i(311));f.lastRenderedReducer=o;var d=f.dispatch,g=f.pending,y=l.memoizedState;if(g!==null){f.pending=null;var Q=g=g.next;do y=o(y,Q.action),Q=Q.next;while(Q!==g);Nn(y,l.memoizedState)||(Wt=!0),l.memoizedState=y,l.baseQueue===null&&(l.baseState=y),f.lastRenderedState=y}return[y,d]}function Q1(o,l,f){var d=Ee,g=_t(),y=Ge;if(y){if(f===void 0)throw Error(i(407));f=f()}else f=l();var Q=!Nn((Je||g).memoizedState,f);Q&&(g.memoizedState=f,Wt=!0),g=g.queue;var P=P1.bind(null,d,g,o);if(Jl(2048,8,P,[o]),g.getSnapshot!==l||Q||Et!==null&&Et.memoizedState.tag&1){if(d.flags|=2048,ha(9,Cf(),T1.bind(null,d,g,f,l),null),ct===null)throw Error(i(349));y||(fs&124)!==0||C1(d,l,f)}return f}function C1(o,l,f){o.flags|=16384,o={getSnapshot:l,value:f},l=Ee.updateQueue,l===null?(l=Tm(),Ee.updateQueue=l,l.stores=[o]):(f=l.stores,f===null?l.stores=[o]:f.push(o))}function T1(o,l,f,d){l.value=f,l.getSnapshot=d,A1(l)&&M1(o)}function P1(o,l,f){return f(function(){A1(l)&&M1(o)})}function A1(o){var l=o.getSnapshot;o=o.value;try{var f=l();return!Nn(o,f)}catch{return!0}}function M1(o){var l=ia(o,2);l!==null&&Bn(l,o,2)}function Rm(o){var l=kn();if(typeof o=="function"){var f=o;if(o=f(),lo){jn(!0);try{f()}finally{jn(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:o},l}function R1(o,l,f,d){return o.baseState=f,Am(o,Je,typeof d=="function"?d:_r)}function Z5(o,l,f,d,g){if(Pf(o))throw Error(i(485));if(o=l.action,o!==null){var y={payload:g,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Q){y.listeners.push(Q)}};Z.T!==null?f(!0):y.isTransition=!1,d(y),f=l.pending,f===null?(y.next=l.pending=y,$1(l,y)):(y.next=f.next,l.pending=f.next=y)}}function $1(o,l){var f=l.action,d=l.payload,g=o.state;if(l.isTransition){var y=Z.T,Q={};Z.T=Q;try{var P=f(g,d),N=Z.S;N!==null&&N(Q,P),E1(o,l,P)}catch(V){$m(o,l,V)}finally{Z.T=y}}else try{y=f(g,d),E1(o,l,y)}catch(V){$m(o,l,V)}}function E1(o,l,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(d){_1(o,l,d)},function(d){return $m(o,l,d)}):_1(o,l,f)}function _1(o,l,f){l.status="fulfilled",l.value=f,D1(l),o.state=f,l=o.pending,l!==null&&(f=l.next,f===l?o.pending=null:(f=f.next,l.next=f,$1(o,f)))}function $m(o,l,f){var d=o.pending;if(o.pending=null,d!==null){d=d.next;do l.status="rejected",l.reason=f,D1(l),l=l.next;while(l!==d)}o.action=null}function D1(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function j1(o,l){return l}function N1(o,l){if(Ge){var f=ct.formState;if(f!==null){e:{var d=Ee;if(Ge){if(bt){t:{for(var g=bt,y=Bi;g.nodeType!==8;){if(!y){g=null;break t}if(g=Ai(g.nextSibling),g===null){g=null;break t}}y=g.data,g=y==="F!"||y==="F"?g:null}if(g){bt=Ai(g.nextSibling),d=g.data==="F!";break e}}ro(d)}d=!1}d&&(l=f[0])}}return f=kn(),f.memoizedState=f.baseState=l,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:j1,lastRenderedState:l},f.queue=d,f=nx.bind(null,Ee,d),d.dispatch=f,d=Rm(!1),y=Nm.bind(null,Ee,!1,d.queue),d=kn(),g={state:l,dispatch:null,action:o,pending:null},d.queue=g,f=Z5.bind(null,Ee,g,y,f),g.dispatch=f,d.memoizedState=o,[l,f,!1]}function Z1(o){var l=_t();return X1(l,Je,o)}function X1(o,l,f){if(l=Am(o,l,j1)[0],o=Qf(_r)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var d=Kl(l)}catch(Q){throw Q===Ul?vf:Q}else d=l;l=_t();var g=l.queue,y=g.dispatch;return f!==l.memoizedState&&(Ee.flags|=2048,ha(9,Cf(),X5.bind(null,g,f),null)),[d,y,o]}function X5(o,l){o.action=l}function L1(o){var l=_t(),f=Je;if(f!==null)return X1(l,f,o);_t(),l=l.memoizedState,f=_t();var d=f.queue.dispatch;return f.memoizedState=o,[l,d,!1]}function ha(o,l,f,d){return o={tag:o,create:f,deps:d,inst:l,next:null},l=Ee.updateQueue,l===null&&(l=Tm(),Ee.updateQueue=l),f=l.lastEffect,f===null?l.lastEffect=o.next=o:(d=f.next,f.next=o,o.next=d,l.lastEffect=o),o}function Cf(){return{destroy:void 0,resource:void 0}}function z1(){return _t().memoizedState}function Tf(o,l,f,d){var g=kn();d=d===void 0?null:d,Ee.flags|=o,g.memoizedState=ha(1|l,Cf(),f,d)}function Jl(o,l,f,d){var g=_t();d=d===void 0?null:d;var y=g.memoizedState.inst;Je!==null&&d!==null&&Sm(d,Je.memoizedState.deps)?g.memoizedState=ha(l,y,f,d):(Ee.flags|=o,g.memoizedState=ha(1|l,y,f,d))}function q1(o,l){Tf(8390656,8,o,l)}function B1(o,l){Jl(2048,8,o,l)}function V1(o,l){return Jl(4,2,o,l)}function Y1(o,l){return Jl(4,4,o,l)}function U1(o,l){if(typeof l=="function"){o=o();var f=l(o);return function(){typeof f=="function"?f():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function G1(o,l,f){f=f!=null?f.concat([o]):null,Jl(4,4,U1.bind(null,l,o),f)}function Em(){}function I1(o,l){var f=_t();l=l===void 0?null:l;var d=f.memoizedState;return l!==null&&Sm(l,d[1])?d[0]:(f.memoizedState=[o,l],o)}function W1(o,l){var f=_t();l=l===void 0?null:l;var d=f.memoizedState;if(l!==null&&Sm(l,d[1]))return d[0];if(d=o(),lo){jn(!0);try{o()}finally{jn(!1)}}return f.memoizedState=[d,l],d}function _m(o,l,f){return f===void 0||(fs&1073741824)!==0?o.memoizedState=l:(o.memoizedState=f,o=Kx(),Ee.lanes|=o,ys|=o,f)}function H1(o,l,f,d){return Nn(f,l)?f:ca.current!==null?(o=_m(o,f,d),Nn(o,l)||(Wt=!0),o):(fs&42)===0?(Wt=!0,o.memoizedState=f):(o=Kx(),Ee.lanes|=o,ys|=o,l)}function F1(o,l,f,d,g){var y=U.p;U.p=y!==0&&8>y?y:8;var Q=Z.T,P={};Z.T=P,Nm(o,!1,l,f);try{var N=g(),V=Z.S;if(V!==null&&V(P,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var ne=D5(N,d);ec(o,l,ne,qn(o))}else ec(o,l,d,qn(o))}catch(se){ec(o,l,{then:function(){},status:"rejected",reason:se},qn())}finally{U.p=y,Z.T=Q}}function L5(){}function Dm(o,l,f,d){if(o.tag!==5)throw Error(i(476));var g=K1(o).queue;F1(o,g,l,z,f===null?L5:function(){return J1(o),f(d)})}function K1(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:z},next:null};var f={};return l.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:f},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function J1(o){var l=K1(o).next.queue;ec(o,l,{},qn())}function jm(){return cn(yc)}function ex(){return _t().memoizedState}function tx(){return _t().memoizedState}function z5(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var f=qn();o=cs(f);var d=us(l,o,f);d!==null&&(Bn(d,l,f),Il(d,l,f)),l={cache:hm()},o.payload=l;return}l=l.return}}function q5(o,l,f){var d=qn();f={lane:d,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null},Pf(o)?ix(l,f):(f=nm(o,l,f,d),f!==null&&(Bn(f,o,d),rx(f,l,d)))}function nx(o,l,f){var d=qn();ec(o,l,f,d)}function ec(o,l,f,d){var g={lane:d,revertLane:0,action:f,hasEagerState:!1,eagerState:null,next:null};if(Pf(o))ix(l,g);else{var y=o.alternate;if(o.lanes===0&&(y===null||y.lanes===0)&&(y=l.lastRenderedReducer,y!==null))try{var Q=l.lastRenderedState,P=y(Q,f);if(g.hasEagerState=!0,g.eagerState=P,Nn(P,Q))return ff(o,l,g,0),ct===null&&uf(),!1}catch{}finally{}if(f=nm(o,l,g,d),f!==null)return Bn(f,o,d),rx(f,l,d),!0}return!1}function Nm(o,l,f,d){if(d={lane:2,revertLane:mg(),action:d,hasEagerState:!1,eagerState:null,next:null},Pf(o)){if(l)throw Error(i(479))}else l=nm(o,f,d,2),l!==null&&Bn(l,o,2)}function Pf(o){var l=o.alternate;return o===Ee||l!==null&&l===Ee}function ix(o,l){ua=Sf=!0;var f=o.pending;f===null?l.next=l:(l.next=f.next,f.next=l),o.pending=l}function rx(o,l,f){if((f&4194048)!==0){var d=l.lanes;d&=o.pendingLanes,f|=d,l.lanes=f,dt(o,f)}}var Af={readContext:cn,use:kf,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt},sx={readContext:cn,use:kf,useCallback:function(o,l){return kn().memoizedState=[o,l===void 0?null:l],o},useContext:cn,useEffect:q1,useImperativeHandle:function(o,l,f){f=f!=null?f.concat([o]):null,Tf(4194308,4,U1.bind(null,l,o),f)},useLayoutEffect:function(o,l){return Tf(4194308,4,o,l)},useInsertionEffect:function(o,l){Tf(4,2,o,l)},useMemo:function(o,l){var f=kn();l=l===void 0?null:l;var d=o();if(lo){jn(!0);try{o()}finally{jn(!1)}}return f.memoizedState=[d,l],d},useReducer:function(o,l,f){var d=kn();if(f!==void 0){var g=f(l);if(lo){jn(!0);try{f(l)}finally{jn(!1)}}}else g=l;return d.memoizedState=d.baseState=g,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:g},d.queue=o,o=o.dispatch=q5.bind(null,Ee,o),[d.memoizedState,o]},useRef:function(o){var l=kn();return o={current:o},l.memoizedState=o},useState:function(o){o=Rm(o);var l=o.queue,f=nx.bind(null,Ee,l);return l.dispatch=f,[o.memoizedState,f]},useDebugValue:Em,useDeferredValue:function(o,l){var f=kn();return _m(f,o,l)},useTransition:function(){var o=Rm(!1);return o=F1.bind(null,Ee,o.queue,!0,!1),kn().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,f){var d=Ee,g=kn();if(Ge){if(f===void 0)throw Error(i(407));f=f()}else{if(f=l(),ct===null)throw Error(i(349));(qe&124)!==0||C1(d,l,f)}g.memoizedState=f;var y={value:f,getSnapshot:l};return g.queue=y,q1(P1.bind(null,d,y,o),[o]),d.flags|=2048,ha(9,Cf(),T1.bind(null,d,y,f,l),null),f},useId:function(){var o=kn(),l=ct.identifierPrefix;if(Ge){var f=Rr,d=Mr;f=(d&~(1<<32-Qt(d)-1)).toString(32)+f,l="«"+l+"R"+f,f=wf++,0<f&&(l+="H"+f.toString(32)),l+="»"}else f=j5++,l="«"+l+"r"+f.toString(32)+"»";return o.memoizedState=l},useHostTransitionStatus:jm,useFormState:N1,useActionState:N1,useOptimistic:function(o){var l=kn();l.memoizedState=l.baseState=o;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=f,l=Nm.bind(null,Ee,!0,f),f.dispatch=l,[o,l]},useMemoCache:Pm,useCacheRefresh:function(){return kn().memoizedState=z5.bind(null,Ee)}},ox={readContext:cn,use:kf,useCallback:I1,useContext:cn,useEffect:B1,useImperativeHandle:G1,useInsertionEffect:V1,useLayoutEffect:Y1,useMemo:W1,useReducer:Qf,useRef:z1,useState:function(){return Qf(_r)},useDebugValue:Em,useDeferredValue:function(o,l){var f=_t();return H1(f,Je.memoizedState,o,l)},useTransition:function(){var o=Qf(_r)[0],l=_t().memoizedState;return[typeof o=="boolean"?o:Kl(o),l]},useSyncExternalStore:Q1,useId:ex,useHostTransitionStatus:jm,useFormState:Z1,useActionState:Z1,useOptimistic:function(o,l){var f=_t();return R1(f,Je,o,l)},useMemoCache:Pm,useCacheRefresh:tx},B5={readContext:cn,use:kf,useCallback:I1,useContext:cn,useEffect:B1,useImperativeHandle:G1,useInsertionEffect:V1,useLayoutEffect:Y1,useMemo:W1,useReducer:Mm,useRef:z1,useState:function(){return Mm(_r)},useDebugValue:Em,useDeferredValue:function(o,l){var f=_t();return Je===null?_m(f,o,l):H1(f,Je.memoizedState,o,l)},useTransition:function(){var o=Mm(_r)[0],l=_t().memoizedState;return[typeof o=="boolean"?o:Kl(o),l]},useSyncExternalStore:Q1,useId:ex,useHostTransitionStatus:jm,useFormState:L1,useActionState:L1,useOptimistic:function(o,l){var f=_t();return Je!==null?R1(f,Je,o,l):(f.baseState=o,[o,f.queue.dispatch])},useMemoCache:Pm,useCacheRefresh:tx},da=null,tc=0;function Mf(o){var l=tc;return tc+=1,da===null&&(da=[]),O1(da,o,l)}function nc(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Rf(o,l){throw l.$$typeof===m?Error(i(525)):(o=Object.prototype.toString.call(l),Error(i(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function ax(o){var l=o._init;return l(o._payload)}function lx(o){function l(L,X){if(o){var B=L.deletions;B===null?(L.deletions=[X],L.flags|=16):B.push(X)}}function f(L,X){if(!o)return null;for(;X!==null;)l(L,X),X=X.sibling;return null}function d(L){for(var X=new Map;L!==null;)L.key!==null?X.set(L.key,L):X.set(L.index,L),L=L.sibling;return X}function g(L,X){return L=Ar(L,X),L.index=0,L.sibling=null,L}function y(L,X,B){return L.index=B,o?(B=L.alternate,B!==null?(B=B.index,B<X?(L.flags|=67108866,X):B):(L.flags|=67108866,X)):(L.flags|=1048576,X)}function Q(L){return o&&L.alternate===null&&(L.flags|=67108866),L}function P(L,X,B,ie){return X===null||X.tag!==6?(X=rm(B,L.mode,ie),X.return=L,X):(X=g(X,B),X.return=L,X)}function N(L,X,B,ie){var ye=B.type;return ye===b?ne(L,X,B.props.children,ie,B.key):X!==null&&(X.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===j&&ax(ye)===X.type)?(X=g(X,B.props),nc(X,B),X.return=L,X):(X=df(B.type,B.key,B.props,null,L.mode,ie),nc(X,B),X.return=L,X)}function V(L,X,B,ie){return X===null||X.tag!==4||X.stateNode.containerInfo!==B.containerInfo||X.stateNode.implementation!==B.implementation?(X=sm(B,L.mode,ie),X.return=L,X):(X=g(X,B.children||[]),X.return=L,X)}function ne(L,X,B,ie,ye){return X===null||X.tag!==7?(X=eo(B,L.mode,ie,ye),X.return=L,X):(X=g(X,B),X.return=L,X)}function se(L,X,B){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=rm(""+X,L.mode,B),X.return=L,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case O:return B=df(X.type,X.key,X.props,null,L.mode,B),nc(B,X),B.return=L,B;case v:return X=sm(X,L.mode,B),X.return=L,X;case j:var ie=X._init;return X=ie(X._payload),se(L,X,B)}if(ce(X)||W(X))return X=eo(X,L.mode,B,null),X.return=L,X;if(typeof X.then=="function")return se(L,Mf(X),B);if(X.$$typeof===A)return se(L,Of(L,X),B);Rf(L,X)}return null}function G(L,X,B,ie){var ye=X!==null?X.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return ye!==null?null:P(L,X,""+B,ie);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case O:return B.key===ye?N(L,X,B,ie):null;case v:return B.key===ye?V(L,X,B,ie):null;case j:return ye=B._init,B=ye(B._payload),G(L,X,B,ie)}if(ce(B)||W(B))return ye!==null?null:ne(L,X,B,ie,null);if(typeof B.then=="function")return G(L,X,Mf(B),ie);if(B.$$typeof===A)return G(L,X,Of(L,B),ie);Rf(L,B)}return null}function H(L,X,B,ie,ye){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return L=L.get(B)||null,P(X,L,""+ie,ye);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case O:return L=L.get(ie.key===null?B:ie.key)||null,N(X,L,ie,ye);case v:return L=L.get(ie.key===null?B:ie.key)||null,V(X,L,ie,ye);case j:var De=ie._init;return ie=De(ie._payload),H(L,X,B,ie,ye)}if(ce(ie)||W(ie))return L=L.get(B)||null,ne(X,L,ie,ye,null);if(typeof ie.then=="function")return H(L,X,B,Mf(ie),ye);if(ie.$$typeof===A)return H(L,X,B,Of(X,ie),ye);Rf(X,ie)}return null}function Pe(L,X,B,ie){for(var ye=null,De=null,we=X,Ce=X=0,Ft=null;we!==null&&Ce<B.length;Ce++){we.index>Ce?(Ft=we,we=null):Ft=we.sibling;var Ye=G(L,we,B[Ce],ie);if(Ye===null){we===null&&(we=Ft);break}o&&we&&Ye.alternate===null&&l(L,we),X=y(Ye,X,Ce),De===null?ye=Ye:De.sibling=Ye,De=Ye,we=Ft}if(Ce===B.length)return f(L,we),Ge&&no(L,Ce),ye;if(we===null){for(;Ce<B.length;Ce++)we=se(L,B[Ce],ie),we!==null&&(X=y(we,X,Ce),De===null?ye=we:De.sibling=we,De=we);return Ge&&no(L,Ce),ye}for(we=d(we);Ce<B.length;Ce++)Ft=H(we,L,Ce,B[Ce],ie),Ft!==null&&(o&&Ft.alternate!==null&&we.delete(Ft.key===null?Ce:Ft.key),X=y(Ft,X,Ce),De===null?ye=Ft:De.sibling=Ft,De=Ft);return o&&we.forEach(function(Ts){return l(L,Ts)}),Ge&&no(L,Ce),ye}function Qe(L,X,B,ie){if(B==null)throw Error(i(151));for(var ye=null,De=null,we=X,Ce=X=0,Ft=null,Ye=B.next();we!==null&&!Ye.done;Ce++,Ye=B.next()){we.index>Ce?(Ft=we,we=null):Ft=we.sibling;var Ts=G(L,we,Ye.value,ie);if(Ts===null){we===null&&(we=Ft);break}o&&we&&Ts.alternate===null&&l(L,we),X=y(Ts,X,Ce),De===null?ye=Ts:De.sibling=Ts,De=Ts,we=Ft}if(Ye.done)return f(L,we),Ge&&no(L,Ce),ye;if(we===null){for(;!Ye.done;Ce++,Ye=B.next())Ye=se(L,Ye.value,ie),Ye!==null&&(X=y(Ye,X,Ce),De===null?ye=Ye:De.sibling=Ye,De=Ye);return Ge&&no(L,Ce),ye}for(we=d(we);!Ye.done;Ce++,Ye=B.next())Ye=H(we,L,Ce,Ye.value,ie),Ye!==null&&(o&&Ye.alternate!==null&&we.delete(Ye.key===null?Ce:Ye.key),X=y(Ye,X,Ce),De===null?ye=Ye:De.sibling=Ye,De=Ye);return o&&we.forEach(function(V3){return l(L,V3)}),Ge&&no(L,Ce),ye}function tt(L,X,B,ie){if(typeof B=="object"&&B!==null&&B.type===b&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case O:e:{for(var ye=B.key;X!==null;){if(X.key===ye){if(ye=B.type,ye===b){if(X.tag===7){f(L,X.sibling),ie=g(X,B.props.children),ie.return=L,L=ie;break e}}else if(X.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===j&&ax(ye)===X.type){f(L,X.sibling),ie=g(X,B.props),nc(ie,B),ie.return=L,L=ie;break e}f(L,X);break}else l(L,X);X=X.sibling}B.type===b?(ie=eo(B.props.children,L.mode,ie,B.key),ie.return=L,L=ie):(ie=df(B.type,B.key,B.props,null,L.mode,ie),nc(ie,B),ie.return=L,L=ie)}return Q(L);case v:e:{for(ye=B.key;X!==null;){if(X.key===ye)if(X.tag===4&&X.stateNode.containerInfo===B.containerInfo&&X.stateNode.implementation===B.implementation){f(L,X.sibling),ie=g(X,B.children||[]),ie.return=L,L=ie;break e}else{f(L,X);break}else l(L,X);X=X.sibling}ie=sm(B,L.mode,ie),ie.return=L,L=ie}return Q(L);case j:return ye=B._init,B=ye(B._payload),tt(L,X,B,ie)}if(ce(B))return Pe(L,X,B,ie);if(W(B)){if(ye=W(B),typeof ye!="function")throw Error(i(150));return B=ye.call(B),Qe(L,X,B,ie)}if(typeof B.then=="function")return tt(L,X,Mf(B),ie);if(B.$$typeof===A)return tt(L,X,Of(L,B),ie);Rf(L,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,X!==null&&X.tag===6?(f(L,X.sibling),ie=g(X,B),ie.return=L,L=ie):(f(L,X),ie=rm(B,L.mode,ie),ie.return=L,L=ie),Q(L)):f(L,X)}return function(L,X,B,ie){try{tc=0;var ye=tt(L,X,B,ie);return da=null,ye}catch(we){if(we===Ul||we===vf)throw we;var De=Zn(29,we,null,L.mode);return De.lanes=ie,De.return=L,De}finally{}}}var pa=lx(!0),cx=lx(!1),ci=q(null),Vi=null;function hs(o){var l=o.alternate;F(Vt,Vt.current&1),F(ci,o),Vi===null&&(l===null||ca.current!==null||l.memoizedState!==null)&&(Vi=o)}function ux(o){if(o.tag===22){if(F(Vt,Vt.current),F(ci,o),Vi===null){var l=o.alternate;l!==null&&l.memoizedState!==null&&(Vi=o)}}else ds()}function ds(){F(Vt,Vt.current),F(ci,ci.current)}function Dr(o){te(ci),Vi===o&&(Vi=null),te(Vt)}var Vt=q(0);function $f(o){for(var l=o;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||f.data==="$?"||Tg(f)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}function Zm(o,l,f,d){l=o.memoizedState,f=f(d,l),f=f==null?l:p({},l,f),o.memoizedState=f,o.lanes===0&&(o.updateQueue.baseState=f)}var Xm={enqueueSetState:function(o,l,f){o=o._reactInternals;var d=qn(),g=cs(d);g.payload=l,f!=null&&(g.callback=f),l=us(o,g,d),l!==null&&(Bn(l,o,d),Il(l,o,d))},enqueueReplaceState:function(o,l,f){o=o._reactInternals;var d=qn(),g=cs(d);g.tag=1,g.payload=l,f!=null&&(g.callback=f),l=us(o,g,d),l!==null&&(Bn(l,o,d),Il(l,o,d))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var f=qn(),d=cs(f);d.tag=2,l!=null&&(d.callback=l),l=us(o,d,f),l!==null&&(Bn(l,o,f),Il(l,o,f))}};function fx(o,l,f,d,g,y,Q){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(d,y,Q):l.prototype&&l.prototype.isPureReactComponent?!Zl(f,d)||!Zl(g,y):!0}function hx(o,l,f,d){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,d),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,d),l.state!==o&&Xm.enqueueReplaceState(l,l.state,null)}function co(o,l){var f=l;if("ref"in l){f={};for(var d in l)d!=="ref"&&(f[d]=l[d])}if(o=o.defaultProps){f===l&&(f=p({},f));for(var g in o)f[g]===void 0&&(f[g]=o[g])}return f}var Ef=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)};function dx(o){Ef(o)}function px(o){console.error(o)}function mx(o){Ef(o)}function _f(o,l){try{var f=o.onUncaughtError;f(l.value,{componentStack:l.stack})}catch(d){setTimeout(function(){throw d})}}function gx(o,l,f){try{var d=o.onCaughtError;d(f.value,{componentStack:f.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Lm(o,l,f){return f=cs(f),f.tag=3,f.payload={element:null},f.callback=function(){_f(o,l)},f}function Ox(o){return o=cs(o),o.tag=3,o}function yx(o,l,f,d){var g=f.type.getDerivedStateFromError;if(typeof g=="function"){var y=d.value;o.payload=function(){return g(y)},o.callback=function(){gx(l,f,d)}}var Q=f.stateNode;Q!==null&&typeof Q.componentDidCatch=="function"&&(o.callback=function(){gx(l,f,d),typeof g!="function"&&(vs===null?vs=new Set([this]):vs.add(this));var P=d.stack;this.componentDidCatch(d.value,{componentStack:P!==null?P:""})})}function V5(o,l,f,d,g){if(f.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(l=f.alternate,l!==null&&Bl(l,f,g,!0),f=ci.current,f!==null){switch(f.tag){case 13:return Vi===null?ug():f.alternate===null&&xt===0&&(xt=3),f.flags&=-257,f.flags|=65536,f.lanes=g,d===mm?f.flags|=16384:(l=f.updateQueue,l===null?f.updateQueue=new Set([d]):l.add(d),hg(o,d,g)),!1;case 22:return f.flags|=65536,d===mm?f.flags|=16384:(l=f.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([d])},f.updateQueue=l):(f=l.retryQueue,f===null?l.retryQueue=new Set([d]):f.add(d)),hg(o,d,g)),!1}throw Error(i(435,f.tag))}return hg(o,d,g),ug(),!1}if(Ge)return l=ci.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=g,d!==lm&&(o=Error(i(422),{cause:d}),ql(si(o,f)))):(d!==lm&&(l=Error(i(423),{cause:d}),ql(si(l,f))),o=o.current.alternate,o.flags|=65536,g&=-g,o.lanes|=g,d=si(d,f),g=Lm(o.stateNode,d,g),ym(o,g),xt!==4&&(xt=2)),!1;var y=Error(i(520),{cause:d});if(y=si(y,f),cc===null?cc=[y]:cc.push(y),xt!==4&&(xt=2),l===null)return!0;d=si(d,f),f=l;do{switch(f.tag){case 3:return f.flags|=65536,o=g&-g,f.lanes|=o,o=Lm(f.stateNode,d,o),ym(f,o),!1;case 1:if(l=f.type,y=f.stateNode,(f.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(vs===null||!vs.has(y))))return f.flags|=65536,g&=-g,f.lanes|=g,g=Ox(g),yx(g,o,f,d),ym(f,g),!1}f=f.return}while(f!==null);return!1}var vx=Error(i(461)),Wt=!1;function Jt(o,l,f,d){l.child=o===null?cx(l,null,f,d):pa(l,o.child,f,d)}function bx(o,l,f,d,g){f=f.render;var y=l.ref;if("ref"in d){var Q={};for(var P in d)P!=="ref"&&(Q[P]=d[P])}else Q=d;return oo(l),d=wm(o,l,f,Q,y,g),P=km(),o!==null&&!Wt?(Qm(o,l,g),jr(o,l,g)):(Ge&&P&&om(l),l.flags|=1,Jt(o,l,d,g),l.child)}function xx(o,l,f,d,g){if(o===null){var y=f.type;return typeof y=="function"&&!im(y)&&y.defaultProps===void 0&&f.compare===null?(l.tag=15,l.type=y,Sx(o,l,y,d,g)):(o=df(f.type,null,d,l,l.mode,g),o.ref=l.ref,o.return=l,l.child=o)}if(y=o.child,!Im(o,g)){var Q=y.memoizedProps;if(f=f.compare,f=f!==null?f:Zl,f(Q,d)&&o.ref===l.ref)return jr(o,l,g)}return l.flags|=1,o=Ar(y,d),o.ref=l.ref,o.return=l,l.child=o}function Sx(o,l,f,d,g){if(o!==null){var y=o.memoizedProps;if(Zl(y,d)&&o.ref===l.ref)if(Wt=!1,l.pendingProps=d=y,Im(o,g))(o.flags&131072)!==0&&(Wt=!0);else return l.lanes=o.lanes,jr(o,l,g)}return zm(o,l,f,d,g)}function wx(o,l,f){var d=l.pendingProps,g=d.children,y=o!==null?o.memoizedState:null;if(d.mode==="hidden"){if((l.flags&128)!==0){if(d=y!==null?y.baseLanes|f:f,o!==null){for(g=l.child=o.child,y=0;g!==null;)y=y|g.lanes|g.childLanes,g=g.sibling;l.childLanes=y&~d}else l.childLanes=0,l.child=null;return kx(o,l,d,f)}if((f&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&yf(l,y!==null?y.cachePool:null),y!==null?S1(l,y):bm(),ux(l);else return l.lanes=l.childLanes=536870912,kx(o,l,y!==null?y.baseLanes|f:f,f)}else y!==null?(yf(l,y.cachePool),S1(l,y),ds(),l.memoizedState=null):(o!==null&&yf(l,null),bm(),ds());return Jt(o,l,g,f),l.child}function kx(o,l,f,d){var g=pm();return g=g===null?null:{parent:Bt._currentValue,pool:g},l.memoizedState={baseLanes:f,cachePool:g},o!==null&&yf(l,null),bm(),ux(l),o!==null&&Bl(o,l,d,!0),null}function Df(o,l){var f=l.ref;if(f===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(i(284));(o===null||o.ref!==f)&&(l.flags|=4194816)}}function zm(o,l,f,d,g){return oo(l),f=wm(o,l,f,d,void 0,g),d=km(),o!==null&&!Wt?(Qm(o,l,g),jr(o,l,g)):(Ge&&d&&om(l),l.flags|=1,Jt(o,l,f,g),l.child)}function Qx(o,l,f,d,g,y){return oo(l),l.updateQueue=null,f=k1(l,d,f,g),w1(o),d=km(),o!==null&&!Wt?(Qm(o,l,y),jr(o,l,y)):(Ge&&d&&om(l),l.flags|=1,Jt(o,l,f,y),l.child)}function Cx(o,l,f,d,g){if(oo(l),l.stateNode===null){var y=ra,Q=f.contextType;typeof Q=="object"&&Q!==null&&(y=cn(Q)),y=new f(d,y),l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Xm,l.stateNode=y,y._reactInternals=l,y=l.stateNode,y.props=d,y.state=l.memoizedState,y.refs={},gm(l),Q=f.contextType,y.context=typeof Q=="object"&&Q!==null?cn(Q):ra,y.state=l.memoizedState,Q=f.getDerivedStateFromProps,typeof Q=="function"&&(Zm(l,f,Q,d),y.state=l.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(Q=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),Q!==y.state&&Xm.enqueueReplaceState(y,y.state,null),Hl(l,d,y,g),Wl(),y.state=l.memoizedState),typeof y.componentDidMount=="function"&&(l.flags|=4194308),d=!0}else if(o===null){y=l.stateNode;var P=l.memoizedProps,N=co(f,P);y.props=N;var V=y.context,ne=f.contextType;Q=ra,typeof ne=="object"&&ne!==null&&(Q=cn(ne));var se=f.getDerivedStateFromProps;ne=typeof se=="function"||typeof y.getSnapshotBeforeUpdate=="function",P=l.pendingProps!==P,ne||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(P||V!==Q)&&hx(l,y,d,Q),ls=!1;var G=l.memoizedState;y.state=G,Hl(l,d,y,g),Wl(),V=l.memoizedState,P||G!==V||ls?(typeof se=="function"&&(Zm(l,f,se,d),V=l.memoizedState),(N=ls||fx(l,f,N,d,G,V,Q))?(ne||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(l.flags|=4194308)):(typeof y.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=d,l.memoizedState=V),y.props=d,y.state=V,y.context=Q,d=N):(typeof y.componentDidMount=="function"&&(l.flags|=4194308),d=!1)}else{y=l.stateNode,Om(o,l),Q=l.memoizedProps,ne=co(f,Q),y.props=ne,se=l.pendingProps,G=y.context,V=f.contextType,N=ra,typeof V=="object"&&V!==null&&(N=cn(V)),P=f.getDerivedStateFromProps,(V=typeof P=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(Q!==se||G!==N)&&hx(l,y,d,N),ls=!1,G=l.memoizedState,y.state=G,Hl(l,d,y,g),Wl();var H=l.memoizedState;Q!==se||G!==H||ls||o!==null&&o.dependencies!==null&&gf(o.dependencies)?(typeof P=="function"&&(Zm(l,f,P,d),H=l.memoizedState),(ne=ls||fx(l,f,ne,d,G,H,N)||o!==null&&o.dependencies!==null&&gf(o.dependencies))?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(d,H,N),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(d,H,N)),typeof y.componentDidUpdate=="function"&&(l.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof y.componentDidUpdate!="function"||Q===o.memoizedProps&&G===o.memoizedState||(l.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||Q===o.memoizedProps&&G===o.memoizedState||(l.flags|=1024),l.memoizedProps=d,l.memoizedState=H),y.props=d,y.state=H,y.context=N,d=ne):(typeof y.componentDidUpdate!="function"||Q===o.memoizedProps&&G===o.memoizedState||(l.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||Q===o.memoizedProps&&G===o.memoizedState||(l.flags|=1024),d=!1)}return y=d,Df(o,l),d=(l.flags&128)!==0,y||d?(y=l.stateNode,f=d&&typeof f.getDerivedStateFromError!="function"?null:y.render(),l.flags|=1,o!==null&&d?(l.child=pa(l,o.child,null,g),l.child=pa(l,null,f,g)):Jt(o,l,f,g),l.memoizedState=y.state,o=l.child):o=jr(o,l,g),o}function Tx(o,l,f,d){return zl(),l.flags|=256,Jt(o,l,f,d),l.child}var qm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bm(o){return{baseLanes:o,cachePool:p1()}}function Vm(o,l,f){return o=o!==null?o.childLanes&~f:0,l&&(o|=ui),o}function Px(o,l,f){var d=l.pendingProps,g=!1,y=(l.flags&128)!==0,Q;if((Q=y)||(Q=o!==null&&o.memoizedState===null?!1:(Vt.current&2)!==0),Q&&(g=!0,l.flags&=-129),Q=(l.flags&32)!==0,l.flags&=-33,o===null){if(Ge){if(g?hs(l):ds(),Ge){var P=bt,N;if(N=P){e:{for(N=P,P=Bi;N.nodeType!==8;){if(!P){P=null;break e}if(N=Ai(N.nextSibling),N===null){P=null;break e}}P=N}P!==null?(l.memoizedState={dehydrated:P,treeContext:to!==null?{id:Mr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},N=Zn(18,null,null,0),N.stateNode=P,N.return=l,l.child=N,On=l,bt=null,N=!0):N=!1}N||ro(l)}if(P=l.memoizedState,P!==null&&(P=P.dehydrated,P!==null))return Tg(P)?l.lanes=32:l.lanes=536870912,null;Dr(l)}return P=d.children,d=d.fallback,g?(ds(),g=l.mode,P=jf({mode:"hidden",children:P},g),d=eo(d,g,f,null),P.return=l,d.return=l,P.sibling=d,l.child=P,g=l.child,g.memoizedState=Bm(f),g.childLanes=Vm(o,Q,f),l.memoizedState=qm,d):(hs(l),Ym(l,P))}if(N=o.memoizedState,N!==null&&(P=N.dehydrated,P!==null)){if(y)l.flags&256?(hs(l),l.flags&=-257,l=Um(o,l,f)):l.memoizedState!==null?(ds(),l.child=o.child,l.flags|=128,l=null):(ds(),g=d.fallback,P=l.mode,d=jf({mode:"visible",children:d.children},P),g=eo(g,P,f,null),g.flags|=2,d.return=l,g.return=l,d.sibling=g,l.child=d,pa(l,o.child,null,f),d=l.child,d.memoizedState=Bm(f),d.childLanes=Vm(o,Q,f),l.memoizedState=qm,l=g);else if(hs(l),Tg(P)){if(Q=P.nextSibling&&P.nextSibling.dataset,Q)var V=Q.dgst;Q=V,d=Error(i(419)),d.stack="",d.digest=Q,ql({value:d,source:null,stack:null}),l=Um(o,l,f)}else if(Wt||Bl(o,l,f,!1),Q=(f&o.childLanes)!==0,Wt||Q){if(Q=ct,Q!==null&&(d=f&-f,d=(d&42)!==0?1:gt(d),d=(d&(Q.suspendedLanes|f))!==0?0:d,d!==0&&d!==N.retryLane))throw N.retryLane=d,ia(o,d),Bn(Q,o,d),vx;P.data==="$?"||ug(),l=Um(o,l,f)}else P.data==="$?"?(l.flags|=192,l.child=o.child,l=null):(o=N.treeContext,bt=Ai(P.nextSibling),On=l,Ge=!0,io=null,Bi=!1,o!==null&&(ai[li++]=Mr,ai[li++]=Rr,ai[li++]=to,Mr=o.id,Rr=o.overflow,to=l),l=Ym(l,d.children),l.flags|=4096);return l}return g?(ds(),g=d.fallback,P=l.mode,N=o.child,V=N.sibling,d=Ar(N,{mode:"hidden",children:d.children}),d.subtreeFlags=N.subtreeFlags&65011712,V!==null?g=Ar(V,g):(g=eo(g,P,f,null),g.flags|=2),g.return=l,d.return=l,d.sibling=g,l.child=d,d=g,g=l.child,P=o.child.memoizedState,P===null?P=Bm(f):(N=P.cachePool,N!==null?(V=Bt._currentValue,N=N.parent!==V?{parent:V,pool:V}:N):N=p1(),P={baseLanes:P.baseLanes|f,cachePool:N}),g.memoizedState=P,g.childLanes=Vm(o,Q,f),l.memoizedState=qm,d):(hs(l),f=o.child,o=f.sibling,f=Ar(f,{mode:"visible",children:d.children}),f.return=l,f.sibling=null,o!==null&&(Q=l.deletions,Q===null?(l.deletions=[o],l.flags|=16):Q.push(o)),l.child=f,l.memoizedState=null,f)}function Ym(o,l){return l=jf({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function jf(o,l){return o=Zn(22,o,null,l),o.lanes=0,o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},o}function Um(o,l,f){return pa(l,o.child,null,f),o=Ym(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function Ax(o,l,f){o.lanes|=l;var d=o.alternate;d!==null&&(d.lanes|=l),um(o.return,l,f)}function Gm(o,l,f,d,g){var y=o.memoizedState;y===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:d,tail:f,tailMode:g}:(y.isBackwards=l,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=f,y.tailMode=g)}function Mx(o,l,f){var d=l.pendingProps,g=d.revealOrder,y=d.tail;if(Jt(o,l,d.children,f),d=Vt.current,(d&2)!==0)d=d&1|2,l.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&Ax(o,f,l);else if(o.tag===19)Ax(o,f,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}d&=1}switch(F(Vt,d),g){case"forwards":for(f=l.child,g=null;f!==null;)o=f.alternate,o!==null&&$f(o)===null&&(g=f),f=f.sibling;f=g,f===null?(g=l.child,l.child=null):(g=f.sibling,f.sibling=null),Gm(l,!1,g,f,y);break;case"backwards":for(f=null,g=l.child,l.child=null;g!==null;){if(o=g.alternate,o!==null&&$f(o)===null){l.child=g;break}o=g.sibling,g.sibling=f,f=g,g=o}Gm(l,!0,f,null,y);break;case"together":Gm(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function jr(o,l,f){if(o!==null&&(l.dependencies=o.dependencies),ys|=l.lanes,(f&l.childLanes)===0)if(o!==null){if(Bl(o,l,f,!1),(f&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(i(153));if(l.child!==null){for(o=l.child,f=Ar(o,o.pendingProps),l.child=f,f.return=l;o.sibling!==null;)o=o.sibling,f=f.sibling=Ar(o,o.pendingProps),f.return=l;f.sibling=null}return l.child}function Im(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&gf(o)))}function Y5(o,l,f){switch(l.tag){case 3:ke(l,l.stateNode.containerInfo),as(l,Bt,o.memoizedState.cache),zl();break;case 27:case 5:We(l);break;case 4:ke(l,l.stateNode.containerInfo);break;case 10:as(l,l.type,l.memoizedProps.value);break;case 13:var d=l.memoizedState;if(d!==null)return d.dehydrated!==null?(hs(l),l.flags|=128,null):(f&l.child.childLanes)!==0?Px(o,l,f):(hs(l),o=jr(o,l,f),o!==null?o.sibling:null);hs(l);break;case 19:var g=(o.flags&128)!==0;if(d=(f&l.childLanes)!==0,d||(Bl(o,l,f,!1),d=(f&l.childLanes)!==0),g){if(d)return Mx(o,l,f);l.flags|=128}if(g=l.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),F(Vt,Vt.current),d)break;return null;case 22:case 23:return l.lanes=0,wx(o,l,f);case 24:as(l,Bt,o.memoizedState.cache)}return jr(o,l,f)}function Rx(o,l,f){if(o!==null)if(o.memoizedProps!==l.pendingProps)Wt=!0;else{if(!Im(o,f)&&(l.flags&128)===0)return Wt=!1,Y5(o,l,f);Wt=(o.flags&131072)!==0}else Wt=!1,Ge&&(l.flags&1048576)!==0&&a1(l,mf,l.index);switch(l.lanes=0,l.tag){case 16:e:{o=l.pendingProps;var d=l.elementType,g=d._init;if(d=g(d._payload),l.type=d,typeof d=="function")im(d)?(o=co(d,o),l.tag=1,l=Cx(null,l,d,o,f)):(l.tag=0,l=zm(null,l,d,o,f));else{if(d!=null){if(g=d.$$typeof,g===$){l.tag=11,l=bx(null,l,d,o,f);break e}else if(g===D){l.tag=14,l=xx(null,l,d,o,f);break e}}throw l=le(d)||d,Error(i(306,l,""))}}return l;case 0:return zm(o,l,l.type,l.pendingProps,f);case 1:return d=l.type,g=co(d,l.pendingProps),Cx(o,l,d,g,f);case 3:e:{if(ke(l,l.stateNode.containerInfo),o===null)throw Error(i(387));d=l.pendingProps;var y=l.memoizedState;g=y.element,Om(o,l),Hl(l,d,null,f);var Q=l.memoizedState;if(d=Q.cache,as(l,Bt,d),d!==y.cache&&fm(l,[Bt],f,!0),Wl(),d=Q.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:Q.cache},l.updateQueue.baseState=y,l.memoizedState=y,l.flags&256){l=Tx(o,l,d,f);break e}else if(d!==g){g=si(Error(i(424)),l),ql(g),l=Tx(o,l,d,f);break e}else{switch(o=l.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(bt=Ai(o.firstChild),On=l,Ge=!0,io=null,Bi=!0,f=cx(l,null,d,f),l.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(zl(),d===g){l=jr(o,l,f);break e}Jt(o,l,d,f)}l=l.child}return l;case 26:return Df(o,l),o===null?(f=DS(l.type,null,l.pendingProps,null))?l.memoizedState=f:Ge||(f=l.type,o=l.pendingProps,d=Hf(ue.current).createElement(f),d[Tt]=l,d[lt]=o,tn(d,f,o),It(d),l.stateNode=d):l.memoizedState=DS(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return We(l),o===null&&Ge&&(d=l.stateNode=$S(l.type,l.pendingProps,ue.current),On=l,Bi=!0,g=bt,Ss(l.type)?(Pg=g,bt=Ai(d.firstChild)):bt=g),Jt(o,l,l.pendingProps.children,f),Df(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&Ge&&((g=d=bt)&&(d=v3(d,l.type,l.pendingProps,Bi),d!==null?(l.stateNode=d,On=l,bt=Ai(d.firstChild),Bi=!1,g=!0):g=!1),g||ro(l)),We(l),g=l.type,y=l.pendingProps,Q=o!==null?o.memoizedProps:null,d=y.children,kg(g,y)?d=null:Q!==null&&kg(g,Q)&&(l.flags|=32),l.memoizedState!==null&&(g=wm(o,l,N5,null,null,f),yc._currentValue=g),Df(o,l),Jt(o,l,d,f),l.child;case 6:return o===null&&Ge&&((o=f=bt)&&(f=b3(f,l.pendingProps,Bi),f!==null?(l.stateNode=f,On=l,bt=null,o=!0):o=!1),o||ro(l)),null;case 13:return Px(o,l,f);case 4:return ke(l,l.stateNode.containerInfo),d=l.pendingProps,o===null?l.child=pa(l,null,d,f):Jt(o,l,d,f),l.child;case 11:return bx(o,l,l.type,l.pendingProps,f);case 7:return Jt(o,l,l.pendingProps,f),l.child;case 8:return Jt(o,l,l.pendingProps.children,f),l.child;case 12:return Jt(o,l,l.pendingProps.children,f),l.child;case 10:return d=l.pendingProps,as(l,l.type,d.value),Jt(o,l,d.children,f),l.child;case 9:return g=l.type._context,d=l.pendingProps.children,oo(l),g=cn(g),d=d(g),l.flags|=1,Jt(o,l,d,f),l.child;case 14:return xx(o,l,l.type,l.pendingProps,f);case 15:return Sx(o,l,l.type,l.pendingProps,f);case 19:return Mx(o,l,f);case 31:return d=l.pendingProps,f=l.mode,d={mode:d.mode,children:d.children},o===null?(f=jf(d,f),f.ref=l.ref,l.child=f,f.return=l,l=f):(f=Ar(o.child,d),f.ref=l.ref,l.child=f,f.return=l,l=f),l;case 22:return wx(o,l,f);case 24:return oo(l),d=cn(Bt),o===null?(g=pm(),g===null&&(g=ct,y=hm(),g.pooledCache=y,y.refCount++,y!==null&&(g.pooledCacheLanes|=f),g=y),l.memoizedState={parent:d,cache:g},gm(l),as(l,Bt,g)):((o.lanes&f)!==0&&(Om(o,l),Hl(l,null,null,f),Wl()),g=o.memoizedState,y=l.memoizedState,g.parent!==d?(g={parent:d,cache:d},l.memoizedState=g,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=g),as(l,Bt,d)):(d=y.cache,as(l,Bt,d),d!==g.cache&&fm(l,[Bt],f,!0))),Jt(o,l,l.pendingProps.children,f),l.child;case 29:throw l.pendingProps}throw Error(i(156,l.tag))}function Nr(o){o.flags|=4}function $x(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!LS(l)){if(l=ci.current,l!==null&&((qe&4194048)===qe?Vi!==null:(qe&62914560)!==qe&&(qe&536870912)===0||l!==Vi))throw Gl=mm,m1;o.flags|=8192}}function Nf(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?qo():536870912,o.lanes|=l,ya|=l)}function ic(o,l){if(!Ge)switch(o.tailMode){case"hidden":l=o.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?o.tail=null:f.sibling=null;break;case"collapsed":f=o.tail;for(var d=null;f!==null;)f.alternate!==null&&(d=f),f=f.sibling;d===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:d.sibling=null}}function Ot(o){var l=o.alternate!==null&&o.alternate.child===o.child,f=0,d=0;if(l)for(var g=o.child;g!==null;)f|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=o,g=g.sibling;else for(g=o.child;g!==null;)f|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=o,g=g.sibling;return o.subtreeFlags|=d,o.childLanes=f,l}function U5(o,l,f){var d=l.pendingProps;switch(am(l),l.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ot(l),null;case 1:return Ot(l),null;case 3:return f=l.stateNode,d=null,o!==null&&(d=o.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Er(Bt),Ue(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(o===null||o.child===null)&&(Ll(l)?Nr(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,u1())),Ot(l),null;case 26:return f=l.memoizedState,o===null?(Nr(l),f!==null?(Ot(l),$x(l,f)):(Ot(l),l.flags&=-16777217)):f?f!==o.memoizedState?(Nr(l),Ot(l),$x(l,f)):(Ot(l),l.flags&=-16777217):(o.memoizedProps!==d&&Nr(l),Ot(l),l.flags&=-16777217),null;case 27:Le(l),f=ue.current;var g=l.type;if(o!==null&&l.stateNode!=null)o.memoizedProps!==d&&Nr(l);else{if(!d){if(l.stateNode===null)throw Error(i(166));return Ot(l),null}o=oe.current,Ll(l)?l1(l):(o=$S(g,d,f),l.stateNode=o,Nr(l))}return Ot(l),null;case 5:if(Le(l),f=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==d&&Nr(l);else{if(!d){if(l.stateNode===null)throw Error(i(166));return Ot(l),null}if(o=oe.current,Ll(l))l1(l);else{switch(g=Hf(ue.current),o){case 1:o=g.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:o=g.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":o=g.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":o=g.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":o=g.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof d.is=="string"?g.createElement("select",{is:d.is}):g.createElement("select"),d.multiple?o.multiple=!0:d.size&&(o.size=d.size);break;default:o=typeof d.is=="string"?g.createElement(f,{is:d.is}):g.createElement(f)}}o[Tt]=l,o[lt]=d;e:for(g=l.child;g!==null;){if(g.tag===5||g.tag===6)o.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===l)break e;for(;g.sibling===null;){if(g.return===null||g.return===l)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}l.stateNode=o;e:switch(tn(o,f,d),f){case"button":case"input":case"select":case"textarea":o=!!d.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Nr(l)}}return Ot(l),l.flags&=-16777217,null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==d&&Nr(l);else{if(typeof d!="string"&&l.stateNode===null)throw Error(i(166));if(o=ue.current,Ll(l)){if(o=l.stateNode,f=l.memoizedProps,d=null,g=On,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}o[Tt]=l,o=!!(o.nodeValue===f||d!==null&&d.suppressHydrationWarning===!0||QS(o.nodeValue,f)),o||ro(l)}else o=Hf(o).createTextNode(d),o[Tt]=l,l.stateNode=o}return Ot(l),null;case 13:if(d=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(g=Ll(l),d!==null&&d.dehydrated!==null){if(o===null){if(!g)throw Error(i(318));if(g=l.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(i(317));g[Tt]=l}else zl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ot(l),g=!1}else g=u1(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=g),g=!0;if(!g)return l.flags&256?(Dr(l),l):(Dr(l),null)}if(Dr(l),(l.flags&128)!==0)return l.lanes=f,l;if(f=d!==null,o=o!==null&&o.memoizedState!==null,f){d=l.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool);var y=null;d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(y=d.memoizedState.cachePool.pool),y!==g&&(d.flags|=2048)}return f!==o&&f&&(l.child.flags|=8192),Nf(l,l.updateQueue),Ot(l),null;case 4:return Ue(),o===null&&vg(l.stateNode.containerInfo),Ot(l),null;case 10:return Er(l.type),Ot(l),null;case 19:if(te(Vt),g=l.memoizedState,g===null)return Ot(l),null;if(d=(l.flags&128)!==0,y=g.rendering,y===null)if(d)ic(g,!1);else{if(xt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(y=$f(o),y!==null){for(l.flags|=128,ic(g,!1),o=y.updateQueue,l.updateQueue=o,Nf(l,o),l.subtreeFlags=0,o=f,f=l.child;f!==null;)o1(f,o),f=f.sibling;return F(Vt,Vt.current&1|2),l.child}o=o.sibling}g.tail!==null&&at()>Lf&&(l.flags|=128,d=!0,ic(g,!1),l.lanes=4194304)}else{if(!d)if(o=$f(y),o!==null){if(l.flags|=128,d=!0,o=o.updateQueue,l.updateQueue=o,Nf(l,o),ic(g,!0),g.tail===null&&g.tailMode==="hidden"&&!y.alternate&&!Ge)return Ot(l),null}else 2*at()-g.renderingStartTime>Lf&&f!==536870912&&(l.flags|=128,d=!0,ic(g,!1),l.lanes=4194304);g.isBackwards?(y.sibling=l.child,l.child=y):(o=g.last,o!==null?o.sibling=y:l.child=y,g.last=y)}return g.tail!==null?(l=g.tail,g.rendering=l,g.tail=l.sibling,g.renderingStartTime=at(),l.sibling=null,o=Vt.current,F(Vt,d?o&1|2:o&1),l):(Ot(l),null);case 22:case 23:return Dr(l),xm(),d=l.memoizedState!==null,o!==null?o.memoizedState!==null!==d&&(l.flags|=8192):d&&(l.flags|=8192),d?(f&536870912)!==0&&(l.flags&128)===0&&(Ot(l),l.subtreeFlags&6&&(l.flags|=8192)):Ot(l),f=l.updateQueue,f!==null&&Nf(l,f.retryQueue),f=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==f&&(l.flags|=2048),o!==null&&te(ao),null;case 24:return f=null,o!==null&&(f=o.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),Er(Bt),Ot(l),null;case 25:return null;case 30:return null}throw Error(i(156,l.tag))}function G5(o,l){switch(am(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Er(Bt),Ue(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return Le(l),null;case 13:if(Dr(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(i(340));zl()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return te(Vt),null;case 4:return Ue(),null;case 10:return Er(l.type),null;case 22:case 23:return Dr(l),xm(),o!==null&&te(ao),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return Er(Bt),null;case 25:return null;default:return null}}function Ex(o,l){switch(am(l),l.tag){case 3:Er(Bt),Ue();break;case 26:case 27:case 5:Le(l);break;case 4:Ue();break;case 13:Dr(l);break;case 19:te(Vt);break;case 10:Er(l.type);break;case 22:case 23:Dr(l),xm(),o!==null&&te(ao);break;case 24:Er(Bt)}}function rc(o,l){try{var f=l.updateQueue,d=f!==null?f.lastEffect:null;if(d!==null){var g=d.next;f=g;do{if((f.tag&o)===o){d=void 0;var y=f.create,Q=f.inst;d=y(),Q.destroy=d}f=f.next}while(f!==g)}}catch(P){nt(l,l.return,P)}}function ps(o,l,f){try{var d=l.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var y=g.next;d=y;do{if((d.tag&o)===o){var Q=d.inst,P=Q.destroy;if(P!==void 0){Q.destroy=void 0,g=l;var N=f,V=P;try{V()}catch(ne){nt(g,N,ne)}}}d=d.next}while(d!==y)}}catch(ne){nt(l,l.return,ne)}}function _x(o){var l=o.updateQueue;if(l!==null){var f=o.stateNode;try{x1(l,f)}catch(d){nt(o,o.return,d)}}}function Dx(o,l,f){f.props=co(o.type,o.memoizedProps),f.state=o.memoizedState;try{f.componentWillUnmount()}catch(d){nt(o,l,d)}}function sc(o,l){try{var f=o.ref;if(f!==null){switch(o.tag){case 26:case 27:case 5:var d=o.stateNode;break;case 30:d=o.stateNode;break;default:d=o.stateNode}typeof f=="function"?o.refCleanup=f(d):f.current=d}}catch(g){nt(o,l,g)}}function Yi(o,l){var f=o.ref,d=o.refCleanup;if(f!==null)if(typeof d=="function")try{d()}catch(g){nt(o,l,g)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(g){nt(o,l,g)}else f.current=null}function jx(o){var l=o.type,f=o.memoizedProps,d=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":f.autoFocus&&d.focus();break e;case"img":f.src?d.src=f.src:f.srcSet&&(d.srcset=f.srcSet)}}catch(g){nt(o,o.return,g)}}function Wm(o,l,f){try{var d=o.stateNode;p3(d,o.type,f,l),d[lt]=l}catch(g){nt(o,o.return,g)}}function Nx(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&Ss(o.type)||o.tag===4}function Hm(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Nx(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&Ss(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Fm(o,l,f){var d=o.tag;if(d===5||d===6)o=o.stateNode,l?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(o,l):(l=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,l.appendChild(o),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=Wf));else if(d!==4&&(d===27&&Ss(o.type)&&(f=o.stateNode,l=null),o=o.child,o!==null))for(Fm(o,l,f),o=o.sibling;o!==null;)Fm(o,l,f),o=o.sibling}function Zf(o,l,f){var d=o.tag;if(d===5||d===6)o=o.stateNode,l?f.insertBefore(o,l):f.appendChild(o);else if(d!==4&&(d===27&&Ss(o.type)&&(f=o.stateNode),o=o.child,o!==null))for(Zf(o,l,f),o=o.sibling;o!==null;)Zf(o,l,f),o=o.sibling}function Zx(o){var l=o.stateNode,f=o.memoizedProps;try{for(var d=o.type,g=l.attributes;g.length;)l.removeAttributeNode(g[0]);tn(l,d,f),l[Tt]=o,l[lt]=f}catch(y){nt(o,o.return,y)}}var Zr=!1,At=!1,Km=!1,Xx=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function I5(o,l){if(o=o.containerInfo,Sg=nh,o=Hb(o),Hp(o)){if("selectionStart"in o)var f={start:o.selectionStart,end:o.selectionEnd};else e:{f=(f=o.ownerDocument)&&f.defaultView||window;var d=f.getSelection&&f.getSelection();if(d&&d.rangeCount!==0){f=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{f.nodeType,y.nodeType}catch{f=null;break e}var Q=0,P=-1,N=-1,V=0,ne=0,se=o,G=null;t:for(;;){for(var H;se!==f||g!==0&&se.nodeType!==3||(P=Q+g),se!==y||d!==0&&se.nodeType!==3||(N=Q+d),se.nodeType===3&&(Q+=se.nodeValue.length),(H=se.firstChild)!==null;)G=se,se=H;for(;;){if(se===o)break t;if(G===f&&++V===g&&(P=Q),G===y&&++ne===d&&(N=Q),(H=se.nextSibling)!==null)break;se=G,G=se.parentNode}se=H}f=P===-1||N===-1?null:{start:P,end:N}}else f=null}f=f||{start:0,end:0}}else f=null;for(wg={focusedElem:o,selectionRange:f},nh=!1,Ht=l;Ht!==null;)if(l=Ht,o=l.child,(l.subtreeFlags&1024)!==0&&o!==null)o.return=l,Ht=o;else for(;Ht!==null;){switch(l=Ht,y=l.alternate,o=l.flags,l.tag){case 0:break;case 11:case 15:break;case 1:if((o&1024)!==0&&y!==null){o=void 0,f=l,g=y.memoizedProps,y=y.memoizedState,d=f.stateNode;try{var Pe=co(f.type,g,f.elementType===f.type);o=d.getSnapshotBeforeUpdate(Pe,y),d.__reactInternalSnapshotBeforeUpdate=o}catch(Qe){nt(f,f.return,Qe)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,f=o.nodeType,f===9)Cg(o);else if(f===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":Cg(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(i(163))}if(o=l.sibling,o!==null){o.return=l.return,Ht=o;break}Ht=l.return}}function Lx(o,l,f){var d=f.flags;switch(f.tag){case 0:case 11:case 15:ms(o,f),d&4&&rc(5,f);break;case 1:if(ms(o,f),d&4)if(o=f.stateNode,l===null)try{o.componentDidMount()}catch(Q){nt(f,f.return,Q)}else{var g=co(f.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(g,l,o.__reactInternalSnapshotBeforeUpdate)}catch(Q){nt(f,f.return,Q)}}d&64&&_x(f),d&512&&sc(f,f.return);break;case 3:if(ms(o,f),d&64&&(o=f.updateQueue,o!==null)){if(l=null,f.child!==null)switch(f.child.tag){case 27:case 5:l=f.child.stateNode;break;case 1:l=f.child.stateNode}try{x1(o,l)}catch(Q){nt(f,f.return,Q)}}break;case 27:l===null&&d&4&&Zx(f);case 26:case 5:ms(o,f),l===null&&d&4&&jx(f),d&512&&sc(f,f.return);break;case 12:ms(o,f);break;case 13:ms(o,f),d&4&&Bx(o,f),d&64&&(o=f.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(f=i3.bind(null,f),x3(o,f))));break;case 22:if(d=f.memoizedState!==null||Zr,!d){l=l!==null&&l.memoizedState!==null||At,g=Zr;var y=At;Zr=d,(At=l)&&!y?gs(o,f,(f.subtreeFlags&8772)!==0):ms(o,f),Zr=g,At=y}break;case 30:break;default:ms(o,f)}}function zx(o){var l=o.alternate;l!==null&&(o.alternate=null,zx(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&Rp(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var pt=null,Qn=!1;function Xr(o,l,f){for(f=f.child;f!==null;)qx(o,l,f),f=f.sibling}function qx(o,l,f){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(ei,f)}catch{}switch(f.tag){case 26:At||Yi(f,l),Xr(o,l,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:At||Yi(f,l);var d=pt,g=Qn;Ss(f.type)&&(pt=f.stateNode,Qn=!1),Xr(o,l,f),pc(f.stateNode),pt=d,Qn=g;break;case 5:At||Yi(f,l);case 6:if(d=pt,g=Qn,pt=null,Xr(o,l,f),pt=d,Qn=g,pt!==null)if(Qn)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(f.stateNode)}catch(y){nt(f,l,y)}else try{pt.removeChild(f.stateNode)}catch(y){nt(f,l,y)}break;case 18:pt!==null&&(Qn?(o=pt,MS(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,f.stateNode),Sc(o)):MS(pt,f.stateNode));break;case 4:d=pt,g=Qn,pt=f.stateNode.containerInfo,Qn=!0,Xr(o,l,f),pt=d,Qn=g;break;case 0:case 11:case 14:case 15:At||ps(2,f,l),At||ps(4,f,l),Xr(o,l,f);break;case 1:At||(Yi(f,l),d=f.stateNode,typeof d.componentWillUnmount=="function"&&Dx(f,l,d)),Xr(o,l,f);break;case 21:Xr(o,l,f);break;case 22:At=(d=At)||f.memoizedState!==null,Xr(o,l,f),At=d;break;default:Xr(o,l,f)}}function Bx(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Sc(o)}catch(f){nt(l,l.return,f)}}function W5(o){switch(o.tag){case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new Xx),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new Xx),l;default:throw Error(i(435,o.tag))}}function Jm(o,l){var f=W5(o);l.forEach(function(d){var g=r3.bind(null,o,d);f.has(d)||(f.add(d),d.then(g,g))})}function Xn(o,l){var f=l.deletions;if(f!==null)for(var d=0;d<f.length;d++){var g=f[d],y=o,Q=l,P=Q;e:for(;P!==null;){switch(P.tag){case 27:if(Ss(P.type)){pt=P.stateNode,Qn=!1;break e}break;case 5:pt=P.stateNode,Qn=!1;break e;case 3:case 4:pt=P.stateNode.containerInfo,Qn=!0;break e}P=P.return}if(pt===null)throw Error(i(160));qx(y,Q,g),pt=null,Qn=!1,y=g.alternate,y!==null&&(y.return=null),g.return=null}if(l.subtreeFlags&13878)for(l=l.child;l!==null;)Vx(l,o),l=l.sibling}var Pi=null;function Vx(o,l){var f=o.alternate,d=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Xn(l,o),Ln(o),d&4&&(ps(3,o,o.return),rc(3,o),ps(5,o,o.return));break;case 1:Xn(l,o),Ln(o),d&512&&(At||f===null||Yi(f,f.return)),d&64&&Zr&&(o=o.updateQueue,o!==null&&(d=o.callbacks,d!==null&&(f=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=f===null?d:f.concat(d))));break;case 26:var g=Pi;if(Xn(l,o),Ln(o),d&512&&(At||f===null||Yi(f,f.return)),d&4){var y=f!==null?f.memoizedState:null;if(d=o.memoizedState,f===null)if(d===null)if(o.stateNode===null){e:{d=o.type,f=o.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":y=g.getElementsByTagName("title")[0],(!y||y[Al]||y[Tt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=g.createElement(d),g.head.insertBefore(y,g.querySelector("head > title"))),tn(y,d,f),y[Tt]=o,It(y),d=y;break e;case"link":var Q=ZS("link","href",g).get(d+(f.href||""));if(Q){for(var P=0;P<Q.length;P++)if(y=Q[P],y.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&y.getAttribute("rel")===(f.rel==null?null:f.rel)&&y.getAttribute("title")===(f.title==null?null:f.title)&&y.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){Q.splice(P,1);break t}}y=g.createElement(d),tn(y,d,f),g.head.appendChild(y);break;case"meta":if(Q=ZS("meta","content",g).get(d+(f.content||""))){for(P=0;P<Q.length;P++)if(y=Q[P],y.getAttribute("content")===(f.content==null?null:""+f.content)&&y.getAttribute("name")===(f.name==null?null:f.name)&&y.getAttribute("property")===(f.property==null?null:f.property)&&y.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&y.getAttribute("charset")===(f.charSet==null?null:f.charSet)){Q.splice(P,1);break t}}y=g.createElement(d),tn(y,d,f),g.head.appendChild(y);break;default:throw Error(i(468,d))}y[Tt]=o,It(y),d=y}o.stateNode=d}else XS(g,o.type,o.stateNode);else o.stateNode=NS(g,d,o.memoizedProps);else y!==d?(y===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):y.count--,d===null?XS(g,o.type,o.stateNode):NS(g,d,o.memoizedProps)):d===null&&o.stateNode!==null&&Wm(o,o.memoizedProps,f.memoizedProps)}break;case 27:Xn(l,o),Ln(o),d&512&&(At||f===null||Yi(f,f.return)),f!==null&&d&4&&Wm(o,o.memoizedProps,f.memoizedProps);break;case 5:if(Xn(l,o),Ln(o),d&512&&(At||f===null||Yi(f,f.return)),o.flags&32){g=o.stateNode;try{Ho(g,"")}catch(H){nt(o,o.return,H)}}d&4&&o.stateNode!=null&&(g=o.memoizedProps,Wm(o,g,f!==null?f.memoizedProps:g)),d&1024&&(Km=!0);break;case 6:if(Xn(l,o),Ln(o),d&4){if(o.stateNode===null)throw Error(i(162));d=o.memoizedProps,f=o.stateNode;try{f.nodeValue=d}catch(H){nt(o,o.return,H)}}break;case 3:if(Jf=null,g=Pi,Pi=Ff(l.containerInfo),Xn(l,o),Pi=g,Ln(o),d&4&&f!==null&&f.memoizedState.isDehydrated)try{Sc(l.containerInfo)}catch(H){nt(o,o.return,H)}Km&&(Km=!1,Yx(o));break;case 4:d=Pi,Pi=Ff(o.stateNode.containerInfo),Xn(l,o),Ln(o),Pi=d;break;case 12:Xn(l,o),Ln(o);break;case 13:Xn(l,o),Ln(o),o.child.flags&8192&&o.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(sg=at()),d&4&&(d=o.updateQueue,d!==null&&(o.updateQueue=null,Jm(o,d)));break;case 22:g=o.memoizedState!==null;var N=f!==null&&f.memoizedState!==null,V=Zr,ne=At;if(Zr=V||g,At=ne||N,Xn(l,o),At=ne,Zr=V,Ln(o),d&8192)e:for(l=o.stateNode,l._visibility=g?l._visibility&-2:l._visibility|1,g&&(f===null||N||Zr||At||uo(o)),f=null,l=o;;){if(l.tag===5||l.tag===26){if(f===null){N=f=l;try{if(y=N.stateNode,g)Q=y.style,typeof Q.setProperty=="function"?Q.setProperty("display","none","important"):Q.display="none";else{P=N.stateNode;var se=N.memoizedProps.style,G=se!=null&&se.hasOwnProperty("display")?se.display:null;P.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(H){nt(N,N.return,H)}}}else if(l.tag===6){if(f===null){N=l;try{N.stateNode.nodeValue=g?"":N.memoizedProps}catch(H){nt(N,N.return,H)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;f===l&&(f=null),l=l.return}f===l&&(f=null),l.sibling.return=l.return,l=l.sibling}d&4&&(d=o.updateQueue,d!==null&&(f=d.retryQueue,f!==null&&(d.retryQueue=null,Jm(o,f))));break;case 19:Xn(l,o),Ln(o),d&4&&(d=o.updateQueue,d!==null&&(o.updateQueue=null,Jm(o,d)));break;case 30:break;case 21:break;default:Xn(l,o),Ln(o)}}function Ln(o){var l=o.flags;if(l&2){try{for(var f,d=o.return;d!==null;){if(Nx(d)){f=d;break}d=d.return}if(f==null)throw Error(i(160));switch(f.tag){case 27:var g=f.stateNode,y=Hm(o);Zf(o,y,g);break;case 5:var Q=f.stateNode;f.flags&32&&(Ho(Q,""),f.flags&=-33);var P=Hm(o);Zf(o,P,Q);break;case 3:case 4:var N=f.stateNode.containerInfo,V=Hm(o);Fm(o,V,N);break;default:throw Error(i(161))}}catch(ne){nt(o,o.return,ne)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function Yx(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;Yx(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function ms(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)Lx(o,l.alternate,l),l=l.sibling}function uo(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:ps(4,l,l.return),uo(l);break;case 1:Yi(l,l.return);var f=l.stateNode;typeof f.componentWillUnmount=="function"&&Dx(l,l.return,f),uo(l);break;case 27:pc(l.stateNode);case 26:case 5:Yi(l,l.return),uo(l);break;case 22:l.memoizedState===null&&uo(l);break;case 30:uo(l);break;default:uo(l)}o=o.sibling}}function gs(o,l,f){for(f=f&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var d=l.alternate,g=o,y=l,Q=y.flags;switch(y.tag){case 0:case 11:case 15:gs(g,y,f),rc(4,y);break;case 1:if(gs(g,y,f),d=y,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(V){nt(d,d.return,V)}if(d=y,g=d.updateQueue,g!==null){var P=d.stateNode;try{var N=g.shared.hiddenCallbacks;if(N!==null)for(g.shared.hiddenCallbacks=null,g=0;g<N.length;g++)b1(N[g],P)}catch(V){nt(d,d.return,V)}}f&&Q&64&&_x(y),sc(y,y.return);break;case 27:Zx(y);case 26:case 5:gs(g,y,f),f&&d===null&&Q&4&&jx(y),sc(y,y.return);break;case 12:gs(g,y,f);break;case 13:gs(g,y,f),f&&Q&4&&Bx(g,y);break;case 22:y.memoizedState===null&&gs(g,y,f),sc(y,y.return);break;case 30:break;default:gs(g,y,f)}l=l.sibling}}function eg(o,l){var f=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==f&&(o!=null&&o.refCount++,f!=null&&Vl(f))}function tg(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Vl(o))}function Ui(o,l,f,d){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Ux(o,l,f,d),l=l.sibling}function Ux(o,l,f,d){var g=l.flags;switch(l.tag){case 0:case 11:case 15:Ui(o,l,f,d),g&2048&&rc(9,l);break;case 1:Ui(o,l,f,d);break;case 3:Ui(o,l,f,d),g&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Vl(o)));break;case 12:if(g&2048){Ui(o,l,f,d),o=l.stateNode;try{var y=l.memoizedProps,Q=y.id,P=y.onPostCommit;typeof P=="function"&&P(Q,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(N){nt(l,l.return,N)}}else Ui(o,l,f,d);break;case 13:Ui(o,l,f,d);break;case 23:break;case 22:y=l.stateNode,Q=l.alternate,l.memoizedState!==null?y._visibility&2?Ui(o,l,f,d):oc(o,l):y._visibility&2?Ui(o,l,f,d):(y._visibility|=2,ma(o,l,f,d,(l.subtreeFlags&10256)!==0)),g&2048&&eg(Q,l);break;case 24:Ui(o,l,f,d),g&2048&&tg(l.alternate,l);break;default:Ui(o,l,f,d)}}function ma(o,l,f,d,g){for(g=g&&(l.subtreeFlags&10256)!==0,l=l.child;l!==null;){var y=o,Q=l,P=f,N=d,V=Q.flags;switch(Q.tag){case 0:case 11:case 15:ma(y,Q,P,N,g),rc(8,Q);break;case 23:break;case 22:var ne=Q.stateNode;Q.memoizedState!==null?ne._visibility&2?ma(y,Q,P,N,g):oc(y,Q):(ne._visibility|=2,ma(y,Q,P,N,g)),g&&V&2048&&eg(Q.alternate,Q);break;case 24:ma(y,Q,P,N,g),g&&V&2048&&tg(Q.alternate,Q);break;default:ma(y,Q,P,N,g)}l=l.sibling}}function oc(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var f=o,d=l,g=d.flags;switch(d.tag){case 22:oc(f,d),g&2048&&eg(d.alternate,d);break;case 24:oc(f,d),g&2048&&tg(d.alternate,d);break;default:oc(f,d)}l=l.sibling}}var ac=8192;function ga(o){if(o.subtreeFlags&ac)for(o=o.child;o!==null;)Gx(o),o=o.sibling}function Gx(o){switch(o.tag){case 26:ga(o),o.flags&ac&&o.memoizedState!==null&&_3(Pi,o.memoizedState,o.memoizedProps);break;case 5:ga(o);break;case 3:case 4:var l=Pi;Pi=Ff(o.stateNode.containerInfo),ga(o),Pi=l;break;case 22:o.memoizedState===null&&(l=o.alternate,l!==null&&l.memoizedState!==null?(l=ac,ac=16777216,ga(o),ac=l):ga(o));break;default:ga(o)}}function Ix(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function lc(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var d=l[f];Ht=d,Hx(d,o)}Ix(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)Wx(o),o=o.sibling}function Wx(o){switch(o.tag){case 0:case 11:case 15:lc(o),o.flags&2048&&ps(9,o,o.return);break;case 3:lc(o);break;case 12:lc(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Xf(o)):lc(o);break;default:lc(o)}}function Xf(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var d=l[f];Ht=d,Hx(d,o)}Ix(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:ps(8,l,l.return),Xf(l);break;case 22:f=l.stateNode,f._visibility&2&&(f._visibility&=-3,Xf(l));break;default:Xf(l)}o=o.sibling}}function Hx(o,l){for(;Ht!==null;){var f=Ht;switch(f.tag){case 0:case 11:case 15:ps(8,f,l);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var d=f.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Vl(f.memoizedState.cache)}if(d=f.child,d!==null)d.return=f,Ht=d;else e:for(f=o;Ht!==null;){d=Ht;var g=d.sibling,y=d.return;if(zx(d),d===f){Ht=null;break e}if(g!==null){g.return=y,Ht=g;break e}Ht=y}}}var H5={getCacheForType:function(o){var l=cn(Bt),f=l.data.get(o);return f===void 0&&(f=o(),l.data.set(o,f)),f}},F5=typeof WeakMap=="function"?WeakMap:Map,He=0,ct=null,Ne=null,qe=0,Fe=0,zn=null,Os=!1,Oa=!1,ng=!1,Lr=0,xt=0,ys=0,fo=0,ig=0,ui=0,ya=0,cc=null,Cn=null,rg=!1,sg=0,Lf=1/0,zf=null,vs=null,en=0,bs=null,va=null,ba=0,og=0,ag=null,Fx=null,uc=0,lg=null;function qn(){if((He&2)!==0&&qe!==0)return qe&-qe;if(Z.T!==null){var o=aa;return o!==0?o:mg()}return Ws()}function Kx(){ui===0&&(ui=(qe&536870912)===0||Ge?Sn():536870912);var o=ci.current;return o!==null&&(o.flags|=32),ui}function Bn(o,l,f){(o===ct&&(Fe===2||Fe===9)||o.cancelPendingCommit!==null)&&(xa(o,0),xs(o,qe,ui,!1)),Ci(o,f),((He&2)===0||o!==ct)&&(o===ct&&((He&2)===0&&(fo|=f),xt===4&&xs(o,qe,ui,!1)),Gi(o))}function Jx(o,l,f){if((He&6)!==0)throw Error(i(327));var d=!f&&(l&124)===0&&(l&o.expiredLanes)===0||Qr(o,l),g=d?e3(o,l):fg(o,l,!0),y=d;do{if(g===0){Oa&&!d&&xs(o,l,0,!1);break}else{if(f=o.current.alternate,y&&!K5(f)){g=fg(o,l,!1),y=!1;continue}if(g===2){if(y=l,o.errorRecoveryDisabledLanes&y)var Q=0;else Q=o.pendingLanes&-536870913,Q=Q!==0?Q:Q&536870912?536870912:0;if(Q!==0){l=Q;e:{var P=o;g=cc;var N=P.current.memoizedState.isDehydrated;if(N&&(xa(P,Q).flags|=256),Q=fg(P,Q,!1),Q!==2){if(ng&&!N){P.errorRecoveryDisabledLanes|=y,fo|=y,g=4;break e}y=Cn,Cn=g,y!==null&&(Cn===null?Cn=y:Cn.push.apply(Cn,y))}g=Q}if(y=!1,g!==2)continue}}if(g===1){xa(o,0),xs(o,l,0,!0);break}e:{switch(d=o,y=g,y){case 0:case 1:throw Error(i(345));case 4:if((l&4194048)!==l)break;case 6:xs(d,l,ui,!Os);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((l&62914560)===l&&(g=sg+300-at(),10<g)){if(xs(d,l,ui,!Os),kr(d,0,!0)!==0)break e;d.timeoutHandle=PS(eS.bind(null,d,f,Cn,zf,rg,l,ui,fo,ya,Os,y,2,-0,0),g);break e}eS(d,f,Cn,zf,rg,l,ui,fo,ya,Os,y,0,-0,0)}}break}while(!0);Gi(o)}function eS(o,l,f,d,g,y,Q,P,N,V,ne,se,G,H){if(o.timeoutHandle=-1,se=l.subtreeFlags,(se&8192||(se&16785408)===16785408)&&(Oc={stylesheets:null,count:0,unsuspend:E3},Gx(l),se=D3(),se!==null)){o.cancelPendingCommit=se(aS.bind(null,o,l,y,f,d,g,Q,P,N,ne,1,G,H)),xs(o,y,Q,!V);return}aS(o,l,y,f,d,g,Q,P,N)}function K5(o){for(var l=o;;){var f=l.tag;if((f===0||f===11||f===15)&&l.flags&16384&&(f=l.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var d=0;d<f.length;d++){var g=f[d],y=g.getSnapshot;g=g.value;try{if(!Nn(y(),g))return!1}catch{return!1}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function xs(o,l,f,d){l&=~ig,l&=~fo,o.suspendedLanes|=l,o.pingedLanes&=~l,d&&(o.warmLanes|=l),d=o.expirationTimes;for(var g=l;0<g;){var y=31-Qt(g),Q=1<<y;d[y]=-1,g&=~Q}f!==0&&Me(o,f,l)}function qf(){return(He&6)===0?(fc(0),!1):!0}function cg(){if(Ne!==null){if(Fe===0)var o=Ne.return;else o=Ne,$r=so=null,Cm(o),da=null,tc=0,o=Ne;for(;o!==null;)Ex(o.alternate,o),o=o.return;Ne=null}}function xa(o,l){var f=o.timeoutHandle;f!==-1&&(o.timeoutHandle=-1,g3(f)),f=o.cancelPendingCommit,f!==null&&(o.cancelPendingCommit=null,f()),cg(),ct=o,Ne=f=Ar(o.current,null),qe=l,Fe=0,zn=null,Os=!1,Oa=Qr(o,l),ng=!1,ya=ui=ig=fo=ys=xt=0,Cn=cc=null,rg=!1,(l&8)!==0&&(l|=l&32);var d=o.entangledLanes;if(d!==0)for(o=o.entanglements,d&=l;0<d;){var g=31-Qt(d),y=1<<g;l|=o[g],d&=~y}return Lr=l,uf(),f}function tS(o,l){Ee=null,Z.H=Af,l===Ul||l===vf?(l=y1(),Fe=3):l===m1?(l=y1(),Fe=4):Fe=l===vx?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,zn=l,Ne===null&&(xt=1,_f(o,si(l,o.current)))}function nS(){var o=Z.H;return Z.H=Af,o===null?Af:o}function iS(){var o=Z.A;return Z.A=H5,o}function ug(){xt=4,Os||(qe&4194048)!==qe&&ci.current!==null||(Oa=!0),(ys&134217727)===0&&(fo&134217727)===0||ct===null||xs(ct,qe,ui,!1)}function fg(o,l,f){var d=He;He|=2;var g=nS(),y=iS();(ct!==o||qe!==l)&&(zf=null,xa(o,l)),l=!1;var Q=xt;e:do try{if(Fe!==0&&Ne!==null){var P=Ne,N=zn;switch(Fe){case 8:cg(),Q=6;break e;case 3:case 2:case 9:case 6:ci.current===null&&(l=!0);var V=Fe;if(Fe=0,zn=null,Sa(o,P,N,V),f&&Oa){Q=0;break e}break;default:V=Fe,Fe=0,zn=null,Sa(o,P,N,V)}}J5(),Q=xt;break}catch(ne){tS(o,ne)}while(!0);return l&&o.shellSuspendCounter++,$r=so=null,He=d,Z.H=g,Z.A=y,Ne===null&&(ct=null,qe=0,uf()),Q}function J5(){for(;Ne!==null;)rS(Ne)}function e3(o,l){var f=He;He|=2;var d=nS(),g=iS();ct!==o||qe!==l?(zf=null,Lf=at()+500,xa(o,l)):Oa=Qr(o,l);e:do try{if(Fe!==0&&Ne!==null){l=Ne;var y=zn;t:switch(Fe){case 1:Fe=0,zn=null,Sa(o,l,y,1);break;case 2:case 9:if(g1(y)){Fe=0,zn=null,sS(l);break}l=function(){Fe!==2&&Fe!==9||ct!==o||(Fe=7),Gi(o)},y.then(l,l);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:g1(y)?(Fe=0,zn=null,sS(l)):(Fe=0,zn=null,Sa(o,l,y,7));break;case 5:var Q=null;switch(Ne.tag){case 26:Q=Ne.memoizedState;case 5:case 27:var P=Ne;if(!Q||LS(Q)){Fe=0,zn=null;var N=P.sibling;if(N!==null)Ne=N;else{var V=P.return;V!==null?(Ne=V,Bf(V)):Ne=null}break t}}Fe=0,zn=null,Sa(o,l,y,5);break;case 6:Fe=0,zn=null,Sa(o,l,y,6);break;case 8:cg(),xt=6;break e;default:throw Error(i(462))}}t3();break}catch(ne){tS(o,ne)}while(!0);return $r=so=null,Z.H=d,Z.A=g,He=f,Ne!==null?0:(ct=null,qe=0,uf(),xt)}function t3(){for(;Ne!==null&&!Xt();)rS(Ne)}function rS(o){var l=Rx(o.alternate,o,Lr);o.memoizedProps=o.pendingProps,l===null?Bf(o):Ne=l}function sS(o){var l=o,f=l.alternate;switch(l.tag){case 15:case 0:l=Qx(f,l,l.pendingProps,l.type,void 0,qe);break;case 11:l=Qx(f,l,l.pendingProps,l.type.render,l.ref,qe);break;case 5:Cm(l);default:Ex(f,l),l=Ne=o1(l,Lr),l=Rx(f,l,Lr)}o.memoizedProps=o.pendingProps,l===null?Bf(o):Ne=l}function Sa(o,l,f,d){$r=so=null,Cm(l),da=null,tc=0;var g=l.return;try{if(V5(o,g,l,f,qe)){xt=1,_f(o,si(f,o.current)),Ne=null;return}}catch(y){if(g!==null)throw Ne=g,y;xt=1,_f(o,si(f,o.current)),Ne=null;return}l.flags&32768?(Ge||d===1?o=!0:Oa||(qe&536870912)!==0?o=!1:(Os=o=!0,(d===2||d===9||d===3||d===6)&&(d=ci.current,d!==null&&d.tag===13&&(d.flags|=16384))),oS(l,o)):Bf(l)}function Bf(o){var l=o;do{if((l.flags&32768)!==0){oS(l,Os);return}o=l.return;var f=U5(l.alternate,l,Lr);if(f!==null){Ne=f;return}if(l=l.sibling,l!==null){Ne=l;return}Ne=l=o}while(l!==null);xt===0&&(xt=5)}function oS(o,l){do{var f=G5(o.alternate,o);if(f!==null){f.flags&=32767,Ne=f;return}if(f=o.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!l&&(o=o.sibling,o!==null)){Ne=o;return}Ne=o=f}while(o!==null);xt=6,Ne=null}function aS(o,l,f,d,g,y,Q,P,N){o.cancelPendingCommit=null;do Vf();while(en!==0);if((He&6)!==0)throw Error(i(327));if(l!==null){if(l===o.current)throw Error(i(177));if(y=l.lanes|l.childLanes,y|=tm,Is(o,f,y,Q,P,N),o===ct&&(Ne=ct=null,qe=0),va=l,bs=o,ba=f,og=y,ag=g,Fx=d,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,s3(Jn,function(){return hS(),null})):(o.callbackNode=null,o.callbackPriority=0),d=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||d){d=Z.T,Z.T=null,g=U.p,U.p=2,Q=He,He|=4;try{I5(o,l,f)}finally{He=Q,U.p=g,Z.T=d}}en=1,lS(),cS(),uS()}}function lS(){if(en===1){en=0;var o=bs,l=va,f=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||f){f=Z.T,Z.T=null;var d=U.p;U.p=2;var g=He;He|=4;try{Vx(l,o);var y=wg,Q=Hb(o.containerInfo),P=y.focusedElem,N=y.selectionRange;if(Q!==P&&P&&P.ownerDocument&&Wb(P.ownerDocument.documentElement,P)){if(N!==null&&Hp(P)){var V=N.start,ne=N.end;if(ne===void 0&&(ne=V),"selectionStart"in P)P.selectionStart=V,P.selectionEnd=Math.min(ne,P.value.length);else{var se=P.ownerDocument||document,G=se&&se.defaultView||window;if(G.getSelection){var H=G.getSelection(),Pe=P.textContent.length,Qe=Math.min(N.start,Pe),tt=N.end===void 0?Qe:Math.min(N.end,Pe);!H.extend&&Qe>tt&&(Q=tt,tt=Qe,Qe=Q);var L=Ib(P,Qe),X=Ib(P,tt);if(L&&X&&(H.rangeCount!==1||H.anchorNode!==L.node||H.anchorOffset!==L.offset||H.focusNode!==X.node||H.focusOffset!==X.offset)){var B=se.createRange();B.setStart(L.node,L.offset),H.removeAllRanges(),Qe>tt?(H.addRange(B),H.extend(X.node,X.offset)):(B.setEnd(X.node,X.offset),H.addRange(B))}}}}for(se=[],H=P;H=H.parentNode;)H.nodeType===1&&se.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<se.length;P++){var ie=se[P];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}nh=!!Sg,wg=Sg=null}finally{He=g,U.p=d,Z.T=f}}o.current=l,en=2}}function cS(){if(en===2){en=0;var o=bs,l=va,f=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||f){f=Z.T,Z.T=null;var d=U.p;U.p=2;var g=He;He|=4;try{Lx(o,l.alternate,l)}finally{He=g,U.p=d,Z.T=f}}en=3}}function uS(){if(en===4||en===3){en=0,mn();var o=bs,l=va,f=ba,d=Fx;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?en=5:(en=0,va=bs=null,fS(o,o.pendingLanes));var g=o.pendingLanes;if(g===0&&(vs=null),zt(f),l=l.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(ei,l,void 0,(l.current.flags&128)===128)}catch{}if(d!==null){l=Z.T,g=U.p,U.p=2,Z.T=null;try{for(var y=o.onRecoverableError,Q=0;Q<d.length;Q++){var P=d[Q];y(P.value,{componentStack:P.stack})}}finally{Z.T=l,U.p=g}}(ba&3)!==0&&Vf(),Gi(o),g=o.pendingLanes,(f&4194090)!==0&&(g&42)!==0?o===lg?uc++:(uc=0,lg=o):uc=0,fc(0)}}function fS(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,Vl(l)))}function Vf(o){return lS(),cS(),uS(),hS()}function hS(){if(en!==5)return!1;var o=bs,l=og;og=0;var f=zt(ba),d=Z.T,g=U.p;try{U.p=32>f?32:f,Z.T=null,f=ag,ag=null;var y=bs,Q=ba;if(en=0,va=bs=null,ba=0,(He&6)!==0)throw Error(i(331));var P=He;if(He|=4,Wx(y.current),Ux(y,y.current,Q,f),He=P,fc(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(ei,y)}catch{}return!0}finally{U.p=g,Z.T=d,fS(o,l)}}function dS(o,l,f){l=si(f,l),l=Lm(o.stateNode,l,2),o=us(o,l,2),o!==null&&(Ci(o,2),Gi(o))}function nt(o,l,f){if(o.tag===3)dS(o,o,f);else for(;l!==null;){if(l.tag===3){dS(l,o,f);break}else if(l.tag===1){var d=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(vs===null||!vs.has(d))){o=si(f,o),f=Ox(2),d=us(l,f,2),d!==null&&(yx(f,d,l,o),Ci(d,2),Gi(d));break}}l=l.return}}function hg(o,l,f){var d=o.pingCache;if(d===null){d=o.pingCache=new F5;var g=new Set;d.set(l,g)}else g=d.get(l),g===void 0&&(g=new Set,d.set(l,g));g.has(f)||(ng=!0,g.add(f),o=n3.bind(null,o,l,f),l.then(o,o))}function n3(o,l,f){var d=o.pingCache;d!==null&&d.delete(l),o.pingedLanes|=o.suspendedLanes&f,o.warmLanes&=~f,ct===o&&(qe&f)===f&&(xt===4||xt===3&&(qe&62914560)===qe&&300>at()-sg?(He&2)===0&&xa(o,0):ig|=f,ya===qe&&(ya=0)),Gi(o)}function pS(o,l){l===0&&(l=qo()),o=ia(o,l),o!==null&&(Ci(o,l),Gi(o))}function i3(o){var l=o.memoizedState,f=0;l!==null&&(f=l.retryLane),pS(o,f)}function r3(o,l){var f=0;switch(o.tag){case 13:var d=o.stateNode,g=o.memoizedState;g!==null&&(f=g.retryLane);break;case 19:d=o.stateNode;break;case 22:d=o.stateNode._retryCache;break;default:throw Error(i(314))}d!==null&&d.delete(l),pS(o,f)}function s3(o,l){return je(o,l)}var Yf=null,wa=null,dg=!1,Uf=!1,pg=!1,ho=0;function Gi(o){o!==wa&&o.next===null&&(wa===null?Yf=wa=o:wa=wa.next=o),Uf=!0,dg||(dg=!0,a3())}function fc(o,l){if(!pg&&Uf){pg=!0;do for(var f=!1,d=Yf;d!==null;){if(o!==0){var g=d.pendingLanes;if(g===0)var y=0;else{var Q=d.suspendedLanes,P=d.pingedLanes;y=(1<<31-Qt(42|o)+1)-1,y&=g&~(Q&~P),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(f=!0,yS(d,y))}else y=qe,y=kr(d,d===ct?y:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(y&3)===0||Qr(d,y)||(f=!0,yS(d,y));d=d.next}while(f);pg=!1}}function o3(){mS()}function mS(){Uf=dg=!1;var o=0;ho!==0&&(m3()&&(o=ho),ho=0);for(var l=at(),f=null,d=Yf;d!==null;){var g=d.next,y=gS(d,l);y===0?(d.next=null,f===null?Yf=g:f.next=g,g===null&&(wa=f)):(f=d,(o!==0||(y&3)!==0)&&(Uf=!0)),d=g}fc(o)}function gS(o,l){for(var f=o.suspendedLanes,d=o.pingedLanes,g=o.expirationTimes,y=o.pendingLanes&-62914561;0<y;){var Q=31-Qt(y),P=1<<Q,N=g[Q];N===-1?((P&f)===0||(P&d)!==0)&&(g[Q]=Gs(P,l)):N<=l&&(o.expiredLanes|=P),y&=~P}if(l=ct,f=qe,f=kr(o,o===l?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),d=o.callbackNode,f===0||o===l&&(Fe===2||Fe===9)||o.cancelPendingCommit!==null)return d!==null&&d!==null&&Ke(d),o.callbackNode=null,o.callbackPriority=0;if((f&3)===0||Qr(o,f)){if(l=f&-f,l===o.callbackPriority)return l;switch(d!==null&&Ke(d),zt(f)){case 2:case 8:f=Kn;break;case 32:f=Jn;break;case 268435456:f=Dn;break;default:f=Jn}return d=OS.bind(null,o),f=je(f,d),o.callbackPriority=l,o.callbackNode=f,l}return d!==null&&d!==null&&Ke(d),o.callbackPriority=2,o.callbackNode=null,2}function OS(o,l){if(en!==0&&en!==5)return o.callbackNode=null,o.callbackPriority=0,null;var f=o.callbackNode;if(Vf()&&o.callbackNode!==f)return null;var d=qe;return d=kr(o,o===ct?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),d===0?null:(Jx(o,d,l),gS(o,at()),o.callbackNode!=null&&o.callbackNode===f?OS.bind(null,o):null)}function yS(o,l){if(Vf())return null;Jx(o,l,!0)}function a3(){O3(function(){(He&6)!==0?je(kt,o3):mS()})}function mg(){return ho===0&&(ho=Sn()),ho}function vS(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:nf(""+o)}function bS(o,l){var f=l.ownerDocument.createElement("input");return f.name=l.name,f.value=l.value,o.id&&f.setAttribute("form",o.id),l.parentNode.insertBefore(f,l),o=new FormData(o),f.parentNode.removeChild(f),o}function l3(o,l,f,d,g){if(l==="submit"&&f&&f.stateNode===g){var y=vS((g[lt]||null).action),Q=d.submitter;Q&&(l=(l=Q[lt]||null)?vS(l.formAction):Q.getAttribute("formAction"),l!==null&&(y=l,Q=null));var P=new af("action","action",null,d,g);o.push({event:P,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(ho!==0){var N=Q?bS(g,Q):new FormData(g);Dm(f,{pending:!0,data:N,method:g.method,action:y},null,N)}}else typeof y=="function"&&(P.preventDefault(),N=Q?bS(g,Q):new FormData(g),Dm(f,{pending:!0,data:N,method:g.method,action:y},y,N))},currentTarget:g}]})}}for(var gg=0;gg<em.length;gg++){var Og=em[gg],c3=Og.toLowerCase(),u3=Og[0].toUpperCase()+Og.slice(1);Ti(c3,"on"+u3)}Ti(Jb,"onAnimationEnd"),Ti(e1,"onAnimationIteration"),Ti(t1,"onAnimationStart"),Ti("dblclick","onDoubleClick"),Ti("focusin","onFocus"),Ti("focusout","onBlur"),Ti(T5,"onTransitionRun"),Ti(P5,"onTransitionStart"),Ti(A5,"onTransitionCancel"),Ti(n1,"onTransitionEnd"),Go("onMouseEnter",["mouseout","mouseover"]),Go("onMouseLeave",["mouseout","mouseover"]),Go("onPointerEnter",["pointerout","pointerover"]),Go("onPointerLeave",["pointerout","pointerover"]),Hs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hc="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(" "),f3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hc));function xS(o,l){l=(l&4)!==0;for(var f=0;f<o.length;f++){var d=o[f],g=d.event;d=d.listeners;e:{var y=void 0;if(l)for(var Q=d.length-1;0<=Q;Q--){var P=d[Q],N=P.instance,V=P.currentTarget;if(P=P.listener,N!==y&&g.isPropagationStopped())break e;y=P,g.currentTarget=V;try{y(g)}catch(ne){Ef(ne)}g.currentTarget=null,y=N}else for(Q=0;Q<d.length;Q++){if(P=d[Q],N=P.instance,V=P.currentTarget,P=P.listener,N!==y&&g.isPropagationStopped())break e;y=P,g.currentTarget=V;try{y(g)}catch(ne){Ef(ne)}g.currentTarget=null,y=N}}}}function Ze(o,l){var f=l[Bo];f===void 0&&(f=l[Bo]=new Set);var d=o+"__bubble";f.has(d)||(SS(l,o,2,!1),f.add(d))}function yg(o,l,f){var d=0;l&&(d|=4),SS(f,o,d,l)}var Gf="_reactListening"+Math.random().toString(36).slice(2);function vg(o){if(!o[Gf]){o[Gf]=!0,mb.forEach(function(f){f!=="selectionchange"&&(f3.has(f)||yg(f,!1,o),yg(f,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[Gf]||(l[Gf]=!0,yg("selectionchange",!1,l))}}function SS(o,l,f,d){switch(US(l)){case 2:var g=Z3;break;case 8:g=X3;break;default:g=Eg}f=g.bind(null,l,f,o),g=void 0,!zp||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(g=!0),d?g!==void 0?o.addEventListener(l,f,{capture:!0,passive:g}):o.addEventListener(l,f,!0):g!==void 0?o.addEventListener(l,f,{passive:g}):o.addEventListener(l,f,!1)}function bg(o,l,f,d,g){var y=d;if((l&1)===0&&(l&2)===0&&d!==null)e:for(;;){if(d===null)return;var Q=d.tag;if(Q===3||Q===4){var P=d.stateNode.containerInfo;if(P===g)break;if(Q===4)for(Q=d.return;Q!==null;){var N=Q.tag;if((N===3||N===4)&&Q.stateNode.containerInfo===g)return;Q=Q.return}for(;P!==null;){if(Q=Vo(P),Q===null)return;if(N=Q.tag,N===5||N===6||N===26||N===27){d=y=Q;continue e}P=P.parentNode}}d=d.return}Ab(function(){var V=y,ne=Xp(f),se=[];e:{var G=i1.get(o);if(G!==void 0){var H=af,Pe=o;switch(o){case"keypress":if(sf(f)===0)break e;case"keydown":case"keyup":H=s5;break;case"focusin":Pe="focus",H=Yp;break;case"focusout":Pe="blur",H=Yp;break;case"beforeblur":case"afterblur":H=Yp;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=$b;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=GE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=l5;break;case Jb:case e1:case t1:H=HE;break;case n1:H=u5;break;case"scroll":case"scrollend":H=YE;break;case"wheel":H=h5;break;case"copy":case"cut":case"paste":H=KE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=_b;break;case"toggle":case"beforetoggle":H=p5}var Qe=(l&4)!==0,tt=!Qe&&(o==="scroll"||o==="scrollend"),L=Qe?G!==null?G+"Capture":null:G;Qe=[];for(var X=V,B;X!==null;){var ie=X;if(B=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||B===null||L===null||(ie=Rl(X,L),ie!=null&&Qe.push(dc(X,ie,B))),tt)break;X=X.return}0<Qe.length&&(G=new H(G,Pe,null,f,ne),se.push({event:G,listeners:Qe}))}}if((l&7)===0){e:{if(G=o==="mouseover"||o==="pointerover",H=o==="mouseout"||o==="pointerout",G&&f!==Zp&&(Pe=f.relatedTarget||f.fromElement)&&(Vo(Pe)||Pe[Gt]))break e;if((H||G)&&(G=ne.window===ne?ne:(G=ne.ownerDocument)?G.defaultView||G.parentWindow:window,H?(Pe=f.relatedTarget||f.toElement,H=V,Pe=Pe?Vo(Pe):null,Pe!==null&&(tt=s(Pe),Qe=Pe.tag,Pe!==tt||Qe!==5&&Qe!==27&&Qe!==6)&&(Pe=null)):(H=null,Pe=V),H!==Pe)){if(Qe=$b,ie="onMouseLeave",L="onMouseEnter",X="mouse",(o==="pointerout"||o==="pointerover")&&(Qe=_b,ie="onPointerLeave",L="onPointerEnter",X="pointer"),tt=H==null?G:Ml(H),B=Pe==null?G:Ml(Pe),G=new Qe(ie,X+"leave",H,f,ne),G.target=tt,G.relatedTarget=B,ie=null,Vo(ne)===V&&(Qe=new Qe(L,X+"enter",Pe,f,ne),Qe.target=B,Qe.relatedTarget=tt,ie=Qe),tt=ie,H&&Pe)t:{for(Qe=H,L=Pe,X=0,B=Qe;B;B=ka(B))X++;for(B=0,ie=L;ie;ie=ka(ie))B++;for(;0<X-B;)Qe=ka(Qe),X--;for(;0<B-X;)L=ka(L),B--;for(;X--;){if(Qe===L||L!==null&&Qe===L.alternate)break t;Qe=ka(Qe),L=ka(L)}Qe=null}else Qe=null;H!==null&&wS(se,G,H,Qe,!1),Pe!==null&&tt!==null&&wS(se,tt,Pe,Qe,!0)}}e:{if(G=V?Ml(V):window,H=G.nodeName&&G.nodeName.toLowerCase(),H==="select"||H==="input"&&G.type==="file")var ye=qb;else if(Lb(G))if(Bb)ye=k5;else{ye=S5;var De=x5}else H=G.nodeName,!H||H.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?V&&Np(V.elementType)&&(ye=qb):ye=w5;if(ye&&(ye=ye(o,V))){zb(se,ye,f,ne);break e}De&&De(o,G,V),o==="focusout"&&V&&G.type==="number"&&V.memoizedProps.value!=null&&jp(G,"number",G.value)}switch(De=V?Ml(V):window,o){case"focusin":(Lb(De)||De.contentEditable==="true")&&(ea=De,Fp=V,Xl=null);break;case"focusout":Xl=Fp=ea=null;break;case"mousedown":Kp=!0;break;case"contextmenu":case"mouseup":case"dragend":Kp=!1,Fb(se,f,ne);break;case"selectionchange":if(C5)break;case"keydown":case"keyup":Fb(se,f,ne)}var we;if(Gp)e:{switch(o){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Jo?Zb(o,f)&&(Ce="onCompositionEnd"):o==="keydown"&&f.keyCode===229&&(Ce="onCompositionStart");Ce&&(Db&&f.locale!=="ko"&&(Jo||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Jo&&(we=Mb()):(os=ne,qp="value"in os?os.value:os.textContent,Jo=!0)),De=If(V,Ce),0<De.length&&(Ce=new Eb(Ce,o,null,f,ne),se.push({event:Ce,listeners:De}),we?Ce.data=we:(we=Xb(f),we!==null&&(Ce.data=we)))),(we=g5?O5(o,f):y5(o,f))&&(Ce=If(V,"onBeforeInput"),0<Ce.length&&(De=new Eb("onBeforeInput","beforeinput",null,f,ne),se.push({event:De,listeners:Ce}),De.data=we)),l3(se,o,V,f,ne)}xS(se,l)})}function dc(o,l,f){return{instance:o,listener:l,currentTarget:f}}function If(o,l){for(var f=l+"Capture",d=[];o!==null;){var g=o,y=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||y===null||(g=Rl(o,f),g!=null&&d.unshift(dc(o,g,y)),g=Rl(o,l),g!=null&&d.push(dc(o,g,y))),o.tag===3)return d;o=o.return}return[]}function ka(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function wS(o,l,f,d,g){for(var y=l._reactName,Q=[];f!==null&&f!==d;){var P=f,N=P.alternate,V=P.stateNode;if(P=P.tag,N!==null&&N===d)break;P!==5&&P!==26&&P!==27||V===null||(N=V,g?(V=Rl(f,y),V!=null&&Q.unshift(dc(f,V,N))):g||(V=Rl(f,y),V!=null&&Q.push(dc(f,V,N)))),f=f.return}Q.length!==0&&o.push({event:l,listeners:Q})}var h3=/\r\n?/g,d3=/\u0000|\uFFFD/g;function kS(o){return(typeof o=="string"?o:""+o).replace(h3,`
49
- `).replace(d3,"")}function QS(o,l){return l=kS(l),kS(o)===l}function Wf(){}function et(o,l,f,d,g,y){switch(f){case"children":typeof d=="string"?l==="body"||l==="textarea"&&d===""||Ho(o,d):(typeof d=="number"||typeof d=="bigint")&&l!=="body"&&Ho(o,""+d);break;case"className":Ju(o,"class",d);break;case"tabIndex":Ju(o,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Ju(o,f,d);break;case"style":Tb(o,d,y);break;case"data":if(l!=="object"){Ju(o,"data",d);break}case"src":case"href":if(d===""&&(l!=="a"||f!=="href")){o.removeAttribute(f);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){o.removeAttribute(f);break}d=nf(""+d),o.setAttribute(f,d);break;case"action":case"formAction":if(typeof d=="function"){o.setAttribute(f,"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 y=="function"&&(f==="formAction"?(l!=="input"&&et(o,l,"name",g.name,g,null),et(o,l,"formEncType",g.formEncType,g,null),et(o,l,"formMethod",g.formMethod,g,null),et(o,l,"formTarget",g.formTarget,g,null)):(et(o,l,"encType",g.encType,g,null),et(o,l,"method",g.method,g,null),et(o,l,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){o.removeAttribute(f);break}d=nf(""+d),o.setAttribute(f,d);break;case"onClick":d!=null&&(o.onclick=Wf);break;case"onScroll":d!=null&&Ze("scroll",o);break;case"onScrollEnd":d!=null&&Ze("scrollend",o);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(f=d.__html,f!=null){if(g.children!=null)throw Error(i(60));o.innerHTML=f}}break;case"multiple":o.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":o.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){o.removeAttribute("xlink:href");break}f=nf(""+d),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(f,""+d):o.removeAttribute(f);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":d&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(f,""):o.removeAttribute(f);break;case"capture":case"download":d===!0?o.setAttribute(f,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(f,d):o.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?o.setAttribute(f,d):o.removeAttribute(f);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?o.removeAttribute(f):o.setAttribute(f,d);break;case"popover":Ze("beforetoggle",o),Ze("toggle",o),Ku(o,"popover",d);break;case"xlinkActuate":Tr(o,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Tr(o,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Tr(o,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Tr(o,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Tr(o,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Tr(o,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Tr(o,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Tr(o,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Tr(o,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Ku(o,"is",d);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=BE.get(f)||f,Ku(o,f,d))}}function xg(o,l,f,d,g,y){switch(f){case"style":Tb(o,d,y);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(f=d.__html,f!=null){if(g.children!=null)throw Error(i(60));o.innerHTML=f}}break;case"children":typeof d=="string"?Ho(o,d):(typeof d=="number"||typeof d=="bigint")&&Ho(o,""+d);break;case"onScroll":d!=null&&Ze("scroll",o);break;case"onScrollEnd":d!=null&&Ze("scrollend",o);break;case"onClick":d!=null&&(o.onclick=Wf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gb.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(g=f.endsWith("Capture"),l=f.slice(2,g?f.length-7:void 0),y=o[lt]||null,y=y!=null?y[f]:null,typeof y=="function"&&o.removeEventListener(l,y,g),typeof d=="function")){typeof y!="function"&&y!==null&&(f in o?o[f]=null:o.hasAttribute(f)&&o.removeAttribute(f)),o.addEventListener(l,d,g);break e}f in o?o[f]=d:d===!0?o.setAttribute(f,""):Ku(o,f,d)}}}function tn(o,l,f){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",o),Ze("load",o);var d=!1,g=!1,y;for(y in f)if(f.hasOwnProperty(y)){var Q=f[y];if(Q!=null)switch(y){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:et(o,l,y,Q,f,null)}}g&&et(o,l,"srcSet",f.srcSet,f,null),d&&et(o,l,"src",f.src,f,null);return;case"input":Ze("invalid",o);var P=y=Q=g=null,N=null,V=null;for(d in f)if(f.hasOwnProperty(d)){var ne=f[d];if(ne!=null)switch(d){case"name":g=ne;break;case"type":Q=ne;break;case"checked":N=ne;break;case"defaultChecked":V=ne;break;case"value":y=ne;break;case"defaultValue":P=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(i(137,l));break;default:et(o,l,d,ne,f,null)}}wb(o,y,P,N,V,Q,g,!1),ef(o);return;case"select":Ze("invalid",o),d=Q=y=null;for(g in f)if(f.hasOwnProperty(g)&&(P=f[g],P!=null))switch(g){case"value":y=P;break;case"defaultValue":Q=P;break;case"multiple":d=P;default:et(o,l,g,P,f,null)}l=y,f=Q,o.multiple=!!d,l!=null?Wo(o,!!d,l,!1):f!=null&&Wo(o,!!d,f,!0);return;case"textarea":Ze("invalid",o),y=g=d=null;for(Q in f)if(f.hasOwnProperty(Q)&&(P=f[Q],P!=null))switch(Q){case"value":d=P;break;case"defaultValue":g=P;break;case"children":y=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(91));break;default:et(o,l,Q,P,f,null)}Qb(o,d,g,y),ef(o);return;case"option":for(N in f)if(f.hasOwnProperty(N)&&(d=f[N],d!=null))switch(N){case"selected":o.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:et(o,l,N,d,f,null)}return;case"dialog":Ze("beforetoggle",o),Ze("toggle",o),Ze("cancel",o),Ze("close",o);break;case"iframe":case"object":Ze("load",o);break;case"video":case"audio":for(d=0;d<hc.length;d++)Ze(hc[d],o);break;case"image":Ze("error",o),Ze("load",o);break;case"details":Ze("toggle",o);break;case"embed":case"source":case"link":Ze("error",o),Ze("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in f)if(f.hasOwnProperty(V)&&(d=f[V],d!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:et(o,l,V,d,f,null)}return;default:if(Np(l)){for(ne in f)f.hasOwnProperty(ne)&&(d=f[ne],d!==void 0&&xg(o,l,ne,d,f,void 0));return}}for(P in f)f.hasOwnProperty(P)&&(d=f[P],d!=null&&et(o,l,P,d,f,null))}function p3(o,l,f,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,y=null,Q=null,P=null,N=null,V=null,ne=null;for(H in f){var se=f[H];if(f.hasOwnProperty(H)&&se!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":N=se;default:d.hasOwnProperty(H)||et(o,l,H,null,d,se)}}for(var G in d){var H=d[G];if(se=f[G],d.hasOwnProperty(G)&&(H!=null||se!=null))switch(G){case"type":y=H;break;case"name":g=H;break;case"checked":V=H;break;case"defaultChecked":ne=H;break;case"value":Q=H;break;case"defaultValue":P=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,l));break;default:H!==se&&et(o,l,G,H,d,se)}}Dp(o,Q,P,N,V,ne,y,g);return;case"select":H=Q=P=G=null;for(y in f)if(N=f[y],f.hasOwnProperty(y)&&N!=null)switch(y){case"value":break;case"multiple":H=N;default:d.hasOwnProperty(y)||et(o,l,y,null,d,N)}for(g in d)if(y=d[g],N=f[g],d.hasOwnProperty(g)&&(y!=null||N!=null))switch(g){case"value":G=y;break;case"defaultValue":P=y;break;case"multiple":Q=y;default:y!==N&&et(o,l,g,y,d,N)}l=P,f=Q,d=H,G!=null?Wo(o,!!f,G,!1):!!d!=!!f&&(l!=null?Wo(o,!!f,l,!0):Wo(o,!!f,f?[]:"",!1));return;case"textarea":H=G=null;for(P in f)if(g=f[P],f.hasOwnProperty(P)&&g!=null&&!d.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:et(o,l,P,null,d,g)}for(Q in d)if(g=d[Q],y=f[Q],d.hasOwnProperty(Q)&&(g!=null||y!=null))switch(Q){case"value":G=g;break;case"defaultValue":H=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(i(91));break;default:g!==y&&et(o,l,Q,g,d,y)}kb(o,G,H);return;case"option":for(var Pe in f)if(G=f[Pe],f.hasOwnProperty(Pe)&&G!=null&&!d.hasOwnProperty(Pe))switch(Pe){case"selected":o.selected=!1;break;default:et(o,l,Pe,null,d,G)}for(N in d)if(G=d[N],H=f[N],d.hasOwnProperty(N)&&G!==H&&(G!=null||H!=null))switch(N){case"selected":o.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:et(o,l,N,G,d,H)}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 Qe in f)G=f[Qe],f.hasOwnProperty(Qe)&&G!=null&&!d.hasOwnProperty(Qe)&&et(o,l,Qe,null,d,G);for(V in d)if(G=d[V],H=f[V],d.hasOwnProperty(V)&&G!==H&&(G!=null||H!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(i(137,l));break;default:et(o,l,V,G,d,H)}return;default:if(Np(l)){for(var tt in f)G=f[tt],f.hasOwnProperty(tt)&&G!==void 0&&!d.hasOwnProperty(tt)&&xg(o,l,tt,void 0,d,G);for(ne in d)G=d[ne],H=f[ne],!d.hasOwnProperty(ne)||G===H||G===void 0&&H===void 0||xg(o,l,ne,G,d,H);return}}for(var L in f)G=f[L],f.hasOwnProperty(L)&&G!=null&&!d.hasOwnProperty(L)&&et(o,l,L,null,d,G);for(se in d)G=d[se],H=f[se],!d.hasOwnProperty(se)||G===H||G==null&&H==null||et(o,l,se,G,d,H)}var Sg=null,wg=null;function Hf(o){return o.nodeType===9?o:o.ownerDocument}function CS(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function TS(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function kg(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Qg=null;function m3(){var o=window.event;return o&&o.type==="popstate"?o===Qg?!1:(Qg=o,!0):(Qg=null,!1)}var PS=typeof setTimeout=="function"?setTimeout:void 0,g3=typeof clearTimeout=="function"?clearTimeout:void 0,AS=typeof Promise=="function"?Promise:void 0,O3=typeof queueMicrotask=="function"?queueMicrotask:typeof AS<"u"?function(o){return AS.resolve(null).then(o).catch(y3)}:PS;function y3(o){setTimeout(function(){throw o})}function Ss(o){return o==="head"}function MS(o,l){var f=l,d=0,g=0;do{var y=f.nextSibling;if(o.removeChild(f),y&&y.nodeType===8)if(f=y.data,f==="/$"){if(0<d&&8>d){f=d;var Q=o.ownerDocument;if(f&1&&pc(Q.documentElement),f&2&&pc(Q.body),f&4)for(f=Q.head,pc(f),Q=f.firstChild;Q;){var P=Q.nextSibling,N=Q.nodeName;Q[Al]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&Q.rel.toLowerCase()==="stylesheet"||f.removeChild(Q),Q=P}}if(g===0){o.removeChild(y),Sc(l);return}g--}else f==="$"||f==="$?"||f==="$!"?g++:d=f.charCodeAt(0)-48;else d=0;f=y}while(f);Sc(l)}function Cg(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var f=l;switch(l=l.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Cg(f),Rp(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}o.removeChild(f)}}function v3(o,l,f,d){for(;o.nodeType===1;){var g=f;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!d&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(d){if(!o[Al])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(y=o.getAttribute("rel"),y==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(y!==g.rel||o.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||o.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||o.getAttribute("title")!==(g.title==null?null:g.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(y=o.getAttribute("src"),(y!==(g.src==null?null:g.src)||o.getAttribute("type")!==(g.type==null?null:g.type)||o.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&y&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var y=g.name==null?null:""+g.name;if(g.type==="hidden"&&o.getAttribute("name")===y)return o}else return o;if(o=Ai(o.nextSibling),o===null)break}return null}function b3(o,l,f){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!f||(o=Ai(o.nextSibling),o===null))return null;return o}function Tg(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function x3(o,l){var f=o.ownerDocument;if(o.data!=="$?"||f.readyState==="complete")l();else{var d=function(){l(),f.removeEventListener("DOMContentLoaded",d)};f.addEventListener("DOMContentLoaded",d),o._reactRetry=d}}function Ai(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="F!"||l==="F")break;if(l==="/$")return null}}return o}var Pg=null;function RS(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var f=o.data;if(f==="$"||f==="$!"||f==="$?"){if(l===0)return o;l--}else f==="/$"&&l++}o=o.previousSibling}return null}function $S(o,l,f){switch(l=Hf(f),o){case"html":if(o=l.documentElement,!o)throw Error(i(452));return o;case"head":if(o=l.head,!o)throw Error(i(453));return o;case"body":if(o=l.body,!o)throw Error(i(454));return o;default:throw Error(i(451))}}function pc(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);Rp(o)}var fi=new Map,ES=new Set;function Ff(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var zr=U.d;U.d={f:S3,r:w3,D:k3,C:Q3,L:C3,m:T3,X:A3,S:P3,M:M3};function S3(){var o=zr.f(),l=qf();return o||l}function w3(o){var l=Yo(o);l!==null&&l.tag===5&&l.type==="form"?J1(l):zr.r(o)}var Qa=typeof document>"u"?null:document;function _S(o,l,f){var d=Qa;if(d&&typeof l=="string"&&l){var g=ri(l);g='link[rel="'+o+'"][href="'+g+'"]',typeof f=="string"&&(g+='[crossorigin="'+f+'"]'),ES.has(g)||(ES.add(g),o={rel:o,crossOrigin:f,href:l},d.querySelector(g)===null&&(l=d.createElement("link"),tn(l,"link",o),It(l),d.head.appendChild(l)))}}function k3(o){zr.D(o),_S("dns-prefetch",o,null)}function Q3(o,l){zr.C(o,l),_S("preconnect",o,l)}function C3(o,l,f){zr.L(o,l,f);var d=Qa;if(d&&o&&l){var g='link[rel="preload"][as="'+ri(l)+'"]';l==="image"&&f&&f.imageSrcSet?(g+='[imagesrcset="'+ri(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(g+='[imagesizes="'+ri(f.imageSizes)+'"]')):g+='[href="'+ri(o)+'"]';var y=g;switch(l){case"style":y=Ca(o);break;case"script":y=Ta(o)}fi.has(y)||(o=p({rel:"preload",href:l==="image"&&f&&f.imageSrcSet?void 0:o,as:l},f),fi.set(y,o),d.querySelector(g)!==null||l==="style"&&d.querySelector(mc(y))||l==="script"&&d.querySelector(gc(y))||(l=d.createElement("link"),tn(l,"link",o),It(l),d.head.appendChild(l)))}}function T3(o,l){zr.m(o,l);var f=Qa;if(f&&o){var d=l&&typeof l.as=="string"?l.as:"script",g='link[rel="modulepreload"][as="'+ri(d)+'"][href="'+ri(o)+'"]',y=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Ta(o)}if(!fi.has(y)&&(o=p({rel:"modulepreload",href:o},l),fi.set(y,o),f.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(gc(y)))return}d=f.createElement("link"),tn(d,"link",o),It(d),f.head.appendChild(d)}}}function P3(o,l,f){zr.S(o,l,f);var d=Qa;if(d&&o){var g=Uo(d).hoistableStyles,y=Ca(o);l=l||"default";var Q=g.get(y);if(!Q){var P={loading:0,preload:null};if(Q=d.querySelector(mc(y)))P.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":l},f),(f=fi.get(y))&&Ag(o,f);var N=Q=d.createElement("link");It(N),tn(N,"link",o),N._p=new Promise(function(V,ne){N.onload=V,N.onerror=ne}),N.addEventListener("load",function(){P.loading|=1}),N.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Kf(Q,l,d)}Q={type:"stylesheet",instance:Q,count:1,state:P},g.set(y,Q)}}}function A3(o,l){zr.X(o,l);var f=Qa;if(f&&o){var d=Uo(f).hoistableScripts,g=Ta(o),y=d.get(g);y||(y=f.querySelector(gc(g)),y||(o=p({src:o,async:!0},l),(l=fi.get(g))&&Mg(o,l),y=f.createElement("script"),It(y),tn(y,"link",o),f.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},d.set(g,y))}}function M3(o,l){zr.M(o,l);var f=Qa;if(f&&o){var d=Uo(f).hoistableScripts,g=Ta(o),y=d.get(g);y||(y=f.querySelector(gc(g)),y||(o=p({src:o,async:!0,type:"module"},l),(l=fi.get(g))&&Mg(o,l),y=f.createElement("script"),It(y),tn(y,"link",o),f.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},d.set(g,y))}}function DS(o,l,f,d){var g=(g=ue.current)?Ff(g):null;if(!g)throw Error(i(446));switch(o){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(l=Ca(f.href),f=Uo(g).hoistableStyles,d=f.get(l),d||(d={type:"style",instance:null,count:0,state:null},f.set(l,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){o=Ca(f.href);var y=Uo(g).hoistableStyles,Q=y.get(o);if(Q||(g=g.ownerDocument||g,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(o,Q),(y=g.querySelector(mc(o)))&&!y._p&&(Q.instance=y,Q.state.loading=5),fi.has(o)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},fi.set(o,f),y||R3(g,o,f,Q.state))),l&&d===null)throw Error(i(528,""));return Q}if(l&&d!==null)throw Error(i(529,""));return null;case"script":return l=f.async,f=f.src,typeof f=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ta(f),f=Uo(g).hoistableScripts,d=f.get(l),d||(d={type:"script",instance:null,count:0,state:null},f.set(l,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,o))}}function Ca(o){return'href="'+ri(o)+'"'}function mc(o){return'link[rel="stylesheet"]['+o+"]"}function jS(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function R3(o,l,f,d){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?d.loading=1:(l=o.createElement("link"),d.preload=l,l.addEventListener("load",function(){return d.loading|=1}),l.addEventListener("error",function(){return d.loading|=2}),tn(l,"link",f),It(l),o.head.appendChild(l))}function Ta(o){return'[src="'+ri(o)+'"]'}function gc(o){return"script[async]"+o}function NS(o,l,f){if(l.count++,l.instance===null)switch(l.type){case"style":var d=o.querySelector('style[data-href~="'+ri(f.href)+'"]');if(d)return l.instance=d,It(d),d;var g=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return d=(o.ownerDocument||o).createElement("style"),It(d),tn(d,"style",g),Kf(d,f.precedence,o),l.instance=d;case"stylesheet":g=Ca(f.href);var y=o.querySelector(mc(g));if(y)return l.state.loading|=4,l.instance=y,It(y),y;d=jS(f),(g=fi.get(g))&&Ag(d,g),y=(o.ownerDocument||o).createElement("link"),It(y);var Q=y;return Q._p=new Promise(function(P,N){Q.onload=P,Q.onerror=N}),tn(y,"link",d),l.state.loading|=4,Kf(y,f.precedence,o),l.instance=y;case"script":return y=Ta(f.src),(g=o.querySelector(gc(y)))?(l.instance=g,It(g),g):(d=f,(g=fi.get(y))&&(d=p({},f),Mg(d,g)),o=o.ownerDocument||o,g=o.createElement("script"),It(g),tn(g,"link",d),o.head.appendChild(g),l.instance=g);case"void":return null;default:throw Error(i(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(d=l.instance,l.state.loading|=4,Kf(d,f.precedence,o));return l.instance}function Kf(o,l,f){for(var d=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,y=g,Q=0;Q<d.length;Q++){var P=d[Q];if(P.dataset.precedence===l)y=P;else if(y!==g)break}y?y.parentNode.insertBefore(o,y.nextSibling):(l=f.nodeType===9?f.head:f,l.insertBefore(o,l.firstChild))}function Ag(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function Mg(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var Jf=null;function ZS(o,l,f){if(Jf===null){var d=new Map,g=Jf=new Map;g.set(f,d)}else g=Jf,d=g.get(f),d||(d=new Map,g.set(f,d));if(d.has(o))return d;for(d.set(o,null),f=f.getElementsByTagName(o),g=0;g<f.length;g++){var y=f[g];if(!(y[Al]||y[Tt]||o==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var Q=y.getAttribute(l)||"";Q=o+Q;var P=d.get(Q);P?P.push(y):d.set(Q,[y])}}return d}function XS(o,l,f){o=o.ownerDocument||o,o.head.insertBefore(f,l==="title"?o.querySelector("head > title"):null)}function $3(o,l,f){if(f===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return o=l.disabled,typeof l.precedence=="string"&&o==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function LS(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var Oc=null;function E3(){}function _3(o,l,f){if(Oc===null)throw Error(i(475));var d=Oc;if(l.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var g=Ca(f.href),y=o.querySelector(mc(g));if(y){o=y._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(d.count++,d=eh.bind(d),o.then(d,d)),l.state.loading|=4,l.instance=y,It(y);return}y=o.ownerDocument||o,f=jS(f),(g=fi.get(g))&&Ag(f,g),y=y.createElement("link"),It(y);var Q=y;Q._p=new Promise(function(P,N){Q.onload=P,Q.onerror=N}),tn(y,"link",f),l.instance=y}d.stylesheets===null&&(d.stylesheets=new Map),d.stylesheets.set(l,o),(o=l.state.preload)&&(l.state.loading&3)===0&&(d.count++,l=eh.bind(d),o.addEventListener("load",l),o.addEventListener("error",l))}}function D3(){if(Oc===null)throw Error(i(475));var o=Oc;return o.stylesheets&&o.count===0&&Rg(o,o.stylesheets),0<o.count?function(l){var f=setTimeout(function(){if(o.stylesheets&&Rg(o,o.stylesheets),o.unsuspend){var d=o.unsuspend;o.unsuspend=null,d()}},6e4);return o.unsuspend=l,function(){o.unsuspend=null,clearTimeout(f)}}:null}function eh(){if(this.count--,this.count===0){if(this.stylesheets)Rg(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var th=null;function Rg(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,th=new Map,l.forEach(j3,o),th=null,eh.call(o))}function j3(o,l){if(!(l.state.loading&4)){var f=th.get(o);if(f)var d=f.get(null);else{f=new Map,th.set(o,f);for(var g=o.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<g.length;y++){var Q=g[y];(Q.nodeName==="LINK"||Q.getAttribute("media")!=="not all")&&(f.set(Q.dataset.precedence,Q),d=Q)}d&&f.set(null,d)}g=l.instance,Q=g.getAttribute("data-precedence"),y=f.get(Q)||d,y===d&&f.set(null,g),f.set(Q,g),this.count++,d=eh.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),y?y.parentNode.insertBefore(g,y.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(g,o.firstChild)),l.state.loading|=4}}var yc={$$typeof:A,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function N3(o,l,f,d,g,y,Q,P){this.tag=1,this.containerInfo=o,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=ss(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ss(0),this.hiddenUpdates=ss(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=y,this.onRecoverableError=Q,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function zS(o,l,f,d,g,y,Q,P,N,V,ne,se){return o=new N3(o,l,f,Q,P,N,V,se),l=1,y===!0&&(l|=24),y=Zn(3,null,null,l),o.current=y,y.stateNode=o,l=hm(),l.refCount++,o.pooledCache=l,l.refCount++,y.memoizedState={element:d,isDehydrated:f,cache:l},gm(y),o}function qS(o){return o?(o=ra,o):ra}function BS(o,l,f,d,g,y){g=qS(g),d.context===null?d.context=g:d.pendingContext=g,d=cs(l),d.payload={element:f},y=y===void 0?null:y,y!==null&&(d.callback=y),f=us(o,d,l),f!==null&&(Bn(f,o,l),Il(f,o,l))}function VS(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var f=o.retryLane;o.retryLane=f!==0&&f<l?f:l}}function $g(o,l){VS(o,l),(o=o.alternate)&&VS(o,l)}function YS(o){if(o.tag===13){var l=ia(o,67108864);l!==null&&Bn(l,o,67108864),$g(o,67108864)}}var nh=!0;function Z3(o,l,f,d){var g=Z.T;Z.T=null;var y=U.p;try{U.p=2,Eg(o,l,f,d)}finally{U.p=y,Z.T=g}}function X3(o,l,f,d){var g=Z.T;Z.T=null;var y=U.p;try{U.p=8,Eg(o,l,f,d)}finally{U.p=y,Z.T=g}}function Eg(o,l,f,d){if(nh){var g=_g(d);if(g===null)bg(o,l,d,ih,f),GS(o,d);else if(z3(g,o,l,f,d))d.stopPropagation();else if(GS(o,d),l&4&&-1<L3.indexOf(o)){for(;g!==null;){var y=Yo(g);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var Q=ni(y.pendingLanes);if(Q!==0){var P=y;for(P.pendingLanes|=2,P.entangledLanes|=2;Q;){var N=1<<31-Qt(Q);P.entanglements[1]|=N,Q&=~N}Gi(y),(He&6)===0&&(Lf=at()+500,fc(0))}}break;case 13:P=ia(y,2),P!==null&&Bn(P,y,2),qf(),$g(y,2)}if(y=_g(d),y===null&&bg(o,l,d,ih,f),y===g)break;g=y}g!==null&&d.stopPropagation()}else bg(o,l,d,null,f)}}function _g(o){return o=Xp(o),Dg(o)}var ih=null;function Dg(o){if(ih=null,o=Vo(o),o!==null){var l=s(o);if(l===null)o=null;else{var f=l.tag;if(f===13){if(o=a(l),o!==null)return o;o=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return ih=o,null}function US(o){switch(o){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(Fn()){case kt:return 2;case Kn:return 8;case Jn:case Lt:return 32;case Dn:return 268435456;default:return 32}default:return 32}}var jg=!1,ws=null,ks=null,Qs=null,vc=new Map,bc=new Map,Cs=[],L3="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 GS(o,l){switch(o){case"focusin":case"focusout":ws=null;break;case"dragenter":case"dragleave":ks=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":vc.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":bc.delete(l.pointerId)}}function xc(o,l,f,d,g,y){return o===null||o.nativeEvent!==y?(o={blockedOn:l,domEventName:f,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},l!==null&&(l=Yo(l),l!==null&&YS(l)),o):(o.eventSystemFlags|=d,l=o.targetContainers,g!==null&&l.indexOf(g)===-1&&l.push(g),o)}function z3(o,l,f,d,g){switch(l){case"focusin":return ws=xc(ws,o,l,f,d,g),!0;case"dragenter":return ks=xc(ks,o,l,f,d,g),!0;case"mouseover":return Qs=xc(Qs,o,l,f,d,g),!0;case"pointerover":var y=g.pointerId;return vc.set(y,xc(vc.get(y)||null,o,l,f,d,g)),!0;case"gotpointercapture":return y=g.pointerId,bc.set(y,xc(bc.get(y)||null,o,l,f,d,g)),!0}return!1}function IS(o){var l=Vo(o.target);if(l!==null){var f=s(l);if(f!==null){if(l=f.tag,l===13){if(l=a(f),l!==null){o.blockedOn=l,qt(o.priority,function(){if(f.tag===13){var d=qn();d=gt(d);var g=ia(f,d);g!==null&&Bn(g,f,d),$g(f,d)}});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){o.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}o.blockedOn=null}function rh(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var f=_g(o.nativeEvent);if(f===null){f=o.nativeEvent;var d=new f.constructor(f.type,f);Zp=d,f.target.dispatchEvent(d),Zp=null}else return l=Yo(f),l!==null&&YS(l),o.blockedOn=f,!1;l.shift()}return!0}function WS(o,l,f){rh(o)&&f.delete(l)}function q3(){jg=!1,ws!==null&&rh(ws)&&(ws=null),ks!==null&&rh(ks)&&(ks=null),Qs!==null&&rh(Qs)&&(Qs=null),vc.forEach(WS),bc.forEach(WS)}function sh(o,l){o.blockedOn===l&&(o.blockedOn=null,jg||(jg=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,q3)))}var oh=null;function HS(o){oh!==o&&(oh=o,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){oh===o&&(oh=null);for(var l=0;l<o.length;l+=3){var f=o[l],d=o[l+1],g=o[l+2];if(typeof d!="function"){if(Dg(d||f)===null)continue;break}var y=Yo(f);y!==null&&(o.splice(l,3),l-=3,Dm(y,{pending:!0,data:g,method:f.method,action:d},d,g))}}))}function Sc(o){function l(N){return sh(N,o)}ws!==null&&sh(ws,o),ks!==null&&sh(ks,o),Qs!==null&&sh(Qs,o),vc.forEach(l),bc.forEach(l);for(var f=0;f<Cs.length;f++){var d=Cs[f];d.blockedOn===o&&(d.blockedOn=null)}for(;0<Cs.length&&(f=Cs[0],f.blockedOn===null);)IS(f),f.blockedOn===null&&Cs.shift();if(f=(o.ownerDocument||o).$$reactFormReplay,f!=null)for(d=0;d<f.length;d+=3){var g=f[d],y=f[d+1],Q=g[lt]||null;if(typeof y=="function")Q||HS(f);else if(Q){var P=null;if(y&&y.hasAttribute("formAction")){if(g=y,Q=y[lt]||null)P=Q.formAction;else if(Dg(g)!==null)continue}else P=Q.action;typeof P=="function"?f[d+1]=P:(f.splice(d,3),d-=3),HS(f)}}}function Ng(o){this._internalRoot=o}ah.prototype.render=Ng.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(i(409));var f=l.current,d=qn();BS(f,d,o,l,null,null)},ah.prototype.unmount=Ng.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;BS(o.current,2,null,o,null,null),qf(),l[Gt]=null}};function ah(o){this._internalRoot=o}ah.prototype.unstable_scheduleHydration=function(o){if(o){var l=Ws();o={blockedOn:null,target:o,priority:l};for(var f=0;f<Cs.length&&l!==0&&l<Cs[f].priority;f++);Cs.splice(f,0,o),f===0&&IS(o)}};var FS=e.version;if(FS!=="19.1.0")throw Error(i(527,FS,"19.1.0"));U.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(i(188)):(o=Object.keys(o).join(","),Error(i(268,o)));return o=u(l),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var B3={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lh.isDisabled&&lh.supportsFiber)try{ei=lh.inject(B3),Ut=lh}catch{}}return kc.createRoot=function(o,l){if(!r(o))throw Error(i(299));var f=!1,d="",g=dx,y=px,Q=mx,P=null;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(d=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(Q=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(P=l.unstable_transitionCallbacks)),l=zS(o,1,!1,null,null,f,d,g,y,Q,P,null),o[Gt]=l.current,vg(o),new Ng(l)},kc.hydrateRoot=function(o,l,f){if(!r(o))throw Error(i(299));var d=!1,g="",y=dx,Q=px,P=mx,N=null,V=null;return f!=null&&(f.unstable_strictMode===!0&&(d=!0),f.identifierPrefix!==void 0&&(g=f.identifierPrefix),f.onUncaughtError!==void 0&&(y=f.onUncaughtError),f.onCaughtError!==void 0&&(Q=f.onCaughtError),f.onRecoverableError!==void 0&&(P=f.onRecoverableError),f.unstable_transitionCallbacks!==void 0&&(N=f.unstable_transitionCallbacks),f.formState!==void 0&&(V=f.formState)),l=zS(o,1,!0,l,f??null,d,g,y,Q,P,N,V),l.context=qS(null),f=l.current,d=qn(),d=gt(d),g=cs(d),g.callback=null,us(f,g,d),f=d,l.current.lanes=f,Ci(l,f),Gi(l),o[Gt]=l.current,vg(o),new ah(l)},kc.version="19.1.0",kc}var aw;function J3(){if(aw)return Xg.exports;aw=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(),Xg.exports=K3(),Xg.exports}var e_=J3();const t_=yy(e_);var C=vy();const ee=yy(C),JQ=Y3({__proto__:null,default:ee},[C]),lw=n=>{let e;const t=new Set,i=(h,p)=>{const m=typeof h=="function"?h(e):h;if(!Object.is(m,e)){const O=e;e=p??(typeof m!="object"||m===null)?m:Object.assign({},e,m),t.forEach(v=>v(e,O))}},r=()=>e,c={setState:i,getState:r,getInitialState:()=>u,subscribe:h=>(t.add(h),()=>t.delete(h))},u=e=n(i,r,c);return c},eC=n=>n?lw(n):lw,n_=n=>n;function Ji(n,e=n_){const t=ee.useSyncExternalStore(n.subscribe,()=>e(n.getState()),()=>e(n.getInitialState()));return ee.useDebugValue(t),t}const cw=n=>{const e=eC(n),t=i=>Ji(e,i);return Object.assign(t,e),t},Tu=n=>n?cw(n):cw;function i_(n,e){let t;try{t=n()}catch{return}return{getItem:r=>{var s;const a=u=>u===null?null:JSON.parse(u,void 0),c=(s=t.getItem(r))!=null?s:null;return c instanceof Promise?c.then(a):a(c)},setItem:(r,s)=>t.setItem(r,JSON.stringify(s,void 0)),removeItem:r=>t.removeItem(r)}}const UO=n=>e=>{try{const t=n(e);return t instanceof Promise?t:{then(i){return UO(i)(t)},catch(i){return this}}}catch(t){return{then(i){return this},catch(i){return UO(i)(t)}}}},r_=(n,e)=>(t,i,r)=>{let s={storage:i_(()=>localStorage),partialize:x=>x,version:0,merge:(x,w)=>({...w,...x}),...e},a=!1;const c=new Set,u=new Set;let h=s.storage;if(!h)return n((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...x)},i,r);const p=()=>{const x=s.partialize({...i()});return h.setItem(s.name,{state:x,version:s.version})},m=r.setState;r.setState=(x,w)=>{m(x,w),p()};const O=n((...x)=>{t(...x),p()},i,r);r.getInitialState=()=>O;let v;const b=()=>{var x,w;if(!h)return;a=!1,c.forEach(T=>{var A;return T((A=i())!=null?A:O)});const k=((w=s.onRehydrateStorage)==null?void 0:w.call(s,(x=i())!=null?x:O))||void 0;return UO(h.getItem.bind(h))(s.name).then(T=>{if(T)if(typeof T.version=="number"&&T.version!==s.version){if(s.migrate){const A=s.migrate(T.state,T.version);return A instanceof Promise?A.then($=>[!0,$]):[!0,A]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,T.state];return[!1,void 0]}).then(T=>{var A;const[$,R]=T;if(v=s.merge(R,(A=i())!=null?A:O),t(v,!0),$)return p()}).then(()=>{k?.(v,void 0),v=i(),a=!0,u.forEach(T=>T(v))}).catch(T=>{k?.(void 0,T)})};return r.persist={setOptions:x=>{s={...s,...x},x.storage&&(h=x.storage)},clearStorage:()=>{h?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>b(),hasHydrated:()=>a,onHydrate:x=>(c.add(x),()=>{c.delete(x)}),onFinishHydration:x=>(u.add(x),()=>{u.delete(x)})},s.skipHydration||b(),v||O},s_=r_;var Pu=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(){}},ko=typeof window>"u"||"Deno"in globalThis;function hi(){}function o_(n,e){return typeof n=="function"?n(e):n}function GO(n){return typeof n=="number"&&n>=0&&n!==1/0}function tC(n,e){return Math.max(n+(e||0)-Date.now(),0)}function qa(n,e){return typeof n=="function"?n(e):n}function Mi(n,e){return typeof n=="function"?n(e):n}function uw(n,e){const{type:t="all",exact:i,fetchStatus:r,predicate:s,queryKey:a,stale:c}=n;if(a){if(i){if(e.queryHash!==by(a,e.options))return!1}else if(!tu(e.queryKey,a))return!1}if(t!=="all"){const u=e.isActive();if(t==="active"&&!u||t==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||r&&r!==e.state.fetchStatus||s&&!s(e))}function fw(n,e){const{exact:t,status:i,predicate:r,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(eu(e.options.mutationKey)!==eu(s))return!1}else if(!tu(e.options.mutationKey,s))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function by(n,e){return(e?.queryKeyHashFn||eu)(n)}function eu(n){return JSON.stringify(n,(e,t)=>WO(t)?Object.keys(t).sort().reduce((i,r)=>(i[r]=t[r],i),{}):t)}function tu(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>tu(n[t],e[t])):!1}function nC(n,e){if(n===e)return n;const t=hw(n)&&hw(e);if(t||WO(n)&&WO(e)){const i=t?n:Object.keys(n),r=i.length,s=t?e:Object.keys(e),a=s.length,c=t?[]:{};let u=0;for(let h=0;h<a;h++){const p=t?h:s[h];(!t&&i.includes(p)||t)&&n[p]===void 0&&e[p]===void 0?(c[p]=void 0,u++):(c[p]=nC(n[p],e[p]),c[p]===n[p]&&n[p]!==void 0&&u++)}return r===a&&u===r?n:c}return e}function IO(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 hw(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function WO(n){if(!dw(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!dw(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function dw(n){return Object.prototype.toString.call(n)==="[object Object]"}function a_(n){return new Promise(e=>{setTimeout(e,n)})}function HO(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?nC(n,e):e}function l_(n,e,t=0){const i=[...n,e];return t&&i.length>t?i.slice(1):i}function c_(n,e,t=0){const i=[e,...n];return t&&i.length>t?i.slice(0,-1):i}var xy=Symbol();function iC(n,e){return!n.queryFn&&e?.initialPromise?()=>e.initialPromise:!n.queryFn||n.queryFn===xy?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}var u_=class extends Pu{#t;#e;#n;constructor(){super(),this.#n=n=>{if(!ko&&window.addEventListener){const e=()=>n();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(n){this.#n=n,this.#e?.(),this.#e=n(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(n){this.#t!==n&&(this.#t=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(e=>{e(n)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Sy=new u_,f_=class extends Pu{#t=!0;#e;#n;constructor(){super(),this.#n=n=>{if(!ko&&window.addEventListener){const e=()=>n(!0),t=()=>n(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(n){this.#n=n,this.#e?.(),this.#e=n(this.setOnline.bind(this))}setOnline(n){this.#t!==n&&(this.#t=n,this.listeners.forEach(t=>{t(n)}))}isOnline(){return this.#t}},Od=new f_;function FO(){let n,e;const t=new Promise((r,s)=>{n=r,e=s});t.status="pending",t.catch(()=>{});function i(r){Object.assign(t,r),delete t.resolve,delete t.reject}return t.resolve=r=>{i({status:"fulfilled",value:r}),n(r)},t.reject=r=>{i({status:"rejected",reason:r}),e(r)},t}function h_(n){return Math.min(1e3*2**n,3e4)}function rC(n){return(n??"online")==="online"?Od.isOnline():!0}var sC=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function Vg(n){return n instanceof sC}function oC(n){let e=!1,t=0,i=!1,r;const s=FO(),a=x=>{i||(O(new sC(x)),n.abort?.())},c=()=>{e=!0},u=()=>{e=!1},h=()=>Sy.isFocused()&&(n.networkMode==="always"||Od.isOnline())&&n.canRun(),p=()=>rC(n.networkMode)&&n.canRun(),m=x=>{i||(i=!0,n.onSuccess?.(x),r?.(),s.resolve(x))},O=x=>{i||(i=!0,n.onError?.(x),r?.(),s.reject(x))},v=()=>new Promise(x=>{r=w=>{(i||h())&&x(w)},n.onPause?.()}).then(()=>{r=void 0,i||n.onContinue?.()}),b=()=>{if(i)return;let x;const w=t===0?n.initialPromise:void 0;try{x=w??n.fn()}catch(k){x=Promise.reject(k)}Promise.resolve(x).then(m).catch(k=>{if(i)return;const T=n.retry??(ko?0:3),A=n.retryDelay??h_,$=typeof A=="function"?A(t,k):A,R=T===!0||typeof T=="number"&&t<T||typeof T=="function"&&T(t,k);if(e||!R){O(k);return}t++,n.onFail?.(t,k),a_($).then(()=>h()?void 0:v()).then(()=>{e?O(k):b()})})};return{promise:s,cancel:a,continue:()=>(r?.(),s),cancelRetry:c,continueRetry:u,canStart:p,start:()=>(p()?b():v().then(b),s)}}var d_=n=>setTimeout(n,0);function p_(){let n=[],e=0,t=c=>{c()},i=c=>{c()},r=d_;const s=c=>{e?n.push(c):r(()=>{t(c)})},a=()=>{const c=n;n=[],c.length&&r(()=>{i(()=>{c.forEach(u=>{t(u)})})})};return{batch:c=>{let u;e++;try{u=c()}finally{e--,e||a()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{i=c},setScheduler:c=>{r=c}}}var rn=p_(),aC=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GO(this.gcTime)&&(this.#t=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ko?1/0:300*1e3))}clearGcTimeout(){this.#t&&(clearTimeout(this.#t),this.#t=void 0)}},m_=class extends aC{#t;#e;#n;#i;#r;#a;#o;constructor(n){super(),this.#o=!1,this.#a=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#i=n.client,this.#n=this.#i.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#t=g_(this.options),this.state=n.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(n){this.options={...this.#a,...n},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,e){const t=HO(this.state.data,n,this.options);return this.#s({data:t,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),t}setState(n,e){this.#s({type:"setState",state:n,setStateOptions:e})}cancel(n){const e=this.#r?.promise;return this.#r?.cancel(n),e?e.then(hi).catch(hi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(n=>Mi(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xy||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(n=0){return this.state.isInvalidated||this.state.data===void 0||!tC(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(e=>e!==n),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}fetch(n,e){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(n&&this.setOptions(n),!this.options.queryFn){const c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const t=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#o=!0,t.signal)})},r=()=>{const c=iC(this.options,e),u={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(u),this.#o=!1,this.options.persister?this.options.persister(c,u,this):c(u)},s={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};i(s),this.options.behavior?.onFetch(s,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#s({type:"fetch",meta:s.fetchOptions?.meta});const a=c=>{Vg(c)&&c.silent||this.#s({type:"error",error:c}),Vg(c)||(this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this)),this.scheduleGc()};return this.#r=oC({initialPromise:e?.initialPromise,fn:s.fetchFn,abort:t.abort.bind(t),onSuccess:c=>{if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(u){a(u);return}this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,u)=>{this.#s({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}),this.#r.start()}#s(n){const e=t=>{switch(n.type){case"failed":return{...t,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...lC(t.data,this.options),fetchMeta:n.meta??null};case"success":return{...t,data:n.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:n.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=n.error;return Vg(i)&&i.revert&&this.#e?{...this.#e,fetchStatus:"idle"}:{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...n.state}}};this.state=e(this.state),rn.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function lC(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rC(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function g_(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,i=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var O_=class extends Pu{constructor(n={}){super(),this.config=n,this.#t=new Map}#t;build(n,e,t){const i=e.queryKey,r=e.queryHash??by(i,e);let s=this.get(r);return s||(s=new m_({client:n,queryKey:i,queryHash:r,options:n.defaultQueryOptions(e),state:t,defaultOptions:n.getQueryDefaults(i)}),this.add(s)),s}add(n){this.#t.has(n.queryHash)||(this.#t.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const e=this.#t.get(n.queryHash);e&&(n.destroy(),e===n&&this.#t.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){rn.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#t.get(n)}getAll(){return[...this.#t.values()]}find(n){const e={exact:!0,...n};return this.getAll().find(t=>uw(e,t))}findAll(n={}){const e=this.getAll();return Object.keys(n).length>0?e.filter(t=>uw(n,t)):e}notify(n){rn.batch(()=>{this.listeners.forEach(e=>{e(n)})})}onFocus(){rn.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){rn.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},y_=class extends aC{#t;#e;#n;constructor(n){super(),this.mutationId=n.mutationId,this.#e=n.mutationCache,this.#t=[],this.state=n.state||v_(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(e=>e!==n),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#e.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(n){const e=()=>{this.#i({type:"continue"})};this.#n=oC({fn:()=>this.options.mutationFn?this.options.mutationFn(n):Promise.reject(new Error("No mutationFn found")),onFail:(r,s)=>{this.#i({type:"failed",failureCount:r,error:s})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});const t=this.state.status==="pending",i=!this.#n.canStart();try{if(t)e();else{this.#i({type:"pending",variables:n,isPaused:i}),await this.#e.config.onMutate?.(n,this);const s=await this.options.onMutate?.(n);s!==this.state.context&&this.#i({type:"pending",context:s,variables:n,isPaused:i})}const r=await this.#n.start();return await this.#e.config.onSuccess?.(r,n,this.state.context,this),await this.options.onSuccess?.(r,n,this.state.context),await this.#e.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,n,this.state.context),this.#i({type:"success",data:r}),r}catch(r){try{throw await this.#e.config.onError?.(r,n,this.state.context,this),await this.options.onError?.(r,n,this.state.context),await this.#e.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,n,this.state.context),r}finally{this.#i({type:"error",error:r})}}finally{this.#e.runNext(this)}}#i(n){const e=t=>{switch(n.type){case"failed":return{...t,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...t,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:n.error,failureCount:t.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=e(this.state),rn.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(n)}),this.#e.notify({mutation:this,type:"updated",action:n})})}};function v_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var b_=class extends Pu{constructor(n={}){super(),this.config=n,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(n,e,t){const i=new y_({mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(e),state:t});return this.add(i),i}add(n){this.#t.add(n);const e=ch(n);if(typeof e=="string"){const t=this.#e.get(e);t?t.push(n):this.#e.set(e,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#t.delete(n)){const e=ch(n);if(typeof e=="string"){const t=this.#e.get(e);if(t)if(t.length>1){const i=t.indexOf(n);i!==-1&&t.splice(i,1)}else t[0]===n&&this.#e.delete(e)}}this.notify({type:"removed",mutation:n})}canRun(n){const e=ch(n);if(typeof e=="string"){const i=this.#e.get(e)?.find(r=>r.state.status==="pending");return!i||i===n}else return!0}runNext(n){const e=ch(n);return typeof e=="string"?this.#e.get(e)?.find(i=>i!==n&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){rn.batch(()=>{this.#t.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(n){const e={exact:!0,...n};return this.getAll().find(t=>fw(e,t))}findAll(n={}){return this.getAll().filter(e=>fw(n,e))}notify(n){rn.batch(()=>{this.listeners.forEach(e=>{e(n)})})}resumePausedMutations(){const n=this.getAll().filter(e=>e.state.isPaused);return rn.batch(()=>Promise.all(n.map(e=>e.continue().catch(hi))))}};function ch(n){return n.options.scope?.id}function pw(n){return{onFetch:(e,t)=>{const i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,s=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const h=async()=>{let p=!1;const m=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?p=!0:e.signal.addEventListener("abort",()=>{p=!0}),e.signal)})},O=iC(e.options,e.fetchOptions),v=async(b,x,w)=>{if(p)return Promise.reject();if(x==null&&b.pages.length)return Promise.resolve(b);const k={client:e.client,queryKey:e.queryKey,pageParam:x,direction:w?"backward":"forward",meta:e.options.meta};m(k);const T=await O(k),{maxPages:A}=e.options,$=w?c_:l_;return{pages:$(b.pages,T,A),pageParams:$(b.pageParams,x,A)}};if(r&&s.length){const b=r==="backward",x=b?x_:mw,w={pages:s,pageParams:a},k=x(i,w);c=await v(w,k,b)}else{const b=n??s.length;do{const x=u===0?a[0]??i.initialPageParam:mw(i,c);if(u>0&&x==null)break;c=await v(c,x),u++}while(u<b)}return c};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t):e.fetchFn=h}}}function mw(n,{pages:e,pageParams:t}){const i=e.length-1;return e.length>0?n.getNextPageParam(e[i],e,t[i],t):void 0}function x_(n,{pages:e,pageParams:t}){return e.length>0?n.getPreviousPageParam?.(e[0],e,t[0],t):void 0}var S_=class{#t;#e;#n;#i;#r;#a;#o;#s;constructor(n={}){this.#t=n.queryCache||new O_,this.#e=n.mutationCache||new b_,this.#n=n.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Sy.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#s=Od.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(n){return this.#t.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#e.findAll({...n,status:"pending"}).length}getQueryData(n){const e=this.defaultQueryOptions({queryKey:n});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=this.#t.build(this,e),i=t.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(qa(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(n){return this.#t.findAll(n).map(({queryKey:e,state:t})=>{const i=t.data;return[e,i]})}setQueryData(n,e,t){const i=this.defaultQueryOptions({queryKey:n}),s=this.#t.get(i.queryHash)?.state.data,a=o_(e,s);if(a!==void 0)return this.#t.build(this,i).setData(a,{...t,manual:!0})}setQueriesData(n,e,t){return rn.batch(()=>this.#t.findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,e,t)]))}getQueryState(n){const e=this.defaultQueryOptions({queryKey:n});return this.#t.get(e.queryHash)?.state}removeQueries(n){const e=this.#t;rn.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=this.#t;return rn.batch(()=>(t.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},i=rn.batch(()=>this.#t.findAll(n).map(r=>r.cancel(t)));return Promise.all(i).then(hi).catch(hi)}invalidateQueries(n,e={}){return rn.batch(()=>(this.#t.findAll(n).forEach(t=>{t.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},i=rn.batch(()=>this.#t.findAll(n).filter(r=>!r.isDisabled()).map(r=>{let s=r.fetch(void 0,t);return t.throwOnError||(s=s.catch(hi)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(hi)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=this.#t.build(this,e);return t.isStaleByTime(qa(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(hi).catch(hi)}fetchInfiniteQuery(n){return n.behavior=pw(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(hi).catch(hi)}ensureInfiniteQueryData(n){return n.behavior=pw(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Od.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,e){this.#i.set(eu(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...this.#i.values()],t={};return e.forEach(i=>{tu(n,i.queryKey)&&Object.assign(t,i.defaultOptions)}),t}setMutationDefaults(n,e){this.#r.set(eu(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...this.#r.values()],t={};return e.forEach(i=>{tu(n,i.mutationKey)&&Object.assign(t,i.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=by(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===xy&&(e.enabled=!1),e}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},w_=class extends Pu{constructor(n,e){super(),this.options=e,this.#t=n,this.#s=null,this.#o=FO(),this.options.experimental_prefetchInRender||this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#n=void 0;#i=void 0;#r;#a;#o;#s;#m;#h;#d;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),gw(this.#e,this.options)?this.#f():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return KO(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return KO(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#e.removeObserver(this)}setOptions(n){const e=this.options,t=this.#e;if(this.options=this.#t.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mi(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#e.setOptions(this.options),e._defaulted&&!IO(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const i=this.hasListeners();i&&Ow(this.#e,t,this.options,e)&&this.#f(),this.updateResult(),i&&(this.#e!==t||Mi(this.options.enabled,this.#e)!==Mi(e.enabled,this.#e)||qa(this.options.staleTime,this.#e)!==qa(e.staleTime,this.#e))&&this.#g();const r=this.#O();i&&(this.#e!==t||Mi(this.options.enabled,this.#e)!==Mi(e.enabled,this.#e)||r!==this.#l)&&this.#y(r)}getOptimisticResult(n){const e=this.#t.getQueryCache().build(this.#t,n),t=this.createResult(e,n);return Q_(this,t)&&(this.#i=t,this.#a=this.options,this.#r=this.#e.state),t}getCurrentResult(){return this.#i}trackResult(n,e){return new Proxy(n,{get:(t,i)=>(this.trackProp(i),e?.(i),Reflect.get(t,i))})}trackProp(n){this.#p.add(n)}getCurrentQuery(){return this.#e}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const e=this.#t.defaultQueryOptions(n),t=this.#t.getQueryCache().build(this.#t,e);return t.fetch().then(()=>this.createResult(t,e))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(n){this.#S();let e=this.#e.fetch(this.options,n);return n?.throwOnError||(e=e.catch(hi)),e}#g(){this.#b();const n=qa(this.options.staleTime,this.#e);if(ko||this.#i.isStale||!GO(n))return;const t=tC(this.#i.dataUpdatedAt,n)+1;this.#c=setTimeout(()=>{this.#i.isStale||this.updateResult()},t)}#O(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(n){this.#x(),this.#l=n,!(ko||Mi(this.options.enabled,this.#e)===!1||!GO(this.#l)||this.#l===0)&&(this.#u=setInterval(()=>{(this.options.refetchIntervalInBackground||Sy.isFocused())&&this.#f()},this.#l))}#v(){this.#g(),this.#y(this.#O())}#b(){this.#c&&(clearTimeout(this.#c),this.#c=void 0)}#x(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}createResult(n,e){const t=this.#e,i=this.options,r=this.#i,s=this.#r,a=this.#a,u=n!==t?n.state:this.#n,{state:h}=n;let p={...h},m=!1,O;if(e._optimisticResults){const j=this.hasListeners(),Y=!j&&gw(n,e),J=j&&Ow(n,t,e,i);(Y||J)&&(p={...p,...lC(h.data,n.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:x}=p;O=p.data;let w=!1;if(e.placeholderData!==void 0&&O===void 0&&x==="pending"){let j;r?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(j=r.data,w=!0):j=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,j!==void 0&&(x="success",O=HO(r?.data,j,e),m=!0)}if(e.select&&O!==void 0&&!w)if(r&&O===s?.data&&e.select===this.#m)O=this.#h;else try{this.#m=e.select,O=e.select(O),O=HO(r?.data,O,e),this.#h=O,this.#s=null}catch(j){this.#s=j}this.#s&&(v=this.#s,O=this.#h,b=Date.now(),x="error");const k=p.fetchStatus==="fetching",T=x==="pending",A=x==="error",$=T&&k,R=O!==void 0,D={status:x,fetchStatus:p.fetchStatus,isPending:T,isSuccess:x==="success",isError:A,isInitialLoading:$,isLoading:$,data:O,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>u.dataUpdateCount||p.errorUpdateCount>u.errorUpdateCount,isFetching:k,isRefetching:k&&!T,isLoadingError:A&&!R,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&R,isStale:wy(n,e),refetch:this.refetch,promise:this.#o};if(this.options.experimental_prefetchInRender){const j=I=>{D.status==="error"?I.reject(D.error):D.data!==void 0&&I.resolve(D.data)},Y=()=>{const I=this.#o=D.promise=FO();j(I)},J=this.#o;switch(J.status){case"pending":n.queryHash===t.queryHash&&j(J);break;case"fulfilled":(D.status==="error"||D.data!==J.value)&&Y();break;case"rejected":(D.status!=="error"||D.error!==J.reason)&&Y();break}}return D}updateResult(){const n=this.#i,e=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#a=this.options,this.#r.data!==void 0&&(this.#d=this.#e),IO(e,n))return;this.#i=e;const t=()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,r=typeof i=="function"?i():i;if(r==="all"||!r&&!this.#p.size)return!0;const s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(a=>{const c=a;return this.#i[c]!==n[c]&&s.has(c)})};this.#w({listeners:t()})}#S(){const n=this.#t.getQueryCache().build(this.#t,this.options);if(n===this.#e)return;const e=this.#e;this.#e=n,this.#n=n.state,this.hasListeners()&&(e?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#w(n){rn.batch(()=>{n.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function k_(n,e){return Mi(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function gw(n,e){return k_(n,e)||n.state.data!==void 0&&KO(n,e,e.refetchOnMount)}function KO(n,e,t){if(Mi(e.enabled,n)!==!1){const i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&wy(n,e)}return!1}function Ow(n,e,t,i){return(n!==e||Mi(i.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&wy(n,t)}function wy(n,e){return Mi(e.enabled,n)!==!1&&n.isStaleByTime(qa(e.staleTime,n))}function Q_(n,e){return!IO(n.getCurrentResult(),e)}var cC=C.createContext(void 0),C_=n=>{const e=C.useContext(cC);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},T_=({client:n,children:e})=>(C.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),S.jsx(cC.Provider,{value:n,children:e})),uC=C.createContext(!1),P_=()=>C.useContext(uC);uC.Provider;function A_(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var M_=C.createContext(A_()),R_=()=>C.useContext(M_);function $_(n,e){return typeof n=="function"?n(...e):!!n}function yw(){}var E_=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},__=n=>{C.useEffect(()=>{n.clearReset()},[n])},D_=({result:n,errorResetBoundary:e,throwOnError:t,query:i,suspense:r})=>n.isError&&!e.isReset()&&!n.isFetching&&i&&(r&&n.data===void 0||$_(t,[n.error,i])),j_=n=>{const e=n.staleTime;n.suspense&&(n.staleTime=typeof e=="function"?(...t)=>Math.max(e(...t),1e3):Math.max(e??1e3,1e3),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3)))},N_=(n,e)=>n.isLoading&&n.isFetching&&!e,Z_=(n,e)=>n?.suspense&&e.isPending,vw=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function X_(n,e,t){const i=C_(),r=P_(),s=R_(),a=i.defaultQueryOptions(n);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=r?"isRestoring":"optimistic",j_(a),E_(a,s),__(s);const c=!i.getQueryCache().get(a.queryHash),[u]=C.useState(()=>new e(i,a)),h=u.getOptimisticResult(a),p=!r&&n.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(m=>{const O=p?u.subscribe(rn.batchCalls(m)):yw;return u.updateResult(),O},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),C.useEffect(()=>{u.setOptions(a)},[a,u]),Z_(a,h))throw vw(a,u,s);if(D_({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:i.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw h.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!ko&&N_(h,r)&&(c?vw(a,u,s):i.getQueryCache().get(a.queryHash)?.promise)?.catch(yw).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?h:u.trackResult(h)}function fC(n,e){return X_(n,w_)}const Vs="";async function L_(n,e,t){return await fetch(`${Vs}/api/create-app`,{method:"POST",body:JSON.stringify({options:{...n,chosenAddOns:e,starter:t?.url||void 0}}),headers:{"Content-Type":"application/json"}})}async function z_(n){return await fetch(`${Vs}/api/add-to-app`,{method:"POST",body:JSON.stringify({addOns:n}),headers:{"Content-Type":"application/json"}})}function hC(){return fetch(`${Vs}/api/shutdown`,{method:"POST"})}async function q_(n){return await(await fetch(`${Vs}/api/load-remote-add-on?url=${n}`)).json()}async function dC(n){return await(await fetch(`${Vs}/api/load-starter?url=${n}`)).json()}const B_=fetch(`${Vs}/api/initial-payload`);async function V_(){return await(await B_).json()}async function Y_(n,e,t){return(await fetch(`${Vs}/api/dry-run-create-app`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({options:{...n,chosenAddOns:e,starter:t?.url}})})).json()}async function U_(n){return(await fetch(`${Vs}/api/dry-run-add-to-app`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({addOns:n})})).json()}function G_(n,e,t){const i=new Map,r=u=>n.find(h=>h.id===u).type,s=u=>r(u)==="host",a=u=>e.some(h=>r(h)===r(u));for(const u of n)i.set(u.id,{selected:!1,enabled:!0,dependedUpon:!1,isSingleSelect:u.type==="host"?u.type:void 0});function c(u){const h=new Set;function p(m){if(h.has(m))return;h.add(m);const O=n.find(v=>v.id===m);if(O){for(const b of O.dependsOn||[]){const x=i.get(b);x&&(x.selected=!0,x.enabled=!!s(b),x.dependedUpon=!0,p(b))}const v=i.get(m);v&&(v.selected=!0,v.dependedUpon||(v.enabled=!0))}}p(u)}for(const u of t){const h=i.get(u);h&&(s(u)?a(u)?(h.selected=!1,h.enabled=!0,h.dependedUpon=!1):(h.selected=!0,h.enabled=!0,h.dependedUpon=!0):(h.selected=!0,h.enabled=!1,h.dependedUpon=!0,c(u)))}for(const u of e)c(u);return Object.fromEntries(Array.from(i.entries()).map(([u,h])=>[u,{enabled:h.enabled,selected:h.selected,isSingleSelect:h.isSingleSelect}]))}const dn=Tu(()=>({initialized:!1,framework:"",mode:"",projectName:"",targetDir:"",typescript:!0,tailwind:!0,git:!0,chosenAddOns:[],addOnOptions:{},packageManager:"pnpm"})),Ni=()=>fC({queryKey:["initial-data"],queryFn:V_}),gr=()=>{const{data:n}=Ni();return n!==void 0},pC=()=>Ni().data?.forcedRouterMode,I_=()=>Ni().data?.forcedAddOns,ky=()=>Ni().data?.registry,W_=()=>Ni().data?.localFiles,H_=()=>Ni().data?.output,mC=()=>Ni().data?.options,F_=()=>mC()?.chosenAddOns,Or=()=>Ni().data?.applicationMode,K_=()=>Ni().data?.showHostingOptions,J_=()=>Ni().data?.addOns,eD=()=>Ni().data?.supportedModes,bw=Tu(()=>({includeFiles:["unchanged","added","modified","deleted","overwritten"]})),Za=Tu(()=>({userSelectedAddOns:[],customAddOns:[]})),ml=Tu(()=>({projectStarter:void 0}));function tD(n){Za.setState(e=>({customAddOns:[...e.customAddOns,n]})),n.modes.includes(dn.getState().mode)&&Za.setState(e=>({userSelectedAddOns:[...e.userSelectedAddOns,n.id]}))}function Au(){const n=gr(),e=Mu(),t=F_(),i=J_(),r=I_(),{userSelectedAddOns:s,customAddOns:a}=Za(),c=ml().projectStarter,u=C.useMemo(()=>n?[...i?.[e]||[],...a.filter(x=>x.modes.includes(e))]:[],[n,e,i,a]),h=C.useMemo(()=>{if(!n)return{};const b=new Set;for(const x of c?.dependsOn||[])b.add(x);for(const x of t)b.add(x);for(const x of r||[])b.add(x);return G_(u,s,Array.from(b))},[n,u,s,t,c?.dependsOn,r]),p=C.useMemo(()=>{if(!n)return[];const b=new Set(Object.keys(h).filter(x=>h[x].selected));for(const x of r||[])b.add(x);return Array.from(b)},[n,h,r]),m=C.useCallback(b=>{if(n)if(h[b].isSingleSelect){if(!h[b].selected){const x=h[b].isSingleSelect,w=Object.keys(h).find(k=>k!==b&&h[k].isSingleSelect===x&&h[k].selected);Za.setState(k=>{let T=k.userSelectedAddOns.filter(A=>A!==w);return T.includes(b)||(T=[...T,b]),{userSelectedAddOns:T}})}}else h[b].enabled&&(h[b].selected?Za.setState(x=>({userSelectedAddOns:x.userSelectedAddOns.filter(w=>w!==b)})):Za.setState(x=>({userSelectedAddOns:[...x.userSelectedAddOns,b]})))},[n,h,u]),O=C.useCallback((b,x,w)=>{n&&dn.setState(k=>({addOnOptions:{...k.addOnOptions,[b]:{...k.addOnOptions[b],[x]:w}}}))},[n]),v=C.useCallback(b=>dn.getState().addOnOptions[b]||{},[]);return{toggleAddOn:m,setAddOnOption:O,getAddOnOptions:v,chosenAddOns:p,availableAddOns:u,userSelectedAddOns:s,originalSelectedAddOns:t,addOnState:h}}const Qy=()=>ml(n=>n.projectStarter===void 0),nD=()=>{const n=gr(),e=pC(),t=Qy();return n?!e&&t:!1},iD=()=>{const n=gr(),e=Qy(),t=Mu();return n?e&&t==="code-router":!1},rD=()=>{const n=gr(),e=Qy(),t=Mu();return n?e&&t==="code-router":!1},sD=()=>dn(n=>n.projectName),Mu=()=>{const n=gr(),e=pC(),t=dn(i=>i.mode);return n?e||t:"file-router"};function gC(){const n=gr(),e=bw(i=>i.includeFiles),t=C.useCallback(i=>{n&&bw.setState(r=>({includeFiles:r.includeFiles.includes(i)?r.includeFiles.filter(s=>s!==i):[...r.includeFiles,i]}))},[n]);return{includedFiles:e,toggleFilter:t}}function oD(){const n=gr(),e=Or(),{initialized:t,...i}=dn(),{userSelectedAddOns:r,chosenAddOns:s}=Au(),a=ml().projectStarter,{data:c}=fC({queryKey:["dry-run",e,JSON.stringify(i),JSON.stringify(r),a?.url],queryFn:async()=>e==="none"||!n||!t?{files:{},commands:[],deletedFiles:[]}:e==="setup"?Y_(i,s,a):U_(r),enabled:n,initialData:{files:{},commands:[],deletedFiles:[]}});return c}const aD=Tu()(s_(n=>({open:!1,dontShowAgain:!1,setOpen:e=>n({open:e}),setDontShowAgain:e=>n({dontShowAgain:e})}),{name:"startup-dialog",partialize:n=>({dontShowAgain:n.dontShowAgain}),merge:(n,e)=>(n&&n.dontShowAgain?e.open=!1:e.open=!0,e)})),lD=n=>dn.setState({projectName:n}),cD=n=>dn.setState({mode:n});function uD(n){dn.setState({typescript:n})}function fD(n){dn.setState({tailwind:n})}function JO(n){ml.setState(()=>({projectStarter:n})),n&&dn.setState({mode:n.mode})}function hD(){const n=gr(),e=mC();C.useEffect(()=>{n&&dn.setState({...e,initialized:!0})},[n])}/**
49
+ `).replace(d3,"")}function QS(o,l){return l=kS(l),kS(o)===l}function Wf(){}function et(o,l,f,d,g,y){switch(f){case"children":typeof d=="string"?l==="body"||l==="textarea"&&d===""||Ho(o,d):(typeof d=="number"||typeof d=="bigint")&&l!=="body"&&Ho(o,""+d);break;case"className":Ju(o,"class",d);break;case"tabIndex":Ju(o,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Ju(o,f,d);break;case"style":Tb(o,d,y);break;case"data":if(l!=="object"){Ju(o,"data",d);break}case"src":case"href":if(d===""&&(l!=="a"||f!=="href")){o.removeAttribute(f);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){o.removeAttribute(f);break}d=nf(""+d),o.setAttribute(f,d);break;case"action":case"formAction":if(typeof d=="function"){o.setAttribute(f,"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 y=="function"&&(f==="formAction"?(l!=="input"&&et(o,l,"name",g.name,g,null),et(o,l,"formEncType",g.formEncType,g,null),et(o,l,"formMethod",g.formMethod,g,null),et(o,l,"formTarget",g.formTarget,g,null)):(et(o,l,"encType",g.encType,g,null),et(o,l,"method",g.method,g,null),et(o,l,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){o.removeAttribute(f);break}d=nf(""+d),o.setAttribute(f,d);break;case"onClick":d!=null&&(o.onclick=Wf);break;case"onScroll":d!=null&&Ze("scroll",o);break;case"onScrollEnd":d!=null&&Ze("scrollend",o);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(f=d.__html,f!=null){if(g.children!=null)throw Error(i(60));o.innerHTML=f}}break;case"multiple":o.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":o.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){o.removeAttribute("xlink:href");break}f=nf(""+d),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(f,""+d):o.removeAttribute(f);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":d&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(f,""):o.removeAttribute(f);break;case"capture":case"download":d===!0?o.setAttribute(f,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?o.setAttribute(f,d):o.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?o.setAttribute(f,d):o.removeAttribute(f);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?o.removeAttribute(f):o.setAttribute(f,d);break;case"popover":Ze("beforetoggle",o),Ze("toggle",o),Ku(o,"popover",d);break;case"xlinkActuate":Tr(o,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Tr(o,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Tr(o,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Tr(o,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Tr(o,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Tr(o,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Tr(o,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Tr(o,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Tr(o,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Ku(o,"is",d);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=BE.get(f)||f,Ku(o,f,d))}}function xg(o,l,f,d,g,y){switch(f){case"style":Tb(o,d,y);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(f=d.__html,f!=null){if(g.children!=null)throw Error(i(60));o.innerHTML=f}}break;case"children":typeof d=="string"?Ho(o,d):(typeof d=="number"||typeof d=="bigint")&&Ho(o,""+d);break;case"onScroll":d!=null&&Ze("scroll",o);break;case"onScrollEnd":d!=null&&Ze("scrollend",o);break;case"onClick":d!=null&&(o.onclick=Wf);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gb.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(g=f.endsWith("Capture"),l=f.slice(2,g?f.length-7:void 0),y=o[lt]||null,y=y!=null?y[f]:null,typeof y=="function"&&o.removeEventListener(l,y,g),typeof d=="function")){typeof y!="function"&&y!==null&&(f in o?o[f]=null:o.hasAttribute(f)&&o.removeAttribute(f)),o.addEventListener(l,d,g);break e}f in o?o[f]=d:d===!0?o.setAttribute(f,""):Ku(o,f,d)}}}function tn(o,l,f){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",o),Ze("load",o);var d=!1,g=!1,y;for(y in f)if(f.hasOwnProperty(y)){var Q=f[y];if(Q!=null)switch(y){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:et(o,l,y,Q,f,null)}}g&&et(o,l,"srcSet",f.srcSet,f,null),d&&et(o,l,"src",f.src,f,null);return;case"input":Ze("invalid",o);var P=y=Q=g=null,N=null,V=null;for(d in f)if(f.hasOwnProperty(d)){var ne=f[d];if(ne!=null)switch(d){case"name":g=ne;break;case"type":Q=ne;break;case"checked":N=ne;break;case"defaultChecked":V=ne;break;case"value":y=ne;break;case"defaultValue":P=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(i(137,l));break;default:et(o,l,d,ne,f,null)}}wb(o,y,P,N,V,Q,g,!1),ef(o);return;case"select":Ze("invalid",o),d=Q=y=null;for(g in f)if(f.hasOwnProperty(g)&&(P=f[g],P!=null))switch(g){case"value":y=P;break;case"defaultValue":Q=P;break;case"multiple":d=P;default:et(o,l,g,P,f,null)}l=y,f=Q,o.multiple=!!d,l!=null?Wo(o,!!d,l,!1):f!=null&&Wo(o,!!d,f,!0);return;case"textarea":Ze("invalid",o),y=g=d=null;for(Q in f)if(f.hasOwnProperty(Q)&&(P=f[Q],P!=null))switch(Q){case"value":d=P;break;case"defaultValue":g=P;break;case"children":y=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(91));break;default:et(o,l,Q,P,f,null)}Qb(o,d,g,y),ef(o);return;case"option":for(N in f)if(f.hasOwnProperty(N)&&(d=f[N],d!=null))switch(N){case"selected":o.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:et(o,l,N,d,f,null)}return;case"dialog":Ze("beforetoggle",o),Ze("toggle",o),Ze("cancel",o),Ze("close",o);break;case"iframe":case"object":Ze("load",o);break;case"video":case"audio":for(d=0;d<hc.length;d++)Ze(hc[d],o);break;case"image":Ze("error",o),Ze("load",o);break;case"details":Ze("toggle",o);break;case"embed":case"source":case"link":Ze("error",o),Ze("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in f)if(f.hasOwnProperty(V)&&(d=f[V],d!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:et(o,l,V,d,f,null)}return;default:if(Np(l)){for(ne in f)f.hasOwnProperty(ne)&&(d=f[ne],d!==void 0&&xg(o,l,ne,d,f,void 0));return}}for(P in f)f.hasOwnProperty(P)&&(d=f[P],d!=null&&et(o,l,P,d,f,null))}function p3(o,l,f,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,y=null,Q=null,P=null,N=null,V=null,ne=null;for(H in f){var se=f[H];if(f.hasOwnProperty(H)&&se!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":N=se;default:d.hasOwnProperty(H)||et(o,l,H,null,d,se)}}for(var G in d){var H=d[G];if(se=f[G],d.hasOwnProperty(G)&&(H!=null||se!=null))switch(G){case"type":y=H;break;case"name":g=H;break;case"checked":V=H;break;case"defaultChecked":ne=H;break;case"value":Q=H;break;case"defaultValue":P=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,l));break;default:H!==se&&et(o,l,G,H,d,se)}}Dp(o,Q,P,N,V,ne,y,g);return;case"select":H=Q=P=G=null;for(y in f)if(N=f[y],f.hasOwnProperty(y)&&N!=null)switch(y){case"value":break;case"multiple":H=N;default:d.hasOwnProperty(y)||et(o,l,y,null,d,N)}for(g in d)if(y=d[g],N=f[g],d.hasOwnProperty(g)&&(y!=null||N!=null))switch(g){case"value":G=y;break;case"defaultValue":P=y;break;case"multiple":Q=y;default:y!==N&&et(o,l,g,y,d,N)}l=P,f=Q,d=H,G!=null?Wo(o,!!f,G,!1):!!d!=!!f&&(l!=null?Wo(o,!!f,l,!0):Wo(o,!!f,f?[]:"",!1));return;case"textarea":H=G=null;for(P in f)if(g=f[P],f.hasOwnProperty(P)&&g!=null&&!d.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:et(o,l,P,null,d,g)}for(Q in d)if(g=d[Q],y=f[Q],d.hasOwnProperty(Q)&&(g!=null||y!=null))switch(Q){case"value":G=g;break;case"defaultValue":H=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(i(91));break;default:g!==y&&et(o,l,Q,g,d,y)}kb(o,G,H);return;case"option":for(var Pe in f)if(G=f[Pe],f.hasOwnProperty(Pe)&&G!=null&&!d.hasOwnProperty(Pe))switch(Pe){case"selected":o.selected=!1;break;default:et(o,l,Pe,null,d,G)}for(N in d)if(G=d[N],H=f[N],d.hasOwnProperty(N)&&G!==H&&(G!=null||H!=null))switch(N){case"selected":o.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:et(o,l,N,G,d,H)}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 Qe in f)G=f[Qe],f.hasOwnProperty(Qe)&&G!=null&&!d.hasOwnProperty(Qe)&&et(o,l,Qe,null,d,G);for(V in d)if(G=d[V],H=f[V],d.hasOwnProperty(V)&&G!==H&&(G!=null||H!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(i(137,l));break;default:et(o,l,V,G,d,H)}return;default:if(Np(l)){for(var tt in f)G=f[tt],f.hasOwnProperty(tt)&&G!==void 0&&!d.hasOwnProperty(tt)&&xg(o,l,tt,void 0,d,G);for(ne in d)G=d[ne],H=f[ne],!d.hasOwnProperty(ne)||G===H||G===void 0&&H===void 0||xg(o,l,ne,G,d,H);return}}for(var L in f)G=f[L],f.hasOwnProperty(L)&&G!=null&&!d.hasOwnProperty(L)&&et(o,l,L,null,d,G);for(se in d)G=d[se],H=f[se],!d.hasOwnProperty(se)||G===H||G==null&&H==null||et(o,l,se,G,d,H)}var Sg=null,wg=null;function Hf(o){return o.nodeType===9?o:o.ownerDocument}function CS(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function TS(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function kg(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Qg=null;function m3(){var o=window.event;return o&&o.type==="popstate"?o===Qg?!1:(Qg=o,!0):(Qg=null,!1)}var PS=typeof setTimeout=="function"?setTimeout:void 0,g3=typeof clearTimeout=="function"?clearTimeout:void 0,AS=typeof Promise=="function"?Promise:void 0,O3=typeof queueMicrotask=="function"?queueMicrotask:typeof AS<"u"?function(o){return AS.resolve(null).then(o).catch(y3)}:PS;function y3(o){setTimeout(function(){throw o})}function Ss(o){return o==="head"}function MS(o,l){var f=l,d=0,g=0;do{var y=f.nextSibling;if(o.removeChild(f),y&&y.nodeType===8)if(f=y.data,f==="/$"){if(0<d&&8>d){f=d;var Q=o.ownerDocument;if(f&1&&pc(Q.documentElement),f&2&&pc(Q.body),f&4)for(f=Q.head,pc(f),Q=f.firstChild;Q;){var P=Q.nextSibling,N=Q.nodeName;Q[Al]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&Q.rel.toLowerCase()==="stylesheet"||f.removeChild(Q),Q=P}}if(g===0){o.removeChild(y),Sc(l);return}g--}else f==="$"||f==="$?"||f==="$!"?g++:d=f.charCodeAt(0)-48;else d=0;f=y}while(f);Sc(l)}function Cg(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var f=l;switch(l=l.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Cg(f),Rp(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}o.removeChild(f)}}function v3(o,l,f,d){for(;o.nodeType===1;){var g=f;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!d&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(d){if(!o[Al])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(y=o.getAttribute("rel"),y==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(y!==g.rel||o.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||o.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||o.getAttribute("title")!==(g.title==null?null:g.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(y=o.getAttribute("src"),(y!==(g.src==null?null:g.src)||o.getAttribute("type")!==(g.type==null?null:g.type)||o.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&y&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var y=g.name==null?null:""+g.name;if(g.type==="hidden"&&o.getAttribute("name")===y)return o}else return o;if(o=Ai(o.nextSibling),o===null)break}return null}function b3(o,l,f){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!f||(o=Ai(o.nextSibling),o===null))return null;return o}function Tg(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState==="complete"}function x3(o,l){var f=o.ownerDocument;if(o.data!=="$?"||f.readyState==="complete")l();else{var d=function(){l(),f.removeEventListener("DOMContentLoaded",d)};f.addEventListener("DOMContentLoaded",d),o._reactRetry=d}}function Ai(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="F!"||l==="F")break;if(l==="/$")return null}}return o}var Pg=null;function RS(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var f=o.data;if(f==="$"||f==="$!"||f==="$?"){if(l===0)return o;l--}else f==="/$"&&l++}o=o.previousSibling}return null}function $S(o,l,f){switch(l=Hf(f),o){case"html":if(o=l.documentElement,!o)throw Error(i(452));return o;case"head":if(o=l.head,!o)throw Error(i(453));return o;case"body":if(o=l.body,!o)throw Error(i(454));return o;default:throw Error(i(451))}}function pc(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);Rp(o)}var fi=new Map,ES=new Set;function Ff(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var zr=U.d;U.d={f:S3,r:w3,D:k3,C:Q3,L:C3,m:T3,X:A3,S:P3,M:M3};function S3(){var o=zr.f(),l=qf();return o||l}function w3(o){var l=Yo(o);l!==null&&l.tag===5&&l.type==="form"?J1(l):zr.r(o)}var Qa=typeof document>"u"?null:document;function _S(o,l,f){var d=Qa;if(d&&typeof l=="string"&&l){var g=ri(l);g='link[rel="'+o+'"][href="'+g+'"]',typeof f=="string"&&(g+='[crossorigin="'+f+'"]'),ES.has(g)||(ES.add(g),o={rel:o,crossOrigin:f,href:l},d.querySelector(g)===null&&(l=d.createElement("link"),tn(l,"link",o),It(l),d.head.appendChild(l)))}}function k3(o){zr.D(o),_S("dns-prefetch",o,null)}function Q3(o,l){zr.C(o,l),_S("preconnect",o,l)}function C3(o,l,f){zr.L(o,l,f);var d=Qa;if(d&&o&&l){var g='link[rel="preload"][as="'+ri(l)+'"]';l==="image"&&f&&f.imageSrcSet?(g+='[imagesrcset="'+ri(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(g+='[imagesizes="'+ri(f.imageSizes)+'"]')):g+='[href="'+ri(o)+'"]';var y=g;switch(l){case"style":y=Ca(o);break;case"script":y=Ta(o)}fi.has(y)||(o=p({rel:"preload",href:l==="image"&&f&&f.imageSrcSet?void 0:o,as:l},f),fi.set(y,o),d.querySelector(g)!==null||l==="style"&&d.querySelector(mc(y))||l==="script"&&d.querySelector(gc(y))||(l=d.createElement("link"),tn(l,"link",o),It(l),d.head.appendChild(l)))}}function T3(o,l){zr.m(o,l);var f=Qa;if(f&&o){var d=l&&typeof l.as=="string"?l.as:"script",g='link[rel="modulepreload"][as="'+ri(d)+'"][href="'+ri(o)+'"]',y=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Ta(o)}if(!fi.has(y)&&(o=p({rel:"modulepreload",href:o},l),fi.set(y,o),f.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(gc(y)))return}d=f.createElement("link"),tn(d,"link",o),It(d),f.head.appendChild(d)}}}function P3(o,l,f){zr.S(o,l,f);var d=Qa;if(d&&o){var g=Uo(d).hoistableStyles,y=Ca(o);l=l||"default";var Q=g.get(y);if(!Q){var P={loading:0,preload:null};if(Q=d.querySelector(mc(y)))P.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":l},f),(f=fi.get(y))&&Ag(o,f);var N=Q=d.createElement("link");It(N),tn(N,"link",o),N._p=new Promise(function(V,ne){N.onload=V,N.onerror=ne}),N.addEventListener("load",function(){P.loading|=1}),N.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Kf(Q,l,d)}Q={type:"stylesheet",instance:Q,count:1,state:P},g.set(y,Q)}}}function A3(o,l){zr.X(o,l);var f=Qa;if(f&&o){var d=Uo(f).hoistableScripts,g=Ta(o),y=d.get(g);y||(y=f.querySelector(gc(g)),y||(o=p({src:o,async:!0},l),(l=fi.get(g))&&Mg(o,l),y=f.createElement("script"),It(y),tn(y,"link",o),f.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},d.set(g,y))}}function M3(o,l){zr.M(o,l);var f=Qa;if(f&&o){var d=Uo(f).hoistableScripts,g=Ta(o),y=d.get(g);y||(y=f.querySelector(gc(g)),y||(o=p({src:o,async:!0,type:"module"},l),(l=fi.get(g))&&Mg(o,l),y=f.createElement("script"),It(y),tn(y,"link",o),f.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},d.set(g,y))}}function DS(o,l,f,d){var g=(g=ue.current)?Ff(g):null;if(!g)throw Error(i(446));switch(o){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(l=Ca(f.href),f=Uo(g).hoistableStyles,d=f.get(l),d||(d={type:"style",instance:null,count:0,state:null},f.set(l,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){o=Ca(f.href);var y=Uo(g).hoistableStyles,Q=y.get(o);if(Q||(g=g.ownerDocument||g,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(o,Q),(y=g.querySelector(mc(o)))&&!y._p&&(Q.instance=y,Q.state.loading=5),fi.has(o)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},fi.set(o,f),y||R3(g,o,f,Q.state))),l&&d===null)throw Error(i(528,""));return Q}if(l&&d!==null)throw Error(i(529,""));return null;case"script":return l=f.async,f=f.src,typeof f=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ta(f),f=Uo(g).hoistableScripts,d=f.get(l),d||(d={type:"script",instance:null,count:0,state:null},f.set(l,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,o))}}function Ca(o){return'href="'+ri(o)+'"'}function mc(o){return'link[rel="stylesheet"]['+o+"]"}function jS(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function R3(o,l,f,d){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?d.loading=1:(l=o.createElement("link"),d.preload=l,l.addEventListener("load",function(){return d.loading|=1}),l.addEventListener("error",function(){return d.loading|=2}),tn(l,"link",f),It(l),o.head.appendChild(l))}function Ta(o){return'[src="'+ri(o)+'"]'}function gc(o){return"script[async]"+o}function NS(o,l,f){if(l.count++,l.instance===null)switch(l.type){case"style":var d=o.querySelector('style[data-href~="'+ri(f.href)+'"]');if(d)return l.instance=d,It(d),d;var g=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return d=(o.ownerDocument||o).createElement("style"),It(d),tn(d,"style",g),Kf(d,f.precedence,o),l.instance=d;case"stylesheet":g=Ca(f.href);var y=o.querySelector(mc(g));if(y)return l.state.loading|=4,l.instance=y,It(y),y;d=jS(f),(g=fi.get(g))&&Ag(d,g),y=(o.ownerDocument||o).createElement("link"),It(y);var Q=y;return Q._p=new Promise(function(P,N){Q.onload=P,Q.onerror=N}),tn(y,"link",d),l.state.loading|=4,Kf(y,f.precedence,o),l.instance=y;case"script":return y=Ta(f.src),(g=o.querySelector(gc(y)))?(l.instance=g,It(g),g):(d=f,(g=fi.get(y))&&(d=p({},f),Mg(d,g)),o=o.ownerDocument||o,g=o.createElement("script"),It(g),tn(g,"link",d),o.head.appendChild(g),l.instance=g);case"void":return null;default:throw Error(i(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(d=l.instance,l.state.loading|=4,Kf(d,f.precedence,o));return l.instance}function Kf(o,l,f){for(var d=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,y=g,Q=0;Q<d.length;Q++){var P=d[Q];if(P.dataset.precedence===l)y=P;else if(y!==g)break}y?y.parentNode.insertBefore(o,y.nextSibling):(l=f.nodeType===9?f.head:f,l.insertBefore(o,l.firstChild))}function Ag(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function Mg(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var Jf=null;function ZS(o,l,f){if(Jf===null){var d=new Map,g=Jf=new Map;g.set(f,d)}else g=Jf,d=g.get(f),d||(d=new Map,g.set(f,d));if(d.has(o))return d;for(d.set(o,null),f=f.getElementsByTagName(o),g=0;g<f.length;g++){var y=f[g];if(!(y[Al]||y[Tt]||o==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var Q=y.getAttribute(l)||"";Q=o+Q;var P=d.get(Q);P?P.push(y):d.set(Q,[y])}}return d}function XS(o,l,f){o=o.ownerDocument||o,o.head.insertBefore(f,l==="title"?o.querySelector("head > title"):null)}function $3(o,l,f){if(f===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return o=l.disabled,typeof l.precedence=="string"&&o==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function LS(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}var Oc=null;function E3(){}function _3(o,l,f){if(Oc===null)throw Error(i(475));var d=Oc;if(l.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var g=Ca(f.href),y=o.querySelector(mc(g));if(y){o=y._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(d.count++,d=eh.bind(d),o.then(d,d)),l.state.loading|=4,l.instance=y,It(y);return}y=o.ownerDocument||o,f=jS(f),(g=fi.get(g))&&Ag(f,g),y=y.createElement("link"),It(y);var Q=y;Q._p=new Promise(function(P,N){Q.onload=P,Q.onerror=N}),tn(y,"link",f),l.instance=y}d.stylesheets===null&&(d.stylesheets=new Map),d.stylesheets.set(l,o),(o=l.state.preload)&&(l.state.loading&3)===0&&(d.count++,l=eh.bind(d),o.addEventListener("load",l),o.addEventListener("error",l))}}function D3(){if(Oc===null)throw Error(i(475));var o=Oc;return o.stylesheets&&o.count===0&&Rg(o,o.stylesheets),0<o.count?function(l){var f=setTimeout(function(){if(o.stylesheets&&Rg(o,o.stylesheets),o.unsuspend){var d=o.unsuspend;o.unsuspend=null,d()}},6e4);return o.unsuspend=l,function(){o.unsuspend=null,clearTimeout(f)}}:null}function eh(){if(this.count--,this.count===0){if(this.stylesheets)Rg(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var th=null;function Rg(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,th=new Map,l.forEach(j3,o),th=null,eh.call(o))}function j3(o,l){if(!(l.state.loading&4)){var f=th.get(o);if(f)var d=f.get(null);else{f=new Map,th.set(o,f);for(var g=o.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<g.length;y++){var Q=g[y];(Q.nodeName==="LINK"||Q.getAttribute("media")!=="not all")&&(f.set(Q.dataset.precedence,Q),d=Q)}d&&f.set(null,d)}g=l.instance,Q=g.getAttribute("data-precedence"),y=f.get(Q)||d,y===d&&f.set(null,g),f.set(Q,g),this.count++,d=eh.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),y?y.parentNode.insertBefore(g,y.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(g,o.firstChild)),l.state.loading|=4}}var yc={$$typeof:A,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function N3(o,l,f,d,g,y,Q,P){this.tag=1,this.containerInfo=o,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=ss(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ss(0),this.hiddenUpdates=ss(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=y,this.onRecoverableError=Q,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function zS(o,l,f,d,g,y,Q,P,N,V,ne,se){return o=new N3(o,l,f,Q,P,N,V,se),l=1,y===!0&&(l|=24),y=Zn(3,null,null,l),o.current=y,y.stateNode=o,l=hm(),l.refCount++,o.pooledCache=l,l.refCount++,y.memoizedState={element:d,isDehydrated:f,cache:l},gm(y),o}function qS(o){return o?(o=ra,o):ra}function BS(o,l,f,d,g,y){g=qS(g),d.context===null?d.context=g:d.pendingContext=g,d=cs(l),d.payload={element:f},y=y===void 0?null:y,y!==null&&(d.callback=y),f=us(o,d,l),f!==null&&(Bn(f,o,l),Il(f,o,l))}function VS(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var f=o.retryLane;o.retryLane=f!==0&&f<l?f:l}}function $g(o,l){VS(o,l),(o=o.alternate)&&VS(o,l)}function YS(o){if(o.tag===13){var l=ia(o,67108864);l!==null&&Bn(l,o,67108864),$g(o,67108864)}}var nh=!0;function Z3(o,l,f,d){var g=Z.T;Z.T=null;var y=U.p;try{U.p=2,Eg(o,l,f,d)}finally{U.p=y,Z.T=g}}function X3(o,l,f,d){var g=Z.T;Z.T=null;var y=U.p;try{U.p=8,Eg(o,l,f,d)}finally{U.p=y,Z.T=g}}function Eg(o,l,f,d){if(nh){var g=_g(d);if(g===null)bg(o,l,d,ih,f),GS(o,d);else if(z3(g,o,l,f,d))d.stopPropagation();else if(GS(o,d),l&4&&-1<L3.indexOf(o)){for(;g!==null;){var y=Yo(g);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var Q=ni(y.pendingLanes);if(Q!==0){var P=y;for(P.pendingLanes|=2,P.entangledLanes|=2;Q;){var N=1<<31-Qt(Q);P.entanglements[1]|=N,Q&=~N}Gi(y),(He&6)===0&&(Lf=at()+500,fc(0))}}break;case 13:P=ia(y,2),P!==null&&Bn(P,y,2),qf(),$g(y,2)}if(y=_g(d),y===null&&bg(o,l,d,ih,f),y===g)break;g=y}g!==null&&d.stopPropagation()}else bg(o,l,d,null,f)}}function _g(o){return o=Xp(o),Dg(o)}var ih=null;function Dg(o){if(ih=null,o=Vo(o),o!==null){var l=s(o);if(l===null)o=null;else{var f=l.tag;if(f===13){if(o=a(l),o!==null)return o;o=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return ih=o,null}function US(o){switch(o){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(Fn()){case kt:return 2;case Kn:return 8;case Jn:case Lt:return 32;case Dn:return 268435456;default:return 32}default:return 32}}var jg=!1,ws=null,ks=null,Qs=null,vc=new Map,bc=new Map,Cs=[],L3="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 GS(o,l){switch(o){case"focusin":case"focusout":ws=null;break;case"dragenter":case"dragleave":ks=null;break;case"mouseover":case"mouseout":Qs=null;break;case"pointerover":case"pointerout":vc.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":bc.delete(l.pointerId)}}function xc(o,l,f,d,g,y){return o===null||o.nativeEvent!==y?(o={blockedOn:l,domEventName:f,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},l!==null&&(l=Yo(l),l!==null&&YS(l)),o):(o.eventSystemFlags|=d,l=o.targetContainers,g!==null&&l.indexOf(g)===-1&&l.push(g),o)}function z3(o,l,f,d,g){switch(l){case"focusin":return ws=xc(ws,o,l,f,d,g),!0;case"dragenter":return ks=xc(ks,o,l,f,d,g),!0;case"mouseover":return Qs=xc(Qs,o,l,f,d,g),!0;case"pointerover":var y=g.pointerId;return vc.set(y,xc(vc.get(y)||null,o,l,f,d,g)),!0;case"gotpointercapture":return y=g.pointerId,bc.set(y,xc(bc.get(y)||null,o,l,f,d,g)),!0}return!1}function IS(o){var l=Vo(o.target);if(l!==null){var f=s(l);if(f!==null){if(l=f.tag,l===13){if(l=a(f),l!==null){o.blockedOn=l,qt(o.priority,function(){if(f.tag===13){var d=qn();d=gt(d);var g=ia(f,d);g!==null&&Bn(g,f,d),$g(f,d)}});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){o.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}o.blockedOn=null}function rh(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var f=_g(o.nativeEvent);if(f===null){f=o.nativeEvent;var d=new f.constructor(f.type,f);Zp=d,f.target.dispatchEvent(d),Zp=null}else return l=Yo(f),l!==null&&YS(l),o.blockedOn=f,!1;l.shift()}return!0}function WS(o,l,f){rh(o)&&f.delete(l)}function q3(){jg=!1,ws!==null&&rh(ws)&&(ws=null),ks!==null&&rh(ks)&&(ks=null),Qs!==null&&rh(Qs)&&(Qs=null),vc.forEach(WS),bc.forEach(WS)}function sh(o,l){o.blockedOn===l&&(o.blockedOn=null,jg||(jg=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,q3)))}var oh=null;function HS(o){oh!==o&&(oh=o,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){oh===o&&(oh=null);for(var l=0;l<o.length;l+=3){var f=o[l],d=o[l+1],g=o[l+2];if(typeof d!="function"){if(Dg(d||f)===null)continue;break}var y=Yo(f);y!==null&&(o.splice(l,3),l-=3,Dm(y,{pending:!0,data:g,method:f.method,action:d},d,g))}}))}function Sc(o){function l(N){return sh(N,o)}ws!==null&&sh(ws,o),ks!==null&&sh(ks,o),Qs!==null&&sh(Qs,o),vc.forEach(l),bc.forEach(l);for(var f=0;f<Cs.length;f++){var d=Cs[f];d.blockedOn===o&&(d.blockedOn=null)}for(;0<Cs.length&&(f=Cs[0],f.blockedOn===null);)IS(f),f.blockedOn===null&&Cs.shift();if(f=(o.ownerDocument||o).$$reactFormReplay,f!=null)for(d=0;d<f.length;d+=3){var g=f[d],y=f[d+1],Q=g[lt]||null;if(typeof y=="function")Q||HS(f);else if(Q){var P=null;if(y&&y.hasAttribute("formAction")){if(g=y,Q=y[lt]||null)P=Q.formAction;else if(Dg(g)!==null)continue}else P=Q.action;typeof P=="function"?f[d+1]=P:(f.splice(d,3),d-=3),HS(f)}}}function Ng(o){this._internalRoot=o}ah.prototype.render=Ng.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(i(409));var f=l.current,d=qn();BS(f,d,o,l,null,null)},ah.prototype.unmount=Ng.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;BS(o.current,2,null,o,null,null),qf(),l[Gt]=null}};function ah(o){this._internalRoot=o}ah.prototype.unstable_scheduleHydration=function(o){if(o){var l=Ws();o={blockedOn:null,target:o,priority:l};for(var f=0;f<Cs.length&&l!==0&&l<Cs[f].priority;f++);Cs.splice(f,0,o),f===0&&IS(o)}};var FS=e.version;if(FS!=="19.1.0")throw Error(i(527,FS,"19.1.0"));U.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(i(188)):(o=Object.keys(o).join(","),Error(i(268,o)));return o=u(l),o=o!==null?h(o):null,o=o===null?null:o.stateNode,o};var B3={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lh.isDisabled&&lh.supportsFiber)try{ei=lh.inject(B3),Ut=lh}catch{}}return kc.createRoot=function(o,l){if(!r(o))throw Error(i(299));var f=!1,d="",g=dx,y=px,Q=mx,P=null;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(d=l.identifierPrefix),l.onUncaughtError!==void 0&&(g=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(Q=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(P=l.unstable_transitionCallbacks)),l=zS(o,1,!1,null,null,f,d,g,y,Q,P,null),o[Gt]=l.current,vg(o),new Ng(l)},kc.hydrateRoot=function(o,l,f){if(!r(o))throw Error(i(299));var d=!1,g="",y=dx,Q=px,P=mx,N=null,V=null;return f!=null&&(f.unstable_strictMode===!0&&(d=!0),f.identifierPrefix!==void 0&&(g=f.identifierPrefix),f.onUncaughtError!==void 0&&(y=f.onUncaughtError),f.onCaughtError!==void 0&&(Q=f.onCaughtError),f.onRecoverableError!==void 0&&(P=f.onRecoverableError),f.unstable_transitionCallbacks!==void 0&&(N=f.unstable_transitionCallbacks),f.formState!==void 0&&(V=f.formState)),l=zS(o,1,!0,l,f??null,d,g,y,Q,P,N,V),l.context=qS(null),f=l.current,d=qn(),d=gt(d),g=cs(d),g.callback=null,us(f,g,d),f=d,l.current.lanes=f,Ci(l,f),Gi(l),o[Gt]=l.current,vg(o),new ah(l)},kc.version="19.1.0",kc}var aw;function J3(){if(aw)return Xg.exports;aw=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(),Xg.exports=K3(),Xg.exports}var e_=J3();const t_=yy(e_);var C=vy();const ee=yy(C),JQ=Y3({__proto__:null,default:ee},[C]),lw=n=>{let e;const t=new Set,i=(h,p)=>{const m=typeof h=="function"?h(e):h;if(!Object.is(m,e)){const O=e;e=p??(typeof m!="object"||m===null)?m:Object.assign({},e,m),t.forEach(v=>v(e,O))}},r=()=>e,c={setState:i,getState:r,getInitialState:()=>u,subscribe:h=>(t.add(h),()=>t.delete(h))},u=e=n(i,r,c);return c},eC=n=>n?lw(n):lw,n_=n=>n;function Ji(n,e=n_){const t=ee.useSyncExternalStore(n.subscribe,()=>e(n.getState()),()=>e(n.getInitialState()));return ee.useDebugValue(t),t}const cw=n=>{const e=eC(n),t=i=>Ji(e,i);return Object.assign(t,e),t},Tu=n=>n?cw(n):cw;function i_(n,e){let t;try{t=n()}catch{return}return{getItem:r=>{var s;const a=u=>u===null?null:JSON.parse(u,void 0),c=(s=t.getItem(r))!=null?s:null;return c instanceof Promise?c.then(a):a(c)},setItem:(r,s)=>t.setItem(r,JSON.stringify(s,void 0)),removeItem:r=>t.removeItem(r)}}const UO=n=>e=>{try{const t=n(e);return t instanceof Promise?t:{then(i){return UO(i)(t)},catch(i){return this}}}catch(t){return{then(i){return this},catch(i){return UO(i)(t)}}}},r_=(n,e)=>(t,i,r)=>{let s={storage:i_(()=>localStorage),partialize:x=>x,version:0,merge:(x,w)=>({...w,...x}),...e},a=!1;const c=new Set,u=new Set;let h=s.storage;if(!h)return n((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),t(...x)},i,r);const p=()=>{const x=s.partialize({...i()});return h.setItem(s.name,{state:x,version:s.version})},m=r.setState;r.setState=(x,w)=>{m(x,w),p()};const O=n((...x)=>{t(...x),p()},i,r);r.getInitialState=()=>O;let v;const b=()=>{var x,w;if(!h)return;a=!1,c.forEach(T=>{var A;return T((A=i())!=null?A:O)});const k=((w=s.onRehydrateStorage)==null?void 0:w.call(s,(x=i())!=null?x:O))||void 0;return UO(h.getItem.bind(h))(s.name).then(T=>{if(T)if(typeof T.version=="number"&&T.version!==s.version){if(s.migrate){const A=s.migrate(T.state,T.version);return A instanceof Promise?A.then($=>[!0,$]):[!0,A]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,T.state];return[!1,void 0]}).then(T=>{var A;const[$,R]=T;if(v=s.merge(R,(A=i())!=null?A:O),t(v,!0),$)return p()}).then(()=>{k?.(v,void 0),v=i(),a=!0,u.forEach(T=>T(v))}).catch(T=>{k?.(void 0,T)})};return r.persist={setOptions:x=>{s={...s,...x},x.storage&&(h=x.storage)},clearStorage:()=>{h?.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>b(),hasHydrated:()=>a,onHydrate:x=>(c.add(x),()=>{c.delete(x)}),onFinishHydration:x=>(u.add(x),()=>{u.delete(x)})},s.skipHydration||b(),v||O},s_=r_;var Pu=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(){}},ko=typeof window>"u"||"Deno"in globalThis;function hi(){}function o_(n,e){return typeof n=="function"?n(e):n}function GO(n){return typeof n=="number"&&n>=0&&n!==1/0}function tC(n,e){return Math.max(n+(e||0)-Date.now(),0)}function qa(n,e){return typeof n=="function"?n(e):n}function Mi(n,e){return typeof n=="function"?n(e):n}function uw(n,e){const{type:t="all",exact:i,fetchStatus:r,predicate:s,queryKey:a,stale:c}=n;if(a){if(i){if(e.queryHash!==by(a,e.options))return!1}else if(!tu(e.queryKey,a))return!1}if(t!=="all"){const u=e.isActive();if(t==="active"&&!u||t==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||r&&r!==e.state.fetchStatus||s&&!s(e))}function fw(n,e){const{exact:t,status:i,predicate:r,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(eu(e.options.mutationKey)!==eu(s))return!1}else if(!tu(e.options.mutationKey,s))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function by(n,e){return(e?.queryKeyHashFn||eu)(n)}function eu(n){return JSON.stringify(n,(e,t)=>WO(t)?Object.keys(t).sort().reduce((i,r)=>(i[r]=t[r],i),{}):t)}function tu(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>tu(n[t],e[t])):!1}function nC(n,e){if(n===e)return n;const t=hw(n)&&hw(e);if(t||WO(n)&&WO(e)){const i=t?n:Object.keys(n),r=i.length,s=t?e:Object.keys(e),a=s.length,c=t?[]:{};let u=0;for(let h=0;h<a;h++){const p=t?h:s[h];(!t&&i.includes(p)||t)&&n[p]===void 0&&e[p]===void 0?(c[p]=void 0,u++):(c[p]=nC(n[p],e[p]),c[p]===n[p]&&n[p]!==void 0&&u++)}return r===a&&u===r?n:c}return e}function IO(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 hw(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function WO(n){if(!dw(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!dw(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function dw(n){return Object.prototype.toString.call(n)==="[object Object]"}function a_(n){return new Promise(e=>{setTimeout(e,n)})}function HO(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?nC(n,e):e}function l_(n,e,t=0){const i=[...n,e];return t&&i.length>t?i.slice(1):i}function c_(n,e,t=0){const i=[e,...n];return t&&i.length>t?i.slice(0,-1):i}var xy=Symbol();function iC(n,e){return!n.queryFn&&e?.initialPromise?()=>e.initialPromise:!n.queryFn||n.queryFn===xy?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}var u_=class extends Pu{#t;#e;#n;constructor(){super(),this.#n=n=>{if(!ko&&window.addEventListener){const e=()=>n();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(n){this.#n=n,this.#e?.(),this.#e=n(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(n){this.#t!==n&&(this.#t=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(e=>{e(n)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Sy=new u_,f_=class extends Pu{#t=!0;#e;#n;constructor(){super(),this.#n=n=>{if(!ko&&window.addEventListener){const e=()=>n(!0),t=()=>n(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(n){this.#n=n,this.#e?.(),this.#e=n(this.setOnline.bind(this))}setOnline(n){this.#t!==n&&(this.#t=n,this.listeners.forEach(t=>{t(n)}))}isOnline(){return this.#t}},Od=new f_;function FO(){let n,e;const t=new Promise((r,s)=>{n=r,e=s});t.status="pending",t.catch(()=>{});function i(r){Object.assign(t,r),delete t.resolve,delete t.reject}return t.resolve=r=>{i({status:"fulfilled",value:r}),n(r)},t.reject=r=>{i({status:"rejected",reason:r}),e(r)},t}function h_(n){return Math.min(1e3*2**n,3e4)}function rC(n){return(n??"online")==="online"?Od.isOnline():!0}var sC=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function Vg(n){return n instanceof sC}function oC(n){let e=!1,t=0,i=!1,r;const s=FO(),a=x=>{i||(O(new sC(x)),n.abort?.())},c=()=>{e=!0},u=()=>{e=!1},h=()=>Sy.isFocused()&&(n.networkMode==="always"||Od.isOnline())&&n.canRun(),p=()=>rC(n.networkMode)&&n.canRun(),m=x=>{i||(i=!0,n.onSuccess?.(x),r?.(),s.resolve(x))},O=x=>{i||(i=!0,n.onError?.(x),r?.(),s.reject(x))},v=()=>new Promise(x=>{r=w=>{(i||h())&&x(w)},n.onPause?.()}).then(()=>{r=void 0,i||n.onContinue?.()}),b=()=>{if(i)return;let x;const w=t===0?n.initialPromise:void 0;try{x=w??n.fn()}catch(k){x=Promise.reject(k)}Promise.resolve(x).then(m).catch(k=>{if(i)return;const T=n.retry??(ko?0:3),A=n.retryDelay??h_,$=typeof A=="function"?A(t,k):A,R=T===!0||typeof T=="number"&&t<T||typeof T=="function"&&T(t,k);if(e||!R){O(k);return}t++,n.onFail?.(t,k),a_($).then(()=>h()?void 0:v()).then(()=>{e?O(k):b()})})};return{promise:s,cancel:a,continue:()=>(r?.(),s),cancelRetry:c,continueRetry:u,canStart:p,start:()=>(p()?b():v().then(b),s)}}var d_=n=>setTimeout(n,0);function p_(){let n=[],e=0,t=c=>{c()},i=c=>{c()},r=d_;const s=c=>{e?n.push(c):r(()=>{t(c)})},a=()=>{const c=n;n=[],c.length&&r(()=>{i(()=>{c.forEach(u=>{t(u)})})})};return{batch:c=>{let u;e++;try{u=c()}finally{e--,e||a()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{t=c},setBatchNotifyFunction:c=>{i=c},setScheduler:c=>{r=c}}}var rn=p_(),aC=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GO(this.gcTime)&&(this.#t=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ko?1/0:300*1e3))}clearGcTimeout(){this.#t&&(clearTimeout(this.#t),this.#t=void 0)}},m_=class extends aC{#t;#e;#n;#i;#r;#a;#o;constructor(n){super(),this.#o=!1,this.#a=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#i=n.client,this.#n=this.#i.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#t=g_(this.options),this.state=n.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(n){this.options={...this.#a,...n},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,e){const t=HO(this.state.data,n,this.options);return this.#s({data:t,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),t}setState(n,e){this.#s({type:"setState",state:n,setStateOptions:e})}cancel(n){const e=this.#r?.promise;return this.#r?.cancel(n),e?e.then(hi).catch(hi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(n=>Mi(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xy||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(n=0){return this.state.isInvalidated||this.state.data===void 0||!tC(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(e=>e!==n),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}fetch(n,e){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(n&&this.setOptions(n),!this.options.queryFn){const c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const t=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#o=!0,t.signal)})},r=()=>{const c=iC(this.options,e),u={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(u),this.#o=!1,this.options.persister?this.options.persister(c,u,this):c(u)},s={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};i(s),this.options.behavior?.onFetch(s,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&this.#s({type:"fetch",meta:s.fetchOptions?.meta});const a=c=>{Vg(c)&&c.silent||this.#s({type:"error",error:c}),Vg(c)||(this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this)),this.scheduleGc()};return this.#r=oC({initialPromise:e?.initialPromise,fn:s.fetchFn,abort:t.abort.bind(t),onSuccess:c=>{if(c===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(u){a(u);return}this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),this.scheduleGc()},onError:a,onFail:(c,u)=>{this.#s({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}),this.#r.start()}#s(n){const e=t=>{switch(n.type){case"failed":return{...t,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...lC(t.data,this.options),fetchMeta:n.meta??null};case"success":return{...t,data:n.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:n.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=n.error;return Vg(i)&&i.revert&&this.#e?{...this.#e,fetchStatus:"idle"}:{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...n.state}}};this.state=e(this.state),rn.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function lC(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:rC(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function g_(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,i=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var O_=class extends Pu{constructor(n={}){super(),this.config=n,this.#t=new Map}#t;build(n,e,t){const i=e.queryKey,r=e.queryHash??by(i,e);let s=this.get(r);return s||(s=new m_({client:n,queryKey:i,queryHash:r,options:n.defaultQueryOptions(e),state:t,defaultOptions:n.getQueryDefaults(i)}),this.add(s)),s}add(n){this.#t.has(n.queryHash)||(this.#t.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const e=this.#t.get(n.queryHash);e&&(n.destroy(),e===n&&this.#t.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){rn.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#t.get(n)}getAll(){return[...this.#t.values()]}find(n){const e={exact:!0,...n};return this.getAll().find(t=>uw(e,t))}findAll(n={}){const e=this.getAll();return Object.keys(n).length>0?e.filter(t=>uw(n,t)):e}notify(n){rn.batch(()=>{this.listeners.forEach(e=>{e(n)})})}onFocus(){rn.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){rn.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},y_=class extends aC{#t;#e;#n;constructor(n){super(),this.mutationId=n.mutationId,this.#e=n.mutationCache,this.#t=[],this.state=n.state||v_(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(e=>e!==n),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#e.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(n){const e=()=>{this.#i({type:"continue"})};this.#n=oC({fn:()=>this.options.mutationFn?this.options.mutationFn(n):Promise.reject(new Error("No mutationFn found")),onFail:(r,s)=>{this.#i({type:"failed",failureCount:r,error:s})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});const t=this.state.status==="pending",i=!this.#n.canStart();try{if(t)e();else{this.#i({type:"pending",variables:n,isPaused:i}),await this.#e.config.onMutate?.(n,this);const s=await this.options.onMutate?.(n);s!==this.state.context&&this.#i({type:"pending",context:s,variables:n,isPaused:i})}const r=await this.#n.start();return await this.#e.config.onSuccess?.(r,n,this.state.context,this),await this.options.onSuccess?.(r,n,this.state.context),await this.#e.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,n,this.state.context),this.#i({type:"success",data:r}),r}catch(r){try{throw await this.#e.config.onError?.(r,n,this.state.context,this),await this.options.onError?.(r,n,this.state.context),await this.#e.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,n,this.state.context),r}finally{this.#i({type:"error",error:r})}}finally{this.#e.runNext(this)}}#i(n){const e=t=>{switch(n.type){case"failed":return{...t,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...t,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:n.error,failureCount:t.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=e(this.state),rn.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(n)}),this.#e.notify({mutation:this,type:"updated",action:n})})}};function v_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var b_=class extends Pu{constructor(n={}){super(),this.config=n,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(n,e,t){const i=new y_({mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(e),state:t});return this.add(i),i}add(n){this.#t.add(n);const e=ch(n);if(typeof e=="string"){const t=this.#e.get(e);t?t.push(n):this.#e.set(e,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#t.delete(n)){const e=ch(n);if(typeof e=="string"){const t=this.#e.get(e);if(t)if(t.length>1){const i=t.indexOf(n);i!==-1&&t.splice(i,1)}else t[0]===n&&this.#e.delete(e)}}this.notify({type:"removed",mutation:n})}canRun(n){const e=ch(n);if(typeof e=="string"){const i=this.#e.get(e)?.find(r=>r.state.status==="pending");return!i||i===n}else return!0}runNext(n){const e=ch(n);return typeof e=="string"?this.#e.get(e)?.find(i=>i!==n&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){rn.batch(()=>{this.#t.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(n){const e={exact:!0,...n};return this.getAll().find(t=>fw(e,t))}findAll(n={}){return this.getAll().filter(e=>fw(n,e))}notify(n){rn.batch(()=>{this.listeners.forEach(e=>{e(n)})})}resumePausedMutations(){const n=this.getAll().filter(e=>e.state.isPaused);return rn.batch(()=>Promise.all(n.map(e=>e.continue().catch(hi))))}};function ch(n){return n.options.scope?.id}function pw(n){return{onFetch:(e,t)=>{const i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,s=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const h=async()=>{let p=!1;const m=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?p=!0:e.signal.addEventListener("abort",()=>{p=!0}),e.signal)})},O=iC(e.options,e.fetchOptions),v=async(b,x,w)=>{if(p)return Promise.reject();if(x==null&&b.pages.length)return Promise.resolve(b);const k={client:e.client,queryKey:e.queryKey,pageParam:x,direction:w?"backward":"forward",meta:e.options.meta};m(k);const T=await O(k),{maxPages:A}=e.options,$=w?c_:l_;return{pages:$(b.pages,T,A),pageParams:$(b.pageParams,x,A)}};if(r&&s.length){const b=r==="backward",x=b?x_:mw,w={pages:s,pageParams:a},k=x(i,w);c=await v(w,k,b)}else{const b=n??s.length;do{const x=u===0?a[0]??i.initialPageParam:mw(i,c);if(u>0&&x==null)break;c=await v(c,x),u++}while(u<b)}return c};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t):e.fetchFn=h}}}function mw(n,{pages:e,pageParams:t}){const i=e.length-1;return e.length>0?n.getNextPageParam(e[i],e,t[i],t):void 0}function x_(n,{pages:e,pageParams:t}){return e.length>0?n.getPreviousPageParam?.(e[0],e,t[0],t):void 0}var S_=class{#t;#e;#n;#i;#r;#a;#o;#s;constructor(n={}){this.#t=n.queryCache||new O_,this.#e=n.mutationCache||new b_,this.#n=n.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Sy.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#s=Od.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(n){return this.#t.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#e.findAll({...n,status:"pending"}).length}getQueryData(n){const e=this.defaultQueryOptions({queryKey:n});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=this.#t.build(this,e),i=t.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(qa(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(n){return this.#t.findAll(n).map(({queryKey:e,state:t})=>{const i=t.data;return[e,i]})}setQueryData(n,e,t){const i=this.defaultQueryOptions({queryKey:n}),s=this.#t.get(i.queryHash)?.state.data,a=o_(e,s);if(a!==void 0)return this.#t.build(this,i).setData(a,{...t,manual:!0})}setQueriesData(n,e,t){return rn.batch(()=>this.#t.findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,e,t)]))}getQueryState(n){const e=this.defaultQueryOptions({queryKey:n});return this.#t.get(e.queryHash)?.state}removeQueries(n){const e=this.#t;rn.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=this.#t;return rn.batch(()=>(t.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},i=rn.batch(()=>this.#t.findAll(n).map(r=>r.cancel(t)));return Promise.all(i).then(hi).catch(hi)}invalidateQueries(n,e={}){return rn.batch(()=>(this.#t.findAll(n).forEach(t=>{t.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},i=rn.batch(()=>this.#t.findAll(n).filter(r=>!r.isDisabled()).map(r=>{let s=r.fetch(void 0,t);return t.throwOnError||(s=s.catch(hi)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(hi)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=this.#t.build(this,e);return t.isStaleByTime(qa(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(hi).catch(hi)}fetchInfiniteQuery(n){return n.behavior=pw(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(hi).catch(hi)}ensureInfiniteQueryData(n){return n.behavior=pw(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Od.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,e){this.#i.set(eu(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...this.#i.values()],t={};return e.forEach(i=>{tu(n,i.queryKey)&&Object.assign(t,i.defaultOptions)}),t}setMutationDefaults(n,e){this.#r.set(eu(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...this.#r.values()],t={};return e.forEach(i=>{tu(n,i.mutationKey)&&Object.assign(t,i.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=by(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===xy&&(e.enabled=!1),e}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},w_=class extends Pu{constructor(n,e){super(),this.options=e,this.#t=n,this.#s=null,this.#o=FO(),this.options.experimental_prefetchInRender||this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#n=void 0;#i=void 0;#r;#a;#o;#s;#m;#h;#d;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),gw(this.#e,this.options)?this.#f():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return KO(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return KO(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#e.removeObserver(this)}setOptions(n){const e=this.options,t=this.#e;if(this.options=this.#t.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mi(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#e.setOptions(this.options),e._defaulted&&!IO(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const i=this.hasListeners();i&&Ow(this.#e,t,this.options,e)&&this.#f(),this.updateResult(),i&&(this.#e!==t||Mi(this.options.enabled,this.#e)!==Mi(e.enabled,this.#e)||qa(this.options.staleTime,this.#e)!==qa(e.staleTime,this.#e))&&this.#g();const r=this.#O();i&&(this.#e!==t||Mi(this.options.enabled,this.#e)!==Mi(e.enabled,this.#e)||r!==this.#l)&&this.#y(r)}getOptimisticResult(n){const e=this.#t.getQueryCache().build(this.#t,n),t=this.createResult(e,n);return Q_(this,t)&&(this.#i=t,this.#a=this.options,this.#r=this.#e.state),t}getCurrentResult(){return this.#i}trackResult(n,e){return new Proxy(n,{get:(t,i)=>(this.trackProp(i),e?.(i),Reflect.get(t,i))})}trackProp(n){this.#p.add(n)}getCurrentQuery(){return this.#e}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const e=this.#t.defaultQueryOptions(n),t=this.#t.getQueryCache().build(this.#t,e);return t.fetch().then(()=>this.createResult(t,e))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(n){this.#S();let e=this.#e.fetch(this.options,n);return n?.throwOnError||(e=e.catch(hi)),e}#g(){this.#b();const n=qa(this.options.staleTime,this.#e);if(ko||this.#i.isStale||!GO(n))return;const t=tC(this.#i.dataUpdatedAt,n)+1;this.#c=setTimeout(()=>{this.#i.isStale||this.updateResult()},t)}#O(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#y(n){this.#x(),this.#l=n,!(ko||Mi(this.options.enabled,this.#e)===!1||!GO(this.#l)||this.#l===0)&&(this.#u=setInterval(()=>{(this.options.refetchIntervalInBackground||Sy.isFocused())&&this.#f()},this.#l))}#v(){this.#g(),this.#y(this.#O())}#b(){this.#c&&(clearTimeout(this.#c),this.#c=void 0)}#x(){this.#u&&(clearInterval(this.#u),this.#u=void 0)}createResult(n,e){const t=this.#e,i=this.options,r=this.#i,s=this.#r,a=this.#a,u=n!==t?n.state:this.#n,{state:h}=n;let p={...h},m=!1,O;if(e._optimisticResults){const j=this.hasListeners(),Y=!j&&gw(n,e),J=j&&Ow(n,t,e,i);(Y||J)&&(p={...p,...lC(h.data,n.options)}),e._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:x}=p;O=p.data;let w=!1;if(e.placeholderData!==void 0&&O===void 0&&x==="pending"){let j;r?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(j=r.data,w=!0):j=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,j!==void 0&&(x="success",O=HO(r?.data,j,e),m=!0)}if(e.select&&O!==void 0&&!w)if(r&&O===s?.data&&e.select===this.#m)O=this.#h;else try{this.#m=e.select,O=e.select(O),O=HO(r?.data,O,e),this.#h=O,this.#s=null}catch(j){this.#s=j}this.#s&&(v=this.#s,O=this.#h,b=Date.now(),x="error");const k=p.fetchStatus==="fetching",T=x==="pending",A=x==="error",$=T&&k,R=O!==void 0,D={status:x,fetchStatus:p.fetchStatus,isPending:T,isSuccess:x==="success",isError:A,isInitialLoading:$,isLoading:$,data:O,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>u.dataUpdateCount||p.errorUpdateCount>u.errorUpdateCount,isFetching:k,isRefetching:k&&!T,isLoadingError:A&&!R,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&R,isStale:wy(n,e),refetch:this.refetch,promise:this.#o};if(this.options.experimental_prefetchInRender){const j=I=>{D.status==="error"?I.reject(D.error):D.data!==void 0&&I.resolve(D.data)},Y=()=>{const I=this.#o=D.promise=FO();j(I)},J=this.#o;switch(J.status){case"pending":n.queryHash===t.queryHash&&j(J);break;case"fulfilled":(D.status==="error"||D.data!==J.value)&&Y();break;case"rejected":(D.status!=="error"||D.error!==J.reason)&&Y();break}}return D}updateResult(){const n=this.#i,e=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#a=this.options,this.#r.data!==void 0&&(this.#d=this.#e),IO(e,n))return;this.#i=e;const t=()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,r=typeof i=="function"?i():i;if(r==="all"||!r&&!this.#p.size)return!0;const s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(a=>{const c=a;return this.#i[c]!==n[c]&&s.has(c)})};this.#w({listeners:t()})}#S(){const n=this.#t.getQueryCache().build(this.#t,this.options);if(n===this.#e)return;const e=this.#e;this.#e=n,this.#n=n.state,this.hasListeners()&&(e?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#w(n){rn.batch(()=>{n.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function k_(n,e){return Mi(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function gw(n,e){return k_(n,e)||n.state.data!==void 0&&KO(n,e,e.refetchOnMount)}function KO(n,e,t){if(Mi(e.enabled,n)!==!1){const i=typeof t=="function"?t(n):t;return i==="always"||i!==!1&&wy(n,e)}return!1}function Ow(n,e,t,i){return(n!==e||Mi(i.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&wy(n,t)}function wy(n,e){return Mi(e.enabled,n)!==!1&&n.isStaleByTime(qa(e.staleTime,n))}function Q_(n,e){return!IO(n.getCurrentResult(),e)}var cC=C.createContext(void 0),C_=n=>{const e=C.useContext(cC);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},T_=({client:n,children:e})=>(C.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),S.jsx(cC.Provider,{value:n,children:e})),uC=C.createContext(!1),P_=()=>C.useContext(uC);uC.Provider;function A_(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var M_=C.createContext(A_()),R_=()=>C.useContext(M_);function $_(n,e){return typeof n=="function"?n(...e):!!n}function yw(){}var E_=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},__=n=>{C.useEffect(()=>{n.clearReset()},[n])},D_=({result:n,errorResetBoundary:e,throwOnError:t,query:i,suspense:r})=>n.isError&&!e.isReset()&&!n.isFetching&&i&&(r&&n.data===void 0||$_(t,[n.error,i])),j_=n=>{const e=n.staleTime;n.suspense&&(n.staleTime=typeof e=="function"?(...t)=>Math.max(e(...t),1e3):Math.max(e??1e3,1e3),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3)))},N_=(n,e)=>n.isLoading&&n.isFetching&&!e,Z_=(n,e)=>n?.suspense&&e.isPending,vw=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function X_(n,e,t){const i=C_(),r=P_(),s=R_(),a=i.defaultQueryOptions(n);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=r?"isRestoring":"optimistic",j_(a),E_(a,s),__(s);const c=!i.getQueryCache().get(a.queryHash),[u]=C.useState(()=>new e(i,a)),h=u.getOptimisticResult(a),p=!r&&n.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(m=>{const O=p?u.subscribe(rn.batchCalls(m)):yw;return u.updateResult(),O},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),C.useEffect(()=>{u.setOptions(a)},[a,u]),Z_(a,h))throw vw(a,u,s);if(D_({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:i.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw h.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!ko&&N_(h,r)&&(c?vw(a,u,s):i.getQueryCache().get(a.queryHash)?.promise)?.catch(yw).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?h:u.trackResult(h)}function fC(n,e){return X_(n,w_)}const Vs="";async function L_(n,e,t){return await fetch(`${Vs}/api/create-app`,{method:"POST",body:JSON.stringify({options:{...n,chosenAddOns:e,starter:t?.url||void 0}}),headers:{"Content-Type":"application/json"}})}async function z_(n){return await fetch(`${Vs}/api/add-to-app`,{method:"POST",body:JSON.stringify({addOns:n}),headers:{"Content-Type":"application/json"}})}function hC(){return fetch(`${Vs}/api/shutdown`,{method:"POST"})}async function q_(n){return await(await fetch(`${Vs}/api/load-remote-add-on?url=${n}`)).json()}async function dC(n){return await(await fetch(`${Vs}/api/load-starter?url=${n}`)).json()}const B_=fetch(`${Vs}/api/initial-payload`);async function V_(){return await(await B_).json()}async function Y_(n,e,t){return(await fetch(`${Vs}/api/dry-run-create-app`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({options:{...n,chosenAddOns:e,starter:t?.url}})})).json()}async function U_(n){return(await fetch(`${Vs}/api/dry-run-add-to-app`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({addOns:n})})).json()}function G_(n,e,t){const i=new Map,r=u=>n.find(h=>h.id===u).type,s=u=>r(u)==="deployment",a=u=>e.some(h=>r(h)===r(u));for(const u of n)i.set(u.id,{selected:!1,enabled:!0,dependedUpon:!1,isSingleSelect:u.type==="deployment"?u.type:void 0});function c(u){const h=new Set;function p(m){if(h.has(m))return;h.add(m);const O=n.find(v=>v.id===m);if(O){for(const b of O.dependsOn||[]){const x=i.get(b);x&&(x.selected=!0,x.enabled=!!s(b),x.dependedUpon=!0,p(b))}const v=i.get(m);v&&(v.selected=!0,v.dependedUpon||(v.enabled=!0))}}p(u)}for(const u of t){const h=i.get(u);h&&(s(u)?a(u)?(h.selected=!1,h.enabled=!0,h.dependedUpon=!1):(h.selected=!0,h.enabled=!0,h.dependedUpon=!0):(h.selected=!0,h.enabled=!1,h.dependedUpon=!0,c(u)))}for(const u of e)c(u);return Object.fromEntries(Array.from(i.entries()).map(([u,h])=>[u,{enabled:h.enabled,selected:h.selected,isSingleSelect:h.isSingleSelect}]))}const dn=Tu(()=>({initialized:!1,framework:"",mode:"",projectName:"",targetDir:"",typescript:!0,tailwind:!0,git:!0,chosenAddOns:[],addOnOptions:{},packageManager:"pnpm"})),Ni=()=>fC({queryKey:["initial-data"],queryFn:V_}),gr=()=>{const{data:n}=Ni();return n!==void 0},pC=()=>Ni().data?.forcedRouterMode,I_=()=>Ni().data?.forcedAddOns,ky=()=>Ni().data?.registry,W_=()=>Ni().data?.localFiles,H_=()=>Ni().data?.output,mC=()=>Ni().data?.options,F_=()=>mC()?.chosenAddOns,Or=()=>Ni().data?.applicationMode,K_=()=>Ni().data?.showDeploymentOptions,J_=()=>Ni().data?.addOns,eD=()=>Ni().data?.supportedModes,bw=Tu(()=>({includeFiles:["unchanged","added","modified","deleted","overwritten"]})),Za=Tu(()=>({userSelectedAddOns:[],customAddOns:[]})),ml=Tu(()=>({projectStarter:void 0}));function tD(n){Za.setState(e=>({customAddOns:[...e.customAddOns,n]})),n.modes.includes(dn.getState().mode)&&Za.setState(e=>({userSelectedAddOns:[...e.userSelectedAddOns,n.id]}))}function Au(){const n=gr(),e=Mu(),t=F_(),i=J_(),r=I_(),{userSelectedAddOns:s,customAddOns:a}=Za(),c=ml().projectStarter,u=C.useMemo(()=>n?[...i?.[e]||[],...a.filter(x=>x.modes.includes(e))]:[],[n,e,i,a]),h=C.useMemo(()=>{if(!n)return{};const b=new Set;for(const x of c?.dependsOn||[])b.add(x);for(const x of t)b.add(x);for(const x of r||[])b.add(x);return G_(u,s,Array.from(b))},[n,u,s,t,c?.dependsOn,r]),p=C.useMemo(()=>{if(!n)return[];const b=new Set(Object.keys(h).filter(x=>h[x].selected));for(const x of r||[])b.add(x);return Array.from(b)},[n,h,r]),m=C.useCallback(b=>{if(n)if(h[b].isSingleSelect){if(!h[b].selected){const x=h[b].isSingleSelect,w=Object.keys(h).find(k=>k!==b&&h[k].isSingleSelect===x&&h[k].selected);Za.setState(k=>{let T=k.userSelectedAddOns.filter(A=>A!==w);return T.includes(b)||(T=[...T,b]),{userSelectedAddOns:T}})}}else h[b].enabled&&(h[b].selected?Za.setState(x=>({userSelectedAddOns:x.userSelectedAddOns.filter(w=>w!==b)})):Za.setState(x=>({userSelectedAddOns:[...x.userSelectedAddOns,b]})))},[n,h,u]),O=C.useCallback((b,x,w)=>{n&&dn.setState(k=>({addOnOptions:{...k.addOnOptions,[b]:{...k.addOnOptions[b],[x]:w}}}))},[n]),v=C.useCallback(b=>dn.getState().addOnOptions[b]||{},[]);return{toggleAddOn:m,setAddOnOption:O,getAddOnOptions:v,chosenAddOns:p,availableAddOns:u,userSelectedAddOns:s,originalSelectedAddOns:t,addOnState:h}}const Qy=()=>ml(n=>n.projectStarter===void 0),nD=()=>{const n=gr(),e=pC(),t=Qy();return n?!e&&t:!1},iD=()=>{const n=gr(),e=Qy(),t=Mu();return n?e&&t==="code-router":!1},rD=()=>{const n=gr(),e=Qy(),t=Mu();return n?e&&t==="code-router":!1},sD=()=>dn(n=>n.projectName),Mu=()=>{const n=gr(),e=pC(),t=dn(i=>i.mode);return n?e||t:"file-router"};function gC(){const n=gr(),e=bw(i=>i.includeFiles),t=C.useCallback(i=>{n&&bw.setState(r=>({includeFiles:r.includeFiles.includes(i)?r.includeFiles.filter(s=>s!==i):[...r.includeFiles,i]}))},[n]);return{includedFiles:e,toggleFilter:t}}function oD(){const n=gr(),e=Or(),{initialized:t,...i}=dn(),{userSelectedAddOns:r,chosenAddOns:s}=Au(),a=ml().projectStarter,{data:c}=fC({queryKey:["dry-run",e,JSON.stringify(i),JSON.stringify(r),a?.url],queryFn:async()=>e==="none"||!n||!t?{files:{},commands:[],deletedFiles:[]}:e==="setup"?Y_(i,s,a):U_(r),enabled:n,initialData:{files:{},commands:[],deletedFiles:[]}});return c}const aD=Tu()(s_(n=>({open:!1,dontShowAgain:!1,setOpen:e=>n({open:e}),setDontShowAgain:e=>n({dontShowAgain:e})}),{name:"startup-dialog",partialize:n=>({dontShowAgain:n.dontShowAgain}),merge:(n,e)=>(n&&n.dontShowAgain?e.open=!1:e.open=!0,e)})),lD=n=>dn.setState({projectName:n}),cD=n=>dn.setState({mode:n});function uD(n){dn.setState({typescript:n})}function fD(n){dn.setState({tailwind:n})}function JO(n){ml.setState(()=>({projectStarter:n})),n&&dn.setState({mode:n.mode})}function hD(){const n=gr(),e=mC();C.useEffect(()=>{n&&dn.setState({...e,initialized:!0})},[n])}/**
50
50
  * @license lucide-react v0.476.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
@@ -195,7 +195,7 @@ Error generating stack: `+f.message+`
195
195
 
196
196
  If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
197
197
 
198
- For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return C.useEffect(()=>{n&&(document.getElementById(n)||console.error(t))},[t,n]),null},_N="DialogDescriptionWarning",DN=({contentRef:n,descriptionId:e})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OT(_N).contentName}}.`;return C.useEffect(()=>{const r=n.current?.getAttribute("aria-describedby");e&&r&&(document.getElementById(e)||console.warn(i))},[i,n,e]),null},jN=rT,NN=aT,ZN=lT,XN=cT,LN=fT,zN=dT,qN=mT;function jo({...n}){return S.jsx(jN,{"data-slot":"dialog",...n})}function BN({...n}){return S.jsx(NN,{"data-slot":"dialog-portal",...n})}function VN({className:n,...e}){return S.jsx(ZN,{"data-slot":"dialog-overlay",className:Ie("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),...e})}function No({className:n,children:e,hideCloseButton:t,...i}){return S.jsxs(BN,{"data-slot":"dialog-portal",children:[S.jsx(VN,{}),S.jsxs(XN,{"data-slot":"dialog-content",className:Ie("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg bg-opacity-70 backdrop-blur-md border-3 border-white/20",n),...i,children:[e,!t&&S.jsxs(qN,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[S.jsx(YD,{}),S.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function yl({className:n,...e}){return S.jsx("div",{"data-slot":"dialog-header",className:Ie("flex flex-col gap-2 text-center sm:text-left",n),...e})}function $u({className:n,...e}){return S.jsx("div",{"data-slot":"dialog-footer",className:Ie("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...e})}function vl({className:n,...e}){return S.jsx(LN,{"data-slot":"dialog-title",className:Ie("text-lg leading-none font-semibold",n),...e})}function YN({className:n,...e}){return S.jsx(zN,{"data-slot":"dialog-description",className:Ie("text-muted-foreground text-sm",n),...e})}function UN(){const[n,e]=C.useState(""),[t,i]=C.useState(!1),r=Mu(),{toggleAddOn:s}=Au();async function a(){const c=await q_(n);"error"in c?Py.error("Failed to load add-on",{description:c.error}):(tD(c),c.modes.includes(r)&&s(c.id),i(!1))}return S.jsxs("div",{children:[S.jsxs(Oi,{variant:"secondary",className:"w-full",onClick:()=>{e(""),i(!0)},children:[S.jsx(zD,{className:"w-4 h-4"}),"Import Custom Add-On"]}),S.jsx(jo,{modal:!0,open:t,onOpenChange:i,children:S.jsxs(No,{className:"sm:min-w-[425px] sm:max-w-fit",children:[S.jsx(yl,{children:S.jsx(vl,{children:"Import Custom Add-On"})}),S.jsx("div",{children:S.jsx(Ay,{value:n,onChange:c=>e(c.target.value),placeholder:"https://github.com/myorg/myproject/add-on.json",className:"min-w-lg w-full",onKeyDown:c=>{c.key==="Enter"&&a()}})}),S.jsx($u,{children:S.jsx(Oi,{onClick:a,children:"Import"})})]})})]})}function GN({addOn:n,onClose:e}){return S.jsx(jo,{modal:!0,open:!!n,onOpenChange:e,children:S.jsx(No,{className:"sm:min-w-[425px] sm:max-w-fit",children:S.jsxs("div",{className:"flex flex-row",children:[n?.smallLogo&&S.jsx("img",{src:`data:image/svg+xml,${encodeURIComponent(n.smallLogo)}`,alt:n.name,className:"w-15"}),S.jsxs("div",{className:"flex flex-col ml-4 gap-4",children:[S.jsx("p",{className:"text-lg font-bold",children:n?.name}),S.jsx("p",{className:"text-sm text-gray-500",children:n?.description}),S.jsxs("a",{href:n?.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-500 underline",children:["More information on ",n?.name]})]})]})})})}function Ny(n){const e=n+"CollectionProvider",[t,i]=Zi(e),[r,s]=t(e,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:w,children:k}=x,T=ee.useRef(null),A=ee.useRef(new Map).current;return S.jsx(r,{scope:w,itemMap:A,collectionRef:T,children:k})};a.displayName=e;const c=n+"CollectionSlot",u=el(c),h=ee.forwardRef((x,w)=>{const{scope:k,children:T}=x,A=s(c,k),$=Rt(w,A.collectionRef);return S.jsx(u,{ref:$,children:T})});h.displayName=c;const p=n+"CollectionItemSlot",m="data-radix-collection-item",O=el(p),v=ee.forwardRef((x,w)=>{const{scope:k,children:T,...A}=x,$=ee.useRef(null),R=Rt(w,$),_=s(p,k);return ee.useEffect(()=>(_.itemMap.set($,{ref:$,...A}),()=>void _.itemMap.delete($))),S.jsx(O,{[m]:"",ref:R,children:T})});v.displayName=p;function b(x){const w=s(n+"CollectionConsumer",x);return ee.useCallback(()=>{const T=w.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${m}]`));return Array.from(w.itemMap.values()).sort((_,D)=>A.indexOf(_.ref.current)-A.indexOf(D.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:h,ItemSlot:v},b,i]}var IN=C.createContext(void 0);function Eu(n){const e=C.useContext(IN);return n||e||"ltr"}const WN=["top","right","bottom","left"],Ns=Math.min,In=Math.max,vd=Math.round,yh=Math.floor,cr=n=>({x:n,y:n}),HN={left:"right",right:"left",bottom:"top",top:"bottom"},FN={start:"end",end:"start"};function o0(n,e,t){return In(n,Ns(e,t))}function Jr(n,e){return typeof n=="function"?n(e):n}function es(n){return n.split("-")[0]}function bl(n){return n.split("-")[1]}function Zy(n){return n==="x"?"y":"x"}function Xy(n){return n==="y"?"height":"width"}function Zs(n){return["top","bottom"].includes(es(n))?"y":"x"}function Ly(n){return Zy(Zs(n))}function KN(n,e,t){t===void 0&&(t=!1);const i=bl(n),r=Ly(n),s=Xy(r);let a=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=bd(a)),[a,bd(a)]}function JN(n){const e=bd(n);return[a0(n),e,a0(e)]}function a0(n){return n.replace(/start|end/g,e=>FN[e])}function e7(n,e,t){const i=["left","right"],r=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(n){case"top":case"bottom":return t?e?r:i:e?i:r;case"left":case"right":return e?s:a;default:return[]}}function t7(n,e,t,i){const r=bl(n);let s=e7(es(n),t==="start",i);return r&&(s=s.map(a=>a+"-"+r),e&&(s=s.concat(s.map(a0)))),s}function bd(n){return n.replace(/left|right|bottom|top/g,e=>HN[e])}function n7(n){return{top:0,right:0,bottom:0,left:0,...n}}function yT(n){return typeof n!="number"?n7(n):{top:n,right:n,bottom:n,left:n}}function xd(n){const{x:e,y:t,width:i,height:r}=n;return{width:i,height:r,top:t,left:e,right:e+i,bottom:t+r,x:e,y:t}}function qw(n,e,t){let{reference:i,floating:r}=n;const s=Zs(e),a=Ly(e),c=Xy(a),u=es(e),h=s==="y",p=i.x+i.width/2-r.width/2,m=i.y+i.height/2-r.height/2,O=i[c]/2-r[c]/2;let v;switch(u){case"top":v={x:p,y:i.y-r.height};break;case"bottom":v={x:p,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-r.width,y:m};break;default:v={x:i.x,y:i.y}}switch(bl(e)){case"start":v[a]-=O*(t&&h?-1:1);break;case"end":v[a]+=O*(t&&h?-1:1);break}return v}const i7=async(n,e,t)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=t,c=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let h=await a.getElementRects({reference:n,floating:e,strategy:r}),{x:p,y:m}=qw(h,i,u),O=i,v={},b=0;for(let x=0;x<c.length;x++){const{name:w,fn:k}=c[x],{x:T,y:A,data:$,reset:R}=await k({x:p,y:m,initialPlacement:i,placement:O,strategy:r,middlewareData:v,rects:h,platform:a,elements:{reference:n,floating:e}});p=T??p,m=A??m,v={...v,[w]:{...v[w],...$}},R&&b<=50&&(b++,typeof R=="object"&&(R.placement&&(O=R.placement),R.rects&&(h=R.rects===!0?await a.getElementRects({reference:n,floating:e,strategy:r}):R.rects),{x:p,y:m}=qw(h,O,u)),x=-1)}return{x:p,y:m,placement:O,strategy:r,middlewareData:v}};async function nu(n,e){var t;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:a,elements:c,strategy:u}=n,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:O=!1,padding:v=0}=Jr(e,n),b=yT(v),w=c[O?m==="floating"?"reference":"floating":m],k=xd(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(w)))==null||t?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:u})),T=m==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),$=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},R=xd(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:A,strategy:u}):T);return{top:(k.top-R.top+b.top)/$.y,bottom:(R.bottom-k.bottom+b.bottom)/$.y,left:(k.left-R.left+b.left)/$.x,right:(R.right-k.right+b.right)/$.x}}const r7=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:i,placement:r,rects:s,platform:a,elements:c,middlewareData:u}=e,{element:h,padding:p=0}=Jr(n,e)||{};if(h==null)return{};const m=yT(p),O={x:t,y:i},v=Ly(r),b=Xy(v),x=await a.getDimensions(h),w=v==="y",k=w?"top":"left",T=w?"bottom":"right",A=w?"clientHeight":"clientWidth",$=s.reference[b]+s.reference[v]-O[v]-s.floating[b],R=O[v]-s.reference[v],_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(h));let D=_?_[A]:0;(!D||!await(a.isElement==null?void 0:a.isElement(_)))&&(D=c.floating[A]||s.floating[b]);const j=$/2-R/2,Y=D/2-x[b]/2-1,J=Ns(m[k],Y),I=Ns(m[T],Y),W=J,ae=D-x[b]-I,le=D/2-x[b]/2+j,ce=o0(W,le,ae),Z=!u.arrow&&bl(r)!=null&&le!==ce&&s.reference[b]/2-(le<W?J:I)-x[b]/2<0,U=Z?le<W?le-W:le-ae:0;return{[v]:O[v]+U,data:{[v]:ce,centerOffset:le-ce-U,...Z&&{alignmentOffset:U}},reset:Z}}}),s7=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,i;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:u,elements:h}=e,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:O,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...w}=Jr(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const k=es(r),T=Zs(c),A=es(c)===c,$=await(u.isRTL==null?void 0:u.isRTL(h.floating)),R=O||(A||!x?[bd(c)]:JN(c)),_=b!=="none";!O&&_&&R.push(...t7(c,x,b,$));const D=[c,...R],j=await nu(e,w),Y=[];let J=((i=s.flip)==null?void 0:i.overflows)||[];if(p&&Y.push(j[k]),m){const le=KN(r,a,$);Y.push(j[le[0]],j[le[1]])}if(J=[...J,{placement:r,overflows:Y}],!Y.every(le=>le<=0)){var I,W;const le=(((I=s.flip)==null?void 0:I.index)||0)+1,ce=D[le];if(ce)return{data:{index:le,overflows:J},reset:{placement:ce}};let Z=(W=J.filter(U=>U.overflows[0]<=0).sort((U,z)=>U.overflows[1]-z.overflows[1])[0])==null?void 0:W.placement;if(!Z)switch(v){case"bestFit":{var ae;const U=(ae=J.filter(z=>{if(_){const K=Zs(z.placement);return K===T||K==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(K=>K>0).reduce((K,E)=>K+E,0)]).sort((z,K)=>z[1]-K[1])[0])==null?void 0:ae[0];U&&(Z=U);break}case"initialPlacement":Z=c;break}if(r!==Z)return{reset:{placement:Z}}}return{}}}};function Bw(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Vw(n){return WN.some(e=>n[e]>=0)}const o7=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:i="referenceHidden",...r}=Jr(n,e);switch(i){case"referenceHidden":{const s=await nu(e,{...r,elementContext:"reference"}),a=Bw(s,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Vw(a)}}}case"escaped":{const s=await nu(e,{...r,altBoundary:!0}),a=Bw(s,t.floating);return{data:{escapedOffsets:a,escaped:Vw(a)}}}default:return{}}}}};async function a7(n,e){const{placement:t,platform:i,elements:r}=n,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),a=es(t),c=bl(t),u=Zs(t)==="y",h=["left","top"].includes(a)?-1:1,p=s&&u?-1:1,m=Jr(e,n);let{mainAxis:O,crossAxis:v,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof b=="number"&&(v=c==="end"?b*-1:b),u?{x:v*p,y:O*h}:{x:O*h,y:v*p}}const l7=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,i;const{x:r,y:s,placement:a,middlewareData:c}=e,u=await a7(e,n);return a===((t=c.offset)==null?void 0:t.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:a}}}}},c7=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:k,y:T}=w;return{x:k,y:T}}},...u}=Jr(n,e),h={x:t,y:i},p=await nu(e,u),m=Zs(es(r)),O=Zy(m);let v=h[O],b=h[m];if(s){const w=O==="y"?"top":"left",k=O==="y"?"bottom":"right",T=v+p[w],A=v-p[k];v=o0(T,v,A)}if(a){const w=m==="y"?"top":"left",k=m==="y"?"bottom":"right",T=b+p[w],A=b-p[k];b=o0(T,b,A)}const x=c.fn({...e,[O]:v,[m]:b});return{...x,data:{x:x.x-t,y:x.y-i,enabled:{[O]:s,[m]:a}}}}}},u7=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:i,placement:r,rects:s,middlewareData:a}=e,{offset:c=0,mainAxis:u=!0,crossAxis:h=!0}=Jr(n,e),p={x:t,y:i},m=Zs(r),O=Zy(m);let v=p[O],b=p[m];const x=Jr(c,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const A=O==="y"?"height":"width",$=s.reference[O]-s.floating[A]+w.mainAxis,R=s.reference[O]+s.reference[A]-w.mainAxis;v<$?v=$:v>R&&(v=R)}if(h){var k,T;const A=O==="y"?"width":"height",$=["top","left"].includes(es(r)),R=s.reference[m]-s.floating[A]+($&&((k=a.offset)==null?void 0:k[m])||0)+($?0:w.crossAxis),_=s.reference[m]+s.reference[A]+($?0:((T=a.offset)==null?void 0:T[m])||0)-($?w.crossAxis:0);b<R?b=R:b>_&&(b=_)}return{[O]:v,[m]:b}}}},f7=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,i;const{placement:r,rects:s,platform:a,elements:c}=e,{apply:u=()=>{},...h}=Jr(n,e),p=await nu(e,h),m=es(r),O=bl(r),v=Zs(r)==="y",{width:b,height:x}=s.floating;let w,k;m==="top"||m==="bottom"?(w=m,k=O===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(k=m,w=O==="end"?"top":"bottom");const T=x-p.top-p.bottom,A=b-p.left-p.right,$=Ns(x-p[w],T),R=Ns(b-p[k],A),_=!e.middlewareData.shift;let D=$,j=R;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(j=A),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(D=T),_&&!O){const J=In(p.left,0),I=In(p.right,0),W=In(p.top,0),ae=In(p.bottom,0);v?j=b-2*(J!==0||I!==0?J+I:In(p.left,p.right)):D=x-2*(W!==0||ae!==0?W+ae:In(p.top,p.bottom))}await u({...e,availableWidth:j,availableHeight:D});const Y=await a.getDimensions(c.floating);return b!==Y.width||x!==Y.height?{reset:{rects:!0}}:{}}}};function cp(){return typeof window<"u"}function xl(n){return vT(n)?(n.nodeName||"").toLowerCase():"#document"}function Hn(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function vr(n){var e;return(e=(vT(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function vT(n){return cp()?n instanceof Node||n instanceof Hn(n).Node:!1}function Ei(n){return cp()?n instanceof Element||n instanceof Hn(n).Element:!1}function dr(n){return cp()?n instanceof HTMLElement||n instanceof Hn(n).HTMLElement:!1}function Yw(n){return!cp()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Hn(n).ShadowRoot}function _u(n){const{overflow:e,overflowX:t,overflowY:i,display:r}=_i(n);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!["inline","contents"].includes(r)}function h7(n){return["table","td","th"].includes(xl(n))}function up(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function zy(n){const e=qy(),t=Ei(n)?_i(n):n;return["transform","translate","scale","rotate","perspective"].some(i=>t[i]?t[i]!=="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(i=>(t.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(t.contain||"").includes(i))}function d7(n){let e=Xs(n);for(;dr(e)&&!tl(e);){if(zy(e))return e;if(up(e))return null;e=Xs(e)}return null}function qy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tl(n){return["html","body","#document"].includes(xl(n))}function _i(n){return Hn(n).getComputedStyle(n)}function fp(n){return Ei(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Xs(n){if(xl(n)==="html")return n;const e=n.assignedSlot||n.parentNode||Yw(n)&&n.host||vr(n);return Yw(e)?e.host:e}function bT(n){const e=Xs(n);return tl(e)?n.ownerDocument?n.ownerDocument.body:n.body:dr(e)&&_u(e)?e:bT(e)}function iu(n,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=bT(n),s=r===((i=n.ownerDocument)==null?void 0:i.body),a=Hn(r);if(s){const c=l0(a);return e.concat(a,a.visualViewport||[],_u(r)?r:[],c&&t?iu(c):[])}return e.concat(r,iu(r,[],t))}function l0(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function xT(n){const e=_i(n);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=dr(n),s=r?n.offsetWidth:t,a=r?n.offsetHeight:i,c=vd(t)!==s||vd(i)!==a;return c&&(t=s,i=a),{width:t,height:i,$:c}}function By(n){return Ei(n)?n:n.contextElement}function Va(n){const e=By(n);if(!dr(e))return cr(1);const t=e.getBoundingClientRect(),{width:i,height:r,$:s}=xT(e);let a=(s?vd(t.width):t.width)/i,c=(s?vd(t.height):t.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const p7=cr(0);function ST(n){const e=Hn(n);return!qy()||!e.visualViewport?p7:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function m7(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Hn(n)?!1:e}function Co(n,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),s=By(n);let a=cr(1);e&&(i?Ei(i)&&(a=Va(i)):a=Va(n));const c=m7(s,t,i)?ST(s):cr(0);let u=(r.left+c.x)/a.x,h=(r.top+c.y)/a.y,p=r.width/a.x,m=r.height/a.y;if(s){const O=Hn(s),v=i&&Ei(i)?Hn(i):i;let b=O,x=l0(b);for(;x&&i&&v!==b;){const w=Va(x),k=x.getBoundingClientRect(),T=_i(x),A=k.left+(x.clientLeft+parseFloat(T.paddingLeft))*w.x,$=k.top+(x.clientTop+parseFloat(T.paddingTop))*w.y;u*=w.x,h*=w.y,p*=w.x,m*=w.y,u+=A,h+=$,b=Hn(x),x=l0(b)}}return xd({width:p,height:m,x:u,y:h})}function Vy(n,e){const t=fp(n).scrollLeft;return e?e.left+t:Co(vr(n)).left+t}function wT(n,e,t){t===void 0&&(t=!1);const i=n.getBoundingClientRect(),r=i.left+e.scrollLeft-(t?0:Vy(n,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function g7(n){let{elements:e,rect:t,offsetParent:i,strategy:r}=n;const s=r==="fixed",a=vr(i),c=e?up(e.floating):!1;if(i===a||c&&s)return t;let u={scrollLeft:0,scrollTop:0},h=cr(1);const p=cr(0),m=dr(i);if((m||!m&&!s)&&((xl(i)!=="body"||_u(a))&&(u=fp(i)),dr(i))){const v=Co(i);h=Va(i),p.x=v.x+i.clientLeft,p.y=v.y+i.clientTop}const O=a&&!m&&!s?wT(a,u,!0):cr(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-u.scrollLeft*h.x+p.x+O.x,y:t.y*h.y-u.scrollTop*h.y+p.y+O.y}}function O7(n){return Array.from(n.getClientRects())}function y7(n){const e=vr(n),t=fp(n),i=n.ownerDocument.body,r=In(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=In(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-t.scrollLeft+Vy(n);const c=-t.scrollTop;return _i(i).direction==="rtl"&&(a+=In(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:c}}function v7(n,e){const t=Hn(n),i=vr(n),r=t.visualViewport;let s=i.clientWidth,a=i.clientHeight,c=0,u=0;if(r){s=r.width,a=r.height;const h=qy();(!h||h&&e==="fixed")&&(c=r.offsetLeft,u=r.offsetTop)}return{width:s,height:a,x:c,y:u}}function b7(n,e){const t=Co(n,!0,e==="fixed"),i=t.top+n.clientTop,r=t.left+n.clientLeft,s=dr(n)?Va(n):cr(1),a=n.clientWidth*s.x,c=n.clientHeight*s.y,u=r*s.x,h=i*s.y;return{width:a,height:c,x:u,y:h}}function Uw(n,e,t){let i;if(e==="viewport")i=v7(n,t);else if(e==="document")i=y7(vr(n));else if(Ei(e))i=b7(e,t);else{const r=ST(n);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return xd(i)}function kT(n,e){const t=Xs(n);return t===e||!Ei(t)||tl(t)?!1:_i(t).position==="fixed"||kT(t,e)}function x7(n,e){const t=e.get(n);if(t)return t;let i=iu(n,[],!1).filter(c=>Ei(c)&&xl(c)!=="body"),r=null;const s=_i(n).position==="fixed";let a=s?Xs(n):n;for(;Ei(a)&&!tl(a);){const c=_i(a),u=zy(a);!u&&c.position==="fixed"&&(r=null),(s?!u&&!r:!u&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||_u(a)&&!u&&kT(n,a))?i=i.filter(p=>p!==a):r=c,a=Xs(a)}return e.set(n,i),i}function S7(n){let{element:e,boundary:t,rootBoundary:i,strategy:r}=n;const a=[...t==="clippingAncestors"?up(e)?[]:x7(e,this._c):[].concat(t),i],c=a[0],u=a.reduce((h,p)=>{const m=Uw(e,p,r);return h.top=In(m.top,h.top),h.right=Ns(m.right,h.right),h.bottom=Ns(m.bottom,h.bottom),h.left=In(m.left,h.left),h},Uw(e,c,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function w7(n){const{width:e,height:t}=xT(n);return{width:e,height:t}}function k7(n,e,t){const i=dr(e),r=vr(e),s=t==="fixed",a=Co(n,!0,s,e);let c={scrollLeft:0,scrollTop:0};const u=cr(0);if(i||!i&&!s)if((xl(e)!=="body"||_u(r))&&(c=fp(e)),i){const O=Co(e,!0,s,e);u.x=O.x+e.clientLeft,u.y=O.y+e.clientTop}else r&&(u.x=Vy(r));const h=r&&!i&&!s?wT(r,c):cr(0),p=a.left+c.scrollLeft-u.x-h.x,m=a.top+c.scrollTop-u.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function eO(n){return _i(n).position==="static"}function Gw(n,e){if(!dr(n)||_i(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return vr(n)===t&&(t=t.ownerDocument.body),t}function QT(n,e){const t=Hn(n);if(up(n))return t;if(!dr(n)){let r=Xs(n);for(;r&&!tl(r);){if(Ei(r)&&!eO(r))return r;r=Xs(r)}return t}let i=Gw(n,e);for(;i&&h7(i)&&eO(i);)i=Gw(i,e);return i&&tl(i)&&eO(i)&&!zy(i)?t:i||d7(n)||t}const Q7=async function(n){const e=this.getOffsetParent||QT,t=this.getDimensions,i=await t(n.floating);return{reference:k7(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function C7(n){return _i(n).direction==="rtl"}const T7={convertOffsetParentRelativeRectToViewportRelativeRect:g7,getDocumentElement:vr,getClippingRect:S7,getOffsetParent:QT,getElementRects:Q7,getClientRects:O7,getDimensions:w7,getScale:Va,isElement:Ei,isRTL:C7};function CT(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function P7(n,e){let t=null,i;const r=vr(n);function s(){var c;clearTimeout(i),(c=t)==null||c.disconnect(),t=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const h=n.getBoundingClientRect(),{left:p,top:m,width:O,height:v}=h;if(c||e(),!O||!v)return;const b=yh(m),x=yh(r.clientWidth-(p+O)),w=yh(r.clientHeight-(m+v)),k=yh(p),A={rootMargin:-b+"px "+-x+"px "+-w+"px "+-k+"px",threshold:In(0,Ns(1,u))||1};let $=!0;function R(_){const D=_[0].intersectionRatio;if(D!==u){if(!$)return a();D?a(!1,D):i=setTimeout(()=>{a(!1,1e-7)},1e3)}D===1&&!CT(h,n.getBoundingClientRect())&&a(),$=!1}try{t=new IntersectionObserver(R,{...A,root:r.ownerDocument})}catch{t=new IntersectionObserver(R,A)}t.observe(n)}return a(!0),s}function A7(n,e,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,h=By(n),p=r||s?[...h?iu(h):[],...iu(e)]:[];p.forEach(k=>{r&&k.addEventListener("scroll",t,{passive:!0}),s&&k.addEventListener("resize",t)});const m=h&&c?P7(h,t):null;let O=-1,v=null;a&&(v=new ResizeObserver(k=>{let[T]=k;T&&T.target===h&&v&&(v.unobserve(e),cancelAnimationFrame(O),O=requestAnimationFrame(()=>{var A;(A=v)==null||A.observe(e)})),t()}),h&&!u&&v.observe(h),v.observe(e));let b,x=u?Co(n):null;u&&w();function w(){const k=Co(n);x&&!CT(x,k)&&t(),x=k,b=requestAnimationFrame(w)}return t(),()=>{var k;p.forEach(T=>{r&&T.removeEventListener("scroll",t),s&&T.removeEventListener("resize",t)}),m?.(),(k=v)==null||k.disconnect(),v=null,u&&cancelAnimationFrame(b)}}const M7=l7,R7=c7,$7=s7,E7=f7,_7=o7,Iw=r7,D7=u7,j7=(n,e,t)=>{const i=new Map,r={platform:T7,...t},s={...r.platform,_c:i};return i7(n,e,{...r,platform:s})};var Jh=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Sd(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,i,r;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(i=t;i--!==0;)if(!Sd(n[i],e[i]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(e).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(e,r[i]))return!1;for(i=t;i--!==0;){const s=r[i];if(!(s==="_owner"&&n.$$typeof)&&!Sd(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}function TT(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ww(n,e){const t=TT(n);return Math.round(e*t)/t}function tO(n){const e=C.useRef(n);return Jh(()=>{e.current=n}),e}function N7(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:u,open:h}=n,[p,m]=C.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[O,v]=C.useState(i);Sd(O,i)||v(i);const[b,x]=C.useState(null),[w,k]=C.useState(null),T=C.useCallback(z=>{z!==_.current&&(_.current=z,x(z))},[]),A=C.useCallback(z=>{z!==D.current&&(D.current=z,k(z))},[]),$=s||b,R=a||w,_=C.useRef(null),D=C.useRef(null),j=C.useRef(p),Y=u!=null,J=tO(u),I=tO(r),W=tO(h),ae=C.useCallback(()=>{if(!_.current||!D.current)return;const z={placement:e,strategy:t,middleware:O};I.current&&(z.platform=I.current),j7(_.current,D.current,z).then(K=>{const E={...K,isPositioned:W.current!==!1};le.current&&!Sd(j.current,E)&&(j.current=E,Cy.flushSync(()=>{m(E)}))})},[O,e,t,I,W]);Jh(()=>{h===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(z=>({...z,isPositioned:!1})))},[h]);const le=C.useRef(!1);Jh(()=>(le.current=!0,()=>{le.current=!1}),[]),Jh(()=>{if($&&(_.current=$),R&&(D.current=R),$&&R){if(J.current)return J.current($,R,ae);ae()}},[$,R,ae,J,Y]);const ce=C.useMemo(()=>({reference:_,floating:D,setReference:T,setFloating:A}),[T,A]),Z=C.useMemo(()=>({reference:$,floating:R}),[$,R]),U=C.useMemo(()=>{const z={position:t,left:0,top:0};if(!Z.floating)return z;const K=Ww(Z.floating,p.x),E=Ww(Z.floating,p.y);return c?{...z,transform:"translate("+K+"px, "+E+"px)",...TT(Z.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:K,top:E}},[t,c,Z.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:ae,refs:ce,elements:Z,floatingStyles:U}),[p,ae,ce,Z,U])}const Z7=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:i,padding:r}=typeof n=="function"?n(t):n;return i&&e(i)?i.current!=null?Iw({element:i.current,padding:r}).fn(t):{}:i?Iw({element:i,padding:r}).fn(t):{}}}},X7=(n,e)=>({...M7(n),options:[n,e]}),L7=(n,e)=>({...R7(n),options:[n,e]}),z7=(n,e)=>({...D7(n),options:[n,e]}),q7=(n,e)=>({...$7(n),options:[n,e]}),B7=(n,e)=>({...E7(n),options:[n,e]}),V7=(n,e)=>({..._7(n),options:[n,e]}),Y7=(n,e)=>({...Z7(n),options:[n,e]});var U7="Arrow",PT=C.forwardRef((n,e)=>{const{children:t,width:i=10,height:r=5,...s}=n;return S.jsx(ze.svg,{...s,ref:e,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});PT.displayName=U7;var G7=PT,Yy="Popper",[AT,MT]=Zi(Yy),[I7,RT]=AT(Yy),$T=n=>{const{__scopePopper:e,children:t}=n,[i,r]=C.useState(null);return S.jsx(I7,{scope:e,anchor:i,onAnchorChange:r,children:t})};$T.displayName=Yy;var ET="PopperAnchor",_T=C.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:i,...r}=n,s=RT(ET,t),a=C.useRef(null),c=Rt(e,a);return C.useEffect(()=>{s.onAnchorChange(i?.current||a.current)}),i?null:S.jsx(ze.div,{...r,ref:c})});_T.displayName=ET;var Uy="PopperContent",[W7,H7]=AT(Uy),DT=C.forwardRef((n,e)=>{const{__scopePopper:t,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:O=!1,updatePositionStrategy:v="optimized",onPlaced:b,...x}=n,w=RT(Uy,t),[k,T]=C.useState(null),A=Rt(e,de=>T(de)),[$,R]=C.useState(null),_=SC($),D=_?.width??0,j=_?.height??0,Y=i+(s!=="center"?"-"+s:""),J=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(h)?h:[h],W=I.length>0,ae={padding:J,boundary:I.filter(K7),altBoundary:W},{refs:le,floatingStyles:ce,placement:Z,isPositioned:U,middlewareData:z}=N7({strategy:"fixed",placement:Y,whileElementsMounted:(...de)=>A7(...de,{animationFrame:v==="always"}),elements:{reference:w.anchor},middleware:[X7({mainAxis:r+j,alignmentAxis:a}),u&&L7({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?z7():void 0,...ae}),u&&q7({...ae}),B7({...ae,apply:({elements:de,rects:ke,availableWidth:Ue,availableHeight:We})=>{const{width:Le,height:me}=ke.reference,je=de.floating.style;je.setProperty("--radix-popper-available-width",`${Ue}px`),je.setProperty("--radix-popper-available-height",`${We}px`),je.setProperty("--radix-popper-anchor-width",`${Le}px`),je.setProperty("--radix-popper-anchor-height",`${me}px`)}}),$&&Y7({element:$,padding:c}),J7({arrowWidth:D,arrowHeight:j}),O&&V7({strategy:"referenceHidden",...ae})]}),[K,E]=ZT(Z),q=Kr(b);Fr(()=>{U&&q?.()},[U,q]);const te=z.arrow?.x,F=z.arrow?.y,oe=z.arrow?.centerOffset!==0,[xe,ue]=C.useState();return Fr(()=>{k&&ue(window.getComputedStyle(k).zIndex)},[k]),S.jsx("div",{ref:le.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:U?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:S.jsx(W7,{scope:t,placedSide:K,onArrowChange:R,arrowX:te,arrowY:F,shouldHideArrow:oe,children:S.jsx(ze.div,{"data-side":K,"data-align":E,...x,ref:A,style:{...x.style,animation:U?void 0:"none"}})})})});DT.displayName=Uy;var jT="PopperArrow",F7={top:"bottom",right:"left",bottom:"top",left:"right"},NT=C.forwardRef(function(e,t){const{__scopePopper:i,...r}=e,s=H7(jT,i),a=F7[s.placedSide];return S.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:S.jsx(G7,{...r,ref:t,style:{...r.style,display:"block"}})})});NT.displayName=jT;function K7(n){return n!==null}var J7=n=>({name:"transformOrigin",options:n,fn(e){const{placement:t,rects:i,middlewareData:r}=e,a=r.arrow?.centerOffset!==0,c=a?0:n.arrowWidth,u=a?0:n.arrowHeight,[h,p]=ZT(t),m={start:"0%",center:"50%",end:"100%"}[p],O=(r.arrow?.x??0)+c/2,v=(r.arrow?.y??0)+u/2;let b="",x="";return h==="bottom"?(b=a?m:`${O}px`,x=`${-u}px`):h==="top"?(b=a?m:`${O}px`,x=`${i.floating.height+u}px`):h==="right"?(b=`${-u}px`,x=a?m:`${v}px`):h==="left"&&(b=`${i.floating.width+u}px`,x=a?m:`${v}px`),{data:{x:b,y:x}}}});function ZT(n){const[e,t="center"]=n.split("-");return[e,t]}var eZ=$T,tZ=_T,nZ=DT,iZ=NT,nO="rovingFocusGroup.onEntryFocus",rZ={bubbles:!1,cancelable:!0},Du="RovingFocusGroup",[c0,XT,sZ]=Ny(Du),[oZ,Sl]=Zi(Du,[sZ]),[aZ,lZ]=oZ(Du),LT=C.forwardRef((n,e)=>S.jsx(c0.Provider,{scope:n.__scopeRovingFocusGroup,children:S.jsx(c0.Slot,{scope:n.__scopeRovingFocusGroup,children:S.jsx(cZ,{...n,ref:e})})}));LT.displayName=Du;var cZ=C.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:i,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...m}=n,O=C.useRef(null),v=Rt(e,O),b=Eu(s),[x,w]=Xi({prop:a,defaultProp:c??null,onChange:u,caller:Du}),[k,T]=C.useState(!1),A=Kr(h),$=XT(t),R=C.useRef(!1),[_,D]=C.useState(0);return C.useEffect(()=>{const j=O.current;if(j)return j.addEventListener(nO,A),()=>j.removeEventListener(nO,A)},[A]),S.jsx(aZ,{scope:t,orientation:i,dir:b,loop:r,currentTabStopId:x,onItemFocus:C.useCallback(j=>w(j),[w]),onItemShiftTab:C.useCallback(()=>T(!0),[]),onFocusableItemAdd:C.useCallback(()=>D(j=>j+1),[]),onFocusableItemRemove:C.useCallback(()=>D(j=>j-1),[]),children:S.jsx(ze.div,{tabIndex:k||_===0?-1:0,"data-orientation":i,...m,ref:v,style:{outline:"none",...n.style},onMouseDown:Ae(n.onMouseDown,()=>{R.current=!0}),onFocus:Ae(n.onFocus,j=>{const Y=!R.current;if(j.target===j.currentTarget&&Y&&!k){const J=new CustomEvent(nO,rZ);if(j.currentTarget.dispatchEvent(J),!J.defaultPrevented){const I=$().filter(Z=>Z.focusable),W=I.find(Z=>Z.active),ae=I.find(Z=>Z.id===x),ce=[W,ae,...I].filter(Boolean).map(Z=>Z.ref.current);BT(ce,p)}}R.current=!1}),onBlur:Ae(n.onBlur,()=>T(!1))})})}),zT="RovingFocusGroupItem",qT=C.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:i=!0,active:r=!1,tabStopId:s,children:a,...c}=n,u=Ir(),h=s||u,p=lZ(zT,t),m=p.currentTabStopId===h,O=XT(t),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:x}=p;return C.useEffect(()=>{if(i)return v(),()=>b()},[i,v,b]),S.jsx(c0.ItemSlot,{scope:t,id:h,focusable:i,active:r,children:S.jsx(ze.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:e,onMouseDown:Ae(n.onMouseDown,w=>{i?p.onItemFocus(h):w.preventDefault()}),onFocus:Ae(n.onFocus,()=>p.onItemFocus(h)),onKeyDown:Ae(n.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){p.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const k=hZ(w,p.orientation,p.dir);if(k!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let A=O().filter($=>$.focusable).map($=>$.ref.current);if(k==="last")A.reverse();else if(k==="prev"||k==="next"){k==="prev"&&A.reverse();const $=A.indexOf(w.currentTarget);A=p.loop?dZ(A,$+1):A.slice($+1)}setTimeout(()=>BT(A))}}),children:typeof a=="function"?a({isCurrentTabStop:m,hasTabStop:x!=null}):a})})});qT.displayName=zT;var uZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fZ(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function hZ(n,e,t){const i=fZ(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return uZ[i]}function BT(n,e=!1){const t=document.activeElement;for(const i of n)if(i===t||(i.focus({preventScroll:e}),document.activeElement!==t))return}function dZ(n,e){return n.map((t,i)=>n[(e+i)%n.length])}var Gy=LT,Iy=qT,u0=["Enter"," "],pZ=["ArrowDown","PageUp","Home"],VT=["ArrowUp","PageDown","End"],mZ=[...pZ,...VT],gZ={ltr:[...u0,"ArrowRight"],rtl:[...u0,"ArrowLeft"]},OZ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ju="Menu",[ru,yZ,vZ]=Ny(ju),[Zo,YT]=Zi(ju,[vZ,MT,Sl]),hp=MT(),UT=Sl(),[bZ,Xo]=Zo(ju),[xZ,Nu]=Zo(ju),GT=n=>{const{__scopeMenu:e,open:t=!1,children:i,dir:r,onOpenChange:s,modal:a=!0}=n,c=hp(e),[u,h]=C.useState(null),p=C.useRef(!1),m=Kr(s),O=Eu(r);return C.useEffect(()=>{const v=()=>{p.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>p.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),S.jsx(eZ,{...c,children:S.jsx(bZ,{scope:e,open:t,onOpenChange:m,content:u,onContentChange:h,children:S.jsx(xZ,{scope:e,onClose:C.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:O,modal:a,children:i})})})};GT.displayName=ju;var SZ="MenuAnchor",Wy=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n,r=hp(t);return S.jsx(tZ,{...r,...i,ref:e})});Wy.displayName=SZ;var Hy="MenuPortal",[wZ,IT]=Zo(Hy,{forceMount:void 0}),WT=n=>{const{__scopeMenu:e,forceMount:t,children:i,container:r}=n,s=Xo(Hy,e);return S.jsx(wZ,{scope:e,forceMount:t,children:S.jsx(yr,{present:t||s.open,children:S.jsx($y,{asChild:!0,container:r,children:i})})})};WT.displayName=Hy;var yi="MenuContent",[kZ,Fy]=Zo(yi),HT=C.forwardRef((n,e)=>{const t=IT(yi,n.__scopeMenu),{forceMount:i=t.forceMount,...r}=n,s=Xo(yi,n.__scopeMenu),a=Nu(yi,n.__scopeMenu);return S.jsx(ru.Provider,{scope:n.__scopeMenu,children:S.jsx(yr,{present:i||s.open,children:S.jsx(ru.Slot,{scope:n.__scopeMenu,children:a.modal?S.jsx(QZ,{...r,ref:e}):S.jsx(CZ,{...r,ref:e})})})})}),QZ=C.forwardRef((n,e)=>{const t=Xo(yi,n.__scopeMenu),i=C.useRef(null),r=Rt(e,i);return C.useEffect(()=>{const s=i.current;if(s)return nT(s)},[]),S.jsx(Ky,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:Ae(n.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),CZ=C.forwardRef((n,e)=>{const t=Xo(yi,n.__scopeMenu);return S.jsx(Ky,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),TZ=el("MenuContent.ScrollLock"),Ky=C.forwardRef((n,e)=>{const{__scopeMenu:t,loop:i=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:O,onDismiss:v,disableOutsideScroll:b,...x}=n,w=Xo(yi,t),k=Nu(yi,t),T=hp(t),A=UT(t),$=yZ(t),[R,_]=C.useState(null),D=C.useRef(null),j=Rt(e,D,w.onContentChange),Y=C.useRef(0),J=C.useRef(""),I=C.useRef(0),W=C.useRef(null),ae=C.useRef("right"),le=C.useRef(0),ce=b?Ey:C.Fragment,Z=b?{as:TZ,allowPinchZoom:!0}:void 0,U=K=>{const E=J.current+K,q=$().filter(de=>!de.disabled),te=document.activeElement,F=q.find(de=>de.ref.current===te)?.textValue,oe=q.map(de=>de.textValue),xe=XZ(oe,E,F),ue=q.find(de=>de.textValue===xe)?.ref.current;(function de(ke){J.current=ke,window.clearTimeout(Y.current),ke!==""&&(Y.current=window.setTimeout(()=>de(""),1e3))})(E),ue&&setTimeout(()=>ue.focus())};C.useEffect(()=>()=>window.clearTimeout(Y.current),[]),GC();const z=C.useCallback(K=>ae.current===W.current?.side&&zZ(K,W.current?.area),[]);return S.jsx(kZ,{scope:t,searchRef:J,onItemEnter:C.useCallback(K=>{z(K)&&K.preventDefault()},[z]),onItemLeave:C.useCallback(K=>{z(K)||(D.current?.focus(),_(null))},[z]),onTriggerLeave:C.useCallback(K=>{z(K)&&K.preventDefault()},[z]),pointerGraceTimerRef:I,onPointerGraceIntentChange:C.useCallback(K=>{W.current=K},[]),children:S.jsx(ce,{...Z,children:S.jsx(Ry,{asChild:!0,trapped:r,onMountAutoFocus:Ae(s,K=>{K.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:S.jsx(My,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:O,onDismiss:v,children:S.jsx(Gy,{asChild:!0,...A,dir:k.dir,orientation:"vertical",loop:i,currentTabStopId:R,onCurrentTabStopIdChange:_,onEntryFocus:Ae(u,K=>{k.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:S.jsx(nZ,{role:"menu","aria-orientation":"vertical","data-state":hP(w.open),"data-radix-menu-content":"",dir:k.dir,...T,...x,ref:j,style:{outline:"none",...x.style},onKeyDown:Ae(x.onKeyDown,K=>{const q=K.target.closest("[data-radix-menu-content]")===K.currentTarget,te=K.ctrlKey||K.altKey||K.metaKey,F=K.key.length===1;q&&(K.key==="Tab"&&K.preventDefault(),!te&&F&&U(K.key));const oe=D.current;if(K.target!==oe||!mZ.includes(K.key))return;K.preventDefault();const ue=$().filter(de=>!de.disabled).map(de=>de.ref.current);VT.includes(K.key)&&ue.reverse(),NZ(ue)}),onBlur:Ae(n.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(Y.current),J.current="")}),onPointerMove:Ae(n.onPointerMove,su(K=>{const E=K.target,q=le.current!==K.clientX;if(K.currentTarget.contains(E)&&q){const te=K.clientX>le.current?"right":"left";ae.current=te,le.current=K.clientX}}))})})})})})})});HT.displayName=yi;var PZ="MenuGroup",Jy=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return S.jsx(ze.div,{role:"group",...i,ref:e})});Jy.displayName=PZ;var AZ="MenuLabel",FT=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return S.jsx(ze.div,{...i,ref:e})});FT.displayName=AZ;var wd="MenuItem",Hw="menu.itemSelect",dp=C.forwardRef((n,e)=>{const{disabled:t=!1,onSelect:i,...r}=n,s=C.useRef(null),a=Nu(wd,n.__scopeMenu),c=Fy(wd,n.__scopeMenu),u=Rt(e,s),h=C.useRef(!1),p=()=>{const m=s.current;if(!t&&m){const O=new CustomEvent(Hw,{bubbles:!0,cancelable:!0});m.addEventListener(Hw,v=>i?.(v),{once:!0}),kC(m,O),O.defaultPrevented?h.current=!1:a.onClose()}};return S.jsx(KT,{...r,ref:u,disabled:t,onClick:Ae(n.onClick,p),onPointerDown:m=>{n.onPointerDown?.(m),h.current=!0},onPointerUp:Ae(n.onPointerUp,m=>{h.current||m.currentTarget?.click()}),onKeyDown:Ae(n.onKeyDown,m=>{const O=c.searchRef.current!=="";t||O&&m.key===" "||u0.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});dp.displayName=wd;var KT=C.forwardRef((n,e)=>{const{__scopeMenu:t,disabled:i=!1,textValue:r,...s}=n,a=Fy(wd,t),c=UT(t),u=C.useRef(null),h=Rt(e,u),[p,m]=C.useState(!1),[O,v]=C.useState("");return C.useEffect(()=>{const b=u.current;b&&v((b.textContent??"").trim())},[s.children]),S.jsx(ru.ItemSlot,{scope:t,disabled:i,textValue:r??O,children:S.jsx(Iy,{asChild:!0,...c,focusable:!i,children:S.jsx(ze.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:h,onPointerMove:Ae(n.onPointerMove,su(b=>{i?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ae(n.onPointerLeave,su(b=>a.onItemLeave(b))),onFocus:Ae(n.onFocus,()=>m(!0)),onBlur:Ae(n.onBlur,()=>m(!1))})})})}),MZ="MenuCheckboxItem",JT=C.forwardRef((n,e)=>{const{checked:t=!1,onCheckedChange:i,...r}=n;return S.jsx(rP,{scope:n.__scopeMenu,checked:t,children:S.jsx(dp,{role:"menuitemcheckbox","aria-checked":kd(t)?"mixed":t,...r,ref:e,"data-state":tv(t),onSelect:Ae(r.onSelect,()=>i?.(kd(t)?!0:!t),{checkForDefaultPrevented:!1})})})});JT.displayName=MZ;var eP="MenuRadioGroup",[RZ,$Z]=Zo(eP,{value:void 0,onValueChange:()=>{}}),tP=C.forwardRef((n,e)=>{const{value:t,onValueChange:i,...r}=n,s=Kr(i);return S.jsx(RZ,{scope:n.__scopeMenu,value:t,onValueChange:s,children:S.jsx(Jy,{...r,ref:e})})});tP.displayName=eP;var nP="MenuRadioItem",iP=C.forwardRef((n,e)=>{const{value:t,...i}=n,r=$Z(nP,n.__scopeMenu),s=t===r.value;return S.jsx(rP,{scope:n.__scopeMenu,checked:s,children:S.jsx(dp,{role:"menuitemradio","aria-checked":s,...i,ref:e,"data-state":tv(s),onSelect:Ae(i.onSelect,()=>r.onValueChange?.(t),{checkForDefaultPrevented:!1})})})});iP.displayName=nP;var ev="MenuItemIndicator",[rP,EZ]=Zo(ev,{checked:!1}),sP=C.forwardRef((n,e)=>{const{__scopeMenu:t,forceMount:i,...r}=n,s=EZ(ev,t);return S.jsx(yr,{present:i||kd(s.checked)||s.checked===!0,children:S.jsx(ze.span,{...r,ref:e,"data-state":tv(s.checked)})})});sP.displayName=ev;var _Z="MenuSeparator",oP=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return S.jsx(ze.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});oP.displayName=_Z;var DZ="MenuArrow",aP=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n,r=hp(t);return S.jsx(iZ,{...r,...i,ref:e})});aP.displayName=DZ;var jZ="MenuSub",[LW,lP]=Zo(jZ),Dc="MenuSubTrigger",cP=C.forwardRef((n,e)=>{const t=Xo(Dc,n.__scopeMenu),i=Nu(Dc,n.__scopeMenu),r=lP(Dc,n.__scopeMenu),s=Fy(Dc,n.__scopeMenu),a=C.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,h={__scopeMenu:n.__scopeMenu},p=C.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return C.useEffect(()=>p,[p]),C.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),u(null)}},[c,u]),S.jsx(Wy,{asChild:!0,...h,children:S.jsx(KT,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":r.contentId,"data-state":hP(t.open),...n,ref:sp(e,r.onTriggerChange),onClick:m=>{n.onClick?.(m),!(n.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:Ae(n.onPointerMove,su(m=>{s.onItemEnter(m),!m.defaultPrevented&&!n.disabled&&!t.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{t.onOpenChange(!0),p()},100))})),onPointerLeave:Ae(n.onPointerLeave,su(m=>{p();const O=t.content?.getBoundingClientRect();if(O){const v=t.content?.dataset.side,b=v==="right",x=b?-5:5,w=O[b?"left":"right"],k=O[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+x,y:m.clientY},{x:w,y:O.top},{x:k,y:O.top},{x:k,y:O.bottom},{x:w,y:O.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Ae(n.onKeyDown,m=>{const O=s.searchRef.current!=="";n.disabled||O&&m.key===" "||gZ[i.dir].includes(m.key)&&(t.onOpenChange(!0),t.content?.focus(),m.preventDefault())})})})});cP.displayName=Dc;var uP="MenuSubContent",fP=C.forwardRef((n,e)=>{const t=IT(yi,n.__scopeMenu),{forceMount:i=t.forceMount,...r}=n,s=Xo(yi,n.__scopeMenu),a=Nu(yi,n.__scopeMenu),c=lP(uP,n.__scopeMenu),u=C.useRef(null),h=Rt(e,u);return S.jsx(ru.Provider,{scope:n.__scopeMenu,children:S.jsx(yr,{present:i||s.open,children:S.jsx(ru.Slot,{scope:n.__scopeMenu,children:S.jsx(Ky,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:h,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{a.isUsingKeyboardRef.current&&u.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Ae(n.onFocusOutside,p=>{p.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Ae(n.onEscapeKeyDown,p=>{a.onClose(),p.preventDefault()}),onKeyDown:Ae(n.onKeyDown,p=>{const m=p.currentTarget.contains(p.target),O=OZ[a.dir].includes(p.key);m&&O&&(s.onOpenChange(!1),c.trigger?.focus(),p.preventDefault())})})})})})});fP.displayName=uP;function hP(n){return n?"open":"closed"}function kd(n){return n==="indeterminate"}function tv(n){return kd(n)?"indeterminate":n?"checked":"unchecked"}function NZ(n){const e=document.activeElement;for(const t of n)if(t===e||(t.focus(),document.activeElement!==e))return}function ZZ(n,e){return n.map((t,i)=>n[(e+i)%n.length])}function XZ(n,e,t){const r=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,s=t?n.indexOf(t):-1;let a=ZZ(n,Math.max(s,0));r.length===1&&(a=a.filter(h=>h!==t));const u=a.find(h=>h.toLowerCase().startsWith(r.toLowerCase()));return u!==t?u:void 0}function LZ(n,e){const{x:t,y:i}=n;let r=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const c=e[s],u=e[a],h=c.x,p=c.y,m=u.x,O=u.y;p>i!=O>i&&t<(m-h)*(i-p)/(O-p)+h&&(r=!r)}return r}function zZ(n,e){if(!e)return!1;const t={x:n.clientX,y:n.clientY};return LZ(t,e)}function su(n){return e=>e.pointerType==="mouse"?n(e):void 0}var qZ=GT,BZ=Wy,VZ=WT,YZ=HT,UZ=Jy,GZ=FT,IZ=dp,WZ=JT,HZ=tP,FZ=iP,KZ=sP,JZ=oP,e6=aP,t6=cP,n6=fP,pp="DropdownMenu",[i6,zW]=Zi(pp,[YT]),xn=YT(),[r6,dP]=i6(pp),pP=n=>{const{__scopeDropdownMenu:e,children:t,dir:i,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=n,u=xn(e),h=C.useRef(null),[p,m]=Xi({prop:r,defaultProp:s??!1,onChange:a,caller:pp});return S.jsx(r6,{scope:e,triggerId:Ir(),triggerRef:h,contentId:Ir(),open:p,onOpenChange:m,onOpenToggle:C.useCallback(()=>m(O=>!O),[m]),modal:c,children:S.jsx(qZ,{...u,open:p,onOpenChange:m,dir:i,modal:c,children:t})})};pP.displayName=pp;var mP="DropdownMenuTrigger",gP=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,disabled:i=!1,...r}=n,s=dP(mP,t),a=xn(t);return S.jsx(BZ,{asChild:!0,...a,children:S.jsx(ze.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:sp(e,s.triggerRef),onPointerDown:Ae(n.onPointerDown,c=>{!i&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:Ae(n.onKeyDown,c=>{i||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});gP.displayName=mP;var s6="DropdownMenuPortal",OP=n=>{const{__scopeDropdownMenu:e,...t}=n,i=xn(e);return S.jsx(VZ,{...i,...t})};OP.displayName=s6;var yP="DropdownMenuContent",vP=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=dP(yP,t),s=xn(t),a=C.useRef(!1);return S.jsx(YZ,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...i,ref:e,onCloseAutoFocus:Ae(n.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:Ae(n.onInteractOutside,c=>{const u=c.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0,p=u.button===2||h;(!r.modal||p)&&(a.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vP.displayName=yP;var o6="DropdownMenuGroup",a6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(UZ,{...r,...i,ref:e})});a6.displayName=o6;var l6="DropdownMenuLabel",c6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(GZ,{...r,...i,ref:e})});c6.displayName=l6;var u6="DropdownMenuItem",bP=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(IZ,{...r,...i,ref:e})});bP.displayName=u6;var f6="DropdownMenuCheckboxItem",h6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(WZ,{...r,...i,ref:e})});h6.displayName=f6;var d6="DropdownMenuRadioGroup",p6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(HZ,{...r,...i,ref:e})});p6.displayName=d6;var m6="DropdownMenuRadioItem",g6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(FZ,{...r,...i,ref:e})});g6.displayName=m6;var O6="DropdownMenuItemIndicator",y6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(KZ,{...r,...i,ref:e})});y6.displayName=O6;var v6="DropdownMenuSeparator",b6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(JZ,{...r,...i,ref:e})});b6.displayName=v6;var x6="DropdownMenuArrow",S6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(e6,{...r,...i,ref:e})});S6.displayName=x6;var w6="DropdownMenuSubTrigger",k6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(t6,{...r,...i,ref:e})});k6.displayName=w6;var Q6="DropdownMenuSubContent",C6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(n6,{...r,...i,ref:e,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});C6.displayName=Q6;var T6=pP,P6=gP,A6=OP,M6=vP,R6=bP;function $6({...n}){return S.jsx(T6,{"data-slot":"dropdown-menu",...n})}function E6({...n}){return S.jsx(P6,{"data-slot":"dropdown-menu-trigger",...n})}function _6({className:n,sideOffset:e=4,...t}){return S.jsx(A6,{children:S.jsx(M6,{"data-slot":"dropdown-menu-content",sideOffset:e,className:Ie("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),...t})})}function D6({className:n,inset:e,variant:t="default",...i}){return S.jsx(R6,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":t,className:Ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...i})}function j6({option:n,value:e,onChange:t,disabled:i=!1}){const r=n.options.find(s=>s.value===e);return S.jsxs("div",{className:"space-y-2",children:[S.jsx(er,{className:"text-sm font-medium text-gray-300",children:n.label}),n.description&&S.jsx("p",{className:"text-xs text-gray-500",children:n.description}),S.jsxs($6,{children:[S.jsx(E6,{asChild:!0,children:S.jsxs(Oi,{variant:"outline",className:"w-full justify-between",disabled:i,children:[S.jsx("span",{children:r?.label||"Select option..."}),S.jsx(yC,{className:"h-4 w-4"})]})}),S.jsx(_6,{className:"w-full min-w-[200px]",children:n.options.map(s=>S.jsx(D6,{onClick:()=>t(s.value),className:e===s.value?"bg-accent":"",children:s.label},s.value))})]})]})}function N6({addOn:n,selectedOptions:e,onOptionChange:t,disabled:i=!1}){return!n.options||Object.keys(n.options).length===0?null:S.jsx("div",{className:"space-y-3",children:Object.entries(n.options).map(([r,s])=>s&&typeof s=="object"&&"type"in s&&s.type==="select"?S.jsx(j6,{option:s,value:e[r]||s.default,onChange:a=>t(r,a),disabled:i},r):null)})}function Z6({addOn:n,selectedOptions:e,onOptionChange:t,onClose:i,disabled:r=!1}){return n?S.jsx(jo,{open:!!n,onOpenChange:s=>!s&&i(),children:S.jsxs(No,{className:"sm:max-w-md",children:[S.jsxs(yl,{children:[S.jsxs(vl,{children:["Configure ",n.name]}),S.jsx(YN,{children:"Customize the configuration options for this add-on."})]}),S.jsx("div",{className:"py-4",children:S.jsx(N6,{addOn:n,selectedOptions:e,onOptionChange:t,disabled:r})})]})}):null}const Fw={toolchain:"Toolchain","add-on":"Add-on",host:"Hosting Provider",example:"Example"};function X6(){const n=K_(),{availableAddOns:e,addOnState:t,toggleAddOn:i,setAddOnOption:r}=Au(),s=dn(m=>m.addOnOptions);console.log("showHostingOptions",n);const a=C.useMemo(()=>e.sort((m,O)=>{const v=m.priority??0,b=O.priority??0;return b!==v?b-v:m.name.localeCompare(O.name)}),[e]),[c,u]=C.useState(),[h,p]=C.useState();return S.jsxs(S.Fragment,{children:[S.jsx(GN,{addOn:c,onClose:()=>u(void 0)}),S.jsx(Z6,{addOn:h,selectedOptions:h?s[h.id]||{}:{},onOptionChange:(m,O)=>{h&&r(h.id,m,O)},onClose:()=>p(void 0),disabled:h?!t[h.id]?.enabled:!1}),S.jsx("div",{className:"max-h-[60vh] overflow-y-auto space-y-2",children:Object.keys(Fw).filter(m=>n?!0:m!=="host").map(m=>S.jsx(C.Fragment,{children:a.filter(O=>O.type===m).length>0&&S.jsxs("div",{className:"block p-4 bg-gray-500/10 hover:bg-gray-500/20 rounded-lg transition-colors space-y-4 active",children:[S.jsx("h3",{className:"font-medium",children:Fw[m]}),S.jsx("div",{className:"space-y-3",children:S.jsx("div",{className:"flex flex-row flex-wrap",children:a.filter(O=>O.type===m).map(O=>S.jsx("div",{className:"w-1/2",children:S.jsxs("div",{className:"flex flex-row items-center justify-between",children:[S.jsxs("div",{className:"p-1 flex flex-row items-center",children:[S.jsx(Ur,{id:O.id,checked:t[O.id].selected,disabled:!t[O.id].enabled,onCheckedChange:()=>{i(O.id)}}),S.jsxs(er,{htmlFor:O.id,className:"pl-2 font-semibold text-gray-300 flex items-center gap-2",children:[O.smallLogo&&S.jsx("img",{src:`data:image/svg+xml,${encodeURIComponent(O.smallLogo)}`,alt:O.name,className:"w-5"}),O.name]})]}),S.jsxs("div",{className:"flex items-center gap-1",children:[t[O.id].selected&&O.options&&Object.keys(O.options).length>0&&S.jsx(Oi,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-gray-600 hover:text-gray-400",onClick:()=>p(O),disabled:!t[O.id].enabled,children:S.jsx(DD,{className:"w-4 h-4"})}),S.jsx(xC,{className:"w-4 text-gray-600 cursor-pointer hover:text-gray-400",onClick:()=>u(O)})]})]})},O.id))})})]},`${m}-add-ons`)},m))}),S.jsx("div",{className:"mt-4",children:S.jsx(UN,{})})]})}const L6={file:ND,command:XD,"package-manager":ED,info:xC,other:RD};function xP(){const[n,e]=C.useState([]),[t,i]=C.useState(!1),r=C.useCallback(async s=>{i(!1);const a=s.body?.getReader(),c=new TextDecoder;let u="";for(;;){const h=await a?.read();if(h?.done)break;u+=c.decode(h?.value);let p;const m=[];for(const O of u.split(`
198
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return C.useEffect(()=>{n&&(document.getElementById(n)||console.error(t))},[t,n]),null},_N="DialogDescriptionWarning",DN=({contentRef:n,descriptionId:e})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${OT(_N).contentName}}.`;return C.useEffect(()=>{const r=n.current?.getAttribute("aria-describedby");e&&r&&(document.getElementById(e)||console.warn(i))},[i,n,e]),null},jN=rT,NN=aT,ZN=lT,XN=cT,LN=fT,zN=dT,qN=mT;function jo({...n}){return S.jsx(jN,{"data-slot":"dialog",...n})}function BN({...n}){return S.jsx(NN,{"data-slot":"dialog-portal",...n})}function VN({className:n,...e}){return S.jsx(ZN,{"data-slot":"dialog-overlay",className:Ie("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),...e})}function No({className:n,children:e,hideCloseButton:t,...i}){return S.jsxs(BN,{"data-slot":"dialog-portal",children:[S.jsx(VN,{}),S.jsxs(XN,{"data-slot":"dialog-content",className:Ie("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg bg-opacity-70 backdrop-blur-md border-3 border-white/20",n),...i,children:[e,!t&&S.jsxs(qN,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[S.jsx(YD,{}),S.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function yl({className:n,...e}){return S.jsx("div",{"data-slot":"dialog-header",className:Ie("flex flex-col gap-2 text-center sm:text-left",n),...e})}function $u({className:n,...e}){return S.jsx("div",{"data-slot":"dialog-footer",className:Ie("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...e})}function vl({className:n,...e}){return S.jsx(LN,{"data-slot":"dialog-title",className:Ie("text-lg leading-none font-semibold",n),...e})}function YN({className:n,...e}){return S.jsx(zN,{"data-slot":"dialog-description",className:Ie("text-muted-foreground text-sm",n),...e})}function UN(){const[n,e]=C.useState(""),[t,i]=C.useState(!1),r=Mu(),{toggleAddOn:s}=Au();async function a(){const c=await q_(n);"error"in c?Py.error("Failed to load add-on",{description:c.error}):(tD(c),c.modes.includes(r)&&s(c.id),i(!1))}return S.jsxs("div",{children:[S.jsxs(Oi,{variant:"secondary",className:"w-full",onClick:()=>{e(""),i(!0)},children:[S.jsx(zD,{className:"w-4 h-4"}),"Import Custom Add-On"]}),S.jsx(jo,{modal:!0,open:t,onOpenChange:i,children:S.jsxs(No,{className:"sm:min-w-[425px] sm:max-w-fit",children:[S.jsx(yl,{children:S.jsx(vl,{children:"Import Custom Add-On"})}),S.jsx("div",{children:S.jsx(Ay,{value:n,onChange:c=>e(c.target.value),placeholder:"https://github.com/myorg/myproject/add-on.json",className:"min-w-lg w-full",onKeyDown:c=>{c.key==="Enter"&&a()}})}),S.jsx($u,{children:S.jsx(Oi,{onClick:a,children:"Import"})})]})})]})}function GN({addOn:n,onClose:e}){return S.jsx(jo,{modal:!0,open:!!n,onOpenChange:e,children:S.jsx(No,{className:"sm:min-w-[425px] sm:max-w-fit",children:S.jsxs("div",{className:"flex flex-row",children:[n?.smallLogo&&S.jsx("img",{src:`data:image/svg+xml,${encodeURIComponent(n.smallLogo)}`,alt:n.name,className:"w-15"}),S.jsxs("div",{className:"flex flex-col ml-4 gap-4",children:[S.jsx("p",{className:"text-lg font-bold",children:n?.name}),S.jsx("p",{className:"text-sm text-gray-500",children:n?.description}),S.jsxs("a",{href:n?.link,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-500 underline",children:["More information on ",n?.name]})]})]})})})}function Ny(n){const e=n+"CollectionProvider",[t,i]=Zi(e),[r,s]=t(e,{collectionRef:{current:null},itemMap:new Map}),a=x=>{const{scope:w,children:k}=x,T=ee.useRef(null),A=ee.useRef(new Map).current;return S.jsx(r,{scope:w,itemMap:A,collectionRef:T,children:k})};a.displayName=e;const c=n+"CollectionSlot",u=el(c),h=ee.forwardRef((x,w)=>{const{scope:k,children:T}=x,A=s(c,k),$=Rt(w,A.collectionRef);return S.jsx(u,{ref:$,children:T})});h.displayName=c;const p=n+"CollectionItemSlot",m="data-radix-collection-item",O=el(p),v=ee.forwardRef((x,w)=>{const{scope:k,children:T,...A}=x,$=ee.useRef(null),R=Rt(w,$),_=s(p,k);return ee.useEffect(()=>(_.itemMap.set($,{ref:$,...A}),()=>void _.itemMap.delete($))),S.jsx(O,{[m]:"",ref:R,children:T})});v.displayName=p;function b(x){const w=s(n+"CollectionConsumer",x);return ee.useCallback(()=>{const T=w.collectionRef.current;if(!T)return[];const A=Array.from(T.querySelectorAll(`[${m}]`));return Array.from(w.itemMap.values()).sort((_,D)=>A.indexOf(_.ref.current)-A.indexOf(D.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:h,ItemSlot:v},b,i]}var IN=C.createContext(void 0);function Eu(n){const e=C.useContext(IN);return n||e||"ltr"}const WN=["top","right","bottom","left"],Ns=Math.min,In=Math.max,vd=Math.round,yh=Math.floor,cr=n=>({x:n,y:n}),HN={left:"right",right:"left",bottom:"top",top:"bottom"},FN={start:"end",end:"start"};function o0(n,e,t){return In(n,Ns(e,t))}function Jr(n,e){return typeof n=="function"?n(e):n}function es(n){return n.split("-")[0]}function bl(n){return n.split("-")[1]}function Zy(n){return n==="x"?"y":"x"}function Xy(n){return n==="y"?"height":"width"}function Zs(n){return["top","bottom"].includes(es(n))?"y":"x"}function Ly(n){return Zy(Zs(n))}function KN(n,e,t){t===void 0&&(t=!1);const i=bl(n),r=Ly(n),s=Xy(r);let a=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=bd(a)),[a,bd(a)]}function JN(n){const e=bd(n);return[a0(n),e,a0(e)]}function a0(n){return n.replace(/start|end/g,e=>FN[e])}function e7(n,e,t){const i=["left","right"],r=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(n){case"top":case"bottom":return t?e?r:i:e?i:r;case"left":case"right":return e?s:a;default:return[]}}function t7(n,e,t,i){const r=bl(n);let s=e7(es(n),t==="start",i);return r&&(s=s.map(a=>a+"-"+r),e&&(s=s.concat(s.map(a0)))),s}function bd(n){return n.replace(/left|right|bottom|top/g,e=>HN[e])}function n7(n){return{top:0,right:0,bottom:0,left:0,...n}}function yT(n){return typeof n!="number"?n7(n):{top:n,right:n,bottom:n,left:n}}function xd(n){const{x:e,y:t,width:i,height:r}=n;return{width:i,height:r,top:t,left:e,right:e+i,bottom:t+r,x:e,y:t}}function qw(n,e,t){let{reference:i,floating:r}=n;const s=Zs(e),a=Ly(e),c=Xy(a),u=es(e),h=s==="y",p=i.x+i.width/2-r.width/2,m=i.y+i.height/2-r.height/2,O=i[c]/2-r[c]/2;let v;switch(u){case"top":v={x:p,y:i.y-r.height};break;case"bottom":v={x:p,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-r.width,y:m};break;default:v={x:i.x,y:i.y}}switch(bl(e)){case"start":v[a]-=O*(t&&h?-1:1);break;case"end":v[a]+=O*(t&&h?-1:1);break}return v}const i7=async(n,e,t)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=t,c=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let h=await a.getElementRects({reference:n,floating:e,strategy:r}),{x:p,y:m}=qw(h,i,u),O=i,v={},b=0;for(let x=0;x<c.length;x++){const{name:w,fn:k}=c[x],{x:T,y:A,data:$,reset:R}=await k({x:p,y:m,initialPlacement:i,placement:O,strategy:r,middlewareData:v,rects:h,platform:a,elements:{reference:n,floating:e}});p=T??p,m=A??m,v={...v,[w]:{...v[w],...$}},R&&b<=50&&(b++,typeof R=="object"&&(R.placement&&(O=R.placement),R.rects&&(h=R.rects===!0?await a.getElementRects({reference:n,floating:e,strategy:r}):R.rects),{x:p,y:m}=qw(h,O,u)),x=-1)}return{x:p,y:m,placement:O,strategy:r,middlewareData:v}};async function nu(n,e){var t;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:a,elements:c,strategy:u}=n,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:O=!1,padding:v=0}=Jr(e,n),b=yT(v),w=c[O?m==="floating"?"reference":"floating":m],k=xd(await s.getClippingRect({element:(t=await(s.isElement==null?void 0:s.isElement(w)))==null||t?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:u})),T=m==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),$=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},R=xd(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:A,strategy:u}):T);return{top:(k.top-R.top+b.top)/$.y,bottom:(R.bottom-k.bottom+b.bottom)/$.y,left:(k.left-R.left+b.left)/$.x,right:(R.right-k.right+b.right)/$.x}}const r7=n=>({name:"arrow",options:n,async fn(e){const{x:t,y:i,placement:r,rects:s,platform:a,elements:c,middlewareData:u}=e,{element:h,padding:p=0}=Jr(n,e)||{};if(h==null)return{};const m=yT(p),O={x:t,y:i},v=Ly(r),b=Xy(v),x=await a.getDimensions(h),w=v==="y",k=w?"top":"left",T=w?"bottom":"right",A=w?"clientHeight":"clientWidth",$=s.reference[b]+s.reference[v]-O[v]-s.floating[b],R=O[v]-s.reference[v],_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(h));let D=_?_[A]:0;(!D||!await(a.isElement==null?void 0:a.isElement(_)))&&(D=c.floating[A]||s.floating[b]);const j=$/2-R/2,Y=D/2-x[b]/2-1,J=Ns(m[k],Y),I=Ns(m[T],Y),W=J,ae=D-x[b]-I,le=D/2-x[b]/2+j,ce=o0(W,le,ae),Z=!u.arrow&&bl(r)!=null&&le!==ce&&s.reference[b]/2-(le<W?J:I)-x[b]/2<0,U=Z?le<W?le-W:le-ae:0;return{[v]:O[v]+U,data:{[v]:ce,centerOffset:le-ce-U,...Z&&{alignmentOffset:U}},reset:Z}}}),s7=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,i;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:u,elements:h}=e,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:O,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...w}=Jr(n,e);if((t=s.arrow)!=null&&t.alignmentOffset)return{};const k=es(r),T=Zs(c),A=es(c)===c,$=await(u.isRTL==null?void 0:u.isRTL(h.floating)),R=O||(A||!x?[bd(c)]:JN(c)),_=b!=="none";!O&&_&&R.push(...t7(c,x,b,$));const D=[c,...R],j=await nu(e,w),Y=[];let J=((i=s.flip)==null?void 0:i.overflows)||[];if(p&&Y.push(j[k]),m){const le=KN(r,a,$);Y.push(j[le[0]],j[le[1]])}if(J=[...J,{placement:r,overflows:Y}],!Y.every(le=>le<=0)){var I,W;const le=(((I=s.flip)==null?void 0:I.index)||0)+1,ce=D[le];if(ce)return{data:{index:le,overflows:J},reset:{placement:ce}};let Z=(W=J.filter(U=>U.overflows[0]<=0).sort((U,z)=>U.overflows[1]-z.overflows[1])[0])==null?void 0:W.placement;if(!Z)switch(v){case"bestFit":{var ae;const U=(ae=J.filter(z=>{if(_){const K=Zs(z.placement);return K===T||K==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(K=>K>0).reduce((K,E)=>K+E,0)]).sort((z,K)=>z[1]-K[1])[0])==null?void 0:ae[0];U&&(Z=U);break}case"initialPlacement":Z=c;break}if(r!==Z)return{reset:{placement:Z}}}return{}}}};function Bw(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Vw(n){return WN.some(e=>n[e]>=0)}const o7=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:i="referenceHidden",...r}=Jr(n,e);switch(i){case"referenceHidden":{const s=await nu(e,{...r,elementContext:"reference"}),a=Bw(s,t.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Vw(a)}}}case"escaped":{const s=await nu(e,{...r,altBoundary:!0}),a=Bw(s,t.floating);return{data:{escapedOffsets:a,escaped:Vw(a)}}}default:return{}}}}};async function a7(n,e){const{placement:t,platform:i,elements:r}=n,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),a=es(t),c=bl(t),u=Zs(t)==="y",h=["left","top"].includes(a)?-1:1,p=s&&u?-1:1,m=Jr(e,n);let{mainAxis:O,crossAxis:v,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof b=="number"&&(v=c==="end"?b*-1:b),u?{x:v*p,y:O*h}:{x:O*h,y:v*p}}const l7=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,i;const{x:r,y:s,placement:a,middlewareData:c}=e,u=await a7(e,n);return a===((t=c.offset)==null?void 0:t.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:a}}}}},c7=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:k,y:T}=w;return{x:k,y:T}}},...u}=Jr(n,e),h={x:t,y:i},p=await nu(e,u),m=Zs(es(r)),O=Zy(m);let v=h[O],b=h[m];if(s){const w=O==="y"?"top":"left",k=O==="y"?"bottom":"right",T=v+p[w],A=v-p[k];v=o0(T,v,A)}if(a){const w=m==="y"?"top":"left",k=m==="y"?"bottom":"right",T=b+p[w],A=b-p[k];b=o0(T,b,A)}const x=c.fn({...e,[O]:v,[m]:b});return{...x,data:{x:x.x-t,y:x.y-i,enabled:{[O]:s,[m]:a}}}}}},u7=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:i,placement:r,rects:s,middlewareData:a}=e,{offset:c=0,mainAxis:u=!0,crossAxis:h=!0}=Jr(n,e),p={x:t,y:i},m=Zs(r),O=Zy(m);let v=p[O],b=p[m];const x=Jr(c,e),w=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const A=O==="y"?"height":"width",$=s.reference[O]-s.floating[A]+w.mainAxis,R=s.reference[O]+s.reference[A]-w.mainAxis;v<$?v=$:v>R&&(v=R)}if(h){var k,T;const A=O==="y"?"width":"height",$=["top","left"].includes(es(r)),R=s.reference[m]-s.floating[A]+($&&((k=a.offset)==null?void 0:k[m])||0)+($?0:w.crossAxis),_=s.reference[m]+s.reference[A]+($?0:((T=a.offset)==null?void 0:T[m])||0)-($?w.crossAxis:0);b<R?b=R:b>_&&(b=_)}return{[O]:v,[m]:b}}}},f7=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){var t,i;const{placement:r,rects:s,platform:a,elements:c}=e,{apply:u=()=>{},...h}=Jr(n,e),p=await nu(e,h),m=es(r),O=bl(r),v=Zs(r)==="y",{width:b,height:x}=s.floating;let w,k;m==="top"||m==="bottom"?(w=m,k=O===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(k=m,w=O==="end"?"top":"bottom");const T=x-p.top-p.bottom,A=b-p.left-p.right,$=Ns(x-p[w],T),R=Ns(b-p[k],A),_=!e.middlewareData.shift;let D=$,j=R;if((t=e.middlewareData.shift)!=null&&t.enabled.x&&(j=A),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(D=T),_&&!O){const J=In(p.left,0),I=In(p.right,0),W=In(p.top,0),ae=In(p.bottom,0);v?j=b-2*(J!==0||I!==0?J+I:In(p.left,p.right)):D=x-2*(W!==0||ae!==0?W+ae:In(p.top,p.bottom))}await u({...e,availableWidth:j,availableHeight:D});const Y=await a.getDimensions(c.floating);return b!==Y.width||x!==Y.height?{reset:{rects:!0}}:{}}}};function cp(){return typeof window<"u"}function xl(n){return vT(n)?(n.nodeName||"").toLowerCase():"#document"}function Hn(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function vr(n){var e;return(e=(vT(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function vT(n){return cp()?n instanceof Node||n instanceof Hn(n).Node:!1}function Ei(n){return cp()?n instanceof Element||n instanceof Hn(n).Element:!1}function dr(n){return cp()?n instanceof HTMLElement||n instanceof Hn(n).HTMLElement:!1}function Yw(n){return!cp()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Hn(n).ShadowRoot}function _u(n){const{overflow:e,overflowX:t,overflowY:i,display:r}=_i(n);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!["inline","contents"].includes(r)}function h7(n){return["table","td","th"].includes(xl(n))}function up(n){return[":popover-open",":modal"].some(e=>{try{return n.matches(e)}catch{return!1}})}function zy(n){const e=qy(),t=Ei(n)?_i(n):n;return["transform","translate","scale","rotate","perspective"].some(i=>t[i]?t[i]!=="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(i=>(t.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(t.contain||"").includes(i))}function d7(n){let e=Xs(n);for(;dr(e)&&!tl(e);){if(zy(e))return e;if(up(e))return null;e=Xs(e)}return null}function qy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function tl(n){return["html","body","#document"].includes(xl(n))}function _i(n){return Hn(n).getComputedStyle(n)}function fp(n){return Ei(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Xs(n){if(xl(n)==="html")return n;const e=n.assignedSlot||n.parentNode||Yw(n)&&n.host||vr(n);return Yw(e)?e.host:e}function bT(n){const e=Xs(n);return tl(e)?n.ownerDocument?n.ownerDocument.body:n.body:dr(e)&&_u(e)?e:bT(e)}function iu(n,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=bT(n),s=r===((i=n.ownerDocument)==null?void 0:i.body),a=Hn(r);if(s){const c=l0(a);return e.concat(a,a.visualViewport||[],_u(r)?r:[],c&&t?iu(c):[])}return e.concat(r,iu(r,[],t))}function l0(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function xT(n){const e=_i(n);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=dr(n),s=r?n.offsetWidth:t,a=r?n.offsetHeight:i,c=vd(t)!==s||vd(i)!==a;return c&&(t=s,i=a),{width:t,height:i,$:c}}function By(n){return Ei(n)?n:n.contextElement}function Va(n){const e=By(n);if(!dr(e))return cr(1);const t=e.getBoundingClientRect(),{width:i,height:r,$:s}=xT(e);let a=(s?vd(t.width):t.width)/i,c=(s?vd(t.height):t.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const p7=cr(0);function ST(n){const e=Hn(n);return!qy()||!e.visualViewport?p7:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function m7(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Hn(n)?!1:e}function Co(n,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),s=By(n);let a=cr(1);e&&(i?Ei(i)&&(a=Va(i)):a=Va(n));const c=m7(s,t,i)?ST(s):cr(0);let u=(r.left+c.x)/a.x,h=(r.top+c.y)/a.y,p=r.width/a.x,m=r.height/a.y;if(s){const O=Hn(s),v=i&&Ei(i)?Hn(i):i;let b=O,x=l0(b);for(;x&&i&&v!==b;){const w=Va(x),k=x.getBoundingClientRect(),T=_i(x),A=k.left+(x.clientLeft+parseFloat(T.paddingLeft))*w.x,$=k.top+(x.clientTop+parseFloat(T.paddingTop))*w.y;u*=w.x,h*=w.y,p*=w.x,m*=w.y,u+=A,h+=$,b=Hn(x),x=l0(b)}}return xd({width:p,height:m,x:u,y:h})}function Vy(n,e){const t=fp(n).scrollLeft;return e?e.left+t:Co(vr(n)).left+t}function wT(n,e,t){t===void 0&&(t=!1);const i=n.getBoundingClientRect(),r=i.left+e.scrollLeft-(t?0:Vy(n,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function g7(n){let{elements:e,rect:t,offsetParent:i,strategy:r}=n;const s=r==="fixed",a=vr(i),c=e?up(e.floating):!1;if(i===a||c&&s)return t;let u={scrollLeft:0,scrollTop:0},h=cr(1);const p=cr(0),m=dr(i);if((m||!m&&!s)&&((xl(i)!=="body"||_u(a))&&(u=fp(i)),dr(i))){const v=Co(i);h=Va(i),p.x=v.x+i.clientLeft,p.y=v.y+i.clientTop}const O=a&&!m&&!s?wT(a,u,!0):cr(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-u.scrollLeft*h.x+p.x+O.x,y:t.y*h.y-u.scrollTop*h.y+p.y+O.y}}function O7(n){return Array.from(n.getClientRects())}function y7(n){const e=vr(n),t=fp(n),i=n.ownerDocument.body,r=In(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=In(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-t.scrollLeft+Vy(n);const c=-t.scrollTop;return _i(i).direction==="rtl"&&(a+=In(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:c}}function v7(n,e){const t=Hn(n),i=vr(n),r=t.visualViewport;let s=i.clientWidth,a=i.clientHeight,c=0,u=0;if(r){s=r.width,a=r.height;const h=qy();(!h||h&&e==="fixed")&&(c=r.offsetLeft,u=r.offsetTop)}return{width:s,height:a,x:c,y:u}}function b7(n,e){const t=Co(n,!0,e==="fixed"),i=t.top+n.clientTop,r=t.left+n.clientLeft,s=dr(n)?Va(n):cr(1),a=n.clientWidth*s.x,c=n.clientHeight*s.y,u=r*s.x,h=i*s.y;return{width:a,height:c,x:u,y:h}}function Uw(n,e,t){let i;if(e==="viewport")i=v7(n,t);else if(e==="document")i=y7(vr(n));else if(Ei(e))i=b7(e,t);else{const r=ST(n);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return xd(i)}function kT(n,e){const t=Xs(n);return t===e||!Ei(t)||tl(t)?!1:_i(t).position==="fixed"||kT(t,e)}function x7(n,e){const t=e.get(n);if(t)return t;let i=iu(n,[],!1).filter(c=>Ei(c)&&xl(c)!=="body"),r=null;const s=_i(n).position==="fixed";let a=s?Xs(n):n;for(;Ei(a)&&!tl(a);){const c=_i(a),u=zy(a);!u&&c.position==="fixed"&&(r=null),(s?!u&&!r:!u&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||_u(a)&&!u&&kT(n,a))?i=i.filter(p=>p!==a):r=c,a=Xs(a)}return e.set(n,i),i}function S7(n){let{element:e,boundary:t,rootBoundary:i,strategy:r}=n;const a=[...t==="clippingAncestors"?up(e)?[]:x7(e,this._c):[].concat(t),i],c=a[0],u=a.reduce((h,p)=>{const m=Uw(e,p,r);return h.top=In(m.top,h.top),h.right=Ns(m.right,h.right),h.bottom=Ns(m.bottom,h.bottom),h.left=In(m.left,h.left),h},Uw(e,c,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function w7(n){const{width:e,height:t}=xT(n);return{width:e,height:t}}function k7(n,e,t){const i=dr(e),r=vr(e),s=t==="fixed",a=Co(n,!0,s,e);let c={scrollLeft:0,scrollTop:0};const u=cr(0);if(i||!i&&!s)if((xl(e)!=="body"||_u(r))&&(c=fp(e)),i){const O=Co(e,!0,s,e);u.x=O.x+e.clientLeft,u.y=O.y+e.clientTop}else r&&(u.x=Vy(r));const h=r&&!i&&!s?wT(r,c):cr(0),p=a.left+c.scrollLeft-u.x-h.x,m=a.top+c.scrollTop-u.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function eO(n){return _i(n).position==="static"}function Gw(n,e){if(!dr(n)||_i(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return vr(n)===t&&(t=t.ownerDocument.body),t}function QT(n,e){const t=Hn(n);if(up(n))return t;if(!dr(n)){let r=Xs(n);for(;r&&!tl(r);){if(Ei(r)&&!eO(r))return r;r=Xs(r)}return t}let i=Gw(n,e);for(;i&&h7(i)&&eO(i);)i=Gw(i,e);return i&&tl(i)&&eO(i)&&!zy(i)?t:i||d7(n)||t}const Q7=async function(n){const e=this.getOffsetParent||QT,t=this.getDimensions,i=await t(n.floating);return{reference:k7(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function C7(n){return _i(n).direction==="rtl"}const T7={convertOffsetParentRelativeRectToViewportRelativeRect:g7,getDocumentElement:vr,getClippingRect:S7,getOffsetParent:QT,getElementRects:Q7,getClientRects:O7,getDimensions:w7,getScale:Va,isElement:Ei,isRTL:C7};function CT(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function P7(n,e){let t=null,i;const r=vr(n);function s(){var c;clearTimeout(i),(c=t)==null||c.disconnect(),t=null}function a(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),s();const h=n.getBoundingClientRect(),{left:p,top:m,width:O,height:v}=h;if(c||e(),!O||!v)return;const b=yh(m),x=yh(r.clientWidth-(p+O)),w=yh(r.clientHeight-(m+v)),k=yh(p),A={rootMargin:-b+"px "+-x+"px "+-w+"px "+-k+"px",threshold:In(0,Ns(1,u))||1};let $=!0;function R(_){const D=_[0].intersectionRatio;if(D!==u){if(!$)return a();D?a(!1,D):i=setTimeout(()=>{a(!1,1e-7)},1e3)}D===1&&!CT(h,n.getBoundingClientRect())&&a(),$=!1}try{t=new IntersectionObserver(R,{...A,root:r.ownerDocument})}catch{t=new IntersectionObserver(R,A)}t.observe(n)}return a(!0),s}function A7(n,e,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,h=By(n),p=r||s?[...h?iu(h):[],...iu(e)]:[];p.forEach(k=>{r&&k.addEventListener("scroll",t,{passive:!0}),s&&k.addEventListener("resize",t)});const m=h&&c?P7(h,t):null;let O=-1,v=null;a&&(v=new ResizeObserver(k=>{let[T]=k;T&&T.target===h&&v&&(v.unobserve(e),cancelAnimationFrame(O),O=requestAnimationFrame(()=>{var A;(A=v)==null||A.observe(e)})),t()}),h&&!u&&v.observe(h),v.observe(e));let b,x=u?Co(n):null;u&&w();function w(){const k=Co(n);x&&!CT(x,k)&&t(),x=k,b=requestAnimationFrame(w)}return t(),()=>{var k;p.forEach(T=>{r&&T.removeEventListener("scroll",t),s&&T.removeEventListener("resize",t)}),m?.(),(k=v)==null||k.disconnect(),v=null,u&&cancelAnimationFrame(b)}}const M7=l7,R7=c7,$7=s7,E7=f7,_7=o7,Iw=r7,D7=u7,j7=(n,e,t)=>{const i=new Map,r={platform:T7,...t},s={...r.platform,_c:i};return i7(n,e,{...r,platform:s})};var Jh=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Sd(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,i,r;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(i=t;i--!==0;)if(!Sd(n[i],e[i]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(e).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(e,r[i]))return!1;for(i=t;i--!==0;){const s=r[i];if(!(s==="_owner"&&n.$$typeof)&&!Sd(n[s],e[s]))return!1}return!0}return n!==n&&e!==e}function TT(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Ww(n,e){const t=TT(n);return Math.round(e*t)/t}function tO(n){const e=C.useRef(n);return Jh(()=>{e.current=n}),e}function N7(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:u,open:h}=n,[p,m]=C.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[O,v]=C.useState(i);Sd(O,i)||v(i);const[b,x]=C.useState(null),[w,k]=C.useState(null),T=C.useCallback(z=>{z!==_.current&&(_.current=z,x(z))},[]),A=C.useCallback(z=>{z!==D.current&&(D.current=z,k(z))},[]),$=s||b,R=a||w,_=C.useRef(null),D=C.useRef(null),j=C.useRef(p),Y=u!=null,J=tO(u),I=tO(r),W=tO(h),ae=C.useCallback(()=>{if(!_.current||!D.current)return;const z={placement:e,strategy:t,middleware:O};I.current&&(z.platform=I.current),j7(_.current,D.current,z).then(K=>{const E={...K,isPositioned:W.current!==!1};le.current&&!Sd(j.current,E)&&(j.current=E,Cy.flushSync(()=>{m(E)}))})},[O,e,t,I,W]);Jh(()=>{h===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,m(z=>({...z,isPositioned:!1})))},[h]);const le=C.useRef(!1);Jh(()=>(le.current=!0,()=>{le.current=!1}),[]),Jh(()=>{if($&&(_.current=$),R&&(D.current=R),$&&R){if(J.current)return J.current($,R,ae);ae()}},[$,R,ae,J,Y]);const ce=C.useMemo(()=>({reference:_,floating:D,setReference:T,setFloating:A}),[T,A]),Z=C.useMemo(()=>({reference:$,floating:R}),[$,R]),U=C.useMemo(()=>{const z={position:t,left:0,top:0};if(!Z.floating)return z;const K=Ww(Z.floating,p.x),E=Ww(Z.floating,p.y);return c?{...z,transform:"translate("+K+"px, "+E+"px)",...TT(Z.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:K,top:E}},[t,c,Z.floating,p.x,p.y]);return C.useMemo(()=>({...p,update:ae,refs:ce,elements:Z,floatingStyles:U}),[p,ae,ce,Z,U])}const Z7=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:i,padding:r}=typeof n=="function"?n(t):n;return i&&e(i)?i.current!=null?Iw({element:i.current,padding:r}).fn(t):{}:i?Iw({element:i,padding:r}).fn(t):{}}}},X7=(n,e)=>({...M7(n),options:[n,e]}),L7=(n,e)=>({...R7(n),options:[n,e]}),z7=(n,e)=>({...D7(n),options:[n,e]}),q7=(n,e)=>({...$7(n),options:[n,e]}),B7=(n,e)=>({...E7(n),options:[n,e]}),V7=(n,e)=>({..._7(n),options:[n,e]}),Y7=(n,e)=>({...Z7(n),options:[n,e]});var U7="Arrow",PT=C.forwardRef((n,e)=>{const{children:t,width:i=10,height:r=5,...s}=n;return S.jsx(ze.svg,{...s,ref:e,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?t:S.jsx("polygon",{points:"0,0 30,0 15,10"})})});PT.displayName=U7;var G7=PT,Yy="Popper",[AT,MT]=Zi(Yy),[I7,RT]=AT(Yy),$T=n=>{const{__scopePopper:e,children:t}=n,[i,r]=C.useState(null);return S.jsx(I7,{scope:e,anchor:i,onAnchorChange:r,children:t})};$T.displayName=Yy;var ET="PopperAnchor",_T=C.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:i,...r}=n,s=RT(ET,t),a=C.useRef(null),c=Rt(e,a);return C.useEffect(()=>{s.onAnchorChange(i?.current||a.current)}),i?null:S.jsx(ze.div,{...r,ref:c})});_T.displayName=ET;var Uy="PopperContent",[W7,H7]=AT(Uy),DT=C.forwardRef((n,e)=>{const{__scopePopper:t,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:O=!1,updatePositionStrategy:v="optimized",onPlaced:b,...x}=n,w=RT(Uy,t),[k,T]=C.useState(null),A=Rt(e,de=>T(de)),[$,R]=C.useState(null),_=SC($),D=_?.width??0,j=_?.height??0,Y=i+(s!=="center"?"-"+s:""),J=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(h)?h:[h],W=I.length>0,ae={padding:J,boundary:I.filter(K7),altBoundary:W},{refs:le,floatingStyles:ce,placement:Z,isPositioned:U,middlewareData:z}=N7({strategy:"fixed",placement:Y,whileElementsMounted:(...de)=>A7(...de,{animationFrame:v==="always"}),elements:{reference:w.anchor},middleware:[X7({mainAxis:r+j,alignmentAxis:a}),u&&L7({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?z7():void 0,...ae}),u&&q7({...ae}),B7({...ae,apply:({elements:de,rects:ke,availableWidth:Ue,availableHeight:We})=>{const{width:Le,height:me}=ke.reference,je=de.floating.style;je.setProperty("--radix-popper-available-width",`${Ue}px`),je.setProperty("--radix-popper-available-height",`${We}px`),je.setProperty("--radix-popper-anchor-width",`${Le}px`),je.setProperty("--radix-popper-anchor-height",`${me}px`)}}),$&&Y7({element:$,padding:c}),J7({arrowWidth:D,arrowHeight:j}),O&&V7({strategy:"referenceHidden",...ae})]}),[K,E]=ZT(Z),q=Kr(b);Fr(()=>{U&&q?.()},[U,q]);const te=z.arrow?.x,F=z.arrow?.y,oe=z.arrow?.centerOffset!==0,[xe,ue]=C.useState();return Fr(()=>{k&&ue(window.getComputedStyle(k).zIndex)},[k]),S.jsx("div",{ref:le.setFloating,"data-radix-popper-content-wrapper":"",style:{...ce,transform:U?ce.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[z.transformOrigin?.x,z.transformOrigin?.y].join(" "),...z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:S.jsx(W7,{scope:t,placedSide:K,onArrowChange:R,arrowX:te,arrowY:F,shouldHideArrow:oe,children:S.jsx(ze.div,{"data-side":K,"data-align":E,...x,ref:A,style:{...x.style,animation:U?void 0:"none"}})})})});DT.displayName=Uy;var jT="PopperArrow",F7={top:"bottom",right:"left",bottom:"top",left:"right"},NT=C.forwardRef(function(e,t){const{__scopePopper:i,...r}=e,s=H7(jT,i),a=F7[s.placedSide];return S.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:S.jsx(G7,{...r,ref:t,style:{...r.style,display:"block"}})})});NT.displayName=jT;function K7(n){return n!==null}var J7=n=>({name:"transformOrigin",options:n,fn(e){const{placement:t,rects:i,middlewareData:r}=e,a=r.arrow?.centerOffset!==0,c=a?0:n.arrowWidth,u=a?0:n.arrowHeight,[h,p]=ZT(t),m={start:"0%",center:"50%",end:"100%"}[p],O=(r.arrow?.x??0)+c/2,v=(r.arrow?.y??0)+u/2;let b="",x="";return h==="bottom"?(b=a?m:`${O}px`,x=`${-u}px`):h==="top"?(b=a?m:`${O}px`,x=`${i.floating.height+u}px`):h==="right"?(b=`${-u}px`,x=a?m:`${v}px`):h==="left"&&(b=`${i.floating.width+u}px`,x=a?m:`${v}px`),{data:{x:b,y:x}}}});function ZT(n){const[e,t="center"]=n.split("-");return[e,t]}var eZ=$T,tZ=_T,nZ=DT,iZ=NT,nO="rovingFocusGroup.onEntryFocus",rZ={bubbles:!1,cancelable:!0},Du="RovingFocusGroup",[c0,XT,sZ]=Ny(Du),[oZ,Sl]=Zi(Du,[sZ]),[aZ,lZ]=oZ(Du),LT=C.forwardRef((n,e)=>S.jsx(c0.Provider,{scope:n.__scopeRovingFocusGroup,children:S.jsx(c0.Slot,{scope:n.__scopeRovingFocusGroup,children:S.jsx(cZ,{...n,ref:e})})}));LT.displayName=Du;var cZ=C.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,orientation:i,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...m}=n,O=C.useRef(null),v=Rt(e,O),b=Eu(s),[x,w]=Xi({prop:a,defaultProp:c??null,onChange:u,caller:Du}),[k,T]=C.useState(!1),A=Kr(h),$=XT(t),R=C.useRef(!1),[_,D]=C.useState(0);return C.useEffect(()=>{const j=O.current;if(j)return j.addEventListener(nO,A),()=>j.removeEventListener(nO,A)},[A]),S.jsx(aZ,{scope:t,orientation:i,dir:b,loop:r,currentTabStopId:x,onItemFocus:C.useCallback(j=>w(j),[w]),onItemShiftTab:C.useCallback(()=>T(!0),[]),onFocusableItemAdd:C.useCallback(()=>D(j=>j+1),[]),onFocusableItemRemove:C.useCallback(()=>D(j=>j-1),[]),children:S.jsx(ze.div,{tabIndex:k||_===0?-1:0,"data-orientation":i,...m,ref:v,style:{outline:"none",...n.style},onMouseDown:Ae(n.onMouseDown,()=>{R.current=!0}),onFocus:Ae(n.onFocus,j=>{const Y=!R.current;if(j.target===j.currentTarget&&Y&&!k){const J=new CustomEvent(nO,rZ);if(j.currentTarget.dispatchEvent(J),!J.defaultPrevented){const I=$().filter(Z=>Z.focusable),W=I.find(Z=>Z.active),ae=I.find(Z=>Z.id===x),ce=[W,ae,...I].filter(Boolean).map(Z=>Z.ref.current);BT(ce,p)}}R.current=!1}),onBlur:Ae(n.onBlur,()=>T(!1))})})}),zT="RovingFocusGroupItem",qT=C.forwardRef((n,e)=>{const{__scopeRovingFocusGroup:t,focusable:i=!0,active:r=!1,tabStopId:s,children:a,...c}=n,u=Ir(),h=s||u,p=lZ(zT,t),m=p.currentTabStopId===h,O=XT(t),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:x}=p;return C.useEffect(()=>{if(i)return v(),()=>b()},[i,v,b]),S.jsx(c0.ItemSlot,{scope:t,id:h,focusable:i,active:r,children:S.jsx(ze.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:e,onMouseDown:Ae(n.onMouseDown,w=>{i?p.onItemFocus(h):w.preventDefault()}),onFocus:Ae(n.onFocus,()=>p.onItemFocus(h)),onKeyDown:Ae(n.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){p.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const k=hZ(w,p.orientation,p.dir);if(k!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let A=O().filter($=>$.focusable).map($=>$.ref.current);if(k==="last")A.reverse();else if(k==="prev"||k==="next"){k==="prev"&&A.reverse();const $=A.indexOf(w.currentTarget);A=p.loop?dZ(A,$+1):A.slice($+1)}setTimeout(()=>BT(A))}}),children:typeof a=="function"?a({isCurrentTabStop:m,hasTabStop:x!=null}):a})})});qT.displayName=zT;var uZ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fZ(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function hZ(n,e,t){const i=fZ(n.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return uZ[i]}function BT(n,e=!1){const t=document.activeElement;for(const i of n)if(i===t||(i.focus({preventScroll:e}),document.activeElement!==t))return}function dZ(n,e){return n.map((t,i)=>n[(e+i)%n.length])}var Gy=LT,Iy=qT,u0=["Enter"," "],pZ=["ArrowDown","PageUp","Home"],VT=["ArrowUp","PageDown","End"],mZ=[...pZ,...VT],gZ={ltr:[...u0,"ArrowRight"],rtl:[...u0,"ArrowLeft"]},OZ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ju="Menu",[ru,yZ,vZ]=Ny(ju),[Zo,YT]=Zi(ju,[vZ,MT,Sl]),hp=MT(),UT=Sl(),[bZ,Xo]=Zo(ju),[xZ,Nu]=Zo(ju),GT=n=>{const{__scopeMenu:e,open:t=!1,children:i,dir:r,onOpenChange:s,modal:a=!0}=n,c=hp(e),[u,h]=C.useState(null),p=C.useRef(!1),m=Kr(s),O=Eu(r);return C.useEffect(()=>{const v=()=>{p.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>p.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),S.jsx(eZ,{...c,children:S.jsx(bZ,{scope:e,open:t,onOpenChange:m,content:u,onContentChange:h,children:S.jsx(xZ,{scope:e,onClose:C.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:p,dir:O,modal:a,children:i})})})};GT.displayName=ju;var SZ="MenuAnchor",Wy=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n,r=hp(t);return S.jsx(tZ,{...r,...i,ref:e})});Wy.displayName=SZ;var Hy="MenuPortal",[wZ,IT]=Zo(Hy,{forceMount:void 0}),WT=n=>{const{__scopeMenu:e,forceMount:t,children:i,container:r}=n,s=Xo(Hy,e);return S.jsx(wZ,{scope:e,forceMount:t,children:S.jsx(yr,{present:t||s.open,children:S.jsx($y,{asChild:!0,container:r,children:i})})})};WT.displayName=Hy;var yi="MenuContent",[kZ,Fy]=Zo(yi),HT=C.forwardRef((n,e)=>{const t=IT(yi,n.__scopeMenu),{forceMount:i=t.forceMount,...r}=n,s=Xo(yi,n.__scopeMenu),a=Nu(yi,n.__scopeMenu);return S.jsx(ru.Provider,{scope:n.__scopeMenu,children:S.jsx(yr,{present:i||s.open,children:S.jsx(ru.Slot,{scope:n.__scopeMenu,children:a.modal?S.jsx(QZ,{...r,ref:e}):S.jsx(CZ,{...r,ref:e})})})})}),QZ=C.forwardRef((n,e)=>{const t=Xo(yi,n.__scopeMenu),i=C.useRef(null),r=Rt(e,i);return C.useEffect(()=>{const s=i.current;if(s)return nT(s)},[]),S.jsx(Ky,{...n,ref:r,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:Ae(n.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),CZ=C.forwardRef((n,e)=>{const t=Xo(yi,n.__scopeMenu);return S.jsx(Ky,{...n,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),TZ=el("MenuContent.ScrollLock"),Ky=C.forwardRef((n,e)=>{const{__scopeMenu:t,loop:i=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:O,onDismiss:v,disableOutsideScroll:b,...x}=n,w=Xo(yi,t),k=Nu(yi,t),T=hp(t),A=UT(t),$=yZ(t),[R,_]=C.useState(null),D=C.useRef(null),j=Rt(e,D,w.onContentChange),Y=C.useRef(0),J=C.useRef(""),I=C.useRef(0),W=C.useRef(null),ae=C.useRef("right"),le=C.useRef(0),ce=b?Ey:C.Fragment,Z=b?{as:TZ,allowPinchZoom:!0}:void 0,U=K=>{const E=J.current+K,q=$().filter(de=>!de.disabled),te=document.activeElement,F=q.find(de=>de.ref.current===te)?.textValue,oe=q.map(de=>de.textValue),xe=XZ(oe,E,F),ue=q.find(de=>de.textValue===xe)?.ref.current;(function de(ke){J.current=ke,window.clearTimeout(Y.current),ke!==""&&(Y.current=window.setTimeout(()=>de(""),1e3))})(E),ue&&setTimeout(()=>ue.focus())};C.useEffect(()=>()=>window.clearTimeout(Y.current),[]),GC();const z=C.useCallback(K=>ae.current===W.current?.side&&zZ(K,W.current?.area),[]);return S.jsx(kZ,{scope:t,searchRef:J,onItemEnter:C.useCallback(K=>{z(K)&&K.preventDefault()},[z]),onItemLeave:C.useCallback(K=>{z(K)||(D.current?.focus(),_(null))},[z]),onTriggerLeave:C.useCallback(K=>{z(K)&&K.preventDefault()},[z]),pointerGraceTimerRef:I,onPointerGraceIntentChange:C.useCallback(K=>{W.current=K},[]),children:S.jsx(ce,{...Z,children:S.jsx(Ry,{asChild:!0,trapped:r,onMountAutoFocus:Ae(s,K=>{K.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:S.jsx(My,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:h,onPointerDownOutside:p,onFocusOutside:m,onInteractOutside:O,onDismiss:v,children:S.jsx(Gy,{asChild:!0,...A,dir:k.dir,orientation:"vertical",loop:i,currentTabStopId:R,onCurrentTabStopIdChange:_,onEntryFocus:Ae(u,K=>{k.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:S.jsx(nZ,{role:"menu","aria-orientation":"vertical","data-state":hP(w.open),"data-radix-menu-content":"",dir:k.dir,...T,...x,ref:j,style:{outline:"none",...x.style},onKeyDown:Ae(x.onKeyDown,K=>{const q=K.target.closest("[data-radix-menu-content]")===K.currentTarget,te=K.ctrlKey||K.altKey||K.metaKey,F=K.key.length===1;q&&(K.key==="Tab"&&K.preventDefault(),!te&&F&&U(K.key));const oe=D.current;if(K.target!==oe||!mZ.includes(K.key))return;K.preventDefault();const ue=$().filter(de=>!de.disabled).map(de=>de.ref.current);VT.includes(K.key)&&ue.reverse(),NZ(ue)}),onBlur:Ae(n.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(Y.current),J.current="")}),onPointerMove:Ae(n.onPointerMove,su(K=>{const E=K.target,q=le.current!==K.clientX;if(K.currentTarget.contains(E)&&q){const te=K.clientX>le.current?"right":"left";ae.current=te,le.current=K.clientX}}))})})})})})})});HT.displayName=yi;var PZ="MenuGroup",Jy=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return S.jsx(ze.div,{role:"group",...i,ref:e})});Jy.displayName=PZ;var AZ="MenuLabel",FT=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return S.jsx(ze.div,{...i,ref:e})});FT.displayName=AZ;var wd="MenuItem",Hw="menu.itemSelect",dp=C.forwardRef((n,e)=>{const{disabled:t=!1,onSelect:i,...r}=n,s=C.useRef(null),a=Nu(wd,n.__scopeMenu),c=Fy(wd,n.__scopeMenu),u=Rt(e,s),h=C.useRef(!1),p=()=>{const m=s.current;if(!t&&m){const O=new CustomEvent(Hw,{bubbles:!0,cancelable:!0});m.addEventListener(Hw,v=>i?.(v),{once:!0}),kC(m,O),O.defaultPrevented?h.current=!1:a.onClose()}};return S.jsx(KT,{...r,ref:u,disabled:t,onClick:Ae(n.onClick,p),onPointerDown:m=>{n.onPointerDown?.(m),h.current=!0},onPointerUp:Ae(n.onPointerUp,m=>{h.current||m.currentTarget?.click()}),onKeyDown:Ae(n.onKeyDown,m=>{const O=c.searchRef.current!=="";t||O&&m.key===" "||u0.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});dp.displayName=wd;var KT=C.forwardRef((n,e)=>{const{__scopeMenu:t,disabled:i=!1,textValue:r,...s}=n,a=Fy(wd,t),c=UT(t),u=C.useRef(null),h=Rt(e,u),[p,m]=C.useState(!1),[O,v]=C.useState("");return C.useEffect(()=>{const b=u.current;b&&v((b.textContent??"").trim())},[s.children]),S.jsx(ru.ItemSlot,{scope:t,disabled:i,textValue:r??O,children:S.jsx(Iy,{asChild:!0,...c,focusable:!i,children:S.jsx(ze.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...s,ref:h,onPointerMove:Ae(n.onPointerMove,su(b=>{i?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ae(n.onPointerLeave,su(b=>a.onItemLeave(b))),onFocus:Ae(n.onFocus,()=>m(!0)),onBlur:Ae(n.onBlur,()=>m(!1))})})})}),MZ="MenuCheckboxItem",JT=C.forwardRef((n,e)=>{const{checked:t=!1,onCheckedChange:i,...r}=n;return S.jsx(rP,{scope:n.__scopeMenu,checked:t,children:S.jsx(dp,{role:"menuitemcheckbox","aria-checked":kd(t)?"mixed":t,...r,ref:e,"data-state":tv(t),onSelect:Ae(r.onSelect,()=>i?.(kd(t)?!0:!t),{checkForDefaultPrevented:!1})})})});JT.displayName=MZ;var eP="MenuRadioGroup",[RZ,$Z]=Zo(eP,{value:void 0,onValueChange:()=>{}}),tP=C.forwardRef((n,e)=>{const{value:t,onValueChange:i,...r}=n,s=Kr(i);return S.jsx(RZ,{scope:n.__scopeMenu,value:t,onValueChange:s,children:S.jsx(Jy,{...r,ref:e})})});tP.displayName=eP;var nP="MenuRadioItem",iP=C.forwardRef((n,e)=>{const{value:t,...i}=n,r=$Z(nP,n.__scopeMenu),s=t===r.value;return S.jsx(rP,{scope:n.__scopeMenu,checked:s,children:S.jsx(dp,{role:"menuitemradio","aria-checked":s,...i,ref:e,"data-state":tv(s),onSelect:Ae(i.onSelect,()=>r.onValueChange?.(t),{checkForDefaultPrevented:!1})})})});iP.displayName=nP;var ev="MenuItemIndicator",[rP,EZ]=Zo(ev,{checked:!1}),sP=C.forwardRef((n,e)=>{const{__scopeMenu:t,forceMount:i,...r}=n,s=EZ(ev,t);return S.jsx(yr,{present:i||kd(s.checked)||s.checked===!0,children:S.jsx(ze.span,{...r,ref:e,"data-state":tv(s.checked)})})});sP.displayName=ev;var _Z="MenuSeparator",oP=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n;return S.jsx(ze.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});oP.displayName=_Z;var DZ="MenuArrow",aP=C.forwardRef((n,e)=>{const{__scopeMenu:t,...i}=n,r=hp(t);return S.jsx(iZ,{...r,...i,ref:e})});aP.displayName=DZ;var jZ="MenuSub",[LW,lP]=Zo(jZ),Dc="MenuSubTrigger",cP=C.forwardRef((n,e)=>{const t=Xo(Dc,n.__scopeMenu),i=Nu(Dc,n.__scopeMenu),r=lP(Dc,n.__scopeMenu),s=Fy(Dc,n.__scopeMenu),a=C.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=s,h={__scopeMenu:n.__scopeMenu},p=C.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return C.useEffect(()=>p,[p]),C.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),u(null)}},[c,u]),S.jsx(Wy,{asChild:!0,...h,children:S.jsx(KT,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":r.contentId,"data-state":hP(t.open),...n,ref:sp(e,r.onTriggerChange),onClick:m=>{n.onClick?.(m),!(n.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:Ae(n.onPointerMove,su(m=>{s.onItemEnter(m),!m.defaultPrevented&&!n.disabled&&!t.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{t.onOpenChange(!0),p()},100))})),onPointerLeave:Ae(n.onPointerLeave,su(m=>{p();const O=t.content?.getBoundingClientRect();if(O){const v=t.content?.dataset.side,b=v==="right",x=b?-5:5,w=O[b?"left":"right"],k=O[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:m.clientX+x,y:m.clientY},{x:w,y:O.top},{x:k,y:O.top},{x:k,y:O.bottom},{x:w,y:O.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(m),m.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Ae(n.onKeyDown,m=>{const O=s.searchRef.current!=="";n.disabled||O&&m.key===" "||gZ[i.dir].includes(m.key)&&(t.onOpenChange(!0),t.content?.focus(),m.preventDefault())})})})});cP.displayName=Dc;var uP="MenuSubContent",fP=C.forwardRef((n,e)=>{const t=IT(yi,n.__scopeMenu),{forceMount:i=t.forceMount,...r}=n,s=Xo(yi,n.__scopeMenu),a=Nu(yi,n.__scopeMenu),c=lP(uP,n.__scopeMenu),u=C.useRef(null),h=Rt(e,u);return S.jsx(ru.Provider,{scope:n.__scopeMenu,children:S.jsx(yr,{present:i||s.open,children:S.jsx(ru.Slot,{scope:n.__scopeMenu,children:S.jsx(Ky,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:h,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{a.isUsingKeyboardRef.current&&u.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Ae(n.onFocusOutside,p=>{p.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Ae(n.onEscapeKeyDown,p=>{a.onClose(),p.preventDefault()}),onKeyDown:Ae(n.onKeyDown,p=>{const m=p.currentTarget.contains(p.target),O=OZ[a.dir].includes(p.key);m&&O&&(s.onOpenChange(!1),c.trigger?.focus(),p.preventDefault())})})})})})});fP.displayName=uP;function hP(n){return n?"open":"closed"}function kd(n){return n==="indeterminate"}function tv(n){return kd(n)?"indeterminate":n?"checked":"unchecked"}function NZ(n){const e=document.activeElement;for(const t of n)if(t===e||(t.focus(),document.activeElement!==e))return}function ZZ(n,e){return n.map((t,i)=>n[(e+i)%n.length])}function XZ(n,e,t){const r=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,s=t?n.indexOf(t):-1;let a=ZZ(n,Math.max(s,0));r.length===1&&(a=a.filter(h=>h!==t));const u=a.find(h=>h.toLowerCase().startsWith(r.toLowerCase()));return u!==t?u:void 0}function LZ(n,e){const{x:t,y:i}=n;let r=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const c=e[s],u=e[a],h=c.x,p=c.y,m=u.x,O=u.y;p>i!=O>i&&t<(m-h)*(i-p)/(O-p)+h&&(r=!r)}return r}function zZ(n,e){if(!e)return!1;const t={x:n.clientX,y:n.clientY};return LZ(t,e)}function su(n){return e=>e.pointerType==="mouse"?n(e):void 0}var qZ=GT,BZ=Wy,VZ=WT,YZ=HT,UZ=Jy,GZ=FT,IZ=dp,WZ=JT,HZ=tP,FZ=iP,KZ=sP,JZ=oP,e6=aP,t6=cP,n6=fP,pp="DropdownMenu",[i6,zW]=Zi(pp,[YT]),xn=YT(),[r6,dP]=i6(pp),pP=n=>{const{__scopeDropdownMenu:e,children:t,dir:i,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=n,u=xn(e),h=C.useRef(null),[p,m]=Xi({prop:r,defaultProp:s??!1,onChange:a,caller:pp});return S.jsx(r6,{scope:e,triggerId:Ir(),triggerRef:h,contentId:Ir(),open:p,onOpenChange:m,onOpenToggle:C.useCallback(()=>m(O=>!O),[m]),modal:c,children:S.jsx(qZ,{...u,open:p,onOpenChange:m,dir:i,modal:c,children:t})})};pP.displayName=pp;var mP="DropdownMenuTrigger",gP=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,disabled:i=!1,...r}=n,s=dP(mP,t),a=xn(t);return S.jsx(BZ,{asChild:!0,...a,children:S.jsx(ze.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:sp(e,s.triggerRef),onPointerDown:Ae(n.onPointerDown,c=>{!i&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:Ae(n.onKeyDown,c=>{i||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});gP.displayName=mP;var s6="DropdownMenuPortal",OP=n=>{const{__scopeDropdownMenu:e,...t}=n,i=xn(e);return S.jsx(VZ,{...i,...t})};OP.displayName=s6;var yP="DropdownMenuContent",vP=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=dP(yP,t),s=xn(t),a=C.useRef(!1);return S.jsx(YZ,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...i,ref:e,onCloseAutoFocus:Ae(n.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:Ae(n.onInteractOutside,c=>{const u=c.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0,p=u.button===2||h;(!r.modal||p)&&(a.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vP.displayName=yP;var o6="DropdownMenuGroup",a6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(UZ,{...r,...i,ref:e})});a6.displayName=o6;var l6="DropdownMenuLabel",c6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(GZ,{...r,...i,ref:e})});c6.displayName=l6;var u6="DropdownMenuItem",bP=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(IZ,{...r,...i,ref:e})});bP.displayName=u6;var f6="DropdownMenuCheckboxItem",h6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(WZ,{...r,...i,ref:e})});h6.displayName=f6;var d6="DropdownMenuRadioGroup",p6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(HZ,{...r,...i,ref:e})});p6.displayName=d6;var m6="DropdownMenuRadioItem",g6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(FZ,{...r,...i,ref:e})});g6.displayName=m6;var O6="DropdownMenuItemIndicator",y6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(KZ,{...r,...i,ref:e})});y6.displayName=O6;var v6="DropdownMenuSeparator",b6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(JZ,{...r,...i,ref:e})});b6.displayName=v6;var x6="DropdownMenuArrow",S6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(e6,{...r,...i,ref:e})});S6.displayName=x6;var w6="DropdownMenuSubTrigger",k6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(t6,{...r,...i,ref:e})});k6.displayName=w6;var Q6="DropdownMenuSubContent",C6=C.forwardRef((n,e)=>{const{__scopeDropdownMenu:t,...i}=n,r=xn(t);return S.jsx(n6,{...r,...i,ref:e,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});C6.displayName=Q6;var T6=pP,P6=gP,A6=OP,M6=vP,R6=bP;function $6({...n}){return S.jsx(T6,{"data-slot":"dropdown-menu",...n})}function E6({...n}){return S.jsx(P6,{"data-slot":"dropdown-menu-trigger",...n})}function _6({className:n,sideOffset:e=4,...t}){return S.jsx(A6,{children:S.jsx(M6,{"data-slot":"dropdown-menu-content",sideOffset:e,className:Ie("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),...t})})}function D6({className:n,inset:e,variant:t="default",...i}){return S.jsx(R6,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":t,className:Ie("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...i})}function j6({option:n,value:e,onChange:t,disabled:i=!1}){const r=n.options.find(s=>s.value===e);return S.jsxs("div",{className:"space-y-2",children:[S.jsx(er,{className:"text-sm font-medium text-gray-300",children:n.label}),n.description&&S.jsx("p",{className:"text-xs text-gray-500",children:n.description}),S.jsxs($6,{children:[S.jsx(E6,{asChild:!0,children:S.jsxs(Oi,{variant:"outline",className:"w-full justify-between",disabled:i,children:[S.jsx("span",{children:r?.label||"Select option..."}),S.jsx(yC,{className:"h-4 w-4"})]})}),S.jsx(_6,{className:"w-full min-w-[200px]",children:n.options.map(s=>S.jsx(D6,{onClick:()=>t(s.value),className:e===s.value?"bg-accent":"",children:s.label},s.value))})]})]})}function N6({addOn:n,selectedOptions:e,onOptionChange:t,disabled:i=!1}){return!n.options||Object.keys(n.options).length===0?null:S.jsx("div",{className:"space-y-3",children:Object.entries(n.options).map(([r,s])=>s&&typeof s=="object"&&"type"in s&&s.type==="select"?S.jsx(j6,{option:s,value:e[r]||s.default,onChange:a=>t(r,a),disabled:i},r):null)})}function Z6({addOn:n,selectedOptions:e,onOptionChange:t,onClose:i,disabled:r=!1}){return n?S.jsx(jo,{open:!!n,onOpenChange:s=>!s&&i(),children:S.jsxs(No,{className:"sm:max-w-md",children:[S.jsxs(yl,{children:[S.jsxs(vl,{children:["Configure ",n.name]}),S.jsx(YN,{children:"Customize the configuration options for this add-on."})]}),S.jsx("div",{className:"py-4",children:S.jsx(N6,{addOn:n,selectedOptions:e,onOptionChange:t,disabled:r})})]})}):null}const Fw={toolchain:"Toolchain","add-on":"Add-on",deployment:"Deployment Adapter",example:"Example"};function X6(){const n=K_(),{availableAddOns:e,addOnState:t,toggleAddOn:i,setAddOnOption:r}=Au(),s=dn(m=>m.addOnOptions);console.log("showDeploymentOptions",n);const a=C.useMemo(()=>e.sort((m,O)=>{const v=m.priority??0,b=O.priority??0;return b!==v?b-v:m.name.localeCompare(O.name)}),[e]),[c,u]=C.useState(),[h,p]=C.useState();return S.jsxs(S.Fragment,{children:[S.jsx(GN,{addOn:c,onClose:()=>u(void 0)}),S.jsx(Z6,{addOn:h,selectedOptions:h?s[h.id]||{}:{},onOptionChange:(m,O)=>{h&&r(h.id,m,O)},onClose:()=>p(void 0),disabled:h?!t[h.id]?.enabled:!1}),S.jsx("div",{className:"max-h-[60vh] overflow-y-auto space-y-2",children:Object.keys(Fw).filter(m=>n?!0:m!=="deployment").map(m=>S.jsx(C.Fragment,{children:a.filter(O=>O.type===m).length>0&&S.jsxs("div",{className:"block p-4 bg-gray-500/10 hover:bg-gray-500/20 rounded-lg transition-colors space-y-4 active",children:[S.jsx("h3",{className:"font-medium",children:Fw[m]}),S.jsx("div",{className:"space-y-3",children:S.jsx("div",{className:"flex flex-row flex-wrap",children:a.filter(O=>O.type===m).map(O=>S.jsx("div",{className:"w-1/2",children:S.jsxs("div",{className:"flex flex-row items-center justify-between",children:[S.jsxs("div",{className:"p-1 flex flex-row items-center",children:[S.jsx(Ur,{id:O.id,checked:t[O.id].selected,disabled:!t[O.id].enabled,onCheckedChange:()=>{i(O.id)}}),S.jsxs(er,{htmlFor:O.id,className:"pl-2 font-semibold text-gray-300 flex items-center gap-2",children:[O.smallLogo&&S.jsx("img",{src:`data:image/svg+xml,${encodeURIComponent(O.smallLogo)}`,alt:O.name,className:"w-5"}),O.name]})]}),S.jsxs("div",{className:"flex items-center gap-1",children:[t[O.id].selected&&O.options&&Object.keys(O.options).length>0&&S.jsx(Oi,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-gray-600 hover:text-gray-400",onClick:()=>p(O),disabled:!t[O.id].enabled,children:S.jsx(DD,{className:"w-4 h-4"})}),S.jsx(xC,{className:"w-4 text-gray-600 cursor-pointer hover:text-gray-400",onClick:()=>u(O)})]})]})},O.id))})})]},`${m}-add-ons`)},m))}),S.jsx("div",{className:"mt-4",children:S.jsx(UN,{})})]})}const L6={file:ND,command:XD,"package-manager":ED,info:xC,other:RD};function xP(){const[n,e]=C.useState([]),[t,i]=C.useState(!1),r=C.useCallback(async s=>{i(!1);const a=s.body?.getReader(),c=new TextDecoder;let u="";for(;;){const h=await a?.read();if(h?.done)break;u+=c.decode(h?.value);let p;const m=[];for(const O of u.split(`
199
199
  `))if(O.startsWith("{")&&O.endsWith("}")){const v=JSON.parse(O);v.msgType==="start"?p===v.id?m[m.length-1].message=v.message:(p=v.id,m.push({id:p,icon:L6[v.type],message:v.message})):(m.length>0&&(m[m.length-1].message=v.message),p=void 0)}e(m)}return i(!0),u},[]);return{finished:t,streamItems:n,monitorStream:r}}function SP({streamItems:n,finished:e}){return S.jsx("div",{className:"flex flex-col gap-2",children:n.map((t,i)=>S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(t.icon,{className:`w-4 h-4 ${i===n.length-1&&!e?"text-green-500 animate-spin":""}`}),t.message]},t.id))})}function z6(){const{chosenAddOns:n}=Au(),[e,t]=C.useState(!1),{streamItems:i,monitorStream:r,finished:s}=xP();if(Or()!=="add")return null;async function c(){t(!0),r(await z_(n))}return S.jsxs("div",{children:[S.jsx(jo,{open:e,children:S.jsxs(No,{className:"sm:min-w-[425px] sm:max-w-fit",hideCloseButton:!0,children:[S.jsx(yl,{children:S.jsx(vl,{children:"Adding Add-Ons"})}),S.jsx(SP,{streamItems:i,finished:s}),S.jsx($u,{children:S.jsx(Oi,{variant:"default",onClick:async()=>{await hC(),window.close()},disabled:!s,children:"Exit This Application"})})]})}),S.jsx("div",{className:"flex flex-col gap-2",children:S.jsx(Oi,{variant:"default",onClick:c,disabled:n.length===0||e,className:"w-full",children:"Add These Add-Ons To Your App"})})]})}function q6(){const[n,e]=C.useState(!1),{streamItems:t,monitorStream:i,finished:r}=xP(),s=Or(),a=dn(),{chosenAddOns:c}=Au(),{projectStarter:u}=ml();if(s!=="setup")return null;async function h(){e(!0),i(await L_(a,c,u))}return S.jsxs("div",{children:[S.jsx(jo,{open:n,children:S.jsxs(No,{className:"sm:min-w-[425px] sm:max-w-fit",hideCloseButton:!0,children:[S.jsx(yl,{children:S.jsx(vl,{children:"Creating Your Application"})}),S.jsx(SP,{streamItems:t,finished:r}),S.jsx($u,{children:S.jsx(Oi,{variant:"default",onClick:async()=>{await hC(),window.close()},disabled:!r,children:"Exit This Application"})})]})}),S.jsx("div",{className:"flex flex-col gap-2",children:S.jsxs(Oi,{variant:"default",onClick:h,disabled:n,className:"w-full",children:[S.jsx(PD,{className:"w-4 h-4"}),"Build Your App"]})})]})}function nv({children:n}){return S.jsx("div",{className:"block p-4 bg-gray-500/10 hover:bg-gray-500/20 rounded-lg transition-colors space-y-4 active @container sidebar-container",children:n})}function B6(){const n=sD();return Or()!=="setup"?null:S.jsx(nv,{children:S.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[S.jsx("h3",{className:"font-medium whitespace-nowrap",children:"Project Name"}),S.jsx(Ay,{value:n,placeholder:"my-app",onChange:t=>lD(t.target.value),className:"w-full bg-gray-500/10 rounded-md px-2 py-1 min-w-[200px] text-sm"})]})})}var wP="Toggle",kP=C.forwardRef((n,e)=>{const{pressed:t,defaultPressed:i,onPressedChange:r,...s}=n,[a,c]=Xi({prop:t,onChange:r,defaultProp:i??!1,caller:wP});return S.jsx(ze.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":n.disabled?"":void 0,...s,ref:e,onClick:Ae(n.onClick,()=>{n.disabled||c(!a)})})});kP.displayName=wP;var Ys="ToggleGroup",[QP,qW]=Zi(Ys,[Sl]),CP=Sl(),iv=ee.forwardRef((n,e)=>{const{type:t,...i}=n;if(t==="single"){const r=i;return S.jsx(V6,{...r,ref:e})}if(t==="multiple"){const r=i;return S.jsx(Y6,{...r,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${Ys}\``)});iv.displayName=Ys;var[TP,PP]=QP(Ys),V6=ee.forwardRef((n,e)=>{const{value:t,defaultValue:i,onValueChange:r=()=>{},...s}=n,[a,c]=Xi({prop:t,defaultProp:i??"",onChange:r,caller:Ys});return S.jsx(TP,{scope:n.__scopeToggleGroup,type:"single",value:ee.useMemo(()=>a?[a]:[],[a]),onItemActivate:c,onItemDeactivate:ee.useCallback(()=>c(""),[c]),children:S.jsx(AP,{...s,ref:e})})}),Y6=ee.forwardRef((n,e)=>{const{value:t,defaultValue:i,onValueChange:r=()=>{},...s}=n,[a,c]=Xi({prop:t,defaultProp:i??[],onChange:r,caller:Ys}),u=ee.useCallback(p=>c((m=[])=>[...m,p]),[c]),h=ee.useCallback(p=>c((m=[])=>m.filter(O=>O!==p)),[c]);return S.jsx(TP,{scope:n.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:u,onItemDeactivate:h,children:S.jsx(AP,{...s,ref:e})})});iv.displayName=Ys;var[U6,G6]=QP(Ys),AP=ee.forwardRef((n,e)=>{const{__scopeToggleGroup:t,disabled:i=!1,rovingFocus:r=!0,orientation:s,dir:a,loop:c=!0,...u}=n,h=CP(t),p=Eu(a),m={role:"group",dir:p,...u};return S.jsx(U6,{scope:t,rovingFocus:r,disabled:i,children:r?S.jsx(Gy,{asChild:!0,...h,orientation:s,dir:p,loop:c,children:S.jsx(ze.div,{...m,ref:e})}):S.jsx(ze.div,{...m,ref:e})})}),Qd="ToggleGroupItem",MP=ee.forwardRef((n,e)=>{const t=PP(Qd,n.__scopeToggleGroup),i=G6(Qd,n.__scopeToggleGroup),r=CP(n.__scopeToggleGroup),s=t.value.includes(n.value),a=i.disabled||n.disabled,c={...n,pressed:s,disabled:a},u=ee.useRef(null);return i.rovingFocus?S.jsx(Iy,{asChild:!0,...r,focusable:!a,active:s,ref:u,children:S.jsx(Kw,{...c,ref:e})}):S.jsx(Kw,{...c,ref:e})});MP.displayName=Qd;var Kw=ee.forwardRef((n,e)=>{const{__scopeToggleGroup:t,value:i,...r}=n,s=PP(Qd,t),a={role:"radio","aria-checked":n.pressed,"aria-pressed":void 0},c=s.type==="single"?a:void 0;return S.jsx(kP,{...c,...r,ref:e,onPressedChange:u=>{u?s.onItemActivate(i):s.onItemDeactivate(i)}})}),I6=iv,W6=MP;const H6=Ru("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),RP=C.createContext({size:"default",variant:"default"});function F6({className:n,variant:e,size:t,children:i,...r}){return S.jsx(I6,{"data-slot":"toggle-group","data-variant":e,"data-size":t,className:Ie("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",n),...r,children:S.jsx(RP.Provider,{value:{variant:e,size:t},children:i})})}function K6({className:n,children:e,variant:t,size:i,...r}){const s=C.useContext(RP);return S.jsx(W6,{"data-slot":"toggle-group-item","data-variant":s.variant||t,"data-size":s.size||i,className:Ie(H6({variant:s.variant||t,size:s.size||i}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",n),...r,children:e})}function J6(){const n=Or(),e=nD(),t=Mu(),i=eD();return n!=="setup"||Object.keys(i??{}).length<2?null:S.jsx(nv,{children:S.jsxs("div",{className:"flex flex-col @md:flex-row @md:items-center gap-2 items-start",children:[S.jsx("h3",{className:"font-medium whitespace-nowrap",children:"Router Mode"}),S.jsx("div",{className:"flex flex-row justify-center items-center",children:S.jsx(F6,{type:"single",value:t,onValueChange:r=>{r&&cD(r)},className:"rounded-md border-2 border-gray-500/10",children:Object.keys(i??{}).map(r=>S.jsxs(K6,{value:r,className:"px-4",disabled:!e,children:[S.jsx(SD,{className:"w-4 h-4"}),i?.[r].displayName]},r))})})]})})}function eX({className:n}){return S.jsxs("svg",{viewBox:"0 0 256 256",width:"256",height:"256",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid",className:Ie("w-10 h-10",n),children:[S.jsx("path",{d:"M20 0h216c11.046 0 20 8.954 20 20v216c0 11.046-8.954 20-20 20H20c-11.046 0-20-8.954-20-20V20C0 8.954 8.954 0 20 0Z",fill:"#3178C6"}),S.jsx("path",{d:"M150.518 200.475v27.62c4.492 2.302 9.805 4.028 15.938 5.179 6.133 1.151 12.597 1.726 19.393 1.726 6.622 0 12.914-.633 18.874-1.899 5.96-1.266 11.187-3.352 15.678-6.257 4.492-2.906 8.048-6.704 10.669-11.394 2.62-4.689 3.93-10.486 3.93-17.391 0-5.006-.749-9.394-2.246-13.163a30.748 30.748 0 0 0-6.479-10.055c-2.821-2.935-6.205-5.567-10.149-7.898-3.945-2.33-8.394-4.531-13.347-6.602-3.628-1.497-6.881-2.949-9.761-4.359-2.879-1.41-5.327-2.848-7.342-4.316-2.016-1.467-3.571-3.021-4.665-4.661-1.094-1.64-1.641-3.495-1.641-5.567 0-1.899.489-3.61 1.468-5.135s2.362-2.834 4.147-3.927c1.785-1.094 3.973-1.942 6.565-2.547 2.591-.604 5.471-.906 8.638-.906 2.304 0 4.737.173 7.299.518 2.563.345 5.14.877 7.732 1.597a53.669 53.669 0 0 1 7.558 2.719 41.7 41.7 0 0 1 6.781 3.797v-25.807c-4.204-1.611-8.797-2.805-13.778-3.582-4.981-.777-10.697-1.165-17.147-1.165-6.565 0-12.784.705-18.658 2.115-5.874 1.409-11.043 3.61-15.506 6.602-4.463 2.993-7.99 6.805-10.582 11.437-2.591 4.632-3.887 10.17-3.887 16.615 0 8.228 2.375 15.248 7.127 21.06 4.751 5.811 11.963 10.731 21.638 14.759a291.458 291.458 0 0 1 10.625 4.575c3.283 1.496 6.119 3.049 8.509 4.66 2.39 1.611 4.276 3.366 5.658 5.265 1.382 1.899 2.073 4.057 2.073 6.474a9.901 9.901 0 0 1-1.296 4.963c-.863 1.524-2.174 2.848-3.93 3.97-1.756 1.122-3.945 1.999-6.565 2.632-2.62.633-5.687.95-9.2.95-5.989 0-11.92-1.05-17.794-3.151-5.875-2.1-11.317-5.25-16.327-9.451Zm-46.036-68.733H140V109H41v22.742h35.345V233h28.137V131.742Z",fill:"#FFF"})]})}function tX({className:n}){return S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 54 33",className:Ie("w-10 h-10",n),children:[S.jsx("g",{"clip-path":"url(#a)",children:S.jsx("path",{fill:"#38bdf8","fill-rule":"evenodd",d:"M27 0c-7.2 0-11.7 3.6-13.5 10.8 2.7-3.6 5.85-4.95 9.45-4.05 2.054.513 3.522 2.004 5.147 3.653C30.744 13.09 33.808 16.2 40.5 16.2c7.2 0 11.7-3.6 13.5-10.8-2.7 3.6-5.85 4.95-9.45 4.05-2.054-.513-3.522-2.004-5.147-3.653C36.756 3.11 33.692 0 27 0zM13.5 16.2C6.3 16.2 1.8 19.8 0 27c2.7-3.6 5.85-4.95 9.45-4.05 2.054.514 3.522 2.004 5.147 3.653C17.244 29.29 20.308 32.4 27 32.4c7.2 0 11.7-3.6 13.5-10.8-2.7 3.6-5.85 4.95-9.45 4.05-2.054-.513-3.522-2.004-5.147-3.653C23.256 19.31 20.192 16.2 13.5 16.2z","clip-rule":"evenodd"})}),S.jsx("defs",{children:S.jsx("clipPath",{id:"a",children:S.jsx("path",{fill:"#fff",d:"M0 0h54v32.4H0z"})})})]})}function nX(){const n=dn(s=>s.typescript),e=dn(s=>s.tailwind),t=Or(),i=rD(),r=iD();return t!=="setup"?null:S.jsx(nv,{children:S.jsxs("div",{className:"flex",children:[S.jsxs("div",{className:"w-1/2 flex flex-row items-center justify-center",children:[S.jsx(Ur,{id:"typescript-switch",checked:n,onCheckedChange:s=>uD(s),disabled:!r}),S.jsxs(er,{htmlFor:"typescript-switch",className:"ml-2",children:[S.jsx(eX,{className:"w-5"}),"TypeScript"]})]}),S.jsxs("div",{className:"w-1/2 flex flex-row items-center justify-center",children:[S.jsx(Ur,{id:"tailwind-switch",checked:e,onCheckedChange:s=>fD(s),disabled:!i}),S.jsxs(er,{htmlFor:"tailwind-switch",className:"ml-2",children:[S.jsx(tX,{className:"w-5"}),"Tailwind"]})]})]})})}function iX(n){return Object.prototype.toString.call(n)==="[object Object]"}function Jw(n){return iX(n)||Array.isArray(n)}function rX(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function rv(n,e){const t=Object.keys(n),i=Object.keys(e);if(t.length!==i.length)return!1;const r=JSON.stringify(Object.keys(n.breakpoints||{})),s=JSON.stringify(Object.keys(e.breakpoints||{}));return r!==s?!1:t.every(a=>{const c=n[a],u=e[a];return typeof c=="function"?`${c}`==`${u}`:!Jw(c)||!Jw(u)?c===u:rv(c,u)})}function ek(n){return n.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function sX(n,e){if(n.length!==e.length)return!1;const t=ek(n),i=ek(e);return t.every((r,s)=>{const a=i[s];return rv(r,a)})}function sv(n){return typeof n=="number"}function f0(n){return typeof n=="string"}function mp(n){return typeof n=="boolean"}function tk(n){return Object.prototype.toString.call(n)==="[object Object]"}function yt(n){return Math.abs(n)}function ov(n){return Math.sign(n)}function Uc(n,e){return yt(n-e)}function oX(n,e){if(n===0||e===0||yt(n)<=yt(e))return 0;const t=Uc(yt(n),yt(e));return yt(t/n)}function aX(n){return Math.round(n*100)/100}function ou(n){return au(n).map(Number)}function $i(n){return n[Zu(n)]}function Zu(n){return Math.max(0,n.length-1)}function av(n,e){return e===Zu(n)}function nk(n,e=0){return Array.from(Array(n),(t,i)=>e+i)}function au(n){return Object.keys(n)}function $P(n,e){return[n,e].reduce((t,i)=>(au(i).forEach(r=>{const s=t[r],a=i[r],c=tk(s)&&tk(a);t[r]=c?$P(s,a):a}),t),{})}function h0(n,e){return typeof e.MouseEvent<"u"&&n instanceof e.MouseEvent}function lX(n,e){const t={start:i,center:r,end:s};function i(){return 0}function r(u){return s(u)/2}function s(u){return e-u}function a(u,h){return f0(n)?t[n](u):n(e,u,h)}return{measure:a}}function lu(){let n=[];function e(r,s,a,c={passive:!0}){let u;if("addEventListener"in r)r.addEventListener(s,a,c),u=()=>r.removeEventListener(s,a,c);else{const h=r;h.addListener(a),u=()=>h.removeListener(a)}return n.push(u),i}function t(){n=n.filter(r=>r())}const i={add:e,clear:t};return i}function cX(n,e,t,i){const r=lu(),s=1e3/60;let a=null,c=0,u=0;function h(){r.add(n,"visibilitychange",()=>{n.hidden&&b()})}function p(){v(),r.clear()}function m(w){if(!u)return;a||(a=w,t(),t());const k=w-a;for(a=w,c+=k;c>=s;)t(),c-=s;const T=c/s;i(T),u&&(u=e.requestAnimationFrame(m))}function O(){u||(u=e.requestAnimationFrame(m))}function v(){e.cancelAnimationFrame(u),a=null,c=0,u=0}function b(){a=null,c=0}return{init:h,destroy:p,start:O,stop:v,update:t,render:i}}function uX(n,e){const t=e==="rtl",i=n==="y",r=i?"y":"x",s=i?"x":"y",a=!i&&t?-1:1,c=p(),u=m();function h(b){const{height:x,width:w}=b;return i?x:w}function p(){return i?"top":t?"right":"left"}function m(){return i?"bottom":t?"left":"right"}function O(b){return b*a}return{scroll:r,cross:s,startEdge:c,endEdge:u,measureSize:h,direction:O}}function To(n=0,e=0){const t=yt(n-e);function i(h){return h<n}function r(h){return h>e}function s(h){return i(h)||r(h)}function a(h){return s(h)?i(h)?n:e:h}function c(h){return t?h-t*Math.ceil((h-e)/t):h}return{length:t,max:e,min:n,constrain:a,reachedAny:s,reachedMax:r,reachedMin:i,removeOffset:c}}function EP(n,e,t){const{constrain:i}=To(0,n),r=n+1;let s=a(e);function a(O){return t?yt((r+O)%r):i(O)}function c(){return s}function u(O){return s=a(O),m}function h(O){return p().set(c()+O)}function p(){return EP(n,c(),t)}const m={get:c,set:u,add:h,clone:p};return m}function fX(n,e,t,i,r,s,a,c,u,h,p,m,O,v,b,x,w,k,T){const{cross:A,direction:$}=n,R=["INPUT","SELECT","TEXTAREA"],_={passive:!1},D=lu(),j=lu(),Y=To(50,225).constrain(v.measure(20)),J={mouse:300,touch:400},I={mouse:500,touch:600},W=b?43:25;let ae=!1,le=0,ce=0,Z=!1,U=!1,z=!1,K=!1;function E(me){if(!T)return;function je(Xt){(mp(T)||T(me,Xt))&&ue(Xt)}const Ke=e;D.add(Ke,"dragstart",Xt=>Xt.preventDefault(),_).add(Ke,"touchmove",()=>{},_).add(Ke,"touchend",()=>{}).add(Ke,"touchstart",je).add(Ke,"mousedown",je).add(Ke,"touchcancel",ke).add(Ke,"contextmenu",ke).add(Ke,"click",Ue,!0)}function q(){D.clear(),j.clear()}function te(){const me=K?t:e;j.add(me,"touchmove",de,_).add(me,"touchend",ke).add(me,"mousemove",de,_).add(me,"mouseup",ke)}function F(me){const je=me.nodeName||"";return R.includes(je)}function oe(){return(b?I:J)[K?"mouse":"touch"]}function xe(me,je){const Ke=m.add(ov(me)*-1),Xt=p.byDistance(me,!b).distance;return b||yt(me)<Y?Xt:w&&je?Xt*.5:p.byIndex(Ke.get(),0).distance}function ue(me){const je=h0(me,i);K=je,z=b&&je&&!me.buttons&&ae,ae=Uc(r.get(),a.get())>=2,!(je&&me.button!==0)&&(F(me.target)||(Z=!0,s.pointerDown(me),h.useFriction(0).useDuration(0),r.set(a),te(),le=s.readPoint(me),ce=s.readPoint(me,A),O.emit("pointerDown")))}function de(me){if(!h0(me,i)&&me.touches.length>=2)return ke(me);const Ke=s.readPoint(me),Xt=s.readPoint(me,A),mn=Uc(Ke,le),at=Uc(Xt,ce);if(!U&&!K&&(!me.cancelable||(U=mn>at,!U)))return ke(me);const Fn=s.pointerMove(me);mn>x&&(z=!0),h.useFriction(.3).useDuration(.75),c.start(),r.add($(Fn)),me.preventDefault()}function ke(me){const Ke=p.byDistance(0,!1).index!==m.get(),Xt=s.pointerUp(me)*oe(),mn=xe($(Xt),Ke),at=oX(Xt,mn),Fn=W-10*at,kt=k+at/50;U=!1,Z=!1,j.clear(),h.useDuration(Fn).useFriction(kt),u.distance(mn,!b),K=!1,O.emit("pointerUp")}function Ue(me){z&&(me.stopPropagation(),me.preventDefault(),z=!1)}function We(){return Z}return{init:E,destroy:q,pointerDown:We}}function hX(n,e){let i,r;function s(m){return m.timeStamp}function a(m,O){const b=`client${(O||n.scroll)==="x"?"X":"Y"}`;return(h0(m,e)?m:m.touches[0])[b]}function c(m){return i=m,r=m,a(m)}function u(m){const O=a(m)-a(r),v=s(m)-s(i)>170;return r=m,v&&(i=m),O}function h(m){if(!i||!r)return 0;const O=a(r)-a(i),v=s(m)-s(i),b=s(m)-s(r)>170,x=O/v;return v&&!b&&yt(x)>.1?x:0}return{pointerDown:c,pointerMove:u,pointerUp:h,readPoint:a}}function dX(){function n(t){const{offsetTop:i,offsetLeft:r,offsetWidth:s,offsetHeight:a}=t;return{top:i,right:r+s,bottom:i+a,left:r,width:s,height:a}}return{measure:n}}function pX(n){function e(i){return n*(i/100)}return{measure:e}}function mX(n,e,t,i,r,s,a){const c=[n].concat(i);let u,h,p=[],m=!1;function O(w){return r.measureSize(a.measure(w))}function v(w){if(!s)return;h=O(n),p=i.map(O);function k(T){for(const A of T){if(m)return;const $=A.target===n,R=i.indexOf(A.target),_=$?h:p[R],D=O($?n:i[R]);if(yt(D-_)>=.5){w.reInit(),e.emit("resize");break}}}u=new ResizeObserver(T=>{(mp(s)||s(w,T))&&k(T)}),t.requestAnimationFrame(()=>{c.forEach(T=>u.observe(T))})}function b(){m=!0,u&&u.disconnect()}return{init:v,destroy:b}}function gX(n,e,t,i,r,s){let a=0,c=0,u=r,h=s,p=n.get(),m=0;function O(){const _=i.get()-n.get(),D=!u;let j=0;return D?(a=0,t.set(i),n.set(i),j=_):(t.set(n),a+=_/u,a*=h,p+=a,n.add(a),j=p-m),c=ov(j),m=p,R}function v(){const _=i.get()-e.get();return yt(_)<.001}function b(){return u}function x(){return c}function w(){return a}function k(){return A(r)}function T(){return $(s)}function A(_){return u=_,R}function $(_){return h=_,R}const R={direction:x,duration:b,velocity:w,seek:O,settled:v,useBaseFriction:T,useBaseDuration:k,useFriction:$,useDuration:A};return R}function OX(n,e,t,i,r){const s=r.measure(10),a=r.measure(50),c=To(.1,.99);let u=!1;function h(){return!(u||!n.reachedAny(t.get())||!n.reachedAny(e.get()))}function p(v){if(!h())return;const b=n.reachedMin(e.get())?"min":"max",x=yt(n[b]-e.get()),w=t.get()-e.get(),k=c.constrain(x/a);t.subtract(w*k),!v&&yt(w)<s&&(t.set(n.constrain(t.get())),i.useDuration(25).useBaseFriction())}function m(v){u=!v}return{shouldConstrain:h,constrain:p,toggleActive:m}}function yX(n,e,t,i,r){const s=To(-e+n,0),a=m(),c=p(),u=O();function h(b,x){return Uc(b,x)<=1}function p(){const b=a[0],x=$i(a),w=a.lastIndexOf(b),k=a.indexOf(x)+1;return To(w,k)}function m(){return t.map((b,x)=>{const{min:w,max:k}=s,T=s.constrain(b),A=!x,$=av(t,x);return A?k:$||h(w,T)?w:h(k,T)?k:T}).map(b=>parseFloat(b.toFixed(3)))}function O(){if(e<=n+r)return[s.max];if(i==="keepSnaps")return a;const{min:b,max:x}=c;return a.slice(b,x)}return{snapsContained:u,scrollContainLimit:c}}function vX(n,e,t){const i=e[0],r=t?i-n:$i(e);return{limit:To(r,i)}}function bX(n,e,t,i){const s=e.min+.1,a=e.max+.1,{reachedMin:c,reachedMax:u}=To(s,a);function h(O){return O===1?u(t.get()):O===-1?c(t.get()):!1}function p(O){if(!h(O))return;const v=n*(O*-1);i.forEach(b=>b.add(v))}return{loop:p}}function xX(n){const{max:e,length:t}=n;function i(s){const a=s-e;return t?a/-t:0}return{get:i}}function SX(n,e,t,i,r){const{startEdge:s,endEdge:a}=n,{groupSlides:c}=r,u=m().map(e.measure),h=O(),p=v();function m(){return c(i).map(x=>$i(x)[a]-x[0][s]).map(yt)}function O(){return i.map(x=>t[s]-x[s]).map(x=>-yt(x))}function v(){return c(h).map(x=>x[0]).map((x,w)=>x+u[w])}return{snaps:h,snapsAligned:p}}function wX(n,e,t,i,r,s){const{groupSlides:a}=r,{min:c,max:u}=i,h=p();function p(){const O=a(s),v=!n||e==="keepSnaps";return t.length===1?[s]:v?O:O.slice(c,u).map((b,x,w)=>{const k=!x,T=av(w,x);if(k){const A=$i(w[0])+1;return nk(A)}if(T){const A=Zu(s)-$i(w)[0]+1;return nk(A,$i(w)[0])}return b})}return{slideRegistry:h}}function kX(n,e,t,i,r){const{reachedAny:s,removeOffset:a,constrain:c}=i;function u(b){return b.concat().sort((x,w)=>yt(x)-yt(w))[0]}function h(b){const x=n?a(b):c(b),w=e.map((T,A)=>({diff:p(T-x,0),index:A})).sort((T,A)=>yt(T.diff)-yt(A.diff)),{index:k}=w[0];return{index:k,distance:x}}function p(b,x){const w=[b,b+t,b-t];if(!n)return b;if(!x)return u(w);const k=w.filter(T=>ov(T)===x);return k.length?u(k):$i(w)-t}function m(b,x){const w=e[b]-r.get(),k=p(w,x);return{index:b,distance:k}}function O(b,x){const w=r.get()+b,{index:k,distance:T}=h(w),A=!n&&s(w);if(!x||A)return{index:k,distance:b};const $=e[k]-T,R=b+p($,0);return{index:k,distance:R}}return{byDistance:O,byIndex:m,shortcut:p}}function QX(n,e,t,i,r,s,a){function c(m){const O=m.distance,v=m.index!==e.get();s.add(O),O&&(i.duration()?n.start():(n.update(),n.render(1),n.update())),v&&(t.set(e.get()),e.set(m.index),a.emit("select"))}function u(m,O){const v=r.byDistance(m,O);c(v)}function h(m,O){const v=e.clone().set(m),b=r.byIndex(v.get(),O);c(b)}return{distance:u,index:h}}function CX(n,e,t,i,r,s,a,c){const u={passive:!0,capture:!0};let h=0;function p(v){if(!c)return;function b(x){if(new Date().getTime()-h>10)return;a.emit("slideFocusStart"),n.scrollLeft=0;const T=t.findIndex(A=>A.includes(x));sv(T)&&(r.useDuration(0),i.index(T,0),a.emit("slideFocus"))}s.add(document,"keydown",m,!1),e.forEach((x,w)=>{s.add(x,"focus",k=>{(mp(c)||c(v,k))&&b(w)},u)})}function m(v){v.code==="Tab"&&(h=new Date().getTime())}return{init:p}}function jc(n){let e=n;function t(){return e}function i(u){e=a(u)}function r(u){e+=a(u)}function s(u){e-=a(u)}function a(u){return sv(u)?u:u.get()}return{get:t,set:i,add:r,subtract:s}}function _P(n,e){const t=n.scroll==="x"?a:c,i=e.style;let r=null,s=!1;function a(O){return`translate3d(${O}px,0px,0px)`}function c(O){return`translate3d(0px,${O}px,0px)`}function u(O){if(s)return;const v=aX(n.direction(O));v!==r&&(i.transform=t(v),r=v)}function h(O){s=!O}function p(){s||(i.transform="",e.getAttribute("style")||e.removeAttribute("style"))}return{clear:p,to:u,toggleActive:h}}function TX(n,e,t,i,r,s,a,c,u){const p=ou(r),m=ou(r).reverse(),O=k().concat(T());function v(D,j){return D.reduce((Y,J)=>Y-r[J],j)}function b(D,j){return D.reduce((Y,J)=>v(Y,j)>0?Y.concat([J]):Y,[])}function x(D){return s.map((j,Y)=>({start:j-i[Y]+.5+D,end:j+e-.5+D}))}function w(D,j,Y){const J=x(j);return D.map(I=>{const W=Y?0:-t,ae=Y?t:0,le=Y?"end":"start",ce=J[I][le];return{index:I,loopPoint:ce,slideLocation:jc(-1),translate:_P(n,u[I]),target:()=>c.get()>ce?W:ae}})}function k(){const D=a[0],j=b(m,D);return w(j,t,!1)}function T(){const D=e-a[0]-1,j=b(p,D);return w(j,-t,!0)}function A(){return O.every(({index:D})=>{const j=p.filter(Y=>Y!==D);return v(j,e)<=.1})}function $(){O.forEach(D=>{const{target:j,translate:Y,slideLocation:J}=D,I=j();I!==J.get()&&(Y.to(I),J.set(I))})}function R(){O.forEach(D=>D.translate.clear())}return{canLoop:A,clear:R,loop:$,loopPoints:O}}function PX(n,e,t){let i,r=!1;function s(u){if(!t)return;function h(p){for(const m of p)if(m.type==="childList"){u.reInit(),e.emit("slidesChanged");break}}i=new MutationObserver(p=>{r||(mp(t)||t(u,p))&&h(p)}),i.observe(n,{childList:!0})}function a(){i&&i.disconnect(),r=!0}return{init:s,destroy:a}}function AX(n,e,t,i){const r={};let s=null,a=null,c,u=!1;function h(){c=new IntersectionObserver(b=>{u||(b.forEach(x=>{const w=e.indexOf(x.target);r[w]=x}),s=null,a=null,t.emit("slidesInView"))},{root:n.parentElement,threshold:i}),e.forEach(b=>c.observe(b))}function p(){c&&c.disconnect(),u=!0}function m(b){return au(r).reduce((x,w)=>{const k=parseInt(w),{isIntersecting:T}=r[k];return(b&&T||!b&&!T)&&x.push(k),x},[])}function O(b=!0){if(b&&s)return s;if(!b&&a)return a;const x=m(b);return b&&(s=x),b||(a=x),x}return{init:h,destroy:p,get:O}}function MX(n,e,t,i,r,s){const{measureSize:a,startEdge:c,endEdge:u}=n,h=t[0]&&r,p=b(),m=x(),O=t.map(a),v=w();function b(){if(!h)return 0;const T=t[0];return yt(e[c]-T[c])}function x(){if(!h)return 0;const T=s.getComputedStyle($i(i));return parseFloat(T.getPropertyValue(`margin-${u}`))}function w(){return t.map((T,A,$)=>{const R=!A,_=av($,A);return R?O[A]+p:_?O[A]+m:$[A+1][c]-T[c]}).map(yt)}return{slideSizes:O,slideSizesWithGaps:v,startGap:p,endGap:m}}function RX(n,e,t,i,r,s,a,c,u){const{startEdge:h,endEdge:p,direction:m}=n,O=sv(t);function v(k,T){return ou(k).filter(A=>A%T===0).map(A=>k.slice(A,A+T))}function b(k){return k.length?ou(k).reduce((T,A,$)=>{const R=$i(T)||0,_=R===0,D=A===Zu(k),j=r[h]-s[R][h],Y=r[h]-s[A][p],J=!i&&_?m(a):0,I=!i&&D?m(c):0,W=yt(Y-I-(j+J));return $&&W>e+u&&T.push(A),D&&T.push(k.length),T},[]).map((T,A,$)=>{const R=Math.max($[A-1]||0);return k.slice(R,T)}):[]}function x(k){return O?v(k,t):b(k)}return{groupSlides:x}}function $X(n,e,t,i,r,s,a){const{align:c,axis:u,direction:h,startIndex:p,loop:m,duration:O,dragFree:v,dragThreshold:b,inViewThreshold:x,slidesToScroll:w,skipSnaps:k,containScroll:T,watchResize:A,watchSlides:$,watchDrag:R,watchFocus:_}=s,D=2,j=dX(),Y=j.measure(e),J=t.map(j.measure),I=uX(u,h),W=I.measureSize(Y),ae=pX(W),le=lX(c,W),ce=!m&&!!T,Z=m||!!T,{slideSizes:U,slideSizesWithGaps:z,startGap:K,endGap:E}=MX(I,Y,J,t,Z,r),q=RX(I,W,w,m,Y,J,K,E,D),{snaps:te,snapsAligned:F}=SX(I,le,Y,J,q),oe=-$i(te)+$i(z),{snapsContained:xe,scrollContainLimit:ue}=yX(W,oe,F,T,D),de=ce?xe:F,{limit:ke}=vX(oe,de,m),Ue=EP(Zu(de),p,m),We=Ue.clone(),Le=ou(t),me=({dragHandler:gn,scrollBody:is,scrollBounds:ti,options:{loop:Qi}})=>{Qi||ti.constrain(gn.pointerDown()),is.seek()},je=({scrollBody:gn,translate:is,location:ti,offsetLocation:Qi,previousLocation:rs,scrollLooper:ni,slideLooper:kr,dragHandler:Qr,animation:Gs,eventHandler:Sn,scrollBounds:qo,options:{loop:ss}},Ci)=>{const Is=gn.settled(),Me=!qo.shouldConstrain(),dt=ss?Is:Is&&Me,gt=dt&&!Qr.pointerDown();gt&&Gs.stop();const zt=ti.get()*Ci+rs.get()*(1-Ci);Qi.set(zt),ss&&(ni.loop(gn.direction()),kr.loop()),is.to(Qi.get()),gt&&Sn.emit("settle"),dt||Sn.emit("scroll")},Ke=cX(i,r,()=>me(Qt),gn=>je(Qt,gn)),Xt=.68,mn=de[Ue.get()],at=jc(mn),Fn=jc(mn),kt=jc(mn),Kn=jc(mn),Jn=gX(at,kt,Fn,Kn,O,Xt),Lt=kX(m,de,oe,ke,Kn),Dn=QX(Ke,Ue,We,Jn,Lt,Kn,a),Lo=xX(ke),zo=lu(),ei=AX(e,t,a,x),{slideRegistry:Ut}=wX(ce,T,de,ue,q,Le),jn=CX(n,t,Ut,Dn,Jn,zo,a,_),Qt={ownerDocument:i,ownerWindow:r,eventHandler:a,containerRect:Y,slideRects:J,animation:Ke,axis:I,dragHandler:fX(I,n,i,r,Kn,hX(I,r),at,Ke,Dn,Jn,Lt,Ue,a,ae,v,b,k,Xt,R),eventStore:zo,percentOfView:ae,index:Ue,indexPrevious:We,limit:ke,location:at,offsetLocation:kt,previousLocation:Fn,options:s,resizeHandler:mX(e,a,r,t,I,A,j),scrollBody:Jn,scrollBounds:OX(ke,kt,Kn,Jn,ae),scrollLooper:bX(oe,ke,kt,[at,kt,Fn,Kn]),scrollProgress:Lo,scrollSnapList:de.map(Lo.get),scrollSnaps:de,scrollTarget:Lt,scrollTo:Dn,slideLooper:TX(I,W,oe,U,z,te,de,kt,t),slideFocus:jn,slidesHandler:PX(e,a,$),slidesInView:ei,slideIndexes:Le,slideRegistry:Ut,slidesToScroll:q,target:Kn,translate:_P(I,e)};return Qt}function EX(){let n={},e;function t(h){e=h}function i(h){return n[h]||[]}function r(h){return i(h).forEach(p=>p(e,h)),u}function s(h,p){return n[h]=i(h).concat([p]),u}function a(h,p){return n[h]=i(h).filter(m=>m!==p),u}function c(){n={}}const u={init:t,emit:r,off:a,on:s,clear:c};return u}const _X={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function DX(n){function e(s,a){return $P(s,a||{})}function t(s){const a=s.breakpoints||{},c=au(a).filter(u=>n.matchMedia(u).matches).map(u=>a[u]).reduce((u,h)=>e(u,h),{});return e(s,c)}function i(s){return s.map(a=>au(a.breakpoints||{})).reduce((a,c)=>a.concat(c),[]).map(n.matchMedia)}return{mergeOptions:e,optionsAtMedia:t,optionsMediaQueries:i}}function jX(n){let e=[];function t(s,a){return e=a.filter(({options:c})=>n.optionsAtMedia(c).active!==!1),e.forEach(c=>c.init(s,n)),a.reduce((c,u)=>Object.assign(c,{[u.name]:u}),{})}function i(){e=e.filter(s=>s.destroy())}return{init:t,destroy:i}}function Cd(n,e,t){const i=n.ownerDocument,r=i.defaultView,s=DX(r),a=jX(s),c=lu(),u=EX(),{mergeOptions:h,optionsAtMedia:p,optionsMediaQueries:m}=s,{on:O,off:v,emit:b}=u,x=I;let w=!1,k,T=h(_X,Cd.globalOptions),A=h(T),$=[],R,_,D;function j(){const{container:Le,slides:me}=A;_=(f0(Le)?n.querySelector(Le):Le)||n.children[0];const Ke=f0(me)?_.querySelectorAll(me):me;D=[].slice.call(Ke||_.children)}function Y(Le){const me=$X(n,_,D,i,r,Le,u);if(Le.loop&&!me.slideLooper.canLoop()){const je=Object.assign({},Le,{loop:!1});return Y(je)}return me}function J(Le,me){w||(T=h(T,Le),A=p(T),$=me||$,j(),k=Y(A),m([T,...$.map(({options:je})=>je)]).forEach(je=>c.add(je,"change",I)),A.active&&(k.translate.to(k.location.get()),k.animation.init(),k.slidesInView.init(),k.slideFocus.init(We),k.eventHandler.init(We),k.resizeHandler.init(We),k.slidesHandler.init(We),k.options.loop&&k.slideLooper.loop(),_.offsetParent&&D.length&&k.dragHandler.init(We),R=a.init(We,$)))}function I(Le,me){const je=q();W(),J(h({startIndex:je},Le),me),u.emit("reInit")}function W(){k.dragHandler.destroy(),k.eventStore.clear(),k.translate.clear(),k.slideLooper.clear(),k.resizeHandler.destroy(),k.slidesHandler.destroy(),k.slidesInView.destroy(),k.animation.destroy(),a.destroy(),c.clear()}function ae(){w||(w=!0,c.clear(),W(),u.emit("destroy"),u.clear())}function le(Le,me,je){!A.active||w||(k.scrollBody.useBaseFriction().useDuration(me===!0?0:A.duration),k.scrollTo.index(Le,je||0))}function ce(Le){const me=k.index.add(1).get();le(me,Le,-1)}function Z(Le){const me=k.index.add(-1).get();le(me,Le,1)}function U(){return k.index.add(1).get()!==q()}function z(){return k.index.add(-1).get()!==q()}function K(){return k.scrollSnapList}function E(){return k.scrollProgress.get(k.offsetLocation.get())}function q(){return k.index.get()}function te(){return k.indexPrevious.get()}function F(){return k.slidesInView.get()}function oe(){return k.slidesInView.get(!1)}function xe(){return R}function ue(){return k}function de(){return n}function ke(){return _}function Ue(){return D}const We={canScrollNext:U,canScrollPrev:z,containerNode:ke,internalEngine:ue,destroy:ae,off:v,on:O,emit:b,plugins:xe,previousScrollSnap:te,reInit:x,rootNode:de,scrollNext:ce,scrollPrev:Z,scrollProgress:E,scrollSnapList:K,scrollTo:le,selectedScrollSnap:q,slideNodes:Ue,slidesInView:F,slidesNotInView:oe};return J(e,t),setTimeout(()=>u.emit("init"),0),We}Cd.globalOptions=void 0;function lv(n={},e=[]){const t=C.useRef(n),i=C.useRef(e),[r,s]=C.useState(),[a,c]=C.useState(),u=C.useCallback(()=>{r&&r.reInit(t.current,i.current)},[r]);return C.useEffect(()=>{rv(t.current,n)||(t.current=n,u())},[n,u]),C.useEffect(()=>{sX(i.current,e)||(i.current=e,u())},[e,u]),C.useEffect(()=>{if(rX()&&a){Cd.globalOptions=lv.globalOptions;const h=Cd(a,t.current,i.current);return s(h),()=>h.destroy()}else s(void 0)},[a,s]),[c,r]}lv.globalOptions=void 0;const DP=C.createContext(null);function jP(){const n=C.useContext(DP);if(!n)throw new Error("useCarousel must be used within a <Carousel />");return n}function NX({orientation:n="horizontal",opts:e,setApi:t,plugins:i,className:r,children:s,...a}){const[c,u]=lv({...e,axis:n==="horizontal"?"x":"y"},i),[h,p]=C.useState(!1),[m,O]=C.useState(!1),v=C.useCallback(k=>{k&&(p(k.canScrollPrev()),O(k.canScrollNext()))},[]),b=C.useCallback(()=>{u?.scrollPrev()},[u]),x=C.useCallback(()=>{u?.scrollNext()},[u]),w=C.useCallback(k=>{k.key==="ArrowLeft"?(k.preventDefault(),b()):k.key==="ArrowRight"&&(k.preventDefault(),x())},[b,x]);return C.useEffect(()=>{!u||!t||t(u)},[u,t]),C.useEffect(()=>{if(u)return v(u),u.on("reInit",v),u.on("select",v),()=>{u?.off("select",v)}},[u,v]),S.jsx(DP.Provider,{value:{carouselRef:c,api:u,opts:e,orientation:n||(e?.axis==="y"?"vertical":"horizontal"),scrollPrev:b,scrollNext:x,canScrollPrev:h,canScrollNext:m},children:S.jsx("div",{onKeyDownCapture:w,className:Ie("relative",r),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...a,children:s})})}function ZX({className:n,...e}){const{carouselRef:t,orientation:i}=jP();return S.jsx("div",{ref:t,className:"overflow-hidden","data-slot":"carousel-content",children:S.jsx("div",{className:Ie("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col",n),...e})})}function XX({className:n,...e}){const{orientation:t}=jP();return S.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:Ie("min-w-0 shrink-0 grow-0 basis-full",t==="horizontal"?"pl-4":"pt-4",n),...e})}function NP({onImport:n}){const e=ky();return e?S.jsx("div",{children:S.jsx(NX,{children:S.jsx(ZX,{children:e.starters.map(t=>S.jsx(XX,{className:"basis-1/3",children:S.jsxs("div",{className:"p-2 flex flex-col items-center hover:cursor-pointer hover:bg-gray-700/50 hover:text-white rounded-lg",onClick:()=>{n(t.url)},children:[S.jsx("img",{src:t.banner,alt:t.name,className:"w-100 max-w-full"}),S.jsx("div",{className:"text-md font-bold",children:t.name})]})},t.url))})})}):null}function LX(){const[n,e]=C.useState(""),[t,i]=C.useState(!1),r=Or(),{projectStarter:s}=ml();if(r!=="setup")return null;async function a(u){const h=await dC(u||n);"error"in h?Py.error("Failed to load starter",{description:h.error}):(JO(h),i(!1))}const c=ky();return S.jsxs(S.Fragment,{children:[s?.banner&&S.jsx("div",{className:"flex justify-center mb-4",children:S.jsx("div",{className:"p-2 bg-gray-300 rounded-lg shadow-xl shadow-gray-800",children:S.jsx("img",{src:s.banner,alt:"Starter Banner",className:"w-40 max-w-full"})})}),s?.name&&S.jsxs("div",{className:"text-md mb-4",children:[S.jsx(Oi,{variant:"outline",size:"sm",className:"mr-2",onClick:()=>{JO(void 0)},children:S.jsx(BD,{className:"w-4 h-4"})}),S.jsx("span",{className:"font-bold",children:"Starter: "}),s.name]}),S.jsxs("div",{children:[S.jsxs(Oi,{variant:"secondary",className:"w-full",onClick:()=>{e(""),i(!0)},children:[S.jsx(kD,{className:"w-4 h-4"}),"Set Project Starter"]}),S.jsx(jo,{modal:!0,open:t,onOpenChange:i,children:S.jsxs(No,{className:"sm:min-w-[425px] sm:max-w-fit",children:[S.jsx(yl,{children:S.jsx(vl,{children:"Project Starter URL"})}),c?.starters&&S.jsx("div",{children:S.jsx(NP,{onImport:u=>a(u)})}),S.jsx("div",{children:S.jsx(Ay,{value:n,onChange:u=>e(u.target.value),placeholder:"https://github.com/myorg/myproject/starter.json",className:"min-w-lg w-full",onKeyDown:u=>{u.key==="Enter"&&a()}})}),S.jsx($u,{children:S.jsx(Oi,{onClick:()=>a(),children:"Load"})})]})})]})]})}function iO({children:n}){return S.jsx("div",{className:"bg-white dark:bg-black/40 shadow-xl p-4 space-y-2 rounded-lg sidebar-group",children:n})}const zX=()=>S.jsxs("div",{className:"mt-5",children:[S.jsx(z6,{}),S.jsx(q6,{})]}),qX={actions:S.jsx(zX,{})};function BX(n){const e=gr(),t=Or(),i=Object.assign({},qX,n.slots);return S.jsxs("div",{className:"flex flex-col gap-2",children:[e&&S.jsxs(S.Fragment,{children:[t==="setup"&&S.jsxs(iO,{children:[S.jsx(B6,{}),S.jsx(J6,{}),S.jsx(nX,{})]}),S.jsx(iO,{children:S.jsx(X6,{})}),t==="setup"&&S.jsx(iO,{children:S.jsx(LX,{})})]}),i.actions]})}function VX({className:n}){return S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 633 633",className:Ie("w-10 h-10",n),children:[S.jsxs("defs",{children:[S.jsxs("linearGradient",{id:"b",x1:"50%",x2:"50%",y1:"0%",y2:"71.65%",children:[S.jsx("stop",{offset:"0%",stopColor:"#6BDAFF"}),S.jsx("stop",{offset:"31.922%",stopColor:"#F9FFB5"}),S.jsx("stop",{offset:"70.627%",stopColor:"#FFA770"}),S.jsx("stop",{offset:"100%",stopColor:"#FF7373"})]}),S.jsxs("linearGradient",{id:"d",x1:"43.996%",x2:"53.441%",y1:"8.54%",y2:"93.872%",children:[S.jsx("stop",{offset:"0%",stopColor:"#673800"}),S.jsx("stop",{offset:"100%",stopColor:"#B65E00"})]}),S.jsxs("linearGradient",{id:"e",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#2F8A00"}),S.jsx("stop",{offset:"100%",stopColor:"#90FF57"})]}),S.jsxs("linearGradient",{id:"f",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#2F8A00"}),S.jsx("stop",{offset:"100%",stopColor:"#90FF57"})]}),S.jsxs("linearGradient",{id:"g",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#2F8A00"}),S.jsx("stop",{offset:"100%",stopColor:"#90FF57"})]}),S.jsxs("linearGradient",{id:"h",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#2F8A00"}),S.jsx("stop",{offset:"100%",stopColor:"#90FF57"})]}),S.jsxs("linearGradient",{id:"i",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#2F8A00"}),S.jsx("stop",{offset:"100%",stopColor:"#90FF57"})]}),S.jsxs("linearGradient",{id:"j",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#2F8A00"}),S.jsx("stop",{offset:"100%",stopColor:"#90FF57"})]}),S.jsxs("linearGradient",{id:"k",x1:"92.9%",x2:"8.641%",y1:"45.768%",y2:"54.892%",children:[S.jsx("stop",{offset:"0%",stopColor:"#EE2700"}),S.jsx("stop",{offset:"100%",stopColor:"#FF008E"})]}),S.jsxs("linearGradient",{id:"l",x1:"61.109%",x2:"43.717%",y1:"3.633%",y2:"43.072%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFF400"}),S.jsx("stop",{offset:"100%",stopColor:"#3C8700"})]}),S.jsxs("linearGradient",{id:"m",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFDF00"}),S.jsx("stop",{offset:"100%",stopColor:"#FF9D00"})]}),S.jsxs("linearGradient",{id:"n",x1:"127.279%",x2:"0%",y1:"49.778%",y2:"50.222%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFA400"}),S.jsx("stop",{offset:"100%",stopColor:"#FF5E00"})]}),S.jsxs("linearGradient",{id:"o",x1:"127.279%",x2:"0%",y1:"47.531%",y2:"52.469%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFA400"}),S.jsx("stop",{offset:"100%",stopColor:"#FF5E00"})]}),S.jsxs("linearGradient",{id:"p",x1:"127.279%",x2:"0%",y1:"46.195%",y2:"53.805%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFA400"}),S.jsx("stop",{offset:"100%",stopColor:"#FF5E00"})]}),S.jsxs("linearGradient",{id:"q",x1:"127.279%",x2:"0%",y1:"35.33%",y2:"64.67%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFA400"}),S.jsx("stop",{offset:"100%",stopColor:"#FF5E00"})]}),S.jsxs("linearGradient",{id:"r",x1:"127.279%",x2:"0%",y1:"4.875%",y2:"95.125%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFA400"}),S.jsx("stop",{offset:"100%",stopColor:"#FF5E00"})]}),S.jsxs("linearGradient",{id:"s",x1:"78.334%",x2:"31.668%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFA400"}),S.jsx("stop",{offset:"100%",stopColor:"#FF5E00"})]}),S.jsxs("linearGradient",{id:"t",x1:"57.913%",x2:"44.88%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFA400"}),S.jsx("stop",{offset:"100%",stopColor:"#FF5E00"})]}),S.jsxs("linearGradient",{id:"u",x1:"50.495%",x2:"49.68%",y1:"0%",y2:"100%",children:[S.jsx("stop",{offset:"0%",stopColor:"#FFA400"}),S.jsx("stop",{offset:"100%",stopColor:"#FF5E00"})]}),S.jsx("circle",{id:"a",cx:"308.5",cy:"308.5",r:"308.5"}),S.jsx("circle",{id:"v",cx:"307.5",cy:"308.5",r:"316.5"})]}),S.jsxs("g",{fill:"none",fillRule:"evenodd",transform:"translate(9 8)",children:[S.jsx("mask",{id:"c",fill:"#fff",children:S.jsx("use",{xlinkHref:"#a"})}),S.jsx("use",{xlinkHref:"#a",fill:"url(#b)"}),S.jsx("ellipse",{cx:"81.5",cy:"602.5",fill:"#015064",stroke:"#00CFE2",strokeWidth:"25",mask:"url(#c)",rx:"214.5",ry:"185.968"}),S.jsx("ellipse",{cx:"535.5",cy:"602.5",fill:"#015064",stroke:"#00CFE2",strokeWidth:"25",mask:"url(#c)",rx:"214.5",ry:"185.968"}),S.jsx("ellipse",{cx:"81.5",cy:"640.5",fill:"#015064",stroke:"#00A8B8",strokeWidth:"25",mask:"url(#c)",rx:"214.5",ry:"185.968"}),S.jsx("ellipse",{cx:"535.5",cy:"640.5",fill:"#015064",stroke:"#00A8B8",strokeWidth:"25",mask:"url(#c)",rx:"214.5",ry:"185.968"}),S.jsx("ellipse",{cx:"81.5",cy:"676.5",fill:"#015064",stroke:"#007782",strokeWidth:"25",mask:"url(#c)",rx:"214.5",ry:"185.968"}),S.jsx("ellipse",{cx:"535.5",cy:"676.5",fill:"#015064",stroke:"#007782",strokeWidth:"25",mask:"url(#c)",rx:"214.5",ry:"185.968"}),S.jsxs("g",{mask:"url(#c)",children:[S.jsx("path",{fill:"url(#d)",stroke:"#6E3A00",strokeWidth:"6.088",d:"M98.318 88.007c7.691 37.104 16.643 72.442 26.856 106.013 10.212 33.571 25.57 68.934 46.07 106.088l-51.903 11.67c-10.057-60.01-17.232-99.172-21.525-117.487-4.293-18.315-10.989-51.434-20.089-99.357l20.591-6.927",transform:"scale(-1 1) rotate(25 -300.37 -553.013)"}),S.jsxs("g",{stroke:"#2F8A00",children:[S.jsx("path",{fill:"url(#e)",strokeWidth:"9.343",d:"M108.544 66.538s-13.54-21.305-37.417-27.785c-15.917-4.321-33.933.31-54.048 13.892C33.464 65.975 47.24 73.52 58.405 75.28c16.749 2.64 50.14-8.74 50.14-8.74Z",transform:"rotate(1 -6061.691 5926.397)"}),S.jsx("path",{fill:"url(#f)",strokeWidth:"9.343",d:"M108.544 67.138s-47.187-5.997-81.077 19.936C4.873 104.362-3.782 137.794 1.502 187.369c28.42-29.22 48.758-50.836 61.016-64.846 18.387-21.016 46.026-55.385 46.026-55.385Z",transform:"rotate(1 -6061.691 5926.397)"}),S.jsx("path",{fill:"url(#g)",strokeWidth:"9.343",d:"M108.544 66.538c-1.96-21.705 3.98-38.018 17.82-48.94C140.203 6.674 154.85.808 170.303 0c-4.865 21.527-12.373 36.314-22.524 44.361-10.151 8.048-23.23 15.44-39.236 22.177Z",transform:"rotate(1 -6061.691 5926.397)"}),S.jsx("path",{fill:"url(#h)",strokeWidth:"9.343",d:"M108.544 67.138c29.838-31.486 61.061-42.776 93.669-33.869C234.82 42.176 253.749 60.785 259 89.096c-34.898-3.657-59.974-6.343-75.228-8.058-15.254-1.716-40.33-6.349-75.228-13.9Z",transform:"rotate(1 -6061.691 5926.397)"}),S.jsx("path",{fill:"url(#i)",strokeWidth:"9.343",d:"M108.544 67.138c34.868-9.381 64.503-3.658 88.905 17.17 24.402 20.829 39.656 46.686 45.762 77.571-39.626-7.574-68.4-20.115-86.322-37.624a395.051 395.051 0 0 1-48.345-57.117Z",transform:"rotate(1 -6061.691 5926.397)"}),S.jsx("path",{fill:"url(#j)",strokeWidth:"9.343",d:"M108.544 67.138C76.206 82.6 57.608 105.366 52.75 135.436c-4.858 30.07-.292 62.89 13.698 98.462 24.873-41.418 38.905-71.368 42.096-89.849 3.191-18.48 3.191-44.118 0-76.91Z",transform:"rotate(1 -6061.691 5926.397)"}),S.jsx("path",{strokeLinecap:"round",strokeWidth:"5.91",d:"M211.284 173.477c-13.851 21.992-23.291 42.022-28.32 60.093-5.03 18.071-8.175 33.143-9.436 45.216"}),S.jsx("path",{strokeLinecap:"round",strokeWidth:"5.91",d:"M209.814 176.884c-23.982 2.565-42.792 10.469-56.428 23.714-13.639 13.245-23.483 26.136-29.536 38.674M219.045 167.299c29.028-7.723 50.972-10.173 65.831-7.352 14.859 2.822 26.807 7.659 35.842 14.51M211.31 172.618c20.29 9.106 38.353 19.052 54.186 29.837 15.833 10.786 27.714 20.99 35.643 30.617"})]}),S.jsx("path",{stroke:"#830305",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"6.937",d:"m409.379 398.157-23.176 18.556M328.04 375.516l-22.313 28.398M312.904 353.698l53.18 59.816"}),S.jsx("path",{fill:"url(#k)",d:"M67.585 27.463H5.68C1.893 28.148 0 30.38 0 34.16c0 3.78 1.893 6.211 5.68 7.293h67.17l41.751-30.356c2.488-2.646 2.794-5.315.92-8.006s-4.6-3.626-8.177-2.803l-39.76 27.174Z",transform:"scale(-1 1) rotate(-9 2092.128 2856.854)"}),S.jsx("path",{fill:"#D8D8D8",stroke:"#FFF",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"4.414",d:"m402.861 391.51.471-4.088M382.21 388.752l.472-4.087M361.546 385.404l.485-3.845M337.59 371.883l2.56-2.498M324.276 359.567l2.56-2.497"})]}),S.jsx("ellipse",{cx:"308.5",cy:"720.5",fill:"url(#l)",mask:"url(#c)",rx:"266",ry:"316.5"}),S.jsx("ellipse",{cx:"308.5",cy:"720.5",stroke:"#6DA300",strokeOpacity:".502",strokeWidth:"26",mask:"url(#c)",rx:"253",ry:"303.5"}),S.jsx("g",{mask:"url(#c)",children:S.jsxs("g",{transform:"translate(389 -32)",children:[S.jsx("circle",{cx:"168.5",cy:"113.5",r:"113.5",fill:"url(#m)"}),S.jsx("circle",{cx:"168.5",cy:"113.5",r:"106",stroke:"#FFC900",strokeOpacity:".529",strokeWidth:"15"}),S.jsx("path",{stroke:"url(#n)",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"12",d:"M30 113H0"}),S.jsx("path",{stroke:"url(#o)",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"12",d:"M33.5 79.5 7 74"}),S.jsx("path",{stroke:"url(#p)",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"12",d:"m34 146-29 8"}),S.jsx("path",{stroke:"url(#q)",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"12",d:"m45 177-24 13"}),S.jsx("path",{stroke:"url(#r)",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"12",d:"m67 204-20 19"}),S.jsx("path",{stroke:"url(#s)",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"12",d:"m94.373 227-13.834 22.847"}),S.jsx("path",{stroke:"url(#t)",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"12",d:"M127.5 243.5 120 268"}),S.jsx("path",{stroke:"url(#u)",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:"12",d:"m167.5 252.5.5 24.5"})]})}),S.jsx("circle",{cx:"307.5",cy:"308.5",r:"304",stroke:"#000",strokeWidth:"25"})]})]})}function YX(){return S.jsxs("div",{className:"bg-white dark:bg-black/50 rounded-lg p-2 sm:p-4 flex items-center gap-2 text-lg sm:text-xl shadow-xl",children:[S.jsxs("div",{className:"flex items-center gap-1.5",children:[S.jsx(VX,{}),S.jsx("div",{className:"font-black text-xl uppercase",children:"TanStack"})]}),S.jsx("svg",{stroke:"currentColor",fill:"currentColor","stroke-width":"0",viewBox:"0 0 256 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:S.jsx("path",{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"})}),S.jsxs("div",{className:"hover:text-blue-500 flex items-center gap-2",children:["Create TanStack App"," ",S.jsx("span",{className:"bg-gradient-to-r from-blue-500 to-cyan-500 text-white text-xs font-bold px-2 py-0.5 rounded",children:"ALPHA"})]})]})}function UX(){const[n,e]=C.useState(!1);return C.useEffect(()=>{e(!0)},[]),n}const GX=()=>{const[n,e]=C.useState(null);return C.useEffect(()=>{const t=window.matchMedia("(prefers-reduced-motion: reduce)");e(t.matches);const i=r=>{e(r.matches)};return t.addEventListener("change",i),()=>{t.removeEventListener("change",i)}},[]),n};function IX(){const n=C.useRef(null),e=GX(),t=UX();return C.useEffect(()=>{if(e!==!1)return;const i=n.current;let r=2e3;const s=1e3*60*2,a=WX(.645,.045,.355,1);if(i){let w=function(){return k([{color:{h:10,s:100,l:50}},{color:{h:40,s:100,l:50}},{color:{h:150,s:100,l:50}},{color:{h:200,s:100,l:50}}]).map(j=>({...j,x:Math.random()*i.width,y:Math.random()*i.height,r:Math.random()*500+700,colorH:j.color.h,colorS:j.color.s,colorL:j.color.l}))},k=function(j){for(let Y=j.length-1;Y>0;Y--){const J=Math.floor(Math.random()*(Y+1));[j[Y],j[J]]=[j[J],j[Y]]}return j},R=function(){const j=document.createElement("canvas");j.width=i.width,j.height=i.height,j.getContext("2d").drawImage(i,0,0),i.width=window.innerWidth,i.height=window.innerHeight,O.drawImage(j,0,0,i.width,i.height)},_=function(){b&&clearTimeout(b),v&&cancelAnimationFrame(v),T=JSON.parse(JSON.stringify(A)),$=w(),x=performance.now(),D()},D=function(){O.clearRect(0,0,i.width,i.height);const Y=(performance.now()-x)/r,J=a(Y);T.forEach((I,W)=>{const ae=$[W];A[W].x=Cc(I.x,ae.x,J),A[W].y=Cc(I.y,ae.y,J);const le=O.createRadialGradient(A[W].x,A[W].y,0,A[W].x,A[W].y,A[W].r);A[W].colorH=Cc(I.colorH,ae.colorH,J),A[W].colorS=Cc(I.colorS,ae.colorS,J),A[W].colorL=Cc(I.colorL,ae.colorL,J),le.addColorStop(0,`hsla(${A[W].colorH}, ${A[W].colorS}%, ${A[W].colorL}%, 1)`),le.addColorStop(1,`hsla(${A[W].colorH}, ${A[W].colorS}%, ${A[W].colorL}%, 0)`),O.fillStyle=le,O.beginPath(),O.arc(A[W].x,A[W].y,A[W].r,0,Math.PI*2),O.fill()}),Y<1?v=requestAnimationFrame(D):b=setTimeout(()=>{r=4e3,_()},s)};var c=w,u=k,h=R,p=_,m=D;const O=i.getContext("2d");let v=null,b=null,x=performance.now(),T=w(),A=T,$=[];return R(),_(),window.addEventListener("resize",R),()=>{v&&cancelAnimationFrame(v),b&&clearTimeout(b),window.removeEventListener("resize",R)}}},[e]),S.jsx("div",{className:qC("fixed inset-0 z-0 opacity-20 pointer-events-none","transition-opacity duration-[2s] ease-linear","[&+*]:relative",t?"opacity-10 dark:opacity-20":"opacity-0"),children:S.jsx("canvas",{ref:n})})}function WX(n,e,t,i){return function(r){const s=3*e,a=3*(i-e)-s;return(((1-s-a)*r+a)*r+s)*r}}function Cc(n,e,t){return n+(e-n)*t}const Da={unchanged:"text-gray-500",added:"text-green-500 font-bold",modified:"text-blue-500 italic",deleted:"text-red-500 line-through",overwritten:"text-red-700 underline"},HX=(n,e,t,i,r)=>i[n]?r.includes(n)?{fileClass:"deleted",originalFile:i[n]}:e[n]&&i[n]!==e[n]?t[n]&&i[n]!==t[n]?{fileClass:"overwritten",originalFile:i[n],modifiedFile:e[n]}:{fileClass:"modified",originalFile:i[n],modifiedFile:e[n]}:{fileClass:"unchanged",modifiedFile:i[n]}:{fileClass:"added",modifiedFile:e[n]};function it(){return it=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},it.apply(null,arguments)}function nl(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let d0=[],ZP=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?ZP:d0).push(t=t+n[e])})();function FX(n){if(n<768)return!1;for(let e=0,t=d0.length;;){let i=e+t>>1;if(n<d0[i])t=i;else if(n>=ZP[i])e=i+1;else return!0;if(e==t)return!1}}function ik(n){return n>=127462&&n<=127487}const rk=8205;function KX(n,e,t=!0,i=!0){return(t?XP:JX)(n,e,i)}function XP(n,e,t){if(e==n.length)return e;e&&LP(n.charCodeAt(e))&&zP(n.charCodeAt(e-1))&&e--;let i=rO(n,e);for(e+=sk(i);e<n.length;){let r=rO(n,e);if(i==rk||r==rk||t&&FX(r))e+=sk(r),i=r;else if(ik(r)){let s=0,a=e-2;for(;a>=0&&ik(rO(n,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function JX(n,e,t){for(;e>0;){let i=XP(n,e-2,t);if(i<e)return i;e--}return 0}function rO(n,e){let t=n.charCodeAt(e);if(!zP(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return LP(i)?(t-55296<<10)+(i-56320)+65536:t}function LP(n){return n>=56320&&n<57344}function zP(n){return n>=55296&&n<56320}function sk(n){return n<65536?1:2}class Ve{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=il(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),nr.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=il(this,e,t);let i=[];return this.decompose(e,t,i,0),nr.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Gc(this),s=new Gc(e);for(let a=t,c=t;;){if(r.next(a),s.next(a),a=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(c+=r.value.length,r.done||c>=i)return!0}}iter(e=1){return new Gc(this,e)}iterRange(e,t=this.length){return new qP(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new BP(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ve.empty:e.length<=32?new Mt(e):nr.from(Mt.split(e,[]))}}class Mt extends Ve{constructor(e,t=e8(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let a=this.text[s],c=r+a.length;if((t?i:c)>=e)return new t8(r,c,i,a);r=c+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new Mt(ok(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let a=i.pop(),c=ed(s.text,a.text.slice(),0,s.length);if(c.length<=32)i.push(new Mt(c,a.length+s.length));else{let u=c.length>>1;i.push(new Mt(c.slice(0,u)),new Mt(c.slice(u)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof Mt))return super.replace(e,t,i);[e,t]=il(this,e,t);let r=ed(this.text,ed(i.text,ok(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new Mt(r,s):nr.from(Mt.split(r,[]),s)}sliceString(e,t=this.length,i=`
200
200
  `){[e,t]=il(this,e,t);let r="";for(let s=0,a=0;s<=t&&a<this.text.length;a++){let c=this.text[a],u=s+c.length;s>e&&a&&(r+=i),e<u&&t>s&&(r+=c.slice(Math.max(0,e-s),t-s)),s=u+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new Mt(i,r)),i=[],r=-1);return r>-1&&t.push(new Mt(i,r)),t}}class nr extends Ve{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let a=this.children[s],c=r+a.length,u=i+a.lines-1;if((t?u:c)>=e)return a.lineInner(e,t,i,r);r=c+1,i=u+1}}decompose(e,t,i,r){for(let s=0,a=0;a<=t&&s<this.children.length;s++){let c=this.children[s],u=a+c.length;if(e<=u&&t>=a){let h=r&((a<=e?1:0)|(u>=t?2:0));a>=e&&u<=t&&!h?i.push(c):c.decompose(e-a,t-a,i,h)}a=u+1}}replace(e,t,i){if([e,t]=il(this,e,t),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let a=this.children[r],c=s+a.length;if(e>=s&&t<=c){let u=a.replace(e-s,t-s,i),h=this.lines-a.lines+u.lines;if(u.lines<h>>4&&u.lines>h>>6){let p=this.children.slice();return p[r]=u,new nr(p,this.length-(t-e)+i.length)}return super.replace(s,c,u)}s=c+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
201
201
  `){[e,t]=il(this,e,t);let r="";for(let s=0,a=0;s<this.children.length&&a<=t;s++){let c=this.children[s],u=a+c.length;a>e&&s&&(r+=i),e<u&&t>a&&(r+=c.sliceString(e-a,t-a,i)),a=u+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof nr))return 0;let i=0,[r,s,a,c]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==a||s==c)return i;let u=this.children[r],h=e.children[s];if(u!=h)return i+u.scanIdentical(h,t);i+=u.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let v of e)i+=v.lines;if(i<32){let v=[];for(let b of e)b.flatten(v);return new Mt(v,t)}let r=Math.max(32,i>>5),s=r<<1,a=r>>1,c=[],u=0,h=-1,p=[];function m(v){let b;if(v.lines>s&&v instanceof nr)for(let x of v.children)m(x);else v.lines>a&&(u>a||!u)?(O(),c.push(v)):v instanceof Mt&&u&&(b=p[p.length-1])instanceof Mt&&v.lines+b.lines<=32?(u+=v.lines,h+=v.length+1,p[p.length-1]=new Mt(b.text.concat(v.text),b.length+1+v.length)):(u+v.lines>r&&O(),u+=v.lines,h+=v.length+1,p.push(v))}function O(){u!=0&&(c.push(p.length==1?p[0]:nr.from(p,h)),h=-1,u=p.length=0)}for(let v of e)m(v);return O(),c.length==1?c[0]:new nr(c,t)}}Ve.empty=new Mt([""],0);function e8(n){let e=-1;for(let t of n)e+=t.length+1;return e}function ed(n,e,t=0,i=1e9){for(let r=0,s=0,a=!0;s<n.length&&r<=i;s++){let c=n[s],u=r+c.length;u>=t&&(u>i&&(c=c.slice(0,i-r)),r<t&&(c=c.slice(t-r)),a?(e[e.length-1]+=c,a=!1):e.push(c)),r=u+1}return e}function ok(n,e,t){return ed(n,[""],e,t)}class Gc{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Mt?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],a=s>>1,c=r instanceof Mt?r.text.length:r.children.length;if(a==(t>0?c:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
@@ -330,4 +330,4 @@ function alsShim(): PluginOption {
330
330
  }
331
331
  `;function hW(n,e){let t=e;return n==="vite.config.ts"&&(t+=fW,t=t.replace("plugins: [",`${cW}plugins: [alsShim(),`)),t}const IQ=n=>{let e=n;return e=e.replace(/\u001b\[[0-9;]*[a-zA-Z]/g,""),e=e.replace(/\u001b\][0-9;]*;[^\u0007]*\u0007/g,""),e=e.replace(/\u001b[=>]/g,""),e=e.replace(/\r/g,""),e=e.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f]/g,""),e=e.replace(/[⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏]/g,""),e=e.replace(/[▀▁▂▃▄▅▆▇█▉▊▋▌▍▎▏]/g,""),e=e.replace(/[░▒▓]/g,""),e=e.trim(),e.length>0?e:""};let YO=null;function dW(n){return YO||(YO=Yr.boot()),eC((t,i)=>({webContainer:YO,ready:!1,setupStep:"mounting",statusMessage:"",terminalOutput:[],previewUrl:null,error:null,devProcess:null,projectFiles:[],isInstalling:!1,teardown:()=>{t({webContainer:null,ready:!1})},addTerminalOutput:r=>{t(({terminalOutput:s})=>({terminalOutput:[...s,r]}))},setTerminalOutput:r=>{t({terminalOutput:r})},startDevServer:async()=>{const{devProcess:r,webContainer:s,addTerminalOutput:a}=i();if(!s)throw new Error("WebContainer not found");try{const c=await s;if(!c)throw new Error("WebContainer not found");r&&(console.log("Killing existing dev process..."),r.kill(),t({devProcess:null})),t({setupStep:"starting",statusMessage:"Starting development server..."}),a("🚀 Starting dev server..."),c.on("server-ready",(p,m)=>{console.log("Server ready on port",p,"at",m);const O=i();t({previewUrl:m,setupStep:"ready",statusMessage:"Development server running",terminalOutput:[...O.terminalOutput,`✅ Server ready at ${m}`]})});const u=await c.spawn("pnpm",["dev"]);t({devProcess:u}),u.output.pipeTo(new WritableStream({write(p){const m=IQ(p);if(m&&m.length>3){console.log("[DEV]",m);const O=i();t({terminalOutput:[...O.terminalOutput,m]})}}}));const h=await u.exit;h!==0&&(a(`❌ Dev server exited with code ${h}`),t({error:`Dev server exited with code ${h}`}))}catch(c){console.error("Dev server start error:",c),a(`❌ Dev server error: ${c.message}`),t({error:c.message,setupStep:"error"})}},updateProjectFiles:async r=>{const{projectFiles:s,addTerminalOutput:a,installDependencies:c,webContainer:u}=i();if(!u)throw console.error("WebContainer not found in updateProjectFiles"),new Error("WebContainer not found");try{const O=await u;if(!O)throw console.error("WebContainer resolved to null"),new Error("WebContainer not found");console.log("WebContainer booted successfully!",O)}catch(O){throw console.error("WebContainer boot failed:",O),t({error:`WebContainer boot failed: ${O.message}`,setupStep:"error"}),O}const h=await u;let p=!1;const m={};if(s.length===0){const O={};for(const{path:v,content:b}of r){const x=v.replace(/^\.?\//,""),w=x.split("/");let k=O;for(let $=0;$<w.length-1;$++){const R=w[$];k[R]||(k[R]={directory:{}}),k=k[R].directory}const T=w[w.length-1],A=hW(T,b);if(A.startsWith("base64::")){const $=A.replace("base64::","");try{const R=$.replace(/\s/g,""),_=atob(R),D=new Uint8Array(_.length);for(let j=0;j<_.length;j++)D[j]=_.charCodeAt(j)&255;m[x]=D}catch(R){console.error(`[BINARY ERROR] Failed to convert ${x}:`,R)}}else k[T]={file:{contents:String(A)}}}await h.mount(O);for(const[v,b]of Object.entries(m))await h.fs.writeFile(v,b);p=!0}else{const O=new Map;for(const{path:w,content:k}of s)O.set(w,k);const v=new Map;for(const{path:w,content:k}of r)v.set(w,k);const b=[];for(const{path:w,content:k}of r)O.has(w)?O.get(w)!==k&&b.push({path:w,content:k}):b.push({path:w,content:k});const x=[];for(const{path:w}of s)v.has(w)||x.push(w);if(b.length>0||x.length>0){const{devProcess:w}=i();w&&(console.log("Stopping dev server before file update..."),a("⏸️ Stopping dev server before updating files..."),w.kill(),t({devProcess:null,previewUrl:null}));for(const{path:k,content:T}of b)await h.fs.writeFile(k,T);for(const k of x)await h.fs.rm(k);a("📁 Files updated successfully"),b.some(({path:k})=>k==="./package.json")&&(p=!0)}}t({projectFiles:r}),p&&(a("📦 Package.json changed, reinstalling dependencies..."),await c())},installDependencies:async()=>{const{webContainer:r,addTerminalOutput:s,startDevServer:a,isInstalling:c}=i();if(c){console.log("Install already in progress, skipping");return}if(!r)throw new Error("WebContainer not found");t({isInstalling:!0});try{const u=await r;if(!u)throw t({isInstalling:!1}),new Error("WebContainer not found");t({setupStep:"installing",statusMessage:"Installing dependencies..."}),console.log("Starting pnpm install..."),s("📦 Running pnpm install..."),s("⏳ This may take a minute...");let h;try{h=await u.spawn("pnpm",["install"]),console.log("pnpm install process spawned successfully")}catch(x){throw console.error("Failed to spawn pnpm install:",x),x}let p=0,m=Date.now(),O=[],v=setInterval(()=>{const x=Math.floor((Date.now()-m)/1e3);console.log(`[INSTALL] Still running... (${x}s, ${p} output chunks)`)},5e3);h.output.pipeTo(new WritableStream({write(x){p++,O.push(x);const w=IQ(x);if(w&&w.length>3){const k=w.includes("added")||w.includes("removed")||w.includes("changed")||w.includes("audited")||w.includes("packages")||w.includes("error")||w.includes("warn")||w.includes("ERR")||w.includes("FAIL");k&&(console.log("[INSTALL]",w),s(w),k&&v&&(clearInterval(v),v=void 0))}}})),console.log("Waiting for install to complete...");const b=await h.exit;if(v&&clearInterval(v),console.log("Install exit code:",b),console.log("Total output lines:",p),b!==0){console.error("[INSTALL ERROR] All output:",O.join(`
332
332
  `));const x=`pnpm install failed with exit code ${b}`;throw s(`❌ ${x}`),s("💡 Check console for detailed error output"),t({error:x,setupStep:"error"}),new Error(x)}s("✅ Dependencies installed successfully"),await a()}catch(u){throw console.error("Install error:",u),s(`❌ Install error: ${u.message}`),t({error:u.message,setupStep:"error"}),u}finally{t({isInstalling:!1})}}}))}const CE=C.createContext(null);function pW({children:n,projectFiles:e}){console.log("WebContainerProvider rendering with",e.length,"files");const[t]=C.useState(()=>dW()),i=Ji(t,r=>r.updateProjectFiles);return C.useEffect(()=>{console.log("WebContainerProvider useEffect triggered with",e.length,"files"),i(e)},[i,e]),S.jsx(CE.Provider,{value:t,children:n})}function mW(){const n=C.useContext(CE);if(!n)throw new Error("WebContainerContext not found");const e=Ji(n,b=>b.webContainer),t=Ji(n,b=>b.setupStep),i=Ji(n,b=>b.statusMessage),r=Ji(n,b=>b.terminalOutput),s=Ji(n,b=>b.error),a=Ji(n,b=>b.previewUrl),c=Ji(n,b=>b.startDevServer),u=Ji(n,b=>b.setTerminalOutput),[h,p]=C.useState(!1),m=C.useRef(null);C.useEffect(()=>{m.current&&(m.current.scrollTop=m.current.scrollHeight)},[r]);const O=b=>{switch(b){case"mounting":return"📁";case"installing":return"📦";case"starting":return"🚀";case"ready":return"✅";case"error":return"❌"}},v=b=>{switch(b){case"error":return"text-red-500";case"ready":return"text-green-500";default:return"text-blue-500"}};return!e||t==="error"||t!=="ready"||!a?S.jsx("div",{className:"flex items-center justify-center h-full bg-gray-50 dark:bg-gray-900",children:S.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-xl p-8 max-w-2xl w-full mx-4 border-2 border-blue-500",children:[S.jsx("h2",{className:"text-2xl font-bold mb-6 text-center",children:t==="error"?"Setup Failed":"Preparing Preview"}),t==="error"?S.jsxs("div",{className:"text-center",children:[S.jsx("div",{className:"text-4xl mb-4",children:"❌"}),S.jsx("div",{className:"text-lg font-medium text-red-600 mb-2",children:"An error occurred"}),S.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:s}),S.jsx("button",{onClick:c,className:"px-4 py-2 text-sm bg-orange-500 text-white rounded hover:bg-orange-600 transition-colors",children:"🔄 Retry"})]}):S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"space-y-4 mb-6",children:[S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:`text-2xl ${t==="mounting"?"animate-pulse":""}`,children:O("mounting")}),S.jsx("div",{className:`flex-1 ${v(t==="mounting"?"mounting":t==="installing"||t==="starting"||t==="ready"?"ready":"mounting")}`,children:"Mount Files"}),(t==="installing"||t==="starting"||t==="ready")&&"✓"]}),S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:`text-2xl ${t==="installing"?"animate-spin":""}`,children:O("installing")}),S.jsx("div",{className:`flex-1 ${v(t==="installing"?"installing":t==="starting"||t==="ready"?"ready":"mounting")}`,children:"Install Dependencies"}),(t==="starting"||t==="ready")&&"✓"]}),S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:`text-2xl ${t==="starting"?"animate-bounce":""}`,children:O("starting")}),S.jsx("div",{className:`flex-1 ${v(t==="starting"?"starting":t==="ready"?"ready":"mounting")}`,children:"Start Server"}),t==="ready"&&"✓"]})]}),S.jsx("div",{className:"text-center text-sm text-gray-600 dark:text-gray-400",children:i||"Preparing your application..."})]})]})}):S.jsxs("div",{className:"flex flex-col h-full",children:[S.jsx("div",{className:"flex-1",children:a?S.jsx("iframe",{src:a,className:"w-full h-full border-0",title:"Application Preview",onLoad:()=>console.log("Iframe loaded successfully"),onError:b=>console.error("Iframe load error:",b)}):S.jsx("div",{className:"flex items-center justify-center h-full bg-gray-100 dark:bg-gray-800",children:S.jsxs("div",{className:"text-center",children:[S.jsx("div",{className:"text-2xl mb-2",children:"🔄"}),S.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Preview not available"})]})})}),S.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 bg-black text-green-400 flex flex-col flex-shrink-0",children:[S.jsxs("div",{className:"p-2 border-b border-gray-700 bg-gray-900 flex items-center justify-between cursor-pointer hover:bg-gray-800 transition-colors",onClick:()=>p(!h),children:[S.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[S.jsx("button",{className:"text-gray-400 hover:text-gray-200",children:h?S.jsx(yC,{className:"w-4 h-4"}):S.jsx(bD,{className:"w-4 h-4"})}),S.jsx("div",{className:"text-xs font-medium text-gray-300",children:"Terminal Output"}),t==="ready"&&a&&S.jsx("div",{className:"text-xs text-green-500",children:"● Server Running"})]}),S.jsxs("div",{className:"flex items-center gap-2",onClick:b=>b.stopPropagation(),children:[a&&S.jsx("button",{onClick:()=>window.open(a,"_blank"),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors",children:"Open in New Tab"}),S.jsx("button",{onClick:c,disabled:!e,className:"px-2 py-1 text-xs bg-orange-500 text-white rounded hover:bg-orange-600 transition-colors disabled:opacity-50",children:"🔄 Restart"}),S.jsx("button",{onClick:()=>u([]),className:"text-xs text-gray-400 hover:text-gray-200 transition-colors",children:"Clear"})]})]}),h&&S.jsx("div",{ref:m,className:"font-mono text-xs p-2 overflow-y-auto overflow-x-hidden",style:{maxHeight:"200px"},children:r.length>0?r.map((b,x)=>S.jsx("div",{className:"mb-1 leading-tight whitespace-pre-wrap break-words",children:b},x)):S.jsx("div",{className:"text-gray-500",children:"No output yet..."})})]})]})}var Mp="Tabs",[gW,GW]=Zi(Mp,[Sl]),TE=Sl(),[OW,hb]=gW(Mp),PE=C.forwardRef((n,e)=>{const{__scopeTabs:t,value:i,onValueChange:r,defaultValue:s,orientation:a="horizontal",dir:c,activationMode:u="automatic",...h}=n,p=Eu(c),[m,O]=Xi({prop:i,onChange:r,defaultProp:s??"",caller:Mp});return S.jsx(OW,{scope:t,baseId:Ir(),value:m,onValueChange:O,orientation:a,dir:p,activationMode:u,children:S.jsx(ze.div,{dir:p,"data-orientation":a,...h,ref:e})})});PE.displayName=Mp;var AE="TabsList",ME=C.forwardRef((n,e)=>{const{__scopeTabs:t,loop:i=!0,...r}=n,s=hb(AE,t),a=TE(t);return S.jsx(Gy,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:i,children:S.jsx(ze.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});ME.displayName=AE;var RE="TabsTrigger",$E=C.forwardRef((n,e)=>{const{__scopeTabs:t,value:i,disabled:r=!1,...s}=n,a=hb(RE,t),c=TE(t),u=DE(a.baseId,i),h=jE(a.baseId,i),p=i===a.value;return S.jsx(Iy,{asChild:!0,...c,focusable:!r,active:p,children:S.jsx(ze.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:u,...s,ref:e,onMouseDown:Ae(n.onMouseDown,m=>{!r&&m.button===0&&m.ctrlKey===!1?a.onValueChange(i):m.preventDefault()}),onKeyDown:Ae(n.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&a.onValueChange(i)}),onFocus:Ae(n.onFocus,()=>{const m=a.activationMode!=="manual";!p&&!r&&m&&a.onValueChange(i)})})})});$E.displayName=RE;var EE="TabsContent",_E=C.forwardRef((n,e)=>{const{__scopeTabs:t,value:i,forceMount:r,children:s,...a}=n,c=hb(EE,t),u=DE(c.baseId,i),h=jE(c.baseId,i),p=i===c.value,m=C.useRef(p);return C.useEffect(()=>{const O=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(O)},[]),S.jsx(yr,{present:r||p,children:({present:O})=>S.jsx(ze.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!O,id:h,tabIndex:0,...a,ref:e,style:{...n.style,animationDuration:m.current?"0s":void 0},children:O&&s})})});_E.displayName=EE;function DE(n,e){return`${n}-trigger-${e}`}function jE(n,e){return`${n}-content-${e}`}var yW=PE,vW=ME,bW=$E,xW=_E;function SW({className:n,...e}){return S.jsx(yW,{"data-slot":"tabs",className:Ie("flex flex-col gap-2",n),...e})}function wW({className:n,...e}){return S.jsx(vW,{"data-slot":"tabs-list",className:Ie("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",n),...e})}function WQ({className:n,...e}){return S.jsx(bW,{"data-slot":"tabs-trigger",className:Ie("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-medium 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 HQ({className:n,...e}){return S.jsx(xW,{"data-slot":"tabs-content",className:Ie("flex-1 outline-none",n),...e})}function kW(){const{includedFiles:n,toggleFilter:e}=gC();return S.jsxs("div",{className:"bg-white dark:bg-black/40 shadow-xl p-4 rounded-lg flex flex-row items-center gap-4 mb-2",children:[S.jsx("h3",{className:"font-medium whitespace-nowrap",children:"File Filters"}),S.jsxs("div",{className:"flex flex-row items-center",children:[S.jsx(Ur,{id:"unchanged",checked:n.includes("unchanged"),onCheckedChange:()=>e("unchanged"),className:"mr-2"}),S.jsx(er,{htmlFor:"unchanged",className:Da.unchanged,children:"Unchanged"})]}),S.jsxs("div",{className:"flex flex-row items-center",children:[S.jsx(Ur,{id:"added",checked:n.includes("added"),onCheckedChange:()=>e("added"),className:"mr-2"}),S.jsx(er,{htmlFor:"added",className:Da.added,children:"Added"})]}),S.jsxs("div",{className:"flex flex-row items-center",children:[S.jsx(Ur,{id:"modified",checked:n.includes("modified"),onCheckedChange:()=>e("modified"),className:"mr-2"}),S.jsx(er,{htmlFor:"modified",className:Da.modified,children:"Modified"})]}),S.jsxs("div",{className:"flex flex-row items-center",children:[S.jsx(Ur,{id:"deleted",checked:n.includes("deleted"),onCheckedChange:()=>e("deleted"),className:"mr-2"}),S.jsx(er,{htmlFor:"deleted",className:Da.deleted,children:"Deleted"})]}),S.jsxs("div",{className:"flex flex-row items-center",children:[S.jsx(Ur,{id:"overwritten",checked:n.includes("overwritten"),onCheckedChange:()=>e("overwritten"),className:"mr-2"}),S.jsx(er,{htmlFor:"overwritten",className:Da.overwritten,children:"Overwritten"})]})]})}function QW(){const[n,e]=C.useState("./package.json"),t=H_(),i=W_(),r=oD(),s=Or(),a=r.files,c=s==="setup"?r.files:t?.files,u=r.deletedFiles,[h,p]=C.useState(),[m,O]=C.useState(),{includedFiles:v}=gC(),b=C.useMemo(()=>{const k=[];return!c||!i||Array.from(new Set([...Object.keys(a),...Object.keys(i),...Object.keys(c)])).sort().forEach(A=>{const $=A.replace("./",""),R=$.split("/");let _=k;R.forEach((D,j)=>{const Y=_.find(J=>J.name===D);if(Y)_=Y.children||[];else{const J=HX(A,a,c,i,u);if(j===R.length-1&&!v.includes(J.fileClass))return;j===R.length-1&&A===n&&(O(J.modifiedFile),p(J.originalFile));const I={id:R.slice(0,j+1).join("/"),name:D,fullPath:$,children:j<R.length-1?[]:void 0,icon:j<R.length-1?()=>S.jsx(bC,{className:"w-4 h-4 mr-2"}):()=>S.jsx(vC,{className:"w-4 h-4 mr-2"}),onClick:j===R.length-1?()=>{e(A),O(J.modifiedFile),p(J.originalFile)}:void 0,className:Da[J.fileClass],...J,contents:a[A]||i[A]||c[A]};_.push(I),_=I.children}})}),k},[a,c,i,v]),x=gr(),w=C.useMemo(()=>{if(console.log("Preparing WebContainer files, tree:",a),!a)return console.log("Tree is empty, returning empty array"),[];const k=Object.entries(a).map(([T,A])=>({path:T,content:A}));return console.log("WebContainer files prepared:",k.length,"files"),k},[a]);return x?S.jsx(pW,{projectFiles:w,children:S.jsxs("div",{className:"bg-white dark:bg-black/50 rounded-lg p-2 sm:p-4",children:[s==="add"&&S.jsx(kW,{}),S.jsxs(SW,{defaultValue:"files",className:"w-full",children:[S.jsxs(wW,{className:"mb-1 h-7 p-0.5 bg-transparent border border-gray-300 dark:border-gray-700",children:[S.jsx(WQ,{value:"files",className:"text-xs h-6 px-3 py-0 data-[state=active]:bg-gray-200 dark:data-[state=active]:bg-gray-800",children:"Files"}),S.jsx(WQ,{value:"preview",className:"text-xs h-6 px-3 py-0 data-[state=active]:bg-gray-200 dark:data-[state=active]:bg-gray-800",children:"Preview"})]}),S.jsx(HQ,{value:"files",className:"mt-0",children:S.jsxs("div",{className:"flex flex-row @container",children:[S.jsx("div",{className:"w-1/3 @6xl:w-1/4 bg-gray-500/10 rounded-l-lg",children:S.jsx(_I,{selectedFile:n,tree:b})}),S.jsx("div",{className:"w-2/3 @6xl:w-3/4",children:n&&m?S.jsx(pI,{filePath:n,originalFile:h,modifiedFile:m}):null})]})}),S.jsx(HQ,{value:"preview",className:"mt-0",children:S.jsx("div",{className:"h-[800px]",children:S.jsx(mW,{})})})]})]})}):null}function CW(){const n=Or(),e=ky(),{open:t,setOpen:i,dontShowAgain:r,setDontShowAgain:s}=aD();if(n!=="setup"||!e||e?.starters?.length===0)return null;async function a(c){const u=await dC(c);"error"in u?Py.error("Failed to load starter",{description:u.error}):(JO(u),i(!1))}return S.jsx(jo,{modal:!0,open:t,onOpenChange:i,children:S.jsxs(No,{className:"sm:min-w-[425px] sm:max-w-fit",children:[S.jsx(yl,{children:S.jsx(vl,{className:"text-center text-2xl font-bold",children:"Would you like to use a starter project?"})}),S.jsx("div",{children:S.jsx(NP,{onImport:a})}),S.jsxs($u,{className:"flex sm:justify-between w-full",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx(Ur,{id:"show-startup-dialog",checked:r,onCheckedChange:s}),S.jsx(er,{htmlFor:"show-startup-dialog",children:"Don't show this again"})]}),S.jsx(Oi,{onClick:()=>i(!1),children:"No, I want to start from scratch"})]})]})})}var TW=(n,e,t,i,r,s,a,c)=>{let u=document.documentElement,h=["light","dark"];function p(v){(Array.isArray(n)?n:[n]).forEach(b=>{let x=b==="class",w=x&&s?r.map(k=>s[k]||k):r;x?(u.classList.remove(...w),u.classList.add(s&&s[v]?s[v]:v)):u.setAttribute(b,v)}),m(v)}function m(v){c&&h.includes(v)&&(u.style.colorScheme=v)}function O(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(i)p(i);else try{let v=localStorage.getItem(e)||t,b=a&&v==="system"?O():v;p(b)}catch{}},PW=C.createContext(void 0),AW={setTheme:n=>{},themes:[]},MW=()=>{var n;return(n=C.useContext(PW))!=null?n:AW};C.memo(({forcedTheme:n,storageKey:e,attribute:t,enableSystem:i,enableColorScheme:r,defaultTheme:s,value:a,themes:c,nonce:u,scriptProps:h})=>{let p=JSON.stringify([t,e,s,n,c,a,i,r]).slice(1,-1);return C.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${TW.toString()})(${p})`}})});const RW=({...n})=>{const{theme:e="system"}=MW();return S.jsx(vj,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...n})};function $W({children:n}){const[e]=C.useState(()=>new S_);return S.jsx(T_,{client:e,children:n})}function EW({children:n}){return hD(),S.jsxs(S.Fragment,{children:[n,S.jsx(RW,{})]})}function _W({children:n}){return S.jsx($W,{children:S.jsx(EW,{children:n})})}const DW={header:S.jsx(YX,{}),sidebar:S.jsx(BX,{}),fileNavigator:S.jsx(QW,{}),startupDialog:S.jsx(CW,{})};function jW(n){const e=Object.assign({},DW,n.slots);return S.jsx(_W,{children:S.jsxs("main",{className:"min-w-[1280px]",children:[S.jsx(IX,{}),S.jsxs("div",{className:"min-h-dvh p-2 sm:p-4 space-y-2 sm:space-y-4 @container",children:[e.header,S.jsxs("div",{className:"flex flex-row",children:[S.jsx("div",{className:"w-1/3 @8xl:w-1/4 pr-2",children:e.sidebar}),S.jsx("div",{className:"w-2/3 @8xl:w-3/4 pl-2",children:e.fileNavigator})]})]}),e.startupDialog]})})}const FQ=document.getElementById("root");FQ&&t_.createRoot(FQ).render(S.jsx(jW,{}));
333
- //# sourceMappingURL=index-C7V_rFNl.js.map
333
+ //# sourceMappingURL=index-DZuzT0kn.js.map