hjworktree-cli 2.1.0 → 2.3.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.
@@ -37,7 +37,7 @@
37
37
  `+c[D].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=D&&0<=N);break}}}finally{Z=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?P(e):""}function ce(e){switch(e.tag){case 5:return P(e.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return e=re(e.type,!1),e;case 11:return e=re(e.type.render,!1),e;case 1:return e=re(e.type,!0),e;default:return""}}function he(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case L:return"Fragment";case b:return"Portal";case A:return"Profiler";case S:return"StrictMode";case I:return"Suspense";case Q:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case j:return(e.displayName||"Context")+".Consumer";case F:return(e._context.displayName||"Context")+".Provider";case W:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case ne:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}function U(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function B(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function J(e){var t=ee(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,p=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(D){i=""+D,p.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(D){i=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function de(e){e._valueTracker||(e._valueTracker=J(e))}function ue(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=ee(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Ee(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Re(e,t){var r=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Te(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=B(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Xe(e,t){t=t.checked,t!=null&&n(e,"checked",t,!1)}function ye(e,t){Xe(e,t);var r=B(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Er(e,t.type,r):t.hasOwnProperty("defaultValue")&&Er(e,t.type,B(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jt(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Er(e,t,r){(t!=="number"||Ee(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wt=Array.isArray;function Mt(e,t,r,i){if(e=e.options,t){t={};for(var c=0;c<r.length;c++)t["$"+r[c]]=!0;for(r=0;r<e.length;r++)c=t.hasOwnProperty("$"+e[r].value),e[r].selected!==c&&(e[r].selected=c),c&&i&&(e[r].defaultSelected=!0)}else{for(r=""+B(r),t=null,c=0;c<e.length;c++){if(e[c].value===r){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Zt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(h(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function rt(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(h(92));if(Wt(r)){if(1<r.length)throw Error(h(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:B(r)}}function er(e,t){var r=B(t.value),i=B(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function dt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function tr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function kr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?tr(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ft,br=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,c){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,c)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ft=ft||document.createElement("div"),ft.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ft.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nt(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var xt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ae=["Webkit","ms","Moz","O"];Object.keys(xt).forEach(function(e){Ae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xt[t]=xt[e]})});function Yi(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||xt.hasOwnProperty(e)&&xt[e]?(""+t).trim():t+"px"}function Al(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,c=Yi(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,c):e[r]=c}}var Yh=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gn(e,t){if(t){if(Yh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(h(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(h(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(h(61))}if(t.style!=null&&typeof t.style!="object")throw Error(h(62))}}function Sn(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yn=null;function Cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wn=null,Fr=null,jr=null;function Bl(e){if(e=Ai(e)){if(typeof wn!="function")throw Error(h(280));var t=e.stateNode;t&&(t=Ss(t),wn(e.stateNode,e.type,t))}}function Ol(e){Fr?jr?jr.push(e):jr=[e]:Fr=e}function Pl(){if(Fr){var e=Fr,t=jr;if(jr=Fr=null,Bl(e),t)for(e=0;e<t.length;e++)Bl(t[e])}}function Ml(e,t){return e(t)}function Il(){}var En=!1;function Nl(e,t,r){if(En)return e(t,r);En=!0;try{return Ml(e,t,r)}finally{En=!1,(Fr!==null||jr!==null)&&(Il(),Pl())}}function hi(e,t){var r=e.stateNode;if(r===null)return null;var i=Ss(r);if(i===null)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(h(231,t,typeof r));return r}var kn=!1;if(l)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){kn=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{kn=!1}function Qh(e,t,r,i,c,p,D,N,z){var Y=Array.prototype.slice.call(arguments,3);try{t.apply(r,Y)}catch(se){this.onError(se)}}var di=!1,Qi=null,Ji=!1,bn=null,Jh={onError:function(e){di=!0,Qi=e}};function Zh(e,t,r,i,c,p,D,N,z){di=!1,Qi=null,Qh.apply(Jh,arguments)}function eu(e,t,r,i,c,p,D,N,z){if(Zh.apply(this,arguments),di){if(di){var Y=Qi;di=!1,Qi=null}else throw Error(h(198));Ji||(Ji=!0,bn=Y)}}function xr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Hl(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Fl(e){if(xr(e)!==e)throw Error(h(188))}function tu(e){var t=e.alternate;if(!t){if(t=xr(e),t===null)throw Error(h(188));return t!==e?null:e}for(var r=e,i=t;;){var c=r.return;if(c===null)break;var p=c.alternate;if(p===null){if(i=c.return,i!==null){r=i;continue}break}if(c.child===p.child){for(p=c.child;p;){if(p===r)return Fl(c),e;if(p===i)return Fl(c),t;p=p.sibling}throw Error(h(188))}if(r.return!==i.return)r=c,i=p;else{for(var D=!1,N=c.child;N;){if(N===r){D=!0,r=c,i=p;break}if(N===i){D=!0,i=c,r=p;break}N=N.sibling}if(!D){for(N=p.child;N;){if(N===r){D=!0,r=p,i=c;break}if(N===i){D=!0,i=p,r=c;break}N=N.sibling}if(!D)throw Error(h(189))}}if(r.alternate!==i)throw Error(h(190))}if(r.tag!==3)throw Error(h(188));return r.stateNode.current===r?e:t}function jl(e){return e=tu(e),e!==null?zl(e):null}function zl(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=zl(e);if(t!==null)return t;e=e.sibling}return null}var Ul=d.unstable_scheduleCallback,Wl=d.unstable_cancelCallback,ru=d.unstable_shouldYield,iu=d.unstable_requestPaint,He=d.unstable_now,su=d.unstable_getCurrentPriorityLevel,xn=d.unstable_ImmediatePriority,$l=d.unstable_UserBlockingPriority,Zi=d.unstable_NormalPriority,nu=d.unstable_LowPriority,Vl=d.unstable_IdlePriority,es=null,It=null;function ou(e){if(It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(es,e,void 0,(e.current.flags&128)===128)}catch{}}var Lt=Math.clz32?Math.clz32:cu,lu=Math.log,au=Math.LN2;function cu(e){return e>>>=0,e===0?32:31-(lu(e)/au|0)|0}var ts=64,rs=4194304;function fi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function is(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,c=e.suspendedLanes,p=e.pingedLanes,D=r&268435455;if(D!==0){var N=D&~c;N!==0?i=fi(N):(p&=D,p!==0&&(i=fi(p)))}else D=r&~c,D!==0?i=fi(D):p!==0&&(i=fi(p));if(i===0)return 0;if(t!==0&&t!==i&&(t&c)===0&&(c=i&-i,p=t&-t,c>=p||c===16&&(p&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-Lt(t),c=1<<r,i|=e[r],t&=~c;return i}function hu(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uu(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,p=e.pendingLanes;0<p;){var D=31-Lt(p),N=1<<D,z=c[D];z===-1?((N&r)===0||(N&i)!==0)&&(c[D]=hu(N,t)):z<=t&&(e.expiredLanes|=N),p&=~N}}function Ln(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Kl(){var e=ts;return ts<<=1,(ts&4194240)===0&&(ts=64),e}function Rn(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function pi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=r}function du(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var c=31-Lt(r),p=1<<c;t[c]=0,i[c]=-1,e[c]=-1,r&=~p}}function Dn(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Lt(r),c=1<<i;c&t|e[i]&t&&(e[i]|=t),r&=~c}}var Le=0;function ql(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Gl,Tn,Xl,Yl,Ql,An=!1,ss=[],rr=null,ir=null,sr=null,_i=new Map,vi=new Map,nr=[],fu="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 submit".split(" ");function Jl(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":sr=null;break;case"pointerover":case"pointerout":_i.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vi.delete(t.pointerId)}}function mi(e,t,r,i,c,p){return e===null||e.nativeEvent!==p?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:p,targetContainers:[c]},t!==null&&(t=Ai(t),t!==null&&Tn(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function pu(e,t,r,i,c){switch(t){case"focusin":return rr=mi(rr,e,t,r,i,c),!0;case"dragenter":return ir=mi(ir,e,t,r,i,c),!0;case"mouseover":return sr=mi(sr,e,t,r,i,c),!0;case"pointerover":var p=c.pointerId;return _i.set(p,mi(_i.get(p)||null,e,t,r,i,c)),!0;case"gotpointercapture":return p=c.pointerId,vi.set(p,mi(vi.get(p)||null,e,t,r,i,c)),!0}return!1}function Zl(e){var t=Lr(e.target);if(t!==null){var r=xr(t);if(r!==null){if(t=r.tag,t===13){if(t=Hl(r),t!==null){e.blockedOn=t,Ql(e.priority,function(){Xl(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ns(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=On(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);yn=i,r.target.dispatchEvent(i),yn=null}else return t=Ai(r),t!==null&&Tn(t),e.blockedOn=r,!1;t.shift()}return!0}function ea(e,t,r){ns(e)&&r.delete(t)}function _u(){An=!1,rr!==null&&ns(rr)&&(rr=null),ir!==null&&ns(ir)&&(ir=null),sr!==null&&ns(sr)&&(sr=null),_i.forEach(ea),vi.forEach(ea)}function gi(e,t){e.blockedOn===t&&(e.blockedOn=null,An||(An=!0,d.unstable_scheduleCallback(d.unstable_NormalPriority,_u)))}function Si(e){function t(c){return gi(c,e)}if(0<ss.length){gi(ss[0],e);for(var r=1;r<ss.length;r++){var i=ss[r];i.blockedOn===e&&(i.blockedOn=null)}}for(rr!==null&&gi(rr,e),ir!==null&&gi(ir,e),sr!==null&&gi(sr,e),_i.forEach(t),vi.forEach(t),r=0;r<nr.length;r++)i=nr[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<nr.length&&(r=nr[0],r.blockedOn===null);)Zl(r),r.blockedOn===null&&nr.shift()}var zr=_.ReactCurrentBatchConfig,os=!0;function vu(e,t,r,i){var c=Le,p=zr.transition;zr.transition=null;try{Le=1,Bn(e,t,r,i)}finally{Le=c,zr.transition=p}}function mu(e,t,r,i){var c=Le,p=zr.transition;zr.transition=null;try{Le=4,Bn(e,t,r,i)}finally{Le=c,zr.transition=p}}function Bn(e,t,r,i){if(os){var c=On(e,t,r,i);if(c===null)Yn(e,t,i,ls,r),Jl(e,i);else if(pu(c,e,t,r,i))i.stopPropagation();else if(Jl(e,i),t&4&&-1<fu.indexOf(e)){for(;c!==null;){var p=Ai(c);if(p!==null&&Gl(p),p=On(e,t,r,i),p===null&&Yn(e,t,i,ls,r),p===c)break;c=p}c!==null&&i.stopPropagation()}else Yn(e,t,i,null,r)}}var ls=null;function On(e,t,r,i){if(ls=null,e=Cn(i),e=Lr(e),e!==null)if(t=xr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Hl(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ls=e,null}function ta(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(su()){case xn:return 1;case $l:return 4;case Zi:case nu:return 16;case Vl:return 536870912;default:return 16}default:return 16}}var or=null,Pn=null,as=null;function ra(){if(as)return as;var e,t=Pn,r=t.length,i,c="value"in or?or.value:or.textContent,p=c.length;for(e=0;e<r&&t[e]===c[e];e++);var D=r-e;for(i=1;i<=D&&t[r-i]===c[p-i];i++);return as=c.slice(e,1<i?1-i:void 0)}function cs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hs(){return!0}function ia(){return!1}function pt(e){function t(r,i,c,p,D){this._reactName=r,this._targetInst=c,this.type=i,this.nativeEvent=p,this.target=D,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(r=e[N],this[N]=r?r(p):p[N]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?hs:ia,this.isPropagationStopped=ia,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=hs)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=hs)},persist:function(){},isPersistent:hs}),t}var Ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mn=pt(Ur),yi=O({},Ur,{view:0,detail:0}),gu=pt(yi),In,Nn,Ci,us=O({},yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ci&&(Ci&&e.type==="mousemove"?(In=e.screenX-Ci.screenX,Nn=e.screenY-Ci.screenY):Nn=In=0,Ci=e),In)},movementY:function(e){return"movementY"in e?e.movementY:Nn}}),sa=pt(us),Su=O({},us,{dataTransfer:0}),yu=pt(Su),Cu=O({},yi,{relatedTarget:0}),Hn=pt(Cu),wu=O({},Ur,{animationName:0,elapsedTime:0,pseudoElement:0}),Eu=pt(wu),ku=O({},Ur,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bu=pt(ku),xu=O({},Ur,{data:0}),na=pt(xu),Lu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ru={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"},Du={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Tu(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Du[e])?!!t[e]:!1}function Fn(){return Tu}var Au=O({},yi,{key:function(e){if(e.key){var t=Lu[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ru[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type==="keypress"?cs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Bu=pt(Au),Ou=O({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oa=pt(Ou),Pu=O({},yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn}),Mu=pt(Pu),Iu=O({},Ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),Nu=pt(Iu),Hu=O({},us,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Fu=pt(Hu),ju=[9,13,27,32],jn=l&&"CompositionEvent"in window,wi=null;l&&"documentMode"in document&&(wi=document.documentMode);var zu=l&&"TextEvent"in window&&!wi,la=l&&(!jn||wi&&8<wi&&11>=wi),aa=" ",ca=!1;function ha(e,t){switch(e){case"keyup":return ju.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ua(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function Uu(e,t){switch(e){case"compositionend":return ua(t);case"keypress":return t.which!==32?null:(ca=!0,aa);case"textInput":return e=t.data,e===aa&&ca?null:e;default:return null}}function Wu(e,t){if(Wr)return e==="compositionend"||!jn&&ha(e,t)?(e=ra(),as=Pn=or=null,Wr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return la&&t.locale!=="ko"?null:t.data;default:return null}}var $u={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 da(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$u[e.type]:t==="textarea"}function fa(e,t,r,i){Ol(i),t=vs(t,"onChange"),0<t.length&&(r=new Mn("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Ei=null,ki=null;function Vu(e){Aa(e,0)}function ds(e){var t=Gr(e);if(ue(t))return e}function Ku(e,t){if(e==="change")return t}var pa=!1;if(l){var zn;if(l){var Un="oninput"in document;if(!Un){var _a=document.createElement("div");_a.setAttribute("oninput","return;"),Un=typeof _a.oninput=="function"}zn=Un}else zn=!1;pa=zn&&(!document.documentMode||9<document.documentMode)}function va(){Ei&&(Ei.detachEvent("onpropertychange",ma),ki=Ei=null)}function ma(e){if(e.propertyName==="value"&&ds(ki)){var t=[];fa(t,ki,e,Cn(e)),Nl(Vu,t)}}function qu(e,t,r){e==="focusin"?(va(),Ei=t,ki=r,Ei.attachEvent("onpropertychange",ma)):e==="focusout"&&va()}function Gu(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ds(ki)}function Xu(e,t){if(e==="click")return ds(t)}function Yu(e,t){if(e==="input"||e==="change")return ds(t)}function Qu(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rt=typeof Object.is=="function"?Object.is:Qu;function bi(e,t){if(Rt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var c=r[i];if(!u.call(t,c)||!Rt(e[c],t[c]))return!1}return!0}function ga(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sa(e,t){var r=ga(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ga(r)}}function ya(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ya(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ca(){for(var e=window,t=Ee();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ee(e.document)}return t}function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ju(e){var t=Ca(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&ya(r.ownerDocument.documentElement,r)){if(i!==null&&Wn(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=r.textContent.length,p=Math.min(i.start,c);i=i.end===void 0?p:Math.min(i.end,c),!e.extend&&p>i&&(c=i,i=p,p=c),c=Sa(r,p);var D=Sa(r,i);c&&D&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==D.node||e.focusOffset!==D.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),p>i?(e.addRange(t),e.extend(D.node,D.offset)):(t.setEnd(D.node,D.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Zu=l&&"documentMode"in document&&11>=document.documentMode,$r=null,$n=null,xi=null,Vn=!1;function wa(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Vn||$r==null||$r!==Ee(i)||(i=$r,"selectionStart"in i&&Wn(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),xi&&bi(xi,i)||(xi=i,i=vs($n,"onSelect"),0<i.length&&(t=new Mn("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=$r)))}function fs(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vr={animationend:fs("Animation","AnimationEnd"),animationiteration:fs("Animation","AnimationIteration"),animationstart:fs("Animation","AnimationStart"),transitionend:fs("Transition","TransitionEnd")},Kn={},Ea={};l&&(Ea=document.createElement("div").style,"AnimationEvent"in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),"TransitionEvent"in window||delete Vr.transitionend.transition);function ps(e){if(Kn[e])return Kn[e];if(!Vr[e])return e;var t=Vr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ea)return Kn[e]=t[r];return e}var ka=ps("animationend"),ba=ps("animationiteration"),xa=ps("animationstart"),La=ps("transitionend"),Ra=new Map,Da="abort auxClick 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(" ");function lr(e,t){Ra.set(e,t),V(t,[e])}for(var qn=0;qn<Da.length;qn++){var Gn=Da[qn],ed=Gn.toLowerCase(),td=Gn[0].toUpperCase()+Gn.slice(1);lr(ed,"on"+td)}lr(ka,"onAnimationEnd"),lr(ba,"onAnimationIteration"),lr(xa,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(La,"onTransitionEnd"),H("onMouseEnter",["mouseout","mouseover"]),H("onMouseLeave",["mouseout","mouseover"]),H("onPointerEnter",["pointerout","pointerover"]),H("onPointerLeave",["pointerout","pointerover"]),V("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),V("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),V("onBeforeInput",["compositionend","keypress","textInput","paste"]),V("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),V("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),V("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Li="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(" "),rd=new Set("cancel close invalid load scroll toggle".split(" ").concat(Li));function Ta(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,eu(i,t,void 0,e),e.currentTarget=null}function Aa(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],c=i.event;i=i.listeners;e:{var p=void 0;if(t)for(var D=i.length-1;0<=D;D--){var N=i[D],z=N.instance,Y=N.currentTarget;if(N=N.listener,z!==p&&c.isPropagationStopped())break e;Ta(c,N,Y),p=z}else for(D=0;D<i.length;D++){if(N=i[D],z=N.instance,Y=N.currentTarget,N=N.listener,z!==p&&c.isPropagationStopped())break e;Ta(c,N,Y),p=z}}}if(Ji)throw e=bn,Ji=!1,bn=null,e}function Be(e,t){var r=t[ro];r===void 0&&(r=t[ro]=new Set);var i=e+"__bubble";r.has(i)||(Ba(t,e,2,!1),r.add(i))}function Xn(e,t,r){var i=0;t&&(i|=4),Ba(r,e,i,t)}var _s="_reactListening"+Math.random().toString(36).slice(2);function Ri(e){if(!e[_s]){e[_s]=!0,E.forEach(function(r){r!=="selectionchange"&&(rd.has(r)||Xn(r,!1,e),Xn(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_s]||(t[_s]=!0,Xn("selectionchange",!1,t))}}function Ba(e,t,r,i){switch(ta(t)){case 1:var c=vu;break;case 4:c=mu;break;default:c=Bn}r=c.bind(null,t,r,e),c=void 0,!kn||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,r,{capture:!0,passive:c}):e.addEventListener(t,r,!0):c!==void 0?e.addEventListener(t,r,{passive:c}):e.addEventListener(t,r,!1)}function Yn(e,t,r,i,c){var p=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var D=i.tag;if(D===3||D===4){var N=i.stateNode.containerInfo;if(N===c||N.nodeType===8&&N.parentNode===c)break;if(D===4)for(D=i.return;D!==null;){var z=D.tag;if((z===3||z===4)&&(z=D.stateNode.containerInfo,z===c||z.nodeType===8&&z.parentNode===c))return;D=D.return}for(;N!==null;){if(D=Lr(N),D===null)return;if(z=D.tag,z===5||z===6){i=p=D;continue e}N=N.parentNode}}i=i.return}Nl(function(){var Y=p,se=Cn(r),oe=[];e:{var ie=Ra.get(e);if(ie!==void 0){var fe=Mn,_e=e;switch(e){case"keypress":if(cs(r)===0)break e;case"keydown":case"keyup":fe=Bu;break;case"focusin":_e="focus",fe=Hn;break;case"focusout":_e="blur",fe=Hn;break;case"beforeblur":case"afterblur":fe=Hn;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=sa;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=yu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=Mu;break;case ka:case ba:case xa:fe=Eu;break;case La:fe=Nu;break;case"scroll":fe=gu;break;case"wheel":fe=Fu;break;case"copy":case"cut":case"paste":fe=bu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=oa}var ve=(t&4)!==0,Fe=!ve&&e==="scroll",K=ve?ie!==null?ie+"Capture":null:ie;ve=[];for(var $=Y,G;$!==null;){G=$;var ae=G.stateNode;if(G.tag===5&&ae!==null&&(G=ae,K!==null&&(ae=hi($,K),ae!=null&&ve.push(Di($,ae,G)))),Fe)break;$=$.return}0<ve.length&&(ie=new fe(ie,_e,null,r,se),oe.push({event:ie,listeners:ve}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",ie&&r!==yn&&(_e=r.relatedTarget||r.fromElement)&&(Lr(_e)||_e[$t]))break e;if((fe||ie)&&(ie=se.window===se?se:(ie=se.ownerDocument)?ie.defaultView||ie.parentWindow:window,fe?(_e=r.relatedTarget||r.toElement,fe=Y,_e=_e?Lr(_e):null,_e!==null&&(Fe=xr(_e),_e!==Fe||_e.tag!==5&&_e.tag!==6)&&(_e=null)):(fe=null,_e=Y),fe!==_e)){if(ve=sa,ae="onMouseLeave",K="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(ve=oa,ae="onPointerLeave",K="onPointerEnter",$="pointer"),Fe=fe==null?ie:Gr(fe),G=_e==null?ie:Gr(_e),ie=new ve(ae,$+"leave",fe,r,se),ie.target=Fe,ie.relatedTarget=G,ae=null,Lr(se)===Y&&(ve=new ve(K,$+"enter",_e,r,se),ve.target=G,ve.relatedTarget=Fe,ae=ve),Fe=ae,fe&&_e)t:{for(ve=fe,K=_e,$=0,G=ve;G;G=Kr(G))$++;for(G=0,ae=K;ae;ae=Kr(ae))G++;for(;0<$-G;)ve=Kr(ve),$--;for(;0<G-$;)K=Kr(K),G--;for(;$--;){if(ve===K||K!==null&&ve===K.alternate)break t;ve=Kr(ve),K=Kr(K)}ve=null}else ve=null;fe!==null&&Oa(oe,ie,fe,ve,!1),_e!==null&&Fe!==null&&Oa(oe,Fe,_e,ve,!0)}}e:{if(ie=Y?Gr(Y):window,fe=ie.nodeName&&ie.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ie.type==="file")var me=Ku;else if(da(ie))if(pa)me=Yu;else{me=Gu;var ge=qu}else(fe=ie.nodeName)&&fe.toLowerCase()==="input"&&(ie.type==="checkbox"||ie.type==="radio")&&(me=Xu);if(me&&(me=me(e,Y))){fa(oe,me,r,se);break e}ge&&ge(e,ie,Y),e==="focusout"&&(ge=ie._wrapperState)&&ge.controlled&&ie.type==="number"&&Er(ie,"number",ie.value)}switch(ge=Y?Gr(Y):window,e){case"focusin":(da(ge)||ge.contentEditable==="true")&&($r=ge,$n=Y,xi=null);break;case"focusout":xi=$n=$r=null;break;case"mousedown":Vn=!0;break;case"contextmenu":case"mouseup":case"dragend":Vn=!1,wa(oe,r,se);break;case"selectionchange":if(Zu)break;case"keydown":case"keyup":wa(oe,r,se)}var Se;if(jn)e:{switch(e){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Wr?ha(e,r)&&(Ce="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Ce="onCompositionStart");Ce&&(la&&r.locale!=="ko"&&(Wr||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Wr&&(Se=ra()):(or=se,Pn="value"in or?or.value:or.textContent,Wr=!0)),ge=vs(Y,Ce),0<ge.length&&(Ce=new na(Ce,e,null,r,se),oe.push({event:Ce,listeners:ge}),Se?Ce.data=Se:(Se=ua(r),Se!==null&&(Ce.data=Se)))),(Se=zu?Uu(e,r):Wu(e,r))&&(Y=vs(Y,"onBeforeInput"),0<Y.length&&(se=new na("onBeforeInput","beforeinput",null,r,se),oe.push({event:se,listeners:Y}),se.data=Se))}Aa(oe,t)})}function Di(e,t,r){return{instance:e,listener:t,currentTarget:r}}function vs(e,t){for(var r=t+"Capture",i=[];e!==null;){var c=e,p=c.stateNode;c.tag===5&&p!==null&&(c=p,p=hi(e,r),p!=null&&i.unshift(Di(e,p,c)),p=hi(e,t),p!=null&&i.push(Di(e,p,c))),e=e.return}return i}function Kr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Oa(e,t,r,i,c){for(var p=t._reactName,D=[];r!==null&&r!==i;){var N=r,z=N.alternate,Y=N.stateNode;if(z!==null&&z===i)break;N.tag===5&&Y!==null&&(N=Y,c?(z=hi(r,p),z!=null&&D.unshift(Di(r,z,N))):c||(z=hi(r,p),z!=null&&D.push(Di(r,z,N)))),r=r.return}D.length!==0&&e.push({event:t,listeners:D})}var id=/\r\n?/g,sd=/\u0000|\uFFFD/g;function Pa(e){return(typeof e=="string"?e:""+e).replace(id,`
38
38
  `).replace(sd,"")}function ms(e,t,r){if(t=Pa(t),Pa(e)!==t&&r)throw Error(h(425))}function gs(){}var Qn=null,Jn=null;function Zn(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var eo=typeof setTimeout=="function"?setTimeout:void 0,nd=typeof clearTimeout=="function"?clearTimeout:void 0,Ma=typeof Promise=="function"?Promise:void 0,od=typeof queueMicrotask=="function"?queueMicrotask:typeof Ma<"u"?function(e){return Ma.resolve(null).then(e).catch(ld)}:eo;function ld(e){setTimeout(function(){throw e})}function to(e,t){var r=t,i=0;do{var c=r.nextSibling;if(e.removeChild(r),c&&c.nodeType===8)if(r=c.data,r==="/$"){if(i===0){e.removeChild(c),Si(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=c}while(r);Si(t)}function ar(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ia(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var qr=Math.random().toString(36).slice(2),Nt="__reactFiber$"+qr,Ti="__reactProps$"+qr,$t="__reactContainer$"+qr,ro="__reactEvents$"+qr,ad="__reactListeners$"+qr,cd="__reactHandles$"+qr;function Lr(e){var t=e[Nt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[$t]||r[Nt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ia(e);e!==null;){if(r=e[Nt])return r;e=Ia(e)}return t}e=r,r=e.parentNode}return null}function Ai(e){return e=e[Nt]||e[$t],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(h(33))}function Ss(e){return e[Ti]||null}var io=[],Xr=-1;function cr(e){return{current:e}}function Oe(e){0>Xr||(e.current=io[Xr],io[Xr]=null,Xr--)}function De(e,t){Xr++,io[Xr]=e.current,e.current=t}var hr={},Je=cr(hr),ot=cr(!1),Rr=hr;function Yr(e,t){var r=e.type.contextTypes;if(!r)return hr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var c={},p;for(p in r)c[p]=t[p];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function lt(e){return e=e.childContextTypes,e!=null}function ys(){Oe(ot),Oe(Je)}function Na(e,t,r){if(Je.current!==hr)throw Error(h(168));De(Je,t),De(ot,r)}function Ha(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var c in i)if(!(c in t))throw Error(h(108,U(e)||"Unknown",c));return O({},r,i)}function Cs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hr,Rr=Je.current,De(Je,e),De(ot,ot.current),!0}function Fa(e,t,r){var i=e.stateNode;if(!i)throw Error(h(169));r?(e=Ha(e,t,Rr),i.__reactInternalMemoizedMergedChildContext=e,Oe(ot),Oe(Je),De(Je,e)):Oe(ot),De(ot,r)}var Vt=null,ws=!1,so=!1;function ja(e){Vt===null?Vt=[e]:Vt.push(e)}function hd(e){ws=!0,ja(e)}function ur(){if(!so&&Vt!==null){so=!0;var e=0,t=Le;try{var r=Vt;for(Le=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}Vt=null,ws=!1}catch(c){throw Vt!==null&&(Vt=Vt.slice(e+1)),Ul(xn,ur),c}finally{Le=t,so=!1}}return null}var Qr=[],Jr=0,Es=null,ks=0,gt=[],St=0,Dr=null,Kt=1,qt="";function Tr(e,t){Qr[Jr++]=ks,Qr[Jr++]=Es,Es=e,ks=t}function za(e,t,r){gt[St++]=Kt,gt[St++]=qt,gt[St++]=Dr,Dr=e;var i=Kt;e=qt;var c=32-Lt(i)-1;i&=~(1<<c),r+=1;var p=32-Lt(t)+c;if(30<p){var D=c-c%5;p=(i&(1<<D)-1).toString(32),i>>=D,c-=D,Kt=1<<32-Lt(t)+c|r<<c|i,qt=p+e}else Kt=1<<p|r<<c|i,qt=e}function no(e){e.return!==null&&(Tr(e,1),za(e,1,0))}function oo(e){for(;e===Es;)Es=Qr[--Jr],Qr[Jr]=null,ks=Qr[--Jr],Qr[Jr]=null;for(;e===Dr;)Dr=gt[--St],gt[St]=null,qt=gt[--St],gt[St]=null,Kt=gt[--St],gt[St]=null}var _t=null,vt=null,Pe=!1,Dt=null;function Ua(e,t){var r=Et(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Wa(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_t=e,vt=ar(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Dr!==null?{id:Kt,overflow:qt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Et(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,_t=e,vt=null,!0):!1;default:return!1}}function lo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ao(e){if(Pe){var t=vt;if(t){var r=t;if(!Wa(e,t)){if(lo(e))throw Error(h(418));t=ar(r.nextSibling);var i=_t;t&&Wa(e,t)?Ua(i,r):(e.flags=e.flags&-4097|2,Pe=!1,_t=e)}}else{if(lo(e))throw Error(h(418));e.flags=e.flags&-4097|2,Pe=!1,_t=e}}}function $a(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function bs(e){if(e!==_t)return!1;if(!Pe)return $a(e),Pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Zn(e.type,e.memoizedProps)),t&&(t=vt)){if(lo(e))throw Va(),Error(h(418));for(;t;)Ua(e,t),t=ar(t.nextSibling)}if($a(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(h(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){vt=ar(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}vt=null}}else vt=_t?ar(e.stateNode.nextSibling):null;return!0}function Va(){for(var e=vt;e;)e=ar(e.nextSibling)}function Zr(){vt=_t=null,Pe=!1}function co(e){Dt===null?Dt=[e]:Dt.push(e)}var ud=_.ReactCurrentBatchConfig;function Bi(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(h(309));var i=r.stateNode}if(!i)throw Error(h(147,e));var c=i,p=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===p?t.ref:(t=function(D){var N=c.refs;D===null?delete N[p]:N[p]=D},t._stringRef=p,t)}if(typeof e!="string")throw Error(h(284));if(!r._owner)throw Error(h(290,e))}return e}function xs(e,t){throw e=Object.prototype.toString.call(t),Error(h(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ka(e){var t=e._init;return t(e._payload)}function qa(e){function t(K,$){if(e){var G=K.deletions;G===null?(K.deletions=[$],K.flags|=16):G.push($)}}function r(K,$){if(!e)return null;for(;$!==null;)t(K,$),$=$.sibling;return null}function i(K,$){for(K=new Map;$!==null;)$.key!==null?K.set($.key,$):K.set($.index,$),$=$.sibling;return K}function c(K,$){return K=Sr(K,$),K.index=0,K.sibling=null,K}function p(K,$,G){return K.index=G,e?(G=K.alternate,G!==null?(G=G.index,G<$?(K.flags|=2,$):G):(K.flags|=2,$)):(K.flags|=1048576,$)}function D(K){return e&&K.alternate===null&&(K.flags|=2),K}function N(K,$,G,ae){return $===null||$.tag!==6?($=tl(G,K.mode,ae),$.return=K,$):($=c($,G),$.return=K,$)}function z(K,$,G,ae){var me=G.type;return me===L?se(K,$,G.props.children,ae,G.key):$!==null&&($.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===ne&&Ka(me)===$.type)?(ae=c($,G.props),ae.ref=Bi(K,$,G),ae.return=K,ae):(ae=Ys(G.type,G.key,G.props,null,K.mode,ae),ae.ref=Bi(K,$,G),ae.return=K,ae)}function Y(K,$,G,ae){return $===null||$.tag!==4||$.stateNode.containerInfo!==G.containerInfo||$.stateNode.implementation!==G.implementation?($=rl(G,K.mode,ae),$.return=K,$):($=c($,G.children||[]),$.return=K,$)}function se(K,$,G,ae,me){return $===null||$.tag!==7?($=Hr(G,K.mode,ae,me),$.return=K,$):($=c($,G),$.return=K,$)}function oe(K,$,G){if(typeof $=="string"&&$!==""||typeof $=="number")return $=tl(""+$,K.mode,G),$.return=K,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case k:return G=Ys($.type,$.key,$.props,null,K.mode,G),G.ref=Bi(K,null,$),G.return=K,G;case b:return $=rl($,K.mode,G),$.return=K,$;case ne:var ae=$._init;return oe(K,ae($._payload),G)}if(Wt($)||R($))return $=Hr($,K.mode,G,null),$.return=K,$;xs(K,$)}return null}function ie(K,$,G,ae){var me=$!==null?$.key:null;if(typeof G=="string"&&G!==""||typeof G=="number")return me!==null?null:N(K,$,""+G,ae);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case k:return G.key===me?z(K,$,G,ae):null;case b:return G.key===me?Y(K,$,G,ae):null;case ne:return me=G._init,ie(K,$,me(G._payload),ae)}if(Wt(G)||R(G))return me!==null?null:se(K,$,G,ae,null);xs(K,G)}return null}function fe(K,$,G,ae,me){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return K=K.get(G)||null,N($,K,""+ae,me);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case k:return K=K.get(ae.key===null?G:ae.key)||null,z($,K,ae,me);case b:return K=K.get(ae.key===null?G:ae.key)||null,Y($,K,ae,me);case ne:var ge=ae._init;return fe(K,$,G,ge(ae._payload),me)}if(Wt(ae)||R(ae))return K=K.get(G)||null,se($,K,ae,me,null);xs($,ae)}return null}function _e(K,$,G,ae){for(var me=null,ge=null,Se=$,Ce=$=0,Ge=null;Se!==null&&Ce<G.length;Ce++){Se.index>Ce?(Ge=Se,Se=null):Ge=Se.sibling;var xe=ie(K,Se,G[Ce],ae);if(xe===null){Se===null&&(Se=Ge);break}e&&Se&&xe.alternate===null&&t(K,Se),$=p(xe,$,Ce),ge===null?me=xe:ge.sibling=xe,ge=xe,Se=Ge}if(Ce===G.length)return r(K,Se),Pe&&Tr(K,Ce),me;if(Se===null){for(;Ce<G.length;Ce++)Se=oe(K,G[Ce],ae),Se!==null&&($=p(Se,$,Ce),ge===null?me=Se:ge.sibling=Se,ge=Se);return Pe&&Tr(K,Ce),me}for(Se=i(K,Se);Ce<G.length;Ce++)Ge=fe(Se,K,Ce,G[Ce],ae),Ge!==null&&(e&&Ge.alternate!==null&&Se.delete(Ge.key===null?Ce:Ge.key),$=p(Ge,$,Ce),ge===null?me=Ge:ge.sibling=Ge,ge=Ge);return e&&Se.forEach(function(yr){return t(K,yr)}),Pe&&Tr(K,Ce),me}function ve(K,$,G,ae){var me=R(G);if(typeof me!="function")throw Error(h(150));if(G=me.call(G),G==null)throw Error(h(151));for(var ge=me=null,Se=$,Ce=$=0,Ge=null,xe=G.next();Se!==null&&!xe.done;Ce++,xe=G.next()){Se.index>Ce?(Ge=Se,Se=null):Ge=Se.sibling;var yr=ie(K,Se,xe.value,ae);if(yr===null){Se===null&&(Se=Ge);break}e&&Se&&yr.alternate===null&&t(K,Se),$=p(yr,$,Ce),ge===null?me=yr:ge.sibling=yr,ge=yr,Se=Ge}if(xe.done)return r(K,Se),Pe&&Tr(K,Ce),me;if(Se===null){for(;!xe.done;Ce++,xe=G.next())xe=oe(K,xe.value,ae),xe!==null&&($=p(xe,$,Ce),ge===null?me=xe:ge.sibling=xe,ge=xe);return Pe&&Tr(K,Ce),me}for(Se=i(K,Se);!xe.done;Ce++,xe=G.next())xe=fe(Se,K,Ce,xe.value,ae),xe!==null&&(e&&xe.alternate!==null&&Se.delete(xe.key===null?Ce:xe.key),$=p(xe,$,Ce),ge===null?me=xe:ge.sibling=xe,ge=xe);return e&&Se.forEach(function($d){return t(K,$d)}),Pe&&Tr(K,Ce),me}function Fe(K,$,G,ae){if(typeof G=="object"&&G!==null&&G.type===L&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case k:e:{for(var me=G.key,ge=$;ge!==null;){if(ge.key===me){if(me=G.type,me===L){if(ge.tag===7){r(K,ge.sibling),$=c(ge,G.props.children),$.return=K,K=$;break e}}else if(ge.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===ne&&Ka(me)===ge.type){r(K,ge.sibling),$=c(ge,G.props),$.ref=Bi(K,ge,G),$.return=K,K=$;break e}r(K,ge);break}else t(K,ge);ge=ge.sibling}G.type===L?($=Hr(G.props.children,K.mode,ae,G.key),$.return=K,K=$):(ae=Ys(G.type,G.key,G.props,null,K.mode,ae),ae.ref=Bi(K,$,G),ae.return=K,K=ae)}return D(K);case b:e:{for(ge=G.key;$!==null;){if($.key===ge)if($.tag===4&&$.stateNode.containerInfo===G.containerInfo&&$.stateNode.implementation===G.implementation){r(K,$.sibling),$=c($,G.children||[]),$.return=K,K=$;break e}else{r(K,$);break}else t(K,$);$=$.sibling}$=rl(G,K.mode,ae),$.return=K,K=$}return D(K);case ne:return ge=G._init,Fe(K,$,ge(G._payload),ae)}if(Wt(G))return _e(K,$,G,ae);if(R(G))return ve(K,$,G,ae);xs(K,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,$!==null&&$.tag===6?(r(K,$.sibling),$=c($,G),$.return=K,K=$):(r(K,$),$=tl(G,K.mode,ae),$.return=K,K=$),D(K)):r(K,$)}return Fe}var ei=qa(!0),Ga=qa(!1),Ls=cr(null),Rs=null,ti=null,ho=null;function uo(){ho=ti=Rs=null}function fo(e){var t=Ls.current;Oe(Ls),e._currentValue=t}function po(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function ri(e,t){Rs=e,ho=ti=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(at=!0),e.firstContext=null)}function yt(e){var t=e._currentValue;if(ho!==e)if(e={context:e,memoizedValue:t,next:null},ti===null){if(Rs===null)throw Error(h(308));ti=e,Rs.dependencies={lanes:0,firstContext:e}}else ti=ti.next=e;return t}var Ar=null;function _o(e){Ar===null?Ar=[e]:Ar.push(e)}function Xa(e,t,r,i){var c=t.interleaved;return c===null?(r.next=r,_o(t)):(r.next=c.next,c.next=r),t.interleaved=r,Gt(e,i)}function Gt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var dr=!1;function vo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ya(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fr(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(be&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,Gt(e,r)}return c=i.interleaved,c===null?(t.next=t,_o(i)):(t.next=c.next,c.next=t),i.interleaved=t,Gt(e,r)}function Ds(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Dn(e,r)}}function Qa(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var c=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var D={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};p===null?c=p=D:p=p.next=D,r=r.next}while(r!==null);p===null?c=p=t:p=p.next=t}else c=p=t;r={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:p,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ts(e,t,r,i){var c=e.updateQueue;dr=!1;var p=c.firstBaseUpdate,D=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var z=N,Y=z.next;z.next=null,D===null?p=Y:D.next=Y,D=z;var se=e.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==D&&(N===null?se.firstBaseUpdate=Y:N.next=Y,se.lastBaseUpdate=z))}if(p!==null){var oe=c.baseState;D=0,se=Y=z=null,N=p;do{var ie=N.lane,fe=N.eventTime;if((i&ie)===ie){se!==null&&(se=se.next={eventTime:fe,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var _e=e,ve=N;switch(ie=t,fe=r,ve.tag){case 1:if(_e=ve.payload,typeof _e=="function"){oe=_e.call(fe,oe,ie);break e}oe=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=ve.payload,ie=typeof _e=="function"?_e.call(fe,oe,ie):_e,ie==null)break e;oe=O({},oe,ie);break e;case 2:dr=!0}}N.callback!==null&&N.lane!==0&&(e.flags|=64,ie=c.effects,ie===null?c.effects=[N]:ie.push(N))}else fe={eventTime:fe,lane:ie,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(Y=se=fe,z=oe):se=se.next=fe,D|=ie;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;ie=N,N=ie.next,ie.next=null,c.lastBaseUpdate=ie,c.shared.pending=null}}while(!0);if(se===null&&(z=oe),c.baseState=z,c.firstBaseUpdate=Y,c.lastBaseUpdate=se,t=c.shared.interleaved,t!==null){c=t;do D|=c.lane,c=c.next;while(c!==t)}else p===null&&(c.shared.lanes=0);Pr|=D,e.lanes=D,e.memoizedState=oe}}function Ja(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],c=i.callback;if(c!==null){if(i.callback=null,i=r,typeof c!="function")throw Error(h(191,c));c.call(i)}}}var Oi={},Ht=cr(Oi),Pi=cr(Oi),Mi=cr(Oi);function Br(e){if(e===Oi)throw Error(h(174));return e}function mo(e,t){switch(De(Mi,t),De(Pi,e),De(Ht,Oi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kr(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kr(t,e)}Oe(Ht),De(Ht,t)}function ii(){Oe(Ht),Oe(Pi),Oe(Mi)}function Za(e){Br(Mi.current);var t=Br(Ht.current),r=kr(t,e.type);t!==r&&(De(Pi,e),De(Ht,r))}function go(e){Pi.current===e&&(Oe(Ht),Oe(Pi))}var Me=cr(0);function As(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var So=[];function yo(){for(var e=0;e<So.length;e++)So[e]._workInProgressVersionPrimary=null;So.length=0}var Bs=_.ReactCurrentDispatcher,Co=_.ReactCurrentBatchConfig,Or=0,Ie=null,Ue=null,Ke=null,Os=!1,Ii=!1,Ni=0,dd=0;function Ze(){throw Error(h(321))}function wo(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Rt(e[r],t[r]))return!1;return!0}function Eo(e,t,r,i,c,p){if(Or=p,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bs.current=e===null||e.memoizedState===null?vd:md,e=r(i,c),Ii){p=0;do{if(Ii=!1,Ni=0,25<=p)throw Error(h(301));p+=1,Ke=Ue=null,t.updateQueue=null,Bs.current=gd,e=r(i,c)}while(Ii)}if(Bs.current=Is,t=Ue!==null&&Ue.next!==null,Or=0,Ke=Ue=Ie=null,Os=!1,t)throw Error(h(300));return e}function ko(){var e=Ni!==0;return Ni=0,e}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Ie.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function Ct(){if(Ue===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=Ke===null?Ie.memoizedState:Ke.next;if(t!==null)Ke=t,Ue=e;else{if(e===null)throw Error(h(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Ke===null?Ie.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Hi(e,t){return typeof t=="function"?t(e):t}function bo(e){var t=Ct(),r=t.queue;if(r===null)throw Error(h(311));r.lastRenderedReducer=e;var i=Ue,c=i.baseQueue,p=r.pending;if(p!==null){if(c!==null){var D=c.next;c.next=p.next,p.next=D}i.baseQueue=c=p,r.pending=null}if(c!==null){p=c.next,i=i.baseState;var N=D=null,z=null,Y=p;do{var se=Y.lane;if((Or&se)===se)z!==null&&(z=z.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),i=Y.hasEagerState?Y.eagerState:e(i,Y.action);else{var oe={lane:se,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};z===null?(N=z=oe,D=i):z=z.next=oe,Ie.lanes|=se,Pr|=se}Y=Y.next}while(Y!==null&&Y!==p);z===null?D=i:z.next=N,Rt(i,t.memoizedState)||(at=!0),t.memoizedState=i,t.baseState=D,t.baseQueue=z,r.lastRenderedState=i}if(e=r.interleaved,e!==null){c=e;do p=c.lane,Ie.lanes|=p,Pr|=p,c=c.next;while(c!==e)}else c===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function xo(e){var t=Ct(),r=t.queue;if(r===null)throw Error(h(311));r.lastRenderedReducer=e;var i=r.dispatch,c=r.pending,p=t.memoizedState;if(c!==null){r.pending=null;var D=c=c.next;do p=e(p,D.action),D=D.next;while(D!==c);Rt(p,t.memoizedState)||(at=!0),t.memoizedState=p,t.baseQueue===null&&(t.baseState=p),r.lastRenderedState=p}return[p,i]}function ec(){}function tc(e,t){var r=Ie,i=Ct(),c=t(),p=!Rt(i.memoizedState,c);if(p&&(i.memoizedState=c,at=!0),i=i.queue,Lo(sc.bind(null,r,i,e),[e]),i.getSnapshot!==t||p||Ke!==null&&Ke.memoizedState.tag&1){if(r.flags|=2048,Fi(9,ic.bind(null,r,i,c,t),void 0,null),qe===null)throw Error(h(349));(Or&30)!==0||rc(r,t,c)}return c}function rc(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function ic(e,t,r,i){t.value=r,t.getSnapshot=i,nc(t)&&oc(e)}function sc(e,t,r){return r(function(){nc(t)&&oc(e)})}function nc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Rt(e,r)}catch{return!0}}function oc(e){var t=Gt(e,1);t!==null&&Ot(t,e,1,-1)}function lc(e){var t=Ft();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:e},t.queue=e,e=e.dispatch=_d.bind(null,Ie,e),[t.memoizedState,e]}function Fi(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function ac(){return Ct().memoizedState}function Ps(e,t,r,i){var c=Ft();Ie.flags|=e,c.memoizedState=Fi(1|t,r,void 0,i===void 0?null:i)}function Ms(e,t,r,i){var c=Ct();i=i===void 0?null:i;var p=void 0;if(Ue!==null){var D=Ue.memoizedState;if(p=D.destroy,i!==null&&wo(i,D.deps)){c.memoizedState=Fi(t,r,p,i);return}}Ie.flags|=e,c.memoizedState=Fi(1|t,r,p,i)}function cc(e,t){return Ps(8390656,8,e,t)}function Lo(e,t){return Ms(2048,8,e,t)}function hc(e,t){return Ms(4,2,e,t)}function uc(e,t){return Ms(4,4,e,t)}function dc(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fc(e,t,r){return r=r!=null?r.concat([e]):null,Ms(4,4,dc.bind(null,t,e),r)}function Ro(){}function pc(e,t){var r=Ct();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&wo(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function _c(e,t){var r=Ct();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&wo(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function vc(e,t,r){return(Or&21)===0?(e.baseState&&(e.baseState=!1,at=!0),e.memoizedState=r):(Rt(r,t)||(r=Kl(),Ie.lanes|=r,Pr|=r,e.baseState=!0),t)}function fd(e,t){var r=Le;Le=r!==0&&4>r?r:4,e(!0);var i=Co.transition;Co.transition={};try{e(!1),t()}finally{Le=r,Co.transition=i}}function mc(){return Ct().memoizedState}function pd(e,t,r){var i=mr(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},gc(e))Sc(t,r);else if(r=Xa(e,t,r,i),r!==null){var c=st();Ot(r,e,i,c),yc(r,t,i)}}function _d(e,t,r){var i=mr(e),c={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(gc(e))Sc(t,c);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=t.lastRenderedReducer,p!==null))try{var D=t.lastRenderedState,N=p(D,r);if(c.hasEagerState=!0,c.eagerState=N,Rt(N,D)){var z=t.interleaved;z===null?(c.next=c,_o(t)):(c.next=z.next,z.next=c),t.interleaved=c;return}}catch{}finally{}r=Xa(e,t,c,i),r!==null&&(c=st(),Ot(r,e,i,c),yc(r,t,i))}}function gc(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function Sc(e,t){Ii=Os=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function yc(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Dn(e,r)}}var Is={readContext:yt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},vd={readContext:yt,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:cc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ps(4194308,4,dc.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ps(4,2,e,t)},useMemo:function(e,t){var r=Ft();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Ft();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=pd.bind(null,Ie,e),[i.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:lc,useDebugValue:Ro,useDeferredValue:function(e){return Ft().memoizedState=e},useTransition:function(){var e=lc(!1),t=e[0];return e=fd.bind(null,e[1]),Ft().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Ie,c=Ft();if(Pe){if(r===void 0)throw Error(h(407));r=r()}else{if(r=t(),qe===null)throw Error(h(349));(Or&30)!==0||rc(i,t,r)}c.memoizedState=r;var p={value:r,getSnapshot:t};return c.queue=p,cc(sc.bind(null,i,p,e),[e]),i.flags|=2048,Fi(9,ic.bind(null,i,p,r,t),void 0,null),r},useId:function(){var e=Ft(),t=qe.identifierPrefix;if(Pe){var r=qt,i=Kt;r=(i&~(1<<32-Lt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ni++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=dd++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},md={readContext:yt,useCallback:pc,useContext:yt,useEffect:Lo,useImperativeHandle:fc,useInsertionEffect:hc,useLayoutEffect:uc,useMemo:_c,useReducer:bo,useRef:ac,useState:function(){return bo(Hi)},useDebugValue:Ro,useDeferredValue:function(e){var t=Ct();return vc(t,Ue.memoizedState,e)},useTransition:function(){var e=bo(Hi)[0],t=Ct().memoizedState;return[e,t]},useMutableSource:ec,useSyncExternalStore:tc,useId:mc,unstable_isNewReconciler:!1},gd={readContext:yt,useCallback:pc,useContext:yt,useEffect:Lo,useImperativeHandle:fc,useInsertionEffect:hc,useLayoutEffect:uc,useMemo:_c,useReducer:xo,useRef:ac,useState:function(){return xo(Hi)},useDebugValue:Ro,useDeferredValue:function(e){var t=Ct();return Ue===null?t.memoizedState=e:vc(t,Ue.memoizedState,e)},useTransition:function(){var e=xo(Hi)[0],t=Ct().memoizedState;return[e,t]},useMutableSource:ec,useSyncExternalStore:tc,useId:mc,unstable_isNewReconciler:!1};function Tt(e,t){if(e&&e.defaultProps){t=O({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Do(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:O({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Ns={isMounted:function(e){return(e=e._reactInternals)?xr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=st(),c=mr(e),p=Xt(i,c);p.payload=t,r!=null&&(p.callback=r),t=fr(e,p,c),t!==null&&(Ot(t,e,c,i),Ds(t,e,c))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=st(),c=mr(e),p=Xt(i,c);p.tag=1,p.payload=t,r!=null&&(p.callback=r),t=fr(e,p,c),t!==null&&(Ot(t,e,c,i),Ds(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=st(),i=mr(e),c=Xt(r,i);c.tag=2,t!=null&&(c.callback=t),t=fr(e,c,i),t!==null&&(Ot(t,e,i,r),Ds(t,e,i))}};function Cc(e,t,r,i,c,p,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,p,D):t.prototype&&t.prototype.isPureReactComponent?!bi(r,i)||!bi(c,p):!0}function wc(e,t,r){var i=!1,c=hr,p=t.contextType;return typeof p=="object"&&p!==null?p=yt(p):(c=lt(t)?Rr:Je.current,i=t.contextTypes,p=(i=i!=null)?Yr(e,c):hr),t=new t(r,p),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ns,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=p),t}function Ec(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Ns.enqueueReplaceState(t,t.state,null)}function To(e,t,r,i){var c=e.stateNode;c.props=r,c.state=e.memoizedState,c.refs={},vo(e);var p=t.contextType;typeof p=="object"&&p!==null?c.context=yt(p):(p=lt(t)?Rr:Je.current,c.context=Yr(e,p)),c.state=e.memoizedState,p=t.getDerivedStateFromProps,typeof p=="function"&&(Do(e,t,p,r),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&Ns.enqueueReplaceState(c,c.state,null),Ts(e,r,c,i),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function si(e,t){try{var r="",i=t;do r+=ce(i),i=i.return;while(i);var c=r}catch(p){c=`
39
39
  Error generating stack: `+p.message+`
40
- `+p.stack}return{value:e,source:t,stack:c,digest:null}}function Ao(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Bo(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Sd=typeof WeakMap=="function"?WeakMap:Map;function kc(e,t,r){r=Xt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){$s||($s=!0,qo=i),Bo(e,t)},r}function bc(e,t,r){r=Xt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var c=t.value;r.payload=function(){return i(c)},r.callback=function(){Bo(e,t)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(r.callback=function(){Bo(e,t),typeof i!="function"&&(_r===null?_r=new Set([this]):_r.add(this));var D=t.stack;this.componentDidCatch(t.value,{componentStack:D!==null?D:""})}),r}function xc(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Sd;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(r)||(c.add(r),e=Od.bind(null,e,t,r),t.then(e,e))}function Lc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Rc(e,t,r,i,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Xt(-1,1),t.tag=2,fr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var yd=_.ReactCurrentOwner,at=!1;function it(e,t,r,i){t.child=e===null?Ga(t,null,r,i):ei(t,e.child,r,i)}function Dc(e,t,r,i,c){r=r.render;var p=t.ref;return ri(t,c),i=Eo(e,t,r,i,p,c),r=ko(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Pe&&r&&no(t),t.flags|=1,it(e,t,i,c),t.child)}function Tc(e,t,r,i,c){if(e===null){var p=r.type;return typeof p=="function"&&!el(p)&&p.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=p,Ac(e,t,p,i,c)):(e=Ys(r.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,(e.lanes&c)===0){var D=p.memoizedProps;if(r=r.compare,r=r!==null?r:bi,r(D,i)&&e.ref===t.ref)return Yt(e,t,c)}return t.flags|=1,e=Sr(p,i),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,r,i,c){if(e!==null){var p=e.memoizedProps;if(bi(p,i)&&e.ref===t.ref)if(at=!1,t.pendingProps=i=p,(e.lanes&c)!==0)(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Yt(e,t,c)}return Oo(e,t,r,i,c)}function Bc(e,t,r){var i=t.pendingProps,c=i.children,p=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(oi,mt),mt|=r;else{if((r&1073741824)===0)return e=p!==null?p.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(oi,mt),mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=p!==null?p.baseLanes:r,De(oi,mt),mt|=i}else p!==null?(i=p.baseLanes|r,t.memoizedState=null):i=r,De(oi,mt),mt|=i;return it(e,t,c,r),t.child}function Oc(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Oo(e,t,r,i,c){var p=lt(r)?Rr:Je.current;return p=Yr(t,p),ri(t,c),r=Eo(e,t,r,i,p,c),i=ko(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Pe&&i&&no(t),t.flags|=1,it(e,t,r,c),t.child)}function Pc(e,t,r,i,c){if(lt(r)){var p=!0;Cs(t)}else p=!1;if(ri(t,c),t.stateNode===null)Fs(e,t),wc(t,r,i),To(t,r,i,c),i=!0;else if(e===null){var D=t.stateNode,N=t.memoizedProps;D.props=N;var z=D.context,Y=r.contextType;typeof Y=="object"&&Y!==null?Y=yt(Y):(Y=lt(r)?Rr:Je.current,Y=Yr(t,Y));var se=r.getDerivedStateFromProps,oe=typeof se=="function"||typeof D.getSnapshotBeforeUpdate=="function";oe||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(N!==i||z!==Y)&&Ec(t,D,i,Y),dr=!1;var ie=t.memoizedState;D.state=ie,Ts(t,i,D,c),z=t.memoizedState,N!==i||ie!==z||ot.current||dr?(typeof se=="function"&&(Do(t,r,se,i),z=t.memoizedState),(N=dr||Cc(t,r,N,i,ie,z,Y))?(oe||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(t.flags|=4194308)):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=z),D.props=i,D.state=z,D.context=Y,i=N):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{D=t.stateNode,Ya(e,t),N=t.memoizedProps,Y=t.type===t.elementType?N:Tt(t.type,N),D.props=Y,oe=t.pendingProps,ie=D.context,z=r.contextType,typeof z=="object"&&z!==null?z=yt(z):(z=lt(r)?Rr:Je.current,z=Yr(t,z));var fe=r.getDerivedStateFromProps;(se=typeof fe=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(N!==oe||ie!==z)&&Ec(t,D,i,z),dr=!1,ie=t.memoizedState,D.state=ie,Ts(t,i,D,c);var _e=t.memoizedState;N!==oe||ie!==_e||ot.current||dr?(typeof fe=="function"&&(Do(t,r,fe,i),_e=t.memoizedState),(Y=dr||Cc(t,r,Y,i,ie,_e,z)||!1)?(se||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(i,_e,z),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(i,_e,z)),typeof D.componentDidUpdate=="function"&&(t.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof D.componentDidUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=_e),D.props=i,D.state=_e,D.context=z,i=Y):(typeof D.componentDidUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),i=!1)}return Po(e,t,r,i,p,c)}function Po(e,t,r,i,c,p){Oc(e,t);var D=(t.flags&128)!==0;if(!i&&!D)return c&&Fa(t,r,!1),Yt(e,t,p);i=t.stateNode,yd.current=t;var N=D&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&D?(t.child=ei(t,e.child,null,p),t.child=ei(t,null,N,p)):it(e,t,N,p),t.memoizedState=i.state,c&&Fa(t,r,!0),t.child}function Mc(e){var t=e.stateNode;t.pendingContext?Na(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Na(e,t.context,!1),mo(e,t.containerInfo)}function Ic(e,t,r,i,c){return Zr(),co(c),t.flags|=256,it(e,t,r,i),t.child}var Mo={dehydrated:null,treeContext:null,retryLane:0};function Io(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nc(e,t,r){var i=t.pendingProps,c=Me.current,p=!1,D=(t.flags&128)!==0,N;if((N=D)||(N=e!==null&&e.memoizedState===null?!1:(c&2)!==0),N?(p=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),De(Me,c&1),e===null)return ao(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(D=i.children,e=i.fallback,p?(i=t.mode,p=t.child,D={mode:"hidden",children:D},(i&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=D):p=Qs(D,i,0,null),e=Hr(e,i,r,null),p.return=t,e.return=t,p.sibling=e,t.child=p,t.child.memoizedState=Io(r),t.memoizedState=Mo,e):No(t,D));if(c=e.memoizedState,c!==null&&(N=c.dehydrated,N!==null))return Cd(e,t,D,i,N,c,r);if(p){p=i.fallback,D=t.mode,c=e.child,N=c.sibling;var z={mode:"hidden",children:i.children};return(D&1)===0&&t.child!==c?(i=t.child,i.childLanes=0,i.pendingProps=z,t.deletions=null):(i=Sr(c,z),i.subtreeFlags=c.subtreeFlags&14680064),N!==null?p=Sr(N,p):(p=Hr(p,D,r,null),p.flags|=2),p.return=t,i.return=t,i.sibling=p,t.child=i,i=p,p=t.child,D=e.child.memoizedState,D=D===null?Io(r):{baseLanes:D.baseLanes|r,cachePool:null,transitions:D.transitions},p.memoizedState=D,p.childLanes=e.childLanes&~r,t.memoizedState=Mo,i}return p=e.child,e=p.sibling,i=Sr(p,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function No(e,t){return t=Qs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hs(e,t,r,i){return i!==null&&co(i),ei(t,e.child,null,r),e=No(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cd(e,t,r,i,c,p,D){if(r)return t.flags&256?(t.flags&=-257,i=Ao(Error(h(422))),Hs(e,t,D,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(p=i.fallback,c=t.mode,i=Qs({mode:"visible",children:i.children},c,0,null),p=Hr(p,c,D,null),p.flags|=2,i.return=t,p.return=t,i.sibling=p,t.child=i,(t.mode&1)!==0&&ei(t,e.child,null,D),t.child.memoizedState=Io(D),t.memoizedState=Mo,p);if((t.mode&1)===0)return Hs(e,t,D,null);if(c.data==="$!"){if(i=c.nextSibling&&c.nextSibling.dataset,i)var N=i.dgst;return i=N,p=Error(h(419)),i=Ao(p,i,void 0),Hs(e,t,D,i)}if(N=(D&e.childLanes)!==0,at||N){if(i=qe,i!==null){switch(D&-D){case 4:c=2;break;case 16:c=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(i.suspendedLanes|D))!==0?0:c,c!==0&&c!==p.retryLane&&(p.retryLane=c,Gt(e,c),Ot(i,e,c,-1))}return Zo(),i=Ao(Error(h(421))),Hs(e,t,D,i)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=Pd.bind(null,e),c._reactRetry=t,null):(e=p.treeContext,vt=ar(c.nextSibling),_t=t,Pe=!0,Dt=null,e!==null&&(gt[St++]=Kt,gt[St++]=qt,gt[St++]=Dr,Kt=e.id,qt=e.overflow,Dr=t),t=No(t,i.children),t.flags|=4096,t)}function Hc(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),po(e.return,t,r)}function Ho(e,t,r,i,c){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:c}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=i,p.tail=r,p.tailMode=c)}function Fc(e,t,r){var i=t.pendingProps,c=i.revealOrder,p=i.tail;if(it(e,t,i.children,r),i=Me.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hc(e,r,t);else if(e.tag===19)Hc(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(De(Me,i),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&As(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),Ho(t,!1,c,r,p);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&As(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}Ho(t,!0,r,null,p);break;case"together":Ho(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(h(153));if(t.child!==null){for(e=t.child,r=Sr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Sr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function wd(e,t,r){switch(t.tag){case 3:Mc(t),Zr();break;case 5:Za(t);break;case 1:lt(t.type)&&Cs(t);break;case 4:mo(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,c=t.memoizedProps.value;De(Ls,i._currentValue),i._currentValue=c;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(De(Me,Me.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Nc(e,t,r):(De(Me,Me.current&1),e=Yt(e,t,r),e!==null?e.sibling:null);De(Me,Me.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Fc(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),De(Me,Me.current),i)break;return null;case 22:case 23:return t.lanes=0,Bc(e,t,r)}return Yt(e,t,r)}var jc,Fo,zc,Uc;jc=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Fo=function(){},zc=function(e,t,r,i){var c=e.memoizedProps;if(c!==i){e=t.stateNode,Br(Ht.current);var p=null;switch(r){case"input":c=Re(e,c),i=Re(e,i),p=[];break;case"select":c=O({},c,{value:void 0}),i=O({},i,{value:void 0}),p=[];break;case"textarea":c=Zt(e,c),i=Zt(e,i),p=[];break;default:typeof c.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=gs)}gn(r,i);var D;r=null;for(Y in c)if(!i.hasOwnProperty(Y)&&c.hasOwnProperty(Y)&&c[Y]!=null)if(Y==="style"){var N=c[Y];for(D in N)N.hasOwnProperty(D)&&(r||(r={}),r[D]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(M.hasOwnProperty(Y)?p||(p=[]):(p=p||[]).push(Y,null));for(Y in i){var z=i[Y];if(N=c!=null?c[Y]:void 0,i.hasOwnProperty(Y)&&z!==N&&(z!=null||N!=null))if(Y==="style")if(N){for(D in N)!N.hasOwnProperty(D)||z&&z.hasOwnProperty(D)||(r||(r={}),r[D]="");for(D in z)z.hasOwnProperty(D)&&N[D]!==z[D]&&(r||(r={}),r[D]=z[D])}else r||(p||(p=[]),p.push(Y,r)),r=z;else Y==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,N=N?N.__html:void 0,z!=null&&N!==z&&(p=p||[]).push(Y,z)):Y==="children"?typeof z!="string"&&typeof z!="number"||(p=p||[]).push(Y,""+z):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(M.hasOwnProperty(Y)?(z!=null&&Y==="onScroll"&&Be("scroll",e),p||N===z||(p=[])):(p=p||[]).push(Y,z))}r&&(p=p||[]).push("style",r);var Y=p;(t.updateQueue=Y)&&(t.flags|=4)}},Uc=function(e,t,r,i){r!==i&&(t.flags|=4)};function ji(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags&14680064,i|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Ed(e,t,r){var i=t.pendingProps;switch(oo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return lt(t.type)&&ys(),et(t),null;case 3:return i=t.stateNode,ii(),Oe(ot),Oe(Je),yo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(bs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dt!==null&&(Yo(Dt),Dt=null))),Fo(e,t),et(t),null;case 5:go(t);var c=Br(Mi.current);if(r=t.type,e!==null&&t.stateNode!=null)zc(e,t,r,i,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(h(166));return et(t),null}if(e=Br(Ht.current),bs(t)){i=t.stateNode,r=t.type;var p=t.memoizedProps;switch(i[Nt]=t,i[Ti]=p,e=(t.mode&1)!==0,r){case"dialog":Be("cancel",i),Be("close",i);break;case"iframe":case"object":case"embed":Be("load",i);break;case"video":case"audio":for(c=0;c<Li.length;c++)Be(Li[c],i);break;case"source":Be("error",i);break;case"img":case"image":case"link":Be("error",i),Be("load",i);break;case"details":Be("toggle",i);break;case"input":Te(i,p),Be("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!p.multiple},Be("invalid",i);break;case"textarea":rt(i,p),Be("invalid",i)}gn(r,p),c=null;for(var D in p)if(p.hasOwnProperty(D)){var N=p[D];D==="children"?typeof N=="string"?i.textContent!==N&&(p.suppressHydrationWarning!==!0&&ms(i.textContent,N,e),c=["children",N]):typeof N=="number"&&i.textContent!==""+N&&(p.suppressHydrationWarning!==!0&&ms(i.textContent,N,e),c=["children",""+N]):M.hasOwnProperty(D)&&N!=null&&D==="onScroll"&&Be("scroll",i)}switch(r){case"input":de(i),Jt(i,p,!0);break;case"textarea":de(i),dt(i);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(i.onclick=gs)}i=c,t.updateQueue=i,i!==null&&(t.flags|=4)}else{D=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tr(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=D.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=D.createElement(r,{is:i.is}):(e=D.createElement(r),r==="select"&&(D=e,i.multiple?D.multiple=!0:i.size&&(D.size=i.size))):e=D.createElementNS(e,r),e[Nt]=t,e[Ti]=i,jc(e,t,!1,!1),t.stateNode=e;e:{switch(D=Sn(r,i),r){case"dialog":Be("cancel",e),Be("close",e),c=i;break;case"iframe":case"object":case"embed":Be("load",e),c=i;break;case"video":case"audio":for(c=0;c<Li.length;c++)Be(Li[c],e);c=i;break;case"source":Be("error",e),c=i;break;case"img":case"image":case"link":Be("error",e),Be("load",e),c=i;break;case"details":Be("toggle",e),c=i;break;case"input":Te(e,i),c=Re(e,i),Be("invalid",e);break;case"option":c=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},c=O({},i,{value:void 0}),Be("invalid",e);break;case"textarea":rt(e,i),c=Zt(e,i),Be("invalid",e);break;default:c=i}gn(r,c),N=c;for(p in N)if(N.hasOwnProperty(p)){var z=N[p];p==="style"?Al(e,z):p==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&br(e,z)):p==="children"?typeof z=="string"?(r!=="textarea"||z!=="")&&nt(e,z):typeof z=="number"&&nt(e,""+z):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(M.hasOwnProperty(p)?z!=null&&p==="onScroll"&&Be("scroll",e):z!=null&&n(e,p,z,D))}switch(r){case"input":de(e),Jt(e,i,!1);break;case"textarea":de(e),dt(e);break;case"option":i.value!=null&&e.setAttribute("value",""+B(i.value));break;case"select":e.multiple=!!i.multiple,p=i.value,p!=null?Mt(e,!!i.multiple,p,!1):i.defaultValue!=null&&Mt(e,!!i.multiple,i.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=gs)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return et(t),null;case 6:if(e&&t.stateNode!=null)Uc(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(h(166));if(r=Br(Mi.current),Br(Ht.current),bs(t)){if(i=t.stateNode,r=t.memoizedProps,i[Nt]=t,(p=i.nodeValue!==r)&&(e=_t,e!==null))switch(e.tag){case 3:ms(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ms(i.nodeValue,r,(e.mode&1)!==0)}p&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Nt]=t,t.stateNode=i}return et(t),null;case 13:if(Oe(Me),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Va(),Zr(),t.flags|=98560,p=!1;else if(p=bs(t),i!==null&&i.dehydrated!==null){if(e===null){if(!p)throw Error(h(318));if(p=t.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(h(317));p[Nt]=t}else Zr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),p=!1}else Dt!==null&&(Yo(Dt),Dt=null),p=!0;if(!p)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Me.current&1)!==0?We===0&&(We=3):Zo())),t.updateQueue!==null&&(t.flags|=4),et(t),null);case 4:return ii(),Fo(e,t),e===null&&Ri(t.stateNode.containerInfo),et(t),null;case 10:return fo(t.type._context),et(t),null;case 17:return lt(t.type)&&ys(),et(t),null;case 19:if(Oe(Me),p=t.memoizedState,p===null)return et(t),null;if(i=(t.flags&128)!==0,D=p.rendering,D===null)if(i)ji(p,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(D=As(e),D!==null){for(t.flags|=128,ji(p,!1),i=D.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)p=r,e=i,p.flags&=14680066,D=p.alternate,D===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=D.childLanes,p.lanes=D.lanes,p.child=D.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=D.memoizedProps,p.memoizedState=D.memoizedState,p.updateQueue=D.updateQueue,p.type=D.type,e=D.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return De(Me,Me.current&1|2),t.child}e=e.sibling}p.tail!==null&&He()>li&&(t.flags|=128,i=!0,ji(p,!1),t.lanes=4194304)}else{if(!i)if(e=As(D),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ji(p,!0),p.tail===null&&p.tailMode==="hidden"&&!D.alternate&&!Pe)return et(t),null}else 2*He()-p.renderingStartTime>li&&r!==1073741824&&(t.flags|=128,i=!0,ji(p,!1),t.lanes=4194304);p.isBackwards?(D.sibling=t.child,t.child=D):(r=p.last,r!==null?r.sibling=D:t.child=D,p.last=D)}return p.tail!==null?(t=p.tail,p.rendering=t,p.tail=t.sibling,p.renderingStartTime=He(),t.sibling=null,r=Me.current,De(Me,i?r&1|2:r&1),t):(et(t),null);case 22:case 23:return Jo(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(mt&1073741824)!==0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error(h(156,t.tag))}function kd(e,t){switch(oo(t),t.tag){case 1:return lt(t.type)&&ys(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ii(),Oe(ot),Oe(Je),yo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return go(t),null;case 13:if(Oe(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(h(340));Zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Me),null;case 4:return ii(),null;case 10:return fo(t.type._context),null;case 22:case 23:return Jo(),null;case 24:return null;default:return null}}var js=!1,tt=!1,bd=typeof WeakSet=="function"?WeakSet:Set,pe=null;function ni(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Ne(e,t,i)}else r.current=null}function jo(e,t,r){try{r()}catch(i){Ne(e,t,i)}}var Wc=!1;function xd(e,t){if(Qn=os,e=Ca(),Wn(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var c=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var D=0,N=-1,z=-1,Y=0,se=0,oe=e,ie=null;t:for(;;){for(var fe;oe!==r||c!==0&&oe.nodeType!==3||(N=D+c),oe!==p||i!==0&&oe.nodeType!==3||(z=D+i),oe.nodeType===3&&(D+=oe.nodeValue.length),(fe=oe.firstChild)!==null;)ie=oe,oe=fe;for(;;){if(oe===e)break t;if(ie===r&&++Y===c&&(N=D),ie===p&&++se===i&&(z=D),(fe=oe.nextSibling)!==null)break;oe=ie,ie=oe.parentNode}oe=fe}r=N===-1||z===-1?null:{start:N,end:z}}else r=null}r=r||{start:0,end:0}}else r=null;for(Jn={focusedElem:e,selectionRange:r},os=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var _e=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_e!==null){var ve=_e.memoizedProps,Fe=_e.memoizedState,K=t.stateNode,$=K.getSnapshotBeforeUpdate(t.elementType===t.type?ve:Tt(t.type,ve),Fe);K.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var G=t.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(h(163))}}catch(ae){Ne(t,t.return,ae)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return _e=Wc,Wc=!1,_e}function zi(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&e)===e){var p=c.destroy;c.destroy=void 0,p!==void 0&&jo(t,r,p)}c=c.next}while(c!==i)}}function zs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function zo(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function $c(e){var t=e.alternate;t!==null&&(e.alternate=null,$c(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[Ti],delete t[ro],delete t[ad],delete t[cd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Vc(e){return e.tag===5||e.tag===3||e.tag===4}function Kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=gs));else if(i!==4&&(e=e.child,e!==null))for(Uo(e,t,r),e=e.sibling;e!==null;)Uo(e,t,r),e=e.sibling}function Wo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Wo(e,t,r),e=e.sibling;e!==null;)Wo(e,t,r),e=e.sibling}var Ye=null,At=!1;function pr(e,t,r){for(r=r.child;r!==null;)qc(e,t,r),r=r.sibling}function qc(e,t,r){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(es,r)}catch{}switch(r.tag){case 5:tt||ni(r,t);case 6:var i=Ye,c=At;Ye=null,pr(e,t,r),Ye=i,At=c,Ye!==null&&(At?(e=Ye,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ye.removeChild(r.stateNode));break;case 18:Ye!==null&&(At?(e=Ye,r=r.stateNode,e.nodeType===8?to(e.parentNode,r):e.nodeType===1&&to(e,r),Si(e)):to(Ye,r.stateNode));break;case 4:i=Ye,c=At,Ye=r.stateNode.containerInfo,At=!0,pr(e,t,r),Ye=i,At=c;break;case 0:case 11:case 14:case 15:if(!tt&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){c=i=i.next;do{var p=c,D=p.destroy;p=p.tag,D!==void 0&&((p&2)!==0||(p&4)!==0)&&jo(r,t,D),c=c.next}while(c!==i)}pr(e,t,r);break;case 1:if(!tt&&(ni(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(N){Ne(r,t,N)}pr(e,t,r);break;case 21:pr(e,t,r);break;case 22:r.mode&1?(tt=(i=tt)||r.memoizedState!==null,pr(e,t,r),tt=i):pr(e,t,r);break;default:pr(e,t,r)}}function Gc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new bd),t.forEach(function(i){var c=Md.bind(null,e,i);r.has(i)||(r.add(i),i.then(c,c))})}}function Bt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];try{var p=e,D=t,N=D;e:for(;N!==null;){switch(N.tag){case 5:Ye=N.stateNode,At=!1;break e;case 3:Ye=N.stateNode.containerInfo,At=!0;break e;case 4:Ye=N.stateNode.containerInfo,At=!0;break e}N=N.return}if(Ye===null)throw Error(h(160));qc(p,D,c),Ye=null,At=!1;var z=c.alternate;z!==null&&(z.return=null),c.return=null}catch(Y){Ne(c,t,Y)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xc(t,e),t=t.sibling}function Xc(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),jt(e),i&4){try{zi(3,e,e.return),zs(3,e)}catch(ve){Ne(e,e.return,ve)}try{zi(5,e,e.return)}catch(ve){Ne(e,e.return,ve)}}break;case 1:Bt(t,e),jt(e),i&512&&r!==null&&ni(r,r.return);break;case 5:if(Bt(t,e),jt(e),i&512&&r!==null&&ni(r,r.return),e.flags&32){var c=e.stateNode;try{nt(c,"")}catch(ve){Ne(e,e.return,ve)}}if(i&4&&(c=e.stateNode,c!=null)){var p=e.memoizedProps,D=r!==null?r.memoizedProps:p,N=e.type,z=e.updateQueue;if(e.updateQueue=null,z!==null)try{N==="input"&&p.type==="radio"&&p.name!=null&&Xe(c,p),Sn(N,D);var Y=Sn(N,p);for(D=0;D<z.length;D+=2){var se=z[D],oe=z[D+1];se==="style"?Al(c,oe):se==="dangerouslySetInnerHTML"?br(c,oe):se==="children"?nt(c,oe):n(c,se,oe,Y)}switch(N){case"input":ye(c,p);break;case"textarea":er(c,p);break;case"select":var ie=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!p.multiple;var fe=p.value;fe!=null?Mt(c,!!p.multiple,fe,!1):ie!==!!p.multiple&&(p.defaultValue!=null?Mt(c,!!p.multiple,p.defaultValue,!0):Mt(c,!!p.multiple,p.multiple?[]:"",!1))}c[Ti]=p}catch(ve){Ne(e,e.return,ve)}}break;case 6:if(Bt(t,e),jt(e),i&4){if(e.stateNode===null)throw Error(h(162));c=e.stateNode,p=e.memoizedProps;try{c.nodeValue=p}catch(ve){Ne(e,e.return,ve)}}break;case 3:if(Bt(t,e),jt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(ve){Ne(e,e.return,ve)}break;case 4:Bt(t,e),jt(e);break;case 13:Bt(t,e),jt(e),c=e.child,c.flags&8192&&(p=c.memoizedState!==null,c.stateNode.isHidden=p,!p||c.alternate!==null&&c.alternate.memoizedState!==null||(Ko=He())),i&4&&Gc(e);break;case 22:if(se=r!==null&&r.memoizedState!==null,e.mode&1?(tt=(Y=tt)||se,Bt(t,e),tt=Y):Bt(t,e),jt(e),i&8192){if(Y=e.memoizedState!==null,(e.stateNode.isHidden=Y)&&!se&&(e.mode&1)!==0)for(pe=e,se=e.child;se!==null;){for(oe=pe=se;pe!==null;){switch(ie=pe,fe=ie.child,ie.tag){case 0:case 11:case 14:case 15:zi(4,ie,ie.return);break;case 1:ni(ie,ie.return);var _e=ie.stateNode;if(typeof _e.componentWillUnmount=="function"){i=ie,r=ie.return;try{t=i,_e.props=t.memoizedProps,_e.state=t.memoizedState,_e.componentWillUnmount()}catch(ve){Ne(i,r,ve)}}break;case 5:ni(ie,ie.return);break;case 22:if(ie.memoizedState!==null){Jc(oe);continue}}fe!==null?(fe.return=ie,pe=fe):Jc(oe)}se=se.sibling}e:for(se=null,oe=e;;){if(oe.tag===5){if(se===null){se=oe;try{c=oe.stateNode,Y?(p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(N=oe.stateNode,z=oe.memoizedProps.style,D=z!=null&&z.hasOwnProperty("display")?z.display:null,N.style.display=Yi("display",D))}catch(ve){Ne(e,e.return,ve)}}}else if(oe.tag===6){if(se===null)try{oe.stateNode.nodeValue=Y?"":oe.memoizedProps}catch(ve){Ne(e,e.return,ve)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===e)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===e)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===e)break e;se===oe&&(se=null),oe=oe.return}se===oe&&(se=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Bt(t,e),jt(e),i&4&&Gc(e);break;case 21:break;default:Bt(t,e),jt(e)}}function jt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Vc(r)){var i=r;break e}r=r.return}throw Error(h(160))}switch(i.tag){case 5:var c=i.stateNode;i.flags&32&&(nt(c,""),i.flags&=-33);var p=Kc(e);Wo(e,p,c);break;case 3:case 4:var D=i.stateNode.containerInfo,N=Kc(e);Uo(e,N,D);break;default:throw Error(h(161))}}catch(z){Ne(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ld(e,t,r){pe=e,Yc(e)}function Yc(e,t,r){for(var i=(e.mode&1)!==0;pe!==null;){var c=pe,p=c.child;if(c.tag===22&&i){var D=c.memoizedState!==null||js;if(!D){var N=c.alternate,z=N!==null&&N.memoizedState!==null||tt;N=js;var Y=tt;if(js=D,(tt=z)&&!Y)for(pe=c;pe!==null;)D=pe,z=D.child,D.tag===22&&D.memoizedState!==null?Zc(c):z!==null?(z.return=D,pe=z):Zc(c);for(;p!==null;)pe=p,Yc(p),p=p.sibling;pe=c,js=N,tt=Y}Qc(e)}else(c.subtreeFlags&8772)!==0&&p!==null?(p.return=c,pe=p):Qc(e)}}function Qc(e){for(;pe!==null;){var t=pe;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:tt||zs(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!tt)if(r===null)i.componentDidMount();else{var c=t.elementType===t.type?r.memoizedProps:Tt(t.type,r.memoizedProps);i.componentDidUpdate(c,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var p=t.updateQueue;p!==null&&Ja(t,p,i);break;case 3:var D=t.updateQueue;if(D!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Ja(t,D,r)}break;case 5:var N=t.stateNode;if(r===null&&t.flags&4){r=N;var z=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&r.focus();break;case"img":z.src&&(r.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var Y=t.alternate;if(Y!==null){var se=Y.memoizedState;if(se!==null){var oe=se.dehydrated;oe!==null&&Si(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(h(163))}tt||t.flags&512&&zo(t)}catch(ie){Ne(t,t.return,ie)}}if(t===e){pe=null;break}if(r=t.sibling,r!==null){r.return=t.return,pe=r;break}pe=t.return}}function Jc(e){for(;pe!==null;){var t=pe;if(t===e){pe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,pe=r;break}pe=t.return}}function Zc(e){for(;pe!==null;){var t=pe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{zs(4,t)}catch(z){Ne(t,r,z)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var c=t.return;try{i.componentDidMount()}catch(z){Ne(t,c,z)}}var p=t.return;try{zo(t)}catch(z){Ne(t,p,z)}break;case 5:var D=t.return;try{zo(t)}catch(z){Ne(t,D,z)}}}catch(z){Ne(t,t.return,z)}if(t===e){pe=null;break}var N=t.sibling;if(N!==null){N.return=t.return,pe=N;break}pe=t.return}}var Rd=Math.ceil,Us=_.ReactCurrentDispatcher,$o=_.ReactCurrentOwner,wt=_.ReactCurrentBatchConfig,be=0,qe=null,je=null,Qe=0,mt=0,oi=cr(0),We=0,Ui=null,Pr=0,Ws=0,Vo=0,Wi=null,ct=null,Ko=0,li=1/0,Qt=null,$s=!1,qo=null,_r=null,Vs=!1,vr=null,Ks=0,$i=0,Go=null,qs=-1,Gs=0;function st(){return(be&6)!==0?He():qs!==-1?qs:qs=He()}function mr(e){return(e.mode&1)===0?1:(be&2)!==0&&Qe!==0?Qe&-Qe:ud.transition!==null?(Gs===0&&(Gs=Kl()),Gs):(e=Le,e!==0||(e=window.event,e=e===void 0?16:ta(e.type)),e)}function Ot(e,t,r,i){if(50<$i)throw $i=0,Go=null,Error(h(185));pi(e,r,i),((be&2)===0||e!==qe)&&(e===qe&&((be&2)===0&&(Ws|=r),We===4&&gr(e,Qe)),ht(e,i),r===1&&be===0&&(t.mode&1)===0&&(li=He()+500,ws&&ur()))}function ht(e,t){var r=e.callbackNode;uu(e,t);var i=is(e,e===qe?Qe:0);if(i===0)r!==null&&Wl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Wl(r),t===1)e.tag===0?hd(th.bind(null,e)):ja(th.bind(null,e)),od(function(){(be&6)===0&&ur()}),r=null;else{switch(ql(i)){case 1:r=xn;break;case 4:r=$l;break;case 16:r=Zi;break;case 536870912:r=Vl;break;default:r=Zi}r=ch(r,eh.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function eh(e,t){if(qs=-1,Gs=0,(be&6)!==0)throw Error(h(327));var r=e.callbackNode;if(ai()&&e.callbackNode!==r)return null;var i=is(e,e===qe?Qe:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Xs(e,i);else{t=i;var c=be;be|=2;var p=ih();(qe!==e||Qe!==t)&&(Qt=null,li=He()+500,Ir(e,t));do try{Ad();break}catch(N){rh(e,N)}while(!0);uo(),Us.current=p,be=c,je!==null?t=0:(qe=null,Qe=0,t=We)}if(t!==0){if(t===2&&(c=Ln(e),c!==0&&(i=c,t=Xo(e,c))),t===1)throw r=Ui,Ir(e,0),gr(e,i),ht(e,He()),r;if(t===6)gr(e,i);else{if(c=e.current.alternate,(i&30)===0&&!Dd(c)&&(t=Xs(e,i),t===2&&(p=Ln(e),p!==0&&(i=p,t=Xo(e,p))),t===1))throw r=Ui,Ir(e,0),gr(e,i),ht(e,He()),r;switch(e.finishedWork=c,e.finishedLanes=i,t){case 0:case 1:throw Error(h(345));case 2:Nr(e,ct,Qt);break;case 3:if(gr(e,i),(i&130023424)===i&&(t=Ko+500-He(),10<t)){if(is(e,0)!==0)break;if(c=e.suspendedLanes,(c&i)!==i){st(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=eo(Nr.bind(null,e,ct,Qt),t);break}Nr(e,ct,Qt);break;case 4:if(gr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,c=-1;0<i;){var D=31-Lt(i);p=1<<D,D=t[D],D>c&&(c=D),i&=~p}if(i=c,i=He()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Rd(i/1960))-i,10<i){e.timeoutHandle=eo(Nr.bind(null,e,ct,Qt),i);break}Nr(e,ct,Qt);break;case 5:Nr(e,ct,Qt);break;default:throw Error(h(329))}}}return ht(e,He()),e.callbackNode===r?eh.bind(null,e):null}function Xo(e,t){var r=Wi;return e.current.memoizedState.isDehydrated&&(Ir(e,t).flags|=256),e=Xs(e,t),e!==2&&(t=ct,ct=r,t!==null&&Yo(t)),e}function Yo(e){ct===null?ct=e:ct.push.apply(ct,e)}function Dd(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var c=r[i],p=c.getSnapshot;c=c.value;try{if(!Rt(p(),c))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gr(e,t){for(t&=~Vo,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Lt(t),i=1<<r;e[r]=-1,t&=~i}}function th(e){if((be&6)!==0)throw Error(h(327));ai();var t=is(e,0);if((t&1)===0)return ht(e,He()),null;var r=Xs(e,t);if(e.tag!==0&&r===2){var i=Ln(e);i!==0&&(t=i,r=Xo(e,i))}if(r===1)throw r=Ui,Ir(e,0),gr(e,t),ht(e,He()),r;if(r===6)throw Error(h(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nr(e,ct,Qt),ht(e,He()),null}function Qo(e,t){var r=be;be|=1;try{return e(t)}finally{be=r,be===0&&(li=He()+500,ws&&ur())}}function Mr(e){vr!==null&&vr.tag===0&&(be&6)===0&&ai();var t=be;be|=1;var r=wt.transition,i=Le;try{if(wt.transition=null,Le=1,e)return e()}finally{Le=i,wt.transition=r,be=t,(be&6)===0&&ur()}}function Jo(){mt=oi.current,Oe(oi)}function Ir(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,nd(r)),je!==null)for(r=je.return;r!==null;){var i=r;switch(oo(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ys();break;case 3:ii(),Oe(ot),Oe(Je),yo();break;case 5:go(i);break;case 4:ii();break;case 13:Oe(Me);break;case 19:Oe(Me);break;case 10:fo(i.type._context);break;case 22:case 23:Jo()}r=r.return}if(qe=e,je=e=Sr(e.current,null),Qe=mt=t,We=0,Ui=null,Vo=Ws=Pr=0,ct=Wi=null,Ar!==null){for(t=0;t<Ar.length;t++)if(r=Ar[t],i=r.interleaved,i!==null){r.interleaved=null;var c=i.next,p=r.pending;if(p!==null){var D=p.next;p.next=c,i.next=D}r.pending=i}Ar=null}return e}function rh(e,t){do{var r=je;try{if(uo(),Bs.current=Is,Os){for(var i=Ie.memoizedState;i!==null;){var c=i.queue;c!==null&&(c.pending=null),i=i.next}Os=!1}if(Or=0,Ke=Ue=Ie=null,Ii=!1,Ni=0,$o.current=null,r===null||r.return===null){We=1,Ui=t,je=null;break}e:{var p=e,D=r.return,N=r,z=t;if(t=Qe,N.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Y=z,se=N,oe=se.tag;if((se.mode&1)===0&&(oe===0||oe===11||oe===15)){var ie=se.alternate;ie?(se.updateQueue=ie.updateQueue,se.memoizedState=ie.memoizedState,se.lanes=ie.lanes):(se.updateQueue=null,se.memoizedState=null)}var fe=Lc(D);if(fe!==null){fe.flags&=-257,Rc(fe,D,N,p,t),fe.mode&1&&xc(p,Y,t),t=fe,z=Y;var _e=t.updateQueue;if(_e===null){var ve=new Set;ve.add(z),t.updateQueue=ve}else _e.add(z);break e}else{if((t&1)===0){xc(p,Y,t),Zo();break e}z=Error(h(426))}}else if(Pe&&N.mode&1){var Fe=Lc(D);if(Fe!==null){(Fe.flags&65536)===0&&(Fe.flags|=256),Rc(Fe,D,N,p,t),co(si(z,N));break e}}p=z=si(z,N),We!==4&&(We=2),Wi===null?Wi=[p]:Wi.push(p),p=D;do{switch(p.tag){case 3:p.flags|=65536,t&=-t,p.lanes|=t;var K=kc(p,z,t);Qa(p,K);break e;case 1:N=z;var $=p.type,G=p.stateNode;if((p.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(_r===null||!_r.has(G)))){p.flags|=65536,t&=-t,p.lanes|=t;var ae=bc(p,N,t);Qa(p,ae);break e}}p=p.return}while(p!==null)}nh(r)}catch(me){t=me,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function ih(){var e=Us.current;return Us.current=Is,e===null?Is:e}function Zo(){(We===0||We===3||We===2)&&(We=4),qe===null||(Pr&268435455)===0&&(Ws&268435455)===0||gr(qe,Qe)}function Xs(e,t){var r=be;be|=2;var i=ih();(qe!==e||Qe!==t)&&(Qt=null,Ir(e,t));do try{Td();break}catch(c){rh(e,c)}while(!0);if(uo(),be=r,Us.current=i,je!==null)throw Error(h(261));return qe=null,Qe=0,We}function Td(){for(;je!==null;)sh(je)}function Ad(){for(;je!==null&&!ru();)sh(je)}function sh(e){var t=ah(e.alternate,e,mt);e.memoizedProps=e.pendingProps,t===null?nh(e):je=t,$o.current=null}function nh(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Ed(r,t,mt),r!==null){je=r;return}}else{if(r=kd(r,t),r!==null){r.flags&=32767,je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,je=null;return}}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);We===0&&(We=5)}function Nr(e,t,r){var i=Le,c=wt.transition;try{wt.transition=null,Le=1,Bd(e,t,r,i)}finally{wt.transition=c,Le=i}return null}function Bd(e,t,r,i){do ai();while(vr!==null);if((be&6)!==0)throw Error(h(327));r=e.finishedWork;var c=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(h(177));e.callbackNode=null,e.callbackPriority=0;var p=r.lanes|r.childLanes;if(du(e,p),e===qe&&(je=qe=null,Qe=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Vs||(Vs=!0,ch(Zi,function(){return ai(),null})),p=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||p){p=wt.transition,wt.transition=null;var D=Le;Le=1;var N=be;be|=4,$o.current=null,xd(e,r),Xc(r,e),Ju(Jn),os=!!Qn,Jn=Qn=null,e.current=r,Ld(r),iu(),be=N,Le=D,wt.transition=p}else e.current=r;if(Vs&&(Vs=!1,vr=e,Ks=c),p=e.pendingLanes,p===0&&(_r=null),ou(r.stateNode),ht(e,He()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)c=t[r],i(c.value,{componentStack:c.stack,digest:c.digest});if($s)throw $s=!1,e=qo,qo=null,e;return(Ks&1)!==0&&e.tag!==0&&ai(),p=e.pendingLanes,(p&1)!==0?e===Go?$i++:($i=0,Go=e):$i=0,ur(),null}function ai(){if(vr!==null){var e=ql(Ks),t=wt.transition,r=Le;try{if(wt.transition=null,Le=16>e?16:e,vr===null)var i=!1;else{if(e=vr,vr=null,Ks=0,(be&6)!==0)throw Error(h(331));var c=be;for(be|=4,pe=e.current;pe!==null;){var p=pe,D=p.child;if((pe.flags&16)!==0){var N=p.deletions;if(N!==null){for(var z=0;z<N.length;z++){var Y=N[z];for(pe=Y;pe!==null;){var se=pe;switch(se.tag){case 0:case 11:case 15:zi(8,se,p)}var oe=se.child;if(oe!==null)oe.return=se,pe=oe;else for(;pe!==null;){se=pe;var ie=se.sibling,fe=se.return;if($c(se),se===Y){pe=null;break}if(ie!==null){ie.return=fe,pe=ie;break}pe=fe}}}var _e=p.alternate;if(_e!==null){var ve=_e.child;if(ve!==null){_e.child=null;do{var Fe=ve.sibling;ve.sibling=null,ve=Fe}while(ve!==null)}}pe=p}}if((p.subtreeFlags&2064)!==0&&D!==null)D.return=p,pe=D;else e:for(;pe!==null;){if(p=pe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:zi(9,p,p.return)}var K=p.sibling;if(K!==null){K.return=p.return,pe=K;break e}pe=p.return}}var $=e.current;for(pe=$;pe!==null;){D=pe;var G=D.child;if((D.subtreeFlags&2064)!==0&&G!==null)G.return=D,pe=G;else e:for(D=$;pe!==null;){if(N=pe,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:zs(9,N)}}catch(me){Ne(N,N.return,me)}if(N===D){pe=null;break e}var ae=N.sibling;if(ae!==null){ae.return=N.return,pe=ae;break e}pe=N.return}}if(be=c,ur(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(es,e)}catch{}i=!0}return i}finally{Le=r,wt.transition=t}}return!1}function oh(e,t,r){t=si(r,t),t=kc(e,t,1),e=fr(e,t,1),t=st(),e!==null&&(pi(e,1,t),ht(e,t))}function Ne(e,t,r){if(e.tag===3)oh(e,e,r);else for(;t!==null;){if(t.tag===3){oh(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(_r===null||!_r.has(i))){e=si(r,e),e=bc(t,e,1),t=fr(t,e,1),e=st(),t!==null&&(pi(t,1,e),ht(t,e));break}}t=t.return}}function Od(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=st(),e.pingedLanes|=e.suspendedLanes&r,qe===e&&(Qe&r)===r&&(We===4||We===3&&(Qe&130023424)===Qe&&500>He()-Ko?Ir(e,0):Vo|=r),ht(e,t)}function lh(e,t){t===0&&((e.mode&1)===0?t=1:(t=rs,rs<<=1,(rs&130023424)===0&&(rs=4194304)));var r=st();e=Gt(e,t),e!==null&&(pi(e,t,r),ht(e,r))}function Pd(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),lh(e,r)}function Md(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(h(314))}i!==null&&i.delete(t),lh(e,r)}var ah;ah=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)at=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return at=!1,wd(e,t,r);at=(e.flags&131072)!==0}else at=!1,Pe&&(t.flags&1048576)!==0&&za(t,ks,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Fs(e,t),e=t.pendingProps;var c=Yr(t,Je.current);ri(t,r),c=Eo(null,t,i,e,c,r);var p=ko();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(i)?(p=!0,Cs(t)):p=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,vo(t),c.updater=Ns,t.stateNode=c,c._reactInternals=t,To(t,i,e,r),t=Po(null,t,i,!0,p,r)):(t.tag=0,Pe&&p&&no(t),it(null,t,c,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,c=i._init,i=c(i._payload),t.type=i,c=t.tag=Nd(i),e=Tt(i,e),c){case 0:t=Oo(null,t,i,e,r);break e;case 1:t=Pc(null,t,i,e,r);break e;case 11:t=Dc(null,t,i,e,r);break e;case 14:t=Tc(null,t,i,Tt(i.type,e),r);break e}throw Error(h(306,i,""))}return t;case 0:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Oo(e,t,i,c,r);case 1:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Pc(e,t,i,c,r);case 3:e:{if(Mc(t),e===null)throw Error(h(387));i=t.pendingProps,p=t.memoizedState,c=p.element,Ya(e,t),Ts(t,i,null,r);var D=t.memoizedState;if(i=D.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:D.cache,pendingSuspenseBoundaries:D.pendingSuspenseBoundaries,transitions:D.transitions},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){c=si(Error(h(423)),t),t=Ic(e,t,i,r,c);break e}else if(i!==c){c=si(Error(h(424)),t),t=Ic(e,t,i,r,c);break e}else for(vt=ar(t.stateNode.containerInfo.firstChild),_t=t,Pe=!0,Dt=null,r=Ga(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zr(),i===c){t=Yt(e,t,r);break e}it(e,t,i,r)}t=t.child}return t;case 5:return Za(t),e===null&&ao(t),i=t.type,c=t.pendingProps,p=e!==null?e.memoizedProps:null,D=c.children,Zn(i,c)?D=null:p!==null&&Zn(i,p)&&(t.flags|=32),Oc(e,t),it(e,t,D,r),t.child;case 6:return e===null&&ao(t),null;case 13:return Nc(e,t,r);case 4:return mo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=ei(t,null,i,r):it(e,t,i,r),t.child;case 11:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Dc(e,t,i,c,r);case 7:return it(e,t,t.pendingProps,r),t.child;case 8:return it(e,t,t.pendingProps.children,r),t.child;case 12:return it(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,c=t.pendingProps,p=t.memoizedProps,D=c.value,De(Ls,i._currentValue),i._currentValue=D,p!==null)if(Rt(p.value,D)){if(p.children===c.children&&!ot.current){t=Yt(e,t,r);break e}}else for(p=t.child,p!==null&&(p.return=t);p!==null;){var N=p.dependencies;if(N!==null){D=p.child;for(var z=N.firstContext;z!==null;){if(z.context===i){if(p.tag===1){z=Xt(-1,r&-r),z.tag=2;var Y=p.updateQueue;if(Y!==null){Y=Y.shared;var se=Y.pending;se===null?z.next=z:(z.next=se.next,se.next=z),Y.pending=z}}p.lanes|=r,z=p.alternate,z!==null&&(z.lanes|=r),po(p.return,r,t),N.lanes|=r;break}z=z.next}}else if(p.tag===10)D=p.type===t.type?null:p.child;else if(p.tag===18){if(D=p.return,D===null)throw Error(h(341));D.lanes|=r,N=D.alternate,N!==null&&(N.lanes|=r),po(D,r,t),D=p.sibling}else D=p.child;if(D!==null)D.return=p;else for(D=p;D!==null;){if(D===t){D=null;break}if(p=D.sibling,p!==null){p.return=D.return,D=p;break}D=D.return}p=D}it(e,t,c.children,r),t=t.child}return t;case 9:return c=t.type,i=t.pendingProps.children,ri(t,r),c=yt(c),i=i(c),t.flags|=1,it(e,t,i,r),t.child;case 14:return i=t.type,c=Tt(i,t.pendingProps),c=Tt(i.type,c),Tc(e,t,i,c,r);case 15:return Ac(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Fs(e,t),t.tag=1,lt(i)?(e=!0,Cs(t)):e=!1,ri(t,r),wc(t,i,c),To(t,i,c,r),Po(null,t,i,!0,e,r);case 19:return Fc(e,t,r);case 22:return Bc(e,t,r)}throw Error(h(156,t.tag))};function ch(e,t){return Ul(e,t)}function Id(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,r,i){return new Id(e,t,r,i)}function el(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Nd(e){if(typeof e=="function")return el(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W)return 11;if(e===te)return 14}return 2}function Sr(e,t){var r=e.alternate;return r===null?(r=Et(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ys(e,t,r,i,c,p){var D=2;if(i=e,typeof e=="function")el(e)&&(D=1);else if(typeof e=="string")D=5;else e:switch(e){case L:return Hr(r.children,c,p,t);case S:D=8,c|=8;break;case A:return e=Et(12,r,t,c|2),e.elementType=A,e.lanes=p,e;case I:return e=Et(13,r,t,c),e.elementType=I,e.lanes=p,e;case Q:return e=Et(19,r,t,c),e.elementType=Q,e.lanes=p,e;case le:return Qs(r,c,p,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case F:D=10;break e;case j:D=9;break e;case W:D=11;break e;case te:D=14;break e;case ne:D=16,i=null;break e}throw Error(h(130,e==null?e:typeof e,""))}return t=Et(D,r,t,c),t.elementType=e,t.type=i,t.lanes=p,t}function Hr(e,t,r,i){return e=Et(7,e,i,t),e.lanes=r,e}function Qs(e,t,r,i){return e=Et(22,e,i,t),e.elementType=le,e.lanes=r,e.stateNode={isHidden:!1},e}function tl(e,t,r){return e=Et(6,e,null,t),e.lanes=r,e}function rl(e,t,r){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hd(e,t,r,i,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rn(0),this.expirationTimes=Rn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rn(0),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function il(e,t,r,i,c,p,D,N,z){return e=new Hd(e,t,r,N,z),t===1?(t=1,p===!0&&(t|=8)):t=0,p=Et(3,null,null,t),e.current=p,p.stateNode=e,p.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},vo(p),e}function Fd(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:b,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function hh(e){if(!e)return hr;e=e._reactInternals;e:{if(xr(e)!==e||e.tag!==1)throw Error(h(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(h(171))}if(e.tag===1){var r=e.type;if(lt(r))return Ha(e,r,t)}return t}function uh(e,t,r,i,c,p,D,N,z){return e=il(r,i,!0,e,c,p,D,N,z),e.context=hh(null),r=e.current,i=st(),c=mr(r),p=Xt(i,c),p.callback=t??null,fr(r,p,c),e.current.lanes=c,pi(e,c,i),ht(e,i),e}function Js(e,t,r,i){var c=t.current,p=st(),D=mr(c);return r=hh(r),t.context===null?t.context=r:t.pendingContext=r,t=Xt(p,D),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=fr(c,t,D),e!==null&&(Ot(e,c,D,p),Ds(e,c,D)),D}function Zs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function dh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function sl(e,t){dh(e,t),(e=e.alternate)&&dh(e,t)}function jd(){return null}var fh=typeof reportError=="function"?reportError:function(e){console.error(e)};function nl(e){this._internalRoot=e}en.prototype.render=nl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(h(409));Js(e,t,null,null)},en.prototype.unmount=nl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mr(function(){Js(null,e,null,null)}),t[$t]=null}};function en(e){this._internalRoot=e}en.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yl();e={blockedOn:null,target:e,priority:t};for(var r=0;r<nr.length&&t!==0&&t<nr[r].priority;r++);nr.splice(r,0,e),r===0&&Zl(e)}};function ol(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tn(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ph(){}function zd(e,t,r,i,c){if(c){if(typeof i=="function"){var p=i;i=function(){var Y=Zs(D);p.call(Y)}}var D=uh(t,i,e,0,null,!1,!1,"",ph);return e._reactRootContainer=D,e[$t]=D.current,Ri(e.nodeType===8?e.parentNode:e),Mr(),D}for(;c=e.lastChild;)e.removeChild(c);if(typeof i=="function"){var N=i;i=function(){var Y=Zs(z);N.call(Y)}}var z=il(e,0,!1,null,null,!1,!1,"",ph);return e._reactRootContainer=z,e[$t]=z.current,Ri(e.nodeType===8?e.parentNode:e),Mr(function(){Js(t,z,r,i)}),z}function rn(e,t,r,i,c){var p=r._reactRootContainer;if(p){var D=p;if(typeof c=="function"){var N=c;c=function(){var z=Zs(D);N.call(z)}}Js(t,D,e,c)}else D=zd(r,t,e,c,i);return Zs(D)}Gl=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=fi(t.pendingLanes);r!==0&&(Dn(t,r|1),ht(t,He()),(be&6)===0&&(li=He()+500,ur()))}break;case 13:Mr(function(){var i=Gt(e,1);if(i!==null){var c=st();Ot(i,e,1,c)}}),sl(e,1)}},Tn=function(e){if(e.tag===13){var t=Gt(e,134217728);if(t!==null){var r=st();Ot(t,e,134217728,r)}sl(e,134217728)}},Xl=function(e){if(e.tag===13){var t=mr(e),r=Gt(e,t);if(r!==null){var i=st();Ot(r,e,t,i)}sl(e,t)}},Yl=function(){return Le},Ql=function(e,t){var r=Le;try{return Le=e,t()}finally{Le=r}},wn=function(e,t,r){switch(t){case"input":if(ye(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var c=Ss(i);if(!c)throw Error(h(90));ue(i),ye(i,c)}}}break;case"textarea":er(e,r);break;case"select":t=r.value,t!=null&&Mt(e,!!r.multiple,t,!1)}},Ml=Qo,Il=Mr;var Ud={usingClientEntryPoint:!1,Events:[Ai,Gr,Ss,Ol,Pl,Qo]},Vi={findFiberByHostInstance:Lr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Wd={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=jl(e),e===null?null:e.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||jd,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sn.isDisabled&&sn.supportsFiber)try{es=sn.inject(Wd),It=sn}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ud,ut.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ol(t))throw Error(h(200));return Fd(e,t,null,r)},ut.createRoot=function(e,t){if(!ol(e))throw Error(h(299));var r=!1,i="",c=fh;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=il(e,1,!1,null,null,r,!1,i,c),e[$t]=t.current,Ri(e.nodeType===8?e.parentNode:e),new nl(t)},ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(h(188)):(e=Object.keys(e).join(","),Error(h(268,e)));return e=jl(t),e=e===null?null:e.stateNode,e},ut.flushSync=function(e){return Mr(e)},ut.hydrate=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!0,r)},ut.hydrateRoot=function(e,t,r){if(!ol(e))throw Error(h(405));var i=r!=null&&r.hydratedSources||null,c=!1,p="",D=fh;if(r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(p=r.identifierPrefix),r.onRecoverableError!==void 0&&(D=r.onRecoverableError)),t=uh(t,null,e,1,r??null,c,!1,p,D),e[$t]=t.current,Ri(e),i)for(e=0;e<i.length;e++)r=i[e],c=r._getVersion,c=c(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,c]:t.mutableSourceEagerHydrationData.push(r,c);return new en(t)},ut.render=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!1,r)},ut.unmountComponentAtNode=function(e){if(!tn(e))throw Error(h(40));return e._reactRootContainer?(Mr(function(){rn(null,null,e,!1,function(){e._reactRootContainer=null,e[$t]=null})}),!0):!1},ut.unstable_batchedUpdates=Qo,ut.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!tn(r))throw Error(h(200));if(e==null||e._reactInternals===void 0)throw Error(h(38));return rn(e,t,r,!1,i)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var wh;function Qd(){if(wh)return cl.exports;wh=1;function C(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(C)}catch(d){console.error(d)}}return C(),cl.exports=Yd(),cl.exports}var Eh;function Jd(){if(Eh)return nn;Eh=1;var C=Qd();return nn.createRoot=C.createRoot,nn.hydrateRoot=C.hydrateRoot,nn}var Zd=Jd();const ef=Ph(Zd),kh=C=>{let d;const h=new Set,E=(v,w)=>{const f=typeof v=="function"?v(d):v;if(!Object.is(f,d)){const m=d;d=w??(typeof f!="object"||f===null)?f:Object.assign({},d,f),h.forEach(y=>y(d,m))}},M=()=>d,l={setState:E,getState:M,getInitialState:()=>u,subscribe:v=>(h.add(v),()=>h.delete(v))},u=d=C(E,M,l);return l},tf=(C=>C?kh(C):kh),rf=C=>C;function sf(C,d=rf){const h=Gi.useSyncExternalStore(C.subscribe,Gi.useCallback(()=>d(C.getState()),[C,d]),Gi.useCallback(()=>d(C.getInitialState()),[C,d]));return Gi.useDebugValue(h),h}const bh=C=>{const d=tf(C),h=E=>sf(d,E);return Object.assign(h,d),h},nf=(C=>C?bh(C):bh),Cr=["branch","agent","worktree","running"],pn=[{id:"codex",name:"Codex CLI",command:"codex",installCommand:"npm install -g @openai/codex",description:"OpenAI Codex CLI - AI-powered coding assistant"},{id:"claude",name:"Claude Code",command:"claude",installCommand:"npm install -g @anthropic-ai/claude-code",description:"Anthropic Claude Code - Advanced AI coding assistant"},{id:"gemini",name:"Gemini CLI",command:"gemini",installCommand:"npm install -g @google/gemini-cli",description:"Google Gemini CLI - Multi-modal AI assistant"}],ml=10,an=1,of=3,lf="hjWorktree CLI",af="2.0.0",xh={step:"branch",completedSteps:[],projectInfo:null,branches:[],selectedBranch:null,selectedAgent:"claude",worktreeCount:of,terminals:[],activeTerminalIndex:0,activeSessionId:null,selectedSessionIds:[],isSetupCollapsed:!1,collapsedBranches:[],modalType:null,modalData:null,isLoading:!1,loadingMessage:"",error:null},Ve=nf((C,d)=>({...xh,setStep:h=>C({step:h}),goToStep:h=>{const{canNavigateTo:E,step:M,isStepComplete:V,completedSteps:H}=d();if(!E(h))return;const l=[...H];V(M)&&!l.includes(M)&&l.push(M),C({step:h,completedSteps:l})},goToNext:()=>{const{step:h,isStepComplete:E,completedSteps:M}=d(),V=Cr.indexOf(h);if(V<Cr.length-1&&E(h)){const H=[...M];H.includes(h)||H.push(h),C({step:Cr[V+1],completedSteps:H})}},goToPrev:()=>{const{step:h}=d(),E=Cr.indexOf(h);E>0&&C({step:Cr[E-1]})},canNavigateTo:h=>{const{step:E,completedSteps:M,isStepComplete:V}=d(),H=Cr.indexOf(E),l=Cr.indexOf(h);if(l===H||l<H)return!0;for(let u=0;u<l;u++){const v=Cr[u];if(!M.includes(v)&&!V(v))return!1}return!0},isStepComplete:h=>{const{selectedBranch:E,selectedAgent:M,worktreeCount:V,terminals:H}=d();switch(h){case"branch":return E!==null;case"agent":return M!==null;case"worktree":return V>=an;case"running":return H.length>0;default:return!1}},getStepStatus:h=>{const{step:E,completedSteps:M,isStepComplete:V}=d();return h===E?"current":M.includes(h)||V(h)?"completed":"pending"},setProjectInfo:h=>C({projectInfo:h}),fetchProjectInfo:async()=>{try{const h=await fetch("/api/info");if(!h.ok)throw new Error("Failed to fetch project info");const E=await h.json();C({projectInfo:E})}catch(h){C({error:h instanceof Error?h.message:"Unknown error"})}},setBranches:h=>C({branches:h}),setSelectedBranch:h=>C({selectedBranch:h}),fetchBranches:async()=>{try{const h=await fetch("/api/branches");if(!h.ok)throw new Error("Failed to fetch branches");const E=await h.json();if(C({branches:E}),!d().selectedBranch&&E.length>0){const V=E.find(H=>H.isCurrent);C({selectedBranch:(V==null?void 0:V.name)||E[0].name})}}catch(h){C({error:h instanceof Error?h.message:"Unknown error"})}},setSelectedAgent:h=>C({selectedAgent:h}),setWorktreeCount:h=>C({worktreeCount:Math.max(an,Math.min(ml,h))}),incrementWorktreeCount:()=>{const{worktreeCount:h}=d();h<ml&&C({worktreeCount:h+1})},decrementWorktreeCount:()=>{const{worktreeCount:h}=d();h>an&&C({worktreeCount:h-1})},addTerminal:h=>C(E=>({terminals:[...E.terminals,h]})),updateTerminalStatus:(h,E)=>C(M=>({terminals:M.terminals.map(V=>V.sessionId===h?{...V,status:E}:V)})),removeTerminal:h=>C(E=>{const M=E.terminals.filter(H=>H.sessionId!==h),V=Math.min(E.activeTerminalIndex,Math.max(0,M.length-1));return{terminals:M,activeTerminalIndex:V,step:M.length===0?"branch":E.step,completedSteps:M.length===0?[]:E.completedSteps}}),setActiveTerminal:h=>C({activeTerminalIndex:h}),clearAllTerminals:()=>C({terminals:[],activeTerminalIndex:0,activeSessionId:null,selectedSessionIds:[]}),setActiveSession:h=>{const{terminals:E}=d(),M=E.findIndex(V=>V.sessionId===h);C({activeSessionId:h,activeTerminalIndex:M>=0?M:0})},toggleSessionSelection:h=>C(E=>{const M=[...E.selectedSessionIds],V=M.indexOf(h);return V>=0?M.splice(V,1):M.push(h),{selectedSessionIds:M}}),selectAllSessions:()=>C(h=>({selectedSessionIds:h.terminals.map(E=>E.sessionId)})),clearSessionSelection:()=>C({selectedSessionIds:[]}),removeSelectedSessions:async()=>{const{selectedSessionIds:h,terminals:E}=d();if(h.length===0)return;const M=E.filter(V=>h.includes(V.sessionId)).map(V=>V.worktreeName);try{(await fetch("/api/worktrees/batch",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:M})})).ok&&C(H=>{const l=H.terminals.filter(u=>!h.includes(u.sessionId));return{terminals:l,selectedSessionIds:[],activeTerminalIndex:Math.min(H.activeTerminalIndex,Math.max(0,l.length-1)),activeSessionId:l.length>0?l[0].sessionId:null}})}catch(V){console.error("Failed to remove sessions:",V)}},getSessionGroups:()=>{const{terminals:h,collapsedBranches:E}=d(),M=new Map;for(const H of h){const l=H.branchName.replace(/-project-\d+$/,"");M.has(l)||M.set(l,[]),M.get(l).push(H)}const V=[];for(const[H,l]of M)V.push({branchName:H,sessions:l.map(u=>({...u,id:u.sessionId,createdAt:Date.now()})),isCollapsed:E.includes(H)});return V.sort((H,l)=>H.branchName.localeCompare(l.branchName))},toggleSetupCollapse:()=>C(h=>({isSetupCollapsed:!h.isSetupCollapsed})),toggleBranchCollapse:h=>C(E=>{const M=[...E.collapsedBranches],V=M.indexOf(h);return V>=0?M.splice(V,1):M.push(h),{collapsedBranches:M}}),openModal:(h,E)=>C({modalType:h,modalData:E||null}),closeModal:()=>C({modalType:null,modalData:null}),createSingleWorktree:async(h,E)=>{const{setLoading:M,setError:V,addTerminal:H,setActiveSession:l}=d();M(!0,"Creating worktree..."),V(null);try{const u=await fetch("/api/worktrees/single",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h,agentType:E})});if(!u.ok){const f=await u.json();throw new Error(f.error||"Failed to create worktree")}const{worktree:v}=await u.json(),w=`${v.name}-${Date.now()}`;H({sessionId:w,worktreePath:v.path,worktreeName:v.name,branchName:v.branch,agentType:E,status:"initializing"}),l(w),C({step:"running",isSetupCollapsed:!0,modalType:null,modalData:null})}catch(u){V(u instanceof Error?u.message:"Unknown error")}finally{M(!1)}},execute:async()=>{const{selectedBranch:h,worktreeCount:E,selectedAgent:M,setLoading:V,setError:H,setStep:l,addTerminal:u}=d();if(!h){H("Please select a branch");return}V(!0,"Creating worktrees..."),H(null);try{const v=await fetch("/api/worktrees",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h,count:E,agentType:M})});if(!v.ok){const m=await v.json();throw new Error(m.error||"Failed to create worktrees")}const{worktrees:w}=await v.json();for(const m of w){const y=`${m.name}-${Date.now()}`;u({sessionId:y,worktreePath:m.path,worktreeName:m.name,branchName:m.branch,agentType:M,status:"initializing"})}const{terminals:f}=d();C({step:"running",completedSteps:["branch","agent","worktree"],isSetupCollapsed:!0,activeSessionId:f.length>0?f[0].sessionId:null})}catch(v){H(v instanceof Error?v.message:"Unknown error")}finally{V(!1)}},setLoading:(h,E="")=>C({isLoading:h,loadingMessage:E}),setError:h=>C({error:h}),reset:()=>C(xh)})),Ut=Object.create(null);Ut.open="0";Ut.close="1";Ut.ping="2";Ut.pong="3";Ut.message="4";Ut.upgrade="5";Ut.noop="6";const cn=Object.create(null);Object.keys(Ut).forEach(C=>{cn[Ut[C]]=C});const gl={type:"error",data:"parser error"},Mh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ih=typeof ArrayBuffer=="function",Nh=C=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(C):C&&C.buffer instanceof ArrayBuffer,bl=({type:C,data:d},h,E)=>Mh&&d instanceof Blob?h?E(d):Lh(d,E):Ih&&(d instanceof ArrayBuffer||Nh(d))?h?E(d):Lh(new Blob([d]),E):E(Ut[C]+(d||"")),Lh=(C,d)=>{const h=new FileReader;return h.onload=function(){const E=h.result.split(",")[1];d("b"+(E||""))},h.readAsDataURL(C)};function Rh(C){return C instanceof Uint8Array?C:C instanceof ArrayBuffer?new Uint8Array(C):new Uint8Array(C.buffer,C.byteOffset,C.byteLength)}let dl;function cf(C,d){if(Mh&&C.data instanceof Blob)return C.data.arrayBuffer().then(Rh).then(d);if(Ih&&(C.data instanceof ArrayBuffer||Nh(C.data)))return d(Rh(C.data));bl(C,!1,h=>{dl||(dl=new TextEncoder),d(dl.encode(h))})}const Dh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let C=0;C<Dh.length;C++)Xi[Dh.charCodeAt(C)]=C;const hf=C=>{let d=C.length*.75,h=C.length,E,M=0,V,H,l,u;C[C.length-1]==="="&&(d--,C[C.length-2]==="="&&d--);const v=new ArrayBuffer(d),w=new Uint8Array(v);for(E=0;E<h;E+=4)V=Xi[C.charCodeAt(E)],H=Xi[C.charCodeAt(E+1)],l=Xi[C.charCodeAt(E+2)],u=Xi[C.charCodeAt(E+3)],w[M++]=V<<2|H>>4,w[M++]=(H&15)<<4|l>>2,w[M++]=(l&3)<<6|u&63;return v},uf=typeof ArrayBuffer=="function",xl=(C,d)=>{if(typeof C!="string")return{type:"message",data:Hh(C,d)};const h=C.charAt(0);return h==="b"?{type:"message",data:df(C.substring(1),d)}:cn[h]?C.length>1?{type:cn[h],data:C.substring(1)}:{type:cn[h]}:gl},df=(C,d)=>{if(uf){const h=hf(C);return Hh(h,d)}else return{base64:!0,data:C}},Hh=(C,d)=>{switch(d){case"blob":return C instanceof Blob?C:new Blob([C]);case"arraybuffer":default:return C instanceof ArrayBuffer?C:C.buffer}},Fh="",ff=(C,d)=>{const h=C.length,E=new Array(h);let M=0;C.forEach((V,H)=>{bl(V,!1,l=>{E[H]=l,++M===h&&d(E.join(Fh))})})},pf=(C,d)=>{const h=C.split(Fh),E=[];for(let M=0;M<h.length;M++){const V=xl(h[M],d);if(E.push(V),V.type==="error")break}return E};function _f(){return new TransformStream({transform(C,d){cf(C,h=>{const E=h.length;let M;if(E<126)M=new Uint8Array(1),new DataView(M.buffer).setUint8(0,E);else if(E<65536){M=new Uint8Array(3);const V=new DataView(M.buffer);V.setUint8(0,126),V.setUint16(1,E)}else{M=new Uint8Array(9);const V=new DataView(M.buffer);V.setUint8(0,127),V.setBigUint64(1,BigInt(E))}C.data&&typeof C.data!="string"&&(M[0]|=128),d.enqueue(M),d.enqueue(h)})}})}let fl;function on(C){return C.reduce((d,h)=>d+h.length,0)}function ln(C,d){if(C[0].length===d)return C.shift();const h=new Uint8Array(d);let E=0;for(let M=0;M<d;M++)h[M]=C[0][E++],E===C[0].length&&(C.shift(),E=0);return C.length&&E<C[0].length&&(C[0]=C[0].slice(E)),h}function vf(C,d){fl||(fl=new TextDecoder);const h=[];let E=0,M=-1,V=!1;return new TransformStream({transform(H,l){for(h.push(H);;){if(E===0){if(on(h)<1)break;const u=ln(h,1);V=(u[0]&128)===128,M=u[0]&127,M<126?E=3:M===126?E=1:E=2}else if(E===1){if(on(h)<2)break;const u=ln(h,2);M=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),E=3}else if(E===2){if(on(h)<8)break;const u=ln(h,8),v=new DataView(u.buffer,u.byteOffset,u.length),w=v.getUint32(0);if(w>Math.pow(2,21)-1){l.enqueue(gl);break}M=w*Math.pow(2,32)+v.getUint32(4),E=3}else{if(on(h)<M)break;const u=ln(h,M);l.enqueue(xl(V?u:fl.decode(u),d)),E=0}if(M===0||M>C){l.enqueue(gl);break}}}})}const jh=4;function ze(C){if(C)return mf(C)}function mf(C){for(var d in ze.prototype)C[d]=ze.prototype[d];return C}ze.prototype.on=ze.prototype.addEventListener=function(C,d){return this._callbacks=this._callbacks||{},(this._callbacks["$"+C]=this._callbacks["$"+C]||[]).push(d),this};ze.prototype.once=function(C,d){function h(){this.off(C,h),d.apply(this,arguments)}return h.fn=d,this.on(C,h),this};ze.prototype.off=ze.prototype.removeListener=ze.prototype.removeAllListeners=ze.prototype.removeEventListener=function(C,d){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var h=this._callbacks["$"+C];if(!h)return this;if(arguments.length==1)return delete this._callbacks["$"+C],this;for(var E,M=0;M<h.length;M++)if(E=h[M],E===d||E.fn===d){h.splice(M,1);break}return h.length===0&&delete this._callbacks["$"+C],this};ze.prototype.emit=function(C){this._callbacks=this._callbacks||{};for(var d=new Array(arguments.length-1),h=this._callbacks["$"+C],E=1;E<arguments.length;E++)d[E-1]=arguments[E];if(h){h=h.slice(0);for(var E=0,M=h.length;E<M;++E)h[E].apply(this,d)}return this};ze.prototype.emitReserved=ze.prototype.emit;ze.prototype.listeners=function(C){return this._callbacks=this._callbacks||{},this._callbacks["$"+C]||[]};ze.prototype.hasListeners=function(C){return!!this.listeners(C).length};const _n=typeof Promise=="function"&&typeof Promise.resolve=="function"?d=>Promise.resolve().then(d):(d,h)=>h(d,0),bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),gf="arraybuffer";function zh(C,...d){return d.reduce((h,E)=>(C.hasOwnProperty(E)&&(h[E]=C[E]),h),{})}const Sf=bt.setTimeout,yf=bt.clearTimeout;function vn(C,d){d.useNativeTimers?(C.setTimeoutFn=Sf.bind(bt),C.clearTimeoutFn=yf.bind(bt)):(C.setTimeoutFn=bt.setTimeout.bind(bt),C.clearTimeoutFn=bt.clearTimeout.bind(bt))}const Cf=1.33;function wf(C){return typeof C=="string"?Ef(C):Math.ceil((C.byteLength||C.size)*Cf)}function Ef(C){let d=0,h=0;for(let E=0,M=C.length;E<M;E++)d=C.charCodeAt(E),d<128?h+=1:d<2048?h+=2:d<55296||d>=57344?h+=3:(E++,h+=4);return h}function Uh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kf(C){let d="";for(let h in C)C.hasOwnProperty(h)&&(d.length&&(d+="&"),d+=encodeURIComponent(h)+"="+encodeURIComponent(C[h]));return d}function bf(C){let d={},h=C.split("&");for(let E=0,M=h.length;E<M;E++){let V=h[E].split("=");d[decodeURIComponent(V[0])]=decodeURIComponent(V[1])}return d}class xf extends Error{constructor(d,h,E){super(d),this.description=h,this.context=E,this.type="TransportError"}}class Ll extends ze{constructor(d){super(),this.writable=!1,vn(this,d),this.opts=d,this.query=d.query,this.socket=d.socket,this.supportsBinary=!d.forceBase64}onError(d,h,E){return super.emitReserved("error",new xf(d,h,E)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(d){this.readyState==="open"&&this.write(d)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(d){const h=xl(d,this.socket.binaryType);this.onPacket(h)}onPacket(d){super.emitReserved("packet",d)}onClose(d){this.readyState="closed",super.emitReserved("close",d)}pause(d){}createUri(d,h={}){return d+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const d=this.opts.hostname;return d.indexOf(":")===-1?d:"["+d+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(d){const h=kf(d);return h.length?"?"+h:""}}class Lf extends Ll{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(d){this.readyState="pausing";const h=()=>{this.readyState="paused",d()};if(this._polling||!this.writable){let E=0;this._polling&&(E++,this.once("pollComplete",function(){--E||h()})),this.writable||(E++,this.once("drain",function(){--E||h()}))}else h()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(d){const h=E=>{if(this.readyState==="opening"&&E.type==="open"&&this.onOpen(),E.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(E)};pf(d,this.socket.binaryType).forEach(h),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const d=()=>{this.write([{type:"close"}])};this.readyState==="open"?d():this.once("open",d)}write(d){this.writable=!1,ff(d,h=>{this.doWrite(h,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const d=this.opts.secure?"https":"http",h=this.query||{};return this.opts.timestampRequests!==!1&&(h[this.opts.timestampParam]=Uh()),!this.supportsBinary&&!h.sid&&(h.b64=1),this.createUri(d,h)}}let Wh=!1;try{Wh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Rf=Wh;function Df(){}class Tf extends Lf{constructor(d){if(super(d),typeof location<"u"){const h=location.protocol==="https:";let E=location.port;E||(E=h?"443":"80"),this.xd=typeof location<"u"&&d.hostname!==location.hostname||E!==d.port}}doWrite(d,h){const E=this.request({method:"POST",data:d});E.on("success",h),E.on("error",(M,V)=>{this.onError("xhr post error",M,V)})}doPoll(){const d=this.request();d.on("data",this.onData.bind(this)),d.on("error",(h,E)=>{this.onError("xhr poll error",h,E)}),this.pollXhr=d}}class zt extends ze{constructor(d,h,E){super(),this.createRequest=d,vn(this,E),this._opts=E,this._method=E.method||"GET",this._uri=h,this._data=E.data!==void 0?E.data:null,this._create()}_create(){var d;const h=zh(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");h.xdomain=!!this._opts.xd;const E=this._xhr=this.createRequest(h);try{E.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){E.setDisableHeaderCheck&&E.setDisableHeaderCheck(!0);for(let M in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(M)&&E.setRequestHeader(M,this._opts.extraHeaders[M])}}catch{}if(this._method==="POST")try{E.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{E.setRequestHeader("Accept","*/*")}catch{}(d=this._opts.cookieJar)===null||d===void 0||d.addCookies(E),"withCredentials"in E&&(E.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(E.timeout=this._opts.requestTimeout),E.onreadystatechange=()=>{var M;E.readyState===3&&((M=this._opts.cookieJar)===null||M===void 0||M.parseCookies(E.getResponseHeader("set-cookie"))),E.readyState===4&&(E.status===200||E.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof E.status=="number"?E.status:0)},0))},E.send(this._data)}catch(M){this.setTimeoutFn(()=>{this._onError(M)},0);return}typeof document<"u"&&(this._index=zt.requestsCount++,zt.requests[this._index]=this)}_onError(d){this.emitReserved("error",d,this._xhr),this._cleanup(!0)}_cleanup(d){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Df,d)try{this._xhr.abort()}catch{}typeof document<"u"&&delete zt.requests[this._index],this._xhr=null}}_onLoad(){const d=this._xhr.responseText;d!==null&&(this.emitReserved("data",d),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}zt.requestsCount=0;zt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Th);else if(typeof addEventListener=="function"){const C="onpagehide"in bt?"pagehide":"unload";addEventListener(C,Th,!1)}}function Th(){for(let C in zt.requests)zt.requests.hasOwnProperty(C)&&zt.requests[C].abort()}const Af=(function(){const C=$h({xdomain:!1});return C&&C.responseType!==null})();class Bf extends Tf{constructor(d){super(d);const h=d&&d.forceBase64;this.supportsBinary=Af&&!h}request(d={}){return Object.assign(d,{xd:this.xd},this.opts),new zt($h,this.uri(),d)}}function $h(C){const d=C.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!d||Rf))return new XMLHttpRequest}catch{}if(!d)try{return new bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Vh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Of extends Ll{get name(){return"websocket"}doOpen(){const d=this.uri(),h=this.opts.protocols,E=Vh?{}:zh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(E.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(d,h,E)}catch(M){return this.emitReserved("error",M)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=d=>this.onClose({description:"websocket connection closed",context:d}),this.ws.onmessage=d=>this.onData(d.data),this.ws.onerror=d=>this.onError("websocket error",d)}write(d){this.writable=!1;for(let h=0;h<d.length;h++){const E=d[h],M=h===d.length-1;bl(E,this.supportsBinary,V=>{try{this.doWrite(E,V)}catch{}M&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const d=this.opts.secure?"wss":"ws",h=this.query||{};return this.opts.timestampRequests&&(h[this.opts.timestampParam]=Uh()),this.supportsBinary||(h.b64=1),this.createUri(d,h)}}const pl=bt.WebSocket||bt.MozWebSocket;class Pf extends Of{createSocket(d,h,E){return Vh?new pl(d,h,E):h?new pl(d,h):new pl(d)}doWrite(d,h){this.ws.send(h)}}class Mf extends Ll{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(d){return this.emitReserved("error",d)}this._transport.closed.then(()=>{this.onClose()}).catch(d=>{this.onError("webtransport error",d)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(d=>{const h=vf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),E=d.readable.pipeThrough(h).getReader(),M=_f();M.readable.pipeTo(d.writable),this._writer=M.writable.getWriter();const V=()=>{E.read().then(({done:l,value:u})=>{l||(this.onPacket(u),V())}).catch(l=>{})};V();const H={type:"open"};this.query.sid&&(H.data=`{"sid":"${this.query.sid}"}`),this._writer.write(H).then(()=>this.onOpen())})})}write(d){this.writable=!1;for(let h=0;h<d.length;h++){const E=d[h],M=h===d.length-1;this._writer.write(E).then(()=>{M&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var d;(d=this._transport)===null||d===void 0||d.close()}}const If={websocket:Pf,webtransport:Mf,polling:Bf},Nf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Hf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sl(C){if(C.length>8e3)throw"URI too long";const d=C,h=C.indexOf("["),E=C.indexOf("]");h!=-1&&E!=-1&&(C=C.substring(0,h)+C.substring(h,E).replace(/:/g,";")+C.substring(E,C.length));let M=Nf.exec(C||""),V={},H=14;for(;H--;)V[Hf[H]]=M[H]||"";return h!=-1&&E!=-1&&(V.source=d,V.host=V.host.substring(1,V.host.length-1).replace(/;/g,":"),V.authority=V.authority.replace("[","").replace("]","").replace(/;/g,":"),V.ipv6uri=!0),V.pathNames=Ff(V,V.path),V.queryKey=jf(V,V.query),V}function Ff(C,d){const h=/\/{2,9}/g,E=d.replace(h,"/").split("/");return(d.slice(0,1)=="/"||d.length===0)&&E.splice(0,1),d.slice(-1)=="/"&&E.splice(E.length-1,1),E}function jf(C,d){const h={};return d.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(E,M,V){M&&(h[M]=V)}),h}const yl=typeof addEventListener=="function"&&typeof removeEventListener=="function",hn=[];yl&&addEventListener("offline",()=>{hn.forEach(C=>C())},!1);class wr extends ze{constructor(d,h){if(super(),this.binaryType=gf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,d&&typeof d=="object"&&(h=d,d=null),d){const E=Sl(d);h.hostname=E.host,h.secure=E.protocol==="https"||E.protocol==="wss",h.port=E.port,E.query&&(h.query=E.query)}else h.host&&(h.hostname=Sl(h.host).host);vn(this,h),this.secure=h.secure!=null?h.secure:typeof location<"u"&&location.protocol==="https:",h.hostname&&!h.port&&(h.port=this.secure?"443":"80"),this.hostname=h.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=h.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},h.transports.forEach(E=>{const M=E.prototype.name;this.transports.push(M),this._transportsByName[M]=E}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},h),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bf(this.opts.query)),yl&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},hn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(d){const h=Object.assign({},this.opts.query);h.EIO=jh,h.transport=d,this.id&&(h.sid=this.id);const E=Object.assign({},this.opts,{query:h,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return new this._transportsByName[d](E)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const d=this.opts.rememberUpgrade&&wr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const h=this.createTransport(d);h.open(),this.setTransport(h)}setTransport(d){this.transport&&this.transport.removeAllListeners(),this.transport=d,d.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",h=>this._onClose("transport close",h))}onOpen(){this.readyState="open",wr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",d),this.emitReserved("heartbeat"),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const h=new Error("server error");h.code=d.data,this._onError(h);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this._pingInterval=d.pingInterval,this._pingTimeout=d.pingTimeout,this._maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const d=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+d,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},d),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const d=this._getWritablePackets();this.transport.send(d),this._prevBufferLen=d.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let h=1;for(let E=0;E<this.writeBuffer.length;E++){const M=this.writeBuffer[E].data;if(M&&(h+=wf(M)),E>0&&h>this._maxPayload)return this.writeBuffer.slice(0,E);h+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const d=Date.now()>this._pingTimeoutTime;return d&&(this._pingTimeoutTime=0,_n(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),d}write(d,h,E){return this._sendPacket("message",d,h,E),this}send(d,h,E){return this._sendPacket("message",d,h,E),this}_sendPacket(d,h,E,M){if(typeof h=="function"&&(M=h,h=void 0),typeof E=="function"&&(M=E,E=null),this.readyState==="closing"||this.readyState==="closed")return;E=E||{},E.compress=E.compress!==!1;const V={type:d,data:h,options:E};this.emitReserved("packetCreate",V),this.writeBuffer.push(V),M&&this.once("flush",M),this.flush()}close(){const d=()=>{this._onClose("forced close"),this.transport.close()},h=()=>{this.off("upgrade",h),this.off("upgradeError",h),d()},E=()=>{this.once("upgrade",h),this.once("upgradeError",h)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?E():d()}):this.upgrading?E():d()),this}_onError(d){if(wr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",d),this._onClose("transport error",d)}_onClose(d,h){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),yl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const E=hn.indexOf(this._offlineEventListener);E!==-1&&hn.splice(E,1)}this.readyState="closed",this.id=null,this.emitReserved("close",d,h),this.writeBuffer=[],this._prevBufferLen=0}}}wr.protocol=jh;class zf extends wr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let d=0;d<this._upgrades.length;d++)this._probe(this._upgrades[d])}_probe(d){let h=this.createTransport(d),E=!1;wr.priorWebsocketSuccess=!1;const M=()=>{E||(h.send([{type:"ping",data:"probe"}]),h.once("packet",f=>{if(!E)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",h),!h)return;wr.priorWebsocketSuccess=h.name==="websocket",this.transport.pause(()=>{E||this.readyState!=="closed"&&(w(),this.setTransport(h),h.send([{type:"upgrade"}]),this.emitReserved("upgrade",h),h=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=h.name,this.emitReserved("upgradeError",m)}}))};function V(){E||(E=!0,w(),h.close(),h=null)}const H=f=>{const m=new Error("probe error: "+f);m.transport=h.name,V(),this.emitReserved("upgradeError",m)};function l(){H("transport closed")}function u(){H("socket closed")}function v(f){h&&f.name!==h.name&&V()}const w=()=>{h.removeListener("open",M),h.removeListener("error",H),h.removeListener("close",l),this.off("close",u),this.off("upgrading",v)};h.once("open",M),h.once("error",H),h.once("close",l),this.once("close",u),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{E||h.open()},200):h.open()}onHandshake(d){this._upgrades=this._filterUpgrades(d.upgrades),super.onHandshake(d)}_filterUpgrades(d){const h=[];for(let E=0;E<d.length;E++)~this.transports.indexOf(d[E])&&h.push(d[E]);return h}}let Uf=class extends zf{constructor(d,h={}){const E=typeof d=="object"?d:h;(!E.transports||E.transports&&typeof E.transports[0]=="string")&&(E.transports=(E.transports||["polling","websocket","webtransport"]).map(M=>If[M]).filter(M=>!!M)),super(d,E)}};function Wf(C,d="",h){let E=C;h=h||typeof location<"u"&&location,C==null&&(C=h.protocol+"//"+h.host),typeof C=="string"&&(C.charAt(0)==="/"&&(C.charAt(1)==="/"?C=h.protocol+C:C=h.host+C),/^(https?|wss?):\/\//.test(C)||(typeof h<"u"?C=h.protocol+"//"+C:C="https://"+C),E=Sl(C)),E.port||(/^(http|ws)$/.test(E.protocol)?E.port="80":/^(http|ws)s$/.test(E.protocol)&&(E.port="443")),E.path=E.path||"/";const V=E.host.indexOf(":")!==-1?"["+E.host+"]":E.host;return E.id=E.protocol+"://"+V+":"+E.port+d,E.href=E.protocol+"://"+V+(h&&h.port===E.port?"":":"+E.port),E}const $f=typeof ArrayBuffer=="function",Vf=C=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(C):C.buffer instanceof ArrayBuffer,Kh=Object.prototype.toString,Kf=typeof Blob=="function"||typeof Blob<"u"&&Kh.call(Blob)==="[object BlobConstructor]",qf=typeof File=="function"||typeof File<"u"&&Kh.call(File)==="[object FileConstructor]";function Rl(C){return $f&&(C instanceof ArrayBuffer||Vf(C))||Kf&&C instanceof Blob||qf&&C instanceof File}function un(C,d){if(!C||typeof C!="object")return!1;if(Array.isArray(C)){for(let h=0,E=C.length;h<E;h++)if(un(C[h]))return!0;return!1}if(Rl(C))return!0;if(C.toJSON&&typeof C.toJSON=="function"&&arguments.length===1)return un(C.toJSON(),!0);for(const h in C)if(Object.prototype.hasOwnProperty.call(C,h)&&un(C[h]))return!0;return!1}function Gf(C){const d=[],h=C.data,E=C;return E.data=Cl(h,d),E.attachments=d.length,{packet:E,buffers:d}}function Cl(C,d){if(!C)return C;if(Rl(C)){const h={_placeholder:!0,num:d.length};return d.push(C),h}else if(Array.isArray(C)){const h=new Array(C.length);for(let E=0;E<C.length;E++)h[E]=Cl(C[E],d);return h}else if(typeof C=="object"&&!(C instanceof Date)){const h={};for(const E in C)Object.prototype.hasOwnProperty.call(C,E)&&(h[E]=Cl(C[E],d));return h}return C}function Xf(C,d){return C.data=wl(C.data,d),delete C.attachments,C}function wl(C,d){if(!C)return C;if(C&&C._placeholder===!0){if(typeof C.num=="number"&&C.num>=0&&C.num<d.length)return d[C.num];throw new Error("illegal attachments")}else if(Array.isArray(C))for(let h=0;h<C.length;h++)C[h]=wl(C[h],d);else if(typeof C=="object")for(const h in C)Object.prototype.hasOwnProperty.call(C,h)&&(C[h]=wl(C[h],d));return C}const qh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Yf=5;var we;(function(C){C[C.CONNECT=0]="CONNECT",C[C.DISCONNECT=1]="DISCONNECT",C[C.EVENT=2]="EVENT",C[C.ACK=3]="ACK",C[C.CONNECT_ERROR=4]="CONNECT_ERROR",C[C.BINARY_EVENT=5]="BINARY_EVENT",C[C.BINARY_ACK=6]="BINARY_ACK"})(we||(we={}));class Qf{constructor(d){this.replacer=d}encode(d){return(d.type===we.EVENT||d.type===we.ACK)&&un(d)?this.encodeAsBinary({type:d.type===we.EVENT?we.BINARY_EVENT:we.BINARY_ACK,nsp:d.nsp,data:d.data,id:d.id}):[this.encodeAsString(d)]}encodeAsString(d){let h=""+d.type;return(d.type===we.BINARY_EVENT||d.type===we.BINARY_ACK)&&(h+=d.attachments+"-"),d.nsp&&d.nsp!=="/"&&(h+=d.nsp+","),d.id!=null&&(h+=d.id),d.data!=null&&(h+=JSON.stringify(d.data,this.replacer)),h}encodeAsBinary(d){const h=Gf(d),E=this.encodeAsString(h.packet),M=h.buffers;return M.unshift(E),M}}class Dl extends ze{constructor(d){super(),this.reviver=d}add(d){let h;if(typeof d=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(d);const E=h.type===we.BINARY_EVENT;E||h.type===we.BINARY_ACK?(h.type=E?we.EVENT:we.ACK,this.reconstructor=new Jf(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if(Rl(d)||d.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(d),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+d)}decodeString(d){let h=0;const E={type:Number(d.charAt(0))};if(we[E.type]===void 0)throw new Error("unknown packet type "+E.type);if(E.type===we.BINARY_EVENT||E.type===we.BINARY_ACK){const V=h+1;for(;d.charAt(++h)!=="-"&&h!=d.length;);const H=d.substring(V,h);if(H!=Number(H)||d.charAt(h)!=="-")throw new Error("Illegal attachments");E.attachments=Number(H)}if(d.charAt(h+1)==="/"){const V=h+1;for(;++h&&!(d.charAt(h)===","||h===d.length););E.nsp=d.substring(V,h)}else E.nsp="/";const M=d.charAt(h+1);if(M!==""&&Number(M)==M){const V=h+1;for(;++h;){const H=d.charAt(h);if(H==null||Number(H)!=H){--h;break}if(h===d.length)break}E.id=Number(d.substring(V,h+1))}if(d.charAt(++h)){const V=this.tryParse(d.substr(h));if(Dl.isPayloadValid(E.type,V))E.data=V;else throw new Error("invalid payload")}return E}tryParse(d){try{return JSON.parse(d,this.reviver)}catch{return!1}}static isPayloadValid(d,h){switch(d){case we.CONNECT:return fn(h);case we.DISCONNECT:return h===void 0;case we.CONNECT_ERROR:return typeof h=="string"||fn(h);case we.EVENT:case we.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&qh.indexOf(h[0])===-1);case we.ACK:case we.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Jf{constructor(d){this.packet=d,this.buffers=[],this.reconPack=d}takeBinaryData(d){if(this.buffers.push(d),this.buffers.length===this.reconPack.attachments){const h=Xf(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Zf(C){return typeof C=="string"}const ep=Number.isInteger||function(C){return typeof C=="number"&&isFinite(C)&&Math.floor(C)===C};function tp(C){return C===void 0||ep(C)}function fn(C){return Object.prototype.toString.call(C)==="[object Object]"}function rp(C,d){switch(C){case we.CONNECT:return d===void 0||fn(d);case we.DISCONNECT:return d===void 0;case we.EVENT:return Array.isArray(d)&&(typeof d[0]=="number"||typeof d[0]=="string"&&qh.indexOf(d[0])===-1);case we.ACK:return Array.isArray(d);case we.CONNECT_ERROR:return typeof d=="string"||fn(d);default:return!1}}function ip(C){return Zf(C.nsp)&&tp(C.id)&&rp(C.type,C.data)}const sp=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dl,Encoder:Qf,get PacketType(){return we},isPacketValid:ip,protocol:Yf},Symbol.toStringTag,{value:"Module"}));function Pt(C,d,h){return C.on(d,h),function(){C.off(d,h)}}const np=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Gh extends ze{constructor(d,h,E){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=d,this.nsp=h,E&&E.auth&&(this.auth=E.auth),this._opts=Object.assign({},E),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const d=this.io;this.subs=[Pt(d,"open",this.onopen.bind(this)),Pt(d,"packet",this.onpacket.bind(this)),Pt(d,"error",this.onerror.bind(this)),Pt(d,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...d){return d.unshift("message"),this.emit.apply(this,d),this}emit(d,...h){var E,M,V;if(np.hasOwnProperty(d))throw new Error('"'+d.toString()+'" is a reserved event name');if(h.unshift(d),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(h),this;const H={type:we.EVENT,data:h};if(H.options={},H.options.compress=this.flags.compress!==!1,typeof h[h.length-1]=="function"){const w=this.ids++,f=h.pop();this._registerAckCallback(w,f),H.id=w}const l=(M=(E=this.io.engine)===null||E===void 0?void 0:E.transport)===null||M===void 0?void 0:M.writable,u=this.connected&&!(!((V=this.io.engine)===null||V===void 0)&&V._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(H),this.packet(H)):this.sendBuffer.push(H)),this.flags={},this}_registerAckCallback(d,h){var E;const M=(E=this.flags.timeout)!==null&&E!==void 0?E:this._opts.ackTimeout;if(M===void 0){this.acks[d]=h;return}const V=this.io.setTimeoutFn(()=>{delete this.acks[d];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===d&&this.sendBuffer.splice(l,1);h.call(this,new Error("operation has timed out"))},M),H=(...l)=>{this.io.clearTimeoutFn(V),h.apply(this,l)};H.withError=!0,this.acks[d]=H}emitWithAck(d,...h){return new Promise((E,M)=>{const V=(H,l)=>H?M(H):E(l);V.withError=!0,h.push(V),this.emit(d,...h)})}_addToQueue(d){let h;typeof d[d.length-1]=="function"&&(h=d.pop());const E={id:this._queueSeq++,tryCount:0,pending:!1,args:d,flags:Object.assign({fromQueue:!0},this.flags)};d.push((M,...V)=>(this._queue[0],M!==null?E.tryCount>this._opts.retries&&(this._queue.shift(),h&&h(M)):(this._queue.shift(),h&&h(null,...V)),E.pending=!1,this._drainQueue())),this._queue.push(E),this._drainQueue()}_drainQueue(d=!1){if(!this.connected||this._queue.length===0)return;const h=this._queue[0];h.pending&&!d||(h.pending=!0,h.tryCount++,this.flags=h.flags,this.emit.apply(this,h.args))}packet(d){d.nsp=this.nsp,this.io._packet(d)}onopen(){typeof this.auth=="function"?this.auth(d=>{this._sendConnectPacket(d)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(d){this.packet({type:we.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},d):d})}onerror(d){this.connected||this.emitReserved("connect_error",d)}onclose(d,h){this.connected=!1,delete this.id,this.emitReserved("disconnect",d,h),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(d=>{if(!this.sendBuffer.some(E=>String(E.id)===d)){const E=this.acks[d];delete this.acks[d],E.withError&&E.call(this,new Error("socket has been disconnected"))}})}onpacket(d){if(d.nsp===this.nsp)switch(d.type){case we.CONNECT:d.data&&d.data.sid?this.onconnect(d.data.sid,d.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case we.EVENT:case we.BINARY_EVENT:this.onevent(d);break;case we.ACK:case we.BINARY_ACK:this.onack(d);break;case we.DISCONNECT:this.ondisconnect();break;case we.CONNECT_ERROR:this.destroy();const E=new Error(d.data.message);E.data=d.data.data,this.emitReserved("connect_error",E);break}}onevent(d){const h=d.data||[];d.id!=null&&h.push(this.ack(d.id)),this.connected?this.emitEvent(h):this.receiveBuffer.push(Object.freeze(h))}emitEvent(d){if(this._anyListeners&&this._anyListeners.length){const h=this._anyListeners.slice();for(const E of h)E.apply(this,d)}super.emit.apply(this,d),this._pid&&d.length&&typeof d[d.length-1]=="string"&&(this._lastOffset=d[d.length-1])}ack(d){const h=this;let E=!1;return function(...M){E||(E=!0,h.packet({type:we.ACK,id:d,data:M}))}}onack(d){const h=this.acks[d.id];typeof h=="function"&&(delete this.acks[d.id],h.withError&&d.data.unshift(null),h.apply(this,d.data))}onconnect(d,h){this.id=d,this.recovered=h&&this._pid===h,this._pid=h,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(d=>this.emitEvent(d)),this.receiveBuffer=[],this.sendBuffer.forEach(d=>{this.notifyOutgoingListeners(d),this.packet(d)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(d=>d()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:we.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(d){return this.flags.compress=d,this}get volatile(){return this.flags.volatile=!0,this}timeout(d){return this.flags.timeout=d,this}onAny(d){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(d),this}prependAny(d){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(d),this}offAny(d){if(!this._anyListeners)return this;if(d){const h=this._anyListeners;for(let E=0;E<h.length;E++)if(d===h[E])return h.splice(E,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(d){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(d),this}prependAnyOutgoing(d){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(d),this}offAnyOutgoing(d){if(!this._anyOutgoingListeners)return this;if(d){const h=this._anyOutgoingListeners;for(let E=0;E<h.length;E++)if(d===h[E])return h.splice(E,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(d){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const h=this._anyOutgoingListeners.slice();for(const E of h)E.apply(this,d.data)}}}function ci(C){C=C||{},this.ms=C.min||100,this.max=C.max||1e4,this.factor=C.factor||2,this.jitter=C.jitter>0&&C.jitter<=1?C.jitter:0,this.attempts=0}ci.prototype.duration=function(){var C=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var d=Math.random(),h=Math.floor(d*this.jitter*C);C=(Math.floor(d*10)&1)==0?C-h:C+h}return Math.min(C,this.max)|0};ci.prototype.reset=function(){this.attempts=0};ci.prototype.setMin=function(C){this.ms=C};ci.prototype.setMax=function(C){this.max=C};ci.prototype.setJitter=function(C){this.jitter=C};class El extends ze{constructor(d,h){var E;super(),this.nsps={},this.subs=[],d&&typeof d=="object"&&(h=d,d=void 0),h=h||{},h.path=h.path||"/socket.io",this.opts=h,vn(this,h),this.reconnection(h.reconnection!==!1),this.reconnectionAttempts(h.reconnectionAttempts||1/0),this.reconnectionDelay(h.reconnectionDelay||1e3),this.reconnectionDelayMax(h.reconnectionDelayMax||5e3),this.randomizationFactor((E=h.randomizationFactor)!==null&&E!==void 0?E:.5),this.backoff=new ci({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(h.timeout==null?2e4:h.timeout),this._readyState="closed",this.uri=d;const M=h.parser||sp;this.encoder=new M.Encoder,this.decoder=new M.Decoder,this._autoConnect=h.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(d){return arguments.length?(this._reconnection=!!d,d||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(d){return d===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=d,this)}reconnectionDelay(d){var h;return d===void 0?this._reconnectionDelay:(this._reconnectionDelay=d,(h=this.backoff)===null||h===void 0||h.setMin(d),this)}randomizationFactor(d){var h;return d===void 0?this._randomizationFactor:(this._randomizationFactor=d,(h=this.backoff)===null||h===void 0||h.setJitter(d),this)}reconnectionDelayMax(d){var h;return d===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=d,(h=this.backoff)===null||h===void 0||h.setMax(d),this)}timeout(d){return arguments.length?(this._timeout=d,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(d){if(~this._readyState.indexOf("open"))return this;this.engine=new Uf(this.uri,this.opts);const h=this.engine,E=this;this._readyState="opening",this.skipReconnect=!1;const M=Pt(h,"open",function(){E.onopen(),d&&d()}),V=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),d?d(l):this.maybeReconnectOnOpen()},H=Pt(h,"error",V);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{M(),V(new Error("timeout")),h.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(M),this.subs.push(H),this}connect(d){return this.open(d)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const d=this.engine;this.subs.push(Pt(d,"ping",this.onping.bind(this)),Pt(d,"data",this.ondata.bind(this)),Pt(d,"error",this.onerror.bind(this)),Pt(d,"close",this.onclose.bind(this)),Pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(d){try{this.decoder.add(d)}catch(h){this.onclose("parse error",h)}}ondecoded(d){_n(()=>{this.emitReserved("packet",d)},this.setTimeoutFn)}onerror(d){this.emitReserved("error",d)}socket(d,h){let E=this.nsps[d];return E?this._autoConnect&&!E.active&&E.connect():(E=new Gh(this,d,h),this.nsps[d]=E),E}_destroy(d){const h=Object.keys(this.nsps);for(const E of h)if(this.nsps[E].active)return;this._close()}_packet(d){const h=this.encoder.encode(d);for(let E=0;E<h.length;E++)this.engine.write(h[E],d.options)}cleanup(){this.subs.forEach(d=>d()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(d,h){var E;this.cleanup(),(E=this.engine)===null||E===void 0||E.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",d,h),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const d=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const h=this.backoff.duration();this._reconnecting=!0;const E=this.setTimeoutFn(()=>{d.skipReconnect||(this.emitReserved("reconnect_attempt",d.backoff.attempts),!d.skipReconnect&&d.open(M=>{M?(d._reconnecting=!1,d.reconnect(),this.emitReserved("reconnect_error",M)):d.onreconnect()}))},h);this.opts.autoUnref&&E.unref(),this.subs.push(()=>{this.clearTimeoutFn(E)})}}onreconnect(){const d=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",d)}}const qi={};function dn(C,d){typeof C=="object"&&(d=C,C=void 0),d=d||{};const h=Wf(C,d.path||"/socket.io"),E=h.source,M=h.id,V=h.path,H=qi[M]&&V in qi[M].nsps,l=d.forceNew||d["force new connection"]||d.multiplex===!1||H;let u;return l?u=new El(E,d):(qi[M]||(qi[M]=new El(E,d)),u=qi[M]),h.query&&!d.query&&(d.query=h.queryKey),u.socket(h.path,d)}Object.assign(dn,{Manager:El,Socket:Gh,io:dn,connect:dn});let kt=null;function mn(){const[C,d]=$e.useState(!1),h=$e.useRef(null);$e.useEffect(()=>{kt||(kt=dn(window.location.origin,{reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3})),h.current=kt;const H=()=>{console.log("Socket connected"),d(!0)},l=()=>{console.log("Socket disconnected"),d(!1)};return kt.on("connect",H),kt.on("disconnect",l),kt.connected&&d(!0),()=>{kt==null||kt.off("connect",H),kt==null||kt.off("disconnect",l)}},[]);const E=$e.useCallback((H,l)=>{var u;(u=h.current)==null||u.emit(H,l)},[]),M=$e.useCallback((H,l)=>{var u;(u=h.current)==null||u.on(H,l)},[]),V=$e.useCallback((H,l)=>{var u,v;l?(u=h.current)==null||u.off(H,l):(v=h.current)==null||v.off(H)},[]);return{socket:h.current,connected:C,emit:E,on:M,off:V}}function op(){const C=Ve(d=>d.projectInfo);return q.jsxs("header",{className:"header",children:[q.jsx("h1",{children:lf}),q.jsxs("div",{className:"project-info",children:[C&&q.jsxs(q.Fragment,{children:[q.jsxs("span",{className:"branch",children:[q.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:q.jsx("path",{d:"M11.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zm-2.25.75a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25zM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zM3.5 3.25a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0z"})}),C.currentBranch||"Unknown"]}),q.jsx("span",{children:C.cwd})]}),q.jsxs("span",{children:["v",af]})]})]})}const lp=[{id:"branch",number:1,label:"Branch"},{id:"agent",number:2,label:"Agent"},{id:"worktree",number:3,label:"Count"}];function ap({number:C,label:d,status:h,onClick:E,disabled:M}){return q.jsxs("button",{className:`lnb-step ${h}`,onClick:E,disabled:M,type:"button",children:[q.jsx("span",{className:"step-number",children:h==="completed"?"✓":C}),q.jsx("span",{className:"step-label",children:d})]})}function cp(){const{step:C,goToStep:d,canNavigateTo:h,getStepStatus:E,isSetupCollapsed:M,toggleSetupCollapse:V,terminals:H}=Ve(),l=H.length>0;return q.jsxs("div",{className:"lnb-section setup-section",children:[q.jsxs("div",{className:"lnb-section-header",onClick:V,role:"button",tabIndex:0,children:[q.jsx("span",{className:"section-title",children:"SETUP"}),q.jsx("span",{className:"collapse-icon",children:M?"+":"−"})]}),!M&&q.jsxs("div",{className:"lnb-steps",children:[lp.map(u=>q.jsx(ap,{step:u.id,number:u.number,label:u.label,status:E(u.id),onClick:()=>d(u.id),disabled:!h(u.id)},u.id)),l&&q.jsxs("button",{className:`lnb-step ${C==="running"?"current":"completed"}`,onClick:()=>d("running"),type:"button",children:[q.jsx("span",{className:"step-number",children:"4"}),q.jsx("span",{className:"step-label",children:"Running"})]})]})]})}function hp({status:C}){const d={initializing:"#f59e0b",installing:"#f59e0b",running:"#22c55e",stopped:"#6b7280",error:"#ef4444"};return q.jsx("span",{className:"status-indicator",style:{backgroundColor:d[C]},title:C})}function up({sessionId:C,worktreeName:d,agentType:h,status:E,isActive:M,isSelected:V,onSelect:H,onToggleSelect:l,onClose:u}){const v=pn.find(w=>w.id===h);return q.jsxs("div",{className:`session-item ${M?"active":""} ${V?"selected":""}`,onClick:H,role:"button",tabIndex:0,children:[q.jsx("input",{type:"checkbox",className:"session-checkbox",checked:V,onClick:l,onChange:()=>{}}),q.jsx(hp,{status:E}),q.jsx("span",{className:"session-name",title:d,children:d}),q.jsx("span",{className:"session-agent",title:v==null?void 0:v.name,children:h.charAt(0).toUpperCase()}),q.jsx("button",{className:"session-close",onClick:u,title:"Close session",type:"button",children:"×"})]})}function dp({branchName:C,sessionCount:d,isCollapsed:h,onToggleCollapse:E,children:M}){return q.jsxs("div",{className:"session-group",children:[q.jsxs("div",{className:"session-group-header",onClick:E,role:"button",tabIndex:0,children:[q.jsx("span",{className:"group-collapse-icon",children:h?"▶":"▼"}),q.jsx("span",{className:"group-name",children:C}),q.jsxs("span",{className:"group-count",children:["(",d,")"]})]}),!h&&q.jsx("div",{className:"session-group-items",children:M})]})}function fp(){const{terminals:C,activeSessionId:d,selectedSessionIds:h,getSessionGroups:E,setActiveSession:M,toggleSessionSelection:V,toggleBranchCollapse:H,removeTerminal:l,openModal:u}=Ve(),v=E(),w=async(f,m,y)=>{f.stopPropagation();try{(await fetch(`/api/worktrees/${encodeURIComponent(y)}`,{method:"DELETE"})).ok&&l(m)}catch(x){console.error("Failed to close session:",x)}};return C.length===0?null:q.jsxs("div",{className:"lnb-section sessions-section",children:[q.jsxs("div",{className:"lnb-section-header",children:[q.jsx("span",{className:"section-title",children:"SESSIONS"}),q.jsx("span",{className:"session-count",children:C.length})]}),q.jsx("div",{className:"session-list",children:v.map(f=>q.jsx(dp,{branchName:f.branchName,sessionCount:f.sessions.length,isCollapsed:f.isCollapsed,onToggleCollapse:()=>H(f.branchName),children:f.sessions.map(m=>q.jsx(up,{sessionId:m.sessionId,worktreeName:m.worktreeName,agentType:m.agentType,status:m.status,isActive:m.sessionId===d,isSelected:h.includes(m.sessionId),onSelect:()=>M(m.sessionId),onToggleSelect:y=>{y.stopPropagation(),V(m.sessionId)},onClose:y=>w(y,m.sessionId,m.worktreeName)},m.sessionId))},f.branchName))}),q.jsx("button",{className:"add-session-btn",onClick:()=>u("addWorktree"),type:"button",children:"+ Add Session"})]})}function pp(){const{selectedSessionIds:C,clearSessionSelection:d,openModal:h}=Ve();return C.length===0?null:q.jsxs("div",{className:"bulk-actions-bar",children:[q.jsxs("span",{className:"selected-count",children:[C.length," selected"]}),q.jsx("button",{className:"bulk-delete-btn",onClick:()=>h("confirmDelete",{sessionIds:C}),type:"button",children:"Delete"}),q.jsx("button",{className:"bulk-cancel-btn",onClick:d,type:"button",children:"Cancel"})]})}function _p(){return q.jsxs("nav",{className:"left-nav-bar",children:[q.jsx(cp,{}),q.jsx(fp,{}),q.jsx(pp,{})]})}function vp({children:C}){return q.jsxs("div",{className:"main-layout",children:[q.jsx(_p,{}),q.jsx("div",{className:"main-content-area with-lnb",children:C})]})}function Tl({children:C,title:d,description:h,showNavButtons:E=!0,nextLabel:M="Next",onNext:V,nextDisabled:H=!1}){const{step:l,goToNext:u,goToPrev:v,isStepComplete:w}=Ve(),f=l==="branch",m=w(l),y=()=>{V?V():u()};return q.jsxs("div",{className:"step-container",children:[q.jsxs("div",{className:"step-header",children:[q.jsx("h2",{children:d}),h&&q.jsx("p",{children:h})]}),q.jsx("div",{className:"step-content",children:C}),E&&q.jsxs("div",{className:"step-navigation",children:[q.jsx("button",{className:"nav-button prev",onClick:v,disabled:f,type:"button",children:"Previous"}),q.jsx("button",{className:"nav-button next",onClick:y,disabled:H||!m,type:"button",children:M})]})]})}function mp(){const{branches:C,selectedBranch:d,setSelectedBranch:h}=Ve();return q.jsxs("div",{className:"setup-section",children:[q.jsx("label",{htmlFor:"branch-select",children:"Select Branch"}),q.jsxs("select",{id:"branch-select",value:d||"",onChange:E=>h(E.target.value||null),children:[q.jsx("option",{value:"",children:"-- Select a branch --"}),C.map(E=>q.jsxs("option",{value:E.name,children:[E.name,E.isCurrent?" (current)":"",E.isRemote?" (remote)":""]},E.name))]})]})}function Ah(){const C=Ve(d=>d.selectedBranch);return q.jsx(Tl,{title:"Select Branch",description:"Choose the Git branch to create worktrees from",nextDisabled:!C,children:q.jsx(mp,{})})}function gp(){const{selectedAgent:C,setSelectedAgent:d}=Ve();return q.jsxs("div",{className:"setup-section",children:[q.jsx("label",{children:"Select AI Agent"}),q.jsx("div",{className:"agent-cards",children:pn.map(h=>q.jsxs("div",{className:`agent-card ${C===h.id?"selected":""}`,onClick:()=>d(h.id),children:[q.jsx("h4",{children:h.name}),q.jsx("p",{children:h.description})]},h.id))})]})}function Sp(){const C=Ve(d=>d.selectedAgent);return q.jsx(Tl,{title:"Select AI Agent",description:"Choose which AI coding agent to run in each worktree",nextDisabled:!C,children:q.jsx(gp,{})})}function yp(){const{worktreeCount:C,incrementWorktreeCount:d,decrementWorktreeCount:h}=Ve();return q.jsxs("div",{className:"setup-section",children:[q.jsx("label",{children:"Number of Worktrees"}),q.jsxs("div",{className:"counter",children:[q.jsx("button",{onClick:h,disabled:C<=an,children:"-"}),q.jsx("span",{children:C}),q.jsx("button",{onClick:d,disabled:C>=ml,children:"+"})]})]})}function Cp(){var H;const{execute:C,isLoading:d,selectedBranch:h,selectedAgent:E,worktreeCount:M}=Ve(),V=((H=pn.find(l=>l.id===E))==null?void 0:H.name)||E;return q.jsxs(Tl,{title:"Configure Worktrees",description:"Set the number of parallel worktrees to create",nextLabel:d?"Creating...":"Execute",onNext:C,nextDisabled:!h||d||M<1,children:[q.jsx(yp,{}),q.jsxs("div",{className:"execution-summary",children:[q.jsx("h4",{children:"Summary"}),q.jsxs("div",{className:"summary-item",children:[q.jsx("span",{className:"summary-label",children:"Branch:"}),q.jsx("span",{className:"summary-value",children:h})]}),q.jsxs("div",{className:"summary-item",children:[q.jsx("span",{className:"summary-label",children:"Agent:"}),q.jsx("span",{className:"summary-value",children:V})]}),q.jsxs("div",{className:"summary-item",children:[q.jsx("span",{className:"summary-label",children:"Worktrees:"}),q.jsx("span",{className:"summary-value",children:M})]})]})]})}var _l={exports:{}},Bh;function wp(){return Bh||(Bh=1,(function(C,d){(function(h,E){C.exports=E()})(globalThis,(()=>(()=>{var h={4567:function(H,l,u){var v=this&&this.__decorate||function(s,n,_,k){var b,L=arguments.length,S=L<3?n:k===null?k=Object.getOwnPropertyDescriptor(n,_):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(s,n,_,k);else for(var A=s.length-1;A>=0;A--)(b=s[A])&&(S=(L<3?b(S):L>3?b(n,_,S):b(n,_))||S);return L>3&&S&&Object.defineProperty(n,_,S),S},w=this&&this.__param||function(s,n){return function(_,k){n(_,k,s)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=u(9042),m=u(9924),y=u(844),x=u(4725),g=u(2585),o=u(3656);let a=l.AccessibilityManager=class extends y.Disposable{constructor(s,n,_,k){super(),this._terminal=s,this._coreBrowserService=_,this._renderService=k,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new m.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((b=>this._handleResize(b.rows)))),this.register(this._terminal.onRender((b=>this._refreshRows(b.start,b.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((b=>this._handleChar(b)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
40
+ `+p.stack}return{value:e,source:t,stack:c,digest:null}}function Ao(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Bo(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Sd=typeof WeakMap=="function"?WeakMap:Map;function kc(e,t,r){r=Xt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){$s||($s=!0,qo=i),Bo(e,t)},r}function bc(e,t,r){r=Xt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var c=t.value;r.payload=function(){return i(c)},r.callback=function(){Bo(e,t)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(r.callback=function(){Bo(e,t),typeof i!="function"&&(_r===null?_r=new Set([this]):_r.add(this));var D=t.stack;this.componentDidCatch(t.value,{componentStack:D!==null?D:""})}),r}function xc(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Sd;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(r)||(c.add(r),e=Od.bind(null,e,t,r),t.then(e,e))}function Lc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Rc(e,t,r,i,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Xt(-1,1),t.tag=2,fr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var yd=_.ReactCurrentOwner,at=!1;function it(e,t,r,i){t.child=e===null?Ga(t,null,r,i):ei(t,e.child,r,i)}function Dc(e,t,r,i,c){r=r.render;var p=t.ref;return ri(t,c),i=Eo(e,t,r,i,p,c),r=ko(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Pe&&r&&no(t),t.flags|=1,it(e,t,i,c),t.child)}function Tc(e,t,r,i,c){if(e===null){var p=r.type;return typeof p=="function"&&!el(p)&&p.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=p,Ac(e,t,p,i,c)):(e=Ys(r.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,(e.lanes&c)===0){var D=p.memoizedProps;if(r=r.compare,r=r!==null?r:bi,r(D,i)&&e.ref===t.ref)return Yt(e,t,c)}return t.flags|=1,e=Sr(p,i),e.ref=t.ref,e.return=t,t.child=e}function Ac(e,t,r,i,c){if(e!==null){var p=e.memoizedProps;if(bi(p,i)&&e.ref===t.ref)if(at=!1,t.pendingProps=i=p,(e.lanes&c)!==0)(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Yt(e,t,c)}return Oo(e,t,r,i,c)}function Bc(e,t,r){var i=t.pendingProps,c=i.children,p=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(oi,mt),mt|=r;else{if((r&1073741824)===0)return e=p!==null?p.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(oi,mt),mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=p!==null?p.baseLanes:r,De(oi,mt),mt|=i}else p!==null?(i=p.baseLanes|r,t.memoizedState=null):i=r,De(oi,mt),mt|=i;return it(e,t,c,r),t.child}function Oc(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Oo(e,t,r,i,c){var p=lt(r)?Rr:Je.current;return p=Yr(t,p),ri(t,c),r=Eo(e,t,r,i,p,c),i=ko(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Pe&&i&&no(t),t.flags|=1,it(e,t,r,c),t.child)}function Pc(e,t,r,i,c){if(lt(r)){var p=!0;Cs(t)}else p=!1;if(ri(t,c),t.stateNode===null)Fs(e,t),wc(t,r,i),To(t,r,i,c),i=!0;else if(e===null){var D=t.stateNode,N=t.memoizedProps;D.props=N;var z=D.context,Y=r.contextType;typeof Y=="object"&&Y!==null?Y=yt(Y):(Y=lt(r)?Rr:Je.current,Y=Yr(t,Y));var se=r.getDerivedStateFromProps,oe=typeof se=="function"||typeof D.getSnapshotBeforeUpdate=="function";oe||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(N!==i||z!==Y)&&Ec(t,D,i,Y),dr=!1;var ie=t.memoizedState;D.state=ie,Ts(t,i,D,c),z=t.memoizedState,N!==i||ie!==z||ot.current||dr?(typeof se=="function"&&(Do(t,r,se,i),z=t.memoizedState),(N=dr||Cc(t,r,N,i,ie,z,Y))?(oe||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(t.flags|=4194308)):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=z),D.props=i,D.state=z,D.context=Y,i=N):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{D=t.stateNode,Ya(e,t),N=t.memoizedProps,Y=t.type===t.elementType?N:Tt(t.type,N),D.props=Y,oe=t.pendingProps,ie=D.context,z=r.contextType,typeof z=="object"&&z!==null?z=yt(z):(z=lt(r)?Rr:Je.current,z=Yr(t,z));var fe=r.getDerivedStateFromProps;(se=typeof fe=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(N!==oe||ie!==z)&&Ec(t,D,i,z),dr=!1,ie=t.memoizedState,D.state=ie,Ts(t,i,D,c);var _e=t.memoizedState;N!==oe||ie!==_e||ot.current||dr?(typeof fe=="function"&&(Do(t,r,fe,i),_e=t.memoizedState),(Y=dr||Cc(t,r,Y,i,ie,_e,z)||!1)?(se||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(i,_e,z),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(i,_e,z)),typeof D.componentDidUpdate=="function"&&(t.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof D.componentDidUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=_e),D.props=i,D.state=_e,D.context=z,i=Y):(typeof D.componentDidUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),i=!1)}return Po(e,t,r,i,p,c)}function Po(e,t,r,i,c,p){Oc(e,t);var D=(t.flags&128)!==0;if(!i&&!D)return c&&Fa(t,r,!1),Yt(e,t,p);i=t.stateNode,yd.current=t;var N=D&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&D?(t.child=ei(t,e.child,null,p),t.child=ei(t,null,N,p)):it(e,t,N,p),t.memoizedState=i.state,c&&Fa(t,r,!0),t.child}function Mc(e){var t=e.stateNode;t.pendingContext?Na(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Na(e,t.context,!1),mo(e,t.containerInfo)}function Ic(e,t,r,i,c){return Zr(),co(c),t.flags|=256,it(e,t,r,i),t.child}var Mo={dehydrated:null,treeContext:null,retryLane:0};function Io(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nc(e,t,r){var i=t.pendingProps,c=Me.current,p=!1,D=(t.flags&128)!==0,N;if((N=D)||(N=e!==null&&e.memoizedState===null?!1:(c&2)!==0),N?(p=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),De(Me,c&1),e===null)return ao(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(D=i.children,e=i.fallback,p?(i=t.mode,p=t.child,D={mode:"hidden",children:D},(i&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=D):p=Qs(D,i,0,null),e=Hr(e,i,r,null),p.return=t,e.return=t,p.sibling=e,t.child=p,t.child.memoizedState=Io(r),t.memoizedState=Mo,e):No(t,D));if(c=e.memoizedState,c!==null&&(N=c.dehydrated,N!==null))return Cd(e,t,D,i,N,c,r);if(p){p=i.fallback,D=t.mode,c=e.child,N=c.sibling;var z={mode:"hidden",children:i.children};return(D&1)===0&&t.child!==c?(i=t.child,i.childLanes=0,i.pendingProps=z,t.deletions=null):(i=Sr(c,z),i.subtreeFlags=c.subtreeFlags&14680064),N!==null?p=Sr(N,p):(p=Hr(p,D,r,null),p.flags|=2),p.return=t,i.return=t,i.sibling=p,t.child=i,i=p,p=t.child,D=e.child.memoizedState,D=D===null?Io(r):{baseLanes:D.baseLanes|r,cachePool:null,transitions:D.transitions},p.memoizedState=D,p.childLanes=e.childLanes&~r,t.memoizedState=Mo,i}return p=e.child,e=p.sibling,i=Sr(p,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function No(e,t){return t=Qs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hs(e,t,r,i){return i!==null&&co(i),ei(t,e.child,null,r),e=No(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cd(e,t,r,i,c,p,D){if(r)return t.flags&256?(t.flags&=-257,i=Ao(Error(h(422))),Hs(e,t,D,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(p=i.fallback,c=t.mode,i=Qs({mode:"visible",children:i.children},c,0,null),p=Hr(p,c,D,null),p.flags|=2,i.return=t,p.return=t,i.sibling=p,t.child=i,(t.mode&1)!==0&&ei(t,e.child,null,D),t.child.memoizedState=Io(D),t.memoizedState=Mo,p);if((t.mode&1)===0)return Hs(e,t,D,null);if(c.data==="$!"){if(i=c.nextSibling&&c.nextSibling.dataset,i)var N=i.dgst;return i=N,p=Error(h(419)),i=Ao(p,i,void 0),Hs(e,t,D,i)}if(N=(D&e.childLanes)!==0,at||N){if(i=qe,i!==null){switch(D&-D){case 4:c=2;break;case 16:c=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(i.suspendedLanes|D))!==0?0:c,c!==0&&c!==p.retryLane&&(p.retryLane=c,Gt(e,c),Ot(i,e,c,-1))}return Zo(),i=Ao(Error(h(421))),Hs(e,t,D,i)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=Pd.bind(null,e),c._reactRetry=t,null):(e=p.treeContext,vt=ar(c.nextSibling),_t=t,Pe=!0,Dt=null,e!==null&&(gt[St++]=Kt,gt[St++]=qt,gt[St++]=Dr,Kt=e.id,qt=e.overflow,Dr=t),t=No(t,i.children),t.flags|=4096,t)}function Hc(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),po(e.return,t,r)}function Ho(e,t,r,i,c){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:c}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=i,p.tail=r,p.tailMode=c)}function Fc(e,t,r){var i=t.pendingProps,c=i.revealOrder,p=i.tail;if(it(e,t,i.children,r),i=Me.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hc(e,r,t);else if(e.tag===19)Hc(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(De(Me,i),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&As(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),Ho(t,!1,c,r,p);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&As(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}Ho(t,!0,r,null,p);break;case"together":Ho(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(h(153));if(t.child!==null){for(e=t.child,r=Sr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Sr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function wd(e,t,r){switch(t.tag){case 3:Mc(t),Zr();break;case 5:Za(t);break;case 1:lt(t.type)&&Cs(t);break;case 4:mo(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,c=t.memoizedProps.value;De(Ls,i._currentValue),i._currentValue=c;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(De(Me,Me.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Nc(e,t,r):(De(Me,Me.current&1),e=Yt(e,t,r),e!==null?e.sibling:null);De(Me,Me.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Fc(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),De(Me,Me.current),i)break;return null;case 22:case 23:return t.lanes=0,Bc(e,t,r)}return Yt(e,t,r)}var jc,Fo,zc,Uc;jc=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},Fo=function(){},zc=function(e,t,r,i){var c=e.memoizedProps;if(c!==i){e=t.stateNode,Br(Ht.current);var p=null;switch(r){case"input":c=Re(e,c),i=Re(e,i),p=[];break;case"select":c=O({},c,{value:void 0}),i=O({},i,{value:void 0}),p=[];break;case"textarea":c=Zt(e,c),i=Zt(e,i),p=[];break;default:typeof c.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=gs)}gn(r,i);var D;r=null;for(Y in c)if(!i.hasOwnProperty(Y)&&c.hasOwnProperty(Y)&&c[Y]!=null)if(Y==="style"){var N=c[Y];for(D in N)N.hasOwnProperty(D)&&(r||(r={}),r[D]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(M.hasOwnProperty(Y)?p||(p=[]):(p=p||[]).push(Y,null));for(Y in i){var z=i[Y];if(N=c!=null?c[Y]:void 0,i.hasOwnProperty(Y)&&z!==N&&(z!=null||N!=null))if(Y==="style")if(N){for(D in N)!N.hasOwnProperty(D)||z&&z.hasOwnProperty(D)||(r||(r={}),r[D]="");for(D in z)z.hasOwnProperty(D)&&N[D]!==z[D]&&(r||(r={}),r[D]=z[D])}else r||(p||(p=[]),p.push(Y,r)),r=z;else Y==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,N=N?N.__html:void 0,z!=null&&N!==z&&(p=p||[]).push(Y,z)):Y==="children"?typeof z!="string"&&typeof z!="number"||(p=p||[]).push(Y,""+z):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(M.hasOwnProperty(Y)?(z!=null&&Y==="onScroll"&&Be("scroll",e),p||N===z||(p=[])):(p=p||[]).push(Y,z))}r&&(p=p||[]).push("style",r);var Y=p;(t.updateQueue=Y)&&(t.flags|=4)}},Uc=function(e,t,r,i){r!==i&&(t.flags|=4)};function ji(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags&14680064,i|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Ed(e,t,r){var i=t.pendingProps;switch(oo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return lt(t.type)&&ys(),et(t),null;case 3:return i=t.stateNode,ii(),Oe(ot),Oe(Je),yo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(bs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dt!==null&&(Yo(Dt),Dt=null))),Fo(e,t),et(t),null;case 5:go(t);var c=Br(Mi.current);if(r=t.type,e!==null&&t.stateNode!=null)zc(e,t,r,i,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(h(166));return et(t),null}if(e=Br(Ht.current),bs(t)){i=t.stateNode,r=t.type;var p=t.memoizedProps;switch(i[Nt]=t,i[Ti]=p,e=(t.mode&1)!==0,r){case"dialog":Be("cancel",i),Be("close",i);break;case"iframe":case"object":case"embed":Be("load",i);break;case"video":case"audio":for(c=0;c<Li.length;c++)Be(Li[c],i);break;case"source":Be("error",i);break;case"img":case"image":case"link":Be("error",i),Be("load",i);break;case"details":Be("toggle",i);break;case"input":Te(i,p),Be("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!p.multiple},Be("invalid",i);break;case"textarea":rt(i,p),Be("invalid",i)}gn(r,p),c=null;for(var D in p)if(p.hasOwnProperty(D)){var N=p[D];D==="children"?typeof N=="string"?i.textContent!==N&&(p.suppressHydrationWarning!==!0&&ms(i.textContent,N,e),c=["children",N]):typeof N=="number"&&i.textContent!==""+N&&(p.suppressHydrationWarning!==!0&&ms(i.textContent,N,e),c=["children",""+N]):M.hasOwnProperty(D)&&N!=null&&D==="onScroll"&&Be("scroll",i)}switch(r){case"input":de(i),Jt(i,p,!0);break;case"textarea":de(i),dt(i);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(i.onclick=gs)}i=c,t.updateQueue=i,i!==null&&(t.flags|=4)}else{D=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tr(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=D.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=D.createElement(r,{is:i.is}):(e=D.createElement(r),r==="select"&&(D=e,i.multiple?D.multiple=!0:i.size&&(D.size=i.size))):e=D.createElementNS(e,r),e[Nt]=t,e[Ti]=i,jc(e,t,!1,!1),t.stateNode=e;e:{switch(D=Sn(r,i),r){case"dialog":Be("cancel",e),Be("close",e),c=i;break;case"iframe":case"object":case"embed":Be("load",e),c=i;break;case"video":case"audio":for(c=0;c<Li.length;c++)Be(Li[c],e);c=i;break;case"source":Be("error",e),c=i;break;case"img":case"image":case"link":Be("error",e),Be("load",e),c=i;break;case"details":Be("toggle",e),c=i;break;case"input":Te(e,i),c=Re(e,i),Be("invalid",e);break;case"option":c=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},c=O({},i,{value:void 0}),Be("invalid",e);break;case"textarea":rt(e,i),c=Zt(e,i),Be("invalid",e);break;default:c=i}gn(r,c),N=c;for(p in N)if(N.hasOwnProperty(p)){var z=N[p];p==="style"?Al(e,z):p==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&br(e,z)):p==="children"?typeof z=="string"?(r!=="textarea"||z!=="")&&nt(e,z):typeof z=="number"&&nt(e,""+z):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(M.hasOwnProperty(p)?z!=null&&p==="onScroll"&&Be("scroll",e):z!=null&&n(e,p,z,D))}switch(r){case"input":de(e),Jt(e,i,!1);break;case"textarea":de(e),dt(e);break;case"option":i.value!=null&&e.setAttribute("value",""+B(i.value));break;case"select":e.multiple=!!i.multiple,p=i.value,p!=null?Mt(e,!!i.multiple,p,!1):i.defaultValue!=null&&Mt(e,!!i.multiple,i.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=gs)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return et(t),null;case 6:if(e&&t.stateNode!=null)Uc(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(h(166));if(r=Br(Mi.current),Br(Ht.current),bs(t)){if(i=t.stateNode,r=t.memoizedProps,i[Nt]=t,(p=i.nodeValue!==r)&&(e=_t,e!==null))switch(e.tag){case 3:ms(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ms(i.nodeValue,r,(e.mode&1)!==0)}p&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Nt]=t,t.stateNode=i}return et(t),null;case 13:if(Oe(Me),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Va(),Zr(),t.flags|=98560,p=!1;else if(p=bs(t),i!==null&&i.dehydrated!==null){if(e===null){if(!p)throw Error(h(318));if(p=t.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(h(317));p[Nt]=t}else Zr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),p=!1}else Dt!==null&&(Yo(Dt),Dt=null),p=!0;if(!p)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Me.current&1)!==0?We===0&&(We=3):Zo())),t.updateQueue!==null&&(t.flags|=4),et(t),null);case 4:return ii(),Fo(e,t),e===null&&Ri(t.stateNode.containerInfo),et(t),null;case 10:return fo(t.type._context),et(t),null;case 17:return lt(t.type)&&ys(),et(t),null;case 19:if(Oe(Me),p=t.memoizedState,p===null)return et(t),null;if(i=(t.flags&128)!==0,D=p.rendering,D===null)if(i)ji(p,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(D=As(e),D!==null){for(t.flags|=128,ji(p,!1),i=D.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)p=r,e=i,p.flags&=14680066,D=p.alternate,D===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=D.childLanes,p.lanes=D.lanes,p.child=D.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=D.memoizedProps,p.memoizedState=D.memoizedState,p.updateQueue=D.updateQueue,p.type=D.type,e=D.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return De(Me,Me.current&1|2),t.child}e=e.sibling}p.tail!==null&&He()>li&&(t.flags|=128,i=!0,ji(p,!1),t.lanes=4194304)}else{if(!i)if(e=As(D),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ji(p,!0),p.tail===null&&p.tailMode==="hidden"&&!D.alternate&&!Pe)return et(t),null}else 2*He()-p.renderingStartTime>li&&r!==1073741824&&(t.flags|=128,i=!0,ji(p,!1),t.lanes=4194304);p.isBackwards?(D.sibling=t.child,t.child=D):(r=p.last,r!==null?r.sibling=D:t.child=D,p.last=D)}return p.tail!==null?(t=p.tail,p.rendering=t,p.tail=t.sibling,p.renderingStartTime=He(),t.sibling=null,r=Me.current,De(Me,i?r&1|2:r&1),t):(et(t),null);case 22:case 23:return Jo(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(mt&1073741824)!==0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error(h(156,t.tag))}function kd(e,t){switch(oo(t),t.tag){case 1:return lt(t.type)&&ys(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ii(),Oe(ot),Oe(Je),yo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return go(t),null;case 13:if(Oe(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(h(340));Zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Me),null;case 4:return ii(),null;case 10:return fo(t.type._context),null;case 22:case 23:return Jo(),null;case 24:return null;default:return null}}var js=!1,tt=!1,bd=typeof WeakSet=="function"?WeakSet:Set,pe=null;function ni(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Ne(e,t,i)}else r.current=null}function jo(e,t,r){try{r()}catch(i){Ne(e,t,i)}}var Wc=!1;function xd(e,t){if(Qn=os,e=Ca(),Wn(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var c=i.anchorOffset,p=i.focusNode;i=i.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var D=0,N=-1,z=-1,Y=0,se=0,oe=e,ie=null;t:for(;;){for(var fe;oe!==r||c!==0&&oe.nodeType!==3||(N=D+c),oe!==p||i!==0&&oe.nodeType!==3||(z=D+i),oe.nodeType===3&&(D+=oe.nodeValue.length),(fe=oe.firstChild)!==null;)ie=oe,oe=fe;for(;;){if(oe===e)break t;if(ie===r&&++Y===c&&(N=D),ie===p&&++se===i&&(z=D),(fe=oe.nextSibling)!==null)break;oe=ie,ie=oe.parentNode}oe=fe}r=N===-1||z===-1?null:{start:N,end:z}}else r=null}r=r||{start:0,end:0}}else r=null;for(Jn={focusedElem:e,selectionRange:r},os=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var _e=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_e!==null){var ve=_e.memoizedProps,Fe=_e.memoizedState,K=t.stateNode,$=K.getSnapshotBeforeUpdate(t.elementType===t.type?ve:Tt(t.type,ve),Fe);K.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var G=t.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(h(163))}}catch(ae){Ne(t,t.return,ae)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return _e=Wc,Wc=!1,_e}function zi(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&e)===e){var p=c.destroy;c.destroy=void 0,p!==void 0&&jo(t,r,p)}c=c.next}while(c!==i)}}function zs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function zo(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function $c(e){var t=e.alternate;t!==null&&(e.alternate=null,$c(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[Ti],delete t[ro],delete t[ad],delete t[cd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Vc(e){return e.tag===5||e.tag===3||e.tag===4}function Kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=gs));else if(i!==4&&(e=e.child,e!==null))for(Uo(e,t,r),e=e.sibling;e!==null;)Uo(e,t,r),e=e.sibling}function Wo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(Wo(e,t,r),e=e.sibling;e!==null;)Wo(e,t,r),e=e.sibling}var Ye=null,At=!1;function pr(e,t,r){for(r=r.child;r!==null;)qc(e,t,r),r=r.sibling}function qc(e,t,r){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(es,r)}catch{}switch(r.tag){case 5:tt||ni(r,t);case 6:var i=Ye,c=At;Ye=null,pr(e,t,r),Ye=i,At=c,Ye!==null&&(At?(e=Ye,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ye.removeChild(r.stateNode));break;case 18:Ye!==null&&(At?(e=Ye,r=r.stateNode,e.nodeType===8?to(e.parentNode,r):e.nodeType===1&&to(e,r),Si(e)):to(Ye,r.stateNode));break;case 4:i=Ye,c=At,Ye=r.stateNode.containerInfo,At=!0,pr(e,t,r),Ye=i,At=c;break;case 0:case 11:case 14:case 15:if(!tt&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){c=i=i.next;do{var p=c,D=p.destroy;p=p.tag,D!==void 0&&((p&2)!==0||(p&4)!==0)&&jo(r,t,D),c=c.next}while(c!==i)}pr(e,t,r);break;case 1:if(!tt&&(ni(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(N){Ne(r,t,N)}pr(e,t,r);break;case 21:pr(e,t,r);break;case 22:r.mode&1?(tt=(i=tt)||r.memoizedState!==null,pr(e,t,r),tt=i):pr(e,t,r);break;default:pr(e,t,r)}}function Gc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new bd),t.forEach(function(i){var c=Md.bind(null,e,i);r.has(i)||(r.add(i),i.then(c,c))})}}function Bt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];try{var p=e,D=t,N=D;e:for(;N!==null;){switch(N.tag){case 5:Ye=N.stateNode,At=!1;break e;case 3:Ye=N.stateNode.containerInfo,At=!0;break e;case 4:Ye=N.stateNode.containerInfo,At=!0;break e}N=N.return}if(Ye===null)throw Error(h(160));qc(p,D,c),Ye=null,At=!1;var z=c.alternate;z!==null&&(z.return=null),c.return=null}catch(Y){Ne(c,t,Y)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Xc(t,e),t=t.sibling}function Xc(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),jt(e),i&4){try{zi(3,e,e.return),zs(3,e)}catch(ve){Ne(e,e.return,ve)}try{zi(5,e,e.return)}catch(ve){Ne(e,e.return,ve)}}break;case 1:Bt(t,e),jt(e),i&512&&r!==null&&ni(r,r.return);break;case 5:if(Bt(t,e),jt(e),i&512&&r!==null&&ni(r,r.return),e.flags&32){var c=e.stateNode;try{nt(c,"")}catch(ve){Ne(e,e.return,ve)}}if(i&4&&(c=e.stateNode,c!=null)){var p=e.memoizedProps,D=r!==null?r.memoizedProps:p,N=e.type,z=e.updateQueue;if(e.updateQueue=null,z!==null)try{N==="input"&&p.type==="radio"&&p.name!=null&&Xe(c,p),Sn(N,D);var Y=Sn(N,p);for(D=0;D<z.length;D+=2){var se=z[D],oe=z[D+1];se==="style"?Al(c,oe):se==="dangerouslySetInnerHTML"?br(c,oe):se==="children"?nt(c,oe):n(c,se,oe,Y)}switch(N){case"input":ye(c,p);break;case"textarea":er(c,p);break;case"select":var ie=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!p.multiple;var fe=p.value;fe!=null?Mt(c,!!p.multiple,fe,!1):ie!==!!p.multiple&&(p.defaultValue!=null?Mt(c,!!p.multiple,p.defaultValue,!0):Mt(c,!!p.multiple,p.multiple?[]:"",!1))}c[Ti]=p}catch(ve){Ne(e,e.return,ve)}}break;case 6:if(Bt(t,e),jt(e),i&4){if(e.stateNode===null)throw Error(h(162));c=e.stateNode,p=e.memoizedProps;try{c.nodeValue=p}catch(ve){Ne(e,e.return,ve)}}break;case 3:if(Bt(t,e),jt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(ve){Ne(e,e.return,ve)}break;case 4:Bt(t,e),jt(e);break;case 13:Bt(t,e),jt(e),c=e.child,c.flags&8192&&(p=c.memoizedState!==null,c.stateNode.isHidden=p,!p||c.alternate!==null&&c.alternate.memoizedState!==null||(Ko=He())),i&4&&Gc(e);break;case 22:if(se=r!==null&&r.memoizedState!==null,e.mode&1?(tt=(Y=tt)||se,Bt(t,e),tt=Y):Bt(t,e),jt(e),i&8192){if(Y=e.memoizedState!==null,(e.stateNode.isHidden=Y)&&!se&&(e.mode&1)!==0)for(pe=e,se=e.child;se!==null;){for(oe=pe=se;pe!==null;){switch(ie=pe,fe=ie.child,ie.tag){case 0:case 11:case 14:case 15:zi(4,ie,ie.return);break;case 1:ni(ie,ie.return);var _e=ie.stateNode;if(typeof _e.componentWillUnmount=="function"){i=ie,r=ie.return;try{t=i,_e.props=t.memoizedProps,_e.state=t.memoizedState,_e.componentWillUnmount()}catch(ve){Ne(i,r,ve)}}break;case 5:ni(ie,ie.return);break;case 22:if(ie.memoizedState!==null){Jc(oe);continue}}fe!==null?(fe.return=ie,pe=fe):Jc(oe)}se=se.sibling}e:for(se=null,oe=e;;){if(oe.tag===5){if(se===null){se=oe;try{c=oe.stateNode,Y?(p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(N=oe.stateNode,z=oe.memoizedProps.style,D=z!=null&&z.hasOwnProperty("display")?z.display:null,N.style.display=Yi("display",D))}catch(ve){Ne(e,e.return,ve)}}}else if(oe.tag===6){if(se===null)try{oe.stateNode.nodeValue=Y?"":oe.memoizedProps}catch(ve){Ne(e,e.return,ve)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===e)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===e)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===e)break e;se===oe&&(se=null),oe=oe.return}se===oe&&(se=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Bt(t,e),jt(e),i&4&&Gc(e);break;case 21:break;default:Bt(t,e),jt(e)}}function jt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Vc(r)){var i=r;break e}r=r.return}throw Error(h(160))}switch(i.tag){case 5:var c=i.stateNode;i.flags&32&&(nt(c,""),i.flags&=-33);var p=Kc(e);Wo(e,p,c);break;case 3:case 4:var D=i.stateNode.containerInfo,N=Kc(e);Uo(e,N,D);break;default:throw Error(h(161))}}catch(z){Ne(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ld(e,t,r){pe=e,Yc(e)}function Yc(e,t,r){for(var i=(e.mode&1)!==0;pe!==null;){var c=pe,p=c.child;if(c.tag===22&&i){var D=c.memoizedState!==null||js;if(!D){var N=c.alternate,z=N!==null&&N.memoizedState!==null||tt;N=js;var Y=tt;if(js=D,(tt=z)&&!Y)for(pe=c;pe!==null;)D=pe,z=D.child,D.tag===22&&D.memoizedState!==null?Zc(c):z!==null?(z.return=D,pe=z):Zc(c);for(;p!==null;)pe=p,Yc(p),p=p.sibling;pe=c,js=N,tt=Y}Qc(e)}else(c.subtreeFlags&8772)!==0&&p!==null?(p.return=c,pe=p):Qc(e)}}function Qc(e){for(;pe!==null;){var t=pe;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:tt||zs(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!tt)if(r===null)i.componentDidMount();else{var c=t.elementType===t.type?r.memoizedProps:Tt(t.type,r.memoizedProps);i.componentDidUpdate(c,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var p=t.updateQueue;p!==null&&Ja(t,p,i);break;case 3:var D=t.updateQueue;if(D!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Ja(t,D,r)}break;case 5:var N=t.stateNode;if(r===null&&t.flags&4){r=N;var z=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&r.focus();break;case"img":z.src&&(r.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var Y=t.alternate;if(Y!==null){var se=Y.memoizedState;if(se!==null){var oe=se.dehydrated;oe!==null&&Si(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(h(163))}tt||t.flags&512&&zo(t)}catch(ie){Ne(t,t.return,ie)}}if(t===e){pe=null;break}if(r=t.sibling,r!==null){r.return=t.return,pe=r;break}pe=t.return}}function Jc(e){for(;pe!==null;){var t=pe;if(t===e){pe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,pe=r;break}pe=t.return}}function Zc(e){for(;pe!==null;){var t=pe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{zs(4,t)}catch(z){Ne(t,r,z)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var c=t.return;try{i.componentDidMount()}catch(z){Ne(t,c,z)}}var p=t.return;try{zo(t)}catch(z){Ne(t,p,z)}break;case 5:var D=t.return;try{zo(t)}catch(z){Ne(t,D,z)}}}catch(z){Ne(t,t.return,z)}if(t===e){pe=null;break}var N=t.sibling;if(N!==null){N.return=t.return,pe=N;break}pe=t.return}}var Rd=Math.ceil,Us=_.ReactCurrentDispatcher,$o=_.ReactCurrentOwner,wt=_.ReactCurrentBatchConfig,be=0,qe=null,je=null,Qe=0,mt=0,oi=cr(0),We=0,Ui=null,Pr=0,Ws=0,Vo=0,Wi=null,ct=null,Ko=0,li=1/0,Qt=null,$s=!1,qo=null,_r=null,Vs=!1,vr=null,Ks=0,$i=0,Go=null,qs=-1,Gs=0;function st(){return(be&6)!==0?He():qs!==-1?qs:qs=He()}function mr(e){return(e.mode&1)===0?1:(be&2)!==0&&Qe!==0?Qe&-Qe:ud.transition!==null?(Gs===0&&(Gs=Kl()),Gs):(e=Le,e!==0||(e=window.event,e=e===void 0?16:ta(e.type)),e)}function Ot(e,t,r,i){if(50<$i)throw $i=0,Go=null,Error(h(185));pi(e,r,i),((be&2)===0||e!==qe)&&(e===qe&&((be&2)===0&&(Ws|=r),We===4&&gr(e,Qe)),ht(e,i),r===1&&be===0&&(t.mode&1)===0&&(li=He()+500,ws&&ur()))}function ht(e,t){var r=e.callbackNode;uu(e,t);var i=is(e,e===qe?Qe:0);if(i===0)r!==null&&Wl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Wl(r),t===1)e.tag===0?hd(th.bind(null,e)):ja(th.bind(null,e)),od(function(){(be&6)===0&&ur()}),r=null;else{switch(ql(i)){case 1:r=xn;break;case 4:r=$l;break;case 16:r=Zi;break;case 536870912:r=Vl;break;default:r=Zi}r=ch(r,eh.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function eh(e,t){if(qs=-1,Gs=0,(be&6)!==0)throw Error(h(327));var r=e.callbackNode;if(ai()&&e.callbackNode!==r)return null;var i=is(e,e===qe?Qe:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Xs(e,i);else{t=i;var c=be;be|=2;var p=ih();(qe!==e||Qe!==t)&&(Qt=null,li=He()+500,Ir(e,t));do try{Ad();break}catch(N){rh(e,N)}while(!0);uo(),Us.current=p,be=c,je!==null?t=0:(qe=null,Qe=0,t=We)}if(t!==0){if(t===2&&(c=Ln(e),c!==0&&(i=c,t=Xo(e,c))),t===1)throw r=Ui,Ir(e,0),gr(e,i),ht(e,He()),r;if(t===6)gr(e,i);else{if(c=e.current.alternate,(i&30)===0&&!Dd(c)&&(t=Xs(e,i),t===2&&(p=Ln(e),p!==0&&(i=p,t=Xo(e,p))),t===1))throw r=Ui,Ir(e,0),gr(e,i),ht(e,He()),r;switch(e.finishedWork=c,e.finishedLanes=i,t){case 0:case 1:throw Error(h(345));case 2:Nr(e,ct,Qt);break;case 3:if(gr(e,i),(i&130023424)===i&&(t=Ko+500-He(),10<t)){if(is(e,0)!==0)break;if(c=e.suspendedLanes,(c&i)!==i){st(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=eo(Nr.bind(null,e,ct,Qt),t);break}Nr(e,ct,Qt);break;case 4:if(gr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,c=-1;0<i;){var D=31-Lt(i);p=1<<D,D=t[D],D>c&&(c=D),i&=~p}if(i=c,i=He()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Rd(i/1960))-i,10<i){e.timeoutHandle=eo(Nr.bind(null,e,ct,Qt),i);break}Nr(e,ct,Qt);break;case 5:Nr(e,ct,Qt);break;default:throw Error(h(329))}}}return ht(e,He()),e.callbackNode===r?eh.bind(null,e):null}function Xo(e,t){var r=Wi;return e.current.memoizedState.isDehydrated&&(Ir(e,t).flags|=256),e=Xs(e,t),e!==2&&(t=ct,ct=r,t!==null&&Yo(t)),e}function Yo(e){ct===null?ct=e:ct.push.apply(ct,e)}function Dd(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var c=r[i],p=c.getSnapshot;c=c.value;try{if(!Rt(p(),c))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gr(e,t){for(t&=~Vo,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Lt(t),i=1<<r;e[r]=-1,t&=~i}}function th(e){if((be&6)!==0)throw Error(h(327));ai();var t=is(e,0);if((t&1)===0)return ht(e,He()),null;var r=Xs(e,t);if(e.tag!==0&&r===2){var i=Ln(e);i!==0&&(t=i,r=Xo(e,i))}if(r===1)throw r=Ui,Ir(e,0),gr(e,t),ht(e,He()),r;if(r===6)throw Error(h(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nr(e,ct,Qt),ht(e,He()),null}function Qo(e,t){var r=be;be|=1;try{return e(t)}finally{be=r,be===0&&(li=He()+500,ws&&ur())}}function Mr(e){vr!==null&&vr.tag===0&&(be&6)===0&&ai();var t=be;be|=1;var r=wt.transition,i=Le;try{if(wt.transition=null,Le=1,e)return e()}finally{Le=i,wt.transition=r,be=t,(be&6)===0&&ur()}}function Jo(){mt=oi.current,Oe(oi)}function Ir(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,nd(r)),je!==null)for(r=je.return;r!==null;){var i=r;switch(oo(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ys();break;case 3:ii(),Oe(ot),Oe(Je),yo();break;case 5:go(i);break;case 4:ii();break;case 13:Oe(Me);break;case 19:Oe(Me);break;case 10:fo(i.type._context);break;case 22:case 23:Jo()}r=r.return}if(qe=e,je=e=Sr(e.current,null),Qe=mt=t,We=0,Ui=null,Vo=Ws=Pr=0,ct=Wi=null,Ar!==null){for(t=0;t<Ar.length;t++)if(r=Ar[t],i=r.interleaved,i!==null){r.interleaved=null;var c=i.next,p=r.pending;if(p!==null){var D=p.next;p.next=c,i.next=D}r.pending=i}Ar=null}return e}function rh(e,t){do{var r=je;try{if(uo(),Bs.current=Is,Os){for(var i=Ie.memoizedState;i!==null;){var c=i.queue;c!==null&&(c.pending=null),i=i.next}Os=!1}if(Or=0,Ke=Ue=Ie=null,Ii=!1,Ni=0,$o.current=null,r===null||r.return===null){We=1,Ui=t,je=null;break}e:{var p=e,D=r.return,N=r,z=t;if(t=Qe,N.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Y=z,se=N,oe=se.tag;if((se.mode&1)===0&&(oe===0||oe===11||oe===15)){var ie=se.alternate;ie?(se.updateQueue=ie.updateQueue,se.memoizedState=ie.memoizedState,se.lanes=ie.lanes):(se.updateQueue=null,se.memoizedState=null)}var fe=Lc(D);if(fe!==null){fe.flags&=-257,Rc(fe,D,N,p,t),fe.mode&1&&xc(p,Y,t),t=fe,z=Y;var _e=t.updateQueue;if(_e===null){var ve=new Set;ve.add(z),t.updateQueue=ve}else _e.add(z);break e}else{if((t&1)===0){xc(p,Y,t),Zo();break e}z=Error(h(426))}}else if(Pe&&N.mode&1){var Fe=Lc(D);if(Fe!==null){(Fe.flags&65536)===0&&(Fe.flags|=256),Rc(Fe,D,N,p,t),co(si(z,N));break e}}p=z=si(z,N),We!==4&&(We=2),Wi===null?Wi=[p]:Wi.push(p),p=D;do{switch(p.tag){case 3:p.flags|=65536,t&=-t,p.lanes|=t;var K=kc(p,z,t);Qa(p,K);break e;case 1:N=z;var $=p.type,G=p.stateNode;if((p.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||G!==null&&typeof G.componentDidCatch=="function"&&(_r===null||!_r.has(G)))){p.flags|=65536,t&=-t,p.lanes|=t;var ae=bc(p,N,t);Qa(p,ae);break e}}p=p.return}while(p!==null)}nh(r)}catch(me){t=me,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function ih(){var e=Us.current;return Us.current=Is,e===null?Is:e}function Zo(){(We===0||We===3||We===2)&&(We=4),qe===null||(Pr&268435455)===0&&(Ws&268435455)===0||gr(qe,Qe)}function Xs(e,t){var r=be;be|=2;var i=ih();(qe!==e||Qe!==t)&&(Qt=null,Ir(e,t));do try{Td();break}catch(c){rh(e,c)}while(!0);if(uo(),be=r,Us.current=i,je!==null)throw Error(h(261));return qe=null,Qe=0,We}function Td(){for(;je!==null;)sh(je)}function Ad(){for(;je!==null&&!ru();)sh(je)}function sh(e){var t=ah(e.alternate,e,mt);e.memoizedProps=e.pendingProps,t===null?nh(e):je=t,$o.current=null}function nh(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Ed(r,t,mt),r!==null){je=r;return}}else{if(r=kd(r,t),r!==null){r.flags&=32767,je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,je=null;return}}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);We===0&&(We=5)}function Nr(e,t,r){var i=Le,c=wt.transition;try{wt.transition=null,Le=1,Bd(e,t,r,i)}finally{wt.transition=c,Le=i}return null}function Bd(e,t,r,i){do ai();while(vr!==null);if((be&6)!==0)throw Error(h(327));r=e.finishedWork;var c=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(h(177));e.callbackNode=null,e.callbackPriority=0;var p=r.lanes|r.childLanes;if(du(e,p),e===qe&&(je=qe=null,Qe=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Vs||(Vs=!0,ch(Zi,function(){return ai(),null})),p=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||p){p=wt.transition,wt.transition=null;var D=Le;Le=1;var N=be;be|=4,$o.current=null,xd(e,r),Xc(r,e),Ju(Jn),os=!!Qn,Jn=Qn=null,e.current=r,Ld(r),iu(),be=N,Le=D,wt.transition=p}else e.current=r;if(Vs&&(Vs=!1,vr=e,Ks=c),p=e.pendingLanes,p===0&&(_r=null),ou(r.stateNode),ht(e,He()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)c=t[r],i(c.value,{componentStack:c.stack,digest:c.digest});if($s)throw $s=!1,e=qo,qo=null,e;return(Ks&1)!==0&&e.tag!==0&&ai(),p=e.pendingLanes,(p&1)!==0?e===Go?$i++:($i=0,Go=e):$i=0,ur(),null}function ai(){if(vr!==null){var e=ql(Ks),t=wt.transition,r=Le;try{if(wt.transition=null,Le=16>e?16:e,vr===null)var i=!1;else{if(e=vr,vr=null,Ks=0,(be&6)!==0)throw Error(h(331));var c=be;for(be|=4,pe=e.current;pe!==null;){var p=pe,D=p.child;if((pe.flags&16)!==0){var N=p.deletions;if(N!==null){for(var z=0;z<N.length;z++){var Y=N[z];for(pe=Y;pe!==null;){var se=pe;switch(se.tag){case 0:case 11:case 15:zi(8,se,p)}var oe=se.child;if(oe!==null)oe.return=se,pe=oe;else for(;pe!==null;){se=pe;var ie=se.sibling,fe=se.return;if($c(se),se===Y){pe=null;break}if(ie!==null){ie.return=fe,pe=ie;break}pe=fe}}}var _e=p.alternate;if(_e!==null){var ve=_e.child;if(ve!==null){_e.child=null;do{var Fe=ve.sibling;ve.sibling=null,ve=Fe}while(ve!==null)}}pe=p}}if((p.subtreeFlags&2064)!==0&&D!==null)D.return=p,pe=D;else e:for(;pe!==null;){if(p=pe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:zi(9,p,p.return)}var K=p.sibling;if(K!==null){K.return=p.return,pe=K;break e}pe=p.return}}var $=e.current;for(pe=$;pe!==null;){D=pe;var G=D.child;if((D.subtreeFlags&2064)!==0&&G!==null)G.return=D,pe=G;else e:for(D=$;pe!==null;){if(N=pe,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:zs(9,N)}}catch(me){Ne(N,N.return,me)}if(N===D){pe=null;break e}var ae=N.sibling;if(ae!==null){ae.return=N.return,pe=ae;break e}pe=N.return}}if(be=c,ur(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(es,e)}catch{}i=!0}return i}finally{Le=r,wt.transition=t}}return!1}function oh(e,t,r){t=si(r,t),t=kc(e,t,1),e=fr(e,t,1),t=st(),e!==null&&(pi(e,1,t),ht(e,t))}function Ne(e,t,r){if(e.tag===3)oh(e,e,r);else for(;t!==null;){if(t.tag===3){oh(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(_r===null||!_r.has(i))){e=si(r,e),e=bc(t,e,1),t=fr(t,e,1),e=st(),t!==null&&(pi(t,1,e),ht(t,e));break}}t=t.return}}function Od(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=st(),e.pingedLanes|=e.suspendedLanes&r,qe===e&&(Qe&r)===r&&(We===4||We===3&&(Qe&130023424)===Qe&&500>He()-Ko?Ir(e,0):Vo|=r),ht(e,t)}function lh(e,t){t===0&&((e.mode&1)===0?t=1:(t=rs,rs<<=1,(rs&130023424)===0&&(rs=4194304)));var r=st();e=Gt(e,t),e!==null&&(pi(e,t,r),ht(e,r))}function Pd(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),lh(e,r)}function Md(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(h(314))}i!==null&&i.delete(t),lh(e,r)}var ah;ah=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)at=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return at=!1,wd(e,t,r);at=(e.flags&131072)!==0}else at=!1,Pe&&(t.flags&1048576)!==0&&za(t,ks,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Fs(e,t),e=t.pendingProps;var c=Yr(t,Je.current);ri(t,r),c=Eo(null,t,i,e,c,r);var p=ko();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(i)?(p=!0,Cs(t)):p=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,vo(t),c.updater=Ns,t.stateNode=c,c._reactInternals=t,To(t,i,e,r),t=Po(null,t,i,!0,p,r)):(t.tag=0,Pe&&p&&no(t),it(null,t,c,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,c=i._init,i=c(i._payload),t.type=i,c=t.tag=Nd(i),e=Tt(i,e),c){case 0:t=Oo(null,t,i,e,r);break e;case 1:t=Pc(null,t,i,e,r);break e;case 11:t=Dc(null,t,i,e,r);break e;case 14:t=Tc(null,t,i,Tt(i.type,e),r);break e}throw Error(h(306,i,""))}return t;case 0:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Oo(e,t,i,c,r);case 1:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Pc(e,t,i,c,r);case 3:e:{if(Mc(t),e===null)throw Error(h(387));i=t.pendingProps,p=t.memoizedState,c=p.element,Ya(e,t),Ts(t,i,null,r);var D=t.memoizedState;if(i=D.element,p.isDehydrated)if(p={element:i,isDehydrated:!1,cache:D.cache,pendingSuspenseBoundaries:D.pendingSuspenseBoundaries,transitions:D.transitions},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){c=si(Error(h(423)),t),t=Ic(e,t,i,r,c);break e}else if(i!==c){c=si(Error(h(424)),t),t=Ic(e,t,i,r,c);break e}else for(vt=ar(t.stateNode.containerInfo.firstChild),_t=t,Pe=!0,Dt=null,r=Ga(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zr(),i===c){t=Yt(e,t,r);break e}it(e,t,i,r)}t=t.child}return t;case 5:return Za(t),e===null&&ao(t),i=t.type,c=t.pendingProps,p=e!==null?e.memoizedProps:null,D=c.children,Zn(i,c)?D=null:p!==null&&Zn(i,p)&&(t.flags|=32),Oc(e,t),it(e,t,D,r),t.child;case 6:return e===null&&ao(t),null;case 13:return Nc(e,t,r);case 4:return mo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=ei(t,null,i,r):it(e,t,i,r),t.child;case 11:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Dc(e,t,i,c,r);case 7:return it(e,t,t.pendingProps,r),t.child;case 8:return it(e,t,t.pendingProps.children,r),t.child;case 12:return it(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,c=t.pendingProps,p=t.memoizedProps,D=c.value,De(Ls,i._currentValue),i._currentValue=D,p!==null)if(Rt(p.value,D)){if(p.children===c.children&&!ot.current){t=Yt(e,t,r);break e}}else for(p=t.child,p!==null&&(p.return=t);p!==null;){var N=p.dependencies;if(N!==null){D=p.child;for(var z=N.firstContext;z!==null;){if(z.context===i){if(p.tag===1){z=Xt(-1,r&-r),z.tag=2;var Y=p.updateQueue;if(Y!==null){Y=Y.shared;var se=Y.pending;se===null?z.next=z:(z.next=se.next,se.next=z),Y.pending=z}}p.lanes|=r,z=p.alternate,z!==null&&(z.lanes|=r),po(p.return,r,t),N.lanes|=r;break}z=z.next}}else if(p.tag===10)D=p.type===t.type?null:p.child;else if(p.tag===18){if(D=p.return,D===null)throw Error(h(341));D.lanes|=r,N=D.alternate,N!==null&&(N.lanes|=r),po(D,r,t),D=p.sibling}else D=p.child;if(D!==null)D.return=p;else for(D=p;D!==null;){if(D===t){D=null;break}if(p=D.sibling,p!==null){p.return=D.return,D=p;break}D=D.return}p=D}it(e,t,c.children,r),t=t.child}return t;case 9:return c=t.type,i=t.pendingProps.children,ri(t,r),c=yt(c),i=i(c),t.flags|=1,it(e,t,i,r),t.child;case 14:return i=t.type,c=Tt(i,t.pendingProps),c=Tt(i.type,c),Tc(e,t,i,c,r);case 15:return Ac(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Fs(e,t),t.tag=1,lt(i)?(e=!0,Cs(t)):e=!1,ri(t,r),wc(t,i,c),To(t,i,c,r),Po(null,t,i,!0,e,r);case 19:return Fc(e,t,r);case 22:return Bc(e,t,r)}throw Error(h(156,t.tag))};function ch(e,t){return Ul(e,t)}function Id(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,r,i){return new Id(e,t,r,i)}function el(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Nd(e){if(typeof e=="function")return el(e)?1:0;if(e!=null){if(e=e.$$typeof,e===W)return 11;if(e===te)return 14}return 2}function Sr(e,t){var r=e.alternate;return r===null?(r=Et(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ys(e,t,r,i,c,p){var D=2;if(i=e,typeof e=="function")el(e)&&(D=1);else if(typeof e=="string")D=5;else e:switch(e){case L:return Hr(r.children,c,p,t);case S:D=8,c|=8;break;case A:return e=Et(12,r,t,c|2),e.elementType=A,e.lanes=p,e;case I:return e=Et(13,r,t,c),e.elementType=I,e.lanes=p,e;case Q:return e=Et(19,r,t,c),e.elementType=Q,e.lanes=p,e;case le:return Qs(r,c,p,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case F:D=10;break e;case j:D=9;break e;case W:D=11;break e;case te:D=14;break e;case ne:D=16,i=null;break e}throw Error(h(130,e==null?e:typeof e,""))}return t=Et(D,r,t,c),t.elementType=e,t.type=i,t.lanes=p,t}function Hr(e,t,r,i){return e=Et(7,e,i,t),e.lanes=r,e}function Qs(e,t,r,i){return e=Et(22,e,i,t),e.elementType=le,e.lanes=r,e.stateNode={isHidden:!1},e}function tl(e,t,r){return e=Et(6,e,null,t),e.lanes=r,e}function rl(e,t,r){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hd(e,t,r,i,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rn(0),this.expirationTimes=Rn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rn(0),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function il(e,t,r,i,c,p,D,N,z){return e=new Hd(e,t,r,N,z),t===1?(t=1,p===!0&&(t|=8)):t=0,p=Et(3,null,null,t),e.current=p,p.stateNode=e,p.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},vo(p),e}function Fd(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:b,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function hh(e){if(!e)return hr;e=e._reactInternals;e:{if(xr(e)!==e||e.tag!==1)throw Error(h(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(h(171))}if(e.tag===1){var r=e.type;if(lt(r))return Ha(e,r,t)}return t}function uh(e,t,r,i,c,p,D,N,z){return e=il(r,i,!0,e,c,p,D,N,z),e.context=hh(null),r=e.current,i=st(),c=mr(r),p=Xt(i,c),p.callback=t??null,fr(r,p,c),e.current.lanes=c,pi(e,c,i),ht(e,i),e}function Js(e,t,r,i){var c=t.current,p=st(),D=mr(c);return r=hh(r),t.context===null?t.context=r:t.pendingContext=r,t=Xt(p,D),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=fr(c,t,D),e!==null&&(Ot(e,c,D,p),Ds(e,c,D)),D}function Zs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function dh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function sl(e,t){dh(e,t),(e=e.alternate)&&dh(e,t)}function jd(){return null}var fh=typeof reportError=="function"?reportError:function(e){console.error(e)};function nl(e){this._internalRoot=e}en.prototype.render=nl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(h(409));Js(e,t,null,null)},en.prototype.unmount=nl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mr(function(){Js(null,e,null,null)}),t[$t]=null}};function en(e){this._internalRoot=e}en.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yl();e={blockedOn:null,target:e,priority:t};for(var r=0;r<nr.length&&t!==0&&t<nr[r].priority;r++);nr.splice(r,0,e),r===0&&Zl(e)}};function ol(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tn(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ph(){}function zd(e,t,r,i,c){if(c){if(typeof i=="function"){var p=i;i=function(){var Y=Zs(D);p.call(Y)}}var D=uh(t,i,e,0,null,!1,!1,"",ph);return e._reactRootContainer=D,e[$t]=D.current,Ri(e.nodeType===8?e.parentNode:e),Mr(),D}for(;c=e.lastChild;)e.removeChild(c);if(typeof i=="function"){var N=i;i=function(){var Y=Zs(z);N.call(Y)}}var z=il(e,0,!1,null,null,!1,!1,"",ph);return e._reactRootContainer=z,e[$t]=z.current,Ri(e.nodeType===8?e.parentNode:e),Mr(function(){Js(t,z,r,i)}),z}function rn(e,t,r,i,c){var p=r._reactRootContainer;if(p){var D=p;if(typeof c=="function"){var N=c;c=function(){var z=Zs(D);N.call(z)}}Js(t,D,e,c)}else D=zd(r,t,e,c,i);return Zs(D)}Gl=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=fi(t.pendingLanes);r!==0&&(Dn(t,r|1),ht(t,He()),(be&6)===0&&(li=He()+500,ur()))}break;case 13:Mr(function(){var i=Gt(e,1);if(i!==null){var c=st();Ot(i,e,1,c)}}),sl(e,1)}},Tn=function(e){if(e.tag===13){var t=Gt(e,134217728);if(t!==null){var r=st();Ot(t,e,134217728,r)}sl(e,134217728)}},Xl=function(e){if(e.tag===13){var t=mr(e),r=Gt(e,t);if(r!==null){var i=st();Ot(r,e,t,i)}sl(e,t)}},Yl=function(){return Le},Ql=function(e,t){var r=Le;try{return Le=e,t()}finally{Le=r}},wn=function(e,t,r){switch(t){case"input":if(ye(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var c=Ss(i);if(!c)throw Error(h(90));ue(i),ye(i,c)}}}break;case"textarea":er(e,r);break;case"select":t=r.value,t!=null&&Mt(e,!!r.multiple,t,!1)}},Ml=Qo,Il=Mr;var Ud={usingClientEntryPoint:!1,Events:[Ai,Gr,Ss,Ol,Pl,Qo]},Vi={findFiberByHostInstance:Lr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Wd={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=jl(e),e===null?null:e.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||jd,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sn.isDisabled&&sn.supportsFiber)try{es=sn.inject(Wd),It=sn}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ud,ut.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ol(t))throw Error(h(200));return Fd(e,t,null,r)},ut.createRoot=function(e,t){if(!ol(e))throw Error(h(299));var r=!1,i="",c=fh;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=il(e,1,!1,null,null,r,!1,i,c),e[$t]=t.current,Ri(e.nodeType===8?e.parentNode:e),new nl(t)},ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(h(188)):(e=Object.keys(e).join(","),Error(h(268,e)));return e=jl(t),e=e===null?null:e.stateNode,e},ut.flushSync=function(e){return Mr(e)},ut.hydrate=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!0,r)},ut.hydrateRoot=function(e,t,r){if(!ol(e))throw Error(h(405));var i=r!=null&&r.hydratedSources||null,c=!1,p="",D=fh;if(r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(p=r.identifierPrefix),r.onRecoverableError!==void 0&&(D=r.onRecoverableError)),t=uh(t,null,e,1,r??null,c,!1,p,D),e[$t]=t.current,Ri(e),i)for(e=0;e<i.length;e++)r=i[e],c=r._getVersion,c=c(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,c]:t.mutableSourceEagerHydrationData.push(r,c);return new en(t)},ut.render=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!1,r)},ut.unmountComponentAtNode=function(e){if(!tn(e))throw Error(h(40));return e._reactRootContainer?(Mr(function(){rn(null,null,e,!1,function(){e._reactRootContainer=null,e[$t]=null})}),!0):!1},ut.unstable_batchedUpdates=Qo,ut.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!tn(r))throw Error(h(200));if(e==null||e._reactInternals===void 0)throw Error(h(38));return rn(e,t,r,!1,i)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var wh;function Qd(){if(wh)return cl.exports;wh=1;function C(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(C)}catch(d){console.error(d)}}return C(),cl.exports=Yd(),cl.exports}var Eh;function Jd(){if(Eh)return nn;Eh=1;var C=Qd();return nn.createRoot=C.createRoot,nn.hydrateRoot=C.hydrateRoot,nn}var Zd=Jd();const ef=Ph(Zd),kh=C=>{let d;const h=new Set,E=(v,w)=>{const f=typeof v=="function"?v(d):v;if(!Object.is(f,d)){const m=d;d=w??(typeof f!="object"||f===null)?f:Object.assign({},d,f),h.forEach(y=>y(d,m))}},M=()=>d,l={setState:E,getState:M,getInitialState:()=>u,subscribe:v=>(h.add(v),()=>h.delete(v))},u=d=C(E,M,l);return l},tf=(C=>C?kh(C):kh),rf=C=>C;function sf(C,d=rf){const h=Gi.useSyncExternalStore(C.subscribe,Gi.useCallback(()=>d(C.getState()),[C,d]),Gi.useCallback(()=>d(C.getInitialState()),[C,d]));return Gi.useDebugValue(h),h}const bh=C=>{const d=tf(C),h=E=>sf(d,E);return Object.assign(h,d),h},nf=(C=>C?bh(C):bh),Cr=["branch","agent","worktree","running"],pn=[{id:"codex",name:"Codex CLI",command:"codex",installCommand:"npm install -g @openai/codex",description:"OpenAI Codex CLI - AI-powered coding assistant"},{id:"claude",name:"Claude Code",command:"claude",installCommand:"npm install -g @anthropic-ai/claude-code",description:"Anthropic Claude Code - Advanced AI coding assistant"},{id:"gemini",name:"Gemini CLI",command:"gemini",installCommand:"npm install -g @google/gemini-cli",description:"Google Gemini CLI - Multi-modal AI assistant"}],ml=10,an=1,of=3,lf="hjWorktree CLI",af="2.3.0",xh={step:"branch",completedSteps:[],projectInfo:null,branches:[],selectedBranch:null,selectedAgent:"claude",worktreeCount:of,terminals:[],activeTerminalIndex:0,activeSessionId:null,selectedSessionIds:[],isSetupCollapsed:!1,collapsedBranches:[],modalType:null,modalData:null,isLoading:!1,loadingMessage:"",error:null},Ve=nf((C,d)=>({...xh,setStep:h=>C({step:h}),goToStep:h=>{const{canNavigateTo:E,step:M,isStepComplete:V,completedSteps:H}=d();if(!E(h))return;const l=[...H];V(M)&&!l.includes(M)&&l.push(M),C({step:h,completedSteps:l})},goToNext:()=>{const{step:h,isStepComplete:E,completedSteps:M}=d(),V=Cr.indexOf(h);if(V<Cr.length-1&&E(h)){const H=[...M];H.includes(h)||H.push(h),C({step:Cr[V+1],completedSteps:H})}},goToPrev:()=>{const{step:h}=d(),E=Cr.indexOf(h);E>0&&C({step:Cr[E-1]})},canNavigateTo:h=>{const{step:E,completedSteps:M,isStepComplete:V}=d(),H=Cr.indexOf(E),l=Cr.indexOf(h);if(l===H||l<H)return!0;for(let u=0;u<l;u++){const v=Cr[u];if(!M.includes(v)&&!V(v))return!1}return!0},isStepComplete:h=>{const{selectedBranch:E,selectedAgent:M,worktreeCount:V,terminals:H}=d();switch(h){case"branch":return E!==null;case"agent":return M!==null;case"worktree":return V>=an;case"running":return H.length>0;default:return!1}},getStepStatus:h=>{const{step:E,completedSteps:M,isStepComplete:V}=d();return h===E?"current":M.includes(h)||V(h)?"completed":"pending"},setProjectInfo:h=>C({projectInfo:h}),fetchProjectInfo:async()=>{try{const h=await fetch("/api/info");if(!h.ok)throw new Error("Failed to fetch project info");const E=await h.json();C({projectInfo:E})}catch(h){C({error:h instanceof Error?h.message:"Unknown error"})}},setBranches:h=>C({branches:h}),setSelectedBranch:h=>C({selectedBranch:h}),fetchBranches:async()=>{try{const h=await fetch("/api/branches");if(!h.ok)throw new Error("Failed to fetch branches");const E=await h.json();if(C({branches:E}),!d().selectedBranch&&E.length>0){const V=E.find(H=>H.isCurrent);C({selectedBranch:(V==null?void 0:V.name)||E[0].name})}}catch(h){C({error:h instanceof Error?h.message:"Unknown error"})}},setSelectedAgent:h=>C({selectedAgent:h}),setWorktreeCount:h=>C({worktreeCount:Math.max(an,Math.min(ml,h))}),incrementWorktreeCount:()=>{const{worktreeCount:h}=d();h<ml&&C({worktreeCount:h+1})},decrementWorktreeCount:()=>{const{worktreeCount:h}=d();h>an&&C({worktreeCount:h-1})},addTerminal:h=>C(E=>({terminals:[...E.terminals,h]})),updateTerminalStatus:(h,E)=>C(M=>({terminals:M.terminals.map(V=>V.sessionId===h?{...V,status:E}:V)})),removeTerminal:h=>C(E=>{const M=E.terminals.filter(H=>H.sessionId!==h),V=Math.min(E.activeTerminalIndex,Math.max(0,M.length-1));return{terminals:M,activeTerminalIndex:V,step:M.length===0?"branch":E.step,completedSteps:M.length===0?[]:E.completedSteps}}),setActiveTerminal:h=>C({activeTerminalIndex:h}),clearAllTerminals:()=>C({terminals:[],activeTerminalIndex:0,activeSessionId:null,selectedSessionIds:[]}),setActiveSession:h=>{const{terminals:E}=d(),M=E.findIndex(V=>V.sessionId===h);C({activeSessionId:h,activeTerminalIndex:M>=0?M:0})},toggleSessionSelection:h=>C(E=>{const M=[...E.selectedSessionIds],V=M.indexOf(h);return V>=0?M.splice(V,1):M.push(h),{selectedSessionIds:M}}),selectAllSessions:()=>C(h=>({selectedSessionIds:h.terminals.map(E=>E.sessionId)})),clearSessionSelection:()=>C({selectedSessionIds:[]}),removeSelectedSessions:async()=>{const{selectedSessionIds:h,terminals:E}=d();if(h.length===0)return;const M=E.filter(V=>h.includes(V.sessionId)).map(V=>V.worktreeName);try{(await fetch("/api/worktrees/batch",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:M})})).ok&&C(H=>{const l=H.terminals.filter(u=>!h.includes(u.sessionId));return{terminals:l,selectedSessionIds:[],activeTerminalIndex:Math.min(H.activeTerminalIndex,Math.max(0,l.length-1)),activeSessionId:l.length>0?l[0].sessionId:null}})}catch(V){console.error("Failed to remove sessions:",V)}},getSessionGroups:()=>{const{terminals:h,collapsedBranches:E}=d(),M=new Map;for(const H of h){const l=H.branchName.replace(/-project-\d+$/,"");M.has(l)||M.set(l,[]),M.get(l).push(H)}const V=[];for(const[H,l]of M)V.push({branchName:H,sessions:l.map(u=>({...u,id:u.sessionId,createdAt:Date.now()})),isCollapsed:E.includes(H)});return V.sort((H,l)=>H.branchName.localeCompare(l.branchName))},toggleSetupCollapse:()=>C(h=>({isSetupCollapsed:!h.isSetupCollapsed})),toggleBranchCollapse:h=>C(E=>{const M=[...E.collapsedBranches],V=M.indexOf(h);return V>=0?M.splice(V,1):M.push(h),{collapsedBranches:M}}),openModal:(h,E)=>C({modalType:h,modalData:E||null}),closeModal:()=>C({modalType:null,modalData:null}),createSingleWorktree:async(h,E)=>{const{setLoading:M,setError:V,addTerminal:H,setActiveSession:l}=d();M(!0,"Creating worktree..."),V(null);try{const u=await fetch("/api/worktrees/single",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h,agentType:E})});if(!u.ok){const f=await u.json();throw new Error(f.error||"Failed to create worktree")}const{worktree:v}=await u.json(),w=`${v.name}-${Date.now()}`;H({sessionId:w,worktreePath:v.path,worktreeName:v.name,branchName:v.branch,agentType:E,status:"initializing"}),l(w),C({step:"running",isSetupCollapsed:!0,modalType:null,modalData:null})}catch(u){V(u instanceof Error?u.message:"Unknown error")}finally{M(!1)}},execute:async()=>{const{selectedBranch:h,worktreeCount:E,selectedAgent:M,setLoading:V,setError:H,setStep:l,addTerminal:u}=d();if(!h){H("Please select a branch");return}V(!0,"Creating worktrees..."),H(null);try{const v=await fetch("/api/worktrees",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h,count:E,agentType:M})});if(!v.ok){const m=await v.json();throw new Error(m.error||"Failed to create worktrees")}const{worktrees:w}=await v.json();for(const m of w){const y=`${m.name}-${Date.now()}`;u({sessionId:y,worktreePath:m.path,worktreeName:m.name,branchName:m.branch,agentType:M,status:"initializing"})}const{terminals:f}=d();C({step:"running",completedSteps:["branch","agent","worktree"],isSetupCollapsed:!0,activeSessionId:f.length>0?f[0].sessionId:null})}catch(v){H(v instanceof Error?v.message:"Unknown error")}finally{V(!1)}},setLoading:(h,E="")=>C({isLoading:h,loadingMessage:E}),setError:h=>C({error:h}),reset:()=>C(xh)})),Ut=Object.create(null);Ut.open="0";Ut.close="1";Ut.ping="2";Ut.pong="3";Ut.message="4";Ut.upgrade="5";Ut.noop="6";const cn=Object.create(null);Object.keys(Ut).forEach(C=>{cn[Ut[C]]=C});const gl={type:"error",data:"parser error"},Mh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ih=typeof ArrayBuffer=="function",Nh=C=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(C):C&&C.buffer instanceof ArrayBuffer,bl=({type:C,data:d},h,E)=>Mh&&d instanceof Blob?h?E(d):Lh(d,E):Ih&&(d instanceof ArrayBuffer||Nh(d))?h?E(d):Lh(new Blob([d]),E):E(Ut[C]+(d||"")),Lh=(C,d)=>{const h=new FileReader;return h.onload=function(){const E=h.result.split(",")[1];d("b"+(E||""))},h.readAsDataURL(C)};function Rh(C){return C instanceof Uint8Array?C:C instanceof ArrayBuffer?new Uint8Array(C):new Uint8Array(C.buffer,C.byteOffset,C.byteLength)}let dl;function cf(C,d){if(Mh&&C.data instanceof Blob)return C.data.arrayBuffer().then(Rh).then(d);if(Ih&&(C.data instanceof ArrayBuffer||Nh(C.data)))return d(Rh(C.data));bl(C,!1,h=>{dl||(dl=new TextEncoder),d(dl.encode(h))})}const Dh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let C=0;C<Dh.length;C++)Xi[Dh.charCodeAt(C)]=C;const hf=C=>{let d=C.length*.75,h=C.length,E,M=0,V,H,l,u;C[C.length-1]==="="&&(d--,C[C.length-2]==="="&&d--);const v=new ArrayBuffer(d),w=new Uint8Array(v);for(E=0;E<h;E+=4)V=Xi[C.charCodeAt(E)],H=Xi[C.charCodeAt(E+1)],l=Xi[C.charCodeAt(E+2)],u=Xi[C.charCodeAt(E+3)],w[M++]=V<<2|H>>4,w[M++]=(H&15)<<4|l>>2,w[M++]=(l&3)<<6|u&63;return v},uf=typeof ArrayBuffer=="function",xl=(C,d)=>{if(typeof C!="string")return{type:"message",data:Hh(C,d)};const h=C.charAt(0);return h==="b"?{type:"message",data:df(C.substring(1),d)}:cn[h]?C.length>1?{type:cn[h],data:C.substring(1)}:{type:cn[h]}:gl},df=(C,d)=>{if(uf){const h=hf(C);return Hh(h,d)}else return{base64:!0,data:C}},Hh=(C,d)=>{switch(d){case"blob":return C instanceof Blob?C:new Blob([C]);case"arraybuffer":default:return C instanceof ArrayBuffer?C:C.buffer}},Fh="",ff=(C,d)=>{const h=C.length,E=new Array(h);let M=0;C.forEach((V,H)=>{bl(V,!1,l=>{E[H]=l,++M===h&&d(E.join(Fh))})})},pf=(C,d)=>{const h=C.split(Fh),E=[];for(let M=0;M<h.length;M++){const V=xl(h[M],d);if(E.push(V),V.type==="error")break}return E};function _f(){return new TransformStream({transform(C,d){cf(C,h=>{const E=h.length;let M;if(E<126)M=new Uint8Array(1),new DataView(M.buffer).setUint8(0,E);else if(E<65536){M=new Uint8Array(3);const V=new DataView(M.buffer);V.setUint8(0,126),V.setUint16(1,E)}else{M=new Uint8Array(9);const V=new DataView(M.buffer);V.setUint8(0,127),V.setBigUint64(1,BigInt(E))}C.data&&typeof C.data!="string"&&(M[0]|=128),d.enqueue(M),d.enqueue(h)})}})}let fl;function on(C){return C.reduce((d,h)=>d+h.length,0)}function ln(C,d){if(C[0].length===d)return C.shift();const h=new Uint8Array(d);let E=0;for(let M=0;M<d;M++)h[M]=C[0][E++],E===C[0].length&&(C.shift(),E=0);return C.length&&E<C[0].length&&(C[0]=C[0].slice(E)),h}function vf(C,d){fl||(fl=new TextDecoder);const h=[];let E=0,M=-1,V=!1;return new TransformStream({transform(H,l){for(h.push(H);;){if(E===0){if(on(h)<1)break;const u=ln(h,1);V=(u[0]&128)===128,M=u[0]&127,M<126?E=3:M===126?E=1:E=2}else if(E===1){if(on(h)<2)break;const u=ln(h,2);M=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),E=3}else if(E===2){if(on(h)<8)break;const u=ln(h,8),v=new DataView(u.buffer,u.byteOffset,u.length),w=v.getUint32(0);if(w>Math.pow(2,21)-1){l.enqueue(gl);break}M=w*Math.pow(2,32)+v.getUint32(4),E=3}else{if(on(h)<M)break;const u=ln(h,M);l.enqueue(xl(V?u:fl.decode(u),d)),E=0}if(M===0||M>C){l.enqueue(gl);break}}}})}const jh=4;function ze(C){if(C)return mf(C)}function mf(C){for(var d in ze.prototype)C[d]=ze.prototype[d];return C}ze.prototype.on=ze.prototype.addEventListener=function(C,d){return this._callbacks=this._callbacks||{},(this._callbacks["$"+C]=this._callbacks["$"+C]||[]).push(d),this};ze.prototype.once=function(C,d){function h(){this.off(C,h),d.apply(this,arguments)}return h.fn=d,this.on(C,h),this};ze.prototype.off=ze.prototype.removeListener=ze.prototype.removeAllListeners=ze.prototype.removeEventListener=function(C,d){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var h=this._callbacks["$"+C];if(!h)return this;if(arguments.length==1)return delete this._callbacks["$"+C],this;for(var E,M=0;M<h.length;M++)if(E=h[M],E===d||E.fn===d){h.splice(M,1);break}return h.length===0&&delete this._callbacks["$"+C],this};ze.prototype.emit=function(C){this._callbacks=this._callbacks||{};for(var d=new Array(arguments.length-1),h=this._callbacks["$"+C],E=1;E<arguments.length;E++)d[E-1]=arguments[E];if(h){h=h.slice(0);for(var E=0,M=h.length;E<M;++E)h[E].apply(this,d)}return this};ze.prototype.emitReserved=ze.prototype.emit;ze.prototype.listeners=function(C){return this._callbacks=this._callbacks||{},this._callbacks["$"+C]||[]};ze.prototype.hasListeners=function(C){return!!this.listeners(C).length};const _n=typeof Promise=="function"&&typeof Promise.resolve=="function"?d=>Promise.resolve().then(d):(d,h)=>h(d,0),bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),gf="arraybuffer";function zh(C,...d){return d.reduce((h,E)=>(C.hasOwnProperty(E)&&(h[E]=C[E]),h),{})}const Sf=bt.setTimeout,yf=bt.clearTimeout;function vn(C,d){d.useNativeTimers?(C.setTimeoutFn=Sf.bind(bt),C.clearTimeoutFn=yf.bind(bt)):(C.setTimeoutFn=bt.setTimeout.bind(bt),C.clearTimeoutFn=bt.clearTimeout.bind(bt))}const Cf=1.33;function wf(C){return typeof C=="string"?Ef(C):Math.ceil((C.byteLength||C.size)*Cf)}function Ef(C){let d=0,h=0;for(let E=0,M=C.length;E<M;E++)d=C.charCodeAt(E),d<128?h+=1:d<2048?h+=2:d<55296||d>=57344?h+=3:(E++,h+=4);return h}function Uh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function kf(C){let d="";for(let h in C)C.hasOwnProperty(h)&&(d.length&&(d+="&"),d+=encodeURIComponent(h)+"="+encodeURIComponent(C[h]));return d}function bf(C){let d={},h=C.split("&");for(let E=0,M=h.length;E<M;E++){let V=h[E].split("=");d[decodeURIComponent(V[0])]=decodeURIComponent(V[1])}return d}class xf extends Error{constructor(d,h,E){super(d),this.description=h,this.context=E,this.type="TransportError"}}class Ll extends ze{constructor(d){super(),this.writable=!1,vn(this,d),this.opts=d,this.query=d.query,this.socket=d.socket,this.supportsBinary=!d.forceBase64}onError(d,h,E){return super.emitReserved("error",new xf(d,h,E)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(d){this.readyState==="open"&&this.write(d)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(d){const h=xl(d,this.socket.binaryType);this.onPacket(h)}onPacket(d){super.emitReserved("packet",d)}onClose(d){this.readyState="closed",super.emitReserved("close",d)}pause(d){}createUri(d,h={}){return d+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const d=this.opts.hostname;return d.indexOf(":")===-1?d:"["+d+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(d){const h=kf(d);return h.length?"?"+h:""}}class Lf extends Ll{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(d){this.readyState="pausing";const h=()=>{this.readyState="paused",d()};if(this._polling||!this.writable){let E=0;this._polling&&(E++,this.once("pollComplete",function(){--E||h()})),this.writable||(E++,this.once("drain",function(){--E||h()}))}else h()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(d){const h=E=>{if(this.readyState==="opening"&&E.type==="open"&&this.onOpen(),E.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(E)};pf(d,this.socket.binaryType).forEach(h),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const d=()=>{this.write([{type:"close"}])};this.readyState==="open"?d():this.once("open",d)}write(d){this.writable=!1,ff(d,h=>{this.doWrite(h,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const d=this.opts.secure?"https":"http",h=this.query||{};return this.opts.timestampRequests!==!1&&(h[this.opts.timestampParam]=Uh()),!this.supportsBinary&&!h.sid&&(h.b64=1),this.createUri(d,h)}}let Wh=!1;try{Wh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Rf=Wh;function Df(){}class Tf extends Lf{constructor(d){if(super(d),typeof location<"u"){const h=location.protocol==="https:";let E=location.port;E||(E=h?"443":"80"),this.xd=typeof location<"u"&&d.hostname!==location.hostname||E!==d.port}}doWrite(d,h){const E=this.request({method:"POST",data:d});E.on("success",h),E.on("error",(M,V)=>{this.onError("xhr post error",M,V)})}doPoll(){const d=this.request();d.on("data",this.onData.bind(this)),d.on("error",(h,E)=>{this.onError("xhr poll error",h,E)}),this.pollXhr=d}}class zt extends ze{constructor(d,h,E){super(),this.createRequest=d,vn(this,E),this._opts=E,this._method=E.method||"GET",this._uri=h,this._data=E.data!==void 0?E.data:null,this._create()}_create(){var d;const h=zh(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");h.xdomain=!!this._opts.xd;const E=this._xhr=this.createRequest(h);try{E.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){E.setDisableHeaderCheck&&E.setDisableHeaderCheck(!0);for(let M in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(M)&&E.setRequestHeader(M,this._opts.extraHeaders[M])}}catch{}if(this._method==="POST")try{E.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{E.setRequestHeader("Accept","*/*")}catch{}(d=this._opts.cookieJar)===null||d===void 0||d.addCookies(E),"withCredentials"in E&&(E.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(E.timeout=this._opts.requestTimeout),E.onreadystatechange=()=>{var M;E.readyState===3&&((M=this._opts.cookieJar)===null||M===void 0||M.parseCookies(E.getResponseHeader("set-cookie"))),E.readyState===4&&(E.status===200||E.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof E.status=="number"?E.status:0)},0))},E.send(this._data)}catch(M){this.setTimeoutFn(()=>{this._onError(M)},0);return}typeof document<"u"&&(this._index=zt.requestsCount++,zt.requests[this._index]=this)}_onError(d){this.emitReserved("error",d,this._xhr),this._cleanup(!0)}_cleanup(d){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Df,d)try{this._xhr.abort()}catch{}typeof document<"u"&&delete zt.requests[this._index],this._xhr=null}}_onLoad(){const d=this._xhr.responseText;d!==null&&(this.emitReserved("data",d),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}zt.requestsCount=0;zt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Th);else if(typeof addEventListener=="function"){const C="onpagehide"in bt?"pagehide":"unload";addEventListener(C,Th,!1)}}function Th(){for(let C in zt.requests)zt.requests.hasOwnProperty(C)&&zt.requests[C].abort()}const Af=(function(){const C=$h({xdomain:!1});return C&&C.responseType!==null})();class Bf extends Tf{constructor(d){super(d);const h=d&&d.forceBase64;this.supportsBinary=Af&&!h}request(d={}){return Object.assign(d,{xd:this.xd},this.opts),new zt($h,this.uri(),d)}}function $h(C){const d=C.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!d||Rf))return new XMLHttpRequest}catch{}if(!d)try{return new bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Vh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Of extends Ll{get name(){return"websocket"}doOpen(){const d=this.uri(),h=this.opts.protocols,E=Vh?{}:zh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(E.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(d,h,E)}catch(M){return this.emitReserved("error",M)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=d=>this.onClose({description:"websocket connection closed",context:d}),this.ws.onmessage=d=>this.onData(d.data),this.ws.onerror=d=>this.onError("websocket error",d)}write(d){this.writable=!1;for(let h=0;h<d.length;h++){const E=d[h],M=h===d.length-1;bl(E,this.supportsBinary,V=>{try{this.doWrite(E,V)}catch{}M&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const d=this.opts.secure?"wss":"ws",h=this.query||{};return this.opts.timestampRequests&&(h[this.opts.timestampParam]=Uh()),this.supportsBinary||(h.b64=1),this.createUri(d,h)}}const pl=bt.WebSocket||bt.MozWebSocket;class Pf extends Of{createSocket(d,h,E){return Vh?new pl(d,h,E):h?new pl(d,h):new pl(d)}doWrite(d,h){this.ws.send(h)}}class Mf extends Ll{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(d){return this.emitReserved("error",d)}this._transport.closed.then(()=>{this.onClose()}).catch(d=>{this.onError("webtransport error",d)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(d=>{const h=vf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),E=d.readable.pipeThrough(h).getReader(),M=_f();M.readable.pipeTo(d.writable),this._writer=M.writable.getWriter();const V=()=>{E.read().then(({done:l,value:u})=>{l||(this.onPacket(u),V())}).catch(l=>{})};V();const H={type:"open"};this.query.sid&&(H.data=`{"sid":"${this.query.sid}"}`),this._writer.write(H).then(()=>this.onOpen())})})}write(d){this.writable=!1;for(let h=0;h<d.length;h++){const E=d[h],M=h===d.length-1;this._writer.write(E).then(()=>{M&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var d;(d=this._transport)===null||d===void 0||d.close()}}const If={websocket:Pf,webtransport:Mf,polling:Bf},Nf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Hf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sl(C){if(C.length>8e3)throw"URI too long";const d=C,h=C.indexOf("["),E=C.indexOf("]");h!=-1&&E!=-1&&(C=C.substring(0,h)+C.substring(h,E).replace(/:/g,";")+C.substring(E,C.length));let M=Nf.exec(C||""),V={},H=14;for(;H--;)V[Hf[H]]=M[H]||"";return h!=-1&&E!=-1&&(V.source=d,V.host=V.host.substring(1,V.host.length-1).replace(/;/g,":"),V.authority=V.authority.replace("[","").replace("]","").replace(/;/g,":"),V.ipv6uri=!0),V.pathNames=Ff(V,V.path),V.queryKey=jf(V,V.query),V}function Ff(C,d){const h=/\/{2,9}/g,E=d.replace(h,"/").split("/");return(d.slice(0,1)=="/"||d.length===0)&&E.splice(0,1),d.slice(-1)=="/"&&E.splice(E.length-1,1),E}function jf(C,d){const h={};return d.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(E,M,V){M&&(h[M]=V)}),h}const yl=typeof addEventListener=="function"&&typeof removeEventListener=="function",hn=[];yl&&addEventListener("offline",()=>{hn.forEach(C=>C())},!1);class wr extends ze{constructor(d,h){if(super(),this.binaryType=gf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,d&&typeof d=="object"&&(h=d,d=null),d){const E=Sl(d);h.hostname=E.host,h.secure=E.protocol==="https"||E.protocol==="wss",h.port=E.port,E.query&&(h.query=E.query)}else h.host&&(h.hostname=Sl(h.host).host);vn(this,h),this.secure=h.secure!=null?h.secure:typeof location<"u"&&location.protocol==="https:",h.hostname&&!h.port&&(h.port=this.secure?"443":"80"),this.hostname=h.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=h.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},h.transports.forEach(E=>{const M=E.prototype.name;this.transports.push(M),this._transportsByName[M]=E}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},h),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bf(this.opts.query)),yl&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},hn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(d){const h=Object.assign({},this.opts.query);h.EIO=jh,h.transport=d,this.id&&(h.sid=this.id);const E=Object.assign({},this.opts,{query:h,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return new this._transportsByName[d](E)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const d=this.opts.rememberUpgrade&&wr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const h=this.createTransport(d);h.open(),this.setTransport(h)}setTransport(d){this.transport&&this.transport.removeAllListeners(),this.transport=d,d.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",h=>this._onClose("transport close",h))}onOpen(){this.readyState="open",wr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",d),this.emitReserved("heartbeat"),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const h=new Error("server error");h.code=d.data,this._onError(h);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this._pingInterval=d.pingInterval,this._pingTimeout=d.pingTimeout,this._maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const d=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+d,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},d),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const d=this._getWritablePackets();this.transport.send(d),this._prevBufferLen=d.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let h=1;for(let E=0;E<this.writeBuffer.length;E++){const M=this.writeBuffer[E].data;if(M&&(h+=wf(M)),E>0&&h>this._maxPayload)return this.writeBuffer.slice(0,E);h+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const d=Date.now()>this._pingTimeoutTime;return d&&(this._pingTimeoutTime=0,_n(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),d}write(d,h,E){return this._sendPacket("message",d,h,E),this}send(d,h,E){return this._sendPacket("message",d,h,E),this}_sendPacket(d,h,E,M){if(typeof h=="function"&&(M=h,h=void 0),typeof E=="function"&&(M=E,E=null),this.readyState==="closing"||this.readyState==="closed")return;E=E||{},E.compress=E.compress!==!1;const V={type:d,data:h,options:E};this.emitReserved("packetCreate",V),this.writeBuffer.push(V),M&&this.once("flush",M),this.flush()}close(){const d=()=>{this._onClose("forced close"),this.transport.close()},h=()=>{this.off("upgrade",h),this.off("upgradeError",h),d()},E=()=>{this.once("upgrade",h),this.once("upgradeError",h)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?E():d()}):this.upgrading?E():d()),this}_onError(d){if(wr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",d),this._onClose("transport error",d)}_onClose(d,h){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),yl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const E=hn.indexOf(this._offlineEventListener);E!==-1&&hn.splice(E,1)}this.readyState="closed",this.id=null,this.emitReserved("close",d,h),this.writeBuffer=[],this._prevBufferLen=0}}}wr.protocol=jh;class zf extends wr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let d=0;d<this._upgrades.length;d++)this._probe(this._upgrades[d])}_probe(d){let h=this.createTransport(d),E=!1;wr.priorWebsocketSuccess=!1;const M=()=>{E||(h.send([{type:"ping",data:"probe"}]),h.once("packet",f=>{if(!E)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",h),!h)return;wr.priorWebsocketSuccess=h.name==="websocket",this.transport.pause(()=>{E||this.readyState!=="closed"&&(w(),this.setTransport(h),h.send([{type:"upgrade"}]),this.emitReserved("upgrade",h),h=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=h.name,this.emitReserved("upgradeError",m)}}))};function V(){E||(E=!0,w(),h.close(),h=null)}const H=f=>{const m=new Error("probe error: "+f);m.transport=h.name,V(),this.emitReserved("upgradeError",m)};function l(){H("transport closed")}function u(){H("socket closed")}function v(f){h&&f.name!==h.name&&V()}const w=()=>{h.removeListener("open",M),h.removeListener("error",H),h.removeListener("close",l),this.off("close",u),this.off("upgrading",v)};h.once("open",M),h.once("error",H),h.once("close",l),this.once("close",u),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{E||h.open()},200):h.open()}onHandshake(d){this._upgrades=this._filterUpgrades(d.upgrades),super.onHandshake(d)}_filterUpgrades(d){const h=[];for(let E=0;E<d.length;E++)~this.transports.indexOf(d[E])&&h.push(d[E]);return h}}let Uf=class extends zf{constructor(d,h={}){const E=typeof d=="object"?d:h;(!E.transports||E.transports&&typeof E.transports[0]=="string")&&(E.transports=(E.transports||["polling","websocket","webtransport"]).map(M=>If[M]).filter(M=>!!M)),super(d,E)}};function Wf(C,d="",h){let E=C;h=h||typeof location<"u"&&location,C==null&&(C=h.protocol+"//"+h.host),typeof C=="string"&&(C.charAt(0)==="/"&&(C.charAt(1)==="/"?C=h.protocol+C:C=h.host+C),/^(https?|wss?):\/\//.test(C)||(typeof h<"u"?C=h.protocol+"//"+C:C="https://"+C),E=Sl(C)),E.port||(/^(http|ws)$/.test(E.protocol)?E.port="80":/^(http|ws)s$/.test(E.protocol)&&(E.port="443")),E.path=E.path||"/";const V=E.host.indexOf(":")!==-1?"["+E.host+"]":E.host;return E.id=E.protocol+"://"+V+":"+E.port+d,E.href=E.protocol+"://"+V+(h&&h.port===E.port?"":":"+E.port),E}const $f=typeof ArrayBuffer=="function",Vf=C=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(C):C.buffer instanceof ArrayBuffer,Kh=Object.prototype.toString,Kf=typeof Blob=="function"||typeof Blob<"u"&&Kh.call(Blob)==="[object BlobConstructor]",qf=typeof File=="function"||typeof File<"u"&&Kh.call(File)==="[object FileConstructor]";function Rl(C){return $f&&(C instanceof ArrayBuffer||Vf(C))||Kf&&C instanceof Blob||qf&&C instanceof File}function un(C,d){if(!C||typeof C!="object")return!1;if(Array.isArray(C)){for(let h=0,E=C.length;h<E;h++)if(un(C[h]))return!0;return!1}if(Rl(C))return!0;if(C.toJSON&&typeof C.toJSON=="function"&&arguments.length===1)return un(C.toJSON(),!0);for(const h in C)if(Object.prototype.hasOwnProperty.call(C,h)&&un(C[h]))return!0;return!1}function Gf(C){const d=[],h=C.data,E=C;return E.data=Cl(h,d),E.attachments=d.length,{packet:E,buffers:d}}function Cl(C,d){if(!C)return C;if(Rl(C)){const h={_placeholder:!0,num:d.length};return d.push(C),h}else if(Array.isArray(C)){const h=new Array(C.length);for(let E=0;E<C.length;E++)h[E]=Cl(C[E],d);return h}else if(typeof C=="object"&&!(C instanceof Date)){const h={};for(const E in C)Object.prototype.hasOwnProperty.call(C,E)&&(h[E]=Cl(C[E],d));return h}return C}function Xf(C,d){return C.data=wl(C.data,d),delete C.attachments,C}function wl(C,d){if(!C)return C;if(C&&C._placeholder===!0){if(typeof C.num=="number"&&C.num>=0&&C.num<d.length)return d[C.num];throw new Error("illegal attachments")}else if(Array.isArray(C))for(let h=0;h<C.length;h++)C[h]=wl(C[h],d);else if(typeof C=="object")for(const h in C)Object.prototype.hasOwnProperty.call(C,h)&&(C[h]=wl(C[h],d));return C}const qh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Yf=5;var we;(function(C){C[C.CONNECT=0]="CONNECT",C[C.DISCONNECT=1]="DISCONNECT",C[C.EVENT=2]="EVENT",C[C.ACK=3]="ACK",C[C.CONNECT_ERROR=4]="CONNECT_ERROR",C[C.BINARY_EVENT=5]="BINARY_EVENT",C[C.BINARY_ACK=6]="BINARY_ACK"})(we||(we={}));class Qf{constructor(d){this.replacer=d}encode(d){return(d.type===we.EVENT||d.type===we.ACK)&&un(d)?this.encodeAsBinary({type:d.type===we.EVENT?we.BINARY_EVENT:we.BINARY_ACK,nsp:d.nsp,data:d.data,id:d.id}):[this.encodeAsString(d)]}encodeAsString(d){let h=""+d.type;return(d.type===we.BINARY_EVENT||d.type===we.BINARY_ACK)&&(h+=d.attachments+"-"),d.nsp&&d.nsp!=="/"&&(h+=d.nsp+","),d.id!=null&&(h+=d.id),d.data!=null&&(h+=JSON.stringify(d.data,this.replacer)),h}encodeAsBinary(d){const h=Gf(d),E=this.encodeAsString(h.packet),M=h.buffers;return M.unshift(E),M}}class Dl extends ze{constructor(d){super(),this.reviver=d}add(d){let h;if(typeof d=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(d);const E=h.type===we.BINARY_EVENT;E||h.type===we.BINARY_ACK?(h.type=E?we.EVENT:we.ACK,this.reconstructor=new Jf(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if(Rl(d)||d.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(d),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+d)}decodeString(d){let h=0;const E={type:Number(d.charAt(0))};if(we[E.type]===void 0)throw new Error("unknown packet type "+E.type);if(E.type===we.BINARY_EVENT||E.type===we.BINARY_ACK){const V=h+1;for(;d.charAt(++h)!=="-"&&h!=d.length;);const H=d.substring(V,h);if(H!=Number(H)||d.charAt(h)!=="-")throw new Error("Illegal attachments");E.attachments=Number(H)}if(d.charAt(h+1)==="/"){const V=h+1;for(;++h&&!(d.charAt(h)===","||h===d.length););E.nsp=d.substring(V,h)}else E.nsp="/";const M=d.charAt(h+1);if(M!==""&&Number(M)==M){const V=h+1;for(;++h;){const H=d.charAt(h);if(H==null||Number(H)!=H){--h;break}if(h===d.length)break}E.id=Number(d.substring(V,h+1))}if(d.charAt(++h)){const V=this.tryParse(d.substr(h));if(Dl.isPayloadValid(E.type,V))E.data=V;else throw new Error("invalid payload")}return E}tryParse(d){try{return JSON.parse(d,this.reviver)}catch{return!1}}static isPayloadValid(d,h){switch(d){case we.CONNECT:return fn(h);case we.DISCONNECT:return h===void 0;case we.CONNECT_ERROR:return typeof h=="string"||fn(h);case we.EVENT:case we.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&qh.indexOf(h[0])===-1);case we.ACK:case we.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Jf{constructor(d){this.packet=d,this.buffers=[],this.reconPack=d}takeBinaryData(d){if(this.buffers.push(d),this.buffers.length===this.reconPack.attachments){const h=Xf(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Zf(C){return typeof C=="string"}const ep=Number.isInteger||function(C){return typeof C=="number"&&isFinite(C)&&Math.floor(C)===C};function tp(C){return C===void 0||ep(C)}function fn(C){return Object.prototype.toString.call(C)==="[object Object]"}function rp(C,d){switch(C){case we.CONNECT:return d===void 0||fn(d);case we.DISCONNECT:return d===void 0;case we.EVENT:return Array.isArray(d)&&(typeof d[0]=="number"||typeof d[0]=="string"&&qh.indexOf(d[0])===-1);case we.ACK:return Array.isArray(d);case we.CONNECT_ERROR:return typeof d=="string"||fn(d);default:return!1}}function ip(C){return Zf(C.nsp)&&tp(C.id)&&rp(C.type,C.data)}const sp=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dl,Encoder:Qf,get PacketType(){return we},isPacketValid:ip,protocol:Yf},Symbol.toStringTag,{value:"Module"}));function Pt(C,d,h){return C.on(d,h),function(){C.off(d,h)}}const np=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Gh extends ze{constructor(d,h,E){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=d,this.nsp=h,E&&E.auth&&(this.auth=E.auth),this._opts=Object.assign({},E),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const d=this.io;this.subs=[Pt(d,"open",this.onopen.bind(this)),Pt(d,"packet",this.onpacket.bind(this)),Pt(d,"error",this.onerror.bind(this)),Pt(d,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...d){return d.unshift("message"),this.emit.apply(this,d),this}emit(d,...h){var E,M,V;if(np.hasOwnProperty(d))throw new Error('"'+d.toString()+'" is a reserved event name');if(h.unshift(d),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(h),this;const H={type:we.EVENT,data:h};if(H.options={},H.options.compress=this.flags.compress!==!1,typeof h[h.length-1]=="function"){const w=this.ids++,f=h.pop();this._registerAckCallback(w,f),H.id=w}const l=(M=(E=this.io.engine)===null||E===void 0?void 0:E.transport)===null||M===void 0?void 0:M.writable,u=this.connected&&!(!((V=this.io.engine)===null||V===void 0)&&V._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(H),this.packet(H)):this.sendBuffer.push(H)),this.flags={},this}_registerAckCallback(d,h){var E;const M=(E=this.flags.timeout)!==null&&E!==void 0?E:this._opts.ackTimeout;if(M===void 0){this.acks[d]=h;return}const V=this.io.setTimeoutFn(()=>{delete this.acks[d];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===d&&this.sendBuffer.splice(l,1);h.call(this,new Error("operation has timed out"))},M),H=(...l)=>{this.io.clearTimeoutFn(V),h.apply(this,l)};H.withError=!0,this.acks[d]=H}emitWithAck(d,...h){return new Promise((E,M)=>{const V=(H,l)=>H?M(H):E(l);V.withError=!0,h.push(V),this.emit(d,...h)})}_addToQueue(d){let h;typeof d[d.length-1]=="function"&&(h=d.pop());const E={id:this._queueSeq++,tryCount:0,pending:!1,args:d,flags:Object.assign({fromQueue:!0},this.flags)};d.push((M,...V)=>(this._queue[0],M!==null?E.tryCount>this._opts.retries&&(this._queue.shift(),h&&h(M)):(this._queue.shift(),h&&h(null,...V)),E.pending=!1,this._drainQueue())),this._queue.push(E),this._drainQueue()}_drainQueue(d=!1){if(!this.connected||this._queue.length===0)return;const h=this._queue[0];h.pending&&!d||(h.pending=!0,h.tryCount++,this.flags=h.flags,this.emit.apply(this,h.args))}packet(d){d.nsp=this.nsp,this.io._packet(d)}onopen(){typeof this.auth=="function"?this.auth(d=>{this._sendConnectPacket(d)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(d){this.packet({type:we.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},d):d})}onerror(d){this.connected||this.emitReserved("connect_error",d)}onclose(d,h){this.connected=!1,delete this.id,this.emitReserved("disconnect",d,h),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(d=>{if(!this.sendBuffer.some(E=>String(E.id)===d)){const E=this.acks[d];delete this.acks[d],E.withError&&E.call(this,new Error("socket has been disconnected"))}})}onpacket(d){if(d.nsp===this.nsp)switch(d.type){case we.CONNECT:d.data&&d.data.sid?this.onconnect(d.data.sid,d.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case we.EVENT:case we.BINARY_EVENT:this.onevent(d);break;case we.ACK:case we.BINARY_ACK:this.onack(d);break;case we.DISCONNECT:this.ondisconnect();break;case we.CONNECT_ERROR:this.destroy();const E=new Error(d.data.message);E.data=d.data.data,this.emitReserved("connect_error",E);break}}onevent(d){const h=d.data||[];d.id!=null&&h.push(this.ack(d.id)),this.connected?this.emitEvent(h):this.receiveBuffer.push(Object.freeze(h))}emitEvent(d){if(this._anyListeners&&this._anyListeners.length){const h=this._anyListeners.slice();for(const E of h)E.apply(this,d)}super.emit.apply(this,d),this._pid&&d.length&&typeof d[d.length-1]=="string"&&(this._lastOffset=d[d.length-1])}ack(d){const h=this;let E=!1;return function(...M){E||(E=!0,h.packet({type:we.ACK,id:d,data:M}))}}onack(d){const h=this.acks[d.id];typeof h=="function"&&(delete this.acks[d.id],h.withError&&d.data.unshift(null),h.apply(this,d.data))}onconnect(d,h){this.id=d,this.recovered=h&&this._pid===h,this._pid=h,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(d=>this.emitEvent(d)),this.receiveBuffer=[],this.sendBuffer.forEach(d=>{this.notifyOutgoingListeners(d),this.packet(d)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(d=>d()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:we.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(d){return this.flags.compress=d,this}get volatile(){return this.flags.volatile=!0,this}timeout(d){return this.flags.timeout=d,this}onAny(d){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(d),this}prependAny(d){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(d),this}offAny(d){if(!this._anyListeners)return this;if(d){const h=this._anyListeners;for(let E=0;E<h.length;E++)if(d===h[E])return h.splice(E,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(d){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(d),this}prependAnyOutgoing(d){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(d),this}offAnyOutgoing(d){if(!this._anyOutgoingListeners)return this;if(d){const h=this._anyOutgoingListeners;for(let E=0;E<h.length;E++)if(d===h[E])return h.splice(E,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(d){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const h=this._anyOutgoingListeners.slice();for(const E of h)E.apply(this,d.data)}}}function ci(C){C=C||{},this.ms=C.min||100,this.max=C.max||1e4,this.factor=C.factor||2,this.jitter=C.jitter>0&&C.jitter<=1?C.jitter:0,this.attempts=0}ci.prototype.duration=function(){var C=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var d=Math.random(),h=Math.floor(d*this.jitter*C);C=(Math.floor(d*10)&1)==0?C-h:C+h}return Math.min(C,this.max)|0};ci.prototype.reset=function(){this.attempts=0};ci.prototype.setMin=function(C){this.ms=C};ci.prototype.setMax=function(C){this.max=C};ci.prototype.setJitter=function(C){this.jitter=C};class El extends ze{constructor(d,h){var E;super(),this.nsps={},this.subs=[],d&&typeof d=="object"&&(h=d,d=void 0),h=h||{},h.path=h.path||"/socket.io",this.opts=h,vn(this,h),this.reconnection(h.reconnection!==!1),this.reconnectionAttempts(h.reconnectionAttempts||1/0),this.reconnectionDelay(h.reconnectionDelay||1e3),this.reconnectionDelayMax(h.reconnectionDelayMax||5e3),this.randomizationFactor((E=h.randomizationFactor)!==null&&E!==void 0?E:.5),this.backoff=new ci({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(h.timeout==null?2e4:h.timeout),this._readyState="closed",this.uri=d;const M=h.parser||sp;this.encoder=new M.Encoder,this.decoder=new M.Decoder,this._autoConnect=h.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(d){return arguments.length?(this._reconnection=!!d,d||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(d){return d===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=d,this)}reconnectionDelay(d){var h;return d===void 0?this._reconnectionDelay:(this._reconnectionDelay=d,(h=this.backoff)===null||h===void 0||h.setMin(d),this)}randomizationFactor(d){var h;return d===void 0?this._randomizationFactor:(this._randomizationFactor=d,(h=this.backoff)===null||h===void 0||h.setJitter(d),this)}reconnectionDelayMax(d){var h;return d===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=d,(h=this.backoff)===null||h===void 0||h.setMax(d),this)}timeout(d){return arguments.length?(this._timeout=d,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(d){if(~this._readyState.indexOf("open"))return this;this.engine=new Uf(this.uri,this.opts);const h=this.engine,E=this;this._readyState="opening",this.skipReconnect=!1;const M=Pt(h,"open",function(){E.onopen(),d&&d()}),V=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),d?d(l):this.maybeReconnectOnOpen()},H=Pt(h,"error",V);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{M(),V(new Error("timeout")),h.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(M),this.subs.push(H),this}connect(d){return this.open(d)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const d=this.engine;this.subs.push(Pt(d,"ping",this.onping.bind(this)),Pt(d,"data",this.ondata.bind(this)),Pt(d,"error",this.onerror.bind(this)),Pt(d,"close",this.onclose.bind(this)),Pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(d){try{this.decoder.add(d)}catch(h){this.onclose("parse error",h)}}ondecoded(d){_n(()=>{this.emitReserved("packet",d)},this.setTimeoutFn)}onerror(d){this.emitReserved("error",d)}socket(d,h){let E=this.nsps[d];return E?this._autoConnect&&!E.active&&E.connect():(E=new Gh(this,d,h),this.nsps[d]=E),E}_destroy(d){const h=Object.keys(this.nsps);for(const E of h)if(this.nsps[E].active)return;this._close()}_packet(d){const h=this.encoder.encode(d);for(let E=0;E<h.length;E++)this.engine.write(h[E],d.options)}cleanup(){this.subs.forEach(d=>d()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(d,h){var E;this.cleanup(),(E=this.engine)===null||E===void 0||E.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",d,h),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const d=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const h=this.backoff.duration();this._reconnecting=!0;const E=this.setTimeoutFn(()=>{d.skipReconnect||(this.emitReserved("reconnect_attempt",d.backoff.attempts),!d.skipReconnect&&d.open(M=>{M?(d._reconnecting=!1,d.reconnect(),this.emitReserved("reconnect_error",M)):d.onreconnect()}))},h);this.opts.autoUnref&&E.unref(),this.subs.push(()=>{this.clearTimeoutFn(E)})}}onreconnect(){const d=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",d)}}const qi={};function dn(C,d){typeof C=="object"&&(d=C,C=void 0),d=d||{};const h=Wf(C,d.path||"/socket.io"),E=h.source,M=h.id,V=h.path,H=qi[M]&&V in qi[M].nsps,l=d.forceNew||d["force new connection"]||d.multiplex===!1||H;let u;return l?u=new El(E,d):(qi[M]||(qi[M]=new El(E,d)),u=qi[M]),h.query&&!d.query&&(d.query=h.queryKey),u.socket(h.path,d)}Object.assign(dn,{Manager:El,Socket:Gh,io:dn,connect:dn});let kt=null;function mn(){const[C,d]=$e.useState(!1),h=$e.useRef(null);$e.useEffect(()=>{kt||(kt=dn(window.location.origin,{reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3})),h.current=kt;const H=()=>{console.log("Socket connected"),d(!0)},l=()=>{console.log("Socket disconnected"),d(!1)};return kt.on("connect",H),kt.on("disconnect",l),kt.connected&&d(!0),()=>{kt==null||kt.off("connect",H),kt==null||kt.off("disconnect",l)}},[]);const E=$e.useCallback((H,l)=>{var u;(u=h.current)==null||u.emit(H,l)},[]),M=$e.useCallback((H,l)=>{var u;(u=h.current)==null||u.on(H,l)},[]),V=$e.useCallback((H,l)=>{var u,v;l?(u=h.current)==null||u.off(H,l):(v=h.current)==null||v.off(H)},[]);return{socket:h.current,connected:C,emit:E,on:M,off:V}}function op(){const C=Ve(d=>d.projectInfo);return q.jsxs("header",{className:"header",children:[q.jsx("h1",{children:lf}),q.jsxs("div",{className:"project-info",children:[C&&q.jsxs(q.Fragment,{children:[q.jsxs("span",{className:"branch",children:[q.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:q.jsx("path",{d:"M11.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zm-2.25.75a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25zM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zM3.5 3.25a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0z"})}),C.currentBranch||"Unknown"]}),q.jsx("span",{children:C.cwd})]}),q.jsxs("span",{children:["v",af]})]})]})}const lp=[{id:"branch",number:1,label:"Branch"},{id:"agent",number:2,label:"Agent"},{id:"worktree",number:3,label:"Count"}];function ap({number:C,label:d,status:h,onClick:E,disabled:M}){return q.jsxs("button",{className:`lnb-step ${h}`,onClick:E,disabled:M,type:"button",children:[q.jsx("span",{className:"step-number",children:h==="completed"?"✓":C}),q.jsx("span",{className:"step-label",children:d})]})}function cp(){const{step:C,goToStep:d,canNavigateTo:h,getStepStatus:E,isSetupCollapsed:M,toggleSetupCollapse:V,terminals:H}=Ve(),l=H.length>0;return q.jsxs("div",{className:"lnb-section setup-section",children:[q.jsxs("div",{className:"lnb-section-header",onClick:V,role:"button",tabIndex:0,children:[q.jsx("span",{className:"section-title",children:"SETUP"}),q.jsx("span",{className:"collapse-icon",children:M?"+":"−"})]}),!M&&q.jsxs("div",{className:"lnb-steps",children:[lp.map(u=>q.jsx(ap,{step:u.id,number:u.number,label:u.label,status:E(u.id),onClick:()=>d(u.id),disabled:!h(u.id)},u.id)),l&&q.jsxs("button",{className:`lnb-step ${C==="running"?"current":"completed"}`,onClick:()=>d("running"),type:"button",children:[q.jsx("span",{className:"step-number",children:"4"}),q.jsx("span",{className:"step-label",children:"Running"})]})]})]})}function hp({status:C}){const d={initializing:"#f59e0b",installing:"#f59e0b",running:"#22c55e",stopped:"#6b7280",error:"#ef4444"};return q.jsx("span",{className:"status-indicator",style:{backgroundColor:d[C]},title:C})}function up({sessionId:C,worktreeName:d,agentType:h,status:E,isActive:M,isSelected:V,onSelect:H,onToggleSelect:l,onClose:u}){const v=pn.find(w=>w.id===h);return q.jsxs("div",{className:`session-item ${M?"active":""} ${V?"selected":""}`,onClick:H,role:"button",tabIndex:0,children:[q.jsx("input",{type:"checkbox",className:"session-checkbox",checked:V,onClick:l,onChange:()=>{}}),q.jsx(hp,{status:E}),q.jsx("span",{className:"session-name",title:d,children:d}),q.jsx("span",{className:"session-agent",title:v==null?void 0:v.name,children:h.charAt(0).toUpperCase()}),q.jsx("button",{className:"session-close",onClick:u,title:"Close session",type:"button",children:"×"})]})}function dp({branchName:C,sessionCount:d,isCollapsed:h,onToggleCollapse:E,children:M}){return q.jsxs("div",{className:"session-group",children:[q.jsxs("div",{className:"session-group-header",onClick:E,role:"button",tabIndex:0,children:[q.jsx("span",{className:"group-collapse-icon",children:h?"▶":"▼"}),q.jsx("span",{className:"group-name",children:C}),q.jsxs("span",{className:"group-count",children:["(",d,")"]})]}),!h&&q.jsx("div",{className:"session-group-items",children:M})]})}function fp(){const{terminals:C,activeSessionId:d,selectedSessionIds:h,getSessionGroups:E,setActiveSession:M,toggleSessionSelection:V,toggleBranchCollapse:H,removeTerminal:l,openModal:u}=Ve(),v=E(),w=async(f,m,y)=>{f.stopPropagation();try{(await fetch(`/api/worktrees/${encodeURIComponent(y)}`,{method:"DELETE"})).ok&&l(m)}catch(x){console.error("Failed to close session:",x)}};return C.length===0?null:q.jsxs("div",{className:"lnb-section sessions-section",children:[q.jsxs("div",{className:"lnb-section-header",children:[q.jsx("span",{className:"section-title",children:"SESSIONS"}),q.jsx("span",{className:"session-count",children:C.length})]}),q.jsx("div",{className:"session-list",children:v.map(f=>q.jsx(dp,{branchName:f.branchName,sessionCount:f.sessions.length,isCollapsed:f.isCollapsed,onToggleCollapse:()=>H(f.branchName),children:f.sessions.map(m=>q.jsx(up,{sessionId:m.sessionId,worktreeName:m.worktreeName,agentType:m.agentType,status:m.status,isActive:m.sessionId===d,isSelected:h.includes(m.sessionId),onSelect:()=>M(m.sessionId),onToggleSelect:y=>{y.stopPropagation(),V(m.sessionId)},onClose:y=>w(y,m.sessionId,m.worktreeName)},m.sessionId))},f.branchName))}),q.jsx("button",{className:"add-session-btn",onClick:()=>u("addWorktree"),type:"button",children:"+ Add Session"})]})}function pp(){const{selectedSessionIds:C,clearSessionSelection:d,openModal:h}=Ve();return C.length===0?null:q.jsxs("div",{className:"bulk-actions-bar",children:[q.jsxs("span",{className:"selected-count",children:[C.length," selected"]}),q.jsx("button",{className:"bulk-delete-btn",onClick:()=>h("confirmDelete",{sessionIds:C}),type:"button",children:"Delete"}),q.jsx("button",{className:"bulk-cancel-btn",onClick:d,type:"button",children:"Cancel"})]})}function _p(){return q.jsxs("nav",{className:"left-nav-bar",children:[q.jsx(cp,{}),q.jsx(fp,{}),q.jsx(pp,{})]})}function vp({children:C}){return q.jsxs("div",{className:"main-layout",children:[q.jsx(_p,{}),q.jsx("div",{className:"main-content-area with-lnb",children:C})]})}function Tl({children:C,title:d,description:h,showNavButtons:E=!0,nextLabel:M="Next",onNext:V,nextDisabled:H=!1}){const{step:l,goToNext:u,goToPrev:v,isStepComplete:w}=Ve(),f=l==="branch",m=w(l),y=()=>{V?V():u()};return q.jsxs("div",{className:"step-container",children:[q.jsxs("div",{className:"step-header",children:[q.jsx("h2",{children:d}),h&&q.jsx("p",{children:h})]}),q.jsx("div",{className:"step-content",children:C}),E&&q.jsxs("div",{className:"step-navigation",children:[q.jsx("button",{className:"nav-button prev",onClick:v,disabled:f,type:"button",children:"Previous"}),q.jsx("button",{className:"nav-button next",onClick:y,disabled:H||!m,type:"button",children:M})]})]})}function mp(){const{branches:C,selectedBranch:d,setSelectedBranch:h}=Ve();return q.jsxs("div",{className:"setup-section",children:[q.jsx("label",{htmlFor:"branch-select",children:"Select Branch"}),q.jsxs("select",{id:"branch-select",value:d||"",onChange:E=>h(E.target.value||null),children:[q.jsx("option",{value:"",children:"-- Select a branch --"}),C.map(E=>q.jsxs("option",{value:E.name,children:[E.name,E.isCurrent?" (current)":"",E.isRemote?" (remote)":""]},E.name))]})]})}function Ah(){const C=Ve(d=>d.selectedBranch);return q.jsx(Tl,{title:"Select Branch",description:"Choose the Git branch to create worktrees from",nextDisabled:!C,children:q.jsx(mp,{})})}function gp(){const{selectedAgent:C,setSelectedAgent:d}=Ve();return q.jsxs("div",{className:"setup-section",children:[q.jsx("label",{children:"Select AI Agent"}),q.jsx("div",{className:"agent-cards",children:pn.map(h=>q.jsxs("div",{className:`agent-card ${C===h.id?"selected":""}`,onClick:()=>d(h.id),children:[q.jsx("h4",{children:h.name}),q.jsx("p",{children:h.description})]},h.id))})]})}function Sp(){const C=Ve(d=>d.selectedAgent);return q.jsx(Tl,{title:"Select AI Agent",description:"Choose which AI coding agent to run in each worktree",nextDisabled:!C,children:q.jsx(gp,{})})}function yp(){const{worktreeCount:C,incrementWorktreeCount:d,decrementWorktreeCount:h}=Ve();return q.jsxs("div",{className:"setup-section",children:[q.jsx("label",{children:"Number of Worktrees"}),q.jsxs("div",{className:"counter",children:[q.jsx("button",{onClick:h,disabled:C<=an,children:"-"}),q.jsx("span",{children:C}),q.jsx("button",{onClick:d,disabled:C>=ml,children:"+"})]})]})}function Cp(){var H;const{execute:C,isLoading:d,selectedBranch:h,selectedAgent:E,worktreeCount:M}=Ve(),V=((H=pn.find(l=>l.id===E))==null?void 0:H.name)||E;return q.jsxs(Tl,{title:"Configure Worktrees",description:"Set the number of parallel worktrees to create",nextLabel:d?"Creating...":"Execute",onNext:C,nextDisabled:!h||d||M<1,children:[q.jsx(yp,{}),q.jsxs("div",{className:"execution-summary",children:[q.jsx("h4",{children:"Summary"}),q.jsxs("div",{className:"summary-item",children:[q.jsx("span",{className:"summary-label",children:"Branch:"}),q.jsx("span",{className:"summary-value",children:h})]}),q.jsxs("div",{className:"summary-item",children:[q.jsx("span",{className:"summary-label",children:"Agent:"}),q.jsx("span",{className:"summary-value",children:V})]}),q.jsxs("div",{className:"summary-item",children:[q.jsx("span",{className:"summary-label",children:"Worktrees:"}),q.jsx("span",{className:"summary-value",children:M})]})]})]})}var _l={exports:{}},Bh;function wp(){return Bh||(Bh=1,(function(C,d){(function(h,E){C.exports=E()})(globalThis,(()=>(()=>{var h={4567:function(H,l,u){var v=this&&this.__decorate||function(s,n,_,k){var b,L=arguments.length,S=L<3?n:k===null?k=Object.getOwnPropertyDescriptor(n,_):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(s,n,_,k);else for(var A=s.length-1;A>=0;A--)(b=s[A])&&(S=(L<3?b(S):L>3?b(n,_,S):b(n,_))||S);return L>3&&S&&Object.defineProperty(n,_,S),S},w=this&&this.__param||function(s,n){return function(_,k){n(_,k,s)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=u(9042),m=u(9924),y=u(844),x=u(4725),g=u(2585),o=u(3656);let a=l.AccessibilityManager=class extends y.Disposable{constructor(s,n,_,k){super(),this._terminal=s,this._coreBrowserService=_,this._renderService=k,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let b=0;b<this._terminal.rows;b++)this._rowElements[b]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[b]);if(this._topBoundaryFocusListener=b=>this._handleBoundaryFocus(b,0),this._bottomBoundaryFocusListener=b=>this._handleBoundaryFocus(b,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new m.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((b=>this._handleResize(b.rows)))),this.register(this._terminal.onRender((b=>this._refreshRows(b.start,b.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((b=>this._handleChar(b)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
41
41
  `)))),this.register(this._terminal.onA11yTab((b=>this._handleTab(b)))),this.register(this._terminal.onKey((b=>this._handleKey(b.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,o.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,y.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(s){for(let n=0;n<s;n++)this._handleChar(" ")}_handleChar(s){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==s&&(this._charsToAnnounce+=s):this._charsToAnnounce+=s,s===`
42
42
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(s){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(s)||this._charsToConsume.push(s)}_refreshRows(s,n){this._liveRegionDebouncer.refresh(s,n,this._terminal.rows)}_renderRows(s,n){const _=this._terminal.buffer,k=_.lines.length.toString();for(let b=s;b<=n;b++){const L=_.lines.get(_.ydisp+b),S=[],A=(L==null?void 0:L.translateToString(!0,void 0,void 0,S))||"",F=(_.ydisp+b+1).toString(),j=this._rowElements[b];j&&(A.length===0?(j.innerText=" ",this._rowColumns.set(j,[0,1])):(j.textContent=A,this._rowColumns.set(j,S)),j.setAttribute("aria-posinset",F),j.setAttribute("aria-setsize",k))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(s,n){const _=s.target,k=this._rowElements[n===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(n===0?"1":`${this._terminal.buffer.lines.length}`)||s.relatedTarget!==k)return;let b,L;if(n===0?(b=_,L=this._rowElements.pop(),this._rowContainer.removeChild(L)):(b=this._rowElements.shift(),L=_,this._rowContainer.removeChild(b)),b.removeEventListener("focus",this._topBoundaryFocusListener),L.removeEventListener("focus",this._bottomBoundaryFocusListener),n===0){const S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else{const S=this._createAccessibilityTreeNode();this._rowElements.push(S),this._rowContainer.appendChild(S)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(n===0?-1:1),this._rowElements[n===0?1:this._rowElements.length-2].focus(),s.preventDefault(),s.stopImmediatePropagation()}_handleSelectionChange(){var A;if(this._rowElements.length===0)return;const s=document.getSelection();if(!s)return;if(s.isCollapsed)return void(this._rowContainer.contains(s.anchorNode)&&this._terminal.clearSelection());if(!s.anchorNode||!s.focusNode)return void console.error("anchorNode and/or focusNode are null");let n={node:s.anchorNode,offset:s.anchorOffset},_={node:s.focusNode,offset:s.focusOffset};if((n.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||n.node===_.node&&n.offset>_.offset)&&([n,_]=[_,n]),n.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(n={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(n.node))return;const k=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(k)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:k,offset:((A=k.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(_.node))return;const b=({node:F,offset:j})=>{const W=F instanceof Text?F.parentNode:F;let I=parseInt(W==null?void 0:W.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const Q=this._rowColumns.get(W);if(!Q)return console.warn("columns is null. Race condition?"),null;let te=j<Q.length?Q[j]:Q.slice(-1)[0]+1;return te>=this._terminal.cols&&(++I,te=0),{row:I,column:te}},L=b(n),S=b(_);if(L&&S){if(L.row>S.row||L.row===S.row&&L.column>=S.column)throw new Error("invalid range");this._terminal.select(L.column,L.row,(S.row-L.row)*this._terminal.cols-L.column+S.column)}}_handleResize(s){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let n=this._rowContainer.children.length;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);for(;this._rowElements.length>s;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const s=this._coreBrowserService.mainDocument.createElement("div");return s.setAttribute("role","listitem"),s.tabIndex=-1,this._refreshRowDimensions(s),s}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let s=0;s<this._terminal.rows;s++)this._refreshRowDimensions(this._rowElements[s])}}_refreshRowDimensions(s){s.style.height=`${this._renderService.dimensions.css.cell.height}px`}};l.AccessibilityManager=a=v([w(1,g.IInstantiationService),w(2,x.ICoreBrowserService),w(3,x.IRenderService)],a)},3614:(H,l)=>{function u(m){return m.replace(/\r?\n/g,"\r")}function v(m,y){return y?"\x1B[200~"+m+"\x1B[201~":m}function w(m,y,x,g){m=v(m=u(m),x.decPrivateModes.bracketedPasteMode&&g.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(m,!0),y.value=""}function f(m,y,x){const g=x.getBoundingClientRect(),o=m.clientX-g.left-10,a=m.clientY-g.top-10;y.style.width="20px",y.style.height="20px",y.style.left=`${o}px`,y.style.top=`${a}px`,y.style.zIndex="1000",y.focus()}Object.defineProperty(l,"__esModule",{value:!0}),l.rightClickHandler=l.moveTextAreaUnderMouseCursor=l.paste=l.handlePasteEvent=l.copyHandler=l.bracketTextForPaste=l.prepareTextForTerminal=void 0,l.prepareTextForTerminal=u,l.bracketTextForPaste=v,l.copyHandler=function(m,y){m.clipboardData&&m.clipboardData.setData("text/plain",y.selectionText),m.preventDefault()},l.handlePasteEvent=function(m,y,x,g){m.stopPropagation(),m.clipboardData&&w(m.clipboardData.getData("text/plain"),y,x,g)},l.paste=w,l.moveTextAreaUnderMouseCursor=f,l.rightClickHandler=function(m,y,x,g,o){f(m,y,x),o&&g.rightClickSelect(m),y.value=g.selectionText,y.select()}},7239:(H,l,u)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorContrastCache=void 0;const v=u(1505);l.ColorContrastCache=class{constructor(){this._color=new v.TwoKeyMap,this._css=new v.TwoKeyMap}setCss(w,f,m){this._css.set(w,f,m)}getCss(w,f){return this._css.get(w,f)}setColor(w,f,m){this._color.set(w,f,m)}getColor(w,f){return this._color.get(w,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(H,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.addDisposableDomListener=void 0,l.addDisposableDomListener=function(u,v,w,f){u.addEventListener(v,w,f);let m=!1;return{dispose:()=>{m||(m=!0,u.removeEventListener(v,w,f))}}}},3551:function(H,l,u){var v=this&&this.__decorate||function(a,s,n,_){var k,b=arguments.length,L=b<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,n):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(a,s,n,_);else for(var S=a.length-1;S>=0;S--)(k=a[S])&&(L=(b<3?k(L):b>3?k(s,n,L):k(s,n))||L);return b>3&&L&&Object.defineProperty(s,n,L),L},w=this&&this.__param||function(a,s){return function(n,_){s(n,_,a)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Linkifier=void 0;const f=u(3656),m=u(8460),y=u(844),x=u(2585),g=u(4725);let o=l.Linkifier=class extends y.Disposable{get currentLink(){return this._currentLink}constructor(a,s,n,_,k){super(),this._element=a,this._mouseService=s,this._renderService=n,this._bufferService=_,this._linkProviderService=k,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,y.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,y.toDisposable)((()=>{var b;this._lastMouseEvent=void 0,(b=this._activeProviderReplies)==null||b.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(a){this._lastMouseEvent=a;const s=this._positionFromMouseEvent(a,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const n=a.composedPath();for(let _=0;_<n.length;_++){const k=n[_];if(k.classList.contains("xterm"))break;if(k.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(a){if(this._activeLine!==a.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(a,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,a)||(this._clearCurrentLink(),this._askForLink(a,!0))}_askForLink(a,s){var _,k;this._activeProviderReplies&&s||((_=this._activeProviderReplies)==null||_.forEach((b=>{b==null||b.forEach((L=>{L.link.dispose&&L.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=a.y);let n=!1;for(const[b,L]of this._linkProviderService.linkProviders.entries())s?(k=this._activeProviderReplies)!=null&&k.get(b)&&(n=this._checkLinkProviderResult(b,a,n)):L.provideLinks(a.y,(S=>{var F,j;if(this._isMouseOut)return;const A=S==null?void 0:S.map((W=>({link:W})));(F=this._activeProviderReplies)==null||F.set(b,A),n=this._checkLinkProviderResult(b,a,n),((j=this._activeProviderReplies)==null?void 0:j.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(a.y,this._activeProviderReplies)}))}_removeIntersectingLinks(a,s){const n=new Set;for(let _=0;_<s.size;_++){const k=s.get(_);if(k)for(let b=0;b<k.length;b++){const L=k[b],S=L.link.range.start.y<a?0:L.link.range.start.x,A=L.link.range.end.y>a?this._bufferService.cols:L.link.range.end.x;for(let F=S;F<=A;F++){if(n.has(F)){k.splice(b--,1);break}n.add(F)}}}}_checkLinkProviderResult(a,s,n){var b;if(!this._activeProviderReplies)return n;const _=this._activeProviderReplies.get(a);let k=!1;for(let L=0;L<a;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(k=!0);if(!k&&_){const L=_.find((S=>this._linkAtPosition(S.link,s)));L&&(n=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let L=0;L<this._activeProviderReplies.size;L++){const S=(b=this._activeProviderReplies.get(L))==null?void 0:b.find((A=>this._linkAtPosition(A.link,s)));if(S){n=!0,this._handleNewLink(S);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(a){if(!this._currentLink)return;const s=this._positionFromMouseEvent(a,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(a,this._currentLink.link.text)}_clearCurrentLink(a,s){this._currentLink&&this._lastMouseEvent&&(!a||!s||this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,y.disposeArray)(this._linkCacheDisposables))}_handleNewLink(a){if(!this._lastMouseEvent)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(a.link,s)&&(this._currentLink=a,this._currentLink.state={decorations:{underline:a.link.decorations===void 0||a.link.decorations.underline,pointerCursor:a.link.decorations===void 0||a.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,a.link,this._lastMouseEvent),a.link.decorations={},Object.defineProperties(a.link.decorations,{pointerCursor:{get:()=>{var n,_;return(_=(n=this._currentLink)==null?void 0:n.state)==null?void 0:_.decorations.pointerCursor},set:n=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",n))}},underline:{get:()=>{var n,_;return(_=(n=this._currentLink)==null?void 0:n.state)==null?void 0:_.decorations.underline},set:n=>{var _,k,b;(_=this._currentLink)!=null&&_.state&&((b=(k=this._currentLink)==null?void 0:k.state)==null?void 0:b.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(a.link,n))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((n=>{if(!this._currentLink)return;const _=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,k=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=k&&(this._clearCurrentLink(_,k),this._lastMouseEvent)){const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._askForLink(b,!1)}}))))}_linkHover(a,s,n){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&a.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(n,s.text)}_fireUnderlineEvent(a,s){const n=a.range,_=this._bufferService.buffer.ydisp,k=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-_-1,n.end.x,n.end.y-_-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(k)}_linkLeave(a,s,n){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&a.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(n,s.text)}_linkAtPosition(a,s){const n=a.range.start.y*this._bufferService.cols+a.range.start.x,_=a.range.end.y*this._bufferService.cols+a.range.end.x,k=s.y*this._bufferService.cols+s.x;return n<=k&&k<=_}_positionFromMouseEvent(a,s,n){const _=n.getCoords(a,s,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(a,s,n,_,k){return{x1:a,y1:s,x2:n,y2:_,cols:this._bufferService.cols,fg:k}}};l.Linkifier=o=v([w(1,g.IMouseService),w(2,g.IRenderService),w(3,x.IBufferService),w(4,g.ILinkProviderService)],o)},9042:(H,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.tooMuchOutput=l.promptLabel=void 0,l.promptLabel="Terminal input",l.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(H,l,u){var v=this&&this.__decorate||function(g,o,a,s){var n,_=arguments.length,k=_<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,a):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,o,a,s);else for(var b=g.length-1;b>=0;b--)(n=g[b])&&(k=(_<3?n(k):_>3?n(o,a,k):n(o,a))||k);return _>3&&k&&Object.defineProperty(o,a,k),k},w=this&&this.__param||function(g,o){return function(a,s){o(a,s,g)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkProvider=void 0;const f=u(511),m=u(2585);let y=l.OscLinkProvider=class{constructor(g,o,a){this._bufferService=g,this._optionsService=o,this._oscLinkService=a}provideLinks(g,o){var A;const a=this._bufferService.buffer.lines.get(g-1);if(!a)return void o(void 0);const s=[],n=this._optionsService.rawOptions.linkHandler,_=new f.CellData,k=a.getTrimmedLength();let b=-1,L=-1,S=!1;for(let F=0;F<k;F++)if(L!==-1||a.hasContent(F)){if(a.loadCell(F,_),_.hasExtendedAttrs()&&_.extended.urlId){if(L===-1){L=F,b=_.extended.urlId;continue}S=_.extended.urlId!==b}else L!==-1&&(S=!0);if(S||L!==-1&&F===k-1){const j=(A=this._oscLinkService.getLinkData(b))==null?void 0:A.uri;if(j){const W={start:{x:L+1,y:g},end:{x:F+(S||F!==k-1?0:1),y:g}};let I=!1;if(!(n!=null&&n.allowNonHttpProtocols))try{const Q=new URL(j);["http:","https:"].includes(Q.protocol)||(I=!0)}catch{I=!0}I||s.push({text:j,range:W,activate:(Q,te)=>n?n.activate(Q,te,W):x(0,te),hover:(Q,te)=>{var ne;return(ne=n==null?void 0:n.hover)==null?void 0:ne.call(n,Q,te,W)},leave:(Q,te)=>{var ne;return(ne=n==null?void 0:n.leave)==null?void 0:ne.call(n,Q,te,W)}})}S=!1,_.hasExtendedAttrs()&&_.extended.urlId?(L=F,b=_.extended.urlId):(L=-1,b=-1)}}o(s)}};function x(g,o){if(confirm(`Do you want to navigate to ${o}?
43
43
 
@@ -50,4 +50,4 @@ WARNING: This link could potentially be dangerous`)){const a=window.open();if(a)
50
50
  `))},s=_=>{const{sessionId:k,error:b}=_;k===C&&(m(C,"error"),y.write(`\r
51
51
  [Error: ${b}]\r
52
52
  `))};v("terminal:output",g),v("terminal:created",o),v("terminal:exit",a),v("terminal:error",s);const n=y.onData(_=>{u("terminal:input",{sessionId:C,data:_})});return u("terminal:create",{sessionId:C,worktreePath:d,agentType:h}),x&&u("terminal:resize",{sessionId:C,cols:y.cols,rows:y.rows}),()=>{w("terminal:output",g),w("terminal:created",o),w("terminal:exit",a),w("terminal:error",s),n.dispose()}},[C,d,h,f,u,v,w,m]),$e.useEffect(()=>{if(!M.current||!H.current)return;const y=H.current,x=V.current,g=()=>{E&&x&&y&&(y.fit(),u("terminal:resize",{sessionId:C,cols:x.cols,rows:x.rows}))},o=new ResizeObserver(()=>{g()});return o.observe(M.current),E&&setTimeout(g,0),()=>{o.disconnect()}},[C,E,u]),$e.useEffect(()=>{E&&V.current&&V.current.focus()},[E]),q.jsx("div",{ref:M,className:"terminal",style:{height:"100%",width:"100%"}})}function Lp(){const{terminals:C,activeTerminalIndex:d,activeSessionId:h,setActiveSession:E,removeTerminal:M,clearAllTerminals:V,openModal:H}=Ve(),{emit:l}=mn(),u=async(m,y)=>{y.stopPropagation(),l("terminal:kill",{sessionId:m});const x=C.find(g=>g.sessionId===m);if(x)try{await fetch(`/api/worktrees/${x.worktreeName}`,{method:"DELETE"})}catch(g){console.error("Failed to delete worktree:",g)}M(m)},v=()=>{const m=C.map(y=>y.sessionId);H("confirmDelete",{sessionIds:m})},w=h?C.findIndex(m=>m.sessionId===h):d,f=w>=0?w:0;return C.length===0?q.jsx("div",{className:"terminal-panel empty",children:q.jsxs("div",{className:"empty-message",children:[q.jsx("p",{children:"No active sessions"}),q.jsx("p",{children:'Use the Setup wizard or click "+ Add Session" in the sidebar'})]})}):q.jsxs("div",{className:"terminal-panel",children:[q.jsxs("div",{className:"terminal-tabs",children:[C.map((m,y)=>q.jsxs("button",{className:`terminal-tab ${m.sessionId===h||y===f?"active":""}`,onClick:()=>E(m.sessionId),children:[q.jsx("span",{className:`status ${m.status}`}),q.jsx("span",{children:m.worktreeName}),q.jsx("button",{className:"close-btn",onClick:x=>u(m.sessionId,x),title:"Close terminal",children:"×"})]},m.sessionId)),q.jsx("div",{className:"terminal-actions",children:q.jsx("button",{className:"danger",onClick:v,children:"Close All"})})]}),q.jsx("div",{className:"terminal-container",children:C.map((m,y)=>q.jsx("div",{className:`terminal-wrapper ${y!==f?"hidden":""}`,children:q.jsx(xp,{sessionId:m.sessionId,worktreePath:m.worktreePath,agentType:m.agentType,isActive:y===f})},m.sessionId))})]})}function Rp(){const{branches:C,closeModal:d,createSingleWorktree:h,isLoading:E}=Ve(),[M,V]=$e.useState(""),[H,l]=$e.useState("claude"),u=async()=>{M&&await h(M,H)};return q.jsx("div",{className:"modal-overlay",onClick:d,children:q.jsxs("div",{className:"modal-content",onClick:v=>v.stopPropagation(),children:[q.jsxs("div",{className:"modal-header",children:[q.jsx("h2",{children:"Add New Session"}),q.jsx("button",{className:"modal-close",onClick:d,type:"button",children:"×"})]}),q.jsxs("div",{className:"modal-body",children:[q.jsxs("div",{className:"form-group",children:[q.jsx("label",{htmlFor:"branch-select",children:"Branch"}),q.jsxs("select",{id:"branch-select",value:M,onChange:v=>V(v.target.value),disabled:E,children:[q.jsx("option",{value:"",children:"Select a branch..."}),C.map(v=>q.jsxs("option",{value:v.name,children:[v.name,v.isCurrent?" (current)":"",v.isRemote?" (remote)":""]},v.name))]})]}),q.jsxs("div",{className:"form-group",children:[q.jsx("label",{children:"Agent"}),q.jsx("div",{className:"agent-options",children:pn.map(v=>q.jsx("button",{type:"button",className:`agent-option ${H===v.id?"selected":""}`,onClick:()=>l(v.id),disabled:E,children:q.jsx("span",{className:"agent-name",children:v.name})},v.id))})]})]}),q.jsxs("div",{className:"modal-footer",children:[q.jsx("button",{type:"button",className:"btn-secondary",onClick:d,disabled:E,children:"Cancel"}),q.jsx("button",{type:"button",className:"btn-primary",onClick:u,disabled:!M||E,children:E?"Creating...":"Create Session"})]})]})})}function Dp(){const{modalData:C,terminals:d,closeModal:h,removeTerminal:E,clearAllTerminals:M,clearSessionSelection:V}=Ve(),{emit:H}=mn(),[l,u]=$e.useState(!1),v=(C==null?void 0:C.sessionIds)||[],w=d.filter(y=>v.includes(y.sessionId)),f=v.length===d.length,m=async()=>{u(!0);try{for(const y of v)H("terminal:kill",{sessionId:y});if(f)await fetch("/api/worktrees",{method:"DELETE"}),M();else{const y=w.map(x=>x.worktreeName);await fetch("/api/worktrees/batch",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:y})});for(const x of v)E(x)}V(),h()}catch(y){console.error("Failed to delete sessions:",y)}finally{u(!1)}};return q.jsx("div",{className:"modal-overlay",onClick:h,children:q.jsxs("div",{className:"modal-content modal-confirm",onClick:y=>y.stopPropagation(),children:[q.jsxs("div",{className:"modal-header",children:[q.jsx("h2",{children:"Confirm Delete"}),q.jsx("button",{className:"modal-close",onClick:h,type:"button",children:"×"})]}),q.jsxs("div",{className:"modal-body",children:[q.jsx("p",{className:"confirm-message",children:f?"Are you sure you want to delete ALL sessions?":`Are you sure you want to delete ${v.length} session${v.length>1?"s":""}?`}),w.length>0&&q.jsx("ul",{className:"delete-list",children:w.map(y=>q.jsxs("li",{children:[q.jsx("span",{className:`status ${y.status}`}),y.worktreeName]},y.sessionId))}),q.jsx("p",{className:"warning-text",children:"This action will terminate running agents and delete the worktrees. This cannot be undone."})]}),q.jsxs("div",{className:"modal-footer",children:[q.jsx("button",{type:"button",className:"btn-secondary",onClick:h,disabled:l,children:"Cancel"}),q.jsx("button",{type:"button",className:"btn-danger",onClick:m,disabled:l,children:l?"Deleting...":"Delete"})]})]})})}function Tp(){const C=Ve(d=>d.modalType);if(!C)return null;switch(C){case"addWorktree":return q.jsx(Rp,{});case"confirmDelete":return q.jsx(Dp,{});default:return null}}function Ap(){const{step:C,isLoading:d,loadingMessage:h,error:E}=Ve(),{connected:M}=mn();$e.useEffect(()=>{Ve.getState().fetchProjectInfo(),Ve.getState().fetchBranches()},[]);const V=()=>{switch(C){case"branch":return q.jsx(Ah,{});case"agent":return q.jsx(Sp,{});case"worktree":return q.jsx(Cp,{});case"running":return q.jsx(Lp,{});default:return q.jsx(Ah,{})}};return q.jsxs("div",{className:"app",children:[q.jsx(op,{}),q.jsx(vp,{children:V()}),d&&q.jsxs("div",{className:"loading-overlay",children:[q.jsx("div",{className:"loading-spinner"}),q.jsx("p",{children:h||"Loading..."})]}),E&&q.jsx("div",{className:"error-banner",children:E}),q.jsxs("div",{className:"connection-status",children:[q.jsx("span",{className:`dot ${M?"connected":"disconnected"}`}),M?"Connected":"Disconnected"]}),q.jsx(Tp,{})]})}ef.createRoot(document.getElementById("root")).render(q.jsx(Gi.StrictMode,{children:q.jsx(Ap,{})}));
53
- //# sourceMappingURL=index-D8dr9mJa.js.map
53
+ //# sourceMappingURL=index-De6xm4hO.js.map