pi-web-ui 0.8.8 → 0.8.9
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
|
`+g[x].replace(" at new "," at ");return i.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",i.displayName)),B}while(1<=x&&0<=A);break}}}finally{R=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?H(i):""}function Ne(i){switch(i.tag){case 5:return H(i.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return i=ge(i.type,!1),i;case 11:return i=ge(i.type.render,!1),i;case 1:return i=ge(i.type,!0),i;default:return""}}function ve(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case re:return"Fragment";case L:return"Portal";case F:return"Profiler";case Z:return"StrictMode";case j:return"Suspense";case W:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case X:return(i.displayName||"Context")+".Consumer";case O:return(i._context.displayName||"Context")+".Provider";case K:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case P:return s=i.displayName||null,s!==null?s:ve(i.type)||"Memo";case Y:s=i._payload,i=i._init;try{return ve(i(s))}catch{}}return null}function Ue(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ve(s);case 8:return s===Z?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ie(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function je(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function nt(i){var s=je(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var g=c.get,v=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){f=""+x,v.call(this,x)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(x){f=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Ft(i){i._valueTracker||(i._valueTracker=nt(i))}function nn(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),f="";return i&&(f=je(i)?i.checked?"true":"false":i.value),i=f,i!==c?(s.setValue(i),!0):!1}function He(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Dn(i,s){var c=s.checked;return C({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c??i._wrapperState.initialChecked})}function Pi(i,s){var c=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;c=Ie(s.value!=null?s.value:c),i._wrapperState={initialChecked:f,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Qe(i,s){s=s.checked,s!=null&&N(i,"checked",s,!1)}function Pn(i,s){Qe(i,s);var c=Ie(s.value),f=s.type;if(c!=null)f==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?vi(i,s.type,c):s.hasOwnProperty("defaultValue")&&vi(i,s.type,Ie(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Kn(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function vi(i,s,c){(s!=="number"||He(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var oi=Array.isArray;function yi(i,s,c,f){if(i=i.options,s){s={};for(var g=0;g<c.length;g++)s["$"+c[g]]=!0;for(c=0;c<i.length;c++)g=s.hasOwnProperty("$"+i[c].value),i[c].selected!==g&&(i[c].selected=g),g&&f&&(i[c].defaultSelected=!0)}else{for(c=""+Ie(c),s=null,g=0;g<i.length;g++){if(i[g].value===c){i[g].selected=!0,f&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function Rr(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return C({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Ar(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(oi(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Ie(c)}}function qn(i,s){var c=Ie(s.value),f=Ie(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),f!=null&&(i.defaultValue=""+f)}function Mr(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function J(i){switch(i){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 he(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?J(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Oe,$e=(function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,c,f,g){MSApp.execUnsafeLocalFunction(function(){return i(s,c,f,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Oe=Oe||document.createElement("div"),Oe.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Oe.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Xe(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var zt={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},ai=["Webkit","ms","Moz","O"];Object.keys(zt).forEach(function(i){ai.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),zt[s]=zt[i]})});function En(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||zt.hasOwnProperty(i)&&zt[i]?(""+s).trim():s+"px"}function li(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var f=c.indexOf("--")===0,g=En(c,s[c],f);c==="float"&&(c="cssFloat"),f?i.setProperty(c,g):i[c]=g}}var Bi=C({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 Ut(i,s){if(s){if(Bi[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Vn(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rn=null;function ds(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var fs=null,er=null,Fi=null;function zi(i){if(i=yo(i)){if(typeof fs!="function")throw Error(n(280));var s=i.stateNode;s&&(s=ja(s),fs(i.stateNode,i.type,s))}}function I(i){er?Fi?Fi.push(i):Fi=[i]:er=i}function ee(){if(er){var i=er,s=Fi;if(Fi=er=null,zi(i),s)for(i=0;i<s.length;i++)zi(s[i])}}function pe(i,s){return i(s)}function De(){}var dt=!1;function gt(i,s,c){if(dt)return i(s,c);dt=!0;try{return pe(i,s,c)}finally{dt=!1,(er!==null||Fi!==null)&&(De(),ee())}}function be(i,s){var c=i.stateNode;if(c===null)return null;var f=ja(c);if(f===null)return null;c=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var ye=!1;if(u)try{var Te={};Object.defineProperty(Te,"passive",{get:function(){ye=!0}}),window.addEventListener("test",Te,Te),window.removeEventListener("test",Te,Te)}catch{ye=!1}function Lt(i,s,c,f,g,v,x,A,B){var G=Array.prototype.slice.call(arguments,3);try{s.apply(c,G)}catch(oe){this.onError(oe)}}var ut=!1,bi=null,tr=!1,Or=null,wc={onError:function(i){ut=!0,bi=i}};function Qs(i,s,c,f,g,v,x,A,B){ut=!1,bi=null,Lt.apply(wc,arguments)}function xc(i,s,c,f,g,v,x,A,B){if(Qs.apply(this,arguments),ut){if(ut){var G=bi;ut=!1,bi=null}else throw Error(n(198));tr||(tr=!0,Or=G)}}function Ui(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function ya(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function Js(i){if(Ui(i)!==i)throw Error(n(188))}function ps(i){var s=i.alternate;if(!s){if(s=Ui(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,f=s;;){var g=c.return;if(g===null)break;var v=g.alternate;if(v===null){if(f=g.return,f!==null){c=f;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===c)return Js(g),i;if(v===f)return Js(g),s;v=v.sibling}throw Error(n(188))}if(c.return!==f.return)c=g,f=v;else{for(var x=!1,A=g.child;A;){if(A===c){x=!0,c=g,f=v;break}if(A===f){x=!0,f=g,c=v;break}A=A.sibling}if(!x){for(A=v.child;A;){if(A===c){x=!0,c=v,f=g;break}if(A===f){x=!0,f=v,c=g;break}A=A.sibling}if(!x)throw Error(n(189))}}if(c.alternate!==f)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function ba(i){return i=ps(i),i!==null?Sa(i):null}function Sa(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Sa(i);if(s!==null)return s;i=i.sibling}return null}var wa=t.unstable_scheduleCallback,ci=t.unstable_cancelCallback,xa=t.unstable_shouldYield,ka=t.unstable_requestPaint,yt=t.unstable_now,kc=t.unstable_getCurrentPriorityLevel,eo=t.unstable_ImmediatePriority,Lr=t.unstable_UserBlockingPriority,ms=t.unstable_NormalPriority,ce=t.unstable_LowPriority,Ce=t.unstable_IdlePriority,We=null,Ge=null;function Rt(i){if(Ge&&typeof Ge.onCommitFiberRoot=="function")try{Ge.onCommitFiberRoot(We,i,void 0,(i.current.flags&128)===128)}catch{}}var bt=Math.clz32?Math.clz32:gn,Si=Math.log,gs=Math.LN2;function gn(i){return i>>>=0,i===0?32:31-(Si(i)/gs|0)|0}var _n=64,Ir=4194304;function nr(i){switch(i&-i){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 i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Dr(i,s){var c=i.pendingLanes;if(c===0)return 0;var f=0,g=i.suspendedLanes,v=i.pingedLanes,x=c&268435455;if(x!==0){var A=x&~g;A!==0?f=nr(A):(v&=x,v!==0&&(f=nr(v)))}else x=c&~g,x!==0?f=nr(x):v!==0&&(f=nr(v));if(f===0)return 0;if(s!==0&&s!==f&&(s&g)===0&&(g=f&-f,v=s&-s,g>=v||g===16&&(v&4194240)!==0))return s;if((f&4)!==0&&(f|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)c=31-bt(s),g=1<<c,f|=i[c],s&=~g;return f}function Ec(i,s){switch(i){case 1:case 2:case 4:return s+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 s+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 Cc(i,s){for(var c=i.suspendedLanes,f=i.pingedLanes,g=i.expirationTimes,v=i.pendingLanes;0<v;){var x=31-bt(v),A=1<<x,B=g[x];B===-1?((A&c)===0||(A&f)!==0)&&(g[x]=Ec(A,s)):B<=s&&(i.expiredLanes|=A),v&=~A}}function to(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Ea(){var i=_n;return _n<<=1,(_n&4194240)===0&&(_n=64),i}function ir(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function rr(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-bt(s),i[s]=c}function Gn(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<c;){var g=31-bt(c),v=1<<g;s[g]=0,f[g]=-1,i[g]=-1,c&=~v}}function no(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var f=31-bt(c),g=1<<f;g&s|i[f]&s&&(i[f]|=s),c&=~g}}var et=0;function Fe(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var io,At,rt,Pr,wi,Br=!1,sr=[],fe=null,Se=null,Le=null,Ze=new Map,Et=new Map,Vt=[],Nc="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 Ca(i,s){switch(i){case"focusin":case"focusout":fe=null;break;case"dragenter":case"dragleave":Se=null;break;case"mouseover":case"mouseout":Le=null;break;case"pointerover":case"pointerout":Ze.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Et.delete(s.pointerId)}}function ro(i,s,c,f,g,v){return i===null||i.nativeEvent!==v?(i={blockedOn:s,domEventName:c,eventSystemFlags:f,nativeEvent:v,targetContainers:[g]},s!==null&&(s=yo(s),s!==null&&At(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function Hb(i,s,c,f,g){switch(s){case"focusin":return fe=ro(fe,i,s,c,f,g),!0;case"dragenter":return Se=ro(Se,i,s,c,f,g),!0;case"mouseover":return Le=ro(Le,i,s,c,f,g),!0;case"pointerover":var v=g.pointerId;return Ze.set(v,ro(Ze.get(v)||null,i,s,c,f,g)),!0;case"gotpointercapture":return v=g.pointerId,Et.set(v,ro(Et.get(v)||null,i,s,c,f,g)),!0}return!1}function Ef(i){var s=Fr(i.target);if(s!==null){var c=Ui(s);if(c!==null){if(s=c.tag,s===13){if(s=ya(c),s!==null){i.blockedOn=s,wi(i.priority,function(){rt(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Na(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=Rc(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);rn=f,c.target.dispatchEvent(f),rn=null}else return s=yo(c),s!==null&&At(s),i.blockedOn=c,!1;s.shift()}return!0}function Cf(i,s,c){Na(i)&&c.delete(s)}function $b(){Br=!1,fe!==null&&Na(fe)&&(fe=null),Se!==null&&Na(Se)&&(Se=null),Le!==null&&Na(Le)&&(Le=null),Ze.forEach(Cf),Et.forEach(Cf)}function so(i,s){i.blockedOn===s&&(i.blockedOn=null,Br||(Br=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,$b)))}function oo(i){function s(g){return so(g,i)}if(0<sr.length){so(sr[0],i);for(var c=1;c<sr.length;c++){var f=sr[c];f.blockedOn===i&&(f.blockedOn=null)}}for(fe!==null&&so(fe,i),Se!==null&&so(Se,i),Le!==null&&so(Le,i),Ze.forEach(s),Et.forEach(s),c=0;c<Vt.length;c++)f=Vt[c],f.blockedOn===i&&(f.blockedOn=null);for(;0<Vt.length&&(c=Vt[0],c.blockedOn===null);)Ef(c),c.blockedOn===null&&Vt.shift()}var _s=M.ReactCurrentBatchConfig,Ta=!0;function Wb(i,s,c,f){var g=et,v=_s.transition;_s.transition=null;try{et=1,Tc(i,s,c,f)}finally{et=g,_s.transition=v}}function Kb(i,s,c,f){var g=et,v=_s.transition;_s.transition=null;try{et=4,Tc(i,s,c,f)}finally{et=g,_s.transition=v}}function Tc(i,s,c,f){if(Ta){var g=Rc(i,s,c,f);if(g===null)qc(i,s,f,Ra,c),Ca(i,f);else if(Hb(g,i,s,c,f))f.stopPropagation();else if(Ca(i,f),s&4&&-1<Nc.indexOf(i)){for(;g!==null;){var v=yo(g);if(v!==null&&io(v),v=Rc(i,s,c,f),v===null&&qc(i,s,f,Ra,c),v===g)break;g=v}g!==null&&f.stopPropagation()}else qc(i,s,f,null,c)}}var Ra=null;function Rc(i,s,c,f){if(Ra=null,i=ds(f),i=Fr(i),i!==null)if(s=Ui(i),s===null)i=null;else if(c=s.tag,c===13){if(i=ya(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Ra=i,null}function Nf(i){switch(i){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(kc()){case eo:return 1;case Lr:return 4;case ms:case ce:return 16;case Ce:return 536870912;default:return 16}default:return 16}}var or=null,Ac=null,Aa=null;function Tf(){if(Aa)return Aa;var i,s=Ac,c=s.length,f,g="value"in or?or.value:or.textContent,v=g.length;for(i=0;i<c&&s[i]===g[i];i++);var x=c-i;for(f=1;f<=x&&s[c-f]===g[v-f];f++);return Aa=g.slice(i,1<f?1-f:void 0)}function Ma(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Oa(){return!0}function Rf(){return!1}function Bn(i){function s(c,f,g,v,x){this._reactName=c,this._targetInst=g,this.type=f,this.nativeEvent=v,this.target=x,this.currentTarget=null;for(var A in i)i.hasOwnProperty(A)&&(c=i[A],this[A]=c?c(v):v[A]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Oa:Rf,this.isPropagationStopped=Rf,this}return C(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Oa)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Oa)},persist:function(){},isPersistent:Oa}),s}var vs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mc=Bn(vs),ao=C({},vs,{view:0,detail:0}),qb=Bn(ao),Oc,Lc,lo,La=C({},ao,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dc,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==lo&&(lo&&i.type==="mousemove"?(Oc=i.screenX-lo.screenX,Lc=i.screenY-lo.screenY):Lc=Oc=0,lo=i),Oc)},movementY:function(i){return"movementY"in i?i.movementY:Lc}}),Af=Bn(La),Vb=C({},La,{dataTransfer:0}),Gb=Bn(Vb),Yb=C({},ao,{relatedTarget:0}),Ic=Bn(Yb),Xb=C({},vs,{animationName:0,elapsedTime:0,pseudoElement:0}),Zb=Bn(Xb),Qb=C({},vs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Jb=Bn(Qb),eS=C({},vs,{data:0}),Mf=Bn(eS),tS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nS={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"},iS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rS(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=iS[i])?!!s[i]:!1}function Dc(){return rS}var sS=C({},ao,{key:function(i){if(i.key){var s=tS[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Ma(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?nS[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dc,charCode:function(i){return i.type==="keypress"?Ma(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ma(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),oS=Bn(sS),aS=C({},La,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Of=Bn(aS),lS=C({},ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dc}),cS=Bn(lS),uS=C({},vs,{propertyName:0,elapsedTime:0,pseudoElement:0}),hS=Bn(uS),dS=C({},La,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),fS=Bn(dS),pS=[9,13,27,32],Pc=u&&"CompositionEvent"in window,co=null;u&&"documentMode"in document&&(co=document.documentMode);var mS=u&&"TextEvent"in window&&!co,Lf=u&&(!Pc||co&&8<co&&11>=co),If=" ",Df=!1;function Pf(i,s){switch(i){case"keyup":return pS.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bf(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ys=!1;function gS(i,s){switch(i){case"compositionend":return Bf(s);case"keypress":return s.which!==32?null:(Df=!0,If);case"textInput":return i=s.data,i===If&&Df?null:i;default:return null}}function _S(i,s){if(ys)return i==="compositionend"||!Pc&&Pf(i,s)?(i=Tf(),Aa=Ac=or=null,ys=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Lf&&s.locale!=="ko"?null:s.data;default:return null}}var vS={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 Ff(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!vS[i.type]:s==="textarea"}function zf(i,s,c,f){I(f),s=Fa(s,"onChange"),0<s.length&&(c=new Mc("onChange","change",null,c,f),i.push({event:c,listeners:s}))}var uo=null,ho=null;function yS(i){ip(i,0)}function Ia(i){var s=ks(i);if(nn(s))return i}function bS(i,s){if(i==="change")return s}var Uf=!1;if(u){var Bc;if(u){var Fc="oninput"in document;if(!Fc){var jf=document.createElement("div");jf.setAttribute("oninput","return;"),Fc=typeof jf.oninput=="function"}Bc=Fc}else Bc=!1;Uf=Bc&&(!document.documentMode||9<document.documentMode)}function Hf(){uo&&(uo.detachEvent("onpropertychange",$f),ho=uo=null)}function $f(i){if(i.propertyName==="value"&&Ia(ho)){var s=[];zf(s,ho,i,ds(i)),gt(yS,s)}}function SS(i,s,c){i==="focusin"?(Hf(),uo=s,ho=c,uo.attachEvent("onpropertychange",$f)):i==="focusout"&&Hf()}function wS(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ia(ho)}function xS(i,s){if(i==="click")return Ia(s)}function kS(i,s){if(i==="input"||i==="change")return Ia(s)}function ES(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var ui=typeof Object.is=="function"?Object.is:ES;function fo(i,s){if(ui(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),f=Object.keys(s);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var g=c[f];if(!d.call(s,g)||!ui(i[g],s[g]))return!1}return!0}function Wf(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Kf(i,s){var c=Wf(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=s&&f>=s)return{node:c,offset:s-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Wf(c)}}function qf(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?qf(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function Vf(){for(var i=window,s=He();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)i=s.contentWindow;else break;s=He(i.document)}return s}function zc(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function CS(i){var s=Vf(),c=i.focusedElem,f=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&qf(c.ownerDocument.documentElement,c)){if(f!==null&&zc(c)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=c.textContent.length,v=Math.min(f.start,g);f=f.end===void 0?v:Math.min(f.end,g),!i.extend&&v>f&&(g=f,f=v,v=g),g=Kf(c,v);var x=Kf(c,f);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),v>f?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var NS=u&&"documentMode"in document&&11>=document.documentMode,bs=null,Uc=null,po=null,jc=!1;function Gf(i,s,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;jc||bs==null||bs!==He(f)||(f=bs,"selectionStart"in f&&zc(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),po&&fo(po,f)||(po=f,f=Fa(Uc,"onSelect"),0<f.length&&(s=new Mc("onSelect","select",null,s,c),i.push({event:s,listeners:f}),s.target=bs)))}function Da(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Ss={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionend:Da("Transition","TransitionEnd")},Hc={},Yf={};u&&(Yf=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function Pa(i){if(Hc[i])return Hc[i];if(!Ss[i])return i;var s=Ss[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in Yf)return Hc[i]=s[c];return i}var Xf=Pa("animationend"),Zf=Pa("animationiteration"),Qf=Pa("animationstart"),Jf=Pa("transitionend"),ep=new Map,tp="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 ar(i,s){ep.set(i,s),a(s,[i])}for(var $c=0;$c<tp.length;$c++){var Wc=tp[$c],TS=Wc.toLowerCase(),RS=Wc[0].toUpperCase()+Wc.slice(1);ar(TS,"on"+RS)}ar(Xf,"onAnimationEnd"),ar(Zf,"onAnimationIteration"),ar(Qf,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(Jf,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var mo="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(" "),AS=new Set("cancel close invalid load scroll toggle".split(" ").concat(mo));function np(i,s,c){var f=i.type||"unknown-event";i.currentTarget=c,xc(f,s,void 0,i),i.currentTarget=null}function ip(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],g=f.event;f=f.listeners;e:{var v=void 0;if(s)for(var x=f.length-1;0<=x;x--){var A=f[x],B=A.instance,G=A.currentTarget;if(A=A.listener,B!==v&&g.isPropagationStopped())break e;np(g,A,G),v=B}else for(x=0;x<f.length;x++){if(A=f[x],B=A.instance,G=A.currentTarget,A=A.listener,B!==v&&g.isPropagationStopped())break e;np(g,A,G),v=B}}}if(tr)throw i=Or,tr=!1,Or=null,i}function ft(i,s){var c=s[Qc];c===void 0&&(c=s[Qc]=new Set);var f=i+"__bubble";c.has(f)||(rp(s,i,2,!1),c.add(f))}function Kc(i,s,c){var f=0;s&&(f|=4),rp(c,i,f,s)}var Ba="_reactListening"+Math.random().toString(36).slice(2);function go(i){if(!i[Ba]){i[Ba]=!0,r.forEach(function(c){c!=="selectionchange"&&(AS.has(c)||Kc(c,!1,i),Kc(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Ba]||(s[Ba]=!0,Kc("selectionchange",!1,s))}}function rp(i,s,c,f){switch(Nf(s)){case 1:var g=Wb;break;case 4:g=Kb;break;default:g=Tc}c=g.bind(null,s,c,i),g=void 0,!ye||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),f?g!==void 0?i.addEventListener(s,c,{capture:!0,passive:g}):i.addEventListener(s,c,!0):g!==void 0?i.addEventListener(s,c,{passive:g}):i.addEventListener(s,c,!1)}function qc(i,s,c,f,g){var v=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var x=f.tag;if(x===3||x===4){var A=f.stateNode.containerInfo;if(A===g||A.nodeType===8&&A.parentNode===g)break;if(x===4)for(x=f.return;x!==null;){var B=x.tag;if((B===3||B===4)&&(B=x.stateNode.containerInfo,B===g||B.nodeType===8&&B.parentNode===g))return;x=x.return}for(;A!==null;){if(x=Fr(A),x===null)return;if(B=x.tag,B===5||B===6){f=v=x;continue e}A=A.parentNode}}f=f.return}gt(function(){var G=v,oe=ds(c),ae=[];e:{var se=ep.get(i);if(se!==void 0){var _e=Mc,xe=i;switch(i){case"keypress":if(Ma(c)===0)break e;case"keydown":case"keyup":_e=oS;break;case"focusin":xe="focus",_e=Ic;break;case"focusout":xe="blur",_e=Ic;break;case"beforeblur":case"afterblur":_e=Ic;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_e=Af;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_e=Gb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_e=cS;break;case Xf:case Zf:case Qf:_e=Zb;break;case Jf:_e=hS;break;case"scroll":_e=qb;break;case"wheel":_e=fS;break;case"copy":case"cut":case"paste":_e=Jb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_e=Of}var ke=(s&4)!==0,Mt=!ke&&i==="scroll",$=ke?se!==null?se+"Capture":null:se;ke=[];for(var U=G,V;U!==null;){V=U;var ue=V.stateNode;if(V.tag===5&&ue!==null&&(V=ue,$!==null&&(ue=be(U,$),ue!=null&&ke.push(_o(U,ue,V)))),Mt)break;U=U.return}0<ke.length&&(se=new _e(se,xe,null,c,oe),ae.push({event:se,listeners:ke}))}}if((s&7)===0){e:{if(se=i==="mouseover"||i==="pointerover",_e=i==="mouseout"||i==="pointerout",se&&c!==rn&&(xe=c.relatedTarget||c.fromElement)&&(Fr(xe)||xe[ji]))break e;if((_e||se)&&(se=oe.window===oe?oe:(se=oe.ownerDocument)?se.defaultView||se.parentWindow:window,_e?(xe=c.relatedTarget||c.toElement,_e=G,xe=xe?Fr(xe):null,xe!==null&&(Mt=Ui(xe),xe!==Mt||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(_e=null,xe=G),_e!==xe)){if(ke=Af,ue="onMouseLeave",$="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(ke=Of,ue="onPointerLeave",$="onPointerEnter",U="pointer"),Mt=_e==null?se:ks(_e),V=xe==null?se:ks(xe),se=new ke(ue,U+"leave",_e,c,oe),se.target=Mt,se.relatedTarget=V,ue=null,Fr(oe)===G&&(ke=new ke($,U+"enter",xe,c,oe),ke.target=V,ke.relatedTarget=Mt,ue=ke),Mt=ue,_e&&xe)t:{for(ke=_e,$=xe,U=0,V=ke;V;V=ws(V))U++;for(V=0,ue=$;ue;ue=ws(ue))V++;for(;0<U-V;)ke=ws(ke),U--;for(;0<V-U;)$=ws($),V--;for(;U--;){if(ke===$||$!==null&&ke===$.alternate)break t;ke=ws(ke),$=ws($)}ke=null}else ke=null;_e!==null&&sp(ae,se,_e,ke,!1),xe!==null&&Mt!==null&&sp(ae,Mt,xe,ke,!0)}}e:{if(se=G?ks(G):window,_e=se.nodeName&&se.nodeName.toLowerCase(),_e==="select"||_e==="input"&&se.type==="file")var Ee=bS;else if(Ff(se))if(Uf)Ee=kS;else{Ee=wS;var Re=SS}else(_e=se.nodeName)&&_e.toLowerCase()==="input"&&(se.type==="checkbox"||se.type==="radio")&&(Ee=xS);if(Ee&&(Ee=Ee(i,G))){zf(ae,Ee,c,oe);break e}Re&&Re(i,se,G),i==="focusout"&&(Re=se._wrapperState)&&Re.controlled&&se.type==="number"&&vi(se,"number",se.value)}switch(Re=G?ks(G):window,i){case"focusin":(Ff(Re)||Re.contentEditable==="true")&&(bs=Re,Uc=G,po=null);break;case"focusout":po=Uc=bs=null;break;case"mousedown":jc=!0;break;case"contextmenu":case"mouseup":case"dragend":jc=!1,Gf(ae,c,oe);break;case"selectionchange":if(NS)break;case"keydown":case"keyup":Gf(ae,c,oe)}var Ae;if(Pc)e:{switch(i){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else ys?Pf(i,c)&&(Pe="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Pe="onCompositionStart");Pe&&(Lf&&c.locale!=="ko"&&(ys||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&ys&&(Ae=Tf()):(or=oe,Ac="value"in or?or.value:or.textContent,ys=!0)),Re=Fa(G,Pe),0<Re.length&&(Pe=new Mf(Pe,i,null,c,oe),ae.push({event:Pe,listeners:Re}),Ae?Pe.data=Ae:(Ae=Bf(c),Ae!==null&&(Pe.data=Ae)))),(Ae=mS?gS(i,c):_S(i,c))&&(G=Fa(G,"onBeforeInput"),0<G.length&&(oe=new Mf("onBeforeInput","beforeinput",null,c,oe),ae.push({event:oe,listeners:G}),oe.data=Ae))}ip(ae,s)})}function _o(i,s,c){return{instance:i,listener:s,currentTarget:c}}function Fa(i,s){for(var c=s+"Capture",f=[];i!==null;){var g=i,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=be(i,c),v!=null&&f.unshift(_o(i,v,g)),v=be(i,s),v!=null&&f.push(_o(i,v,g))),i=i.return}return f}function ws(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function sp(i,s,c,f,g){for(var v=s._reactName,x=[];c!==null&&c!==f;){var A=c,B=A.alternate,G=A.stateNode;if(B!==null&&B===f)break;A.tag===5&&G!==null&&(A=G,g?(B=be(c,v),B!=null&&x.unshift(_o(c,B,A))):g||(B=be(c,v),B!=null&&x.push(_o(c,B,A)))),c=c.return}x.length!==0&&i.push({event:s,listeners:x})}var MS=/\r\n?/g,OS=/\u0000|\uFFFD/g;function op(i){return(typeof i=="string"?i:""+i).replace(MS,`
|
|
38
38
|
`).replace(OS,"")}function za(i,s,c){if(s=op(s),op(i)!==s&&c)throw Error(n(425))}function Ua(){}var Vc=null,Gc=null;function Yc(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Xc=typeof setTimeout=="function"?setTimeout:void 0,LS=typeof clearTimeout=="function"?clearTimeout:void 0,ap=typeof Promise=="function"?Promise:void 0,IS=typeof queueMicrotask=="function"?queueMicrotask:typeof ap<"u"?function(i){return ap.resolve(null).then(i).catch(DS)}:Xc;function DS(i){setTimeout(function(){throw i})}function Zc(i,s){var c=s,f=0;do{var g=c.nextSibling;if(i.removeChild(c),g&&g.nodeType===8)if(c=g.data,c==="/$"){if(f===0){i.removeChild(g),oo(s);return}f--}else c!=="$"&&c!=="$?"&&c!=="$!"||f++;c=g}while(c);oo(s)}function lr(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function lp(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var xs=Math.random().toString(36).slice(2),xi="__reactFiber$"+xs,vo="__reactProps$"+xs,ji="__reactContainer$"+xs,Qc="__reactEvents$"+xs,PS="__reactListeners$"+xs,BS="__reactHandles$"+xs;function Fr(i){var s=i[xi];if(s)return s;for(var c=i.parentNode;c;){if(s=c[ji]||c[xi]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=lp(i);i!==null;){if(c=i[xi])return c;i=lp(i)}return s}i=c,c=i.parentNode}return null}function yo(i){return i=i[xi]||i[ji],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ks(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function ja(i){return i[vo]||null}var Jc=[],Es=-1;function cr(i){return{current:i}}function pt(i){0>Es||(i.current=Jc[Es],Jc[Es]=null,Es--)}function ht(i,s){Es++,Jc[Es]=i.current,i.current=s}var ur={},cn=cr(ur),Cn=cr(!1),zr=ur;function Cs(i,s){var c=i.type.contextTypes;if(!c)return ur;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var g={},v;for(v in c)g[v]=s[v];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function Nn(i){return i=i.childContextTypes,i!=null}function Ha(){pt(Cn),pt(cn)}function cp(i,s,c){if(cn.current!==ur)throw Error(n(168));ht(cn,s),ht(Cn,c)}function up(i,s,c){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return c;f=f.getChildContext();for(var g in f)if(!(g in s))throw Error(n(108,Ue(i)||"Unknown",g));return C({},c,f)}function $a(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ur,zr=cn.current,ht(cn,i),ht(Cn,Cn.current),!0}function hp(i,s,c){var f=i.stateNode;if(!f)throw Error(n(169));c?(i=up(i,s,zr),f.__reactInternalMemoizedMergedChildContext=i,pt(Cn),pt(cn),ht(cn,i)):pt(Cn),ht(Cn,c)}var Hi=null,Wa=!1,eu=!1;function dp(i){Hi===null?Hi=[i]:Hi.push(i)}function FS(i){Wa=!0,dp(i)}function hr(){if(!eu&&Hi!==null){eu=!0;var i=0,s=et;try{var c=Hi;for(et=1;i<c.length;i++){var f=c[i];do f=f(!0);while(f!==null)}Hi=null,Wa=!1}catch(g){throw Hi!==null&&(Hi=Hi.slice(i+1)),wa(eo,hr),g}finally{et=s,eu=!1}}return null}var Ns=[],Ts=0,Ka=null,qa=0,Yn=[],Xn=0,Ur=null,$i=1,Wi="";function jr(i,s){Ns[Ts++]=qa,Ns[Ts++]=Ka,Ka=i,qa=s}function fp(i,s,c){Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=Ur,Ur=i;var f=$i;i=Wi;var g=32-bt(f)-1;f&=~(1<<g),c+=1;var v=32-bt(s)+g;if(30<v){var x=g-g%5;v=(f&(1<<x)-1).toString(32),f>>=x,g-=x,$i=1<<32-bt(s)+g|c<<g|f,Wi=v+i}else $i=1<<v|c<<g|f,Wi=i}function tu(i){i.return!==null&&(jr(i,1),fp(i,1,0))}function nu(i){for(;i===Ka;)Ka=Ns[--Ts],Ns[Ts]=null,qa=Ns[--Ts],Ns[Ts]=null;for(;i===Ur;)Ur=Yn[--Xn],Yn[Xn]=null,Wi=Yn[--Xn],Yn[Xn]=null,$i=Yn[--Xn],Yn[Xn]=null}var Fn=null,zn=null,_t=!1,hi=null;function pp(i,s){var c=ei(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function mp(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Fn=i,zn=lr(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Fn=i,zn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Ur!==null?{id:$i,overflow:Wi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=ei(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,Fn=i,zn=null,!0):!1;default:return!1}}function iu(i){return(i.mode&1)!==0&&(i.flags&128)===0}function ru(i){if(_t){var s=zn;if(s){var c=s;if(!mp(i,s)){if(iu(i))throw Error(n(418));s=lr(c.nextSibling);var f=Fn;s&&mp(i,s)?pp(f,c):(i.flags=i.flags&-4097|2,_t=!1,Fn=i)}}else{if(iu(i))throw Error(n(418));i.flags=i.flags&-4097|2,_t=!1,Fn=i}}}function gp(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Fn=i}function Va(i){if(i!==Fn)return!1;if(!_t)return gp(i),_t=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Yc(i.type,i.memoizedProps)),s&&(s=zn)){if(iu(i))throw _p(),Error(n(418));for(;s;)pp(i,s),s=lr(s.nextSibling)}if(gp(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){zn=lr(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}zn=null}}else zn=Fn?lr(i.stateNode.nextSibling):null;return!0}function _p(){for(var i=zn;i;)i=lr(i.nextSibling)}function Rs(){zn=Fn=null,_t=!1}function su(i){hi===null?hi=[i]:hi.push(i)}var zS=M.ReactCurrentBatchConfig;function bo(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var f=c.stateNode}if(!f)throw Error(n(147,i));var g=f,v=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===v?s.ref:(s=function(x){var A=g.refs;x===null?delete A[v]:A[v]=x},s._stringRef=v,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Ga(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function vp(i){var s=i._init;return s(i._payload)}function yp(i){function s($,U){if(i){var V=$.deletions;V===null?($.deletions=[U],$.flags|=16):V.push(U)}}function c($,U){if(!i)return null;for(;U!==null;)s($,U),U=U.sibling;return null}function f($,U){for($=new Map;U!==null;)U.key!==null?$.set(U.key,U):$.set(U.index,U),U=U.sibling;return $}function g($,U){return $=yr($,U),$.index=0,$.sibling=null,$}function v($,U,V){return $.index=V,i?(V=$.alternate,V!==null?(V=V.index,V<U?($.flags|=2,U):V):($.flags|=2,U)):($.flags|=1048576,U)}function x($){return i&&$.alternate===null&&($.flags|=2),$}function A($,U,V,ue){return U===null||U.tag!==6?(U=Xu(V,$.mode,ue),U.return=$,U):(U=g(U,V),U.return=$,U)}function B($,U,V,ue){var Ee=V.type;return Ee===re?oe($,U,V.props.children,ue,V.key):U!==null&&(U.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Y&&vp(Ee)===U.type)?(ue=g(U,V.props),ue.ref=bo($,U,V),ue.return=$,ue):(ue=vl(V.type,V.key,V.props,null,$.mode,ue),ue.ref=bo($,U,V),ue.return=$,ue)}function G($,U,V,ue){return U===null||U.tag!==4||U.stateNode.containerInfo!==V.containerInfo||U.stateNode.implementation!==V.implementation?(U=Zu(V,$.mode,ue),U.return=$,U):(U=g(U,V.children||[]),U.return=$,U)}function oe($,U,V,ue,Ee){return U===null||U.tag!==7?(U=Yr(V,$.mode,ue,Ee),U.return=$,U):(U=g(U,V),U.return=$,U)}function ae($,U,V){if(typeof U=="string"&&U!==""||typeof U=="number")return U=Xu(""+U,$.mode,V),U.return=$,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case q:return V=vl(U.type,U.key,U.props,null,$.mode,V),V.ref=bo($,null,U),V.return=$,V;case L:return U=Zu(U,$.mode,V),U.return=$,U;case Y:var ue=U._init;return ae($,ue(U._payload),V)}if(oi(U)||ie(U))return U=Yr(U,$.mode,V,null),U.return=$,U;Ga($,U)}return null}function se($,U,V,ue){var Ee=U!==null?U.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ee!==null?null:A($,U,""+V,ue);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case q:return V.key===Ee?B($,U,V,ue):null;case L:return V.key===Ee?G($,U,V,ue):null;case Y:return Ee=V._init,se($,U,Ee(V._payload),ue)}if(oi(V)||ie(V))return Ee!==null?null:oe($,U,V,ue,null);Ga($,V)}return null}function _e($,U,V,ue,Ee){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return $=$.get(V)||null,A(U,$,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case q:return $=$.get(ue.key===null?V:ue.key)||null,B(U,$,ue,Ee);case L:return $=$.get(ue.key===null?V:ue.key)||null,G(U,$,ue,Ee);case Y:var Re=ue._init;return _e($,U,V,Re(ue._payload),Ee)}if(oi(ue)||ie(ue))return $=$.get(V)||null,oe(U,$,ue,Ee,null);Ga(U,ue)}return null}function xe($,U,V,ue){for(var Ee=null,Re=null,Ae=U,Pe=U=0,Xt=null;Ae!==null&&Pe<V.length;Pe++){Ae.index>Pe?(Xt=Ae,Ae=null):Xt=Ae.sibling;var it=se($,Ae,V[Pe],ue);if(it===null){Ae===null&&(Ae=Xt);break}i&&Ae&&it.alternate===null&&s($,Ae),U=v(it,U,Pe),Re===null?Ee=it:Re.sibling=it,Re=it,Ae=Xt}if(Pe===V.length)return c($,Ae),_t&&jr($,Pe),Ee;if(Ae===null){for(;Pe<V.length;Pe++)Ae=ae($,V[Pe],ue),Ae!==null&&(U=v(Ae,U,Pe),Re===null?Ee=Ae:Re.sibling=Ae,Re=Ae);return _t&&jr($,Pe),Ee}for(Ae=f($,Ae);Pe<V.length;Pe++)Xt=_e(Ae,$,Pe,V[Pe],ue),Xt!==null&&(i&&Xt.alternate!==null&&Ae.delete(Xt.key===null?Pe:Xt.key),U=v(Xt,U,Pe),Re===null?Ee=Xt:Re.sibling=Xt,Re=Xt);return i&&Ae.forEach(function(br){return s($,br)}),_t&&jr($,Pe),Ee}function ke($,U,V,ue){var Ee=ie(V);if(typeof Ee!="function")throw Error(n(150));if(V=Ee.call(V),V==null)throw Error(n(151));for(var Re=Ee=null,Ae=U,Pe=U=0,Xt=null,it=V.next();Ae!==null&&!it.done;Pe++,it=V.next()){Ae.index>Pe?(Xt=Ae,Ae=null):Xt=Ae.sibling;var br=se($,Ae,it.value,ue);if(br===null){Ae===null&&(Ae=Xt);break}i&&Ae&&br.alternate===null&&s($,Ae),U=v(br,U,Pe),Re===null?Ee=br:Re.sibling=br,Re=br,Ae=Xt}if(it.done)return c($,Ae),_t&&jr($,Pe),Ee;if(Ae===null){for(;!it.done;Pe++,it=V.next())it=ae($,it.value,ue),it!==null&&(U=v(it,U,Pe),Re===null?Ee=it:Re.sibling=it,Re=it);return _t&&jr($,Pe),Ee}for(Ae=f($,Ae);!it.done;Pe++,it=V.next())it=_e(Ae,$,Pe,it.value,ue),it!==null&&(i&&it.alternate!==null&&Ae.delete(it.key===null?Pe:it.key),U=v(it,U,Pe),Re===null?Ee=it:Re.sibling=it,Re=it);return i&&Ae.forEach(function(vw){return s($,vw)}),_t&&jr($,Pe),Ee}function Mt($,U,V,ue){if(typeof V=="object"&&V!==null&&V.type===re&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case q:e:{for(var Ee=V.key,Re=U;Re!==null;){if(Re.key===Ee){if(Ee=V.type,Ee===re){if(Re.tag===7){c($,Re.sibling),U=g(Re,V.props.children),U.return=$,$=U;break e}}else if(Re.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Y&&vp(Ee)===Re.type){c($,Re.sibling),U=g(Re,V.props),U.ref=bo($,Re,V),U.return=$,$=U;break e}c($,Re);break}else s($,Re);Re=Re.sibling}V.type===re?(U=Yr(V.props.children,$.mode,ue,V.key),U.return=$,$=U):(ue=vl(V.type,V.key,V.props,null,$.mode,ue),ue.ref=bo($,U,V),ue.return=$,$=ue)}return x($);case L:e:{for(Re=V.key;U!==null;){if(U.key===Re)if(U.tag===4&&U.stateNode.containerInfo===V.containerInfo&&U.stateNode.implementation===V.implementation){c($,U.sibling),U=g(U,V.children||[]),U.return=$,$=U;break e}else{c($,U);break}else s($,U);U=U.sibling}U=Zu(V,$.mode,ue),U.return=$,$=U}return x($);case Y:return Re=V._init,Mt($,U,Re(V._payload),ue)}if(oi(V))return xe($,U,V,ue);if(ie(V))return ke($,U,V,ue);Ga($,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,U!==null&&U.tag===6?(c($,U.sibling),U=g(U,V),U.return=$,$=U):(c($,U),U=Xu(V,$.mode,ue),U.return=$,$=U),x($)):c($,U)}return Mt}var As=yp(!0),bp=yp(!1),Ya=cr(null),Xa=null,Ms=null,ou=null;function au(){ou=Ms=Xa=null}function lu(i){var s=Ya.current;pt(Ya),i._currentValue=s}function cu(i,s,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===c)break;i=i.return}}function Os(i,s){Xa=i,ou=Ms=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(Tn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if(ou!==i)if(i={context:i,memoizedValue:s,next:null},Ms===null){if(Xa===null)throw Error(n(308));Ms=i,Xa.dependencies={lanes:0,firstContext:i}}else Ms=Ms.next=i;return s}var Hr=null;function uu(i){Hr===null?Hr=[i]:Hr.push(i)}function Sp(i,s,c,f){var g=s.interleaved;return g===null?(c.next=c,uu(s)):(c.next=g.next,g.next=c),s.interleaved=c,Ki(i,f)}function Ki(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var dr=!1;function hu(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wp(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function qi(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function fr(i,s,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(tt&2)!==0){var g=f.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s,Ki(i,c)}return g=f.interleaved,g===null?(s.next=s,uu(f)):(s.next=g.next,g.next=s),f.interleaved=s,Ki(i,c)}function Za(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,no(i,c)}}function xp(i,s){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var g=null,v=null;if(c=c.firstBaseUpdate,c!==null){do{var x={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};v===null?g=v=x:v=v.next=x,c=c.next}while(c!==null);v===null?g=v=s:v=v.next=s}else g=v=s;c={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:f.shared,effects:f.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function Qa(i,s,c,f){var g=i.updateQueue;dr=!1;var v=g.firstBaseUpdate,x=g.lastBaseUpdate,A=g.shared.pending;if(A!==null){g.shared.pending=null;var B=A,G=B.next;B.next=null,x===null?v=G:x.next=G,x=B;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,A=oe.lastBaseUpdate,A!==x&&(A===null?oe.firstBaseUpdate=G:A.next=G,oe.lastBaseUpdate=B))}if(v!==null){var ae=g.baseState;x=0,oe=G=B=null,A=v;do{var se=A.lane,_e=A.eventTime;if((f&se)===se){oe!==null&&(oe=oe.next={eventTime:_e,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var xe=i,ke=A;switch(se=s,_e=c,ke.tag){case 1:if(xe=ke.payload,typeof xe=="function"){ae=xe.call(_e,ae,se);break e}ae=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ke.payload,se=typeof xe=="function"?xe.call(_e,ae,se):xe,se==null)break e;ae=C({},ae,se);break e;case 2:dr=!0}}A.callback!==null&&A.lane!==0&&(i.flags|=64,se=g.effects,se===null?g.effects=[A]:se.push(A))}else _e={eventTime:_e,lane:se,tag:A.tag,payload:A.payload,callback:A.callback,next:null},oe===null?(G=oe=_e,B=ae):oe=oe.next=_e,x|=se;if(A=A.next,A===null){if(A=g.shared.pending,A===null)break;se=A,A=se.next,se.next=null,g.lastBaseUpdate=se,g.shared.pending=null}}while(!0);if(oe===null&&(B=ae),g.baseState=B,g.firstBaseUpdate=G,g.lastBaseUpdate=oe,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else v===null&&(g.shared.lanes=0);Kr|=x,i.lanes=x,i.memoizedState=ae}}function kp(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],g=f.callback;if(g!==null){if(f.callback=null,f=c,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var So={},ki=cr(So),wo=cr(So),xo=cr(So);function $r(i){if(i===So)throw Error(n(174));return i}function du(i,s){switch(ht(xo,s),ht(wo,i),ht(ki,So),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:he(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=he(s,i)}pt(ki),ht(ki,s)}function Ls(){pt(ki),pt(wo),pt(xo)}function Ep(i){$r(xo.current);var s=$r(ki.current),c=he(s,i.type);s!==c&&(ht(wo,i),ht(ki,c))}function fu(i){wo.current===i&&(pt(ki),pt(wo))}var St=cr(0);function Ja(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var pu=[];function mu(){for(var i=0;i<pu.length;i++)pu[i]._workInProgressVersionPrimary=null;pu.length=0}var el=M.ReactCurrentDispatcher,gu=M.ReactCurrentBatchConfig,Wr=0,wt=null,jt=null,Gt=null,tl=!1,ko=!1,Eo=0,US=0;function un(){throw Error(n(321))}function _u(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!ui(i[c],s[c]))return!1;return!0}function vu(i,s,c,f,g,v){if(Wr=v,wt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,el.current=i===null||i.memoizedState===null?WS:KS,i=c(f,g),ko){v=0;do{if(ko=!1,Eo=0,25<=v)throw Error(n(301));v+=1,Gt=jt=null,s.updateQueue=null,el.current=qS,i=c(f,g)}while(ko)}if(el.current=rl,s=jt!==null&&jt.next!==null,Wr=0,Gt=jt=wt=null,tl=!1,s)throw Error(n(300));return i}function yu(){var i=Eo!==0;return Eo=0,i}function Ei(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?wt.memoizedState=Gt=i:Gt=Gt.next=i,Gt}function Qn(){if(jt===null){var i=wt.alternate;i=i!==null?i.memoizedState:null}else i=jt.next;var s=Gt===null?wt.memoizedState:Gt.next;if(s!==null)Gt=s,jt=i;else{if(i===null)throw Error(n(310));jt=i,i={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},Gt===null?wt.memoizedState=Gt=i:Gt=Gt.next=i}return Gt}function Co(i,s){return typeof s=="function"?s(i):s}function bu(i){var s=Qn(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var f=jt,g=f.baseQueue,v=c.pending;if(v!==null){if(g!==null){var x=g.next;g.next=v.next,v.next=x}f.baseQueue=g=v,c.pending=null}if(g!==null){v=g.next,f=f.baseState;var A=x=null,B=null,G=v;do{var oe=G.lane;if((Wr&oe)===oe)B!==null&&(B=B.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),f=G.hasEagerState?G.eagerState:i(f,G.action);else{var ae={lane:oe,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};B===null?(A=B=ae,x=f):B=B.next=ae,wt.lanes|=oe,Kr|=oe}G=G.next}while(G!==null&&G!==v);B===null?x=f:B.next=A,ui(f,s.memoizedState)||(Tn=!0),s.memoizedState=f,s.baseState=x,s.baseQueue=B,c.lastRenderedState=f}if(i=c.interleaved,i!==null){g=i;do v=g.lane,wt.lanes|=v,Kr|=v,g=g.next;while(g!==i)}else g===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Su(i){var s=Qn(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var f=c.dispatch,g=c.pending,v=s.memoizedState;if(g!==null){c.pending=null;var x=g=g.next;do v=i(v,x.action),x=x.next;while(x!==g);ui(v,s.memoizedState)||(Tn=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),c.lastRenderedState=v}return[v,f]}function Cp(){}function Np(i,s){var c=wt,f=Qn(),g=s(),v=!ui(f.memoizedState,g);if(v&&(f.memoizedState=g,Tn=!0),f=f.queue,wu(Ap.bind(null,c,f,i),[i]),f.getSnapshot!==s||v||Gt!==null&&Gt.memoizedState.tag&1){if(c.flags|=2048,No(9,Rp.bind(null,c,f,g,s),void 0,null),Yt===null)throw Error(n(349));(Wr&30)!==0||Tp(c,s,g)}return g}function Tp(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=wt.updateQueue,s===null?(s={lastEffect:null,stores:null},wt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Rp(i,s,c,f){s.value=c,s.getSnapshot=f,Mp(s)&&Op(i)}function Ap(i,s,c){return c(function(){Mp(s)&&Op(i)})}function Mp(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!ui(i,c)}catch{return!0}}function Op(i){var s=Ki(i,1);s!==null&&mi(s,i,1,-1)}function Lp(i){var s=Ei();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Co,lastRenderedState:i},s.queue=i,i=i.dispatch=$S.bind(null,wt,i),[s.memoizedState,i]}function No(i,s,c,f){return i={tag:i,create:s,destroy:c,deps:f,next:null},s=wt.updateQueue,s===null?(s={lastEffect:null,stores:null},wt.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,s.lastEffect=i)),i}function Ip(){return Qn().memoizedState}function nl(i,s,c,f){var g=Ei();wt.flags|=i,g.memoizedState=No(1|s,c,void 0,f===void 0?null:f)}function il(i,s,c,f){var g=Qn();f=f===void 0?null:f;var v=void 0;if(jt!==null){var x=jt.memoizedState;if(v=x.destroy,f!==null&&_u(f,x.deps)){g.memoizedState=No(s,c,v,f);return}}wt.flags|=i,g.memoizedState=No(1|s,c,v,f)}function Dp(i,s){return nl(8390656,8,i,s)}function wu(i,s){return il(2048,8,i,s)}function Pp(i,s){return il(4,2,i,s)}function Bp(i,s){return il(4,4,i,s)}function Fp(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function zp(i,s,c){return c=c!=null?c.concat([i]):null,il(4,4,Fp.bind(null,s,i),c)}function xu(){}function Up(i,s){var c=Qn();s=s===void 0?null:s;var f=c.memoizedState;return f!==null&&s!==null&&_u(s,f[1])?f[0]:(c.memoizedState=[i,s],i)}function jp(i,s){var c=Qn();s=s===void 0?null:s;var f=c.memoizedState;return f!==null&&s!==null&&_u(s,f[1])?f[0]:(i=i(),c.memoizedState=[i,s],i)}function Hp(i,s,c){return(Wr&21)===0?(i.baseState&&(i.baseState=!1,Tn=!0),i.memoizedState=c):(ui(c,s)||(c=Ea(),wt.lanes|=c,Kr|=c,i.baseState=!0),s)}function jS(i,s){var c=et;et=c!==0&&4>c?c:4,i(!0);var f=gu.transition;gu.transition={};try{i(!1),s()}finally{et=c,gu.transition=f}}function $p(){return Qn().memoizedState}function HS(i,s,c){var f=_r(i);if(c={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null},Wp(i))Kp(s,c);else if(c=Sp(i,s,c,f),c!==null){var g=yn();mi(c,i,f,g),qp(c,s,f)}}function $S(i,s,c){var f=_r(i),g={lane:f,action:c,hasEagerState:!1,eagerState:null,next:null};if(Wp(i))Kp(s,g);else{var v=i.alternate;if(i.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var x=s.lastRenderedState,A=v(x,c);if(g.hasEagerState=!0,g.eagerState=A,ui(A,x)){var B=s.interleaved;B===null?(g.next=g,uu(s)):(g.next=B.next,B.next=g),s.interleaved=g;return}}catch{}finally{}c=Sp(i,s,g,f),c!==null&&(g=yn(),mi(c,i,f,g),qp(c,s,f))}}function Wp(i){var s=i.alternate;return i===wt||s!==null&&s===wt}function Kp(i,s){ko=tl=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function qp(i,s,c){if((c&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,c|=f,s.lanes=c,no(i,c)}}var rl={readContext:Zn,useCallback:un,useContext:un,useEffect:un,useImperativeHandle:un,useInsertionEffect:un,useLayoutEffect:un,useMemo:un,useReducer:un,useRef:un,useState:un,useDebugValue:un,useDeferredValue:un,useTransition:un,useMutableSource:un,useSyncExternalStore:un,useId:un,unstable_isNewReconciler:!1},WS={readContext:Zn,useCallback:function(i,s){return Ei().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:Dp,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,nl(4194308,4,Fp.bind(null,s,i),c)},useLayoutEffect:function(i,s){return nl(4194308,4,i,s)},useInsertionEffect:function(i,s){return nl(4,2,i,s)},useMemo:function(i,s){var c=Ei();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var f=Ei();return s=c!==void 0?c(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=HS.bind(null,wt,i),[f.memoizedState,i]},useRef:function(i){var s=Ei();return i={current:i},s.memoizedState=i},useState:Lp,useDebugValue:xu,useDeferredValue:function(i){return Ei().memoizedState=i},useTransition:function(){var i=Lp(!1),s=i[0];return i=jS.bind(null,i[1]),Ei().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var f=wt,g=Ei();if(_t){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),Yt===null)throw Error(n(349));(Wr&30)!==0||Tp(f,s,c)}g.memoizedState=c;var v={value:c,getSnapshot:s};return g.queue=v,Dp(Ap.bind(null,f,v,i),[i]),f.flags|=2048,No(9,Rp.bind(null,f,v,c,s),void 0,null),c},useId:function(){var i=Ei(),s=Yt.identifierPrefix;if(_t){var c=Wi,f=$i;c=(f&~(1<<32-bt(f)-1)).toString(32)+c,s=":"+s+"R"+c,c=Eo++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=US++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},KS={readContext:Zn,useCallback:Up,useContext:Zn,useEffect:wu,useImperativeHandle:zp,useInsertionEffect:Pp,useLayoutEffect:Bp,useMemo:jp,useReducer:bu,useRef:Ip,useState:function(){return bu(Co)},useDebugValue:xu,useDeferredValue:function(i){var s=Qn();return Hp(s,jt.memoizedState,i)},useTransition:function(){var i=bu(Co)[0],s=Qn().memoizedState;return[i,s]},useMutableSource:Cp,useSyncExternalStore:Np,useId:$p,unstable_isNewReconciler:!1},qS={readContext:Zn,useCallback:Up,useContext:Zn,useEffect:wu,useImperativeHandle:zp,useInsertionEffect:Pp,useLayoutEffect:Bp,useMemo:jp,useReducer:Su,useRef:Ip,useState:function(){return Su(Co)},useDebugValue:xu,useDeferredValue:function(i){var s=Qn();return jt===null?s.memoizedState=i:Hp(s,jt.memoizedState,i)},useTransition:function(){var i=Su(Co)[0],s=Qn().memoizedState;return[i,s]},useMutableSource:Cp,useSyncExternalStore:Np,useId:$p,unstable_isNewReconciler:!1};function di(i,s){if(i&&i.defaultProps){s=C({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function ku(i,s,c,f){s=i.memoizedState,c=c(f,s),c=c==null?s:C({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var sl={isMounted:function(i){return(i=i._reactInternals)?Ui(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var f=yn(),g=_r(i),v=qi(f,g);v.payload=s,c!=null&&(v.callback=c),s=fr(i,v,g),s!==null&&(mi(s,i,g,f),Za(s,i,g))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var f=yn(),g=_r(i),v=qi(f,g);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=fr(i,v,g),s!==null&&(mi(s,i,g,f),Za(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=yn(),f=_r(i),g=qi(c,f);g.tag=2,s!=null&&(g.callback=s),s=fr(i,g,f),s!==null&&(mi(s,i,f,c),Za(s,i,f))}};function Vp(i,s,c,f,g,v,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,v,x):s.prototype&&s.prototype.isPureReactComponent?!fo(c,f)||!fo(g,v):!0}function Gp(i,s,c){var f=!1,g=ur,v=s.contextType;return typeof v=="object"&&v!==null?v=Zn(v):(g=Nn(s)?zr:cn.current,f=s.contextTypes,v=(f=f!=null)?Cs(i,g):ur),s=new s(c,v),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=sl,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=v),s}function Yp(i,s,c,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,f),s.state!==i&&sl.enqueueReplaceState(s,s.state,null)}function Eu(i,s,c,f){var g=i.stateNode;g.props=c,g.state=i.memoizedState,g.refs={},hu(i);var v=s.contextType;typeof v=="object"&&v!==null?g.context=Zn(v):(v=Nn(s)?zr:cn.current,g.context=Cs(i,v)),g.state=i.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(ku(i,s,v,c),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&sl.enqueueReplaceState(g,g.state,null),Qa(i,c,g,f),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function Is(i,s){try{var c="",f=s;do c+=Ne(f),f=f.return;while(f);var g=c}catch(v){g=`
|
|
39
39
|
Error generating stack: `+v.message+`
|
|
40
|
-
`+v.stack}return{value:i,source:s,stack:g,digest:null}}function Cu(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Nu(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var VS=typeof WeakMap=="function"?WeakMap:Map;function Xp(i,s,c){c=qi(-1,c),c.tag=3,c.payload={element:null};var f=s.value;return c.callback=function(){dl||(dl=!0,Hu=f),Nu(i,s)},c}function Zp(i,s,c){c=qi(-1,c),c.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;c.payload=function(){return f(g)},c.callback=function(){Nu(i,s)}}var v=i.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(c.callback=function(){Nu(i,s),typeof f!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),c}function Qp(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new VS;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(c)||(g.add(c),i=aw.bind(null,i,s,c),s.then(i,i))}function Jp(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function em(i,s,c,f,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=qi(-1,1),s.tag=2,fr(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var GS=M.ReactCurrentOwner,Tn=!1;function vn(i,s,c,f){s.child=i===null?bp(s,null,c,f):As(s,i.child,c,f)}function tm(i,s,c,f,g){c=c.render;var v=s.ref;return Os(s,g),f=vu(i,s,c,f,v,g),c=yu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&c&&tu(s),s.flags|=1,vn(i,s,f,g),s.child)}function nm(i,s,c,f,g){if(i===null){var v=c.type;return typeof v=="function"&&!Yu(v)&&v.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=v,im(i,s,v,f,g)):(i=vl(c.type,null,f,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(v=i.child,(i.lanes&g)===0){var x=v.memoizedProps;if(c=c.compare,c=c!==null?c:fo,c(x,f)&&i.ref===s.ref)return Vi(i,s,g)}return s.flags|=1,i=yr(v,f),i.ref=s.ref,i.return=s,s.child=i}function im(i,s,c,f,g){if(i!==null){var v=i.memoizedProps;if(fo(v,f)&&i.ref===s.ref)if(Tn=!1,s.pendingProps=f=v,(i.lanes&g)!==0)(i.flags&131072)!==0&&(Tn=!0);else return s.lanes=i.lanes,Vi(i,s,g)}return Tu(i,s,c,f,g)}function rm(i,s,c){var f=s.pendingProps,g=f.children,v=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Ps,Un),Un|=c;else{if((c&1073741824)===0)return i=v!==null?v.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ht(Ps,Un),Un|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:c,ht(Ps,Un),Un|=f}else v!==null?(f=v.baseLanes|c,s.memoizedState=null):f=c,ht(Ps,Un),Un|=f;return vn(i,s,g,c),s.child}function sm(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Tu(i,s,c,f,g){var v=Nn(c)?zr:cn.current;return v=Cs(s,v),Os(s,g),c=vu(i,s,c,f,v,g),f=yu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&f&&tu(s),s.flags|=1,vn(i,s,c,g),s.child)}function om(i,s,c,f,g){if(Nn(c)){var v=!0;$a(s)}else v=!1;if(Os(s,g),s.stateNode===null)al(i,s),Gp(s,c,f),Eu(s,c,f,g),f=!0;else if(i===null){var x=s.stateNode,A=s.memoizedProps;x.props=A;var B=x.context,G=c.contextType;typeof G=="object"&&G!==null?G=Zn(G):(G=Nn(c)?zr:cn.current,G=Cs(s,G));var oe=c.getDerivedStateFromProps,ae=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function";ae||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==f||B!==G)&&Yp(s,x,f,G),dr=!1;var se=s.memoizedState;x.state=se,Qa(s,f,x,g),B=s.memoizedState,A!==f||se!==B||Cn.current||dr?(typeof oe=="function"&&(ku(s,c,oe,f),B=s.memoizedState),(A=dr||Vp(s,c,A,f,se,B,G))?(ae||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=B),x.props=f,x.state=B,x.context=G,f=A):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{x=s.stateNode,wp(i,s),A=s.memoizedProps,G=s.type===s.elementType?A:di(s.type,A),x.props=G,ae=s.pendingProps,se=x.context,B=c.contextType,typeof B=="object"&&B!==null?B=Zn(B):(B=Nn(c)?zr:cn.current,B=Cs(s,B));var _e=c.getDerivedStateFromProps;(oe=typeof _e=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==ae||se!==B)&&Yp(s,x,f,B),dr=!1,se=s.memoizedState,x.state=se,Qa(s,f,x,g);var xe=s.memoizedState;A!==ae||se!==xe||Cn.current||dr?(typeof _e=="function"&&(ku(s,c,_e,f),xe=s.memoizedState),(G=dr||Vp(s,c,G,f,se,xe,B)||!1)?(oe||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,xe,B),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,xe,B)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||A===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=xe),x.props=f,x.state=xe,x.context=B,f=G):(typeof x.componentDidUpdate!="function"||A===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),f=!1)}return Ru(i,s,c,f,v,g)}function Ru(i,s,c,f,g,v){sm(i,s);var x=(s.flags&128)!==0;if(!f&&!x)return g&&hp(s,c,!1),Vi(i,s,v);f=s.stateNode,GS.current=s;var A=x&&typeof c.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&x?(s.child=As(s,i.child,null,v),s.child=As(s,null,A,v)):vn(i,s,A,v),s.memoizedState=f.state,g&&hp(s,c,!0),s.child}function am(i){var s=i.stateNode;s.pendingContext?cp(i,s.pendingContext,s.pendingContext!==s.context):s.context&&cp(i,s.context,!1),du(i,s.containerInfo)}function lm(i,s,c,f,g){return Rs(),su(g),s.flags|=256,vn(i,s,c,f),s.child}var Au={dehydrated:null,treeContext:null,retryLane:0};function Mu(i){return{baseLanes:i,cachePool:null,transitions:null}}function cm(i,s,c){var f=s.pendingProps,g=St.current,v=!1,x=(s.flags&128)!==0,A;if((A=x)||(A=i!==null&&i.memoizedState===null?!1:(g&2)!==0),A?(v=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ht(St,g&1),i===null)return ru(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=f.children,i=f.fallback,v?(f=s.mode,v=s.child,x={mode:"hidden",children:x},(f&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=x):v=yl(x,f,0,null),i=Yr(i,f,c,null),v.return=s,i.return=s,v.sibling=i,s.child=v,s.child.memoizedState=Mu(c),s.memoizedState=Au,i):Ou(s,x));if(g=i.memoizedState,g!==null&&(A=g.dehydrated,A!==null))return YS(i,s,x,f,A,g,c);if(v){v=f.fallback,x=s.mode,g=i.child,A=g.sibling;var B={mode:"hidden",children:f.children};return(x&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=B,s.deletions=null):(f=yr(g,B),f.subtreeFlags=g.subtreeFlags&14680064),A!==null?v=yr(A,v):(v=Yr(v,x,c,null),v.flags|=2),v.return=s,f.return=s,f.sibling=v,s.child=f,f=v,v=s.child,x=i.child.memoizedState,x=x===null?Mu(c):{baseLanes:x.baseLanes|c,cachePool:null,transitions:x.transitions},v.memoizedState=x,v.childLanes=i.childLanes&~c,s.memoizedState=Au,f}return v=i.child,i=v.sibling,f=yr(v,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=c),f.return=s,f.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=f,s.memoizedState=null,f}function Ou(i,s){return s=yl({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ol(i,s,c,f){return f!==null&&su(f),As(s,i.child,null,c),i=Ou(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function YS(i,s,c,f,g,v,x){if(c)return s.flags&256?(s.flags&=-257,f=Cu(Error(n(422))),ol(i,s,x,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(v=f.fallback,g=s.mode,f=yl({mode:"visible",children:f.children},g,0,null),v=Yr(v,g,x,null),v.flags|=2,f.return=s,v.return=s,f.sibling=v,s.child=f,(s.mode&1)!==0&&As(s,i.child,null,x),s.child.memoizedState=Mu(x),s.memoizedState=Au,v);if((s.mode&1)===0)return ol(i,s,x,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var A=f.dgst;return f=A,v=Error(n(419)),f=Cu(v,f,void 0),ol(i,s,x,f)}if(A=(x&i.childLanes)!==0,Tn||A){if(f=Yt,f!==null){switch(x&-x){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|x))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,Ki(i,g),mi(f,i,g,-1))}return Gu(),f=Cu(Error(n(421))),ol(i,s,x,f)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=lw.bind(null,i),g._reactRetry=s,null):(i=v.treeContext,zn=lr(g.nextSibling),Fn=s,_t=!0,hi=null,i!==null&&(Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=Ur,$i=i.id,Wi=i.overflow,Ur=s),s=Ou(s,f.children),s.flags|=4096,s)}function um(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),cu(i.return,s,c)}function Lu(i,s,c,f,g){var v=i.memoizedState;v===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:g}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=f,v.tail=c,v.tailMode=g)}function hm(i,s,c){var f=s.pendingProps,g=f.revealOrder,v=f.tail;if(vn(i,s,f.children,c),f=St.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&um(i,c,s);else if(i.tag===19)um(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ht(St,f),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(c=s.child,g=null;c!==null;)i=c.alternate,i!==null&&Ja(i)===null&&(g=c),c=c.sibling;c=g,c===null?(g=s.child,s.child=null):(g=c.sibling,c.sibling=null),Lu(s,!1,g,c,v);break;case"backwards":for(c=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Ja(i)===null){s.child=g;break}i=g.sibling,g.sibling=c,c=g,g=i}Lu(s,!0,c,null,v);break;case"together":Lu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function al(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Vi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Kr|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=yr(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=yr(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function XS(i,s,c){switch(s.tag){case 3:am(s),Rs();break;case 5:Ep(s);break;case 1:Nn(s.type)&&$a(s);break;case 4:du(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;ht(Ya,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ht(St,St.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?cm(i,s,c):(ht(St,St.current&1),i=Vi(i,s,c),i!==null?i.sibling:null);ht(St,St.current&1);break;case 19:if(f=(c&s.childLanes)!==0,(i.flags&128)!==0){if(f)return hm(i,s,c);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ht(St,St.current),f)break;return null;case 22:case 23:return s.lanes=0,rm(i,s,c)}return Vi(i,s,c)}var dm,Iu,fm,pm;dm=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Iu=function(){},fm=function(i,s,c,f){var g=i.memoizedProps;if(g!==f){i=s.stateNode,$r(ki.current);var v=null;switch(c){case"input":g=Dn(i,g),f=Dn(i,f),v=[];break;case"select":g=C({},g,{value:void 0}),f=C({},f,{value:void 0}),v=[];break;case"textarea":g=Rr(i,g),f=Rr(i,f),v=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Ua)}Ut(c,f);var x;c=null;for(G in g)if(!f.hasOwnProperty(G)&&g.hasOwnProperty(G)&&g[G]!=null)if(G==="style"){var A=g[G];for(x in A)A.hasOwnProperty(x)&&(c||(c={}),c[x]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(o.hasOwnProperty(G)?v||(v=[]):(v=v||[]).push(G,null));for(G in f){var B=f[G];if(A=g!=null?g[G]:void 0,f.hasOwnProperty(G)&&B!==A&&(B!=null||A!=null))if(G==="style")if(A){for(x in A)!A.hasOwnProperty(x)||B&&B.hasOwnProperty(x)||(c||(c={}),c[x]="");for(x in B)B.hasOwnProperty(x)&&A[x]!==B[x]&&(c||(c={}),c[x]=B[x])}else c||(v||(v=[]),v.push(G,c)),c=B;else G==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,A=A?A.__html:void 0,B!=null&&A!==B&&(v=v||[]).push(G,B)):G==="children"?typeof B!="string"&&typeof B!="number"||(v=v||[]).push(G,""+B):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(o.hasOwnProperty(G)?(B!=null&&G==="onScroll"&&ft("scroll",i),v||A===B||(v=[])):(v=v||[]).push(G,B))}c&&(v=v||[]).push("style",c);var G=v;(s.updateQueue=G)&&(s.flags|=4)}},pm=function(i,s,c,f){c!==f&&(s.flags|=4)};function To(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function hn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function ZS(i,s,c){var f=s.pendingProps;switch(nu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(s),null;case 1:return Nn(s.type)&&Ha(),hn(s),null;case 3:return f=s.stateNode,Ls(),pt(Cn),pt(cn),mu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Va(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,hi!==null&&(Ku(hi),hi=null))),Iu(i,s),hn(s),null;case 5:fu(s);var g=$r(xo.current);if(c=s.type,i!==null&&s.stateNode!=null)fm(i,s,c,f,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return hn(s),null}if(i=$r(ki.current),Va(s)){f=s.stateNode,c=s.type;var v=s.memoizedProps;switch(f[xi]=s,f[vo]=v,i=(s.mode&1)!==0,c){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Pi(f,v),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!v.multiple},ft("invalid",f);break;case"textarea":Ar(f,v),ft("invalid",f)}Ut(c,v),g=null;for(var x in v)if(v.hasOwnProperty(x)){var A=v[x];x==="children"?typeof A=="string"?f.textContent!==A&&(v.suppressHydrationWarning!==!0&&za(f.textContent,A,i),g=["children",A]):typeof A=="number"&&f.textContent!==""+A&&(v.suppressHydrationWarning!==!0&&za(f.textContent,A,i),g=["children",""+A]):o.hasOwnProperty(x)&&A!=null&&x==="onScroll"&&ft("scroll",f)}switch(c){case"input":Ft(f),Kn(f,v,!0);break;case"textarea":Ft(f),Mr(f);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(f.onclick=Ua)}f=g,s.updateQueue=f,f!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=x.createElement(c,{is:f.is}):(i=x.createElement(c),c==="select"&&(x=i,f.multiple?x.multiple=!0:f.size&&(x.size=f.size))):i=x.createElementNS(i,c),i[xi]=s,i[vo]=f,dm(i,s,!1,!1),s.stateNode=i;e:{switch(x=Vn(c,f),c){case"dialog":ft("cancel",i),ft("close",i),g=f;break;case"iframe":case"object":case"embed":ft("load",i),g=f;break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],i);g=f;break;case"source":ft("error",i),g=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),g=f;break;case"details":ft("toggle",i),g=f;break;case"input":Pi(i,f),g=Dn(i,f),ft("invalid",i);break;case"option":g=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},g=C({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Ar(i,f),g=Rr(i,f),ft("invalid",i);break;default:g=f}Ut(c,g),A=g;for(v in A)if(A.hasOwnProperty(v)){var B=A[v];v==="style"?li(i,B):v==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&$e(i,B)):v==="children"?typeof B=="string"?(c!=="textarea"||B!=="")&&Xe(i,B):typeof B=="number"&&Xe(i,""+B):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(o.hasOwnProperty(v)?B!=null&&v==="onScroll"&&ft("scroll",i):B!=null&&N(i,v,B,x))}switch(c){case"input":Ft(i),Kn(i,f,!1);break;case"textarea":Ft(i),Mr(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Ie(f.value));break;case"select":i.multiple=!!f.multiple,v=f.value,v!=null?yi(i,!!f.multiple,v,!1):f.defaultValue!=null&&yi(i,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=Ua)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return hn(s),null;case 6:if(i&&s.stateNode!=null)pm(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(c=$r(xo.current),$r(ki.current),Va(s)){if(f=s.stateNode,c=s.memoizedProps,f[xi]=s,(v=f.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:za(f.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&za(f.nodeValue,c,(i.mode&1)!==0)}v&&(s.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[xi]=s,s.stateNode=f}return hn(s),null;case 13:if(pt(St),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)_p(),Rs(),s.flags|=98560,v=!1;else if(v=Va(s),f!==null&&f.dehydrated!==null){if(i===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[xi]=s}else Rs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;hn(s),v=!1}else hi!==null&&(Ku(hi),hi=null),v=!0;if(!v)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(St.current&1)!==0?Ht===0&&(Ht=3):Gu())),s.updateQueue!==null&&(s.flags|=4),hn(s),null);case 4:return Ls(),Iu(i,s),i===null&&go(s.stateNode.containerInfo),hn(s),null;case 10:return lu(s.type._context),hn(s),null;case 17:return Nn(s.type)&&Ha(),hn(s),null;case 19:if(pt(St),v=s.memoizedState,v===null)return hn(s),null;if(f=(s.flags&128)!==0,x=v.rendering,x===null)if(f)To(v,!1);else{if(Ht!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Ja(i),x!==null){for(s.flags|=128,To(v,!1),f=x.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=c,c=s.child;c!==null;)v=c,i=f,v.flags&=14680066,x=v.alternate,x===null?(v.childLanes=0,v.lanes=i,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=x.childLanes,v.lanes=x.lanes,v.child=x.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=x.memoizedProps,v.memoizedState=x.memoizedState,v.updateQueue=x.updateQueue,v.type=x.type,i=x.dependencies,v.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ht(St,St.current&1|2),s.child}i=i.sibling}v.tail!==null&&yt()>Bs&&(s.flags|=128,f=!0,To(v,!1),s.lanes=4194304)}else{if(!f)if(i=Ja(x),i!==null){if(s.flags|=128,f=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),To(v,!0),v.tail===null&&v.tailMode==="hidden"&&!x.alternate&&!_t)return hn(s),null}else 2*yt()-v.renderingStartTime>Bs&&c!==1073741824&&(s.flags|=128,f=!0,To(v,!1),s.lanes=4194304);v.isBackwards?(x.sibling=s.child,s.child=x):(c=v.last,c!==null?c.sibling=x:s.child=x,v.last=x)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=yt(),s.sibling=null,c=St.current,ht(St,f?c&1|2:c&1),s):(hn(s),null);case 22:case 23:return Vu(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Un&1073741824)!==0&&(hn(s),s.subtreeFlags&6&&(s.flags|=8192)):hn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function QS(i,s){switch(nu(s),s.tag){case 1:return Nn(s.type)&&Ha(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ls(),pt(Cn),pt(cn),mu(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return fu(s),null;case 13:if(pt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Rs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return pt(St),null;case 4:return Ls(),null;case 10:return lu(s.type._context),null;case 22:case 23:return Vu(),null;case 24:return null;default:return null}}var ll=!1,dn=!1,JS=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ds(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){Ct(i,s,f)}else c.current=null}function Du(i,s,c){try{c()}catch(f){Ct(i,s,f)}}var mm=!1;function ew(i,s){if(Vc=Ta,i=Vf(),zc(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var g=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{c.nodeType,v.nodeType}catch{c=null;break e}var x=0,A=-1,B=-1,G=0,oe=0,ae=i,se=null;t:for(;;){for(var _e;ae!==c||g!==0&&ae.nodeType!==3||(A=x+g),ae!==v||f!==0&&ae.nodeType!==3||(B=x+f),ae.nodeType===3&&(x+=ae.nodeValue.length),(_e=ae.firstChild)!==null;)se=ae,ae=_e;for(;;){if(ae===i)break t;if(se===c&&++G===g&&(A=x),se===v&&++oe===f&&(B=x),(_e=ae.nextSibling)!==null)break;ae=se,se=ae.parentNode}ae=_e}c=A===-1||B===-1?null:{start:A,end:B}}else c=null}c=c||{start:0,end:0}}else c=null;for(Gc={focusedElem:i,selectionRange:c},Ta=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ke=xe.memoizedProps,Mt=xe.memoizedState,$=s.stateNode,U=$.getSnapshotBeforeUpdate(s.elementType===s.type?ke:di(s.type,ke),Mt);$.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){Ct(s,s.return,ue)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return xe=mm,mm=!1,xe}function Ro(i,s,c){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&i)===i){var v=g.destroy;g.destroy=void 0,v!==void 0&&Du(s,c,v)}g=g.next}while(g!==f)}}function cl(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var f=c.create;c.destroy=f()}c=c.next}while(c!==s)}}function Pu(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function gm(i){var s=i.alternate;s!==null&&(i.alternate=null,gm(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xi],delete s[vo],delete s[Qc],delete s[PS],delete s[BS])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function _m(i){return i.tag===5||i.tag===3||i.tag===4}function vm(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||_m(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Bu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Ua));else if(f!==4&&(i=i.child,i!==null))for(Bu(i,s,c),i=i.sibling;i!==null;)Bu(i,s,c),i=i.sibling}function Fu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Fu(i,s,c),i=i.sibling;i!==null;)Fu(i,s,c),i=i.sibling}var sn=null,fi=!1;function pr(i,s,c){for(c=c.child;c!==null;)ym(i,s,c),c=c.sibling}function ym(i,s,c){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(We,c)}catch{}switch(c.tag){case 5:dn||Ds(c,s);case 6:var f=sn,g=fi;sn=null,pr(i,s,c),sn=f,fi=g,sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):sn.removeChild(c.stateNode));break;case 18:sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?Zc(i.parentNode,c):i.nodeType===1&&Zc(i,c),oo(i)):Zc(sn,c.stateNode));break;case 4:f=sn,g=fi,sn=c.stateNode.containerInfo,fi=!0,pr(i,s,c),sn=f,fi=g;break;case 0:case 11:case 14:case 15:if(!dn&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var v=g,x=v.destroy;v=v.tag,x!==void 0&&((v&2)!==0||(v&4)!==0)&&Du(c,s,x),g=g.next}while(g!==f)}pr(i,s,c);break;case 1:if(!dn&&(Ds(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(A){Ct(c,s,A)}pr(i,s,c);break;case 21:pr(i,s,c);break;case 22:c.mode&1?(dn=(f=dn)||c.memoizedState!==null,pr(i,s,c),dn=f):pr(i,s,c);break;default:pr(i,s,c)}}function bm(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new JS),s.forEach(function(f){var g=cw.bind(null,i,f);c.has(f)||(c.add(f),f.then(g,g))})}}function pi(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var g=c[f];try{var v=i,x=s,A=x;e:for(;A!==null;){switch(A.tag){case 5:sn=A.stateNode,fi=!1;break e;case 3:sn=A.stateNode.containerInfo,fi=!0;break e;case 4:sn=A.stateNode.containerInfo,fi=!0;break e}A=A.return}if(sn===null)throw Error(n(160));ym(v,x,g),sn=null,fi=!1;var B=g.alternate;B!==null&&(B.return=null),g.return=null}catch(G){Ct(g,s,G)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Sm(s,i),s=s.sibling}function Sm(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pi(s,i),Ci(i),f&4){try{Ro(3,i,i.return),cl(3,i)}catch(ke){Ct(i,i.return,ke)}try{Ro(5,i,i.return)}catch(ke){Ct(i,i.return,ke)}}break;case 1:pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return);break;case 5:if(pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return),i.flags&32){var g=i.stateNode;try{Xe(g,"")}catch(ke){Ct(i,i.return,ke)}}if(f&4&&(g=i.stateNode,g!=null)){var v=i.memoizedProps,x=c!==null?c.memoizedProps:v,A=i.type,B=i.updateQueue;if(i.updateQueue=null,B!==null)try{A==="input"&&v.type==="radio"&&v.name!=null&&Qe(g,v),Vn(A,x);var G=Vn(A,v);for(x=0;x<B.length;x+=2){var oe=B[x],ae=B[x+1];oe==="style"?li(g,ae):oe==="dangerouslySetInnerHTML"?$e(g,ae):oe==="children"?Xe(g,ae):N(g,oe,ae,G)}switch(A){case"input":Pn(g,v);break;case"textarea":qn(g,v);break;case"select":var se=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var _e=v.value;_e!=null?yi(g,!!v.multiple,_e,!1):se!==!!v.multiple&&(v.defaultValue!=null?yi(g,!!v.multiple,v.defaultValue,!0):yi(g,!!v.multiple,v.multiple?[]:"",!1))}g[vo]=v}catch(ke){Ct(i,i.return,ke)}}break;case 6:if(pi(s,i),Ci(i),f&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,v=i.memoizedProps;try{g.nodeValue=v}catch(ke){Ct(i,i.return,ke)}}break;case 3:if(pi(s,i),Ci(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{oo(s.containerInfo)}catch(ke){Ct(i,i.return,ke)}break;case 4:pi(s,i),Ci(i);break;case 13:pi(s,i),Ci(i),g=i.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(ju=yt())),f&4&&bm(i);break;case 22:if(oe=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(G=dn)||oe,pi(s,i),dn=G):pi(s,i),Ci(i),f&8192){if(G=i.memoizedState!==null,(i.stateNode.isHidden=G)&&!oe&&(i.mode&1)!==0)for(we=i,oe=i.child;oe!==null;){for(ae=we=oe;we!==null;){switch(se=we,_e=se.child,se.tag){case 0:case 11:case 14:case 15:Ro(4,se,se.return);break;case 1:Ds(se,se.return);var xe=se.stateNode;if(typeof xe.componentWillUnmount=="function"){f=se,c=se.return;try{s=f,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(ke){Ct(f,c,ke)}}break;case 5:Ds(se,se.return);break;case 22:if(se.memoizedState!==null){km(ae);continue}}_e!==null?(_e.return=se,we=_e):km(ae)}oe=oe.sibling}e:for(oe=null,ae=i;;){if(ae.tag===5){if(oe===null){oe=ae;try{g=ae.stateNode,G?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(A=ae.stateNode,B=ae.memoizedProps.style,x=B!=null&&B.hasOwnProperty("display")?B.display:null,A.style.display=En("display",x))}catch(ke){Ct(i,i.return,ke)}}}else if(ae.tag===6){if(oe===null)try{ae.stateNode.nodeValue=G?"":ae.memoizedProps}catch(ke){Ct(i,i.return,ke)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===i)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===i)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===i)break e;oe===ae&&(oe=null),ae=ae.return}oe===ae&&(oe=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:pi(s,i),Ci(i),f&4&&bm(i);break;case 21:break;default:pi(s,i),Ci(i)}}function Ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(_m(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(Xe(g,""),f.flags&=-33);var v=vm(i);Fu(i,v,g);break;case 3:case 4:var x=f.stateNode.containerInfo,A=vm(i);Bu(i,A,x);break;default:throw Error(n(161))}}catch(B){Ct(i,i.return,B)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function tw(i,s,c){we=i,wm(i)}function wm(i,s,c){for(var f=(i.mode&1)!==0;we!==null;){var g=we,v=g.child;if(g.tag===22&&f){var x=g.memoizedState!==null||ll;if(!x){var A=g.alternate,B=A!==null&&A.memoizedState!==null||dn;A=ll;var G=dn;if(ll=x,(dn=B)&&!G)for(we=g;we!==null;)x=we,B=x.child,x.tag===22&&x.memoizedState!==null?Em(g):B!==null?(B.return=x,we=B):Em(g);for(;v!==null;)we=v,wm(v),v=v.sibling;we=g,ll=A,dn=G}xm(i)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,we=v):xm(i)}}function xm(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||cl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!dn)if(c===null)f.componentDidMount();else{var g=s.elementType===s.type?c.memoizedProps:di(s.type,c.memoizedProps);f.componentDidUpdate(g,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&kp(s,v,f);break;case 3:var x=s.updateQueue;if(x!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}kp(s,x,c)}break;case 5:var A=s.stateNode;if(c===null&&s.flags&4){c=A;var B=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&c.focus();break;case"img":B.src&&(c.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var G=s.alternate;if(G!==null){var oe=G.memoizedState;if(oe!==null){var ae=oe.dehydrated;ae!==null&&oo(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&Pu(s)}catch(se){Ct(s,s.return,se)}}if(s===i){we=null;break}if(c=s.sibling,c!==null){c.return=s.return,we=c;break}we=s.return}}function km(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var c=s.sibling;if(c!==null){c.return=s.return,we=c;break}we=s.return}}function Em(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{cl(4,s)}catch(B){Ct(s,c,B)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(B){Ct(s,g,B)}}var v=s.return;try{Pu(s)}catch(B){Ct(s,v,B)}break;case 5:var x=s.return;try{Pu(s)}catch(B){Ct(s,x,B)}}}catch(B){Ct(s,s.return,B)}if(s===i){we=null;break}var A=s.sibling;if(A!==null){A.return=s.return,we=A;break}we=s.return}}var nw=Math.ceil,ul=M.ReactCurrentDispatcher,zu=M.ReactCurrentOwner,Jn=M.ReactCurrentBatchConfig,tt=0,Yt=null,It=null,on=0,Un=0,Ps=cr(0),Ht=0,Ao=null,Kr=0,hl=0,Uu=0,Mo=null,Rn=null,ju=0,Bs=1/0,Gi=null,dl=!1,Hu=null,mr=null,fl=!1,gr=null,pl=0,Oo=0,$u=null,ml=-1,gl=0;function yn(){return(tt&6)!==0?yt():ml!==-1?ml:ml=yt()}function _r(i){return(i.mode&1)===0?1:(tt&2)!==0&&on!==0?on&-on:zS.transition!==null?(gl===0&&(gl=Ea()),gl):(i=et,i!==0||(i=window.event,i=i===void 0?16:Nf(i.type)),i)}function mi(i,s,c,f){if(50<Oo)throw Oo=0,$u=null,Error(n(185));rr(i,c,f),((tt&2)===0||i!==Yt)&&(i===Yt&&((tt&2)===0&&(hl|=c),Ht===4&&vr(i,on)),An(i,f),c===1&&tt===0&&(s.mode&1)===0&&(Bs=yt()+500,Wa&&hr()))}function An(i,s){var c=i.callbackNode;Cc(i,s);var f=Dr(i,i===Yt?on:0);if(f===0)c!==null&&ci(c),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(c!=null&&ci(c),s===1)i.tag===0?FS(Nm.bind(null,i)):dp(Nm.bind(null,i)),IS(function(){(tt&6)===0&&hr()}),c=null;else{switch(Fe(f)){case 1:c=eo;break;case 4:c=Lr;break;case 16:c=ms;break;case 536870912:c=Ce;break;default:c=ms}c=Dm(c,Cm.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Cm(i,s){if(ml=-1,gl=0,(tt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Fs()&&i.callbackNode!==c)return null;var f=Dr(i,i===Yt?on:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=_l(i,f);else{s=f;var g=tt;tt|=2;var v=Rm();(Yt!==i||on!==s)&&(Gi=null,Bs=yt()+500,Vr(i,s));do try{sw();break}catch(A){Tm(i,A)}while(!0);au(),ul.current=v,tt=g,It!==null?s=0:(Yt=null,on=0,s=Ht)}if(s!==0){if(s===2&&(g=to(i),g!==0&&(f=g,s=Wu(i,g))),s===1)throw c=Ao,Vr(i,0),vr(i,f),An(i,yt()),c;if(s===6)vr(i,f);else{if(g=i.current.alternate,(f&30)===0&&!iw(g)&&(s=_l(i,f),s===2&&(v=to(i),v!==0&&(f=v,s=Wu(i,v))),s===1))throw c=Ao,Vr(i,0),vr(i,f),An(i,yt()),c;switch(i.finishedWork=g,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Gr(i,Rn,Gi);break;case 3:if(vr(i,f),(f&130023424)===f&&(s=ju+500-yt(),10<s)){if(Dr(i,0)!==0)break;if(g=i.suspendedLanes,(g&f)!==f){yn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Xc(Gr.bind(null,i,Rn,Gi),s);break}Gr(i,Rn,Gi);break;case 4:if(vr(i,f),(f&4194240)===f)break;for(s=i.eventTimes,g=-1;0<f;){var x=31-bt(f);v=1<<x,x=s[x],x>g&&(g=x),f&=~v}if(f=g,f=yt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*nw(f/1960))-f,10<f){i.timeoutHandle=Xc(Gr.bind(null,i,Rn,Gi),f);break}Gr(i,Rn,Gi);break;case 5:Gr(i,Rn,Gi);break;default:throw Error(n(329))}}}return An(i,yt()),i.callbackNode===c?Cm.bind(null,i):null}function Wu(i,s){var c=Mo;return i.current.memoizedState.isDehydrated&&(Vr(i,s).flags|=256),i=_l(i,s),i!==2&&(s=Rn,Rn=c,s!==null&&Ku(s)),i}function Ku(i){Rn===null?Rn=i:Rn.push.apply(Rn,i)}function iw(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var g=c[f],v=g.getSnapshot;g=g.value;try{if(!ui(v(),g))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function vr(i,s){for(s&=~Uu,s&=~hl,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-bt(s),f=1<<c;i[c]=-1,s&=~f}}function Nm(i){if((tt&6)!==0)throw Error(n(327));Fs();var s=Dr(i,0);if((s&1)===0)return An(i,yt()),null;var c=_l(i,s);if(i.tag!==0&&c===2){var f=to(i);f!==0&&(s=f,c=Wu(i,f))}if(c===1)throw c=Ao,Vr(i,0),vr(i,s),An(i,yt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Gr(i,Rn,Gi),An(i,yt()),null}function qu(i,s){var c=tt;tt|=1;try{return i(s)}finally{tt=c,tt===0&&(Bs=yt()+500,Wa&&hr())}}function qr(i){gr!==null&&gr.tag===0&&(tt&6)===0&&Fs();var s=tt;tt|=1;var c=Jn.transition,f=et;try{if(Jn.transition=null,et=1,i)return i()}finally{et=f,Jn.transition=c,tt=s,(tt&6)===0&&hr()}}function Vu(){Un=Ps.current,pt(Ps)}function Vr(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,LS(c)),It!==null)for(c=It.return;c!==null;){var f=c;switch(nu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Ha();break;case 3:Ls(),pt(Cn),pt(cn),mu();break;case 5:fu(f);break;case 4:Ls();break;case 13:pt(St);break;case 19:pt(St);break;case 10:lu(f.type._context);break;case 22:case 23:Vu()}c=c.return}if(Yt=i,It=i=yr(i.current,null),on=Un=s,Ht=0,Ao=null,Uu=hl=Kr=0,Rn=Mo=null,Hr!==null){for(s=0;s<Hr.length;s++)if(c=Hr[s],f=c.interleaved,f!==null){c.interleaved=null;var g=f.next,v=c.pending;if(v!==null){var x=v.next;v.next=g,f.next=x}c.pending=f}Hr=null}return i}function Tm(i,s){do{var c=It;try{if(au(),el.current=rl,tl){for(var f=wt.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}tl=!1}if(Wr=0,Gt=jt=wt=null,ko=!1,Eo=0,zu.current=null,c===null||c.return===null){Ht=1,Ao=s,It=null;break}e:{var v=i,x=c.return,A=c,B=s;if(s=on,A.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var G=B,oe=A,ae=oe.tag;if((oe.mode&1)===0&&(ae===0||ae===11||ae===15)){var se=oe.alternate;se?(oe.updateQueue=se.updateQueue,oe.memoizedState=se.memoizedState,oe.lanes=se.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var _e=Jp(x);if(_e!==null){_e.flags&=-257,em(_e,x,A,v,s),_e.mode&1&&Qp(v,G,s),s=_e,B=G;var xe=s.updateQueue;if(xe===null){var ke=new Set;ke.add(B),s.updateQueue=ke}else xe.add(B);break e}else{if((s&1)===0){Qp(v,G,s),Gu();break e}B=Error(n(426))}}else if(_t&&A.mode&1){var Mt=Jp(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),em(Mt,x,A,v,s),su(Is(B,A));break e}}v=B=Is(B,A),Ht!==4&&(Ht=2),Mo===null?Mo=[v]:Mo.push(v),v=x;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var $=Xp(v,B,s);xp(v,$);break e;case 1:A=B;var U=v.type,V=v.stateNode;if((v.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(mr===null||!mr.has(V)))){v.flags|=65536,s&=-s,v.lanes|=s;var ue=Zp(v,A,s);xp(v,ue);break e}}v=v.return}while(v!==null)}Mm(c)}catch(Ee){s=Ee,It===c&&c!==null&&(It=c=c.return);continue}break}while(!0)}function Rm(){var i=ul.current;return ul.current=rl,i===null?rl:i}function Gu(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),Yt===null||(Kr&268435455)===0&&(hl&268435455)===0||vr(Yt,on)}function _l(i,s){var c=tt;tt|=2;var f=Rm();(Yt!==i||on!==s)&&(Gi=null,Vr(i,s));do try{rw();break}catch(g){Tm(i,g)}while(!0);if(au(),tt=c,ul.current=f,It!==null)throw Error(n(261));return Yt=null,on=0,Ht}function rw(){for(;It!==null;)Am(It)}function sw(){for(;It!==null&&!xa();)Am(It)}function Am(i){var s=Im(i.alternate,i,Un);i.memoizedProps=i.pendingProps,s===null?Mm(i):It=s,zu.current=null}function Mm(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=ZS(c,s,Un),c!==null){It=c;return}}else{if(c=QS(c,s),c!==null){c.flags&=32767,It=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ht=6,It=null;return}}if(s=s.sibling,s!==null){It=s;return}It=s=i}while(s!==null);Ht===0&&(Ht=5)}function Gr(i,s,c){var f=et,g=Jn.transition;try{Jn.transition=null,et=1,ow(i,s,c,f)}finally{Jn.transition=g,et=f}return null}function ow(i,s,c,f){do Fs();while(gr!==null);if((tt&6)!==0)throw Error(n(327));c=i.finishedWork;var g=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var v=c.lanes|c.childLanes;if(Gn(i,v),i===Yt&&(It=Yt=null,on=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||fl||(fl=!0,Dm(ms,function(){return Fs(),null})),v=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||v){v=Jn.transition,Jn.transition=null;var x=et;et=1;var A=tt;tt|=4,zu.current=null,ew(i,c),Sm(c,i),CS(Gc),Ta=!!Vc,Gc=Vc=null,i.current=c,tw(c),ka(),tt=A,et=x,Jn.transition=v}else i.current=c;if(fl&&(fl=!1,gr=i,pl=g),v=i.pendingLanes,v===0&&(mr=null),Rt(c.stateNode),An(i,yt()),s!==null)for(f=i.onRecoverableError,c=0;c<s.length;c++)g=s[c],f(g.value,{componentStack:g.stack,digest:g.digest});if(dl)throw dl=!1,i=Hu,Hu=null,i;return(pl&1)!==0&&i.tag!==0&&Fs(),v=i.pendingLanes,(v&1)!==0?i===$u?Oo++:(Oo=0,$u=i):Oo=0,hr(),null}function Fs(){if(gr!==null){var i=Fe(pl),s=Jn.transition,c=et;try{if(Jn.transition=null,et=16>i?16:i,gr===null)var f=!1;else{if(i=gr,gr=null,pl=0,(tt&6)!==0)throw Error(n(331));var g=tt;for(tt|=4,we=i.current;we!==null;){var v=we,x=v.child;if((we.flags&16)!==0){var A=v.deletions;if(A!==null){for(var B=0;B<A.length;B++){var G=A[B];for(we=G;we!==null;){var oe=we;switch(oe.tag){case 0:case 11:case 15:Ro(8,oe,v)}var ae=oe.child;if(ae!==null)ae.return=oe,we=ae;else for(;we!==null;){oe=we;var se=oe.sibling,_e=oe.return;if(gm(oe),oe===G){we=null;break}if(se!==null){se.return=_e,we=se;break}we=_e}}}var xe=v.alternate;if(xe!==null){var ke=xe.child;if(ke!==null){xe.child=null;do{var Mt=ke.sibling;ke.sibling=null,ke=Mt}while(ke!==null)}}we=v}}if((v.subtreeFlags&2064)!==0&&x!==null)x.return=v,we=x;else e:for(;we!==null;){if(v=we,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:Ro(9,v,v.return)}var $=v.sibling;if($!==null){$.return=v.return,we=$;break e}we=v.return}}var U=i.current;for(we=U;we!==null;){x=we;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,we=V;else e:for(x=U;we!==null;){if(A=we,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:cl(9,A)}}catch(Ee){Ct(A,A.return,Ee)}if(A===x){we=null;break e}var ue=A.sibling;if(ue!==null){ue.return=A.return,we=ue;break e}we=A.return}}if(tt=g,hr(),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(We,i)}catch{}f=!0}return f}finally{et=c,Jn.transition=s}}return!1}function Om(i,s,c){s=Is(c,s),s=Xp(i,s,1),i=fr(i,s,1),s=yn(),i!==null&&(rr(i,1,s),An(i,s))}function Ct(i,s,c){if(i.tag===3)Om(i,i,c);else for(;s!==null;){if(s.tag===3){Om(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(mr===null||!mr.has(f))){i=Is(c,i),i=Zp(s,i,1),s=fr(s,i,1),i=yn(),s!==null&&(rr(s,1,i),An(s,i));break}}s=s.return}}function aw(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Yt===i&&(on&c)===c&&(Ht===4||Ht===3&&(on&130023424)===on&&500>yt()-ju?Vr(i,0):Uu|=c),An(i,s)}function Lm(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var c=yn();i=Ki(i,s),i!==null&&(rr(i,s,c),An(i,c))}function lw(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Lm(i,c)}function cw(i,s){var c=0;switch(i.tag){case 13:var f=i.stateNode,g=i.memoizedState;g!==null&&(c=g.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Lm(i,c)}var Im;Im=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)Tn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Tn=!1,XS(i,s,c);Tn=(i.flags&131072)!==0}else Tn=!1,_t&&(s.flags&1048576)!==0&&fp(s,qa,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;al(i,s),i=s.pendingProps;var g=Cs(s,cn.current);Os(s,c),g=vu(null,s,f,i,g,c);var v=yu();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(f)?(v=!0,$a(s)):v=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,hu(s),g.updater=sl,s.stateNode=g,g._reactInternals=s,Eu(s,f,i,c),s=Ru(null,s,f,!0,v,c)):(s.tag=0,_t&&v&&tu(s),vn(null,s,g,c),s=s.child),s;case 16:f=s.elementType;e:{switch(al(i,s),i=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=hw(f),i=di(f,i),g){case 0:s=Tu(null,s,f,i,c);break e;case 1:s=om(null,s,f,i,c);break e;case 11:s=tm(null,s,f,i,c);break e;case 14:s=nm(null,s,f,di(f.type,i),c);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),Tu(i,s,f,g,c);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),om(i,s,f,g,c);case 3:e:{if(am(s),i===null)throw Error(n(387));f=s.pendingProps,v=s.memoizedState,g=v.element,wp(i,s),Qa(s,f,null,c);var x=s.memoizedState;if(f=x.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){g=Is(Error(n(423)),s),s=lm(i,s,f,c,g);break e}else if(f!==g){g=Is(Error(n(424)),s),s=lm(i,s,f,c,g);break e}else for(zn=lr(s.stateNode.containerInfo.firstChild),Fn=s,_t=!0,hi=null,c=bp(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Rs(),f===g){s=Vi(i,s,c);break e}vn(i,s,f,c)}s=s.child}return s;case 5:return Ep(s),i===null&&ru(s),f=s.type,g=s.pendingProps,v=i!==null?i.memoizedProps:null,x=g.children,Yc(f,g)?x=null:v!==null&&Yc(f,v)&&(s.flags|=32),sm(i,s),vn(i,s,x,c),s.child;case 6:return i===null&&ru(s),null;case 13:return cm(i,s,c);case 4:return du(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=As(s,null,f,c):vn(i,s,f,c),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),tm(i,s,f,g,c);case 7:return vn(i,s,s.pendingProps,c),s.child;case 8:return vn(i,s,s.pendingProps.children,c),s.child;case 12:return vn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(f=s.type._context,g=s.pendingProps,v=s.memoizedProps,x=g.value,ht(Ya,f._currentValue),f._currentValue=x,v!==null)if(ui(v.value,x)){if(v.children===g.children&&!Cn.current){s=Vi(i,s,c);break e}}else for(v=s.child,v!==null&&(v.return=s);v!==null;){var A=v.dependencies;if(A!==null){x=v.child;for(var B=A.firstContext;B!==null;){if(B.context===f){if(v.tag===1){B=qi(-1,c&-c),B.tag=2;var G=v.updateQueue;if(G!==null){G=G.shared;var oe=G.pending;oe===null?B.next=B:(B.next=oe.next,oe.next=B),G.pending=B}}v.lanes|=c,B=v.alternate,B!==null&&(B.lanes|=c),cu(v.return,c,s),A.lanes|=c;break}B=B.next}}else if(v.tag===10)x=v.type===s.type?null:v.child;else if(v.tag===18){if(x=v.return,x===null)throw Error(n(341));x.lanes|=c,A=x.alternate,A!==null&&(A.lanes|=c),cu(x,c,s),x=v.sibling}else x=v.child;if(x!==null)x.return=v;else for(x=v;x!==null;){if(x===s){x=null;break}if(v=x.sibling,v!==null){v.return=x.return,x=v;break}x=x.return}v=x}vn(i,s,g.children,c),s=s.child}return s;case 9:return g=s.type,f=s.pendingProps.children,Os(s,c),g=Zn(g),f=f(g),s.flags|=1,vn(i,s,f,c),s.child;case 14:return f=s.type,g=di(f,s.pendingProps),g=di(f.type,g),nm(i,s,f,g,c);case 15:return im(i,s,s.type,s.pendingProps,c);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),al(i,s),s.tag=1,Nn(f)?(i=!0,$a(s)):i=!1,Os(s,c),Gp(s,f,g),Eu(s,f,g,c),Ru(null,s,f,!0,i,c);case 19:return hm(i,s,c);case 22:return rm(i,s,c)}throw Error(n(156,s.tag))};function Dm(i,s){return wa(i,s)}function uw(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(i,s,c,f){return new uw(i,s,c,f)}function Yu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function hw(i){if(typeof i=="function")return Yu(i)?1:0;if(i!=null){if(i=i.$$typeof,i===K)return 11;if(i===P)return 14}return 2}function yr(i,s){var c=i.alternate;return c===null?(c=ei(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function vl(i,s,c,f,g,v){var x=2;if(f=i,typeof i=="function")Yu(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case re:return Yr(c.children,g,v,s);case Z:x=8,g|=8;break;case F:return i=ei(12,c,s,g|2),i.elementType=F,i.lanes=v,i;case j:return i=ei(13,c,s,g),i.elementType=j,i.lanes=v,i;case W:return i=ei(19,c,s,g),i.elementType=W,i.lanes=v,i;case te:return yl(c,g,v,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case O:x=10;break e;case X:x=9;break e;case K:x=11;break e;case P:x=14;break e;case Y:x=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ei(x,c,s,g),s.elementType=i,s.type=f,s.lanes=v,s}function Yr(i,s,c,f){return i=ei(7,i,f,s),i.lanes=c,i}function yl(i,s,c,f){return i=ei(22,i,f,s),i.elementType=te,i.lanes=c,i.stateNode={isHidden:!1},i}function Xu(i,s,c){return i=ei(6,i,null,s),i.lanes=c,i}function Zu(i,s,c){return s=ei(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function dw(i,s,c,f,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ir(0),this.expirationTimes=ir(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ir(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Qu(i,s,c,f,g,v,x,A,B){return i=new dw(i,s,c,A,B),s===1?(s=1,v===!0&&(s|=8)):s=0,v=ei(3,null,null,s),i.current=v,v.stateNode=i,v.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},hu(v),i}function fw(i,s,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:f==null?null:""+f,children:i,containerInfo:s,implementation:c}}function Pm(i){if(!i)return ur;i=i._reactInternals;e:{if(Ui(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Nn(c))return up(i,c,s)}return s}function Bm(i,s,c,f,g,v,x,A,B){return i=Qu(c,f,!0,i,g,v,x,A,B),i.context=Pm(null),c=i.current,f=yn(),g=_r(c),v=qi(f,g),v.callback=s??null,fr(c,v,g),i.current.lanes=g,rr(i,g,f),An(i,f),i}function bl(i,s,c,f){var g=s.current,v=yn(),x=_r(g);return c=Pm(c),s.context===null?s.context=c:s.pendingContext=c,s=qi(v,x),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=fr(g,s,x),i!==null&&(mi(i,g,x,v),Za(i,g,x)),x}function Sl(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Fm(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Ju(i,s){Fm(i,s),(i=i.alternate)&&Fm(i,s)}function pw(){return null}var zm=typeof reportError=="function"?reportError:function(i){console.error(i)};function eh(i){this._internalRoot=i}wl.prototype.render=eh.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));bl(i,s,null,null)},wl.prototype.unmount=eh.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;qr(function(){bl(null,i,null,null)}),s[ji]=null}};function wl(i){this._internalRoot=i}wl.prototype.unstable_scheduleHydration=function(i){if(i){var s=Pr();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Vt.length&&s!==0&&s<Vt[c].priority;c++);Vt.splice(c,0,i),c===0&&Ef(i)}};function th(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function xl(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Um(){}function mw(i,s,c,f,g){if(g){if(typeof f=="function"){var v=f;f=function(){var G=Sl(x);v.call(G)}}var x=Bm(s,f,i,0,null,!1,!1,"",Um);return i._reactRootContainer=x,i[ji]=x.current,go(i.nodeType===8?i.parentNode:i),qr(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof f=="function"){var A=f;f=function(){var G=Sl(B);A.call(G)}}var B=Qu(i,0,!1,null,null,!1,!1,"",Um);return i._reactRootContainer=B,i[ji]=B.current,go(i.nodeType===8?i.parentNode:i),qr(function(){bl(s,B,c,f)}),B}function kl(i,s,c,f,g){var v=c._reactRootContainer;if(v){var x=v;if(typeof g=="function"){var A=g;g=function(){var B=Sl(x);A.call(B)}}bl(s,x,i,g)}else x=mw(c,s,i,g,f);return Sl(x)}io=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=nr(s.pendingLanes);c!==0&&(no(s,c|1),An(s,yt()),(tt&6)===0&&(Bs=yt()+500,hr()))}break;case 13:qr(function(){var f=Ki(i,1);if(f!==null){var g=yn();mi(f,i,1,g)}}),Ju(i,1)}},At=function(i){if(i.tag===13){var s=Ki(i,134217728);if(s!==null){var c=yn();mi(s,i,134217728,c)}Ju(i,134217728)}},rt=function(i){if(i.tag===13){var s=_r(i),c=Ki(i,s);if(c!==null){var f=yn();mi(c,i,s,f)}Ju(i,s)}},Pr=function(){return et},wi=function(i,s){var c=et;try{return et=i,s()}finally{et=c}},fs=function(i,s,c){switch(s){case"input":if(Pn(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var g=ja(f);if(!g)throw Error(n(90));nn(f),Pn(f,g)}}}break;case"textarea":qn(i,c);break;case"select":s=c.value,s!=null&&yi(i,!!c.multiple,s,!1)}},pe=qu,De=qr;var gw={usingClientEntryPoint:!1,Events:[yo,ks,ja,I,ee,qu]},Lo={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_w={bundleType:Lo.bundleType,version:Lo.version,rendererPackageName:Lo.rendererPackageName,rendererConfig:Lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ba(i),i===null?null:i.stateNode},findFiberByHostInstance:Lo.findFiberByHostInstance||pw,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 El=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!El.isDisabled&&El.supportsFiber)try{We=El.inject(_w),Ge=El}catch{}}return Mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gw,Mn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!th(s))throw Error(n(200));return fw(i,s,null,c)},Mn.createRoot=function(i,s){if(!th(i))throw Error(n(299));var c=!1,f="",g=zm;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Qu(i,1,!1,null,null,c,!1,f,g),i[ji]=s.current,go(i.nodeType===8?i.parentNode:i),new eh(s)},Mn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=ba(s),i=i===null?null:i.stateNode,i},Mn.flushSync=function(i){return qr(i)},Mn.hydrate=function(i,s,c){if(!xl(s))throw Error(n(200));return kl(null,i,s,!0,c)},Mn.hydrateRoot=function(i,s,c){if(!th(i))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,g=!1,v="",x=zm;if(c!=null&&(c.unstable_strictMode===!0&&(g=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onRecoverableError!==void 0&&(x=c.onRecoverableError)),s=Bm(s,null,i,1,c??null,g,!1,v,x),i[ji]=s.current,go(i),f)for(i=0;i<f.length;i++)c=f[i],g=c._getVersion,g=g(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,g]:s.mutableSourceEagerHydrationData.push(c,g);return new wl(s)},Mn.render=function(i,s,c){if(!xl(s))throw Error(n(200));return kl(null,i,s,!1,c)},Mn.unmountComponentAtNode=function(i){if(!xl(i))throw Error(n(40));return i._reactRootContainer?(qr(function(){kl(null,null,i,!1,function(){i._reactRootContainer=null,i[ji]=null})}),!0):!1},Mn.unstable_batchedUpdates=qu,Mn.unstable_renderSubtreeIntoContainer=function(i,s,c,f){if(!xl(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return kl(i,s,c,!1,f)},Mn.version="18.3.1-next-f1338f8080-20240426",Mn}var Gm;function Ew(){if(Gm)return rh.exports;Gm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rh.exports=kw(),rh.exports}var Ym;function Cw(){if(Ym)return Cl;Ym=1;var e=Ew();return Cl.createRoot=e.createRoot,Cl.hydrateRoot=e.hydrateRoot,Cl}var Nw=Cw(),lv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Xm=ns.createContext&&ns.createContext(lv),Tw=["attr","size","title"];function Rw(e,t){if(e==null)return{};var n,r,o=Aw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Aw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yl.apply(null,arguments)}function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zm(Object(n),!0).forEach(function(r){Mw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mw(e,t,n){return(t=Ow(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ow(e){var t=Lw(e,"string");return typeof t=="symbol"?t:t+""}function Lw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cv(e){return e&&e.map((t,n)=>ns.createElement(t.tag,Xl({key:n},t.attr),cv(t.child)))}function at(e){return t=>ns.createElement(Iw,Yl({attr:Xl({},e.attr)},t),cv(e.child))}function Iw(e){var t=n=>{var r=e.attr,o=e.size,a=e.title,l=Rw(e,Tw),u=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),ns.createElement("svg",Yl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:d,style:Xl(Xl({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),a&&ns.createElement("title",null,a),e.children)};return Xm!==void 0?ns.createElement(Xm.Consumer,null,n=>t(n)):t(lv)}function Dw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}function uc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function uv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function $h(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function Wd(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"4 17 10 11 4 5"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"20",y2:"19"},child:[]}]})(e)}function Pw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]}]})(e)}function Qm(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}function hc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function ss(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Bw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 3 19 12 5 21 5 3"},child:[]}]})(e)}function Wh(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function Kh(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},child:[]},{tag:"path",attr:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},child:[]}]})(e)}function Fw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(e)}function zw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"},child:[]},{tag:"path",attr:{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"},child:[]}]})(e)}function ra(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"},child:[]}]})(e)}function hv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"},child:[]},{tag:"polyline",attr:{points:"13 2 13 9 20 9"},child:[]}]})(e)}function Uw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"},child:[]},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"},child:[]},{tag:"polyline",attr:{points:"10 9 9 9 8 9"},child:[]}]})(e)}function Jm(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20h9"},child:[]},{tag:"path",attr:{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"},child:[]}]})(e)}function dv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function fv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function Kd(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"},child:[]},{tag:"rect",attr:{x:"9",y:"9",width:"6",height:"6"},child:[]},{tag:"line",attr:{x1:"9",y1:"1",x2:"9",y2:"4"},child:[]},{tag:"line",attr:{x1:"15",y1:"1",x2:"15",y2:"4"},child:[]},{tag:"line",attr:{x1:"9",y1:"20",x2:"9",y2:"23"},child:[]},{tag:"line",attr:{x1:"15",y1:"20",x2:"15",y2:"23"},child:[]},{tag:"line",attr:{x1:"20",y1:"9",x2:"23",y2:"9"},child:[]},{tag:"line",attr:{x1:"20",y1:"14",x2:"23",y2:"14"},child:[]},{tag:"line",attr:{x1:"1",y1:"9",x2:"4",y2:"9"},child:[]},{tag:"line",attr:{x1:"1",y1:"14",x2:"4",y2:"14"},child:[]}]})(e)}function pv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(e)}function jw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function dc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function ua(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function mv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(e)}function Hw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function $w(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function Do({trigger:e,open:t,onOpenChange:n,children:r,align:o="right",fit:a=!1}){const l=Q.useRef(null);return Q.useEffect(()=>{if(!t)return;const u=h=>{l.current&&!l.current.contains(h.target)&&n(!1)},d=h=>{h.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[t,n]),_.jsxs("div",{className:`dropdown ${o} ${a?"fit":""}`,ref:l,children:[_.jsxs("button",{type:"button",className:"chip",onClick:()=>n(!t),"aria-expanded":t,children:[e,_.jsx(ua,{className:`dd-caret ${t?"up":""}`})]}),t&&_.jsx("div",{className:"dd-menu",children:r})]})}function ah({active:e,onClick:t,children:n}){return _.jsx("button",{type:"button",className:`dd-item ${e?"active":""}`,onClick:t,children:n})}const gv="pi-web-ui:lang",Ww={cancel:"取消",ok:"确定",save:"保存",close:"关闭",loading:"加载中…",connected:"已连接",connecting:"连接中…",reconnecting:"重连中…",language:"语言",langZh:"中文",langEn:"English",copy:"复制",viewSwitch:"视图切换",chat:"对话",terminal:"终端",selectModel:"选择模型",availableModels:"可用模型",noModels:"暂无可用模型(请先配置 API 密钥)",reasoning:"推理",refreshModels:"刷新模型列表",manageModels:"⚙ 管理模型(新增 / 修改)",manageModelsTitle:"管理模型",thinkingLevel:"思考强度",thinking:"思考",thinkingChip:"思考:{level}",sound:"声音",newChat:"新对话",newChatTip:"新建对话(每个浏览器独立保存会话)","thinking.off":"关闭","thinking.minimal":"极简","thinking.low":"低","thinking.medium":"中","thinking.high":"高","thinking.xhigh":"极高","thinking.max":"最大",context:"上下文",contextUsage:"上下文用量",cumulativeCost:"累计成本",sessionMessages:"会话消息数",messages:"消息",pluginStatus:"插件状态",working:"工作中",queued:"排队",enterPath:"输入路径,Enter 切换",cwdTip:"工作目录:{path}(点击切换)",folderRef:"文件夹引用:{path}",refOnly:"仅引用:{path}",attachContent:"附加内容:{path}",attachLines:"附加选中行:{path}(第 {start}-{end} 行)",removeAttachment:"移除附件",attachHint:"将随下一条消息发送",followUpQueued:"⏳ {n} 条跟进消息排队中",steeringQueued:"⏳ {n} 条转向消息排队中",placeholderStreaming:"智能体正在工作中…(消息可排队发送)",placeholderIdle:"给 pi 发送消息 — Enter 发送,Shift+Enter 换行",placeholderConnecting:"正在连接服务器…",stopAgent:"停止智能体",stop:"停止",supplement:"补充",supplementTip:"当前回复完成后立即发送",sendTip:"发送(Enter)",recentProjects:"最近项目",openConversations:"打开的对话",historySessions:"历史对话",streaming:"进行中…",noHistory:"还没有历史对话",current:"当前",messageCount:"{n} 条消息",tuiTip:"pi 终端(TUI)中的对话",refreshList:"刷新列表",emptyChat:"空对话",editReask:"编辑重问",editReaskTip:"修改此问题,并从这里重新提问(会新建一个分支对话,原对话保留)",reaskFromHere:"从此处重新提问",editPlaceholder:"修改问题内容…",editHint:"⌘/Ctrl+Enter 提交 · Esc 取消",expandMsg:"展开",collapseMsg:"收起",toolCalls:"工具调用",bashRuns:"终端运行",images:"图片",update:"更新",updateTip:"检查并更新 pi-web-ui",currentVersion:"当前版本",latestVersion:"最新版本",checkingUpdate:"检查中…",checkUpdate:"检查更新",upToDate:"已是最新版本",updateAvailable:"发现新版本 v{version}",updateJustPublished:"v{version} 刚刚发布,npm 缓存可能尚未同步——若未检测到新版本,请稍后重新检查",updateNow:"立即更新",confirmUpdate:"确认更新(覆盖全局安装)",updateSuccess:"✅ 已更新,正在重启…",updateFailed:"更新失败:{detail}",restartHint:"重启:pi-web-ui server restart",refreshFiles:"刷新文件列表",rootDir:"根目录",noFiles:"暂无文件",linkFolderTip:"链接文件夹路径到对话",attachInlineTip:"附加内容到对话",referenceTip:"仅引用路径(AI 按需读取)",previewFile:"预览",downloadFile:"下载文件",downloadFailed:"下载失败:{error}",selectLinesHint:"点击选择行;拖拽或 Shift+点击选择范围",selectedRange:"已选 {n} 行(第 {start}-{end} 行)",fileLines:"{n} 行",selectAll:"全选",clearSelection:"清除",addToChat:"添加到对话",addedToChat:"已添加",previewTruncated:"⚠ 文件过大,仅预览前 512KB",previewLinesTruncated:"… 文件行数过多,仅显示前 {n} 行",binaryFile:"🔣 二进制文件,已显示前 4KB 十六进制",binaryHexTruncated:"(文件更大,可下载完整文件)",previewNotSupported:"该类型文件不支持预览(仅图片 / 视频 / 文本)",emptyFile:"(空文件)",pluginRequest:"插件请求",noOptions:"(无选项)",inputPlaceholder:"输入内容",soundHeader:"声音提示",enableSound:"启用声音",preview:"试听",volume:"音量","sound.question":"问卷弹出","sound.question.desc":"ask_user_question 出现时","sound.done":"回复结束","sound.done.desc":"智能体完成一轮回答时","sound.start":"回复开始","sound.start.desc":"智能体开始新一轮时","sound.error":"出错","sound.error.desc":"出现错误提示时",setupTitle:"未检测到 pi agent 配置",setupDesc:"pi-web-ui 需要 pi 的配置目录(~/.pi/agent)和至少一个 API 密钥才能运行智能体。pi 内置了 openai、anthropic、deepseek 等服务商——选一个填密钥即可,全程无需打开终端。",installFailed:"✖ pi agent 安装失败:",retryInstall:"重试安装",skip:"跳过",installDone:"✅ pi agent CLI 已安装。选择服务商并填入 API 密钥即可开始对话:",provider:"服务商",configured:"已配置",providerKeyReady:"该服务商已配置密钥,可直接使用或更换新密钥。",apiKey:"API 密钥",saving:"保存中…",saveAndStart:"保存并开始使用",recheck:"重新检测",installing:"正在安装 pi agent CLI…",autoInstall:"自动安装 pi agent",attachment:"附件",plugin:"插件",unknown:"未知",thinkingWait:"正在思考",exitCode:"退出码 {code}",cancelled:"已取消",truncated:"… 内容过长,当前视图已截断",outputTruncated:"… 输出过长,当前视图已截断",refOnlyShort:"仅引用",folderRefShort:"文件夹 · 仅引用",inlineLines:"内联 · {n} 行",inlineLinesRange:"行 {start}-{end}",image:"🖼 图片",folderNotExpanded:"文件夹,未展开内容 —— 智能体会按需浏览目录",fileNotExpanded:"文件较大({size}),未展开内容 —— 智能体会按需读取","role.user":"你","role.assistant":"pi","role.tool":"工具","role.bash":"终端","role.branch":"分支摘要","role.compaction":"上下文已压缩",welcomeTitle:"pi 编码智能体",welcomeSub:"检查、编辑、运行 —— 随时待命",directory:"目录",clickToFill:"点击填入输入框",waitingResponse:"正在等待模型响应…",backToBottom:"回到底部","ex.understand":"了解这个项目","ex.understand.prompt":"介绍一下这个项目:整体结构、主要模块和如何运行?","ex.debug":"排查一个问题","ex.debug.prompt":"帮我排查一个 bug,请先说明问题现象,我会补充细节。","ex.test":"编写测试","ex.test.prompt":"为项目的核心模块编写单元测试。","ex.review":"代码审查","ex.review.prompt":"审查最近改动的代码,指出潜在问题和改进建议。",error:"出错",done:"完成",running:"执行中…",toolQueued:"排队中",copyArgs:"复制参数",errorOutput:"错误输出",output:"输出",waitingOutput:"等待输出…",thinkingNow:"思考中",thinkingPreview:"思考:{preview}",commands:"命令",newCommand:"新建命令",newTerminal:"新建终端",name:"名称",command:"命令",cwdHint:"(${pwd} = 当前工作目录)",noCommands:"还没有命令,点 + 添加一个",clickToRun:"点击运行",edit:"编辑",delete:"删除",confirmQ:"确认?",commandsFileHint:"${pwd} 指代当前工作目录",builtinTerminal:"内置终端",termEmptySub:"点击左侧命令运行,或点右侧 + 新建终端",noTerminal:"暂无终端",exited:"(已退出{code})",closeTerminal:"关闭终端",rerun:"重新读取 .pi/commands.json",terminalTitle:"终端 {n}",exampleName:"例如:启动开发服务器",exampleCommand:"例如:npm run dev",editProvider:"编辑服务商",builtinProviders:"内置服务商",hintKeyOnly:"只需填入 API 密钥",configuredBadge:"✓ 已配置",keyReady:"密钥已就绪",pasteKey:"粘贴 API 密钥…",savingKey:"保存中",saveKey:"保存密钥",customProviders:"自定义服务商",customDesc:"用于 Ollama / vLLM / 兼容 OpenAI 的代理等,写入 pi 的 models.json,保存后热重载、立即生效。",noCustomProviders:"还没有自定义服务商",modelsCount:"{n} 个模型",addProvider:"新增服务商",providerId:"服务商 ID",providerIdHint:"(必填,如 ollama / my-proxy)",displayName:"显示名",displayNamePh:"我的代理",apiType:"API 类型",baseUrlHint:"(OpenAI 兼容端点)",apiKeyHint:"sk-…(可留空,用 auth.json 的密钥)",authHeader:"自动添加 Authorization 请求头",modelsTitle:"模型",modelIdReq:"模型 ID(必填)",text:"文本",textImage:"文本+图片",contextWindow:"上下文",maxOutput:"最大输出",removeModel:"移除模型",addModel:"添加模型",deleteProviderConfirm:"删除服务商 {id} 及其 {n} 个模型?",loadingSession:"正在加载会话…",connectingServer:"正在连接 pi-web-ui 服务器…"},Kw={cancel:"Cancel",ok:"OK",save:"Save",close:"Close",loading:"Loading…",connected:"Connected",connecting:"Connecting…",reconnecting:"Reconnecting…",language:"Language",langZh:"中文",langEn:"English",copy:"Copy",viewSwitch:"Switch view",chat:"Chat",terminal:"Terminal",selectModel:"Select model",availableModels:"Available models",noModels:"No models available (configure an API key first)",reasoning:"reasoning",refreshModels:"Refresh model list",manageModels:"⚙ Manage models (add / edit)",manageModelsTitle:"Manage models",thinkingLevel:"Thinking level",thinking:"Thinking",thinkingChip:"Thinking: {level}",sound:"Sound",newChat:"New chat",newChatTip:"New chat (sessions are saved per browser)","thinking.off":"Off","thinking.minimal":"Minimal","thinking.low":"Low","thinking.medium":"Medium","thinking.high":"High","thinking.xhigh":"Extra high","thinking.max":"Max",context:"Context",contextUsage:"Context usage",cumulativeCost:"Cumulative cost",sessionMessages:"Session messages",messages:"messages",pluginStatus:"Plugin status",working:"Working",queued:"queued",enterPath:"Type a path, Enter to switch",cwdTip:"Working directory: {path} (click to switch)",folderRef:"Folder reference: {path}",refOnly:"Reference only: {path}",attachContent:"Attached content: {path}",attachLines:"Attached selected lines: {path} (lines {start}-{end})",removeAttachment:"Remove attachment",attachHint:"Will be sent with the next message",followUpQueued:"⏳ {n} follow-up message(s) queued",steeringQueued:"⏳ {n} steering message(s) queued",placeholderStreaming:"The agent is working… (messages will queue)",placeholderIdle:"Message pi — Enter to send, Shift+Enter for newline",placeholderConnecting:"Connecting to server…",stopAgent:"Stop agent",stop:"Stop",supplement:"Follow-up",supplementTip:"Send immediately after the current reply finishes",sendTip:"Send (Enter)",recentProjects:"Recent projects",openConversations:"Open chats",historySessions:"History",streaming:"Streaming…",noHistory:"No previous chats",current:"Current",messageCount:"{n} messages",tuiTip:"Chat in the pi terminal (TUI)",refreshList:"Refresh list",emptyChat:"Empty chat",editReask:"Edit & re-ask",editReaskTip:"Edit this question and re-ask from here (forks a new conversation; the original is kept)",reaskFromHere:"Re-ask from here",editPlaceholder:"Edit the question…",editHint:"⌘/Ctrl+Enter to submit · Esc to cancel",expandMsg:"Expand",collapseMsg:"Collapse",toolCalls:"tool calls",bashRuns:"bash runs",images:"images",update:"Update",updateTip:"Check & update pi-web-ui",currentVersion:"Current version",latestVersion:"Latest version",checkingUpdate:"Checking…",checkUpdate:"Check for updates",upToDate:"You're up to date",updateAvailable:"New version v{version} available",updateJustPublished:"v{version} was just published — npm cache may lag; if the new version isn't detected yet, re-check in a moment",updateNow:"Update now",confirmUpdate:"Confirm (replaces global install)",updateSuccess:"✅ Updated — restarting…",updateFailed:"Update failed: {detail}",restartHint:"Restart: pi-web-ui server restart",refreshFiles:"Refresh file list",rootDir:"Root",noFiles:"No files",linkFolderTip:"Link folder path to chat",attachInlineTip:"Attach content to chat",referenceTip:"Reference path only (AI reads on demand)",previewFile:"Preview",downloadFile:"Download file",downloadFailed:"Download failed: {error}",selectLinesHint:"Click a line to select; drag or Shift+click for a range",selectedRange:"Selected {n} lines (lines {start}-{end})",fileLines:"{n} lines",selectAll:"Select all",clearSelection:"Clear",addToChat:"Add to chat",addedToChat:"Added",previewTruncated:"⚠ File too large — previewing the first 512KB",previewLinesTruncated:"… too many lines — showing the first {n}",binaryFile:"🔣 Binary file — first 4KB shown as hex",binaryHexTruncated:" (file larger — download for the full file)",previewNotSupported:"This file type can't be previewed (only images / videos / text)",emptyFile:"(empty file)",pluginRequest:"Plugin request",noOptions:"(no options)",inputPlaceholder:"Enter content",soundHeader:"Sound notifications",enableSound:"Enable sound",preview:"Preview",volume:"Volume","sound.question":"Question popup","sound.question.desc":"When ask_user_question appears","sound.done":"Reply finished","sound.done.desc":"When the agent finishes a turn","sound.start":"Reply started","sound.start.desc":"When the agent starts a new turn","sound.error":"Error","sound.error.desc":"When an error notice appears",setupTitle:"pi agent config not detected",setupDesc:"pi-web-ui needs pi's config directory (~/.pi/agent) and at least one API key to run the agent. pi has built-in providers such as openai, anthropic, and deepseek — just pick one and enter a key, no terminal needed.",installFailed:"✖ pi agent installation failed:",retryInstall:"Retry install",skip:"Skip",installDone:"✅ pi agent CLI installed. Pick a provider and enter an API key to start chatting:",provider:"Provider",configured:"configured",providerKeyReady:"This provider already has a key — use it or replace it.",apiKey:"API key",saving:"Saving…",saveAndStart:"Save and start using",recheck:"Recheck",installing:"Installing pi agent CLI…",autoInstall:"Auto-install pi agent",attachment:"Attachment",plugin:"plugin",unknown:"unknown",thinkingWait:"Thinking",exitCode:"Exit code {code}",cancelled:"Cancelled",truncated:"… content too long, truncated in this view",outputTruncated:"… output too long, truncated in this view",refOnlyShort:"Reference only",folderRefShort:"Folder · reference only",inlineLines:"Inline · {n} lines",inlineLinesRange:"Lines {start}-{end}",image:"🖼 Image",folderNotExpanded:"Folder — content not expanded, the agent will browse it as needed",fileNotExpanded:"Large file ({size}) — content not expanded, the agent will read it as needed","role.user":"You","role.assistant":"pi","role.tool":"Tool","role.bash":"Terminal","role.branch":"Branch summary","role.compaction":"Context compacted",welcomeTitle:"pi coding agent",welcomeSub:"Inspect, edit, run — always ready",directory:"Directory",clickToFill:"Click to fill input",waitingResponse:"Waiting for model response…",backToBottom:"Back to bottom","ex.understand":"Understand this project","ex.understand.prompt":"Introduce this project: overall structure, main modules, and how to run it?","ex.debug":"Debug an issue","ex.debug.prompt":"Help me debug a bug — describe the symptom first, and I'll add details.","ex.test":"Write tests","ex.test.prompt":"Write unit tests for the core modules.","ex.review":"Code review","ex.review.prompt":"Review the recently changed code and point out potential issues and improvements.",error:"Error",done:"Done",running:"Running…",toolQueued:"Queued",copyArgs:"Copy args",errorOutput:"Error output",output:"Output",waitingOutput:"Waiting for output…",thinkingNow:"Thinking",thinkingPreview:"Thinking: {preview}",commands:"Commands",newCommand:"New command",newTerminal:"New terminal",name:"Name",command:"Command",cwdHint:"(${pwd} = current working directory)",noCommands:"No commands yet — click + to add one",clickToRun:"Click to run",edit:"Edit",delete:"Delete",confirmQ:"Confirm?",commandsFileHint:"${pwd} refers to the current working directory",builtinTerminal:"Built-in terminal",termEmptySub:"Click a command on the left to run it, or + on the right for a new terminal",noTerminal:"No terminals",exited:"(exited{code})",closeTerminal:"Close terminal",rerun:"Reload .pi/commands.json",terminalTitle:"Terminal {n}",exampleName:"e.g. start dev server",exampleCommand:"e.g. npm run dev",editProvider:"Edit provider",builtinProviders:"Built-in providers",hintKeyOnly:"Just enter an API key",configuredBadge:"✓ Configured",keyReady:"Key ready",pasteKey:"Paste API key…",savingKey:"Saving",saveKey:"Save key",customProviders:"Custom providers",customDesc:"For Ollama / vLLM / OpenAI-compatible proxies, etc. Written to pi's models.json — hot-reloaded immediately.",noCustomProviders:"No custom providers yet",modelsCount:"{n} models",addProvider:"Add provider",providerId:"Provider ID",providerIdHint:"(required, e.g. ollama / my-proxy)",displayName:"Display name",displayNamePh:"My proxy",apiType:"API type",baseUrlHint:"(OpenAI-compatible endpoint)",apiKeyHint:"sk-… (optional — uses the auth.json key)",authHeader:"Auto-add Authorization header",modelsTitle:"Models",modelIdReq:"Model ID (required)",text:"Text",textImage:"Text+image",contextWindow:"Context",maxOutput:"Max output",removeModel:"Remove model",addModel:"Add model",deleteProviderConfirm:"Delete provider {id} and its {n} models?",loadingSession:"Loading session…",connectingServer:"Connecting to pi-web-ui server…"},_v=Q.createContext(null);function qw(){try{const e=localStorage.getItem(gv);if(e==="zh"||e==="en")return e}catch{}return"zh"}function Vw({children:e}){const[t,n]=Q.useState(qw),r=Q.useCallback(l=>{n(l);try{localStorage.setItem(gv,l)}catch{}},[]),o=Q.useCallback((l,u)=>{let d=Kw[l];if(t==="zh"&&(d=Ww[l]),u)for(const[h,p]of Object.entries(u))d=d.replaceAll(`{${h}}`,String(p));return d},[t]);Q.useEffect(()=>{document.documentElement.lang=t==="zh"?"zh-CN":"en"},[t]);const a=Q.useMemo(()=>({locale:t,setLocale:r,t:o}),[t,r,o]);return _.jsx(_v.Provider,{value:a,children:e})}function vv(){const e=Q.useContext(_v);if(!e)throw new Error("useI18n must be used within LanguageProvider");return e}function qt(){return vv().t}const Gw=[{kind:"question",labelKey:"sound.question",descKey:"sound.question.desc"},{kind:"done",labelKey:"sound.done",descKey:"sound.done.desc"},{kind:"start",labelKey:"sound.start",descKey:"sound.start.desc"},{kind:"error",labelKey:"sound.error",descKey:"sound.error.desc"}];function Yw({settings:e,onChange:t,onPreview:n}){const r=qt(),o=a=>t({...e,...a});return _.jsxs("div",{className:"sound-menu",children:[_.jsx("div",{className:"dd-header",children:r("soundHeader")}),_.jsxs("label",{className:"sound-row sound-master",children:[_.jsxs("span",{className:"sound-label",children:[_.jsx(uv,{className:"sound-icon"}),_.jsx("span",{children:r("enableSound")})]}),_.jsx("input",{type:"checkbox",checked:e.enabled,onChange:a=>o({enabled:a.target.checked})})]}),Gw.map(({kind:a,labelKey:l,descKey:u})=>_.jsxs("label",{className:`sound-row ${e.enabled?"":"disabled"}`,children:[_.jsxs("span",{className:"sound-label",children:[_.jsx("span",{className:"sound-name",children:r(l)}),_.jsx("span",{className:"sound-desc",children:r(u)})]}),_.jsxs("span",{className:"sound-right",children:[_.jsx("button",{type:"button",className:"sound-preview",title:r("preview"),disabled:!e.enabled,onClick:d=>{d.preventDefault(),n(a)},children:r("preview")}),_.jsx("input",{type:"checkbox",checked:e[a],disabled:!e.enabled,onChange:d=>o({[a]:d.target.checked})})]})]},a)),_.jsxs("div",{className:`sound-volume ${e.enabled?"":"disabled"}`,children:[_.jsx("span",{className:"sound-name",children:r("volume")}),_.jsx("input",{type:"range",min:0,max:100,step:5,value:e.volume,disabled:!e.enabled,onChange:a=>o({volume:Number(a.target.value)})}),_.jsxs("span",{className:"sound-vol-num",children:[e.volume,"%"]})]})]})}const Xw=["off","minimal","low","medium","high","xhigh","max"];function Zw({chat:e,send:t,view:n,onViewChange:r,onManageModels:o,sound:a,onSoundChange:l,onSoundPreview:u}){var te,z,ie,C,D;const{locale:d,setLocale:h,t:p}=vv(),m=e.state,y=m==null?void 0:m.model,b=y?`${y.provider}/${y.id}`:null,[w,S]=Q.useState(!1),[k,E]=Q.useState(!1),[T,N]=Q.useState(!1),[M,q]=Q.useState(!1),[L,re]=Q.useState(!1),[Z,F]=Q.useState(!1),[O,X]=Q.useState(!1),K=Xw.map(H=>({value:H,label:p(`thinking.${H}`)})),j=H=>{var R;return((R=K.find(ge=>ge.value===H))==null?void 0:R.label)??H},W=[{value:"zh",label:p("langZh")},{value:"en",label:p("langEn")}];Q.useEffect(()=>{w&&e.models.length===0&&!O&&(X(!0),t({type:"list_models"}))},[w,e.models.length,O,t]),Q.useEffect(()=>{e.models.length>0&&X(!1)},[e.models.length]);const P=e.ready?p("connected"):e.status==="closed"?p("reconnecting"):p("connecting"),Y=e.ready?"ok":"busy";return _.jsxs("header",{className:"topbar",children:[_.jsxs("div",{className:"brand",children:[_.jsx("span",{className:"brand-logo",children:"π"}),_.jsx("span",{className:"brand-name",children:"pi-web-ui"}),_.jsx("span",{className:`conn-dot ${Y}`,title:P}),_.jsx("span",{className:"conn-label",children:P})]}),_.jsxs("div",{className:"topbar-actions",children:[_.jsxs("div",{className:"view-switch",role:"tablist","aria-label":p("viewSwitch"),children:[_.jsxs("button",{type:"button",role:"tab","aria-selected":n==="chat",className:n==="chat"?"active":"",onClick:()=>r("chat"),children:[_.jsx(Wh,{}),_.jsx("span",{children:p("chat")})]}),_.jsxs("button",{type:"button",role:"tab","aria-selected":n==="terminal",className:n==="terminal"?"active":"",onClick:()=>r("terminal"),children:[_.jsx(Wd,{}),_.jsx("span",{children:p("terminal")})]})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Kd,{}),_.jsx("span",{className:"chip-model",children:y?y.name:p("selectModel")}),y&&_.jsx("span",{className:"chip-sub",children:y.provider})]}),open:w,onOpenChange:S,children:[_.jsx("div",{className:"dd-header",children:p("availableModels")}),(O||e.modelsLoading)&&_.jsx("div",{className:"dd-loading",children:p("loading")}),e.models.length===0&&!O&&!e.modelsLoading&&_.jsx("div",{className:"dd-loading",children:p("noModels")}),e.models.map(H=>_.jsxs(ah,{active:b===H.id,onClick:()=>{b!==H.id&&t({type:"set_model",modelId:H.id}),S(!1)},children:[_.jsx("span",{className:"dd-model-name",children:H.name}),_.jsxs("span",{className:"dd-model-sub",children:[H.provider,H.reasoning?` · ${p("reasoning")}`:""]})]},H.id)),_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"list_models"}),children:p("refreshModels")}),_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>{S(!1),o()},children:p("manageModels")})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Dw,{}),_.jsx("span",{className:"chip-sub",children:p("thinkingChip",{level:m?j(m.thinkingLevel):"—"})})]}),open:k,onOpenChange:E,children:[_.jsx("div",{className:"dd-header",children:p("thinkingLevel")}),K.map(H=>_.jsx(ah,{active:(m==null?void 0:m.thinkingLevel)===H.value,onClick:()=>{(m==null?void 0:m.thinkingLevel)!==H.value&&t({type:"set_thinking",level:H.value}),E(!1)},children:H.label},H.value))]}),_.jsx(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(uv,{}),_.jsx("span",{className:"chip-sub",children:p("sound")})]}),open:T,onOpenChange:N,children:_.jsx(Yw,{settings:a,onChange:l,onPreview:u})}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(zw,{}),_.jsx("span",{className:"chip-sub",children:d==="zh"?p("langZh"):"EN"})]}),open:M,onOpenChange:q,children:[_.jsx("div",{className:"dd-header",children:p("language")}),W.map(H=>_.jsx(ah,{active:d===H.value,onClick:()=>{h(H.value),q(!1)},children:H.label},H.value))]}),_.jsxs("button",{type:"button",className:"chip newchat","data-tip":p("newChatTip"),onClick:()=>t({type:"new_chat"}),children:[_.jsx(ss,{}),_.jsx("span",{children:p("newChat")})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(fv,{}),_.jsxs("span",{className:"chip-sub",children:["v",((te=e.update)==null?void 0:te.current)??"…"]}),e.update&&!e.update.upToDate&&!e.update.pendingRestart&&_.jsx("span",{className:"update-dot",title:p("updateAvailable",{version:e.update.latest??""})})]}),open:L,onOpenChange:H=>{re(H),F(!1),H&&t({type:"check_update"})},fit:!0,children:[_.jsx("div",{className:"dd-header",children:p("update")}),_.jsxs("div",{className:"dd-update",children:[_.jsxs("div",{className:"dd-row",children:[_.jsx("span",{children:p("currentVersion")}),_.jsxs("b",{children:["v",((z=e.update)==null?void 0:z.current)??"…"]})]}),_.jsxs("div",{className:"dd-row",children:[_.jsx("span",{children:p("latestVersion")}),_.jsx("b",{children:e.update===null?p("checkingUpdate"):e.update.error?e.update.error:e.update.latest?`v${e.update.latest}`:p("checkingUpdate")})]}),((ie=e.update)==null?void 0:ie.pendingRestart)&&_.jsx("div",{className:"dd-note ok",children:p("updateSuccess")}),e.update&&!e.update.pendingRestart&&e.update.upToDate&&_.jsx("div",{className:"dd-note ok",children:p("upToDate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&_.jsx("div",{className:"dd-note warn",children:p("updateAvailable",{version:e.update.latest})}),((C=e.update)==null?void 0:C.latestPublishedAt)&&Date.now()-new Date(e.update.latestPublishedAt).getTime()<30*6e4&&_.jsx("div",{className:"dd-note warn",children:p("updateJustPublished",{version:e.update.latest??""})}),e.updateResult&&!e.updateResult.ok&&_.jsx("div",{className:"dd-note err",children:p("updateFailed",{detail:e.updateResult.detail})}),((D=e.update)==null?void 0:D.pendingRestart)&&_.jsx("div",{className:"dd-note",children:p("restartHint")})]}),_.jsxs("div",{className:"dd-actions",children:[_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"check_update"}),children:e.update===null?p("checkingUpdate"):p("checkUpdate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&_.jsx("button",{type:"button",className:`dd-refresh accent ${Z?"armed":""}`,onClick:()=>{if(!Z){F(!0);return}F(!1),re(!1),t({type:"update_app"})},children:p(Z?"confirmUpdate":"updateNow")})]})]})]})]})}function eg(e){const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:`${t.getMonth()+1}/${t.getDate()}`}function Qw({chat:e,send:t}){var h,p;const n=qt(),r=(h=e.state)==null?void 0:h.sessionFile,o=(p=e.state)==null?void 0:p.cwd,a=e.sessions,l=e.projects,u=m=>{const y=m.name||m.firstMessage.trim();return y.length>0?y:n("emptyChat")},d=m=>m.split(/[\\/]/).pop()||m;return _.jsxs("aside",{className:"panel panel-left",children:[l.length>0&&_.jsxs("div",{className:"panel-projects",children:[_.jsx("div",{className:"panel-section-title",children:n("recentProjects")}),l.map(m=>{const y=o===m.path;return _.jsxs("button",{type:"button",className:`project-item ${y?"active":""}`,title:m.path,onClick:()=>{y||t({type:"set_cwd",path:m.path})},children:[_.jsx(ra,{className:"project-icon"}),_.jsxs("span",{className:"project-info",children:[_.jsx("span",{className:"project-name",children:d(m.path)}),_.jsx("span",{className:"project-path",children:m.path})]}),_.jsx("span",{className:"project-time",children:eg(m.lastUsed)})]},m.path)})]}),_.jsxs("div",{className:"panel-body",children:[e.conversations.length>1&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"panel-section-title",children:n("openConversations")}),e.conversations.map(m=>{const y=e.activeConversationId===m.id;return _.jsxs("button",{type:"button",className:`session-item ${y?"active":""}`,title:`${m.title} — ${m.cwd}`,onClick:()=>{y||t({type:"switch_conversation",id:m.id})},children:[_.jsx(Wh,{className:"session-icon"}),_.jsxs("span",{className:"session-info",children:[_.jsx("span",{className:"session-title",children:m.title}),_.jsxs("span",{className:"session-sub",children:[_.jsxs("span",{className:"session-cwd",title:m.cwd,children:[_.jsx(ra,{})," ",d(m.cwd)]}),y?n("current"):n("messageCount",{n:m.messageCount})]})]}),m.isStreaming&&_.jsx("span",{className:"conv-streaming",title:n("streaming")})]},m.id)}),_.jsx("div",{className:"panel-section-divider"})]}),_.jsx("div",{className:"panel-section-title",children:n("historySessions")}),a.length===0&&_.jsx("div",{className:"panel-empty",children:n("noHistory")}),a.map(m=>{const y=r===m.path;return _.jsxs("button",{type:"button",className:`session-item ${y?"active":""}`,title:m.path,onClick:()=>{y||t({type:"switch_session",path:m.path})},children:[_.jsx(Wh,{className:"session-icon"}),_.jsxs("span",{className:"session-info",children:[_.jsx("span",{className:"session-title",children:u(m)}),_.jsxs("span",{className:"session-sub",children:[y?n("current"):n("messageCount",{n:m.messageCount}),m.source==="tui"&&_.jsx("span",{className:"session-src",title:n("tuiTip"),children:"TUI"})]})]}),_.jsx("span",{className:"session-time",children:eg(m.modified)})]},m.path)})]}),_.jsx("button",{type:"button",className:"panel-fab",title:n("refreshList"),onClick:()=>{t({type:"list_sessions"}),t({type:"list_projects"})},children:_.jsx(hc,{})})]})}const tg=2e5,Jw=2e5;function e0(){const e=new Map,t=new Map;return{write(n,r){const o=e.get(n);if(o){o.write(r);return}const a=t.get(n)??"",l=a.length+r.length>Jw?r:a+r;t.set(n,l)},register(n,r){e.set(n,r);const o=t.get(n);if(o){try{r.write(o)}catch{}t.delete(n)}return()=>{e.get(n)===r&&e.delete(n),t.delete(n)}},clear(){e.clear(),t.clear()}}}function t0(e,t){const n=new Set;for(const o of t.messages)o.role==="toolResult"&&o.toolCallId&&n.add(o.toolCallId),o.role==="bashExecution"&&n.add(`bash-${o.id}`);let r=!1;for(const o of e.keys())n.has(o)&&(e.delete(o),r=!0);return r?new Map(e):e}function n0(e,t){switch(t.type){case"status":return{...e,status:t.status,ready:t.status==="open"?e.ready:!1,terminals:t.status==="open"?e.terminals:[]};case"ready":return{...e,serverVersion:t.serverVersion,ready:!0};case"snapshot":return{...e,ready:!0,state:t.state,activeConversationId:t.state.conversationId,liveOutputs:t0(e.liveOutputs,t.state)};case"tool_delta":{const n=e.liveOutputs.get(t.toolCallId),r=((n==null?void 0:n.text)??"")+t.delta,o=r.length>tg?r.slice(0,tg):r,a=new Map(e.liveOutputs);return a.set(t.toolCallId,{toolName:t.toolName,text:o}),{...e,liveOutputs:a}}case"notice":return{...e,notices:[...e.notices,t.notice].slice(-6)};case"dismiss_notice":return{...e,notices:e.notices.filter(n=>n.id!==t.id)};case"sessions":return{...e,sessions:t.sessions};case"conversations":return{...e,conversations:t.conversations,activeConversationId:t.activeId};case"projects":return{...e,projects:t.projects};case"files":return{...e,files:t.files};case"file_content":return{...e,fileContent:t.content};case"models":return{...e,models:t.models,modelsLoading:t.loading};case"models_config":return{...e,modelsConfig:t.providers};case"providers_status":return{...e,providers:t.providers};case"install_result":return{...e,installResult:t.result};case"path_completions":return{...e,pathCompletions:t.completions};case"update_status":return{...e,update:t.status};case"update_result":return{...e,updateResult:t.result};case"widgets":return{...e,widgets:t.widgets};case"statuses":return{...e,statuses:t.statuses};case"dialog":return{...e,dialog:t.dialog};case"commands":return{...e,commands:t.commands,commandsPath:t.path};case"terminal_add":return{...e,terminals:[...e.terminals,t.meta]};case"terminal_remove":return{...e,terminals:e.terminals.filter(n=>n.id!==t.id)};case"terminal_exit":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!1,exitCode:t.exitCode}:n)};case"terminal_restart":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!0,exitCode:null}:n)};default:return e}}const ng="pi-web-client-id";function qd(){let e=localStorage.getItem(ng);return e||(e=crypto.randomUUID(),localStorage.setItem(ng,e)),e}function i0(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`}function r0(){const[e,t]=Q.useReducer(n0,{status:"connecting",ready:!1,state:null,liveOutputs:new Map,notices:[],sessions:[],conversations:[],activeConversationId:"",projects:[],files:null,fileContent:null,models:[],modelsLoading:!1,modelsConfig:[],providers:[],installResult:null,pathCompletions:[],update:null,updateResult:null,widgets:[],statuses:[],dialog:null,commands:[],commandsPath:"",terminals:[]}),n=Q.useRef(null),r=Q.useRef(e0()),o=Q.useRef(0),a=Q.useRef(null),l=Q.useRef(!0),u=Q.useRef(0),d=Q.useRef(0),h=Q.useCallback((T,N)=>{const M=++d.current;t({type:"notice",notice:{id:M,level:T,text:N}}),setTimeout(()=>t({type:"dismiss_notice",id:M}),T==="error"?12e3:7e3)},[]),p=Q.useCallback(T=>{const N=n.current;return N&&N.readyState===WebSocket.OPEN?(N.send(JSON.stringify(T)),!0):!1},[]),m=Q.useCallback(()=>{if(!l.current)return;t({type:"status",status:"connecting"});const T=new WebSocket(i0());n.current=T,T.onopen=()=>{n.current===T&&(t({type:"status",status:"open"}),o.current=0,u.current=Date.now(),T.send(JSON.stringify({type:"hello",clientId:qd()})))},T.onmessage=N=>{if(n.current!==T)return;u.current=Date.now();let M;try{M=JSON.parse(N.data)}catch{return}switch(M.type){case"ready":t({type:"ready",serverVersion:M.serverVersion}),T.send(JSON.stringify({type:"get_state"})),T.send(JSON.stringify({type:"list_sessions"})),T.send(JSON.stringify({type:"list_projects"})),T.send(JSON.stringify({type:"list_files"})),T.send(JSON.stringify({type:"list_models"})),T.send(JSON.stringify({type:"list_commands"})),T.send(JSON.stringify({type:"check_update"}));break;case"snapshot":t({type:"snapshot",state:M.state});break;case"tool_delta":t({type:"tool_delta",toolCallId:M.toolCallId,toolName:M.toolName,delta:M.delta});break;case"notice":{const q=++d.current;t({type:"notice",notice:{id:q,level:M.level,text:M.text}}),setTimeout(()=>t({type:"dismiss_notice",id:q}),M.level==="error"?12e3:7e3);break}case"sessions":t({type:"sessions",sessions:M.sessions});break;case"conversations":t({type:"conversations",conversations:M.conversations,activeId:M.activeId});break;case"projects":t({type:"projects",projects:M.projects});break;case"files":t({type:"files",files:M});break;case"file_content":t({type:"file_content",content:M});break;case"models":t({type:"models",models:M.models,loading:!1});break;case"models_config":t({type:"models_config",providers:M.providers});break;case"providers_status":t({type:"providers_status",providers:M.providers});break;case"install_result":t({type:"install_result",result:M});break;case"path_completions":t({type:"path_completions",completions:M.completions});break;case"update_status":t({type:"update_status",status:M});break;case"update_result":t({type:"update_result",result:M});break;case"widgets":t({type:"widgets",widgets:M.widgets});break;case"statuses":t({type:"statuses",statuses:M.statuses});break;case"dialog":t({type:"dialog",dialog:{id:M.id,kind:M.kind,title:M.title,args:M.args}});break;case"dialog_closed":t({type:"dialog",dialog:null});break;case"terminal_output":r.current.write(M.terminalId,M.data);break;case"terminal_exit":t({type:"terminal_exit",terminalId:M.terminalId,exitCode:M.exitCode});break;case"commands":t({type:"commands",commands:M.commands,path:M.path});break}},T.onclose=()=>{if(n.current===T&&(n.current=null),r.current.clear(),!l.current)return;t({type:"status",status:"closed"});const N=Math.min(1e3*2**o.current,1e4);o.current+=1,a.current=setTimeout(()=>{a.current=null,m()},N)},T.onerror=()=>{T.close()}},[]);Q.useEffect(()=>{l.current=!0,m();const T=setInterval(()=>{if(!l.current)return;const N=n.current;N&&N.readyState===WebSocket.OPEN&&Date.now()-u.current>3e4&&N.close()},5e3);return()=>{var N;l.current=!1,clearInterval(T),a.current&&(clearTimeout(a.current),a.current=null),(N=n.current)==null||N.close(),n.current=null}},[m]);const y=Q.useCallback(T=>t({type:"dismiss_notice",id:T}),[]),b=Q.useCallback(T=>t({type:"terminal_add",meta:T}),[]),w=Q.useCallback(T=>t({type:"terminal_remove",id:T}),[]),S=Q.useCallback(T=>t({type:"terminal_restart",terminalId:T}),[]),k=Q.useCallback((T,N)=>r.current.register(T,N),[]),E=Q.useRef({chat:e,send:p,pushNotice:h,dismissNotice:y,terminal:{create:b,close:w,register:k,restart:S}});return E.current={chat:e,send:p,pushNotice:h,dismissNotice:y,terminal:{create:b,close:w,register:k,restart:S}},E.current}const s0=200*1024*1024,o0=/windows/i.test(navigator.userAgent),a0=/[<>:"/\\|?*\u0000-\u001f]/g,l0=/[. ]+$/,c0=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i;function u0(e){const t=e.replace(a0,"_").replace(l0,"");return t?c0.test(t)?`_${t}`:t:"_"}function ig(e,t=!0){return`/api/file?${new URLSearchParams({clientId:qd(),path:e,...t?{download:"1"}:{}})}`}async function h0(e,t){const n=o0?u0(t):t;try{const r=await fetch(ig(e));if(!r.ok)return{ok:!1,cancelled:!1,error:await r.text().catch(()=>"")||(r.status===404?"文件不存在":`HTTP ${r.status}`)};if(Number(r.headers.get("content-length")??"0")>s0)return window.location.assign(ig(e)),{ok:!0};const a=await r.blob();return window.showSaveFilePicker&&window.isSecureContext?d0(a,n):qh(a,n)}catch(r){return{ok:!1,cancelled:!1,error:r instanceof Error?r.message:String(r)}}}async function d0(e,t){let n;const r=window.showSaveFilePicker;if(!r)return qh(e,t);try{n=await r({suggestedName:t})}catch(o){return o instanceof DOMException&&o.name==="AbortError"?{ok:!1,cancelled:!0}:qh(e,t)}try{const o=await n.createWritable();return await o.write(e),await o.close(),{ok:!0}}catch(o){return{ok:!1,cancelled:!1,error:o instanceof Error?o.message:String(o)}}}function qh(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");return r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),{ok:!0}}function f0({chat:e,send:t,onAttach:n,onPreview:r,onNotice:o}){var T;const a=qt(),[l,u]=Q.useState(""),[d,h]=Q.useState(!1),p=e.files,m=1e4,y=Q.useRef(0),b=Q.useRef(void 0),w=Q.useCallback((N,M)=>{const q=++y.current;u(N),M!=null&&M.silent||h(!0),t({type:"list_files",path:N===""?void 0:N})||y.current===q&&h(!1)},[t]);Q.useEffect(()=>{p&&p.path===l&&h(!1)},[p,l]),Q.useEffect(()=>{var q;const N=(q=e.state)==null?void 0:q.cwd;if(N!==b.current){b.current=N,w("",{silent:!0});return}const M=setInterval(()=>{document.visibilityState!=="hidden"&&w(l,{silent:!0})},m);return()=>clearInterval(M)},[(T=e.state)==null?void 0:T.cwd,l,w]);const S=N=>w(N),k=()=>{(p==null?void 0:p.parent)!==null&&(p==null?void 0:p.parent)!==void 0&&w(p.parent)},E=l.split("/").filter(Boolean);return _.jsxs("aside",{className:"panel panel-right",children:[_.jsxs("div",{className:"panel-crumbs",children:[_.jsx("button",{type:"button",className:`crumb ${l===""?"active":""}`,onClick:()=>w(""),children:a("rootDir")}),E.map((N,M)=>{const q=E.slice(0,M+1).join("/");return _.jsxs("span",{className:"crumb-seg",children:[_.jsx(dc,{}),_.jsx("button",{type:"button",className:`crumb ${q===l?"active":""}`,onClick:()=>w(q),children:N})]},q)})]}),_.jsxs("div",{className:"panel-body",children:[d&&_.jsx("div",{className:"panel-empty",children:a("loading")}),!d&&p&&p.path===l&&_.jsxs(_.Fragment,{children:[p.path!==""&&_.jsxs("button",{type:"button",className:"file-item dir",onClick:k,children:[_.jsx(ra,{className:"file-icon"}),_.jsx("span",{className:"file-name",children:".."})]}),p.entries.map(N=>N.type==="dir"?_.jsxs("div",{className:"file-item dir",children:[_.jsxs("button",{type:"button",className:"file-dir-main",onClick:()=>S(N.path),children:[_.jsx(ra,{className:"file-icon"}),_.jsx("span",{className:"file-name",children:N.name})]}),_.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("linkFolderTip"),onClick:()=>n(N.path,N.name,"reference",!0),children:_.jsx(Kh,{})})]},N.path):_.jsxs("div",{className:"file-item file",children:[_.jsxs("button",{type:"button",className:"file-name",title:`${N.path} — ${a("previewFile")}`,onClick:()=>r(N.path,N.name),children:[_.jsx(hv,{className:"file-icon"}),_.jsx("span",{className:"file-name-text",children:N.name})]}),_.jsx("button",{type:"button",className:"file-attach download","data-tip":a("downloadFile"),onClick:()=>{h0(N.path,N.name).then(M=>{M.ok||M.cancelled||o("error",a("downloadFailed",{error:M.error}))})},children:_.jsx(fv,{})}),_.jsx("button",{type:"button",className:"file-attach inline","data-tip":a("attachInlineTip"),onClick:()=>n(N.path,N.name,"inline"),children:_.jsx(ss,{})}),_.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("referenceTip"),onClick:()=>n(N.path,N.name,"reference"),children:_.jsx(Kh,{})})]},N.path))]}),!d&&!p&&_.jsx("div",{className:"panel-empty",children:a("noFiles")})]}),e.widgets.filter(N=>N.lines.length>0).length>0&&_.jsx("div",{className:"panel-widgets",children:e.widgets.filter(N=>N.lines.length>0).map(N=>_.jsxs("div",{className:"widget",children:[_.jsx("div",{className:"widget-title",children:N.key}),_.jsx("pre",{className:"widget-lines",children:N.lines.join(`
|
|
40
|
+
`+v.stack}return{value:i,source:s,stack:g,digest:null}}function Cu(i,s,c){return{value:i,source:null,stack:c??null,digest:s??null}}function Nu(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var VS=typeof WeakMap=="function"?WeakMap:Map;function Xp(i,s,c){c=qi(-1,c),c.tag=3,c.payload={element:null};var f=s.value;return c.callback=function(){dl||(dl=!0,Hu=f),Nu(i,s)},c}function Zp(i,s,c){c=qi(-1,c),c.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;c.payload=function(){return f(g)},c.callback=function(){Nu(i,s)}}var v=i.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(c.callback=function(){Nu(i,s),typeof f!="function"&&(mr===null?mr=new Set([this]):mr.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),c}function Qp(i,s,c){var f=i.pingCache;if(f===null){f=i.pingCache=new VS;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(c)||(g.add(c),i=aw.bind(null,i,s,c),s.then(i,i))}function Jp(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function em(i,s,c,f,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=qi(-1,1),s.tag=2,fr(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var GS=M.ReactCurrentOwner,Tn=!1;function vn(i,s,c,f){s.child=i===null?bp(s,null,c,f):As(s,i.child,c,f)}function tm(i,s,c,f,g){c=c.render;var v=s.ref;return Os(s,g),f=vu(i,s,c,f,v,g),c=yu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&c&&tu(s),s.flags|=1,vn(i,s,f,g),s.child)}function nm(i,s,c,f,g){if(i===null){var v=c.type;return typeof v=="function"&&!Yu(v)&&v.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=v,im(i,s,v,f,g)):(i=vl(c.type,null,f,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(v=i.child,(i.lanes&g)===0){var x=v.memoizedProps;if(c=c.compare,c=c!==null?c:fo,c(x,f)&&i.ref===s.ref)return Vi(i,s,g)}return s.flags|=1,i=yr(v,f),i.ref=s.ref,i.return=s,s.child=i}function im(i,s,c,f,g){if(i!==null){var v=i.memoizedProps;if(fo(v,f)&&i.ref===s.ref)if(Tn=!1,s.pendingProps=f=v,(i.lanes&g)!==0)(i.flags&131072)!==0&&(Tn=!0);else return s.lanes=i.lanes,Vi(i,s,g)}return Tu(i,s,c,f,g)}function rm(i,s,c){var f=s.pendingProps,g=f.children,v=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Ps,Un),Un|=c;else{if((c&1073741824)===0)return i=v!==null?v.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ht(Ps,Un),Un|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=v!==null?v.baseLanes:c,ht(Ps,Un),Un|=f}else v!==null?(f=v.baseLanes|c,s.memoizedState=null):f=c,ht(Ps,Un),Un|=f;return vn(i,s,g,c),s.child}function sm(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Tu(i,s,c,f,g){var v=Nn(c)?zr:cn.current;return v=Cs(s,v),Os(s,g),c=vu(i,s,c,f,v,g),f=yu(),i!==null&&!Tn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,Vi(i,s,g)):(_t&&f&&tu(s),s.flags|=1,vn(i,s,c,g),s.child)}function om(i,s,c,f,g){if(Nn(c)){var v=!0;$a(s)}else v=!1;if(Os(s,g),s.stateNode===null)al(i,s),Gp(s,c,f),Eu(s,c,f,g),f=!0;else if(i===null){var x=s.stateNode,A=s.memoizedProps;x.props=A;var B=x.context,G=c.contextType;typeof G=="object"&&G!==null?G=Zn(G):(G=Nn(c)?zr:cn.current,G=Cs(s,G));var oe=c.getDerivedStateFromProps,ae=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function";ae||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==f||B!==G)&&Yp(s,x,f,G),dr=!1;var se=s.memoizedState;x.state=se,Qa(s,f,x,g),B=s.memoizedState,A!==f||se!==B||Cn.current||dr?(typeof oe=="function"&&(ku(s,c,oe,f),B=s.memoizedState),(A=dr||Vp(s,c,A,f,se,B,G))?(ae||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=B),x.props=f,x.state=B,x.context=G,f=A):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{x=s.stateNode,wp(i,s),A=s.memoizedProps,G=s.type===s.elementType?A:di(s.type,A),x.props=G,ae=s.pendingProps,se=x.context,B=c.contextType,typeof B=="object"&&B!==null?B=Zn(B):(B=Nn(c)?zr:cn.current,B=Cs(s,B));var _e=c.getDerivedStateFromProps;(oe=typeof _e=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==ae||se!==B)&&Yp(s,x,f,B),dr=!1,se=s.memoizedState,x.state=se,Qa(s,f,x,g);var xe=s.memoizedState;A!==ae||se!==xe||Cn.current||dr?(typeof _e=="function"&&(ku(s,c,_e,f),xe=s.memoizedState),(G=dr||Vp(s,c,G,f,se,xe,B)||!1)?(oe||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,xe,B),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,xe,B)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||A===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=xe),x.props=f,x.state=xe,x.context=B,f=G):(typeof x.componentDidUpdate!="function"||A===i.memoizedProps&&se===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===i.memoizedProps&&se===i.memoizedState||(s.flags|=1024),f=!1)}return Ru(i,s,c,f,v,g)}function Ru(i,s,c,f,g,v){sm(i,s);var x=(s.flags&128)!==0;if(!f&&!x)return g&&hp(s,c,!1),Vi(i,s,v);f=s.stateNode,GS.current=s;var A=x&&typeof c.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&x?(s.child=As(s,i.child,null,v),s.child=As(s,null,A,v)):vn(i,s,A,v),s.memoizedState=f.state,g&&hp(s,c,!0),s.child}function am(i){var s=i.stateNode;s.pendingContext?cp(i,s.pendingContext,s.pendingContext!==s.context):s.context&&cp(i,s.context,!1),du(i,s.containerInfo)}function lm(i,s,c,f,g){return Rs(),su(g),s.flags|=256,vn(i,s,c,f),s.child}var Au={dehydrated:null,treeContext:null,retryLane:0};function Mu(i){return{baseLanes:i,cachePool:null,transitions:null}}function cm(i,s,c){var f=s.pendingProps,g=St.current,v=!1,x=(s.flags&128)!==0,A;if((A=x)||(A=i!==null&&i.memoizedState===null?!1:(g&2)!==0),A?(v=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ht(St,g&1),i===null)return ru(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=f.children,i=f.fallback,v?(f=s.mode,v=s.child,x={mode:"hidden",children:x},(f&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=x):v=yl(x,f,0,null),i=Yr(i,f,c,null),v.return=s,i.return=s,v.sibling=i,s.child=v,s.child.memoizedState=Mu(c),s.memoizedState=Au,i):Ou(s,x));if(g=i.memoizedState,g!==null&&(A=g.dehydrated,A!==null))return YS(i,s,x,f,A,g,c);if(v){v=f.fallback,x=s.mode,g=i.child,A=g.sibling;var B={mode:"hidden",children:f.children};return(x&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=B,s.deletions=null):(f=yr(g,B),f.subtreeFlags=g.subtreeFlags&14680064),A!==null?v=yr(A,v):(v=Yr(v,x,c,null),v.flags|=2),v.return=s,f.return=s,f.sibling=v,s.child=f,f=v,v=s.child,x=i.child.memoizedState,x=x===null?Mu(c):{baseLanes:x.baseLanes|c,cachePool:null,transitions:x.transitions},v.memoizedState=x,v.childLanes=i.childLanes&~c,s.memoizedState=Au,f}return v=i.child,i=v.sibling,f=yr(v,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=c),f.return=s,f.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=f,s.memoizedState=null,f}function Ou(i,s){return s=yl({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ol(i,s,c,f){return f!==null&&su(f),As(s,i.child,null,c),i=Ou(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function YS(i,s,c,f,g,v,x){if(c)return s.flags&256?(s.flags&=-257,f=Cu(Error(n(422))),ol(i,s,x,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(v=f.fallback,g=s.mode,f=yl({mode:"visible",children:f.children},g,0,null),v=Yr(v,g,x,null),v.flags|=2,f.return=s,v.return=s,f.sibling=v,s.child=f,(s.mode&1)!==0&&As(s,i.child,null,x),s.child.memoizedState=Mu(x),s.memoizedState=Au,v);if((s.mode&1)===0)return ol(i,s,x,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var A=f.dgst;return f=A,v=Error(n(419)),f=Cu(v,f,void 0),ol(i,s,x,f)}if(A=(x&i.childLanes)!==0,Tn||A){if(f=Yt,f!==null){switch(x&-x){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|x))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,Ki(i,g),mi(f,i,g,-1))}return Gu(),f=Cu(Error(n(421))),ol(i,s,x,f)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=lw.bind(null,i),g._reactRetry=s,null):(i=v.treeContext,zn=lr(g.nextSibling),Fn=s,_t=!0,hi=null,i!==null&&(Yn[Xn++]=$i,Yn[Xn++]=Wi,Yn[Xn++]=Ur,$i=i.id,Wi=i.overflow,Ur=s),s=Ou(s,f.children),s.flags|=4096,s)}function um(i,s,c){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),cu(i.return,s,c)}function Lu(i,s,c,f,g){var v=i.memoizedState;v===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:g}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=f,v.tail=c,v.tailMode=g)}function hm(i,s,c){var f=s.pendingProps,g=f.revealOrder,v=f.tail;if(vn(i,s,f.children,c),f=St.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&um(i,c,s);else if(i.tag===19)um(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ht(St,f),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(c=s.child,g=null;c!==null;)i=c.alternate,i!==null&&Ja(i)===null&&(g=c),c=c.sibling;c=g,c===null?(g=s.child,s.child=null):(g=c.sibling,c.sibling=null),Lu(s,!1,g,c,v);break;case"backwards":for(c=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Ja(i)===null){s.child=g;break}i=g.sibling,g.sibling=c,c=g,g=i}Lu(s,!0,c,null,v);break;case"together":Lu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function al(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Vi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Kr|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=yr(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=yr(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function XS(i,s,c){switch(s.tag){case 3:am(s),Rs();break;case 5:Ep(s);break;case 1:Nn(s.type)&&$a(s);break;case 4:du(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;ht(Ya,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ht(St,St.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?cm(i,s,c):(ht(St,St.current&1),i=Vi(i,s,c),i!==null?i.sibling:null);ht(St,St.current&1);break;case 19:if(f=(c&s.childLanes)!==0,(i.flags&128)!==0){if(f)return hm(i,s,c);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ht(St,St.current),f)break;return null;case 22:case 23:return s.lanes=0,rm(i,s,c)}return Vi(i,s,c)}var dm,Iu,fm,pm;dm=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Iu=function(){},fm=function(i,s,c,f){var g=i.memoizedProps;if(g!==f){i=s.stateNode,$r(ki.current);var v=null;switch(c){case"input":g=Dn(i,g),f=Dn(i,f),v=[];break;case"select":g=C({},g,{value:void 0}),f=C({},f,{value:void 0}),v=[];break;case"textarea":g=Rr(i,g),f=Rr(i,f),v=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Ua)}Ut(c,f);var x;c=null;for(G in g)if(!f.hasOwnProperty(G)&&g.hasOwnProperty(G)&&g[G]!=null)if(G==="style"){var A=g[G];for(x in A)A.hasOwnProperty(x)&&(c||(c={}),c[x]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(o.hasOwnProperty(G)?v||(v=[]):(v=v||[]).push(G,null));for(G in f){var B=f[G];if(A=g!=null?g[G]:void 0,f.hasOwnProperty(G)&&B!==A&&(B!=null||A!=null))if(G==="style")if(A){for(x in A)!A.hasOwnProperty(x)||B&&B.hasOwnProperty(x)||(c||(c={}),c[x]="");for(x in B)B.hasOwnProperty(x)&&A[x]!==B[x]&&(c||(c={}),c[x]=B[x])}else c||(v||(v=[]),v.push(G,c)),c=B;else G==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,A=A?A.__html:void 0,B!=null&&A!==B&&(v=v||[]).push(G,B)):G==="children"?typeof B!="string"&&typeof B!="number"||(v=v||[]).push(G,""+B):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(o.hasOwnProperty(G)?(B!=null&&G==="onScroll"&&ft("scroll",i),v||A===B||(v=[])):(v=v||[]).push(G,B))}c&&(v=v||[]).push("style",c);var G=v;(s.updateQueue=G)&&(s.flags|=4)}},pm=function(i,s,c,f){c!==f&&(s.flags|=4)};function To(i,s){if(!_t)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function hn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(s)for(var g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)c|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=f,i.childLanes=c,s}function ZS(i,s,c){var f=s.pendingProps;switch(nu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(s),null;case 1:return Nn(s.type)&&Ha(),hn(s),null;case 3:return f=s.stateNode,Ls(),pt(Cn),pt(cn),mu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Va(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,hi!==null&&(Ku(hi),hi=null))),Iu(i,s),hn(s),null;case 5:fu(s);var g=$r(xo.current);if(c=s.type,i!==null&&s.stateNode!=null)fm(i,s,c,f,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return hn(s),null}if(i=$r(ki.current),Va(s)){f=s.stateNode,c=s.type;var v=s.memoizedProps;switch(f[xi]=s,f[vo]=v,i=(s.mode&1)!==0,c){case"dialog":ft("cancel",f),ft("close",f);break;case"iframe":case"object":case"embed":ft("load",f);break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],f);break;case"source":ft("error",f);break;case"img":case"image":case"link":ft("error",f),ft("load",f);break;case"details":ft("toggle",f);break;case"input":Pi(f,v),ft("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!v.multiple},ft("invalid",f);break;case"textarea":Ar(f,v),ft("invalid",f)}Ut(c,v),g=null;for(var x in v)if(v.hasOwnProperty(x)){var A=v[x];x==="children"?typeof A=="string"?f.textContent!==A&&(v.suppressHydrationWarning!==!0&&za(f.textContent,A,i),g=["children",A]):typeof A=="number"&&f.textContent!==""+A&&(v.suppressHydrationWarning!==!0&&za(f.textContent,A,i),g=["children",""+A]):o.hasOwnProperty(x)&&A!=null&&x==="onScroll"&&ft("scroll",f)}switch(c){case"input":Ft(f),Kn(f,v,!0);break;case"textarea":Ft(f),Mr(f);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(f.onclick=Ua)}f=g,s.updateQueue=f,f!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=x.createElement(c,{is:f.is}):(i=x.createElement(c),c==="select"&&(x=i,f.multiple?x.multiple=!0:f.size&&(x.size=f.size))):i=x.createElementNS(i,c),i[xi]=s,i[vo]=f,dm(i,s,!1,!1),s.stateNode=i;e:{switch(x=Vn(c,f),c){case"dialog":ft("cancel",i),ft("close",i),g=f;break;case"iframe":case"object":case"embed":ft("load",i),g=f;break;case"video":case"audio":for(g=0;g<mo.length;g++)ft(mo[g],i);g=f;break;case"source":ft("error",i),g=f;break;case"img":case"image":case"link":ft("error",i),ft("load",i),g=f;break;case"details":ft("toggle",i),g=f;break;case"input":Pi(i,f),g=Dn(i,f),ft("invalid",i);break;case"option":g=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},g=C({},f,{value:void 0}),ft("invalid",i);break;case"textarea":Ar(i,f),g=Rr(i,f),ft("invalid",i);break;default:g=f}Ut(c,g),A=g;for(v in A)if(A.hasOwnProperty(v)){var B=A[v];v==="style"?li(i,B):v==="dangerouslySetInnerHTML"?(B=B?B.__html:void 0,B!=null&&$e(i,B)):v==="children"?typeof B=="string"?(c!=="textarea"||B!=="")&&Xe(i,B):typeof B=="number"&&Xe(i,""+B):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(o.hasOwnProperty(v)?B!=null&&v==="onScroll"&&ft("scroll",i):B!=null&&N(i,v,B,x))}switch(c){case"input":Ft(i),Kn(i,f,!1);break;case"textarea":Ft(i),Mr(i);break;case"option":f.value!=null&&i.setAttribute("value",""+Ie(f.value));break;case"select":i.multiple=!!f.multiple,v=f.value,v!=null?yi(i,!!f.multiple,v,!1):f.defaultValue!=null&&yi(i,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=Ua)}switch(c){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return hn(s),null;case 6:if(i&&s.stateNode!=null)pm(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(c=$r(xo.current),$r(ki.current),Va(s)){if(f=s.stateNode,c=s.memoizedProps,f[xi]=s,(v=f.nodeValue!==c)&&(i=Fn,i!==null))switch(i.tag){case 3:za(f.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&za(f.nodeValue,c,(i.mode&1)!==0)}v&&(s.flags|=4)}else f=(c.nodeType===9?c:c.ownerDocument).createTextNode(f),f[xi]=s,s.stateNode=f}return hn(s),null;case 13:if(pt(St),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_t&&zn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)_p(),Rs(),s.flags|=98560,v=!1;else if(v=Va(s),f!==null&&f.dehydrated!==null){if(i===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[xi]=s}else Rs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;hn(s),v=!1}else hi!==null&&(Ku(hi),hi=null),v=!0;if(!v)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(St.current&1)!==0?Ht===0&&(Ht=3):Gu())),s.updateQueue!==null&&(s.flags|=4),hn(s),null);case 4:return Ls(),Iu(i,s),i===null&&go(s.stateNode.containerInfo),hn(s),null;case 10:return lu(s.type._context),hn(s),null;case 17:return Nn(s.type)&&Ha(),hn(s),null;case 19:if(pt(St),v=s.memoizedState,v===null)return hn(s),null;if(f=(s.flags&128)!==0,x=v.rendering,x===null)if(f)To(v,!1);else{if(Ht!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=Ja(i),x!==null){for(s.flags|=128,To(v,!1),f=x.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=c,c=s.child;c!==null;)v=c,i=f,v.flags&=14680066,x=v.alternate,x===null?(v.childLanes=0,v.lanes=i,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=x.childLanes,v.lanes=x.lanes,v.child=x.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=x.memoizedProps,v.memoizedState=x.memoizedState,v.updateQueue=x.updateQueue,v.type=x.type,i=x.dependencies,v.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return ht(St,St.current&1|2),s.child}i=i.sibling}v.tail!==null&&yt()>Bs&&(s.flags|=128,f=!0,To(v,!1),s.lanes=4194304)}else{if(!f)if(i=Ja(x),i!==null){if(s.flags|=128,f=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),To(v,!0),v.tail===null&&v.tailMode==="hidden"&&!x.alternate&&!_t)return hn(s),null}else 2*yt()-v.renderingStartTime>Bs&&c!==1073741824&&(s.flags|=128,f=!0,To(v,!1),s.lanes=4194304);v.isBackwards?(x.sibling=s.child,s.child=x):(c=v.last,c!==null?c.sibling=x:s.child=x,v.last=x)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=yt(),s.sibling=null,c=St.current,ht(St,f?c&1|2:c&1),s):(hn(s),null);case 22:case 23:return Vu(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(Un&1073741824)!==0&&(hn(s),s.subtreeFlags&6&&(s.flags|=8192)):hn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function QS(i,s){switch(nu(s),s.tag){case 1:return Nn(s.type)&&Ha(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Ls(),pt(Cn),pt(cn),mu(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return fu(s),null;case 13:if(pt(St),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Rs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return pt(St),null;case 4:return Ls(),null;case 10:return lu(s.type._context),null;case 22:case 23:return Vu(),null;case 24:return null;default:return null}}var ll=!1,dn=!1,JS=typeof WeakSet=="function"?WeakSet:Set,we=null;function Ds(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(f){Ct(i,s,f)}else c.current=null}function Du(i,s,c){try{c()}catch(f){Ct(i,s,f)}}var mm=!1;function ew(i,s){if(Vc=Ta,i=Vf(),zc(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var g=f.anchorOffset,v=f.focusNode;f=f.focusOffset;try{c.nodeType,v.nodeType}catch{c=null;break e}var x=0,A=-1,B=-1,G=0,oe=0,ae=i,se=null;t:for(;;){for(var _e;ae!==c||g!==0&&ae.nodeType!==3||(A=x+g),ae!==v||f!==0&&ae.nodeType!==3||(B=x+f),ae.nodeType===3&&(x+=ae.nodeValue.length),(_e=ae.firstChild)!==null;)se=ae,ae=_e;for(;;){if(ae===i)break t;if(se===c&&++G===g&&(A=x),se===v&&++oe===f&&(B=x),(_e=ae.nextSibling)!==null)break;ae=se,se=ae.parentNode}ae=_e}c=A===-1||B===-1?null:{start:A,end:B}}else c=null}c=c||{start:0,end:0}}else c=null;for(Gc={focusedElem:i,selectionRange:c},Ta=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ke=xe.memoizedProps,Mt=xe.memoizedState,$=s.stateNode,U=$.getSnapshotBeforeUpdate(s.elementType===s.type?ke:di(s.type,ke),Mt);$.__reactInternalSnapshotBeforeUpdate=U}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){Ct(s,s.return,ue)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return xe=mm,mm=!1,xe}function Ro(i,s,c){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&i)===i){var v=g.destroy;g.destroy=void 0,v!==void 0&&Du(s,c,v)}g=g.next}while(g!==f)}}function cl(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var f=c.create;c.destroy=f()}c=c.next}while(c!==s)}}function Pu(i){var s=i.ref;if(s!==null){var c=i.stateNode;switch(i.tag){case 5:i=c;break;default:i=c}typeof s=="function"?s(i):s.current=i}}function gm(i){var s=i.alternate;s!==null&&(i.alternate=null,gm(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[xi],delete s[vo],delete s[Qc],delete s[PS],delete s[BS])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function _m(i){return i.tag===5||i.tag===3||i.tag===4}function vm(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||_m(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Bu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Ua));else if(f!==4&&(i=i.child,i!==null))for(Bu(i,s,c),i=i.sibling;i!==null;)Bu(i,s,c),i=i.sibling}function Fu(i,s,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Fu(i,s,c),i=i.sibling;i!==null;)Fu(i,s,c),i=i.sibling}var sn=null,fi=!1;function pr(i,s,c){for(c=c.child;c!==null;)ym(i,s,c),c=c.sibling}function ym(i,s,c){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(We,c)}catch{}switch(c.tag){case 5:dn||Ds(c,s);case 6:var f=sn,g=fi;sn=null,pr(i,s,c),sn=f,fi=g,sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):sn.removeChild(c.stateNode));break;case 18:sn!==null&&(fi?(i=sn,c=c.stateNode,i.nodeType===8?Zc(i.parentNode,c):i.nodeType===1&&Zc(i,c),oo(i)):Zc(sn,c.stateNode));break;case 4:f=sn,g=fi,sn=c.stateNode.containerInfo,fi=!0,pr(i,s,c),sn=f,fi=g;break;case 0:case 11:case 14:case 15:if(!dn&&(f=c.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var v=g,x=v.destroy;v=v.tag,x!==void 0&&((v&2)!==0||(v&4)!==0)&&Du(c,s,x),g=g.next}while(g!==f)}pr(i,s,c);break;case 1:if(!dn&&(Ds(c,s),f=c.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=c.memoizedProps,f.state=c.memoizedState,f.componentWillUnmount()}catch(A){Ct(c,s,A)}pr(i,s,c);break;case 21:pr(i,s,c);break;case 22:c.mode&1?(dn=(f=dn)||c.memoizedState!==null,pr(i,s,c),dn=f):pr(i,s,c);break;default:pr(i,s,c)}}function bm(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new JS),s.forEach(function(f){var g=cw.bind(null,i,f);c.has(f)||(c.add(f),f.then(g,g))})}}function pi(i,s){var c=s.deletions;if(c!==null)for(var f=0;f<c.length;f++){var g=c[f];try{var v=i,x=s,A=x;e:for(;A!==null;){switch(A.tag){case 5:sn=A.stateNode,fi=!1;break e;case 3:sn=A.stateNode.containerInfo,fi=!0;break e;case 4:sn=A.stateNode.containerInfo,fi=!0;break e}A=A.return}if(sn===null)throw Error(n(160));ym(v,x,g),sn=null,fi=!1;var B=g.alternate;B!==null&&(B.return=null),g.return=null}catch(G){Ct(g,s,G)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Sm(s,i),s=s.sibling}function Sm(i,s){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(pi(s,i),Ci(i),f&4){try{Ro(3,i,i.return),cl(3,i)}catch(ke){Ct(i,i.return,ke)}try{Ro(5,i,i.return)}catch(ke){Ct(i,i.return,ke)}}break;case 1:pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return);break;case 5:if(pi(s,i),Ci(i),f&512&&c!==null&&Ds(c,c.return),i.flags&32){var g=i.stateNode;try{Xe(g,"")}catch(ke){Ct(i,i.return,ke)}}if(f&4&&(g=i.stateNode,g!=null)){var v=i.memoizedProps,x=c!==null?c.memoizedProps:v,A=i.type,B=i.updateQueue;if(i.updateQueue=null,B!==null)try{A==="input"&&v.type==="radio"&&v.name!=null&&Qe(g,v),Vn(A,x);var G=Vn(A,v);for(x=0;x<B.length;x+=2){var oe=B[x],ae=B[x+1];oe==="style"?li(g,ae):oe==="dangerouslySetInnerHTML"?$e(g,ae):oe==="children"?Xe(g,ae):N(g,oe,ae,G)}switch(A){case"input":Pn(g,v);break;case"textarea":qn(g,v);break;case"select":var se=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var _e=v.value;_e!=null?yi(g,!!v.multiple,_e,!1):se!==!!v.multiple&&(v.defaultValue!=null?yi(g,!!v.multiple,v.defaultValue,!0):yi(g,!!v.multiple,v.multiple?[]:"",!1))}g[vo]=v}catch(ke){Ct(i,i.return,ke)}}break;case 6:if(pi(s,i),Ci(i),f&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,v=i.memoizedProps;try{g.nodeValue=v}catch(ke){Ct(i,i.return,ke)}}break;case 3:if(pi(s,i),Ci(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{oo(s.containerInfo)}catch(ke){Ct(i,i.return,ke)}break;case 4:pi(s,i),Ci(i);break;case 13:pi(s,i),Ci(i),g=i.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(ju=yt())),f&4&&bm(i);break;case 22:if(oe=c!==null&&c.memoizedState!==null,i.mode&1?(dn=(G=dn)||oe,pi(s,i),dn=G):pi(s,i),Ci(i),f&8192){if(G=i.memoizedState!==null,(i.stateNode.isHidden=G)&&!oe&&(i.mode&1)!==0)for(we=i,oe=i.child;oe!==null;){for(ae=we=oe;we!==null;){switch(se=we,_e=se.child,se.tag){case 0:case 11:case 14:case 15:Ro(4,se,se.return);break;case 1:Ds(se,se.return);var xe=se.stateNode;if(typeof xe.componentWillUnmount=="function"){f=se,c=se.return;try{s=f,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(ke){Ct(f,c,ke)}}break;case 5:Ds(se,se.return);break;case 22:if(se.memoizedState!==null){km(ae);continue}}_e!==null?(_e.return=se,we=_e):km(ae)}oe=oe.sibling}e:for(oe=null,ae=i;;){if(ae.tag===5){if(oe===null){oe=ae;try{g=ae.stateNode,G?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(A=ae.stateNode,B=ae.memoizedProps.style,x=B!=null&&B.hasOwnProperty("display")?B.display:null,A.style.display=En("display",x))}catch(ke){Ct(i,i.return,ke)}}}else if(ae.tag===6){if(oe===null)try{ae.stateNode.nodeValue=G?"":ae.memoizedProps}catch(ke){Ct(i,i.return,ke)}}else if((ae.tag!==22&&ae.tag!==23||ae.memoizedState===null||ae===i)&&ae.child!==null){ae.child.return=ae,ae=ae.child;continue}if(ae===i)break e;for(;ae.sibling===null;){if(ae.return===null||ae.return===i)break e;oe===ae&&(oe=null),ae=ae.return}oe===ae&&(oe=null),ae.sibling.return=ae.return,ae=ae.sibling}}break;case 19:pi(s,i),Ci(i),f&4&&bm(i);break;case 21:break;default:pi(s,i),Ci(i)}}function Ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(_m(c)){var f=c;break e}c=c.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(Xe(g,""),f.flags&=-33);var v=vm(i);Fu(i,v,g);break;case 3:case 4:var x=f.stateNode.containerInfo,A=vm(i);Bu(i,A,x);break;default:throw Error(n(161))}}catch(B){Ct(i,i.return,B)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function tw(i,s,c){we=i,wm(i)}function wm(i,s,c){for(var f=(i.mode&1)!==0;we!==null;){var g=we,v=g.child;if(g.tag===22&&f){var x=g.memoizedState!==null||ll;if(!x){var A=g.alternate,B=A!==null&&A.memoizedState!==null||dn;A=ll;var G=dn;if(ll=x,(dn=B)&&!G)for(we=g;we!==null;)x=we,B=x.child,x.tag===22&&x.memoizedState!==null?Em(g):B!==null?(B.return=x,we=B):Em(g);for(;v!==null;)we=v,wm(v),v=v.sibling;we=g,ll=A,dn=G}xm(i)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,we=v):xm(i)}}function xm(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||cl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!dn)if(c===null)f.componentDidMount();else{var g=s.elementType===s.type?c.memoizedProps:di(s.type,c.memoizedProps);f.componentDidUpdate(g,c.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&kp(s,v,f);break;case 3:var x=s.updateQueue;if(x!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}kp(s,x,c)}break;case 5:var A=s.stateNode;if(c===null&&s.flags&4){c=A;var B=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":B.autoFocus&&c.focus();break;case"img":B.src&&(c.src=B.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var G=s.alternate;if(G!==null){var oe=G.memoizedState;if(oe!==null){var ae=oe.dehydrated;ae!==null&&oo(ae)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&Pu(s)}catch(se){Ct(s,s.return,se)}}if(s===i){we=null;break}if(c=s.sibling,c!==null){c.return=s.return,we=c;break}we=s.return}}function km(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var c=s.sibling;if(c!==null){c.return=s.return,we=c;break}we=s.return}}function Em(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{cl(4,s)}catch(B){Ct(s,c,B)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(B){Ct(s,g,B)}}var v=s.return;try{Pu(s)}catch(B){Ct(s,v,B)}break;case 5:var x=s.return;try{Pu(s)}catch(B){Ct(s,x,B)}}}catch(B){Ct(s,s.return,B)}if(s===i){we=null;break}var A=s.sibling;if(A!==null){A.return=s.return,we=A;break}we=s.return}}var nw=Math.ceil,ul=M.ReactCurrentDispatcher,zu=M.ReactCurrentOwner,Jn=M.ReactCurrentBatchConfig,tt=0,Yt=null,It=null,on=0,Un=0,Ps=cr(0),Ht=0,Ao=null,Kr=0,hl=0,Uu=0,Mo=null,Rn=null,ju=0,Bs=1/0,Gi=null,dl=!1,Hu=null,mr=null,fl=!1,gr=null,pl=0,Oo=0,$u=null,ml=-1,gl=0;function yn(){return(tt&6)!==0?yt():ml!==-1?ml:ml=yt()}function _r(i){return(i.mode&1)===0?1:(tt&2)!==0&&on!==0?on&-on:zS.transition!==null?(gl===0&&(gl=Ea()),gl):(i=et,i!==0||(i=window.event,i=i===void 0?16:Nf(i.type)),i)}function mi(i,s,c,f){if(50<Oo)throw Oo=0,$u=null,Error(n(185));rr(i,c,f),((tt&2)===0||i!==Yt)&&(i===Yt&&((tt&2)===0&&(hl|=c),Ht===4&&vr(i,on)),An(i,f),c===1&&tt===0&&(s.mode&1)===0&&(Bs=yt()+500,Wa&&hr()))}function An(i,s){var c=i.callbackNode;Cc(i,s);var f=Dr(i,i===Yt?on:0);if(f===0)c!==null&&ci(c),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(c!=null&&ci(c),s===1)i.tag===0?FS(Nm.bind(null,i)):dp(Nm.bind(null,i)),IS(function(){(tt&6)===0&&hr()}),c=null;else{switch(Fe(f)){case 1:c=eo;break;case 4:c=Lr;break;case 16:c=ms;break;case 536870912:c=Ce;break;default:c=ms}c=Dm(c,Cm.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Cm(i,s){if(ml=-1,gl=0,(tt&6)!==0)throw Error(n(327));var c=i.callbackNode;if(Fs()&&i.callbackNode!==c)return null;var f=Dr(i,i===Yt?on:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=_l(i,f);else{s=f;var g=tt;tt|=2;var v=Rm();(Yt!==i||on!==s)&&(Gi=null,Bs=yt()+500,Vr(i,s));do try{sw();break}catch(A){Tm(i,A)}while(!0);au(),ul.current=v,tt=g,It!==null?s=0:(Yt=null,on=0,s=Ht)}if(s!==0){if(s===2&&(g=to(i),g!==0&&(f=g,s=Wu(i,g))),s===1)throw c=Ao,Vr(i,0),vr(i,f),An(i,yt()),c;if(s===6)vr(i,f);else{if(g=i.current.alternate,(f&30)===0&&!iw(g)&&(s=_l(i,f),s===2&&(v=to(i),v!==0&&(f=v,s=Wu(i,v))),s===1))throw c=Ao,Vr(i,0),vr(i,f),An(i,yt()),c;switch(i.finishedWork=g,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Gr(i,Rn,Gi);break;case 3:if(vr(i,f),(f&130023424)===f&&(s=ju+500-yt(),10<s)){if(Dr(i,0)!==0)break;if(g=i.suspendedLanes,(g&f)!==f){yn(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Xc(Gr.bind(null,i,Rn,Gi),s);break}Gr(i,Rn,Gi);break;case 4:if(vr(i,f),(f&4194240)===f)break;for(s=i.eventTimes,g=-1;0<f;){var x=31-bt(f);v=1<<x,x=s[x],x>g&&(g=x),f&=~v}if(f=g,f=yt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*nw(f/1960))-f,10<f){i.timeoutHandle=Xc(Gr.bind(null,i,Rn,Gi),f);break}Gr(i,Rn,Gi);break;case 5:Gr(i,Rn,Gi);break;default:throw Error(n(329))}}}return An(i,yt()),i.callbackNode===c?Cm.bind(null,i):null}function Wu(i,s){var c=Mo;return i.current.memoizedState.isDehydrated&&(Vr(i,s).flags|=256),i=_l(i,s),i!==2&&(s=Rn,Rn=c,s!==null&&Ku(s)),i}function Ku(i){Rn===null?Rn=i:Rn.push.apply(Rn,i)}function iw(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var f=0;f<c.length;f++){var g=c[f],v=g.getSnapshot;g=g.value;try{if(!ui(v(),g))return!1}catch{return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function vr(i,s){for(s&=~Uu,s&=~hl,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-bt(s),f=1<<c;i[c]=-1,s&=~f}}function Nm(i){if((tt&6)!==0)throw Error(n(327));Fs();var s=Dr(i,0);if((s&1)===0)return An(i,yt()),null;var c=_l(i,s);if(i.tag!==0&&c===2){var f=to(i);f!==0&&(s=f,c=Wu(i,f))}if(c===1)throw c=Ao,Vr(i,0),vr(i,s),An(i,yt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,Gr(i,Rn,Gi),An(i,yt()),null}function qu(i,s){var c=tt;tt|=1;try{return i(s)}finally{tt=c,tt===0&&(Bs=yt()+500,Wa&&hr())}}function qr(i){gr!==null&&gr.tag===0&&(tt&6)===0&&Fs();var s=tt;tt|=1;var c=Jn.transition,f=et;try{if(Jn.transition=null,et=1,i)return i()}finally{et=f,Jn.transition=c,tt=s,(tt&6)===0&&hr()}}function Vu(){Un=Ps.current,pt(Ps)}function Vr(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,LS(c)),It!==null)for(c=It.return;c!==null;){var f=c;switch(nu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Ha();break;case 3:Ls(),pt(Cn),pt(cn),mu();break;case 5:fu(f);break;case 4:Ls();break;case 13:pt(St);break;case 19:pt(St);break;case 10:lu(f.type._context);break;case 22:case 23:Vu()}c=c.return}if(Yt=i,It=i=yr(i.current,null),on=Un=s,Ht=0,Ao=null,Uu=hl=Kr=0,Rn=Mo=null,Hr!==null){for(s=0;s<Hr.length;s++)if(c=Hr[s],f=c.interleaved,f!==null){c.interleaved=null;var g=f.next,v=c.pending;if(v!==null){var x=v.next;v.next=g,f.next=x}c.pending=f}Hr=null}return i}function Tm(i,s){do{var c=It;try{if(au(),el.current=rl,tl){for(var f=wt.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}tl=!1}if(Wr=0,Gt=jt=wt=null,ko=!1,Eo=0,zu.current=null,c===null||c.return===null){Ht=1,Ao=s,It=null;break}e:{var v=i,x=c.return,A=c,B=s;if(s=on,A.flags|=32768,B!==null&&typeof B=="object"&&typeof B.then=="function"){var G=B,oe=A,ae=oe.tag;if((oe.mode&1)===0&&(ae===0||ae===11||ae===15)){var se=oe.alternate;se?(oe.updateQueue=se.updateQueue,oe.memoizedState=se.memoizedState,oe.lanes=se.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var _e=Jp(x);if(_e!==null){_e.flags&=-257,em(_e,x,A,v,s),_e.mode&1&&Qp(v,G,s),s=_e,B=G;var xe=s.updateQueue;if(xe===null){var ke=new Set;ke.add(B),s.updateQueue=ke}else xe.add(B);break e}else{if((s&1)===0){Qp(v,G,s),Gu();break e}B=Error(n(426))}}else if(_t&&A.mode&1){var Mt=Jp(x);if(Mt!==null){(Mt.flags&65536)===0&&(Mt.flags|=256),em(Mt,x,A,v,s),su(Is(B,A));break e}}v=B=Is(B,A),Ht!==4&&(Ht=2),Mo===null?Mo=[v]:Mo.push(v),v=x;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var $=Xp(v,B,s);xp(v,$);break e;case 1:A=B;var U=v.type,V=v.stateNode;if((v.flags&128)===0&&(typeof U.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(mr===null||!mr.has(V)))){v.flags|=65536,s&=-s,v.lanes|=s;var ue=Zp(v,A,s);xp(v,ue);break e}}v=v.return}while(v!==null)}Mm(c)}catch(Ee){s=Ee,It===c&&c!==null&&(It=c=c.return);continue}break}while(!0)}function Rm(){var i=ul.current;return ul.current=rl,i===null?rl:i}function Gu(){(Ht===0||Ht===3||Ht===2)&&(Ht=4),Yt===null||(Kr&268435455)===0&&(hl&268435455)===0||vr(Yt,on)}function _l(i,s){var c=tt;tt|=2;var f=Rm();(Yt!==i||on!==s)&&(Gi=null,Vr(i,s));do try{rw();break}catch(g){Tm(i,g)}while(!0);if(au(),tt=c,ul.current=f,It!==null)throw Error(n(261));return Yt=null,on=0,Ht}function rw(){for(;It!==null;)Am(It)}function sw(){for(;It!==null&&!xa();)Am(It)}function Am(i){var s=Im(i.alternate,i,Un);i.memoizedProps=i.pendingProps,s===null?Mm(i):It=s,zu.current=null}function Mm(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=ZS(c,s,Un),c!==null){It=c;return}}else{if(c=QS(c,s),c!==null){c.flags&=32767,It=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Ht=6,It=null;return}}if(s=s.sibling,s!==null){It=s;return}It=s=i}while(s!==null);Ht===0&&(Ht=5)}function Gr(i,s,c){var f=et,g=Jn.transition;try{Jn.transition=null,et=1,ow(i,s,c,f)}finally{Jn.transition=g,et=f}return null}function ow(i,s,c,f){do Fs();while(gr!==null);if((tt&6)!==0)throw Error(n(327));c=i.finishedWork;var g=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var v=c.lanes|c.childLanes;if(Gn(i,v),i===Yt&&(It=Yt=null,on=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||fl||(fl=!0,Dm(ms,function(){return Fs(),null})),v=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||v){v=Jn.transition,Jn.transition=null;var x=et;et=1;var A=tt;tt|=4,zu.current=null,ew(i,c),Sm(c,i),CS(Gc),Ta=!!Vc,Gc=Vc=null,i.current=c,tw(c),ka(),tt=A,et=x,Jn.transition=v}else i.current=c;if(fl&&(fl=!1,gr=i,pl=g),v=i.pendingLanes,v===0&&(mr=null),Rt(c.stateNode),An(i,yt()),s!==null)for(f=i.onRecoverableError,c=0;c<s.length;c++)g=s[c],f(g.value,{componentStack:g.stack,digest:g.digest});if(dl)throw dl=!1,i=Hu,Hu=null,i;return(pl&1)!==0&&i.tag!==0&&Fs(),v=i.pendingLanes,(v&1)!==0?i===$u?Oo++:(Oo=0,$u=i):Oo=0,hr(),null}function Fs(){if(gr!==null){var i=Fe(pl),s=Jn.transition,c=et;try{if(Jn.transition=null,et=16>i?16:i,gr===null)var f=!1;else{if(i=gr,gr=null,pl=0,(tt&6)!==0)throw Error(n(331));var g=tt;for(tt|=4,we=i.current;we!==null;){var v=we,x=v.child;if((we.flags&16)!==0){var A=v.deletions;if(A!==null){for(var B=0;B<A.length;B++){var G=A[B];for(we=G;we!==null;){var oe=we;switch(oe.tag){case 0:case 11:case 15:Ro(8,oe,v)}var ae=oe.child;if(ae!==null)ae.return=oe,we=ae;else for(;we!==null;){oe=we;var se=oe.sibling,_e=oe.return;if(gm(oe),oe===G){we=null;break}if(se!==null){se.return=_e,we=se;break}we=_e}}}var xe=v.alternate;if(xe!==null){var ke=xe.child;if(ke!==null){xe.child=null;do{var Mt=ke.sibling;ke.sibling=null,ke=Mt}while(ke!==null)}}we=v}}if((v.subtreeFlags&2064)!==0&&x!==null)x.return=v,we=x;else e:for(;we!==null;){if(v=we,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:Ro(9,v,v.return)}var $=v.sibling;if($!==null){$.return=v.return,we=$;break e}we=v.return}}var U=i.current;for(we=U;we!==null;){x=we;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,we=V;else e:for(x=U;we!==null;){if(A=we,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:cl(9,A)}}catch(Ee){Ct(A,A.return,Ee)}if(A===x){we=null;break e}var ue=A.sibling;if(ue!==null){ue.return=A.return,we=ue;break e}we=A.return}}if(tt=g,hr(),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(We,i)}catch{}f=!0}return f}finally{et=c,Jn.transition=s}}return!1}function Om(i,s,c){s=Is(c,s),s=Xp(i,s,1),i=fr(i,s,1),s=yn(),i!==null&&(rr(i,1,s),An(i,s))}function Ct(i,s,c){if(i.tag===3)Om(i,i,c);else for(;s!==null;){if(s.tag===3){Om(s,i,c);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(mr===null||!mr.has(f))){i=Is(c,i),i=Zp(s,i,1),s=fr(s,i,1),i=yn(),s!==null&&(rr(s,1,i),An(s,i));break}}s=s.return}}function aw(i,s,c){var f=i.pingCache;f!==null&&f.delete(s),s=yn(),i.pingedLanes|=i.suspendedLanes&c,Yt===i&&(on&c)===c&&(Ht===4||Ht===3&&(on&130023424)===on&&500>yt()-ju?Vr(i,0):Uu|=c),An(i,s)}function Lm(i,s){s===0&&((i.mode&1)===0?s=1:(s=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var c=yn();i=Ki(i,s),i!==null&&(rr(i,s,c),An(i,c))}function lw(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),Lm(i,c)}function cw(i,s){var c=0;switch(i.tag){case 13:var f=i.stateNode,g=i.memoizedState;g!==null&&(c=g.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),Lm(i,c)}var Im;Im=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)Tn=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return Tn=!1,XS(i,s,c);Tn=(i.flags&131072)!==0}else Tn=!1,_t&&(s.flags&1048576)!==0&&fp(s,qa,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;al(i,s),i=s.pendingProps;var g=Cs(s,cn.current);Os(s,c),g=vu(null,s,f,i,g,c);var v=yu();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Nn(f)?(v=!0,$a(s)):v=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,hu(s),g.updater=sl,s.stateNode=g,g._reactInternals=s,Eu(s,f,i,c),s=Ru(null,s,f,!0,v,c)):(s.tag=0,_t&&v&&tu(s),vn(null,s,g,c),s=s.child),s;case 16:f=s.elementType;e:{switch(al(i,s),i=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=hw(f),i=di(f,i),g){case 0:s=Tu(null,s,f,i,c);break e;case 1:s=om(null,s,f,i,c);break e;case 11:s=tm(null,s,f,i,c);break e;case 14:s=nm(null,s,f,di(f.type,i),c);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),Tu(i,s,f,g,c);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),om(i,s,f,g,c);case 3:e:{if(am(s),i===null)throw Error(n(387));f=s.pendingProps,v=s.memoizedState,g=v.element,wp(i,s),Qa(s,f,null,c);var x=s.memoizedState;if(f=x.element,v.isDehydrated)if(v={element:f,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){g=Is(Error(n(423)),s),s=lm(i,s,f,c,g);break e}else if(f!==g){g=Is(Error(n(424)),s),s=lm(i,s,f,c,g);break e}else for(zn=lr(s.stateNode.containerInfo.firstChild),Fn=s,_t=!0,hi=null,c=bp(s,null,f,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Rs(),f===g){s=Vi(i,s,c);break e}vn(i,s,f,c)}s=s.child}return s;case 5:return Ep(s),i===null&&ru(s),f=s.type,g=s.pendingProps,v=i!==null?i.memoizedProps:null,x=g.children,Yc(f,g)?x=null:v!==null&&Yc(f,v)&&(s.flags|=32),sm(i,s),vn(i,s,x,c),s.child;case 6:return i===null&&ru(s),null;case 13:return cm(i,s,c);case 4:return du(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=As(s,null,f,c):vn(i,s,f,c),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),tm(i,s,f,g,c);case 7:return vn(i,s,s.pendingProps,c),s.child;case 8:return vn(i,s,s.pendingProps.children,c),s.child;case 12:return vn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(f=s.type._context,g=s.pendingProps,v=s.memoizedProps,x=g.value,ht(Ya,f._currentValue),f._currentValue=x,v!==null)if(ui(v.value,x)){if(v.children===g.children&&!Cn.current){s=Vi(i,s,c);break e}}else for(v=s.child,v!==null&&(v.return=s);v!==null;){var A=v.dependencies;if(A!==null){x=v.child;for(var B=A.firstContext;B!==null;){if(B.context===f){if(v.tag===1){B=qi(-1,c&-c),B.tag=2;var G=v.updateQueue;if(G!==null){G=G.shared;var oe=G.pending;oe===null?B.next=B:(B.next=oe.next,oe.next=B),G.pending=B}}v.lanes|=c,B=v.alternate,B!==null&&(B.lanes|=c),cu(v.return,c,s),A.lanes|=c;break}B=B.next}}else if(v.tag===10)x=v.type===s.type?null:v.child;else if(v.tag===18){if(x=v.return,x===null)throw Error(n(341));x.lanes|=c,A=x.alternate,A!==null&&(A.lanes|=c),cu(x,c,s),x=v.sibling}else x=v.child;if(x!==null)x.return=v;else for(x=v;x!==null;){if(x===s){x=null;break}if(v=x.sibling,v!==null){v.return=x.return,x=v;break}x=x.return}v=x}vn(i,s,g.children,c),s=s.child}return s;case 9:return g=s.type,f=s.pendingProps.children,Os(s,c),g=Zn(g),f=f(g),s.flags|=1,vn(i,s,f,c),s.child;case 14:return f=s.type,g=di(f,s.pendingProps),g=di(f.type,g),nm(i,s,f,g,c);case 15:return im(i,s,s.type,s.pendingProps,c);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:di(f,g),al(i,s),s.tag=1,Nn(f)?(i=!0,$a(s)):i=!1,Os(s,c),Gp(s,f,g),Eu(s,f,g,c),Ru(null,s,f,!0,i,c);case 19:return hm(i,s,c);case 22:return rm(i,s,c)}throw Error(n(156,s.tag))};function Dm(i,s){return wa(i,s)}function uw(i,s,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ei(i,s,c,f){return new uw(i,s,c,f)}function Yu(i){return i=i.prototype,!(!i||!i.isReactComponent)}function hw(i){if(typeof i=="function")return Yu(i)?1:0;if(i!=null){if(i=i.$$typeof,i===K)return 11;if(i===P)return 14}return 2}function yr(i,s){var c=i.alternate;return c===null?(c=ei(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function vl(i,s,c,f,g,v){var x=2;if(f=i,typeof i=="function")Yu(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case re:return Yr(c.children,g,v,s);case Z:x=8,g|=8;break;case F:return i=ei(12,c,s,g|2),i.elementType=F,i.lanes=v,i;case j:return i=ei(13,c,s,g),i.elementType=j,i.lanes=v,i;case W:return i=ei(19,c,s,g),i.elementType=W,i.lanes=v,i;case te:return yl(c,g,v,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case O:x=10;break e;case X:x=9;break e;case K:x=11;break e;case P:x=14;break e;case Y:x=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=ei(x,c,s,g),s.elementType=i,s.type=f,s.lanes=v,s}function Yr(i,s,c,f){return i=ei(7,i,f,s),i.lanes=c,i}function yl(i,s,c,f){return i=ei(22,i,f,s),i.elementType=te,i.lanes=c,i.stateNode={isHidden:!1},i}function Xu(i,s,c){return i=ei(6,i,null,s),i.lanes=c,i}function Zu(i,s,c){return s=ei(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function dw(i,s,c,f,g){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ir(0),this.expirationTimes=ir(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ir(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Qu(i,s,c,f,g,v,x,A,B){return i=new dw(i,s,c,A,B),s===1?(s=1,v===!0&&(s|=8)):s=0,v=ei(3,null,null,s),i.current=v,v.stateNode=i,v.memoizedState={element:f,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},hu(v),i}function fw(i,s,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:f==null?null:""+f,children:i,containerInfo:s,implementation:c}}function Pm(i){if(!i)return ur;i=i._reactInternals;e:{if(Ui(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Nn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(Nn(c))return up(i,c,s)}return s}function Bm(i,s,c,f,g,v,x,A,B){return i=Qu(c,f,!0,i,g,v,x,A,B),i.context=Pm(null),c=i.current,f=yn(),g=_r(c),v=qi(f,g),v.callback=s??null,fr(c,v,g),i.current.lanes=g,rr(i,g,f),An(i,f),i}function bl(i,s,c,f){var g=s.current,v=yn(),x=_r(g);return c=Pm(c),s.context===null?s.context=c:s.pendingContext=c,s=qi(v,x),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=fr(g,s,x),i!==null&&(mi(i,g,x,v),Za(i,g,x)),x}function Sl(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Fm(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function Ju(i,s){Fm(i,s),(i=i.alternate)&&Fm(i,s)}function pw(){return null}var zm=typeof reportError=="function"?reportError:function(i){console.error(i)};function eh(i){this._internalRoot=i}wl.prototype.render=eh.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));bl(i,s,null,null)},wl.prototype.unmount=eh.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;qr(function(){bl(null,i,null,null)}),s[ji]=null}};function wl(i){this._internalRoot=i}wl.prototype.unstable_scheduleHydration=function(i){if(i){var s=Pr();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Vt.length&&s!==0&&s<Vt[c].priority;c++);Vt.splice(c,0,i),c===0&&Ef(i)}};function th(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function xl(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Um(){}function mw(i,s,c,f,g){if(g){if(typeof f=="function"){var v=f;f=function(){var G=Sl(x);v.call(G)}}var x=Bm(s,f,i,0,null,!1,!1,"",Um);return i._reactRootContainer=x,i[ji]=x.current,go(i.nodeType===8?i.parentNode:i),qr(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof f=="function"){var A=f;f=function(){var G=Sl(B);A.call(G)}}var B=Qu(i,0,!1,null,null,!1,!1,"",Um);return i._reactRootContainer=B,i[ji]=B.current,go(i.nodeType===8?i.parentNode:i),qr(function(){bl(s,B,c,f)}),B}function kl(i,s,c,f,g){var v=c._reactRootContainer;if(v){var x=v;if(typeof g=="function"){var A=g;g=function(){var B=Sl(x);A.call(B)}}bl(s,x,i,g)}else x=mw(c,s,i,g,f);return Sl(x)}io=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=nr(s.pendingLanes);c!==0&&(no(s,c|1),An(s,yt()),(tt&6)===0&&(Bs=yt()+500,hr()))}break;case 13:qr(function(){var f=Ki(i,1);if(f!==null){var g=yn();mi(f,i,1,g)}}),Ju(i,1)}},At=function(i){if(i.tag===13){var s=Ki(i,134217728);if(s!==null){var c=yn();mi(s,i,134217728,c)}Ju(i,134217728)}},rt=function(i){if(i.tag===13){var s=_r(i),c=Ki(i,s);if(c!==null){var f=yn();mi(c,i,s,f)}Ju(i,s)}},Pr=function(){return et},wi=function(i,s){var c=et;try{return et=i,s()}finally{et=c}},fs=function(i,s,c){switch(s){case"input":if(Pn(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var f=c[s];if(f!==i&&f.form===i.form){var g=ja(f);if(!g)throw Error(n(90));nn(f),Pn(f,g)}}}break;case"textarea":qn(i,c);break;case"select":s=c.value,s!=null&&yi(i,!!c.multiple,s,!1)}},pe=qu,De=qr;var gw={usingClientEntryPoint:!1,Events:[yo,ks,ja,I,ee,qu]},Lo={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_w={bundleType:Lo.bundleType,version:Lo.version,rendererPackageName:Lo.rendererPackageName,rendererConfig:Lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=ba(i),i===null?null:i.stateNode},findFiberByHostInstance:Lo.findFiberByHostInstance||pw,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 El=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!El.isDisabled&&El.supportsFiber)try{We=El.inject(_w),Ge=El}catch{}}return Mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gw,Mn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!th(s))throw Error(n(200));return fw(i,s,null,c)},Mn.createRoot=function(i,s){if(!th(i))throw Error(n(299));var c=!1,f="",g=zm;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Qu(i,1,!1,null,null,c,!1,f,g),i[ji]=s.current,go(i.nodeType===8?i.parentNode:i),new eh(s)},Mn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=ba(s),i=i===null?null:i.stateNode,i},Mn.flushSync=function(i){return qr(i)},Mn.hydrate=function(i,s,c){if(!xl(s))throw Error(n(200));return kl(null,i,s,!0,c)},Mn.hydrateRoot=function(i,s,c){if(!th(i))throw Error(n(405));var f=c!=null&&c.hydratedSources||null,g=!1,v="",x=zm;if(c!=null&&(c.unstable_strictMode===!0&&(g=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onRecoverableError!==void 0&&(x=c.onRecoverableError)),s=Bm(s,null,i,1,c??null,g,!1,v,x),i[ji]=s.current,go(i),f)for(i=0;i<f.length;i++)c=f[i],g=c._getVersion,g=g(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,g]:s.mutableSourceEagerHydrationData.push(c,g);return new wl(s)},Mn.render=function(i,s,c){if(!xl(s))throw Error(n(200));return kl(null,i,s,!1,c)},Mn.unmountComponentAtNode=function(i){if(!xl(i))throw Error(n(40));return i._reactRootContainer?(qr(function(){kl(null,null,i,!1,function(){i._reactRootContainer=null,i[ji]=null})}),!0):!1},Mn.unstable_batchedUpdates=qu,Mn.unstable_renderSubtreeIntoContainer=function(i,s,c,f){if(!xl(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return kl(i,s,c,!1,f)},Mn.version="18.3.1-next-f1338f8080-20240426",Mn}var Gm;function Ew(){if(Gm)return rh.exports;Gm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rh.exports=kw(),rh.exports}var Ym;function Cw(){if(Ym)return Cl;Ym=1;var e=Ew();return Cl.createRoot=e.createRoot,Cl.hydrateRoot=e.hydrateRoot,Cl}var Nw=Cw(),lv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Xm=ns.createContext&&ns.createContext(lv),Tw=["attr","size","title"];function Rw(e,t){if(e==null)return{};var n,r,o=Aw(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Aw(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yl.apply(null,arguments)}function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Xl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zm(Object(n),!0).forEach(function(r){Mw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mw(e,t,n){return(t=Ow(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ow(e){var t=Lw(e,"string");return typeof t=="symbol"?t:t+""}function Lw(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cv(e){return e&&e.map((t,n)=>ns.createElement(t.tag,Xl({key:n},t.attr),cv(t.child)))}function at(e){return t=>ns.createElement(Iw,Yl({attr:Xl({},e.attr)},t),cv(e.child))}function Iw(e){var t=n=>{var r=e.attr,o=e.size,a=e.title,l=Rw(e,Tw),u=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),ns.createElement("svg",Yl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,l,{className:d,style:Xl(Xl({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),a&&ns.createElement("title",null,a),e.children)};return Xm!==void 0?ns.createElement(Xm.Consumer,null,n=>t(n)):t(lv)}function Dw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"},child:[]}]})(e)}function uc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function uv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"},child:[]},{tag:"path",attr:{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"},child:[]}]})(e)}function $h(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function Wd(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"4 17 10 11 4 5"},child:[]},{tag:"line",attr:{x1:"12",y1:"19",x2:"20",y2:"19"},child:[]}]})(e)}function Pw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]}]})(e)}function Qm(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"22",y1:"2",x2:"11",y2:"13"},child:[]},{tag:"polygon",attr:{points:"22 2 15 22 11 13 2 9 22 2"},child:[]}]})(e)}function hc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"polyline",attr:{points:"1 20 1 14 7 14"},child:[]},{tag:"path",attr:{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"},child:[]}]})(e)}function ss(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(e)}function Bw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 3 19 12 5 21 5 3"},child:[]}]})(e)}function Wh(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function Kh(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"},child:[]},{tag:"path",attr:{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"},child:[]}]})(e)}function Fw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"},child:[]}]})(e)}function zw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"},child:[]},{tag:"path",attr:{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"},child:[]}]})(e)}function ra(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"},child:[]}]})(e)}function hv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"},child:[]},{tag:"polyline",attr:{points:"13 2 13 9 20 9"},child:[]}]})(e)}function Uw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"},child:[]},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"},child:[]},{tag:"polyline",attr:{points:"10 9 9 9 8 9"},child:[]}]})(e)}function Jm(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20h9"},child:[]},{tag:"path",attr:{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"},child:[]}]})(e)}function dv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"},child:[]}]})(e)}function fv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function Kd(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"4",y:"4",width:"16",height:"16",rx:"2",ry:"2"},child:[]},{tag:"rect",attr:{x:"9",y:"9",width:"6",height:"6"},child:[]},{tag:"line",attr:{x1:"9",y1:"1",x2:"9",y2:"4"},child:[]},{tag:"line",attr:{x1:"15",y1:"1",x2:"15",y2:"4"},child:[]},{tag:"line",attr:{x1:"9",y1:"20",x2:"9",y2:"23"},child:[]},{tag:"line",attr:{x1:"15",y1:"20",x2:"15",y2:"23"},child:[]},{tag:"line",attr:{x1:"20",y1:"9",x2:"23",y2:"9"},child:[]},{tag:"line",attr:{x1:"20",y1:"14",x2:"23",y2:"14"},child:[]},{tag:"line",attr:{x1:"1",y1:"9",x2:"4",y2:"9"},child:[]},{tag:"line",attr:{x1:"1",y1:"14",x2:"4",y2:"14"},child:[]}]})(e)}function pv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(e)}function jw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"18 15 12 9 6 15"},child:[]}]})(e)}function dc(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(e)}function ua(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(e)}function mv(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(e)}function Hw(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(e)}function $w(e){return at({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function Do({trigger:e,open:t,onOpenChange:n,children:r,align:o="right",fit:a=!1}){const l=Q.useRef(null);return Q.useEffect(()=>{if(!t)return;const u=h=>{l.current&&!l.current.contains(h.target)&&n(!1)},d=h=>{h.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",u),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[t,n]),_.jsxs("div",{className:`dropdown ${o} ${a?"fit":""}`,ref:l,children:[_.jsxs("button",{type:"button",className:"chip",onClick:()=>n(!t),"aria-expanded":t,children:[e,_.jsx(ua,{className:`dd-caret ${t?"up":""}`})]}),t&&_.jsx("div",{className:"dd-menu",children:r})]})}function ah({active:e,onClick:t,children:n}){return _.jsx("button",{type:"button",className:`dd-item ${e?"active":""}`,onClick:t,children:n})}const gv="pi-web-ui:lang",Ww={cancel:"取消",ok:"确定",save:"保存",close:"关闭",loading:"加载中…",connected:"已连接",connecting:"连接中…",reconnecting:"重连中…",language:"语言",langZh:"中文",langEn:"English",copy:"复制",viewSwitch:"视图切换",chat:"对话",terminal:"终端",selectModel:"选择模型",availableModels:"可用模型",noModels:"暂无可用模型(请先配置 API 密钥)",reasoning:"推理",refreshModels:"刷新模型列表",manageModels:"⚙ 管理模型(新增 / 修改)",manageModelsTitle:"管理模型",thinkingLevel:"思考强度",thinking:"思考",thinkingChip:"思考:{level}",sound:"声音",newChat:"新对话",newChatTip:"新建对话(每个浏览器独立保存会话)","thinking.off":"关闭","thinking.minimal":"极简","thinking.low":"低","thinking.medium":"中","thinking.high":"高","thinking.xhigh":"极高","thinking.max":"最大",context:"上下文",contextUsage:"上下文用量",cumulativeCost:"累计成本",sessionMessages:"会话消息数",messages:"消息",pluginStatus:"插件状态",working:"工作中",queued:"排队",enterPath:"输入路径,Enter 切换",cwdTip:"工作目录:{path}(点击切换)",folderRef:"文件夹引用:{path}",refOnly:"仅引用:{path}",attachContent:"附加内容:{path}",attachLines:"附加选中行:{path}(第 {start}-{end} 行)",removeAttachment:"移除附件",attachHint:"将随下一条消息发送",followUpQueued:"⏳ {n} 条跟进消息排队中",steeringQueued:"⏳ {n} 条转向消息排队中",placeholderStreaming:"智能体正在工作中…(消息可排队发送)",placeholderIdle:"给 pi 发送消息 — Enter 发送,Shift+Enter 换行",placeholderConnecting:"正在连接服务器…",stopAgent:"停止智能体",stop:"停止",supplement:"补充",supplementTip:"当前回复完成后立即发送",sendTip:"发送(Enter)",recentProjects:"最近项目",openConversations:"打开的对话",historySessions:"历史对话",streaming:"进行中…",noHistory:"还没有历史对话",current:"当前",messageCount:"{n} 条消息",tuiTip:"pi 终端(TUI)中的对话",refreshList:"刷新列表",emptyChat:"空对话",editReask:"编辑重问",editReaskTip:"修改此问题,并从这里重新提问(会新建一个分支对话,原对话保留)",reaskFromHere:"从此处重新提问",editPlaceholder:"修改问题内容…",editHint:"⌘/Ctrl+Enter 提交 · Esc 取消",expandMsg:"展开",collapseMsg:"收起",toolCalls:"工具调用",bashRuns:"终端运行",images:"图片",update:"更新",updateTip:"检查并更新 pi-web-ui",currentVersion:"当前版本",latestVersion:"最新版本",checkingUpdate:"检查中…",checkUpdate:"检查更新",upToDate:"已是最新版本",updateAvailable:"发现新版本 v{version}",updateJustPublished:"v{version} 刚刚发布,npm 缓存可能尚未同步——若未检测到新版本,请稍后重新检查",updateNow:"立即更新",confirmUpdate:"确认更新(覆盖全局安装)",updateSuccess:"✅ 已更新,正在重启…",updateFailed:"更新失败:{detail}",restartHint:"重启:pi-web-ui server restart",refreshFiles:"刷新文件列表",rootDir:"根目录",noFiles:"暂无文件",linkFolderTip:"链接文件夹路径到对话",attachInlineTip:"附加内容到对话",referenceTip:"仅引用路径(AI 按需读取)",previewFile:"预览",downloadFile:"下载文件",downloadFailed:"下载失败:{error}",selectLinesHint:"点击选择行;拖拽或 Shift+点击选择范围",selectedRange:"已选 {n} 行(第 {start}-{end} 行)",fileLines:"{n} 行",selectAll:"全选",clearSelection:"清除",addToChat:"添加到对话",addedToChat:"已添加",previewTruncated:"⚠ 文件过大,仅预览前 512KB",previewLinesTruncated:"… 文件行数过多,仅显示前 {n} 行",binaryFile:"🔣 二进制文件,已显示前 4KB 十六进制",binaryHexTruncated:"(文件更大,可下载完整文件)",previewNotSupported:"该类型文件不支持预览(仅图片 / 视频 / 文本)",emptyFile:"(空文件)",pluginRequest:"插件请求",noOptions:"(无选项)",inputPlaceholder:"输入内容",soundHeader:"声音提示",enableSound:"启用声音",preview:"试听",volume:"音量","sound.question":"问卷弹出","sound.question.desc":"ask_user_question 出现时","sound.done":"回复结束","sound.done.desc":"智能体完成一轮回答时","sound.start":"回复开始","sound.start.desc":"智能体开始新一轮时","sound.error":"出错","sound.error.desc":"出现错误提示时",setupTitle:"未检测到 pi agent 配置",setupDesc:"pi-web-ui 需要 pi 的配置目录(~/.pi/agent)和至少一个 API 密钥才能运行智能体。pi 内置了 openai、anthropic、deepseek 等服务商——选一个填密钥即可,全程无需打开终端。",installFailed:"✖ pi agent 安装失败:",retryInstall:"重试安装",skip:"跳过",installDone:"✅ pi agent CLI 已安装。选择服务商并填入 API 密钥即可开始对话:",provider:"服务商",configured:"已配置",providerKeyReady:"该服务商已配置密钥,可直接使用或更换新密钥。",apiKey:"API 密钥",saving:"保存中…",saveAndStart:"保存并开始使用",recheck:"重新检测",installing:"正在安装 pi agent CLI…",autoInstall:"自动安装 pi agent",attachment:"附件",plugin:"插件",unknown:"未知",thinkingWait:"正在思考",exitCode:"退出码 {code}",cancelled:"已取消",truncated:"… 内容过长,当前视图已截断",outputTruncated:"… 输出过长,当前视图已截断",refOnlyShort:"仅引用",folderRefShort:"文件夹 · 仅引用",inlineLines:"内联 · {n} 行",inlineLinesRange:"行 {start}-{end}",image:"🖼 图片",folderNotExpanded:"文件夹,未展开内容 —— 智能体会按需浏览目录",fileNotExpanded:"文件较大({size}),未展开内容 —— 智能体会按需读取","role.user":"你","role.assistant":"pi","role.tool":"工具","role.bash":"终端","role.branch":"分支摘要","role.compaction":"上下文已压缩",welcomeTitle:"pi 编码智能体",welcomeSub:"检查、编辑、运行 —— 随时待命",directory:"目录",clickToFill:"点击填入输入框",waitingResponse:"正在等待模型响应…",backToBottom:"回到底部","ex.understand":"了解这个项目","ex.understand.prompt":"介绍一下这个项目:整体结构、主要模块和如何运行?","ex.debug":"排查一个问题","ex.debug.prompt":"帮我排查一个 bug,请先说明问题现象,我会补充细节。","ex.test":"编写测试","ex.test.prompt":"为项目的核心模块编写单元测试。","ex.review":"代码审查","ex.review.prompt":"审查最近改动的代码,指出潜在问题和改进建议。",error:"出错",done:"完成",running:"执行中…",toolQueued:"排队中",copyArgs:"复制参数",errorOutput:"错误输出",output:"输出",waitingOutput:"等待输出…",thinkingNow:"思考中",thinkingPreview:"思考:{preview}",commands:"命令",newCommand:"新建命令",newTerminal:"新建终端",name:"名称",command:"命令",cwdHint:"(${pwd} = 当前工作目录)",noCommands:"还没有命令,点 + 添加一个",clickToRun:"点击运行",edit:"编辑",delete:"删除",confirmQ:"确认?",commandsFileHint:"${pwd} 指代当前工作目录",builtinTerminal:"内置终端",termEmptySub:"点击左侧命令运行,或点右侧 + 新建终端",noTerminal:"暂无终端",exited:"(已退出{code})",closeTerminal:"关闭终端",rerun:"重新读取 .pi/commands.json",terminalTitle:"终端 {n}",exampleName:"例如:启动开发服务器",exampleCommand:"例如:npm run dev",editProvider:"编辑服务商",builtinProviders:"内置服务商",hintKeyOnly:"只需填入 API 密钥",configuredBadge:"✓ 已配置",keyReady:"密钥已就绪",pasteKey:"粘贴 API 密钥…",savingKey:"保存中",saveKey:"保存密钥",customProviders:"自定义服务商",customDesc:"用于 Ollama / vLLM / 兼容 OpenAI 的代理等,写入 pi 的 models.json,保存后热重载、立即生效。",noCustomProviders:"还没有自定义服务商",modelsCount:"{n} 个模型",addProvider:"新增服务商",providerId:"服务商 ID",providerIdHint:"(必填,如 ollama / my-proxy)",displayName:"显示名",displayNamePh:"我的代理",apiType:"API 类型",baseUrlHint:"(OpenAI 兼容端点)",apiKeyHint:"sk-…(可留空,用 auth.json 的密钥)",authHeader:"自动添加 Authorization 请求头",modelsTitle:"模型",modelIdReq:"模型 ID(必填)",text:"文本",textImage:"文本+图片",contextWindow:"上下文",maxOutput:"最大输出",removeModel:"移除模型",addModel:"添加模型",deleteProviderConfirm:"删除服务商 {id} 及其 {n} 个模型?",loadingSession:"正在加载会话…",connectingServer:"正在连接 pi-web-ui 服务器…"},Kw={cancel:"Cancel",ok:"OK",save:"Save",close:"Close",loading:"Loading…",connected:"Connected",connecting:"Connecting…",reconnecting:"Reconnecting…",language:"Language",langZh:"中文",langEn:"English",copy:"Copy",viewSwitch:"Switch view",chat:"Chat",terminal:"Terminal",selectModel:"Select model",availableModels:"Available models",noModels:"No models available (configure an API key first)",reasoning:"reasoning",refreshModels:"Refresh model list",manageModels:"⚙ Manage models (add / edit)",manageModelsTitle:"Manage models",thinkingLevel:"Thinking level",thinking:"Thinking",thinkingChip:"Thinking: {level}",sound:"Sound",newChat:"New chat",newChatTip:"New chat (sessions are saved per browser)","thinking.off":"Off","thinking.minimal":"Minimal","thinking.low":"Low","thinking.medium":"Medium","thinking.high":"High","thinking.xhigh":"Extra high","thinking.max":"Max",context:"Context",contextUsage:"Context usage",cumulativeCost:"Cumulative cost",sessionMessages:"Session messages",messages:"messages",pluginStatus:"Plugin status",working:"Working",queued:"queued",enterPath:"Type a path, Enter to switch",cwdTip:"Working directory: {path} (click to switch)",folderRef:"Folder reference: {path}",refOnly:"Reference only: {path}",attachContent:"Attached content: {path}",attachLines:"Attached selected lines: {path} (lines {start}-{end})",removeAttachment:"Remove attachment",attachHint:"Will be sent with the next message",followUpQueued:"⏳ {n} follow-up message(s) queued",steeringQueued:"⏳ {n} steering message(s) queued",placeholderStreaming:"The agent is working… (messages will queue)",placeholderIdle:"Message pi — Enter to send, Shift+Enter for newline",placeholderConnecting:"Connecting to server…",stopAgent:"Stop agent",stop:"Stop",supplement:"Follow-up",supplementTip:"Send immediately after the current reply finishes",sendTip:"Send (Enter)",recentProjects:"Recent projects",openConversations:"Open chats",historySessions:"History",streaming:"Streaming…",noHistory:"No previous chats",current:"Current",messageCount:"{n} messages",tuiTip:"Chat in the pi terminal (TUI)",refreshList:"Refresh list",emptyChat:"Empty chat",editReask:"Edit & re-ask",editReaskTip:"Edit this question and re-ask from here (forks a new conversation; the original is kept)",reaskFromHere:"Re-ask from here",editPlaceholder:"Edit the question…",editHint:"⌘/Ctrl+Enter to submit · Esc to cancel",expandMsg:"Expand",collapseMsg:"Collapse",toolCalls:"tool calls",bashRuns:"bash runs",images:"images",update:"Update",updateTip:"Check & update pi-web-ui",currentVersion:"Current version",latestVersion:"Latest version",checkingUpdate:"Checking…",checkUpdate:"Check for updates",upToDate:"You're up to date",updateAvailable:"New version v{version} available",updateJustPublished:"v{version} was just published — npm cache may lag; if the new version isn't detected yet, re-check in a moment",updateNow:"Update now",confirmUpdate:"Confirm (replaces global install)",updateSuccess:"✅ Updated — restarting…",updateFailed:"Update failed: {detail}",restartHint:"Restart: pi-web-ui server restart",refreshFiles:"Refresh file list",rootDir:"Root",noFiles:"No files",linkFolderTip:"Link folder path to chat",attachInlineTip:"Attach content to chat",referenceTip:"Reference path only (AI reads on demand)",previewFile:"Preview",downloadFile:"Download file",downloadFailed:"Download failed: {error}",selectLinesHint:"Click a line to select; drag or Shift+click for a range",selectedRange:"Selected {n} lines (lines {start}-{end})",fileLines:"{n} lines",selectAll:"Select all",clearSelection:"Clear",addToChat:"Add to chat",addedToChat:"Added",previewTruncated:"⚠ File too large — previewing the first 512KB",previewLinesTruncated:"… too many lines — showing the first {n}",binaryFile:"🔣 Binary file — first 4KB shown as hex",binaryHexTruncated:" (file larger — download for the full file)",previewNotSupported:"This file type can't be previewed (only images / videos / text)",emptyFile:"(empty file)",pluginRequest:"Plugin request",noOptions:"(no options)",inputPlaceholder:"Enter content",soundHeader:"Sound notifications",enableSound:"Enable sound",preview:"Preview",volume:"Volume","sound.question":"Question popup","sound.question.desc":"When ask_user_question appears","sound.done":"Reply finished","sound.done.desc":"When the agent finishes a turn","sound.start":"Reply started","sound.start.desc":"When the agent starts a new turn","sound.error":"Error","sound.error.desc":"When an error notice appears",setupTitle:"pi agent config not detected",setupDesc:"pi-web-ui needs pi's config directory (~/.pi/agent) and at least one API key to run the agent. pi has built-in providers such as openai, anthropic, and deepseek — just pick one and enter a key, no terminal needed.",installFailed:"✖ pi agent installation failed:",retryInstall:"Retry install",skip:"Skip",installDone:"✅ pi agent CLI installed. Pick a provider and enter an API key to start chatting:",provider:"Provider",configured:"configured",providerKeyReady:"This provider already has a key — use it or replace it.",apiKey:"API key",saving:"Saving…",saveAndStart:"Save and start using",recheck:"Recheck",installing:"Installing pi agent CLI…",autoInstall:"Auto-install pi agent",attachment:"Attachment",plugin:"plugin",unknown:"unknown",thinkingWait:"Thinking",exitCode:"Exit code {code}",cancelled:"Cancelled",truncated:"… content too long, truncated in this view",outputTruncated:"… output too long, truncated in this view",refOnlyShort:"Reference only",folderRefShort:"Folder · reference only",inlineLines:"Inline · {n} lines",inlineLinesRange:"Lines {start}-{end}",image:"🖼 Image",folderNotExpanded:"Folder — content not expanded, the agent will browse it as needed",fileNotExpanded:"Large file ({size}) — content not expanded, the agent will read it as needed","role.user":"You","role.assistant":"pi","role.tool":"Tool","role.bash":"Terminal","role.branch":"Branch summary","role.compaction":"Context compacted",welcomeTitle:"pi coding agent",welcomeSub:"Inspect, edit, run — always ready",directory:"Directory",clickToFill:"Click to fill input",waitingResponse:"Waiting for model response…",backToBottom:"Back to bottom","ex.understand":"Understand this project","ex.understand.prompt":"Introduce this project: overall structure, main modules, and how to run it?","ex.debug":"Debug an issue","ex.debug.prompt":"Help me debug a bug — describe the symptom first, and I'll add details.","ex.test":"Write tests","ex.test.prompt":"Write unit tests for the core modules.","ex.review":"Code review","ex.review.prompt":"Review the recently changed code and point out potential issues and improvements.",error:"Error",done:"Done",running:"Running…",toolQueued:"Queued",copyArgs:"Copy args",errorOutput:"Error output",output:"Output",waitingOutput:"Waiting for output…",thinkingNow:"Thinking",thinkingPreview:"Thinking: {preview}",commands:"Commands",newCommand:"New command",newTerminal:"New terminal",name:"Name",command:"Command",cwdHint:"(${pwd} = current working directory)",noCommands:"No commands yet — click + to add one",clickToRun:"Click to run",edit:"Edit",delete:"Delete",confirmQ:"Confirm?",commandsFileHint:"${pwd} refers to the current working directory",builtinTerminal:"Built-in terminal",termEmptySub:"Click a command on the left to run it, or + on the right for a new terminal",noTerminal:"No terminals",exited:"(exited{code})",closeTerminal:"Close terminal",rerun:"Reload .pi/commands.json",terminalTitle:"Terminal {n}",exampleName:"e.g. start dev server",exampleCommand:"e.g. npm run dev",editProvider:"Edit provider",builtinProviders:"Built-in providers",hintKeyOnly:"Just enter an API key",configuredBadge:"✓ Configured",keyReady:"Key ready",pasteKey:"Paste API key…",savingKey:"Saving",saveKey:"Save key",customProviders:"Custom providers",customDesc:"For Ollama / vLLM / OpenAI-compatible proxies, etc. Written to pi's models.json — hot-reloaded immediately.",noCustomProviders:"No custom providers yet",modelsCount:"{n} models",addProvider:"Add provider",providerId:"Provider ID",providerIdHint:"(required, e.g. ollama / my-proxy)",displayName:"Display name",displayNamePh:"My proxy",apiType:"API type",baseUrlHint:"(OpenAI-compatible endpoint)",apiKeyHint:"sk-… (optional — uses the auth.json key)",authHeader:"Auto-add Authorization header",modelsTitle:"Models",modelIdReq:"Model ID (required)",text:"Text",textImage:"Text+image",contextWindow:"Context",maxOutput:"Max output",removeModel:"Remove model",addModel:"Add model",deleteProviderConfirm:"Delete provider {id} and its {n} models?",loadingSession:"Loading session…",connectingServer:"Connecting to pi-web-ui server…"},_v=Q.createContext(null);function qw(){try{const e=localStorage.getItem(gv);if(e==="zh"||e==="en")return e}catch{}return"zh"}function Vw({children:e}){const[t,n]=Q.useState(qw),r=Q.useCallback(l=>{n(l);try{localStorage.setItem(gv,l)}catch{}},[]),o=Q.useCallback((l,u)=>{let d=Kw[l];if(t==="zh"&&(d=Ww[l]),u)for(const[h,p]of Object.entries(u))d=d.replaceAll(`{${h}}`,String(p));return d},[t]);Q.useEffect(()=>{document.documentElement.lang=t==="zh"?"zh-CN":"en"},[t]);const a=Q.useMemo(()=>({locale:t,setLocale:r,t:o}),[t,r,o]);return _.jsx(_v.Provider,{value:a,children:e})}function vv(){const e=Q.useContext(_v);if(!e)throw new Error("useI18n must be used within LanguageProvider");return e}function qt(){return vv().t}const Gw=[{kind:"question",labelKey:"sound.question",descKey:"sound.question.desc"},{kind:"done",labelKey:"sound.done",descKey:"sound.done.desc"},{kind:"start",labelKey:"sound.start",descKey:"sound.start.desc"},{kind:"error",labelKey:"sound.error",descKey:"sound.error.desc"}];function Yw({settings:e,onChange:t,onPreview:n}){const r=qt(),o=a=>t({...e,...a});return _.jsxs("div",{className:"sound-menu",children:[_.jsx("div",{className:"dd-header",children:r("soundHeader")}),_.jsxs("label",{className:"sound-row sound-master",children:[_.jsxs("span",{className:"sound-label",children:[_.jsx(uv,{className:"sound-icon"}),_.jsx("span",{children:r("enableSound")})]}),_.jsx("input",{type:"checkbox",checked:e.enabled,onChange:a=>o({enabled:a.target.checked})})]}),Gw.map(({kind:a,labelKey:l,descKey:u})=>_.jsxs("label",{className:`sound-row ${e.enabled?"":"disabled"}`,children:[_.jsxs("span",{className:"sound-label",children:[_.jsx("span",{className:"sound-name",children:r(l)}),_.jsx("span",{className:"sound-desc",children:r(u)})]}),_.jsxs("span",{className:"sound-right",children:[_.jsx("button",{type:"button",className:"sound-preview",title:r("preview"),disabled:!e.enabled,onClick:d=>{d.preventDefault(),n(a)},children:r("preview")}),_.jsx("input",{type:"checkbox",checked:e[a],disabled:!e.enabled,onChange:d=>o({[a]:d.target.checked})})]})]},a)),_.jsxs("div",{className:`sound-volume ${e.enabled?"":"disabled"}`,children:[_.jsx("span",{className:"sound-name",children:r("volume")}),_.jsx("input",{type:"range",min:0,max:100,step:5,value:e.volume,disabled:!e.enabled,onChange:a=>o({volume:Number(a.target.value)})}),_.jsxs("span",{className:"sound-vol-num",children:[e.volume,"%"]})]})]})}const Xw=["off","minimal","low","medium","high","xhigh","max"];function Zw({chat:e,send:t,view:n,onViewChange:r,onManageModels:o,sound:a,onSoundChange:l,onSoundPreview:u}){var te,z,ie,C,D;const{locale:d,setLocale:h,t:p}=vv(),m=e.state,y=m==null?void 0:m.model,b=y?`${y.provider}/${y.id}`:null,[w,S]=Q.useState(!1),[k,E]=Q.useState(!1),[T,N]=Q.useState(!1),[M,q]=Q.useState(!1),[L,re]=Q.useState(!1),[Z,F]=Q.useState(!1),[O,X]=Q.useState(!1),K=Xw.map(H=>({value:H,label:p(`thinking.${H}`)})),j=H=>{var R;return((R=K.find(ge=>ge.value===H))==null?void 0:R.label)??H},W=[{value:"zh",label:p("langZh")},{value:"en",label:p("langEn")}];Q.useEffect(()=>{w&&e.models.length===0&&!O&&(X(!0),t({type:"list_models"}))},[w,e.models.length,O,t]),Q.useEffect(()=>{e.models.length>0&&X(!1)},[e.models.length]);const P=e.ready?p("connected"):e.status==="closed"?p("reconnecting"):p("connecting"),Y=e.ready?"ok":"busy";return _.jsxs("header",{className:"topbar",children:[_.jsxs("div",{className:"brand",children:[_.jsx("span",{className:"brand-logo",children:"π"}),_.jsx("span",{className:"brand-name",children:"pi-web-ui"}),_.jsx("span",{className:`conn-dot ${Y}`,title:P}),_.jsx("span",{className:"conn-label",children:P})]}),_.jsxs("div",{className:"topbar-actions",children:[_.jsxs("div",{className:"view-switch",role:"tablist","aria-label":p("viewSwitch"),children:[_.jsxs("button",{type:"button",role:"tab","aria-selected":n==="chat",className:n==="chat"?"active":"",onClick:()=>r("chat"),children:[_.jsx(Wh,{}),_.jsx("span",{children:p("chat")})]}),_.jsxs("button",{type:"button",role:"tab","aria-selected":n==="terminal",className:n==="terminal"?"active":"",onClick:()=>r("terminal"),children:[_.jsx(Wd,{}),_.jsx("span",{children:p("terminal")})]})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Kd,{}),_.jsx("span",{className:"chip-model",children:y?y.name:p("selectModel")}),y&&_.jsx("span",{className:"chip-sub",children:y.provider})]}),open:w,onOpenChange:S,children:[_.jsx("div",{className:"dd-header",children:p("availableModels")}),(O||e.modelsLoading)&&_.jsx("div",{className:"dd-loading",children:p("loading")}),e.models.length===0&&!O&&!e.modelsLoading&&_.jsx("div",{className:"dd-loading",children:p("noModels")}),e.models.map(H=>_.jsxs(ah,{active:b===H.id,onClick:()=>{b!==H.id&&t({type:"set_model",modelId:H.id}),S(!1)},children:[_.jsx("span",{className:"dd-model-name",children:H.name}),_.jsxs("span",{className:"dd-model-sub",children:[H.provider,H.reasoning?` · ${p("reasoning")}`:""]})]},H.id)),_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"list_models"}),children:p("refreshModels")}),_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>{S(!1),o()},children:p("manageModels")})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(Dw,{}),_.jsx("span",{className:"chip-sub",children:p("thinkingChip",{level:m?j(m.thinkingLevel):"—"})})]}),open:k,onOpenChange:E,children:[_.jsx("div",{className:"dd-header",children:p("thinkingLevel")}),K.map(H=>_.jsx(ah,{active:(m==null?void 0:m.thinkingLevel)===H.value,onClick:()=>{(m==null?void 0:m.thinkingLevel)!==H.value&&t({type:"set_thinking",level:H.value}),E(!1)},children:H.label},H.value))]}),_.jsx(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(uv,{}),_.jsx("span",{className:"chip-sub",children:p("sound")})]}),open:T,onOpenChange:N,children:_.jsx(Yw,{settings:a,onChange:l,onPreview:u})}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(zw,{}),_.jsx("span",{className:"chip-sub",children:d==="zh"?p("langZh"):"EN"})]}),open:M,onOpenChange:q,children:[_.jsx("div",{className:"dd-header",children:p("language")}),W.map(H=>_.jsx(ah,{active:d===H.value,onClick:()=>{h(H.value),q(!1)},children:H.label},H.value))]}),_.jsxs("button",{type:"button",className:"chip newchat","data-tip":p("newChatTip"),onClick:()=>t({type:"new_chat"}),children:[_.jsx(ss,{}),_.jsx("span",{children:p("newChat")})]}),_.jsxs(Do,{trigger:_.jsxs(_.Fragment,{children:[_.jsx(fv,{}),_.jsxs("span",{className:"chip-sub",children:["v",((te=e.update)==null?void 0:te.current)??"…"]}),e.update&&!e.update.upToDate&&!e.update.pendingRestart&&_.jsx("span",{className:"update-dot",title:p("updateAvailable",{version:e.update.latest??""})})]}),open:L,onOpenChange:H=>{re(H),F(!1),H&&t({type:"check_update"})},fit:!0,children:[_.jsx("div",{className:"dd-header",children:p("update")}),_.jsxs("div",{className:"dd-update",children:[_.jsxs("div",{className:"dd-row",children:[_.jsx("span",{children:p("currentVersion")}),_.jsxs("b",{children:["v",((z=e.update)==null?void 0:z.current)??"…"]})]}),_.jsxs("div",{className:"dd-row",children:[_.jsx("span",{children:p("latestVersion")}),_.jsx("b",{children:e.update===null?p("checkingUpdate"):e.update.error?e.update.error:e.update.latest?`v${e.update.latest}`:p("checkingUpdate")})]}),((ie=e.update)==null?void 0:ie.pendingRestart)&&_.jsx("div",{className:"dd-note ok",children:p("updateSuccess")}),e.update&&!e.update.pendingRestart&&e.update.upToDate&&_.jsx("div",{className:"dd-note ok",children:p("upToDate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&_.jsx("div",{className:"dd-note warn",children:p("updateAvailable",{version:e.update.latest})}),((C=e.update)==null?void 0:C.latestPublishedAt)&&Date.now()-new Date(e.update.latestPublishedAt).getTime()<30*6e4&&_.jsx("div",{className:"dd-note warn",children:p("updateJustPublished",{version:e.update.latest??""})}),e.updateResult&&!e.updateResult.ok&&_.jsx("div",{className:"dd-note err",children:p("updateFailed",{detail:e.updateResult.detail})}),((D=e.update)==null?void 0:D.pendingRestart)&&_.jsx("div",{className:"dd-note",children:p("restartHint")})]}),_.jsxs("div",{className:"dd-actions",children:[_.jsx("button",{type:"button",className:"dd-refresh",onClick:()=>t({type:"check_update"}),children:e.update===null?p("checkingUpdate"):p("checkUpdate")}),e.update&&!e.update.pendingRestart&&!e.update.upToDate&&e.update.latest&&_.jsx("button",{type:"button",className:`dd-refresh accent ${Z?"armed":""}`,onClick:()=>{if(!Z){F(!0);return}F(!1),re(!1),t({type:"update_app"})},children:p(Z?"confirmUpdate":"updateNow")})]})]})]})]})}function eg(e){const t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?`${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`:`${t.getMonth()+1}/${t.getDate()}`}function Qw({chat:e,send:t}){var h,p;const n=qt(),r=(h=e.state)==null?void 0:h.sessionFile,o=(p=e.state)==null?void 0:p.cwd,a=e.sessions,l=e.projects,u=m=>{const y=m.name||m.firstMessage.trim();return y.length>0?y:n("emptyChat")},d=m=>m.split(/[\\/]/).pop()||m;return _.jsxs("aside",{className:"panel panel-left",children:[l.length>0&&_.jsxs("div",{className:"panel-projects",children:[_.jsx("div",{className:"panel-section-title",children:n("recentProjects")}),l.map(m=>{const y=o===m.path;return _.jsxs("button",{type:"button",className:`project-item ${y?"active":""}`,title:m.path,onClick:()=>{y||t({type:"set_cwd",path:m.path})},children:[_.jsx(ra,{className:"project-icon"}),_.jsxs("span",{className:"project-info",children:[_.jsx("span",{className:"project-name",children:d(m.path)}),_.jsx("span",{className:"project-path",children:m.path})]}),_.jsx("span",{className:"project-time",children:eg(m.lastUsed)})]},m.path)})]}),e.conversations.length>1&&_.jsxs("div",{className:"panel-convs",children:[_.jsx("div",{className:"panel-section-title",children:n("openConversations")}),e.conversations.map(m=>{const y=e.activeConversationId===m.id;return _.jsxs("button",{type:"button",className:`session-item ${y?"active":""}`,title:`${m.title} — ${m.cwd}`,onClick:()=>{y||t({type:"switch_conversation",id:m.id})},children:[_.jsx(Wh,{className:"session-icon"}),_.jsxs("span",{className:"session-info",children:[_.jsx("span",{className:"session-title",children:m.title}),_.jsxs("span",{className:"session-sub",children:[_.jsxs("span",{className:"session-cwd",title:m.cwd,children:[_.jsx(ra,{})," ",d(m.cwd)]}),y?n("current"):n("messageCount",{n:m.messageCount})]})]}),m.isStreaming&&_.jsx("span",{className:"conv-streaming",title:n("streaming")})]},m.id)}),_.jsx("div",{className:"panel-section-divider"})]}),_.jsxs("div",{className:"panel-sessions",children:[_.jsx("div",{className:"panel-section-title",children:n("historySessions")}),_.jsxs("div",{className:"sessions-scroll",children:[a.length===0&&_.jsx("div",{className:"panel-empty",children:n("noHistory")}),a.map(m=>{const y=r===m.path;return _.jsxs("button",{type:"button",className:`session-item ${y?"active":""}`,title:m.path,onClick:()=>{y||t({type:"switch_session",path:m.path})},children:[_.jsx(Wh,{className:"session-icon"}),_.jsxs("span",{className:"session-info",children:[_.jsx("span",{className:"session-title",children:u(m)}),_.jsxs("span",{className:"session-sub",children:[y?n("current"):n("messageCount",{n:m.messageCount}),m.source==="tui"&&_.jsx("span",{className:"session-src",title:n("tuiTip"),children:"TUI"})]})]}),_.jsx("span",{className:"session-time",children:eg(m.modified)})]},m.path)})]})]}),_.jsx("button",{type:"button",className:"panel-fab",title:n("refreshList"),onClick:()=>{t({type:"list_sessions"}),t({type:"list_projects"})},children:_.jsx(hc,{})})]})}const tg=2e5,Jw=2e5;function e0(){const e=new Map,t=new Map;return{write(n,r){const o=e.get(n);if(o){o.write(r);return}const a=t.get(n)??"",l=a.length+r.length>Jw?r:a+r;t.set(n,l)},register(n,r){e.set(n,r);const o=t.get(n);if(o){try{r.write(o)}catch{}t.delete(n)}return()=>{e.get(n)===r&&e.delete(n),t.delete(n)}},clear(){e.clear(),t.clear()}}}function t0(e,t){const n=new Set;for(const o of t.messages)o.role==="toolResult"&&o.toolCallId&&n.add(o.toolCallId),o.role==="bashExecution"&&n.add(`bash-${o.id}`);let r=!1;for(const o of e.keys())n.has(o)&&(e.delete(o),r=!0);return r?new Map(e):e}function n0(e,t){switch(t.type){case"status":return{...e,status:t.status,ready:t.status==="open"?e.ready:!1,terminals:t.status==="open"?e.terminals:[]};case"ready":return{...e,serverVersion:t.serverVersion,ready:!0};case"snapshot":return{...e,ready:!0,state:t.state,activeConversationId:t.state.conversationId,liveOutputs:t0(e.liveOutputs,t.state)};case"tool_delta":{const n=e.liveOutputs.get(t.toolCallId),r=((n==null?void 0:n.text)??"")+t.delta,o=r.length>tg?r.slice(0,tg):r,a=new Map(e.liveOutputs);return a.set(t.toolCallId,{toolName:t.toolName,text:o}),{...e,liveOutputs:a}}case"notice":return{...e,notices:[...e.notices,t.notice].slice(-6)};case"dismiss_notice":return{...e,notices:e.notices.filter(n=>n.id!==t.id)};case"sessions":return{...e,sessions:t.sessions};case"conversations":return{...e,conversations:t.conversations,activeConversationId:t.activeId};case"projects":return{...e,projects:t.projects};case"files":return{...e,files:t.files};case"file_content":return{...e,fileContent:t.content};case"models":return{...e,models:t.models,modelsLoading:t.loading};case"models_config":return{...e,modelsConfig:t.providers};case"providers_status":return{...e,providers:t.providers};case"install_result":return{...e,installResult:t.result};case"path_completions":return{...e,pathCompletions:t.completions};case"update_status":return{...e,update:t.status};case"update_result":return{...e,updateResult:t.result};case"widgets":return{...e,widgets:t.widgets};case"statuses":return{...e,statuses:t.statuses};case"dialog":return{...e,dialog:t.dialog};case"commands":return{...e,commands:t.commands,commandsPath:t.path};case"terminal_add":return{...e,terminals:[...e.terminals,t.meta]};case"terminal_remove":return{...e,terminals:e.terminals.filter(n=>n.id!==t.id)};case"terminal_exit":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!1,exitCode:t.exitCode}:n)};case"terminal_restart":return{...e,terminals:e.terminals.map(n=>n.id===t.terminalId?{...n,running:!0,exitCode:null}:n)};default:return e}}const ng="pi-web-client-id";function qd(){let e=localStorage.getItem(ng);return e||(e=crypto.randomUUID(),localStorage.setItem(ng,e)),e}function i0(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`}function r0(){const[e,t]=Q.useReducer(n0,{status:"connecting",ready:!1,state:null,liveOutputs:new Map,notices:[],sessions:[],conversations:[],activeConversationId:"",projects:[],files:null,fileContent:null,models:[],modelsLoading:!1,modelsConfig:[],providers:[],installResult:null,pathCompletions:[],update:null,updateResult:null,widgets:[],statuses:[],dialog:null,commands:[],commandsPath:"",terminals:[]}),n=Q.useRef(null),r=Q.useRef(e0()),o=Q.useRef(0),a=Q.useRef(null),l=Q.useRef(!0),u=Q.useRef(0),d=Q.useRef(0),h=Q.useCallback((T,N)=>{const M=++d.current;t({type:"notice",notice:{id:M,level:T,text:N}}),setTimeout(()=>t({type:"dismiss_notice",id:M}),T==="error"?12e3:7e3)},[]),p=Q.useCallback(T=>{const N=n.current;return N&&N.readyState===WebSocket.OPEN?(N.send(JSON.stringify(T)),!0):!1},[]),m=Q.useCallback(()=>{if(!l.current)return;t({type:"status",status:"connecting"});const T=new WebSocket(i0());n.current=T,T.onopen=()=>{n.current===T&&(t({type:"status",status:"open"}),o.current=0,u.current=Date.now(),T.send(JSON.stringify({type:"hello",clientId:qd()})))},T.onmessage=N=>{if(n.current!==T)return;u.current=Date.now();let M;try{M=JSON.parse(N.data)}catch{return}switch(M.type){case"ready":t({type:"ready",serverVersion:M.serverVersion}),T.send(JSON.stringify({type:"get_state"})),T.send(JSON.stringify({type:"list_sessions"})),T.send(JSON.stringify({type:"list_projects"})),T.send(JSON.stringify({type:"list_files"})),T.send(JSON.stringify({type:"list_models"})),T.send(JSON.stringify({type:"list_commands"})),T.send(JSON.stringify({type:"check_update"}));break;case"snapshot":t({type:"snapshot",state:M.state});break;case"tool_delta":t({type:"tool_delta",toolCallId:M.toolCallId,toolName:M.toolName,delta:M.delta});break;case"notice":{const q=++d.current;t({type:"notice",notice:{id:q,level:M.level,text:M.text}}),setTimeout(()=>t({type:"dismiss_notice",id:q}),M.level==="error"?12e3:7e3);break}case"sessions":t({type:"sessions",sessions:M.sessions});break;case"conversations":t({type:"conversations",conversations:M.conversations,activeId:M.activeId});break;case"projects":t({type:"projects",projects:M.projects});break;case"files":t({type:"files",files:M});break;case"file_content":t({type:"file_content",content:M});break;case"models":t({type:"models",models:M.models,loading:!1});break;case"models_config":t({type:"models_config",providers:M.providers});break;case"providers_status":t({type:"providers_status",providers:M.providers});break;case"install_result":t({type:"install_result",result:M});break;case"path_completions":t({type:"path_completions",completions:M.completions});break;case"update_status":t({type:"update_status",status:M});break;case"update_result":t({type:"update_result",result:M});break;case"widgets":t({type:"widgets",widgets:M.widgets});break;case"statuses":t({type:"statuses",statuses:M.statuses});break;case"dialog":t({type:"dialog",dialog:{id:M.id,kind:M.kind,title:M.title,args:M.args}});break;case"dialog_closed":t({type:"dialog",dialog:null});break;case"terminal_output":r.current.write(M.terminalId,M.data);break;case"terminal_exit":t({type:"terminal_exit",terminalId:M.terminalId,exitCode:M.exitCode});break;case"commands":t({type:"commands",commands:M.commands,path:M.path});break}},T.onclose=()=>{if(n.current===T&&(n.current=null),r.current.clear(),!l.current)return;t({type:"status",status:"closed"});const N=Math.min(1e3*2**o.current,1e4);o.current+=1,a.current=setTimeout(()=>{a.current=null,m()},N)},T.onerror=()=>{T.close()}},[]);Q.useEffect(()=>{l.current=!0,m();const T=setInterval(()=>{if(!l.current)return;const N=n.current;N&&N.readyState===WebSocket.OPEN&&Date.now()-u.current>3e4&&N.close()},5e3);return()=>{var N;l.current=!1,clearInterval(T),a.current&&(clearTimeout(a.current),a.current=null),(N=n.current)==null||N.close(),n.current=null}},[m]);const y=Q.useCallback(T=>t({type:"dismiss_notice",id:T}),[]),b=Q.useCallback(T=>t({type:"terminal_add",meta:T}),[]),w=Q.useCallback(T=>t({type:"terminal_remove",id:T}),[]),S=Q.useCallback(T=>t({type:"terminal_restart",terminalId:T}),[]),k=Q.useCallback((T,N)=>r.current.register(T,N),[]),E=Q.useRef({chat:e,send:p,pushNotice:h,dismissNotice:y,terminal:{create:b,close:w,register:k,restart:S}});return E.current={chat:e,send:p,pushNotice:h,dismissNotice:y,terminal:{create:b,close:w,register:k,restart:S}},E.current}const s0=200*1024*1024,o0=/windows/i.test(navigator.userAgent),a0=/[<>:"/\\|?*\u0000-\u001f]/g,l0=/[. ]+$/,c0=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(\..*)?$/i;function u0(e){const t=e.replace(a0,"_").replace(l0,"");return t?c0.test(t)?`_${t}`:t:"_"}function ig(e,t=!0){return`/api/file?${new URLSearchParams({clientId:qd(),path:e,...t?{download:"1"}:{}})}`}async function h0(e,t){const n=o0?u0(t):t;try{const r=await fetch(ig(e));if(!r.ok)return{ok:!1,cancelled:!1,error:await r.text().catch(()=>"")||(r.status===404?"文件不存在":`HTTP ${r.status}`)};if(Number(r.headers.get("content-length")??"0")>s0)return window.location.assign(ig(e)),{ok:!0};const a=await r.blob();return window.showSaveFilePicker&&window.isSecureContext?d0(a,n):qh(a,n)}catch(r){return{ok:!1,cancelled:!1,error:r instanceof Error?r.message:String(r)}}}async function d0(e,t){let n;const r=window.showSaveFilePicker;if(!r)return qh(e,t);try{n=await r({suggestedName:t})}catch(o){return o instanceof DOMException&&o.name==="AbortError"?{ok:!1,cancelled:!0}:qh(e,t)}try{const o=await n.createWritable();return await o.write(e),await o.close(),{ok:!0}}catch(o){return{ok:!1,cancelled:!1,error:o instanceof Error?o.message:String(o)}}}function qh(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");return r.href=n,r.download=t,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e4),{ok:!0}}function f0({chat:e,send:t,onAttach:n,onPreview:r,onNotice:o}){var T;const a=qt(),[l,u]=Q.useState(""),[d,h]=Q.useState(!1),p=e.files,m=1e4,y=Q.useRef(0),b=Q.useRef(void 0),w=Q.useCallback((N,M)=>{const q=++y.current;u(N),M!=null&&M.silent||h(!0),t({type:"list_files",path:N===""?void 0:N})||y.current===q&&h(!1)},[t]);Q.useEffect(()=>{p&&p.path===l&&h(!1)},[p,l]),Q.useEffect(()=>{var q;const N=(q=e.state)==null?void 0:q.cwd;if(N!==b.current){b.current=N,w("",{silent:!0});return}const M=setInterval(()=>{document.visibilityState!=="hidden"&&w(l,{silent:!0})},m);return()=>clearInterval(M)},[(T=e.state)==null?void 0:T.cwd,l,w]);const S=N=>w(N),k=()=>{(p==null?void 0:p.parent)!==null&&(p==null?void 0:p.parent)!==void 0&&w(p.parent)},E=l.split("/").filter(Boolean);return _.jsxs("aside",{className:"panel panel-right",children:[_.jsxs("div",{className:"panel-crumbs",children:[_.jsx("button",{type:"button",className:`crumb ${l===""?"active":""}`,onClick:()=>w(""),children:a("rootDir")}),E.map((N,M)=>{const q=E.slice(0,M+1).join("/");return _.jsxs("span",{className:"crumb-seg",children:[_.jsx(dc,{}),_.jsx("button",{type:"button",className:`crumb ${q===l?"active":""}`,onClick:()=>w(q),children:N})]},q)})]}),_.jsxs("div",{className:"panel-body",children:[d&&_.jsx("div",{className:"panel-empty",children:a("loading")}),!d&&p&&p.path===l&&_.jsxs(_.Fragment,{children:[p.path!==""&&_.jsxs("button",{type:"button",className:"file-item dir",onClick:k,children:[_.jsx(ra,{className:"file-icon"}),_.jsx("span",{className:"file-name",children:".."})]}),p.entries.map(N=>N.type==="dir"?_.jsxs("div",{className:"file-item dir",children:[_.jsxs("button",{type:"button",className:"file-dir-main",onClick:()=>S(N.path),children:[_.jsx(ra,{className:"file-icon"}),_.jsx("span",{className:"file-name",children:N.name})]}),_.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("linkFolderTip"),onClick:()=>n(N.path,N.name,"reference",!0),children:_.jsx(Kh,{})})]},N.path):_.jsxs("div",{className:"file-item file",children:[_.jsxs("button",{type:"button",className:"file-name",title:`${N.path} — ${a("previewFile")}`,onClick:()=>r(N.path,N.name),children:[_.jsx(hv,{className:"file-icon"}),_.jsx("span",{className:"file-name-text",children:N.name})]}),_.jsx("button",{type:"button",className:"file-attach download","data-tip":a("downloadFile"),onClick:()=>{h0(N.path,N.name).then(M=>{M.ok||M.cancelled||o("error",a("downloadFailed",{error:M.error}))})},children:_.jsx(fv,{})}),_.jsx("button",{type:"button",className:"file-attach inline","data-tip":a("attachInlineTip"),onClick:()=>n(N.path,N.name,"inline"),children:_.jsx(ss,{})}),_.jsx("button",{type:"button",className:"file-attach ref","data-tip":a("referenceTip"),onClick:()=>n(N.path,N.name,"reference"),children:_.jsx(Kh,{})})]},N.path))]}),!d&&!p&&_.jsx("div",{className:"panel-empty",children:a("noFiles")})]}),e.widgets.filter(N=>N.lines.length>0).length>0&&_.jsx("div",{className:"panel-widgets",children:e.widgets.filter(N=>N.lines.length>0).map(N=>_.jsxs("div",{className:"widget",children:[_.jsx("div",{className:"widget-title",children:N.key}),_.jsx("pre",{className:"widget-lines",children:N.lines.join(`
|
|
41
41
|
`)})]},N.key))}),_.jsx("button",{type:"button",className:"panel-fab",title:a("refreshFiles"),onClick:()=>w(l,{silent:!0}),children:_.jsx(hc,{})})]})}function p0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const m0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,g0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_0={};function rg(e,t){return(_0.jsx?g0:m0).test(e)}const v0=/[ \t\n\f\r]/g;function y0(e){return typeof e=="object"?e.type==="text"?sg(e.value):!1:sg(e)}function sg(e){return e.replace(v0,"")===""}class ha{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ha.prototype.normal={};ha.prototype.property={};ha.prototype.space=void 0;function yv(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ha(n,r,t)}function Vh(e){return e.toLowerCase()}class In{constructor(t,n){this.attribute=n,this.property=t}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let b0=0;const ze=cs(),Dt=cs(),Gh=cs(),le=cs(),lt=cs(),is=cs(),$n=cs();function cs(){return 2**++b0}const Yh=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Dt,commaOrSpaceSeparated:$n,commaSeparated:is,number:le,overloadedBoolean:Gh,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),lh=Object.keys(Yh);class Vd extends In{constructor(t,n,r,o){let a=-1;if(super(t,n),og(this,"space",o),typeof r=="number")for(;++a<lh.length;){const l=lh[a];og(this,lh[a],(r&Yh[l])===Yh[l])}}}Vd.prototype.defined=!0;function og(e,t,n){n&&(e[t]=n)}function Gs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new Vd(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Vh(r)]=r,n[Vh(a.attribute)]=r}return new ha(t,n,e.space)}const bv=Gs({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:lt,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:le,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:lt,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Dt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sv(e,t){return t in e?e[t]:t}function wv(e,t){return Sv(e,t.toLowerCase())}const S0=Gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alpha:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:lt,autoFocus:ze,autoPlay:ze,blocking:lt,capture:null,charSet:null,checked:ze,cite:null,className:lt,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:Dt,controls:ze,controlsList:lt,coords:le|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:Gh,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:lt,height:le,hidden:Gh,high:le,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:lt,itemRef:lt,itemScope:ze,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:le,pattern:null,ping:lt,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:lt,required:ze,reversed:ze,rows:le,rowSpan:le,sandbox:lt,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootCustomElementRegistry:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shadowRootSerializable:ze,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Dt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ze,disablePictureInPicture:ze,disableRemotePlayback:ze,exportParts:is,part:lt,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:wv}),w0=Gs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$n,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:lt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sv}),xv=Gs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),kv=Gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wv}),Ev=Gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),x0={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},k0=/[A-Z]/g,ag=/-[a-z]/g,E0=/^data[-\w.:]+$/i;function C0(e,t){const n=Vh(t);let r=t,o=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&E0.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ag,T0);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ag.test(a)){let l=a.replace(k0,N0);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=Vd}return new o(r,t)}function N0(e){return"-"+e.toLowerCase()}function T0(e){return e.charAt(1).toUpperCase()}const R0=yv([bv,S0,xv,kv,Ev],"html"),Gd=yv([bv,w0,xv,kv,Ev],"svg");function A0(e){return e.join(" ").trim()}var zs={},ch,lg;function M0(){if(lg)return ch;lg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
|
|
42
42
|
`,h="/",p="*",m="",y="comment",b="declaration";function w(k,E){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];E=E||{};var T=1,N=1;function M(W){var P=W.match(t);P&&(T+=P.length);var Y=W.lastIndexOf(d);N=~Y?W.length-Y:N+W.length}function q(){var W={line:T,column:N};return function(P){return P.position=new L(W),F(),P}}function L(W){this.start=W,this.end={line:T,column:N},this.source=E.source}L.prototype.content=k;function re(W){var P=new Error(E.source+":"+T+":"+N+": "+W);if(P.reason=W,P.filename=E.source,P.line=T,P.column=N,P.source=k,!E.silent)throw P}function Z(W){var P=W.exec(k);if(P){var Y=P[0];return M(Y),k=k.slice(Y.length),P}}function F(){Z(n)}function O(W){var P;for(W=W||[];P=X();)P!==!1&&W.push(P);return W}function X(){var W=q();if(!(h!=k.charAt(0)||p!=k.charAt(1))){for(var P=2;m!=k.charAt(P)&&(p!=k.charAt(P)||h!=k.charAt(P+1));)++P;if(P+=2,m===k.charAt(P-1))return re("End of comment missing");var Y=k.slice(2,P-2);return N+=2,M(Y),k=k.slice(P),N+=2,W({type:y,comment:Y})}}function K(){var W=q(),P=Z(r);if(P){if(X(),!Z(o))return re("property missing ':'");var Y=Z(a),te=W({type:b,property:S(P[0].replace(e,m)),value:Y?S(Y[0].replace(e,m)):m});return Z(l),te}}function j(){var W=[];O(W);for(var P;P=K();)P!==!1&&(W.push(P),O(W));return W}return F(),j()}function S(k){return k?k.replace(u,m):m}return ch=w,ch}var cg;function O0(){if(cg)return zs;cg=1;var e=zs&&zs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(zs,"__esModule",{value:!0}),zs.default=n;const t=e(M0());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const l=(0,t.default)(r),u=typeof o=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:p}=d;u?o(h,p,d):p&&(a=a||{},a[h]=p)}),a}return zs}var Po={},ug;function L0(){if(ug)return Po;ug=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},u=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),a(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,u):h=h.replace(r,u),h.replace(t,l))};return Po.camelCase=d,Po}var Bo,hg;function I0(){if(hg)return Bo;hg=1;var e=Bo&&Bo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(O0()),n=L0();function r(o,a){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(u,d){u&&d&&(l[(0,n.camelCase)(u,a)]=d)}),l}return r.default=r,Bo=r,Bo}var D0=I0();const P0=cc(D0),Cv=Nv("end"),Yd=Nv("start");function Nv(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function B0(e){const t=Yd(e),n=Cv(e);if(t&&n)return{start:t,end:n}}function ea(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?dg(e.position):"start"in e||"end"in e?dg(e):"line"in e||"column"in e?Xh(e):""}function Xh(e){return fg(e&&e.line)+":"+fg(e&&e.column)}function dg(e){return Xh(e&&e.start)+"-"+Xh(e&&e.end)}function fg(e){return e&&typeof e=="number"?e:1}class mn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?o=t:!a.cause&&t&&(l=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=ea(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}mn.prototype.file="";mn.prototype.name="";mn.prototype.reason="";mn.prototype.message="";mn.prototype.stack="";mn.prototype.column=void 0;mn.prototype.line=void 0;mn.prototype.ancestors=void 0;mn.prototype.cause=void 0;mn.prototype.fatal=void 0;mn.prototype.place=void 0;mn.prototype.ruleId=void 0;mn.prototype.source=void 0;const Xd={}.hasOwnProperty,F0=new Map,z0=/[A-Z]/g,U0=new Set(["table","tbody","thead","tfoot","tr"]),j0=new Set(["td","th"]),Tv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function H0(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=X0(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Y0(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Gd:R0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Rv(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function Rv(e,t,n){if(t.type==="element")return $0(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return W0(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return q0(e,t,n);if(t.type==="mdxjsEsm")return K0(e,t);if(t.type==="root")return V0(e,t,n);if(t.type==="text")return G0(e,t)}function $0(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Gd,e.schema=o),e.ancestors.push(t);const a=Mv(e,t.tagName,!1),l=Z0(e,t);let u=Qd(e,t);return U0.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!y0(d):!0})),Av(e,l,a,t),Zd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function W0(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}sa(e,t.position)}function K0(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sa(e,t.position)}function q0(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Gd,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:Mv(e,t.name,!0),l=Q0(e,t),u=Qd(e,t);return Av(e,l,a,t),Zd(l,u),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function V0(e,t,n){const r={};return Zd(r,Qd(e,t)),e.create(t,e.Fragment,r,n)}function G0(e,t){return t.value}function Av(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Zd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Y0(e,t,n){return r;function r(o,a,l,u){const h=Array.isArray(l.children)?n:t;return u?h(a,l,u):h(a,l)}}function X0(e,t){return n;function n(r,o,a,l){const u=Array.isArray(a.children),d=Yd(r);return t(o,a,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Z0(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Xd.call(t.properties,o)){const a=J0(e,o,t.properties[o]);if(a){const[l,u]=a;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&j0.has(t.tagName)?r=u:n[l]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Q0(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else sa(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else sa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Qd(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:F0;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const h=o.get(d)||0;l=d+"-"+h,o.set(d,h+1)}}const u=Rv(e,a,l);u!==void 0&&n.push(u)}return n}function J0(e,t,n){const r=C0(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?p0(n):A0(n)),r.property==="style"){let o=typeof n=="object"?n:ex(e,String(n));return e.stylePropertyNameCase==="css"&&(o=tx(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?x0[r.property]||r.property:r.attribute,n]}}function ex(e,t){try{return P0(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Tv+"#cannot-parse-style-attribute",o}}function Mv(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,l;for(;++a<o.length;){const u=rg(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=l}else r=rg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Xd.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);sa(e)}function sa(e,t){const n=new mn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Tv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function tx(e){const t={};let n;for(n in e)Xd.call(e,n)&&(t[nx(n)]=e[n]);return t}function nx(e){let t=e.replace(z0,ix);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ix(e){return"-"+e.toLowerCase()}const uh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},rx={};function Jd(e,t){const n=rx,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ov(e,r,o)}function Ov(e,t,n){if(sx(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return pg(e.children,t,n)}return Array.isArray(e)?pg(e,t,n):""}function pg(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Ov(e[o],t,n);return r.join("")}function sx(e){return!!(e&&typeof e=="object")}const mg=document.createElement("i");function ef(e){const t="&"+e+";";mg.innerHTML=t;const n=mg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Wn(e,t,n,r){const o=e.length;let a=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function ri(e,t){return e.length>0?(Wn(e,e.length,0,t),e):t}const gg={}.hasOwnProperty;function Lv(e){const t={};let n=-1;for(;++n<e.length;)ox(t,e[n]);return t}function ox(e,t){let n;for(n in t){const o=(gg.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){gg.call(o,l)||(o[l]=[]);const u=a[l];ax(o[l],Array.isArray(u)?u:u?[u]:[])}}}function ax(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Wn(e,0,0,r)}function Iv(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function _i(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wn=Tr(/[A-Za-z]/),pn=Tr(/[\dA-Za-z]/),lx=Tr(/[#-'*+\--9=?A-Z^-~]/);function Zl(e){return e!==null&&(e<32||e===127)}const Zh=Tr(/\d/),cx=Tr(/[\dA-Fa-f]/),ux=Tr(/[!-/:-@[-`{-~]/);function Me(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const fc=Tr(new RegExp("\\p{P}|\\p{S}","u")),os=Tr(/\s/);function Tr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ys(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(l=String.fromCharCode(a,u),o=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Je(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(d){return Ye(d)?(e.enter(n),u(d)):t(d)}function u(d){return Ye(d)&&a++<o?(e.consume(d),u):(e.exit(n),t(d))}}const hx={tokenize:dx};function dx(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),a(u)}function a(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Me(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),l)}}const fx={tokenize:px},_g={tokenize:mx};function px(e){const t=this,n=[];let r=0,o,a,l;return u;function u(N){if(r<n.length){const M=n[r];return t.containerState=M[1],e.attempt(M[0].continuation,d,h)(N)}return h(N)}function d(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&T();const M=t.events.length;let q=M,L;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){L=t.events[q][1].end;break}E(r);let re=M;for(;re<t.events.length;)t.events[re][1].end={...L},re++;return Wn(t.events,q+1,0,t.events.slice(M)),t.events.length=re,h(N)}return u(N)}function h(N){if(r===n.length){if(!o)return y(N);if(o.currentConstruct&&o.currentConstruct.concrete)return w(N);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_g,p,m)(N)}function p(N){return o&&T(),E(r),y(N)}function m(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,w(N)}function y(N){return t.containerState={},e.attempt(_g,b,w)(N)}function b(N){return r++,n.push([t.currentConstruct,t.containerState]),y(N)}function w(N){if(N===null){o&&T(),E(0),e.consume(N);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(N)}function S(N){if(N===null){k(e.exit("chunkFlow"),!0),E(0),e.consume(N);return}return Me(N)?(e.consume(N),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(N),S)}function k(N,M){const q=t.sliceStream(N);if(M&&q.push(null),N.previous=a,a&&(a.next=N),a=N,o.defineSkip(N.start),o.write(q),t.parser.lazy[N.start.line]){let L=o.events.length;for(;L--;)if(o.events[L][1].start.offset<l&&(!o.events[L][1].end||o.events[L][1].end.offset>l))return;const re=t.events.length;let Z=re,F,O;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(F){O=t.events[Z][1].end;break}F=!0}for(E(r),L=re;L<t.events.length;)t.events[L][1].end={...O},L++;Wn(t.events,Z+1,0,t.events.slice(re)),t.events.length=L}}function E(N){let M=n.length;for(;M-- >N;){const q=n[M];t.containerState=q[1],q[0].exit.call(t,e)}n.length=N}function T(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function mx(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qs(e){if(e===null||ct(e)||os(e))return 1;if(fc(e))return 2}function pc(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Qh={name:"attention",resolveAll:gx,tokenize:_x};function gx(e,t){let n=-1,r,o,a,l,u,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},y={...e[n][1].start};vg(m,-d),vg(y,d),l={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},a={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=ri(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=ri(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",a,t]]),h=ri(h,pc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=ri(h,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=ri(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Wn(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function _x(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=qs(r);let a;return l;function l(d){return a=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===a)return e.consume(d),u;const h=e.exit("attentionSequence"),p=qs(d),m=!p||p===2&&o||n.includes(d),y=!o||o===2&&p||n.includes(r);return h._open=!!(a===42?m:m&&(o||!y)),h._close=!!(a===42?y:y&&(p||!m)),t(d)}}function vg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vx={name:"autolink",tokenize:yx};function yx(e,t,n){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(b){return wn(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||pn(b)?(r=1,u(b)):h(b)}function u(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||pn(b))&&r++<32?(e.consume(b),u):(r=0,h(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Zl(b)?n(b):(e.consume(b),d)}function h(b){return b===64?(e.consume(b),p):lx(b)?(e.consume(b),h):n(b)}function p(b){return pn(b)?m(b):n(b)}function m(b){return b===46?(e.consume(b),r=0,p):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):y(b)}function y(b){if((b===45||pn(b))&&r++<63){const w=b===45?y:m;return e.consume(b),w}return n(b)}}const da={partial:!0,tokenize:bx};function bx(e,t,n){return r;function r(a){return Ye(a)?Je(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Me(a)?t(a):n(a)}}const Dv={continuation:{tokenize:wx},exit:xx,name:"blockQuote",tokenize:Sx};function Sx(e,t,n){const r=this;return o;function o(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ye(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function wx(e,t,n){const r=this;return o;function o(l){return Ye(l)?Je(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(Dv,t,n)(l)}}function xx(e){e.exit("blockQuote")}const Pv={name:"characterEscape",tokenize:kx};function kx(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return ux(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Bv={name:"characterReference",tokenize:Ex};function Ex(e,t,n){const r=this;let o=0,a,l;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,l=pn,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=cx,p):(e.enter("characterReferenceValue"),a=7,l=Zh,p(m))}function p(m){if(m===59&&o){const y=e.exit("characterReferenceValue");return l===pn&&!ef(r.sliceSerialize(y))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&o++<a?(e.consume(m),p):n(m)}}const yg={partial:!0,tokenize:Nx},bg={concrete:!0,name:"codeFenced",tokenize:Cx};function Cx(e,t,n){const r=this,o={partial:!0,tokenize:q};let a=0,l=0,u;return d;function d(L){return h(L)}function h(L){const re=r.events[r.events.length-1];return a=re&&re[1].type==="linePrefix"?re[2].sliceSerialize(re[1],!0).length:0,u=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===u?(l++,e.consume(L),p):l<3?n(L):(e.exit("codeFencedFenceSequence"),Ye(L)?Je(e,m,"whitespace")(L):m(L))}function m(L){return L===null||Me(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(yg,S,M)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(L))}function y(L){return L===null||Me(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Ye(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,b,"whitespace")(L)):L===96&&L===u?n(L):(e.consume(L),y)}function b(L){return L===null||Me(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(L))}function w(L){return L===null||Me(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===u?n(L):(e.consume(L),w)}function S(L){return e.attempt(o,M,k)(L)}function k(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),E}function E(L){return a>0&&Ye(L)?Je(e,T,"linePrefix",a+1)(L):T(L)}function T(L){return L===null||Me(L)?e.check(yg,S,M)(L):(e.enter("codeFlowValue"),N(L))}function N(L){return L===null||Me(L)?(e.exit("codeFlowValue"),T(L)):(e.consume(L),N)}function M(L){return e.exit("codeFenced"),t(L)}function q(L,re,Z){let F=0;return O;function O(P){return L.enter("lineEnding"),L.consume(P),L.exit("lineEnding"),X}function X(P){return L.enter("codeFencedFence"),Ye(P)?Je(L,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):K(P)}function K(P){return P===u?(L.enter("codeFencedFenceSequence"),j(P)):Z(P)}function j(P){return P===u?(F++,L.consume(P),j):F>=l?(L.exit("codeFencedFenceSequence"),Ye(P)?Je(L,W,"whitespace")(P):W(P)):Z(P)}function W(P){return P===null||Me(P)?(L.exit("codeFencedFence"),re(P)):Z(P)}}}function Nx(e,t,n){const r=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const hh={name:"codeIndented",tokenize:Rx},Tx={partial:!0,tokenize:Ax};function Rx(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Je(e,a,"linePrefix",5)(h)}function a(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Me(h)?e.attempt(Tx,l,d)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Me(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function d(h){return e.exit("codeIndented"),t(h)}}function Ax(e,t,n){const r=this;return o;function o(l){return r.parser.lazy[r.now().line]?n(l):Me(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Je(e,a,"linePrefix",5)(l)}function a(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Me(l)?o(l):n(l)}}const Mx={name:"codeText",previous:Lx,resolve:Ox,tokenize:Ix};function Ox(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function Lx(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ix(e,t,n){let r=0,o,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),o=0,p(m)):Me(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Me(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",h(m))}}class Dx{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Fo(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Fo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Fo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Fo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Fo(this.left,n.reverse())}}}function Fo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Fv(e){const t={};let n=-1,r,o,a,l,u,d,h;const p=new Dx(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Px(p,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(l=p.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(r[1].end={...p.get(o)[1].start},u=p.slice(o,n),u.unshift(r),p.splice(o,n-o+1,u))}}return Wn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function Px(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],h={};let p,m,y=-1,b=n,w=0,S=0;const k=[S];for(;b;){for(;e.get(++o)[1]!==b;);a.push(o),b._tokenizer||(p=r.sliceStream(b),b.next||p.push(null),m&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=b,b=b.next}for(b=n;++y<u.length;)u[y][0]==="exit"&&u[y-1][0]==="enter"&&u[y][1].type===u[y-1][1].type&&u[y][1].start.line!==u[y][1].end.line&&(S=y+1,k.push(S),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):k.pop(),y=k.length;y--;){const E=u.slice(k[y],k[y+1]),T=a.pop();d.push([T,T+E.length-1]),e.splice(T,2,E)}for(d.reverse(),y=-1;++y<d.length;)h[w+d[y][0]]=w+d[y][1],w+=d[y][1]-d[y][0]-1;return h}const Bx={resolve:zx,tokenize:Ux},Fx={partial:!0,tokenize:jx};function zx(e){return Fv(e),e}function Ux(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?a(u):Me(u)?e.check(Fx,l,a)(u):(e.consume(u),o)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function jx(e,t,n){const r=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Je(e,a,"linePrefix")}function a(l){if(l===null||Me(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function zv(e,t,n,r,o,a,l,u,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(E){return E===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(E),e.exit(a),y):E===null||E===32||E===41||Zl(E)?n(E):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),S(E))}function y(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===62?(e.exit("chunkString"),e.exit(u),y(E)):E===null||E===60||Me(E)?n(E):(e.consume(E),E===92?w:b)}function w(E){return E===60||E===62||E===92?(e.consume(E),b):b(E)}function S(E){return!p&&(E===null||E===41||ct(E))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(E)):p<h&&E===40?(e.consume(E),p++,S):E===41?(e.consume(E),p--,S):E===null||E===32||E===40||Zl(E)?n(E):(e.consume(E),E===92?k:S)}function k(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function Uv(e,t,n,r,o,a){const l=this;let u=0,d;return h;function h(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(a),p}function p(b){return u>999||b===null||b===91||b===93&&!d||b===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(a),e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):Me(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||b===91||b===93||Me(b)||u++>999?(e.exit("chunkString"),p(b)):(e.consume(b),d||(d=!Ye(b)),b===92?y:m)}function y(b){return b===91||b===92||b===93?(e.consume(b),u++,m):m(b)}}function jv(e,t,n,r,o,a){let l;return u;function u(y){return y===34||y===39||y===40?(e.enter(r),e.enter(o),e.consume(y),e.exit(o),l=y===40?41:y,d):n(y)}function d(y){return y===l?(e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):(e.enter(a),h(y))}function h(y){return y===l?(e.exit(a),d(l)):y===null?n(y):Me(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===l||y===null||Me(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?m:p)}function m(y){return y===l||y===92?(e.consume(y),p):p(y)}}function ta(e,t){let n;return r;function r(o){return Me(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ye(o)?Je(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Hx={name:"definition",tokenize:Wx},$x={partial:!0,tokenize:Kx};function Wx(e,t,n){const r=this;let o;return a;function a(b){return e.enter("definition"),l(b)}function l(b){return Uv.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function u(b){return o=_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return ct(b)?ta(e,h)(b):h(b)}function h(b){return zv(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function p(b){return e.attempt($x,m,m)(b)}function m(b){return Ye(b)?Je(e,y,"whitespace")(b):y(b)}function y(b){return b===null||Me(b)?(e.exit("definition"),r.parser.defined.push(o),t(b)):n(b)}}function Kx(e,t,n){return r;function r(u){return ct(u)?ta(e,o)(u):n(u)}function o(u){return jv(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Ye(u)?Je(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Me(u)?t(u):n(u)}}const qx={name:"hardBreakEscape",tokenize:Vx};function Vx(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Me(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Gx={name:"headingAtx",resolve:Yx,tokenize:Xx};function Yx(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Wn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Xx(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||ct(p)?(e.exit("atxHeadingSequence"),u(p)):n(p)}function u(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Me(p)?(e.exit("atxHeading"),t(p)):Ye(p)?Je(e,u,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),u(p))}function h(p){return p===null||p===35||ct(p)?(e.exit("atxHeadingText"),u(p)):(e.consume(p),h)}}const Zx=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Sg=["pre","script","style","textarea"],Qx={concrete:!0,name:"htmlFlow",resolveTo:tk,tokenize:nk},Jx={partial:!0,tokenize:rk},ek={partial:!0,tokenize:ik};function tk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function nk(e,t,n){const r=this;let o,a,l,u,d;return h;function h(R){return p(R)}function p(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),m}function m(R){return R===33?(e.consume(R),y):R===47?(e.consume(R),a=!0,S):R===63?(e.consume(R),o=3,r.interrupt?t:C):wn(R)?(e.consume(R),l=String.fromCharCode(R),k):n(R)}function y(R){return R===45?(e.consume(R),o=2,b):R===91?(e.consume(R),o=5,u=0,w):wn(R)?(e.consume(R),o=4,r.interrupt?t:C):n(R)}function b(R){return R===45?(e.consume(R),r.interrupt?t:C):n(R)}function w(R){const ge="CDATA[";return R===ge.charCodeAt(u++)?(e.consume(R),u===ge.length?r.interrupt?t:K:w):n(R)}function S(R){return wn(R)?(e.consume(R),l=String.fromCharCode(R),k):n(R)}function k(R){if(R===null||R===47||R===62||ct(R)){const ge=R===47,Ne=l.toLowerCase();return!ge&&!a&&Sg.includes(Ne)?(o=1,r.interrupt?t(R):K(R)):Zx.includes(l.toLowerCase())?(o=6,ge?(e.consume(R),E):r.interrupt?t(R):K(R)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):a?T(R):N(R))}return R===45||pn(R)?(e.consume(R),l+=String.fromCharCode(R),k):n(R)}function E(R){return R===62?(e.consume(R),r.interrupt?t:K):n(R)}function T(R){return Ye(R)?(e.consume(R),T):O(R)}function N(R){return R===47?(e.consume(R),O):R===58||R===95||wn(R)?(e.consume(R),M):Ye(R)?(e.consume(R),N):O(R)}function M(R){return R===45||R===46||R===58||R===95||pn(R)?(e.consume(R),M):q(R)}function q(R){return R===61?(e.consume(R),L):Ye(R)?(e.consume(R),q):N(R)}function L(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),d=R,re):Ye(R)?(e.consume(R),L):Z(R)}function re(R){return R===d?(e.consume(R),d=null,F):R===null||Me(R)?n(R):(e.consume(R),re)}function Z(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||ct(R)?q(R):(e.consume(R),Z)}function F(R){return R===47||R===62||Ye(R)?N(R):n(R)}function O(R){return R===62?(e.consume(R),X):n(R)}function X(R){return R===null||Me(R)?K(R):Ye(R)?(e.consume(R),X):n(R)}function K(R){return R===45&&o===2?(e.consume(R),Y):R===60&&o===1?(e.consume(R),te):R===62&&o===4?(e.consume(R),D):R===63&&o===3?(e.consume(R),C):R===93&&o===5?(e.consume(R),ie):Me(R)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Jx,H,j)(R)):R===null||Me(R)?(e.exit("htmlFlowData"),j(R)):(e.consume(R),K)}function j(R){return e.check(ek,W,H)(R)}function W(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),P}function P(R){return R===null||Me(R)?j(R):(e.enter("htmlFlowData"),K(R))}function Y(R){return R===45?(e.consume(R),C):K(R)}function te(R){return R===47?(e.consume(R),l="",z):K(R)}function z(R){if(R===62){const ge=l.toLowerCase();return Sg.includes(ge)?(e.consume(R),D):K(R)}return wn(R)&&l.length<8?(e.consume(R),l+=String.fromCharCode(R),z):K(R)}function ie(R){return R===93?(e.consume(R),C):K(R)}function C(R){return R===62?(e.consume(R),D):R===45&&o===2?(e.consume(R),C):K(R)}function D(R){return R===null||Me(R)?(e.exit("htmlFlowData"),H(R)):(e.consume(R),D)}function H(R){return e.exit("htmlFlow"),t(R)}}function ik(e,t,n){const r=this;return o;function o(l){return Me(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function rk(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(da,t,n)}}const sk={name:"htmlText",tokenize:ok};function ok(e,t,n){const r=this;let o,a,l;return u;function u(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),q):C===63?(e.consume(C),N):wn(C)?(e.consume(C),Z):n(C)}function h(C){return C===45?(e.consume(C),p):C===91?(e.consume(C),a=0,w):wn(C)?(e.consume(C),T):n(C)}function p(C){return C===45?(e.consume(C),b):n(C)}function m(C){return C===null?n(C):C===45?(e.consume(C),y):Me(C)?(l=m,te(C)):(e.consume(C),m)}function y(C){return C===45?(e.consume(C),b):m(C)}function b(C){return C===62?Y(C):C===45?y(C):m(C)}function w(C){const D="CDATA[";return C===D.charCodeAt(a++)?(e.consume(C),a===D.length?S:w):n(C)}function S(C){return C===null?n(C):C===93?(e.consume(C),k):Me(C)?(l=S,te(C)):(e.consume(C),S)}function k(C){return C===93?(e.consume(C),E):S(C)}function E(C){return C===62?Y(C):C===93?(e.consume(C),E):S(C)}function T(C){return C===null||C===62?Y(C):Me(C)?(l=T,te(C)):(e.consume(C),T)}function N(C){return C===null?n(C):C===63?(e.consume(C),M):Me(C)?(l=N,te(C)):(e.consume(C),N)}function M(C){return C===62?Y(C):N(C)}function q(C){return wn(C)?(e.consume(C),L):n(C)}function L(C){return C===45||pn(C)?(e.consume(C),L):re(C)}function re(C){return Me(C)?(l=re,te(C)):Ye(C)?(e.consume(C),re):Y(C)}function Z(C){return C===45||pn(C)?(e.consume(C),Z):C===47||C===62||ct(C)?F(C):n(C)}function F(C){return C===47?(e.consume(C),Y):C===58||C===95||wn(C)?(e.consume(C),O):Me(C)?(l=F,te(C)):Ye(C)?(e.consume(C),F):Y(C)}function O(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),O):X(C)}function X(C){return C===61?(e.consume(C),K):Me(C)?(l=X,te(C)):Ye(C)?(e.consume(C),X):F(C)}function K(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),o=C,j):Me(C)?(l=K,te(C)):Ye(C)?(e.consume(C),K):(e.consume(C),W)}function j(C){return C===o?(e.consume(C),o=void 0,P):C===null?n(C):Me(C)?(l=j,te(C)):(e.consume(C),j)}function W(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||ct(C)?F(C):(e.consume(C),W)}function P(C){return C===47||C===62||ct(C)?F(C):n(C)}function Y(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function te(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),z}function z(C){return Ye(C)?Je(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):ie(C)}function ie(C){return e.enter("htmlTextData"),l(C)}}const tf={name:"labelEnd",resolveAll:uk,resolveTo:hk,tokenize:dk},ak={tokenize:fk},lk={tokenize:pk},ck={tokenize:mk};function uk(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Wn(e,0,e.length,n),e}function hk(e,t){let n=e.length,r=0,o,a,l,u;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(l=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",h,t]],u=ri(u,e.slice(a+1,a+r+3)),u=ri(u,[["enter",p,t]]),u=ri(u,pc(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),u=ri(u,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),u=ri(u,e.slice(l+1)),u=ri(u,[["exit",d,t]]),Wn(e,a,e.length,u),e}function dk(e,t,n){const r=this;let o=r.events.length,a,l;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return u;function u(y){return a?a._inactive?m(y):(l=r.parser.defined.includes(_i(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):n(y)}function d(y){return y===40?e.attempt(ak,p,l?p:m)(y):y===91?e.attempt(lk,p,l?h:m)(y):l?p(y):m(y)}function h(y){return e.attempt(ck,p,m)(y)}function p(y){return t(y)}function m(y){return a._balanced=!0,n(y)}}function fk(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return ct(m)?ta(e,a)(m):a(m)}function a(m){return m===41?p(m):zv(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return ct(m)?ta(e,d)(m):p(m)}function u(m){return n(m)}function d(m){return m===34||m===39||m===40?jv(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return ct(m)?ta(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function pk(e,t,n){const r=this;return o;function o(u){return Uv.call(r,e,a,l,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function mk(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const gk={name:"labelStartImage",resolveAll:tf.resolveAll,tokenize:_k};function _k(e,t,n){const r=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const vk={name:"labelStartLink",resolveAll:tf.resolveAll,tokenize:yk};function yk(e,t,n){const r=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const dh={name:"lineEnding",tokenize:bk};function bk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const Hl={name:"thematicBreak",tokenize:Sk};function Sk(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,u(h)}function u(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Me(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ye(h)?Je(e,u,"whitespace")(h):u(h))}}const Ln={continuation:{tokenize:Ek},exit:Nk,name:"list",tokenize:kk},wk={partial:!0,tokenize:Tk},xk={partial:!0,tokenize:Ck};function kk(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return u;function u(b){const w=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Zh(b)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Hl,n,h)(b):h(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return Zh(b)&&++l<10?(e.consume(b),d):(!r.interrupt||l<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(da,r.interrupt?n:p,e.attempt(wk,y,m))}function p(b){return r.containerState.initialBlankLine=!0,a++,y(b)}function m(b){return Ye(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),y):n(b)}function y(b){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function Ek(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(da,o,a);function o(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Ye(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xk,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(Ln,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Ck(e,t,n){const r=this;return Je(e,o,"listItemIndent",r.containerState.size+1);function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function Nk(e){e.exit(this.containerState.type)}function Tk(e,t,n){const r=this;return Je(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const l=r.events[r.events.length-1];return!Ye(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const wg={name:"setextUnderline",resolveTo:Rk,tokenize:Ak};function Rk(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Ak(e,t,n){const r=this;let o;return a;function a(h){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===o?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),Ye(h)?Je(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Me(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Mk={tokenize:Ok};function Ok(e){const t=this,n=e.attempt(da,r,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Bx,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Lk={resolveAll:$v()},Ik=Hv("string"),Dk=Hv("text");function Hv(e){return{resolveAll:$v(e==="text"?Pk:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,l,u);return l;function l(p){return h(p)?a(p):u(p)}function u(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=o[p];let y=-1;if(m)for(;++y<m.length;){const b=m[y];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function $v(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function Pk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,l=-1,u=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)d=!0,u++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Bk={42:Ln,43:Ln,45:Ln,48:Ln,49:Ln,50:Ln,51:Ln,52:Ln,53:Ln,54:Ln,55:Ln,56:Ln,57:Ln,62:Dv},Fk={91:Hx},zk={[-2]:hh,[-1]:hh,32:hh},Uk={35:Gx,42:Hl,45:[wg,Hl],60:Qx,61:wg,95:Hl,96:bg,126:bg},jk={38:Bv,92:Pv},Hk={[-5]:dh,[-4]:dh,[-3]:dh,33:gk,38:Bv,42:Qh,60:[vx,sk],91:vk,92:[qx,Pv],93:tf,95:Qh,96:Mx},$k={null:[Qh,Lk]},Wk={null:[42,95]},Kk={null:[]},qk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Wk,contentInitial:Fk,disable:Kk,document:Bk,flow:Uk,flowInitial:zk,insideSpan:$k,string:jk,text:Hk},Symbol.toStringTag,{value:"Module"}));function Vk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let l=[],u=[];const d={attempt:re(q),check:re(L),consume:T,enter:N,exit:M,interrupt:re(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:w,parser:e,previous:null,sliceSerialize:y,sliceStream:b,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function m(X){return l=ri(l,X),k(),l[l.length-1]!==null?[]:(Z(t,0),h.events=pc(a,h.events,h),h.events)}function y(X,K){return Yk(b(X),K)}function b(X){return Gk(l,X)}function w(){const{_bufferIndex:X,_index:K,line:j,column:W,offset:P}=r;return{_bufferIndex:X,_index:K,line:j,column:W,offset:P}}function S(X){o[X.line]=X.column,O()}function k(){let X;for(;r._index<l.length;){const K=l[r._index];if(typeof K=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<K.length;)E(K.charCodeAt(r._bufferIndex));else E(K)}}function E(X){p=p(X)}function T(X){Me(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,O()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=X}function N(X,K){const j=K||{};return j.type=X,j.start=w(),h.events.push(["enter",j,h]),u.push(j),j}function M(X){const K=u.pop();return K.end=w(),h.events.push(["exit",K,h]),K}function q(X,K){Z(X,K.from)}function L(X,K){K.restore()}function re(X,K){return j;function j(W,P,Y){let te,z,ie,C;return Array.isArray(W)?H(W):"tokenize"in W?H([W]):D(W);function D(ve){return Ue;function Ue(Ie){const je=Ie!==null&&ve[Ie],nt=Ie!==null&&ve.null,Ft=[...Array.isArray(je)?je:je?[je]:[],...Array.isArray(nt)?nt:nt?[nt]:[]];return H(Ft)(Ie)}}function H(ve){return te=ve,z=0,ve.length===0?Y:R(ve[z])}function R(ve){return Ue;function Ue(Ie){return C=F(),ie=ve,ve.partial||(h.currentConstruct=ve),ve.name&&h.parser.constructs.disable.null.includes(ve.name)?Ne():ve.tokenize.call(K?Object.assign(Object.create(h),K):h,d,ge,Ne)(Ie)}}function ge(ve){return X(ie,C),P}function Ne(ve){return C.restore(),++z<te.length?R(te[z]):Y}}}function Z(X,K){X.resolveAll&&!a.includes(X)&&a.push(X),X.resolve&&Wn(h.events,K,h.events.length-K,X.resolve(h.events.slice(K),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function F(){const X=w(),K=h.previous,j=h.currentConstruct,W=h.events.length,P=Array.from(u);return{from:W,restore:Y};function Y(){r=X,h.previous=K,h.currentConstruct=j,h.events.length=W,u=P,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function Gk(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,a)];else{if(l=e.slice(n,o),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}a>0&&l.push(e[o].slice(0,a))}return l}function Yk(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
|
|
43
43
|
`;break}case-3:{l=`\r
|