@wu529778790/open-im 1.11.1-beta.12 → 1.11.1-beta.13

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.11.1-beta.12",
3
+ "version": "1.11.1-beta.13",
4
4
  "description": "Your AI coding assistant, in every chat app. Multi-platform IM bridge for Claude Code, Codex, and CodeBuddy.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -46,7 +46,7 @@
46
46
  `+s[a].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),T}while(1<=a&&0<=n);break}}}finally{Ya=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?Ll(t):""}function ii(e,l){switch(e.tag){case 26:case 27:case 5:return Ll(e.type);case 16:return Ll("Lazy");case 13:return e.child!==l&&l!==null?Ll("Suspense Fallback"):Ll("Suspense");case 19:return Ll("SuspenseList");case 0:case 15:return Qa(e.type,!1);case 11:return Qa(e.type.render,!1);case 1:return Qa(e.type,!0);case 31:return Ll("Activity");default:return""}}function Qn(e){try{var l="",t=null;do l+=ii(e,t),t=e,e=e.return;while(e);return l}catch(a){return`
47
47
  Error generating stack: `+a.message+`
48
48
  `+a.stack}}var Ga=Object.prototype.hasOwnProperty,Xa=v.unstable_scheduleCallback,Za=v.unstable_cancelCallback,ci=v.unstable_shouldYield,M=v.unstable_requestPaint,Q=v.unstable_now,Ae=v.unstable_getCurrentPriorityLevel,xe=v.unstable_ImmediatePriority,pl=v.unstable_UserBlockingPriority,Yl=v.unstable_NormalPriority,ka=v.unstable_LowPriority,Gn=v.unstable_IdlePriority,fi=v.log,si=v.unstable_setDisableYieldValue,Ql=null,sl=null;function it(e){if(typeof fi=="function"&&si(e),sl&&typeof sl.setStrictMode=="function")try{sl.setStrictMode(Ql,e)}catch{}}var ol=Math.clz32?Math.clz32:nm,tm=Math.log,am=Math.LN2;function nm(e){return e>>>=0,e===0?32:31-(tm(e)/am|0)|0}var Xn=256,Zn=262144,kn=4194304;function Ut(e){var l=e&42;if(l!==0)return l;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kn(e,l,t){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var c=a&134217727;return c!==0?(a=c&~u,a!==0?n=Ut(a):(i&=c,i!==0?n=Ut(i):t||(t=c&~e,t!==0&&(n=Ut(t))))):(c=a&~u,c!==0?n=Ut(c):i!==0?n=Ut(i):t||(t=a&~e,t!==0&&(n=Ut(t)))),n===0?0:l!==0&&l!==n&&(l&u)===0&&(u=n&-n,t=l&-l,u>=t||u===32&&(t&4194048)!==0)?l:n}function Ka(e,l){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&l)===0}function um(e,l){switch(e){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Uf(){var e=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),e}function oi(e){for(var l=[],t=0;31>t;t++)l.push(e);return l}function Va(e,l){e.pendingLanes|=l,l!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function im(e,l,t,a,n,u){var i=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var c=e.entanglements,s=e.expirationTimes,g=e.hiddenUpdates;for(t=i&~t;0<t;){var T=31-ol(t),N=1<<T;c[T]=0,s[T]=-1;var p=g[T];if(p!==null)for(g[T]=null,T=0;T<p.length;T++){var b=p[T];b!==null&&(b.lane&=-536870913)}t&=~N}a!==0&&Mf(e,a,0),u!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=u&~(i&~l))}function Mf(e,l,t){e.pendingLanes|=l,e.suspendedLanes&=~l;var a=31-ol(l);e.entangledLanes|=l,e.entanglements[a]=e.entanglements[a]|1073741824|t&261930}function Hf(e,l){var t=e.entangledLanes|=l;for(e=e.entanglements;t;){var a=31-ol(t),n=1<<a;n&l|e[a]&l&&(e[a]|=l),t&=~n}}function wf(e,l){var t=l&-l;return t=(t&42)!==0?1:ri(t),(t&(e.suspendedLanes|l))!==0?0:t}function ri(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function di(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Rf(){var e=A.p;return e!==0?e:(e=window.event,e===void 0?32:Ad(e.type))}function qf(e,l){var t=A.p;try{return A.p=e,l()}finally{A.p=t}}var ct=Math.random().toString(36).slice(2),ke="__reactFiber$"+ct,tl="__reactProps$"+ct,$t="__reactContainer$"+ct,mi="__reactEvents$"+ct,cm="__reactListeners$"+ct,fm="__reactHandles$"+ct,Bf="__reactResources$"+ct,Ja="__reactMarker$"+ct;function hi(e){delete e[ke],delete e[tl],delete e[mi],delete e[cm],delete e[fm]}function Pt(e){var l=e[ke];if(l)return l;for(var t=e.parentNode;t;){if(l=t[$t]||t[ke]){if(t=l.alternate,l.child!==null||t!==null&&t.child!==null)for(e=id(e);e!==null;){if(t=e[ke])return t;e=id(e)}return l}e=t,t=e.parentNode}return null}function ea(e){if(e=e[ke]||e[$t]){var l=e.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return e}return null}function Wa(e){var l=e.tag;if(l===5||l===26||l===27||l===6)return e.stateNode;throw Error(d(33))}function la(e){var l=e[Bf];return l||(l=e[Bf]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Xe(e){e[Ja]=!0}var Lf=new Set,Yf={};function Mt(e,l){ta(e,l),ta(e+"Capture",l)}function ta(e,l){for(Yf[e]=l,e=0;e<l.length;e++)Lf.add(l[e])}var sm=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Qf={},Gf={};function om(e){return Ga.call(Gf,e)?!0:Ga.call(Qf,e)?!1:sm.test(e)?Gf[e]=!0:(Qf[e]=!0,!1)}function Vn(e,l,t){if(om(l))if(t===null)e.removeAttribute(l);else{switch(typeof t){case"undefined":case"function":case"symbol":e.removeAttribute(l);return;case"boolean":var a=l.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(l);return}}e.setAttribute(l,""+t)}}function Jn(e,l,t){if(t===null)e.removeAttribute(l);else{switch(typeof t){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttribute(l,""+t)}}function Gl(e,l,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttributeNS(l,t,""+a)}}function bl(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xf(e){var l=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function rm(e,l,t){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,l);if(!e.hasOwnProperty(l)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(e,l,{configurable:!0,get:function(){return n.call(this)},set:function(i){t=""+i,u.call(this,i)}}),Object.defineProperty(e,l,{enumerable:a.enumerable}),{getValue:function(){return t},setValue:function(i){t=""+i},stopTracking:function(){e._valueTracker=null,delete e[l]}}}}function vi(e){if(!e._valueTracker){var l=Xf(e)?"checked":"value";e._valueTracker=rm(e,l,""+e[l])}}function Zf(e){if(!e)return!1;var l=e._valueTracker;if(!l)return!0;var t=l.getValue(),a="";return e&&(a=Xf(e)?e.checked?"true":"false":e.value),e=a,e!==t?(l.setValue(e),!0):!1}function Wn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var dm=/[\n"\\]/g;function Sl(e){return e.replace(dm,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function yi(e,l,t,a,n,u,i,c){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),l!=null?i==="number"?(l===0&&e.value===""||e.value!=l)&&(e.value=""+bl(l)):e.value!==""+bl(l)&&(e.value=""+bl(l)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),l!=null?gi(e,i,bl(l)):t!=null?gi(e,i,bl(t)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.name=""+bl(c):e.removeAttribute("name")}function kf(e,l,t,a,n,u,i,c){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),l!=null||t!=null){if(!(u!=="submit"&&u!=="reset"||l!=null)){vi(e);return}t=t!=null?""+bl(t):"",l=l!=null?""+bl(l):t,c||l===e.value||(e.value=l),e.defaultValue=l}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=c?e.checked:!!a,e.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i),vi(e)}function gi(e,l,t){l==="number"&&Wn(e.ownerDocument)===e||e.defaultValue===""+t||(e.defaultValue=""+t)}function aa(e,l,t,a){if(e=e.options,l){l={};for(var n=0;n<t.length;n++)l["$"+t[n]]=!0;for(t=0;t<e.length;t++)n=l.hasOwnProperty("$"+e[t].value),e[t].selected!==n&&(e[t].selected=n),n&&a&&(e[t].defaultSelected=!0)}else{for(t=""+bl(t),l=null,n=0;n<e.length;n++){if(e[n].value===t){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}l!==null||e[n].disabled||(l=e[n])}l!==null&&(l.selected=!0)}}function Kf(e,l,t){if(l!=null&&(l=""+bl(l),l!==e.value&&(e.value=l),t==null)){e.defaultValue!==l&&(e.defaultValue=l);return}e.defaultValue=t!=null?""+bl(t):""}function Vf(e,l,t,a){if(l==null){if(a!=null){if(t!=null)throw Error(d(92));if($e(a)){if(1<a.length)throw Error(d(93));a=a[0]}t=a}t==null&&(t=""),l=t}t=bl(l),e.defaultValue=t,a=e.textContent,a===t&&a!==""&&a!==null&&(e.value=a),vi(e)}function na(e,l){if(l){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=l;return}}e.textContent=l}var mm=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Jf(e,l,t){var a=l.indexOf("--")===0;t==null||typeof t=="boolean"||t===""?a?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="":a?e.setProperty(l,t):typeof t!="number"||t===0||mm.has(l)?l==="float"?e.cssFloat=t:e[l]=(""+t).trim():e[l]=t+"px"}function Wf(e,l,t){if(l!=null&&typeof l!="object")throw Error(d(62));if(e=e.style,t!=null){for(var a in t)!t.hasOwnProperty(a)||l!=null&&l.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in l)a=l[n],l.hasOwnProperty(n)&&t[n]!==a&&Jf(e,n,a)}else for(var u in l)l.hasOwnProperty(u)&&Jf(e,u,l[u])}function pi(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hm=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),vm=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function In(e){return vm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xl(){}var bi=null;function Si(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ua=null,ia=null;function If(e){var l=ea(e);if(l&&(e=l.stateNode)){var t=e[tl]||null;e:switch(e=l.stateNode,l.type){case"input":if(yi(e,t.value,t.defaultValue,t.defaultValue,t.checked,t.defaultChecked,t.type,t.name),l=t.name,t.type==="radio"&&l!=null){for(t=e;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll('input[name="'+Sl(""+l)+'"][type="radio"]'),l=0;l<t.length;l++){var a=t[l];if(a!==e&&a.form===e.form){var n=a[tl]||null;if(!n)throw Error(d(90));yi(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(l=0;l<t.length;l++)a=t[l],a.form===e.form&&Zf(a)}break e;case"textarea":Kf(e,t.value,t.defaultValue);break e;case"select":l=t.value,l!=null&&aa(e,!!t.multiple,l,!1)}}}var Ti=!1;function Ff(e,l,t){if(Ti)return e(l,t);Ti=!0;try{var a=e(l);return a}finally{if(Ti=!1,(ua!==null||ia!==null)&&(qu(),ua&&(l=ua,e=ia,ia=ua=null,If(l),e)))for(l=0;l<e.length;l++)If(e[l])}}function Ia(e,l){var t=e.stateNode;if(t===null)return null;var a=t[tl]||null;if(a===null)return null;t=a[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(t&&typeof t!="function")throw Error(d(231,l,typeof t));return t}var Zl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ai=!1;if(Zl)try{var Fa={};Object.defineProperty(Fa,"passive",{get:function(){Ai=!0}}),window.addEventListener("test",Fa,Fa),window.removeEventListener("test",Fa,Fa)}catch{Ai=!1}var ft=null,zi=null,Fn=null;function $f(){if(Fn)return Fn;var e,l=zi,t=l.length,a,n="value"in ft?ft.value:ft.textContent,u=n.length;for(e=0;e<t&&l[e]===n[e];e++);var i=t-e;for(a=1;a<=i&&l[t-a]===n[u-a];a++);return Fn=n.slice(e,1<a?1-a:void 0)}function $n(e){var l=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&l===13&&(e=13)):e=l,e===10&&(e=13),32<=e||e===13?e:0}function Pn(){return!0}function Pf(){return!1}function al(e){function l(t,a,n,u,i){this._reactName=t,this._targetInst=n,this.type=a,this.nativeEvent=u,this.target=i,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(t=e[c],this[c]=t?t(u):u[c]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Pn:Pf,this.isPropagationStopped=Pf,this}return q(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=Pn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),l}var Ht={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},eu=al(Ht),$a=q({},Ht,{view:0,detail:0}),ym=al($a),xi,Ci,Pa,lu=q({},$a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ei,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Pa&&(Pa&&e.type==="mousemove"?(xi=e.screenX-Pa.screenX,Ci=e.screenY-Pa.screenY):Ci=xi=0,Pa=e),xi)},movementY:function(e){return"movementY"in e?e.movementY:Ci}}),es=al(lu),gm=q({},lu,{dataTransfer:0}),pm=al(gm),bm=q({},$a,{relatedTarget:0}),Ni=al(bm),Sm=q({},Ht,{animationName:0,elapsedTime:0,pseudoElement:0}),Tm=al(Sm),Am=q({},Ht,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zm=al(Am),xm=q({},Ht,{data:0}),ls=al(xm),Cm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nm={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"},Em={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jm(e){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(e):(e=Em[e])?!!l[e]:!1}function Ei(){return jm}var Om=q({},$a,{key:function(e){if(e.key){var l=Cm[e.key]||e.key;if(l!=="Unidentified")return l}return e.type==="keypress"?(e=$n(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Nm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ei,charCode:function(e){return e.type==="keypress"?$n(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$n(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_m=al(Om),Dm=q({},lu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ts=al(Dm),Um=q({},$a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ei}),Mm=al(Um),Hm=q({},Ht,{propertyName:0,elapsedTime:0,pseudoElement:0}),wm=al(Hm),Rm=q({},lu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),qm=al(Rm),Bm=q({},Ht,{newState:0,oldState:0}),Lm=al(Bm),Ym=[9,13,27,32],ji=Zl&&"CompositionEvent"in window,en=null;Zl&&"documentMode"in document&&(en=document.documentMode);var Qm=Zl&&"TextEvent"in window&&!en,as=Zl&&(!ji||en&&8<en&&11>=en),ns=" ",us=!1;function is(e,l){switch(e){case"keyup":return Ym.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ca=!1;function Gm(e,l){switch(e){case"compositionend":return cs(l);case"keypress":return l.which!==32?null:(us=!0,ns);case"textInput":return e=l.data,e===ns&&us?null:e;default:return null}}function Xm(e,l){if(ca)return e==="compositionend"||!ji&&is(e,l)?(e=$f(),Fn=zi=ft=null,ca=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return as&&l.locale!=="ko"?null:l.data;default:return null}}var Zm={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 fs(e){var l=e&&e.nodeName&&e.nodeName.toLowerCase();return l==="input"?!!Zm[e.type]:l==="textarea"}function ss(e,l,t,a){ua?ia?ia.push(a):ia=[a]:ua=a,l=Zu(l,"onChange"),0<l.length&&(t=new eu("onChange","change",null,t,a),e.push({event:t,listeners:l}))}var ln=null,tn=null;function km(e){Kr(e,0)}function tu(e){var l=Wa(e);if(Zf(l))return e}function os(e,l){if(e==="change")return l}var rs=!1;if(Zl){var Oi;if(Zl){var _i="oninput"in document;if(!_i){var ds=document.createElement("div");ds.setAttribute("oninput","return;"),_i=typeof ds.oninput=="function"}Oi=_i}else Oi=!1;rs=Oi&&(!document.documentMode||9<document.documentMode)}function ms(){ln&&(ln.detachEvent("onpropertychange",hs),tn=ln=null)}function hs(e){if(e.propertyName==="value"&&tu(tn)){var l=[];ss(l,tn,e,Si(e)),Ff(km,l)}}function Km(e,l,t){e==="focusin"?(ms(),ln=l,tn=t,ln.attachEvent("onpropertychange",hs)):e==="focusout"&&ms()}function Vm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tu(tn)}function Jm(e,l){if(e==="click")return tu(l)}function Wm(e,l){if(e==="input"||e==="change")return tu(l)}function Im(e,l){return e===l&&(e!==0||1/e===1/l)||e!==e&&l!==l}var rl=typeof Object.is=="function"?Object.is:Im;function an(e,l){if(rl(e,l))return!0;if(typeof e!="object"||e===null||typeof l!="object"||l===null)return!1;var t=Object.keys(e),a=Object.keys(l);if(t.length!==a.length)return!1;for(a=0;a<t.length;a++){var n=t[a];if(!Ga.call(l,n)||!rl(e[n],l[n]))return!1}return!0}function vs(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ys(e,l){var t=vs(e);e=0;for(var a;t;){if(t.nodeType===3){if(a=e+t.textContent.length,e<=l&&a>=l)return{node:t,offset:l-e};e=a}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=vs(t)}}function gs(e,l){return e&&l?e===l?!0:e&&e.nodeType===3?!1:l&&l.nodeType===3?gs(e,l.parentNode):"contains"in e?e.contains(l):e.compareDocumentPosition?!!(e.compareDocumentPosition(l)&16):!1:!1}function ps(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var l=Wn(e.document);l instanceof e.HTMLIFrameElement;){try{var t=typeof l.contentWindow.location.href=="string"}catch{t=!1}if(t)e=l.contentWindow;else break;l=Wn(e.document)}return l}function Di(e){var l=e&&e.nodeName&&e.nodeName.toLowerCase();return l&&(l==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||l==="textarea"||e.contentEditable==="true")}var Fm=Zl&&"documentMode"in document&&11>=document.documentMode,fa=null,Ui=null,nn=null,Mi=!1;function bs(e,l,t){var a=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Mi||fa==null||fa!==Wn(a)||(a=fa,"selectionStart"in a&&Di(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),nn&&an(nn,a)||(nn=a,a=Zu(Ui,"onSelect"),0<a.length&&(l=new eu("onSelect","select",null,l,t),e.push({event:l,listeners:a}),l.target=fa)))}function wt(e,l){var t={};return t[e.toLowerCase()]=l.toLowerCase(),t["Webkit"+e]="webkit"+l,t["Moz"+e]="moz"+l,t}var sa={animationend:wt("Animation","AnimationEnd"),animationiteration:wt("Animation","AnimationIteration"),animationstart:wt("Animation","AnimationStart"),transitionrun:wt("Transition","TransitionRun"),transitionstart:wt("Transition","TransitionStart"),transitioncancel:wt("Transition","TransitionCancel"),transitionend:wt("Transition","TransitionEnd")},Hi={},Ss={};Zl&&(Ss=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Rt(e){if(Hi[e])return Hi[e];if(!sa[e])return e;var l=sa[e],t;for(t in l)if(l.hasOwnProperty(t)&&t in Ss)return Hi[e]=l[t];return e}var Ts=Rt("animationend"),As=Rt("animationiteration"),zs=Rt("animationstart"),$m=Rt("transitionrun"),Pm=Rt("transitionstart"),eh=Rt("transitioncancel"),xs=Rt("transitionend"),Cs=new Map,wi="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");wi.push("scrollEnd");function _l(e,l){Cs.set(e,l),Mt(l,[e])}var au=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Tl=[],oa=0,Ri=0;function nu(){for(var e=oa,l=Ri=oa=0;l<e;){var t=Tl[l];Tl[l++]=null;var a=Tl[l];Tl[l++]=null;var n=Tl[l];Tl[l++]=null;var u=Tl[l];if(Tl[l++]=null,a!==null&&n!==null){var i=a.pending;i===null?n.next=n:(n.next=i.next,i.next=n),a.pending=n}u!==0&&Ns(t,n,u)}}function uu(e,l,t,a){Tl[oa++]=e,Tl[oa++]=l,Tl[oa++]=t,Tl[oa++]=a,Ri|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function qi(e,l,t,a){return uu(e,l,t,a),iu(e)}function qt(e,l){return uu(e,null,null,l),iu(e)}function Ns(e,l,t){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t);for(var n=!1,u=e.return;u!==null;)u.childLanes|=t,a=u.alternate,a!==null&&(a.childLanes|=t),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(n=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,n&&l!==null&&(n=31-ol(t),e=u.hiddenUpdates,a=e[n],a===null?e[n]=[l]:a.push(l),l.lane=t|536870912),u):null}function iu(e){if(50<En)throw En=0,Kc=null,Error(d(185));for(var l=e.return;l!==null;)e=l,l=e.return;return e.tag===3?e.stateNode:null}var ra={};function lh(e,l,t,a){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dl(e,l,t,a){return new lh(e,l,t,a)}function Bi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kl(e,l){var t=e.alternate;return t===null?(t=dl(e.tag,l,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=l,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&65011712,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,l=e.dependencies,t.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t.refCleanup=e.refCleanup,t}function Es(e,l){e.flags&=65011714;var t=e.alternate;return t===null?(e.childLanes=0,e.lanes=l,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=t.childLanes,e.lanes=t.lanes,e.child=t.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=t.memoizedProps,e.memoizedState=t.memoizedState,e.updateQueue=t.updateQueue,e.type=t.type,l=t.dependencies,e.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),e}function cu(e,l,t,a,n,u){var i=0;if(a=e,typeof e=="function")Bi(e)&&(i=1);else if(typeof e=="string")i=iv(e,t,w.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ie:return e=dl(31,t,l,n),e.elementType=Ie,e.lanes=u,e;case ge:return Bt(t.children,n,u,l);case ee:i=8,n|=24;break;case F:return e=dl(12,t,l,n|2),e.elementType=F,e.lanes=u,e;case Me:return e=dl(13,t,l,n),e.elementType=Me,e.lanes=u,e;case je:return e=dl(19,t,l,n),e.elementType=je,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Te:i=10;break e;case oe:i=9;break e;case me:i=11;break e;case V:i=14;break e;case Ge:i=16,a=null;break e}i=29,t=Error(d(130,e===null?"null":typeof e,"")),a=null}return l=dl(i,t,l,n),l.elementType=e,l.type=a,l.lanes=u,l}function Bt(e,l,t,a){return e=dl(7,e,a,l),e.lanes=t,e}function Li(e,l,t){return e=dl(6,e,null,l),e.lanes=t,e}function js(e){var l=dl(18,null,null,0);return l.stateNode=e,l}function Yi(e,l,t){return l=dl(4,e.children!==null?e.children:[],e.key,l),l.lanes=t,l.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},l}var Os=new WeakMap;function Al(e,l){if(typeof e=="object"&&e!==null){var t=Os.get(e);return t!==void 0?t:(l={value:e,source:l,stack:Qn(l)},Os.set(e,l),l)}return{value:e,source:l,stack:Qn(l)}}var da=[],ma=0,fu=null,un=0,zl=[],xl=0,st=null,Hl=1,wl="";function Kl(e,l){da[ma++]=un,da[ma++]=fu,fu=e,un=l}function _s(e,l,t){zl[xl++]=Hl,zl[xl++]=wl,zl[xl++]=st,st=e;var a=Hl;e=wl;var n=32-ol(a)-1;a&=~(1<<n),t+=1;var u=32-ol(l)+n;if(30<u){var i=n-n%5;u=(a&(1<<i)-1).toString(32),a>>=i,n-=i,Hl=1<<32-ol(l)+n|t<<n|a,wl=u+e}else Hl=1<<u|t<<n|a,wl=e}function Qi(e){e.return!==null&&(Kl(e,1),_s(e,1,0))}function Gi(e){for(;e===fu;)fu=da[--ma],da[ma]=null,un=da[--ma],da[ma]=null;for(;e===st;)st=zl[--xl],zl[xl]=null,wl=zl[--xl],zl[xl]=null,Hl=zl[--xl],zl[xl]=null}function Ds(e,l){zl[xl++]=Hl,zl[xl++]=wl,zl[xl++]=st,Hl=l.id,wl=l.overflow,st=e}var Ke=null,Ne=null,ce=!1,ot=null,Cl=!1,Xi=Error(d(519));function rt(e){var l=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cn(Al(l,e)),Xi}function Us(e){var l=e.stateNode,t=e.type,a=e.memoizedProps;switch(l[ke]=e,l[tl]=a,t){case"dialog":ae("cancel",l),ae("close",l);break;case"iframe":case"object":case"embed":ae("load",l);break;case"video":case"audio":for(t=0;t<On.length;t++)ae(On[t],l);break;case"source":ae("error",l);break;case"img":case"image":case"link":ae("error",l),ae("load",l);break;case"details":ae("toggle",l);break;case"input":ae("invalid",l),kf(l,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ae("invalid",l);break;case"textarea":ae("invalid",l),Vf(l,a.value,a.defaultValue,a.children)}t=a.children,typeof t!="string"&&typeof t!="number"&&typeof t!="bigint"||l.textContent===""+t||a.suppressHydrationWarning===!0||Ir(l.textContent,t)?(a.popover!=null&&(ae("beforetoggle",l),ae("toggle",l)),a.onScroll!=null&&ae("scroll",l),a.onScrollEnd!=null&&ae("scrollend",l),a.onClick!=null&&(l.onclick=Xl),l=!0):l=!1,l||rt(e,!0)}function Ms(e){for(Ke=e.return;Ke;)switch(Ke.tag){case 5:case 31:case 13:Cl=!1;return;case 27:case 3:Cl=!0;return;default:Ke=Ke.return}}function ha(e){if(e!==Ke)return!1;if(!ce)return Ms(e),ce=!0,!1;var l=e.tag,t;if((t=l!==3&&l!==27)&&((t=l===5)&&(t=e.type,t=!(t!=="form"&&t!=="button")||ff(e.type,e.memoizedProps)),t=!t),t&&Ne&&rt(e),Ms(e),l===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Ne=ud(e)}else if(l===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Ne=ud(e)}else l===27?(l=Ne,Ct(e.type)?(e=mf,mf=null,Ne=e):Ne=l):Ne=Ke?El(e.stateNode.nextSibling):null;return!0}function Lt(){Ne=Ke=null,ce=!1}function Zi(){var e=ot;return e!==null&&(cl===null?cl=e:cl.push.apply(cl,e),ot=null),e}function cn(e){ot===null?ot=[e]:ot.push(e)}var ki=o(null),Yt=null,Vl=null;function dt(e,l,t){_(ki,l._currentValue),l._currentValue=t}function Jl(e){e._currentValue=ki.current,z(ki)}function Ki(e,l,t){for(;e!==null;){var a=e.alternate;if((e.childLanes&l)!==l?(e.childLanes|=l,a!==null&&(a.childLanes|=l)):a!==null&&(a.childLanes&l)!==l&&(a.childLanes|=l),e===t)break;e=e.return}}function Vi(e,l,t,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var u=n.dependencies;if(u!==null){var i=n.child;u=u.firstContext;e:for(;u!==null;){var c=u;u=n;for(var s=0;s<l.length;s++)if(c.context===l[s]){u.lanes|=t,c=u.alternate,c!==null&&(c.lanes|=t),Ki(u.return,t,e),a||(i=null);break e}u=c.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(d(341));i.lanes|=t,u=i.alternate,u!==null&&(u.lanes|=t),Ki(i,t,e),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===e){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function va(e,l,t,a){e=null;for(var n=l,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(d(387));if(i=i.memoizedProps,i!==null){var c=n.type;rl(n.pendingProps.value,i.value)||(e!==null?e.push(c):e=[c])}}else if(n===fe.current){if(i=n.alternate,i===null)throw Error(d(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Hn):e=[Hn])}n=n.return}e!==null&&Vi(l,e,t,a),l.flags|=262144}function su(e){for(e=e.firstContext;e!==null;){if(!rl(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qt(e){Yt=e,Vl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ve(e){return Hs(Yt,e)}function ou(e,l){return Yt===null&&Qt(e),Hs(e,l)}function Hs(e,l){var t=l._currentValue;if(l={context:l,memoizedValue:t,next:null},Vl===null){if(e===null)throw Error(d(308));Vl=l,e.dependencies={lanes:0,firstContext:l},e.flags|=524288}else Vl=Vl.next=l;return t}var th=typeof AbortController<"u"?AbortController:function(){var e=[],l=this.signal={aborted:!1,addEventListener:function(t,a){e.push(a)}};this.abort=function(){l.aborted=!0,e.forEach(function(t){return t()})}},ah=v.unstable_scheduleCallback,nh=v.unstable_NormalPriority,Re={$$typeof:Te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ji(){return{controller:new th,data:new Map,refCount:0}}function fn(e){e.refCount--,e.refCount===0&&ah(nh,function(){e.controller.abort()})}var sn=null,Wi=0,ya=0,ga=null;function uh(e,l){if(sn===null){var t=sn=[];Wi=0,ya=$c(),ga={status:"pending",value:void 0,then:function(a){t.push(a)}}}return Wi++,l.then(ws,ws),l}function ws(){if(--Wi===0&&sn!==null){ga!==null&&(ga.status="fulfilled");var e=sn;sn=null,ya=0,ga=null;for(var l=0;l<e.length;l++)(0,e[l])()}}function ih(e,l){var t=[],a={status:"pending",value:null,reason:null,then:function(n){t.push(n)}};return e.then(function(){a.status="fulfilled",a.value=l;for(var n=0;n<t.length;n++)(0,t[n])(l)},function(n){for(a.status="rejected",a.reason=n,n=0;n<t.length;n++)(0,t[n])(void 0)}),a}var Rs=m.S;m.S=function(e,l){Sr=Q(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&uh(e,l),Rs!==null&&Rs(e,l)};var Gt=o(null);function Ii(){var e=Gt.current;return e!==null?e:ze.pooledCache}function ru(e,l){l===null?_(Gt,Gt.current):_(Gt,l.pool)}function qs(){var e=Ii();return e===null?null:{parent:Re._currentValue,pool:e}}var pa=Error(d(460)),Fi=Error(d(474)),du=Error(d(542)),mu={then:function(){}};function Bs(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ls(e,l,t){switch(t=e[t],t===void 0?e.push(l):t!==l&&(l.then(Xl,Xl),l=t),l.status){case"fulfilled":return l.value;case"rejected":throw e=l.reason,Qs(e),e;default:if(typeof l.status=="string")l.then(Xl,Xl);else{if(e=ze,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=l,e.status="pending",e.then(function(a){if(l.status==="pending"){var n=l;n.status="fulfilled",n.value=a}},function(a){if(l.status==="pending"){var n=l;n.status="rejected",n.reason=a}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw e=l.reason,Qs(e),e}throw Zt=l,pa}}function Xt(e){try{var l=e._init;return l(e._payload)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(Zt=t,pa):t}}var Zt=null;function Ys(){if(Zt===null)throw Error(d(459));var e=Zt;return Zt=null,e}function Qs(e){if(e===pa||e===du)throw Error(d(483))}var ba=null,on=0;function hu(e){var l=on;return on+=1,ba===null&&(ba=[]),Ls(ba,e,l)}function rn(e,l){l=l.props.ref,e.ref=l!==void 0?l:null}function vu(e,l){throw l.$$typeof===ne?Error(d(525)):(e=Object.prototype.toString.call(l),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":e)))}function Gs(e){function l(h,r){if(e){var y=h.deletions;y===null?(h.deletions=[r],h.flags|=16):y.push(r)}}function t(h,r){if(!e)return null;for(;r!==null;)l(h,r),r=r.sibling;return null}function a(h){for(var r=new Map;h!==null;)h.key!==null?r.set(h.key,h):r.set(h.index,h),h=h.sibling;return r}function n(h,r){return h=kl(h,r),h.index=0,h.sibling=null,h}function u(h,r,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<r?(h.flags|=67108866,r):y):(h.flags|=67108866,r)):(h.flags|=1048576,r)}function i(h){return e&&h.alternate===null&&(h.flags|=67108866),h}function c(h,r,y,C){return r===null||r.tag!==6?(r=Li(y,h.mode,C),r.return=h,r):(r=n(r,y),r.return=h,r)}function s(h,r,y,C){var L=y.type;return L===ge?T(h,r,y.props.children,C,y.key):r!==null&&(r.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Ge&&Xt(L)===r.type)?(r=n(r,y.props),rn(r,y),r.return=h,r):(r=cu(y.type,y.key,y.props,null,h.mode,C),rn(r,y),r.return=h,r)}function g(h,r,y,C){return r===null||r.tag!==4||r.stateNode.containerInfo!==y.containerInfo||r.stateNode.implementation!==y.implementation?(r=Yi(y,h.mode,C),r.return=h,r):(r=n(r,y.children||[]),r.return=h,r)}function T(h,r,y,C,L){return r===null||r.tag!==7?(r=Bt(y,h.mode,C,L),r.return=h,r):(r=n(r,y),r.return=h,r)}function N(h,r,y){if(typeof r=="string"&&r!==""||typeof r=="number"||typeof r=="bigint")return r=Li(""+r,h.mode,y),r.return=h,r;if(typeof r=="object"&&r!==null){switch(r.$$typeof){case $:return y=cu(r.type,r.key,r.props,null,h.mode,y),rn(y,r),y.return=h,y;case K:return r=Yi(r,h.mode,y),r.return=h,r;case Ge:return r=Xt(r),N(h,r,y)}if($e(r)||Ce(r))return r=Bt(r,h.mode,y,null),r.return=h,r;if(typeof r.then=="function")return N(h,hu(r),y);if(r.$$typeof===Te)return N(h,ou(h,r),y);vu(h,r)}return null}function p(h,r,y,C){var L=r!==null?r.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return L!==null?null:c(h,r,""+y,C);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case $:return y.key===L?s(h,r,y,C):null;case K:return y.key===L?g(h,r,y,C):null;case Ge:return y=Xt(y),p(h,r,y,C)}if($e(y)||Ce(y))return L!==null?null:T(h,r,y,C,null);if(typeof y.then=="function")return p(h,r,hu(y),C);if(y.$$typeof===Te)return p(h,r,ou(h,y),C);vu(h,y)}return null}function b(h,r,y,C,L){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return h=h.get(y)||null,c(r,h,""+C,L);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case $:return h=h.get(C.key===null?y:C.key)||null,s(r,h,C,L);case K:return h=h.get(C.key===null?y:C.key)||null,g(r,h,C,L);case Ge:return C=Xt(C),b(h,r,y,C,L)}if($e(C)||Ce(C))return h=h.get(y)||null,T(r,h,C,L,null);if(typeof C.then=="function")return b(h,r,y,hu(C),L);if(C.$$typeof===Te)return b(h,r,y,ou(r,C),L);vu(r,C)}return null}function R(h,r,y,C){for(var L=null,re=null,B=r,I=r=0,ie=null;B!==null&&I<y.length;I++){B.index>I?(ie=B,B=null):ie=B.sibling;var de=p(h,B,y[I],C);if(de===null){B===null&&(B=ie);break}e&&B&&de.alternate===null&&l(h,B),r=u(de,r,I),re===null?L=de:re.sibling=de,re=de,B=ie}if(I===y.length)return t(h,B),ce&&Kl(h,I),L;if(B===null){for(;I<y.length;I++)B=N(h,y[I],C),B!==null&&(r=u(B,r,I),re===null?L=B:re.sibling=B,re=B);return ce&&Kl(h,I),L}for(B=a(B);I<y.length;I++)ie=b(B,h,I,y[I],C),ie!==null&&(e&&ie.alternate!==null&&B.delete(ie.key===null?I:ie.key),r=u(ie,r,I),re===null?L=ie:re.sibling=ie,re=ie);return e&&B.forEach(function(_t){return l(h,_t)}),ce&&Kl(h,I),L}function X(h,r,y,C){if(y==null)throw Error(d(151));for(var L=null,re=null,B=r,I=r=0,ie=null,de=y.next();B!==null&&!de.done;I++,de=y.next()){B.index>I?(ie=B,B=null):ie=B.sibling;var _t=p(h,B,de.value,C);if(_t===null){B===null&&(B=ie);break}e&&B&&_t.alternate===null&&l(h,B),r=u(_t,r,I),re===null?L=_t:re.sibling=_t,re=_t,B=ie}if(de.done)return t(h,B),ce&&Kl(h,I),L;if(B===null){for(;!de.done;I++,de=y.next())de=N(h,de.value,C),de!==null&&(r=u(de,r,I),re===null?L=de:re.sibling=de,re=de);return ce&&Kl(h,I),L}for(B=a(B);!de.done;I++,de=y.next())de=b(B,h,I,de.value,C),de!==null&&(e&&de.alternate!==null&&B.delete(de.key===null?I:de.key),r=u(de,r,I),re===null?L=de:re.sibling=de,re=de);return e&&B.forEach(function(gv){return l(h,gv)}),ce&&Kl(h,I),L}function Se(h,r,y,C){if(typeof y=="object"&&y!==null&&y.type===ge&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case $:e:{for(var L=y.key;r!==null;){if(r.key===L){if(L=y.type,L===ge){if(r.tag===7){t(h,r.sibling),C=n(r,y.props.children),C.return=h,h=C;break e}}else if(r.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Ge&&Xt(L)===r.type){t(h,r.sibling),C=n(r,y.props),rn(C,y),C.return=h,h=C;break e}t(h,r);break}else l(h,r);r=r.sibling}y.type===ge?(C=Bt(y.props.children,h.mode,C,y.key),C.return=h,h=C):(C=cu(y.type,y.key,y.props,null,h.mode,C),rn(C,y),C.return=h,h=C)}return i(h);case K:e:{for(L=y.key;r!==null;){if(r.key===L)if(r.tag===4&&r.stateNode.containerInfo===y.containerInfo&&r.stateNode.implementation===y.implementation){t(h,r.sibling),C=n(r,y.children||[]),C.return=h,h=C;break e}else{t(h,r);break}else l(h,r);r=r.sibling}C=Yi(y,h.mode,C),C.return=h,h=C}return i(h);case Ge:return y=Xt(y),Se(h,r,y,C)}if($e(y))return R(h,r,y,C);if(Ce(y)){if(L=Ce(y),typeof L!="function")throw Error(d(150));return y=L.call(y),X(h,r,y,C)}if(typeof y.then=="function")return Se(h,r,hu(y),C);if(y.$$typeof===Te)return Se(h,r,ou(h,y),C);vu(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,r!==null&&r.tag===6?(t(h,r.sibling),C=n(r,y),C.return=h,h=C):(t(h,r),C=Li(y,h.mode,C),C.return=h,h=C),i(h)):t(h,r)}return function(h,r,y,C){try{on=0;var L=Se(h,r,y,C);return ba=null,L}catch(B){if(B===pa||B===du)throw B;var re=dl(29,B,null,h.mode);return re.lanes=C,re.return=h,re}finally{}}}var kt=Gs(!0),Xs=Gs(!1),mt=!1;function $i(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pi(e,l){e=e.updateQueue,l.updateQueue===e&&(l.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ht(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vt(e,l,t){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(he&2)!==0){var n=a.pending;return n===null?l.next=l:(l.next=n.next,n.next=l),a.pending=l,l=iu(e),Ns(e,null,t),l}return uu(e,a,l,t),iu(e)}function dn(e,l,t){if(l=l.updateQueue,l!==null&&(l=l.shared,(t&4194048)!==0)){var a=l.lanes;a&=e.pendingLanes,t|=a,l.lanes=t,Hf(e,t)}}function ec(e,l){var t=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,t===a)){var n=null,u=null;if(t=t.firstBaseUpdate,t!==null){do{var i={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,t=t.next}while(t!==null);u===null?n=u=l:u=u.next=l}else n=u=l;t={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=l:e.next=l,t.lastBaseUpdate=l}var lc=!1;function mn(){if(lc){var e=ga;if(e!==null)throw e}}function hn(e,l,t,a){lc=!1;var n=e.updateQueue;mt=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,c=n.shared.pending;if(c!==null){n.shared.pending=null;var s=c,g=s.next;s.next=null,i===null?u=g:i.next=g,i=s;var T=e.alternate;T!==null&&(T=T.updateQueue,c=T.lastBaseUpdate,c!==i&&(c===null?T.firstBaseUpdate=g:c.next=g,T.lastBaseUpdate=s))}if(u!==null){var N=n.baseState;i=0,T=g=s=null,c=u;do{var p=c.lane&-536870913,b=p!==c.lane;if(b?(ue&p)===p:(a&p)===p){p!==0&&p===ya&&(lc=!0),T!==null&&(T=T.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});e:{var R=e,X=c;p=l;var Se=t;switch(X.tag){case 1:if(R=X.payload,typeof R=="function"){N=R.call(Se,N,p);break e}N=R;break e;case 3:R.flags=R.flags&-65537|128;case 0:if(R=X.payload,p=typeof R=="function"?R.call(Se,N,p):R,p==null)break e;N=q({},N,p);break e;case 2:mt=!0}}p=c.callback,p!==null&&(e.flags|=64,b&&(e.flags|=8192),b=n.callbacks,b===null?n.callbacks=[p]:b.push(p))}else b={lane:p,tag:c.tag,payload:c.payload,callback:c.callback,next:null},T===null?(g=T=b,s=N):T=T.next=b,i|=p;if(c=c.next,c===null){if(c=n.shared.pending,c===null)break;b=c,c=b.next,b.next=null,n.lastBaseUpdate=b,n.shared.pending=null}}while(!0);T===null&&(s=N),n.baseState=s,n.firstBaseUpdate=g,n.lastBaseUpdate=T,u===null&&(n.shared.lanes=0),St|=i,e.lanes=i,e.memoizedState=N}}function Zs(e,l){if(typeof e!="function")throw Error(d(191,e));e.call(l)}function ks(e,l){var t=e.callbacks;if(t!==null)for(e.callbacks=null,e=0;e<t.length;e++)Zs(t[e],l)}var Sa=o(null),yu=o(0);function Ks(e,l){e=at,_(yu,e),_(Sa,l),at=e|l.baseLanes}function tc(){_(yu,at),_(Sa,Sa.current)}function ac(){at=yu.current,z(Sa),z(yu)}var ml=o(null),Nl=null;function yt(e){var l=e.alternate;_(He,He.current&1),_(ml,e),Nl===null&&(l===null||Sa.current!==null||l.memoizedState!==null)&&(Nl=e)}function nc(e){_(He,He.current),_(ml,e),Nl===null&&(Nl=e)}function Vs(e){e.tag===22?(_(He,He.current),_(ml,e),Nl===null&&(Nl=e)):gt()}function gt(){_(He,He.current),_(ml,ml.current)}function hl(e){z(ml),Nl===e&&(Nl=null),z(He)}var He=o(0);function gu(e){for(var l=e;l!==null;){if(l.tag===13){var t=l.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||rf(t)||df(t)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break;for(;l.sibling===null;){if(l.return===null||l.return===e)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Wl=0,W=null,pe=null,qe=null,pu=!1,Ta=!1,Kt=!1,bu=0,vn=0,Aa=null,ch=0;function De(){throw Error(d(321))}function uc(e,l){if(l===null)return!1;for(var t=0;t<l.length&&t<e.length;t++)if(!rl(e[t],l[t]))return!1;return!0}function ic(e,l,t,a,n,u){return Wl=u,W=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,m.H=e===null||e.memoizedState===null?Do:Tc,Kt=!1,u=t(a,n),Kt=!1,Ta&&(u=Ws(l,t,a,n)),Js(e),u}function Js(e){m.H=pn;var l=pe!==null&&pe.next!==null;if(Wl=0,qe=pe=W=null,pu=!1,vn=0,Aa=null,l)throw Error(d(300));e===null||Be||(e=e.dependencies,e!==null&&su(e)&&(Be=!0))}function Ws(e,l,t,a){W=e;var n=0;do{if(Ta&&(Aa=null),vn=0,Ta=!1,25<=n)throw Error(d(301));if(n+=1,qe=pe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}m.H=Uo,u=l(t,a)}while(Ta);return u}function fh(){var e=m.H,l=e.useState()[0];return l=typeof l.then=="function"?yn(l):l,e=e.useState()[0],(pe!==null?pe.memoizedState:null)!==e&&(W.flags|=1024),l}function cc(){var e=bu!==0;return bu=0,e}function fc(e,l,t){l.updateQueue=e.updateQueue,l.flags&=-2053,e.lanes&=~t}function sc(e){if(pu){for(e=e.memoizedState;e!==null;){var l=e.queue;l!==null&&(l.pending=null),e=e.next}pu=!1}Wl=0,qe=pe=W=null,Ta=!1,vn=bu=0,Aa=null}function Pe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?W.memoizedState=qe=e:qe=qe.next=e,qe}function we(){if(pe===null){var e=W.alternate;e=e!==null?e.memoizedState:null}else e=pe.next;var l=qe===null?W.memoizedState:qe.next;if(l!==null)qe=l,pe=e;else{if(e===null)throw W.alternate===null?Error(d(467)):Error(d(310));pe=e,e={memoizedState:pe.memoizedState,baseState:pe.baseState,baseQueue:pe.baseQueue,queue:pe.queue,next:null},qe===null?W.memoizedState=qe=e:qe=qe.next=e}return qe}function Su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yn(e){var l=vn;return vn+=1,Aa===null&&(Aa=[]),e=Ls(Aa,e,l),l=W,(qe===null?l.memoizedState:qe.next)===null&&(l=l.alternate,m.H=l===null||l.memoizedState===null?Do:Tc),e}function Tu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yn(e);if(e.$$typeof===Te)return Ve(e)}throw Error(d(438,String(e)))}function oc(e){var l=null,t=W.updateQueue;if(t!==null&&(l=t.memoCache),l==null){var a=W.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(l={data:a.data.map(function(n){return n.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),t===null&&(t=Su(),W.updateQueue=t),t.memoCache=l,t=l.data[l.index],t===void 0)for(t=l.data[l.index]=Array(e),a=0;a<e;a++)t[a]=Ml;return l.index++,t}function Il(e,l){return typeof l=="function"?l(e):l}function Au(e){var l=we();return rc(l,pe,e)}function rc(e,l,t){var a=e.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=t;var n=e.baseQueue,u=a.pending;if(u!==null){if(n!==null){var i=n.next;n.next=u.next,u.next=i}l.baseQueue=n=u,a.pending=null}if(u=e.baseState,n===null)e.memoizedState=u;else{l=n.next;var c=i=null,s=null,g=l,T=!1;do{var N=g.lane&-536870913;if(N!==g.lane?(ue&N)===N:(Wl&N)===N){var p=g.revertLane;if(p===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null}),N===ya&&(T=!0);else if((Wl&p)===p){g=g.next,p===ya&&(T=!0);continue}else N={lane:0,revertLane:g.revertLane,gesture:null,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null},s===null?(c=s=N,i=u):s=s.next=N,W.lanes|=p,St|=p;N=g.action,Kt&&t(u,N),u=g.hasEagerState?g.eagerState:t(u,N)}else p={lane:N,revertLane:g.revertLane,gesture:g.gesture,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null},s===null?(c=s=p,i=u):s=s.next=p,W.lanes|=N,St|=N;g=g.next}while(g!==null&&g!==l);if(s===null?i=u:s.next=c,!rl(u,e.memoizedState)&&(Be=!0,T&&(t=ga,t!==null)))throw t;e.memoizedState=u,e.baseState=i,e.baseQueue=s,a.lastRenderedState=u}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function dc(e){var l=we(),t=l.queue;if(t===null)throw Error(d(311));t.lastRenderedReducer=e;var a=t.dispatch,n=t.pending,u=l.memoizedState;if(n!==null){t.pending=null;var i=n=n.next;do u=e(u,i.action),i=i.next;while(i!==n);rl(u,l.memoizedState)||(Be=!0),l.memoizedState=u,l.baseQueue===null&&(l.baseState=u),t.lastRenderedState=u}return[u,a]}function Is(e,l,t){var a=W,n=we(),u=ce;if(u){if(t===void 0)throw Error(d(407));t=t()}else t=l();var i=!rl((pe||n).memoizedState,t);if(i&&(n.memoizedState=t,Be=!0),n=n.queue,vc(Ps.bind(null,a,n,e),[e]),n.getSnapshot!==l||i||qe!==null&&qe.memoizedState.tag&1){if(a.flags|=2048,za(9,{destroy:void 0},$s.bind(null,a,n,t,l),null),ze===null)throw Error(d(349));u||(Wl&127)!==0||Fs(a,l,t)}return t}function Fs(e,l,t){e.flags|=16384,e={getSnapshot:l,value:t},l=W.updateQueue,l===null?(l=Su(),W.updateQueue=l,l.stores=[e]):(t=l.stores,t===null?l.stores=[e]:t.push(e))}function $s(e,l,t,a){l.value=t,l.getSnapshot=a,eo(l)&&lo(e)}function Ps(e,l,t){return t(function(){eo(l)&&lo(e)})}function eo(e){var l=e.getSnapshot;e=e.value;try{var t=l();return!rl(e,t)}catch{return!0}}function lo(e){var l=qt(e,2);l!==null&&fl(l,e,2)}function mc(e){var l=Pe();if(typeof e=="function"){var t=e;if(e=t(),Kt){it(!0);try{t()}finally{it(!1)}}}return l.memoizedState=l.baseState=e,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:e},l}function to(e,l,t,a){return e.baseState=t,rc(e,pe,typeof a=="function"?a:Il)}function sh(e,l,t,a,n){if(Cu(e))throw Error(d(485));if(e=l.action,e!==null){var u={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){u.listeners.push(i)}};m.T!==null?t(!0):u.isTransition=!1,a(u),t=l.pending,t===null?(u.next=l.pending=u,ao(l,u)):(u.next=t.next,l.pending=t.next=u)}}function ao(e,l){var t=l.action,a=l.payload,n=e.state;if(l.isTransition){var u=m.T,i={};m.T=i;try{var c=t(n,a),s=m.S;s!==null&&s(i,c),no(e,l,c)}catch(g){hc(e,l,g)}finally{u!==null&&i.types!==null&&(u.types=i.types),m.T=u}}else try{u=t(n,a),no(e,l,u)}catch(g){hc(e,l,g)}}function no(e,l,t){t!==null&&typeof t=="object"&&typeof t.then=="function"?t.then(function(a){uo(e,l,a)},function(a){return hc(e,l,a)}):uo(e,l,t)}function uo(e,l,t){l.status="fulfilled",l.value=t,io(l),e.state=t,l=e.pending,l!==null&&(t=l.next,t===l?e.pending=null:(t=t.next,l.next=t,ao(e,t)))}function hc(e,l,t){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do l.status="rejected",l.reason=t,io(l),l=l.next;while(l!==a)}e.action=null}function io(e){e=e.listeners;for(var l=0;l<e.length;l++)(0,e[l])()}function co(e,l){return l}function fo(e,l){if(ce){var t=ze.formState;if(t!==null){e:{var a=W;if(ce){if(Ne){l:{for(var n=Ne,u=Cl;n.nodeType!==8;){if(!u){n=null;break l}if(n=El(n.nextSibling),n===null){n=null;break l}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){Ne=El(n.nextSibling),a=n.data==="F!";break e}}rt(a)}a=!1}a&&(l=t[0])}}return t=Pe(),t.memoizedState=t.baseState=l,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:l},t.queue=a,t=jo.bind(null,W,a),a.dispatch=t,a=mc(!1),u=Sc.bind(null,W,!1,a.queue),a=Pe(),n={state:l,dispatch:null,action:e,pending:null},a.queue=n,t=sh.bind(null,W,n,u,t),n.dispatch=t,a.memoizedState=e,[l,t,!1]}function so(e){var l=we();return oo(l,pe,e)}function oo(e,l,t){if(l=rc(e,l,co)[0],e=Au(Il)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var a=yn(l)}catch(i){throw i===pa?du:i}else a=l;l=we();var n=l.queue,u=n.dispatch;return t!==l.memoizedState&&(W.flags|=2048,za(9,{destroy:void 0},oh.bind(null,n,t),null)),[a,u,e]}function oh(e,l){e.action=l}function ro(e){var l=we(),t=pe;if(t!==null)return oo(l,t,e);we(),l=l.memoizedState,t=we();var a=t.queue.dispatch;return t.memoizedState=e,[l,a,!1]}function za(e,l,t,a){return e={tag:e,create:t,deps:a,inst:l,next:null},l=W.updateQueue,l===null&&(l=Su(),W.updateQueue=l),t=l.lastEffect,t===null?l.lastEffect=e.next=e:(a=t.next,t.next=e,e.next=a,l.lastEffect=e),e}function mo(){return we().memoizedState}function zu(e,l,t,a){var n=Pe();W.flags|=e,n.memoizedState=za(1|l,{destroy:void 0},t,a===void 0?null:a)}function xu(e,l,t,a){var n=we();a=a===void 0?null:a;var u=n.memoizedState.inst;pe!==null&&a!==null&&uc(a,pe.memoizedState.deps)?n.memoizedState=za(l,u,t,a):(W.flags|=e,n.memoizedState=za(1|l,u,t,a))}function ho(e,l){zu(8390656,8,e,l)}function vc(e,l){xu(2048,8,e,l)}function rh(e){W.flags|=4;var l=W.updateQueue;if(l===null)l=Su(),W.updateQueue=l,l.events=[e];else{var t=l.events;t===null?l.events=[e]:t.push(e)}}function vo(e){var l=we().memoizedState;return rh({ref:l,nextImpl:e}),function(){if((he&2)!==0)throw Error(d(440));return l.impl.apply(void 0,arguments)}}function yo(e,l){return xu(4,2,e,l)}function go(e,l){return xu(4,4,e,l)}function po(e,l){if(typeof l=="function"){e=e();var t=l(e);return function(){typeof t=="function"?t():l(null)}}if(l!=null)return e=e(),l.current=e,function(){l.current=null}}function bo(e,l,t){t=t!=null?t.concat([e]):null,xu(4,4,po.bind(null,l,e),t)}function yc(){}function So(e,l){var t=we();l=l===void 0?null:l;var a=t.memoizedState;return l!==null&&uc(l,a[1])?a[0]:(t.memoizedState=[e,l],e)}function To(e,l){var t=we();l=l===void 0?null:l;var a=t.memoizedState;if(l!==null&&uc(l,a[1]))return a[0];if(a=e(),Kt){it(!0);try{e()}finally{it(!1)}}return t.memoizedState=[a,l],a}function gc(e,l,t){return t===void 0||(Wl&1073741824)!==0&&(ue&261930)===0?e.memoizedState=l:(e.memoizedState=t,e=Ar(),W.lanes|=e,St|=e,t)}function Ao(e,l,t,a){return rl(t,l)?t:Sa.current!==null?(e=gc(e,t,a),rl(e,l)||(Be=!0),e):(Wl&42)===0||(Wl&1073741824)!==0&&(ue&261930)===0?(Be=!0,e.memoizedState=t):(e=Ar(),W.lanes|=e,St|=e,l)}function zo(e,l,t,a,n){var u=A.p;A.p=u!==0&&8>u?u:8;var i=m.T,c={};m.T=c,Sc(e,!1,l,t);try{var s=n(),g=m.S;if(g!==null&&g(c,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var T=ih(s,a);gn(e,l,T,gl(e))}else gn(e,l,a,gl(e))}catch(N){gn(e,l,{then:function(){},status:"rejected",reason:N},gl())}finally{A.p=u,i!==null&&c.types!==null&&(i.types=c.types),m.T=i}}function dh(){}function pc(e,l,t,a){if(e.tag!==5)throw Error(d(476));var n=xo(e).queue;zo(e,n,l,D,t===null?dh:function(){return Co(e),t(a)})}function xo(e){var l=e.memoizedState;if(l!==null)return l;l={memoizedState:D,baseState:D,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:D},next:null};var t={};return l.next={memoizedState:t,baseState:t,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:t},next:null},e.memoizedState=l,e=e.alternate,e!==null&&(e.memoizedState=l),l}function Co(e){var l=xo(e);l.next===null&&(l=e.alternate.memoizedState),gn(e,l.next.queue,{},gl())}function bc(){return Ve(Hn)}function No(){return we().memoizedState}function Eo(){return we().memoizedState}function mh(e){for(var l=e.return;l!==null;){switch(l.tag){case 24:case 3:var t=gl();e=ht(t);var a=vt(l,e,t);a!==null&&(fl(a,l,t),dn(a,l,t)),l={cache:Ji()},e.payload=l;return}l=l.return}}function hh(e,l,t){var a=gl();t={lane:a,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null},Cu(e)?Oo(l,t):(t=qi(e,l,t,a),t!==null&&(fl(t,e,a),_o(t,l,a)))}function jo(e,l,t){var a=gl();gn(e,l,t,a)}function gn(e,l,t,a){var n={lane:a,revertLane:0,gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null};if(Cu(e))Oo(l,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=l.lastRenderedReducer,u!==null))try{var i=l.lastRenderedState,c=u(i,t);if(n.hasEagerState=!0,n.eagerState=c,rl(c,i))return uu(e,l,n,0),ze===null&&nu(),!1}catch{}finally{}if(t=qi(e,l,n,a),t!==null)return fl(t,e,a),_o(t,l,a),!0}return!1}function Sc(e,l,t,a){if(a={lane:2,revertLane:$c(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Cu(e)){if(l)throw Error(d(479))}else l=qi(e,t,a,2),l!==null&&fl(l,e,2)}function Cu(e){var l=e.alternate;return e===W||l!==null&&l===W}function Oo(e,l){Ta=pu=!0;var t=e.pending;t===null?l.next=l:(l.next=t.next,t.next=l),e.pending=l}function _o(e,l,t){if((t&4194048)!==0){var a=l.lanes;a&=e.pendingLanes,t|=a,l.lanes=t,Hf(e,t)}}var pn={readContext:Ve,use:Tu,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};pn.useEffectEvent=De;var Do={readContext:Ve,use:Tu,useCallback:function(e,l){return Pe().memoizedState=[e,l===void 0?null:l],e},useContext:Ve,useEffect:ho,useImperativeHandle:function(e,l,t){t=t!=null?t.concat([e]):null,zu(4194308,4,po.bind(null,l,e),t)},useLayoutEffect:function(e,l){return zu(4194308,4,e,l)},useInsertionEffect:function(e,l){zu(4,2,e,l)},useMemo:function(e,l){var t=Pe();l=l===void 0?null:l;var a=e();if(Kt){it(!0);try{e()}finally{it(!1)}}return t.memoizedState=[a,l],a},useReducer:function(e,l,t){var a=Pe();if(t!==void 0){var n=t(l);if(Kt){it(!0);try{t(l)}finally{it(!1)}}}else n=l;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=hh.bind(null,W,e),[a.memoizedState,e]},useRef:function(e){var l=Pe();return e={current:e},l.memoizedState=e},useState:function(e){e=mc(e);var l=e.queue,t=jo.bind(null,W,l);return l.dispatch=t,[e.memoizedState,t]},useDebugValue:yc,useDeferredValue:function(e,l){var t=Pe();return gc(t,e,l)},useTransition:function(){var e=mc(!1);return e=zo.bind(null,W,e.queue,!0,!1),Pe().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,l,t){var a=W,n=Pe();if(ce){if(t===void 0)throw Error(d(407));t=t()}else{if(t=l(),ze===null)throw Error(d(349));(ue&127)!==0||Fs(a,l,t)}n.memoizedState=t;var u={value:t,getSnapshot:l};return n.queue=u,ho(Ps.bind(null,a,u,e),[e]),a.flags|=2048,za(9,{destroy:void 0},$s.bind(null,a,u,t,l),null),t},useId:function(){var e=Pe(),l=ze.identifierPrefix;if(ce){var t=wl,a=Hl;t=(a&~(1<<32-ol(a)-1)).toString(32)+t,l="_"+l+"R_"+t,t=bu++,0<t&&(l+="H"+t.toString(32)),l+="_"}else t=ch++,l="_"+l+"r_"+t.toString(32)+"_";return e.memoizedState=l},useHostTransitionStatus:bc,useFormState:fo,useActionState:fo,useOptimistic:function(e){var l=Pe();l.memoizedState=l.baseState=e;var t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=t,l=Sc.bind(null,W,!0,t),t.dispatch=l,[e,l]},useMemoCache:oc,useCacheRefresh:function(){return Pe().memoizedState=mh.bind(null,W)},useEffectEvent:function(e){var l=Pe(),t={impl:e};return l.memoizedState=t,function(){if((he&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}},Tc={readContext:Ve,use:Tu,useCallback:So,useContext:Ve,useEffect:vc,useImperativeHandle:bo,useInsertionEffect:yo,useLayoutEffect:go,useMemo:To,useReducer:Au,useRef:mo,useState:function(){return Au(Il)},useDebugValue:yc,useDeferredValue:function(e,l){var t=we();return Ao(t,pe.memoizedState,e,l)},useTransition:function(){var e=Au(Il)[0],l=we().memoizedState;return[typeof e=="boolean"?e:yn(e),l]},useSyncExternalStore:Is,useId:No,useHostTransitionStatus:bc,useFormState:so,useActionState:so,useOptimistic:function(e,l){var t=we();return to(t,pe,e,l)},useMemoCache:oc,useCacheRefresh:Eo};Tc.useEffectEvent=vo;var Uo={readContext:Ve,use:Tu,useCallback:So,useContext:Ve,useEffect:vc,useImperativeHandle:bo,useInsertionEffect:yo,useLayoutEffect:go,useMemo:To,useReducer:dc,useRef:mo,useState:function(){return dc(Il)},useDebugValue:yc,useDeferredValue:function(e,l){var t=we();return pe===null?gc(t,e,l):Ao(t,pe.memoizedState,e,l)},useTransition:function(){var e=dc(Il)[0],l=we().memoizedState;return[typeof e=="boolean"?e:yn(e),l]},useSyncExternalStore:Is,useId:No,useHostTransitionStatus:bc,useFormState:ro,useActionState:ro,useOptimistic:function(e,l){var t=we();return pe!==null?to(t,pe,e,l):(t.baseState=e,[e,t.queue.dispatch])},useMemoCache:oc,useCacheRefresh:Eo};Uo.useEffectEvent=vo;function Ac(e,l,t,a){l=e.memoizedState,t=t(a,l),t=t==null?l:q({},l,t),e.memoizedState=t,e.lanes===0&&(e.updateQueue.baseState=t)}var zc={enqueueSetState:function(e,l,t){e=e._reactInternals;var a=gl(),n=ht(a);n.payload=l,t!=null&&(n.callback=t),l=vt(e,n,a),l!==null&&(fl(l,e,a),dn(l,e,a))},enqueueReplaceState:function(e,l,t){e=e._reactInternals;var a=gl(),n=ht(a);n.tag=1,n.payload=l,t!=null&&(n.callback=t),l=vt(e,n,a),l!==null&&(fl(l,e,a),dn(l,e,a))},enqueueForceUpdate:function(e,l){e=e._reactInternals;var t=gl(),a=ht(t);a.tag=2,l!=null&&(a.callback=l),l=vt(e,a,t),l!==null&&(fl(l,e,t),dn(l,e,t))}};function Mo(e,l,t,a,n,u,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,i):l.prototype&&l.prototype.isPureReactComponent?!an(t,a)||!an(n,u):!0}function Ho(e,l,t,a){e=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(t,a),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(t,a),l.state!==e&&zc.enqueueReplaceState(l,l.state,null)}function Vt(e,l){var t=l;if("ref"in l){t={};for(var a in l)a!=="ref"&&(t[a]=l[a])}if(e=e.defaultProps){t===l&&(t=q({},t));for(var n in e)t[n]===void 0&&(t[n]=e[n])}return t}function wo(e){au(e)}function Ro(e){console.error(e)}function qo(e){au(e)}function Nu(e,l){try{var t=e.onUncaughtError;t(l.value,{componentStack:l.stack})}catch(a){setTimeout(function(){throw a})}}function Bo(e,l,t){try{var a=e.onCaughtError;a(t.value,{componentStack:t.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function xc(e,l,t){return t=ht(t),t.tag=3,t.payload={element:null},t.callback=function(){Nu(e,l)},t}function Lo(e){return e=ht(e),e.tag=3,e}function Yo(e,l,t,a){var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var u=a.value;e.payload=function(){return n(u)},e.callback=function(){Bo(l,t,a)}}var i=t.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){Bo(l,t,a),typeof n!="function"&&(Tt===null?Tt=new Set([this]):Tt.add(this));var c=a.stack;this.componentDidCatch(a.value,{componentStack:c!==null?c:""})})}function vh(e,l,t,a,n){if(t.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(l=t.alternate,l!==null&&va(l,t,n,!0),t=ml.current,t!==null){switch(t.tag){case 31:case 13:return Nl===null?Bu():t.alternate===null&&Ue===0&&(Ue=3),t.flags&=-257,t.flags|=65536,t.lanes=n,a===mu?t.flags|=16384:(l=t.updateQueue,l===null?t.updateQueue=new Set([a]):l.add(a),Wc(e,a,n)),!1;case 22:return t.flags|=65536,a===mu?t.flags|=16384:(l=t.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([a])},t.updateQueue=l):(t=l.retryQueue,t===null?l.retryQueue=new Set([a]):t.add(a)),Wc(e,a,n)),!1}throw Error(d(435,t.tag))}return Wc(e,a,n),Bu(),!1}if(ce)return l=ml.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=n,a!==Xi&&(e=Error(d(422),{cause:a}),cn(Al(e,t)))):(a!==Xi&&(l=Error(d(423),{cause:a}),cn(Al(l,t))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Al(a,t),n=xc(e.stateNode,a,n),ec(e,n),Ue!==4&&(Ue=2)),!1;var u=Error(d(520),{cause:a});if(u=Al(u,t),Nn===null?Nn=[u]:Nn.push(u),Ue!==4&&(Ue=2),l===null)return!0;a=Al(a,t),t=l;do{switch(t.tag){case 3:return t.flags|=65536,e=n&-n,t.lanes|=e,e=xc(t.stateNode,a,e),ec(t,e),!1;case 1:if(l=t.type,u=t.stateNode,(t.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Tt===null||!Tt.has(u))))return t.flags|=65536,n&=-n,t.lanes|=n,n=Lo(n),Yo(n,e,t,a),ec(t,n),!1}t=t.return}while(t!==null);return!1}var Cc=Error(d(461)),Be=!1;function Je(e,l,t,a){l.child=e===null?Xs(l,null,t,a):kt(l,e.child,t,a)}function Qo(e,l,t,a,n){t=t.render;var u=l.ref;if("ref"in a){var i={};for(var c in a)c!=="ref"&&(i[c]=a[c])}else i=a;return Qt(l),a=ic(e,l,t,i,u,n),c=cc(),e!==null&&!Be?(fc(e,l,n),Fl(e,l,n)):(ce&&c&&Qi(l),l.flags|=1,Je(e,l,a,n),l.child)}function Go(e,l,t,a,n){if(e===null){var u=t.type;return typeof u=="function"&&!Bi(u)&&u.defaultProps===void 0&&t.compare===null?(l.tag=15,l.type=u,Xo(e,l,u,a,n)):(e=cu(t.type,null,a,l,l.mode,n),e.ref=l.ref,e.return=l,l.child=e)}if(u=e.child,!Mc(e,n)){var i=u.memoizedProps;if(t=t.compare,t=t!==null?t:an,t(i,a)&&e.ref===l.ref)return Fl(e,l,n)}return l.flags|=1,e=kl(u,a),e.ref=l.ref,e.return=l,l.child=e}function Xo(e,l,t,a,n){if(e!==null){var u=e.memoizedProps;if(an(u,a)&&e.ref===l.ref)if(Be=!1,l.pendingProps=a=u,Mc(e,n))(e.flags&131072)!==0&&(Be=!0);else return l.lanes=e.lanes,Fl(e,l,n)}return Nc(e,l,t,a,n)}function Zo(e,l,t,a){var n=a.children,u=e!==null?e.memoizedState:null;if(e===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((l.flags&128)!==0){if(u=u!==null?u.baseLanes|t:t,e!==null){for(a=l.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~u}else a=0,l.child=null;return ko(e,l,u,t,a)}if((t&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},e!==null&&ru(l,u!==null?u.cachePool:null),u!==null?Ks(l,u):tc(),Vs(l);else return a=l.lanes=536870912,ko(e,l,u!==null?u.baseLanes|t:t,t,a)}else u!==null?(ru(l,u.cachePool),Ks(l,u),gt(),l.memoizedState=null):(e!==null&&ru(l,null),tc(),gt());return Je(e,l,n,t),l.child}function bn(e,l){return e!==null&&e.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function ko(e,l,t,a,n){var u=Ii();return u=u===null?null:{parent:Re._currentValue,pool:u},l.memoizedState={baseLanes:t,cachePool:u},e!==null&&ru(l,null),tc(),Vs(l),e!==null&&va(e,l,a,!0),l.childLanes=n,null}function Eu(e,l){return l=Ou({mode:l.mode,children:l.children},e.mode),l.ref=e.ref,e.child=l,l.return=e,l}function Ko(e,l,t){return kt(l,e.child,null,t),e=Eu(l,l.pendingProps),e.flags|=2,hl(l),l.memoizedState=null,e}function yh(e,l,t){var a=l.pendingProps,n=(l.flags&128)!==0;if(l.flags&=-129,e===null){if(ce){if(a.mode==="hidden")return e=Eu(l,a),l.lanes=536870912,bn(null,e);if(nc(l),(e=Ne)?(e=nd(e,Cl),e=e!==null&&e.data==="&"?e:null,e!==null&&(l.memoizedState={dehydrated:e,treeContext:st!==null?{id:Hl,overflow:wl}:null,retryLane:536870912,hydrationErrors:null},t=js(e),t.return=l,l.child=t,Ke=l,Ne=null)):e=null,e===null)throw rt(l);return l.lanes=536870912,null}return Eu(l,a)}var u=e.memoizedState;if(u!==null){var i=u.dehydrated;if(nc(l),n)if(l.flags&256)l.flags&=-257,l=Ko(e,l,t);else if(l.memoizedState!==null)l.child=e.child,l.flags|=128,l=null;else throw Error(d(558));else if(Be||va(e,l,t,!1),n=(t&e.childLanes)!==0,Be||n){if(a=ze,a!==null&&(i=wf(a,t),i!==0&&i!==u.retryLane))throw u.retryLane=i,qt(e,i),fl(a,e,i),Cc;Bu(),l=Ko(e,l,t)}else e=u.treeContext,Ne=El(i.nextSibling),Ke=l,ce=!0,ot=null,Cl=!1,e!==null&&Ds(l,e),l=Eu(l,a),l.flags|=4096;return l}return e=kl(e.child,{mode:a.mode,children:a.children}),e.ref=l.ref,l.child=e,e.return=l,e}function ju(e,l){var t=l.ref;if(t===null)e!==null&&e.ref!==null&&(l.flags|=4194816);else{if(typeof t!="function"&&typeof t!="object")throw Error(d(284));(e===null||e.ref!==t)&&(l.flags|=4194816)}}function Nc(e,l,t,a,n){return Qt(l),t=ic(e,l,t,a,void 0,n),a=cc(),e!==null&&!Be?(fc(e,l,n),Fl(e,l,n)):(ce&&a&&Qi(l),l.flags|=1,Je(e,l,t,n),l.child)}function Vo(e,l,t,a,n,u){return Qt(l),l.updateQueue=null,t=Ws(l,a,t,n),Js(e),a=cc(),e!==null&&!Be?(fc(e,l,u),Fl(e,l,u)):(ce&&a&&Qi(l),l.flags|=1,Je(e,l,t,u),l.child)}function Jo(e,l,t,a,n){if(Qt(l),l.stateNode===null){var u=ra,i=t.contextType;typeof i=="object"&&i!==null&&(u=Ve(i)),u=new t(a,u),l.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=zc,l.stateNode=u,u._reactInternals=l,u=l.stateNode,u.props=a,u.state=l.memoizedState,u.refs={},$i(l),i=t.contextType,u.context=typeof i=="object"&&i!==null?Ve(i):ra,u.state=l.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ac(l,t,i,a),u.state=l.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(i=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),i!==u.state&&zc.enqueueReplaceState(u,u.state,null),hn(l,a,u,n),mn(),u.state=l.memoizedState),typeof u.componentDidMount=="function"&&(l.flags|=4194308),a=!0}else if(e===null){u=l.stateNode;var c=l.memoizedProps,s=Vt(t,c);u.props=s;var g=u.context,T=t.contextType;i=ra,typeof T=="object"&&T!==null&&(i=Ve(T));var N=t.getDerivedStateFromProps;T=typeof N=="function"||typeof u.getSnapshotBeforeUpdate=="function",c=l.pendingProps!==c,T||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(c||g!==i)&&Ho(l,u,a,i),mt=!1;var p=l.memoizedState;u.state=p,hn(l,a,u,n),mn(),g=l.memoizedState,c||p!==g||mt?(typeof N=="function"&&(Ac(l,t,N,a),g=l.memoizedState),(s=mt||Mo(l,t,s,a,p,g,i))?(T||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(l.flags|=4194308)):(typeof u.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=a,l.memoizedState=g),u.props=a,u.state=g,u.context=i,a=s):(typeof u.componentDidMount=="function"&&(l.flags|=4194308),a=!1)}else{u=l.stateNode,Pi(e,l),i=l.memoizedProps,T=Vt(t,i),u.props=T,N=l.pendingProps,p=u.context,g=t.contextType,s=ra,typeof g=="object"&&g!==null&&(s=Ve(g)),c=t.getDerivedStateFromProps,(g=typeof c=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==N||p!==s)&&Ho(l,u,a,s),mt=!1,p=l.memoizedState,u.state=p,hn(l,a,u,n),mn();var b=l.memoizedState;i!==N||p!==b||mt||e!==null&&e.dependencies!==null&&su(e.dependencies)?(typeof c=="function"&&(Ac(l,t,c,a),b=l.memoizedState),(T=mt||Mo(l,t,T,a,p,b,s)||e!==null&&e.dependencies!==null&&su(e.dependencies))?(g||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,b,s),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,b,s)),typeof u.componentDidUpdate=="function"&&(l.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(l.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(l.flags|=1024),l.memoizedProps=a,l.memoizedState=b),u.props=a,u.state=b,u.context=s,a=T):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(l.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(l.flags|=1024),a=!1)}return u=a,ju(e,l),a=(l.flags&128)!==0,u||a?(u=l.stateNode,t=a&&typeof t.getDerivedStateFromError!="function"?null:u.render(),l.flags|=1,e!==null&&a?(l.child=kt(l,e.child,null,n),l.child=kt(l,null,t,n)):Je(e,l,t,n),l.memoizedState=u.state,e=l.child):e=Fl(e,l,n),e}function Wo(e,l,t,a){return Lt(),l.flags|=256,Je(e,l,t,a),l.child}var Ec={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jc(e){return{baseLanes:e,cachePool:qs()}}function Oc(e,l,t){return e=e!==null?e.childLanes&~t:0,l&&(e|=yl),e}function Io(e,l,t){var a=l.pendingProps,n=!1,u=(l.flags&128)!==0,i;if((i=u)||(i=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),i&&(n=!0,l.flags&=-129),i=(l.flags&32)!==0,l.flags&=-33,e===null){if(ce){if(n?yt(l):gt(),(e=Ne)?(e=nd(e,Cl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(l.memoizedState={dehydrated:e,treeContext:st!==null?{id:Hl,overflow:wl}:null,retryLane:536870912,hydrationErrors:null},t=js(e),t.return=l,l.child=t,Ke=l,Ne=null)):e=null,e===null)throw rt(l);return df(e)?l.lanes=32:l.lanes=536870912,null}var c=a.children;return a=a.fallback,n?(gt(),n=l.mode,c=Ou({mode:"hidden",children:c},n),a=Bt(a,n,t,null),c.return=l,a.return=l,c.sibling=a,l.child=c,a=l.child,a.memoizedState=jc(t),a.childLanes=Oc(e,i,t),l.memoizedState=Ec,bn(null,a)):(yt(l),_c(l,c))}var s=e.memoizedState;if(s!==null&&(c=s.dehydrated,c!==null)){if(u)l.flags&256?(yt(l),l.flags&=-257,l=Dc(e,l,t)):l.memoizedState!==null?(gt(),l.child=e.child,l.flags|=128,l=null):(gt(),c=a.fallback,n=l.mode,a=Ou({mode:"visible",children:a.children},n),c=Bt(c,n,t,null),c.flags|=2,a.return=l,c.return=l,a.sibling=c,l.child=a,kt(l,e.child,null,t),a=l.child,a.memoizedState=jc(t),a.childLanes=Oc(e,i,t),l.memoizedState=Ec,l=bn(null,a));else if(yt(l),df(c)){if(i=c.nextSibling&&c.nextSibling.dataset,i)var g=i.dgst;i=g,a=Error(d(419)),a.stack="",a.digest=i,cn({value:a,source:null,stack:null}),l=Dc(e,l,t)}else if(Be||va(e,l,t,!1),i=(t&e.childLanes)!==0,Be||i){if(i=ze,i!==null&&(a=wf(i,t),a!==0&&a!==s.retryLane))throw s.retryLane=a,qt(e,a),fl(i,e,a),Cc;rf(c)||Bu(),l=Dc(e,l,t)}else rf(c)?(l.flags|=192,l.child=e.child,l=null):(e=s.treeContext,Ne=El(c.nextSibling),Ke=l,ce=!0,ot=null,Cl=!1,e!==null&&Ds(l,e),l=_c(l,a.children),l.flags|=4096);return l}return n?(gt(),c=a.fallback,n=l.mode,s=e.child,g=s.sibling,a=kl(s,{mode:"hidden",children:a.children}),a.subtreeFlags=s.subtreeFlags&65011712,g!==null?c=kl(g,c):(c=Bt(c,n,t,null),c.flags|=2),c.return=l,a.return=l,a.sibling=c,l.child=a,bn(null,a),a=l.child,c=e.child.memoizedState,c===null?c=jc(t):(n=c.cachePool,n!==null?(s=Re._currentValue,n=n.parent!==s?{parent:s,pool:s}:n):n=qs(),c={baseLanes:c.baseLanes|t,cachePool:n}),a.memoizedState=c,a.childLanes=Oc(e,i,t),l.memoizedState=Ec,bn(e.child,a)):(yt(l),t=e.child,e=t.sibling,t=kl(t,{mode:"visible",children:a.children}),t.return=l,t.sibling=null,e!==null&&(i=l.deletions,i===null?(l.deletions=[e],l.flags|=16):i.push(e)),l.child=t,l.memoizedState=null,t)}function _c(e,l){return l=Ou({mode:"visible",children:l},e.mode),l.return=e,e.child=l}function Ou(e,l){return e=dl(22,e,null,l),e.lanes=0,e}function Dc(e,l,t){return kt(l,e.child,null,t),e=_c(l,l.pendingProps.children),e.flags|=2,l.memoizedState=null,e}function Fo(e,l,t){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l),Ki(e.return,l,t)}function Uc(e,l,t,a,n,u){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:a,tail:t,tailMode:n,treeForkCount:u}:(i.isBackwards=l,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=t,i.tailMode=n,i.treeForkCount=u)}function $o(e,l,t){var a=l.pendingProps,n=a.revealOrder,u=a.tail;a=a.children;var i=He.current,c=(i&2)!==0;if(c?(i=i&1|2,l.flags|=128):i&=1,_(He,i),Je(e,l,a,t),a=ce?un:0,!c&&e!==null&&(e.flags&128)!==0)e:for(e=l.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fo(e,t,l);else if(e.tag===19)Fo(e,t,l);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===l)break e;for(;e.sibling===null;){if(e.return===null||e.return===l)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(t=l.child,n=null;t!==null;)e=t.alternate,e!==null&&gu(e)===null&&(n=t),t=t.sibling;t=n,t===null?(n=l.child,l.child=null):(n=t.sibling,t.sibling=null),Uc(l,!1,n,t,u,a);break;case"backwards":case"unstable_legacy-backwards":for(t=null,n=l.child,l.child=null;n!==null;){if(e=n.alternate,e!==null&&gu(e)===null){l.child=n;break}e=n.sibling,n.sibling=t,t=n,n=e}Uc(l,!0,t,null,u,a);break;case"together":Uc(l,!1,null,null,void 0,a);break;default:l.memoizedState=null}return l.child}function Fl(e,l,t){if(e!==null&&(l.dependencies=e.dependencies),St|=l.lanes,(t&l.childLanes)===0)if(e!==null){if(va(e,l,t,!1),(t&l.childLanes)===0)return null}else return null;if(e!==null&&l.child!==e.child)throw Error(d(153));if(l.child!==null){for(e=l.child,t=kl(e,e.pendingProps),l.child=t,t.return=l;e.sibling!==null;)e=e.sibling,t=t.sibling=kl(e,e.pendingProps),t.return=l;t.sibling=null}return l.child}function Mc(e,l){return(e.lanes&l)!==0?!0:(e=e.dependencies,!!(e!==null&&su(e)))}function gh(e,l,t){switch(l.tag){case 3:Ye(l,l.stateNode.containerInfo),dt(l,Re,e.memoizedState.cache),Lt();break;case 27:case 5:Dt(l);break;case 4:Ye(l,l.stateNode.containerInfo);break;case 10:dt(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,nc(l),null;break;case 13:var a=l.memoizedState;if(a!==null)return a.dehydrated!==null?(yt(l),l.flags|=128,null):(t&l.child.childLanes)!==0?Io(e,l,t):(yt(l),e=Fl(e,l,t),e!==null?e.sibling:null);yt(l);break;case 19:var n=(e.flags&128)!==0;if(a=(t&l.childLanes)!==0,a||(va(e,l,t,!1),a=(t&l.childLanes)!==0),n){if(a)return $o(e,l,t);l.flags|=128}if(n=l.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),_(He,He.current),a)break;return null;case 22:return l.lanes=0,Zo(e,l,t,l.pendingProps);case 24:dt(l,Re,e.memoizedState.cache)}return Fl(e,l,t)}function Po(e,l,t){if(e!==null)if(e.memoizedProps!==l.pendingProps)Be=!0;else{if(!Mc(e,t)&&(l.flags&128)===0)return Be=!1,gh(e,l,t);Be=(e.flags&131072)!==0}else Be=!1,ce&&(l.flags&1048576)!==0&&_s(l,un,l.index);switch(l.lanes=0,l.tag){case 16:e:{var a=l.pendingProps;if(e=Xt(l.elementType),l.type=e,typeof e=="function")Bi(e)?(a=Vt(e,a),l.tag=1,l=Jo(null,l,e,a,t)):(l.tag=0,l=Nc(null,l,e,a,t));else{if(e!=null){var n=e.$$typeof;if(n===me){l.tag=11,l=Qo(null,l,e,a,t);break e}else if(n===V){l.tag=14,l=Go(null,l,e,a,t);break e}}throw l=ll(e)||e,Error(d(306,l,""))}}return l;case 0:return Nc(e,l,l.type,l.pendingProps,t);case 1:return a=l.type,n=Vt(a,l.pendingProps),Jo(e,l,a,n,t);case 3:e:{if(Ye(l,l.stateNode.containerInfo),e===null)throw Error(d(387));a=l.pendingProps;var u=l.memoizedState;n=u.element,Pi(e,l),hn(l,a,null,t);var i=l.memoizedState;if(a=i.cache,dt(l,Re,a),a!==u.cache&&Vi(l,[Re],t,!0),mn(),a=i.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:i.cache},l.updateQueue.baseState=u,l.memoizedState=u,l.flags&256){l=Wo(e,l,a,t);break e}else if(a!==n){n=Al(Error(d(424)),l),cn(n),l=Wo(e,l,a,t);break e}else{switch(e=l.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ne=El(e.firstChild),Ke=l,ce=!0,ot=null,Cl=!0,t=Xs(l,null,a,t),l.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling}else{if(Lt(),a===n){l=Fl(e,l,t);break e}Je(e,l,a,t)}l=l.child}return l;case 26:return ju(e,l),e===null?(t=od(l.type,null,l.pendingProps,null))?l.memoizedState=t:ce||(t=l.type,e=l.pendingProps,a=ku(P.current).createElement(t),a[ke]=l,a[tl]=e,We(a,t,e),Xe(a),l.stateNode=a):l.memoizedState=od(l.type,e.memoizedProps,l.pendingProps,e.memoizedState),null;case 27:return Dt(l),e===null&&ce&&(a=l.stateNode=cd(l.type,l.pendingProps,P.current),Ke=l,Cl=!0,n=Ne,Ct(l.type)?(mf=n,Ne=El(a.firstChild)):Ne=n),Je(e,l,l.pendingProps.children,t),ju(e,l),e===null&&(l.flags|=4194304),l.child;case 5:return e===null&&ce&&((n=a=Ne)&&(a=Vh(a,l.type,l.pendingProps,Cl),a!==null?(l.stateNode=a,Ke=l,Ne=El(a.firstChild),Cl=!1,n=!0):n=!1),n||rt(l)),Dt(l),n=l.type,u=l.pendingProps,i=e!==null?e.memoizedProps:null,a=u.children,ff(n,u)?a=null:i!==null&&ff(n,i)&&(l.flags|=32),l.memoizedState!==null&&(n=ic(e,l,fh,null,null,t),Hn._currentValue=n),ju(e,l),Je(e,l,a,t),l.child;case 6:return e===null&&ce&&((e=t=Ne)&&(t=Jh(t,l.pendingProps,Cl),t!==null?(l.stateNode=t,Ke=l,Ne=null,e=!0):e=!1),e||rt(l)),null;case 13:return Io(e,l,t);case 4:return Ye(l,l.stateNode.containerInfo),a=l.pendingProps,e===null?l.child=kt(l,null,a,t):Je(e,l,a,t),l.child;case 11:return Qo(e,l,l.type,l.pendingProps,t);case 7:return Je(e,l,l.pendingProps,t),l.child;case 8:return Je(e,l,l.pendingProps.children,t),l.child;case 12:return Je(e,l,l.pendingProps.children,t),l.child;case 10:return a=l.pendingProps,dt(l,l.type,a.value),Je(e,l,a.children,t),l.child;case 9:return n=l.type._context,a=l.pendingProps.children,Qt(l),n=Ve(n),a=a(n),l.flags|=1,Je(e,l,a,t),l.child;case 14:return Go(e,l,l.type,l.pendingProps,t);case 15:return Xo(e,l,l.type,l.pendingProps,t);case 19:return $o(e,l,t);case 31:return yh(e,l,t);case 22:return Zo(e,l,t,l.pendingProps);case 24:return Qt(l),a=Ve(Re),e===null?(n=Ii(),n===null&&(n=ze,u=Ji(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=t),n=u),l.memoizedState={parent:a,cache:n},$i(l),dt(l,Re,n)):((e.lanes&t)!==0&&(Pi(e,l),hn(l,null,null,t),mn()),n=e.memoizedState,u=l.memoizedState,n.parent!==a?(n={parent:a,cache:a},l.memoizedState=n,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=n),dt(l,Re,a)):(a=u.cache,dt(l,Re,a),a!==n.cache&&Vi(l,[Re],t,!0))),Je(e,l,l.pendingProps.children,t),l.child;case 29:throw l.pendingProps}throw Error(d(156,l.tag))}function $l(e){e.flags|=4}function Hc(e,l,t,a,n){if((l=(e.mode&32)!==0)&&(l=!1),l){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Nr())e.flags|=8192;else throw Zt=mu,Fi}else e.flags&=-16777217}function er(e,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!vd(l))if(Nr())e.flags|=8192;else throw Zt=mu,Fi}function _u(e,l){l!==null&&(e.flags|=4),e.flags&16384&&(l=e.tag!==22?Uf():536870912,e.lanes|=l,Ea|=l)}function Sn(e,l){if(!ce)switch(e.tailMode){case"hidden":l=e.tail;for(var t=null;l!==null;)l.alternate!==null&&(t=l),l=l.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?l||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ee(e){var l=e.alternate!==null&&e.alternate.child===e.child,t=0,a=0;if(l)for(var n=e.child;n!==null;)t|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)t|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=t,l}function ph(e,l,t){var a=l.pendingProps;switch(Gi(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ee(l),null;case 1:return Ee(l),null;case 3:return t=l.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),l.memoizedState.cache!==a&&(l.flags|=2048),Jl(Re),Oe(),t.pendingContext&&(t.context=t.pendingContext,t.pendingContext=null),(e===null||e.child===null)&&(ha(l)?$l(l):e===null||e.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Zi())),Ee(l),null;case 26:var n=l.type,u=l.memoizedState;return e===null?($l(l),u!==null?(Ee(l),er(l,u)):(Ee(l),Hc(l,n,null,a,t))):u?u!==e.memoizedState?($l(l),Ee(l),er(l,u)):(Ee(l),l.flags&=-16777217):(e=e.memoizedProps,e!==a&&$l(l),Ee(l),Hc(l,n,e,a,t)),null;case 27:if(Ft(l),t=P.current,n=l.type,e!==null&&l.stateNode!=null)e.memoizedProps!==a&&$l(l);else{if(!a){if(l.stateNode===null)throw Error(d(166));return Ee(l),null}e=w.current,ha(l)?Us(l):(e=cd(n,a,t),l.stateNode=e,$l(l))}return Ee(l),null;case 5:if(Ft(l),n=l.type,e!==null&&l.stateNode!=null)e.memoizedProps!==a&&$l(l);else{if(!a){if(l.stateNode===null)throw Error(d(166));return Ee(l),null}if(u=w.current,ha(l))Us(l);else{var i=ku(P.current);switch(u){case 1:u=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:u=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":u=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":u=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":u=i.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[ke]=l,u[tl]=a;e:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=u;e:switch(We(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&$l(l)}}return Ee(l),Hc(l,l.type,e===null?null:e.memoizedProps,l.pendingProps,t),null;case 6:if(e&&l.stateNode!=null)e.memoizedProps!==a&&$l(l);else{if(typeof a!="string"&&l.stateNode===null)throw Error(d(166));if(e=P.current,ha(l)){if(e=l.stateNode,t=l.memoizedProps,a=null,n=Ke,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[ke]=l,e=!!(e.nodeValue===t||a!==null&&a.suppressHydrationWarning===!0||Ir(e.nodeValue,t)),e||rt(l,!0)}else e=ku(e).createTextNode(a),e[ke]=l,l.stateNode=e}return Ee(l),null;case 31:if(t=l.memoizedState,e===null||e.memoizedState!==null){if(a=ha(l),t!==null){if(e===null){if(!a)throw Error(d(318));if(e=l.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[ke]=l}else Lt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ee(l),e=!1}else t=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=t),e=!0;if(!e)return l.flags&256?(hl(l),l):(hl(l),null);if((l.flags&128)!==0)throw Error(d(558))}return Ee(l),null;case 13:if(a=l.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=ha(l),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(d(318));if(n=l.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(d(317));n[ke]=l}else Lt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Ee(l),n=!1}else n=Zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return l.flags&256?(hl(l),l):(hl(l),null)}return hl(l),(l.flags&128)!==0?(l.lanes=t,l):(t=a!==null,e=e!==null&&e.memoizedState!==null,t&&(a=l.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),t!==e&&t&&(l.child.flags|=8192),_u(l,l.updateQueue),Ee(l),null);case 4:return Oe(),e===null&&tf(l.stateNode.containerInfo),Ee(l),null;case 10:return Jl(l.type),Ee(l),null;case 19:if(z(He),a=l.memoizedState,a===null)return Ee(l),null;if(n=(l.flags&128)!==0,u=a.rendering,u===null)if(n)Sn(a,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=l.child;e!==null;){if(u=gu(e),u!==null){for(l.flags|=128,Sn(a,!1),e=u.updateQueue,l.updateQueue=e,_u(l,e),l.subtreeFlags=0,e=t,t=l.child;t!==null;)Es(t,e),t=t.sibling;return _(He,He.current&1|2),ce&&Kl(l,a.treeForkCount),l.child}e=e.sibling}a.tail!==null&&Q()>wu&&(l.flags|=128,n=!0,Sn(a,!1),l.lanes=4194304)}else{if(!n)if(e=gu(u),e!==null){if(l.flags|=128,n=!0,e=e.updateQueue,l.updateQueue=e,_u(l,e),Sn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ce)return Ee(l),null}else 2*Q()-a.renderingStartTime>wu&&t!==536870912&&(l.flags|=128,n=!0,Sn(a,!1),l.lanes=4194304);a.isBackwards?(u.sibling=l.child,l.child=u):(e=a.last,e!==null?e.sibling=u:l.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Q(),e.sibling=null,t=He.current,_(He,n?t&1|2:t&1),ce&&Kl(l,a.treeForkCount),e):(Ee(l),null);case 22:case 23:return hl(l),ac(),a=l.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(l.flags|=8192):a&&(l.flags|=8192),a?(t&536870912)!==0&&(l.flags&128)===0&&(Ee(l),l.subtreeFlags&6&&(l.flags|=8192)):Ee(l),t=l.updateQueue,t!==null&&_u(l,t.retryQueue),t=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==t&&(l.flags|=2048),e!==null&&z(Gt),null;case 24:return t=null,e!==null&&(t=e.memoizedState.cache),l.memoizedState.cache!==t&&(l.flags|=2048),Jl(Re),Ee(l),null;case 25:return null;case 30:return null}throw Error(d(156,l.tag))}function bh(e,l){switch(Gi(l),l.tag){case 1:return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 3:return Jl(Re),Oe(),e=l.flags,(e&65536)!==0&&(e&128)===0?(l.flags=e&-65537|128,l):null;case 26:case 27:case 5:return Ft(l),null;case 31:if(l.memoizedState!==null){if(hl(l),l.alternate===null)throw Error(d(340));Lt()}return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 13:if(hl(l),e=l.memoizedState,e!==null&&e.dehydrated!==null){if(l.alternate===null)throw Error(d(340));Lt()}return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 19:return z(He),null;case 4:return Oe(),null;case 10:return Jl(l.type),null;case 22:case 23:return hl(l),ac(),e!==null&&z(Gt),e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 24:return Jl(Re),null;case 25:return null;default:return null}}function lr(e,l){switch(Gi(l),l.tag){case 3:Jl(Re),Oe();break;case 26:case 27:case 5:Ft(l);break;case 4:Oe();break;case 31:l.memoizedState!==null&&hl(l);break;case 13:hl(l);break;case 19:z(He);break;case 10:Jl(l.type);break;case 22:case 23:hl(l),ac(),e!==null&&z(Gt);break;case 24:Jl(Re)}}function Tn(e,l){try{var t=l.updateQueue,a=t!==null?t.lastEffect:null;if(a!==null){var n=a.next;t=n;do{if((t.tag&e)===e){a=void 0;var u=t.create,i=t.inst;a=u(),i.destroy=a}t=t.next}while(t!==n)}}catch(c){ye(l,l.return,c)}}function pt(e,l,t){try{var a=l.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,n=l;var s=t,g=c;try{g()}catch(T){ye(n,s,T)}}}a=a.next}while(a!==u)}}catch(T){ye(l,l.return,T)}}function tr(e){var l=e.updateQueue;if(l!==null){var t=e.stateNode;try{ks(l,t)}catch(a){ye(e,e.return,a)}}}function ar(e,l,t){t.props=Vt(e.type,e.memoizedProps),t.state=e.memoizedState;try{t.componentWillUnmount()}catch(a){ye(e,l,a)}}function An(e,l){try{var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof t=="function"?e.refCleanup=t(a):t.current=a}}catch(n){ye(e,l,n)}}function Rl(e,l){var t=e.ref,a=e.refCleanup;if(t!==null)if(typeof a=="function")try{a()}catch(n){ye(e,l,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof t=="function")try{t(null)}catch(n){ye(e,l,n)}else t.current=null}function nr(e){var l=e.type,t=e.memoizedProps,a=e.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":t.autoFocus&&a.focus();break e;case"img":t.src?a.src=t.src:t.srcSet&&(a.srcset=t.srcSet)}}catch(n){ye(e,e.return,n)}}function wc(e,l,t){try{var a=e.stateNode;Qh(a,e.type,t,l),a[tl]=l}catch(n){ye(e,e.return,n)}}function ur(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ct(e.type)||e.tag===4}function Rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ur(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ct(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,l,t){var a=e.tag;if(a===5||a===6)e=e.stateNode,l?(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t).insertBefore(e,l):(l=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.appendChild(e),t=t._reactRootContainer,t!=null||l.onclick!==null||(l.onclick=Xl));else if(a!==4&&(a===27&&Ct(e.type)&&(t=e.stateNode,l=null),e=e.child,e!==null))for(qc(e,l,t),e=e.sibling;e!==null;)qc(e,l,t),e=e.sibling}function Du(e,l,t){var a=e.tag;if(a===5||a===6)e=e.stateNode,l?t.insertBefore(e,l):t.appendChild(e);else if(a!==4&&(a===27&&Ct(e.type)&&(t=e.stateNode),e=e.child,e!==null))for(Du(e,l,t),e=e.sibling;e!==null;)Du(e,l,t),e=e.sibling}function ir(e){var l=e.stateNode,t=e.memoizedProps;try{for(var a=e.type,n=l.attributes;n.length;)l.removeAttributeNode(n[0]);We(l,a,t),l[ke]=e,l[tl]=t}catch(u){ye(e,e.return,u)}}var Pl=!1,Le=!1,Bc=!1,cr=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function Sh(e,l){if(e=e.containerInfo,uf=$u,e=ps(e),Di(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var a=t.getSelection&&t.getSelection();if(a&&a.rangeCount!==0){t=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{t.nodeType,u.nodeType}catch{t=null;break e}var i=0,c=-1,s=-1,g=0,T=0,N=e,p=null;l:for(;;){for(var b;N!==t||n!==0&&N.nodeType!==3||(c=i+n),N!==u||a!==0&&N.nodeType!==3||(s=i+a),N.nodeType===3&&(i+=N.nodeValue.length),(b=N.firstChild)!==null;)p=N,N=b;for(;;){if(N===e)break l;if(p===t&&++g===n&&(c=i),p===u&&++T===a&&(s=i),(b=N.nextSibling)!==null)break;N=p,p=N.parentNode}N=b}t=c===-1||s===-1?null:{start:c,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(cf={focusedElem:e,selectionRange:t},$u=!1,Ze=l;Ze!==null;)if(l=Ze,e=l.child,(l.subtreeFlags&1028)!==0&&e!==null)e.return=l,Ze=e;else for(;Ze!==null;){switch(l=Ze,u=l.alternate,e=l.flags,l.tag){case 0:if((e&4)!==0&&(e=l.updateQueue,e=e!==null?e.events:null,e!==null))for(t=0;t<e.length;t++)n=e[t],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,t=l,n=u.memoizedProps,u=u.memoizedState,a=t.stateNode;try{var R=Vt(t.type,n);e=a.getSnapshotBeforeUpdate(R,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(X){ye(t,t.return,X)}}break;case 3:if((e&1024)!==0){if(e=l.stateNode.containerInfo,t=e.nodeType,t===9)of(e);else if(t===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":of(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=l.sibling,e!==null){e.return=l.return,Ze=e;break}Ze=l.return}}function fr(e,l,t){var a=t.flags;switch(t.tag){case 0:case 11:case 15:lt(e,t),a&4&&Tn(5,t);break;case 1:if(lt(e,t),a&4)if(e=t.stateNode,l===null)try{e.componentDidMount()}catch(i){ye(t,t.return,i)}else{var n=Vt(t.type,l.memoizedProps);l=l.memoizedState;try{e.componentDidUpdate(n,l,e.__reactInternalSnapshotBeforeUpdate)}catch(i){ye(t,t.return,i)}}a&64&&tr(t),a&512&&An(t,t.return);break;case 3:if(lt(e,t),a&64&&(e=t.updateQueue,e!==null)){if(l=null,t.child!==null)switch(t.child.tag){case 27:case 5:l=t.child.stateNode;break;case 1:l=t.child.stateNode}try{ks(e,l)}catch(i){ye(t,t.return,i)}}break;case 27:l===null&&a&4&&ir(t);case 26:case 5:lt(e,t),l===null&&a&4&&nr(t),a&512&&An(t,t.return);break;case 12:lt(e,t);break;case 31:lt(e,t),a&4&&rr(e,t);break;case 13:lt(e,t),a&4&&dr(e,t),a&64&&(e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(t=Oh.bind(null,t),Wh(e,t))));break;case 22:if(a=t.memoizedState!==null||Pl,!a){l=l!==null&&l.memoizedState!==null||Le,n=Pl;var u=Le;Pl=a,(Le=l)&&!u?tt(e,t,(t.subtreeFlags&8772)!==0):lt(e,t),Pl=n,Le=u}break;case 30:break;default:lt(e,t)}}function sr(e){var l=e.alternate;l!==null&&(e.alternate=null,sr(l)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(l=e.stateNode,l!==null&&hi(l)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var _e=null,nl=!1;function et(e,l,t){for(t=t.child;t!==null;)or(e,l,t),t=t.sibling}function or(e,l,t){if(sl&&typeof sl.onCommitFiberUnmount=="function")try{sl.onCommitFiberUnmount(Ql,t)}catch{}switch(t.tag){case 26:Le||Rl(t,l),et(e,l,t),t.memoizedState?t.memoizedState.count--:t.stateNode&&(t=t.stateNode,t.parentNode.removeChild(t));break;case 27:Le||Rl(t,l);var a=_e,n=nl;Ct(t.type)&&(_e=t.stateNode,nl=!1),et(e,l,t),Dn(t.stateNode),_e=a,nl=n;break;case 5:Le||Rl(t,l);case 6:if(a=_e,n=nl,_e=null,et(e,l,t),_e=a,nl=n,_e!==null)if(nl)try{(_e.nodeType===9?_e.body:_e.nodeName==="HTML"?_e.ownerDocument.body:_e).removeChild(t.stateNode)}catch(u){ye(t,l,u)}else try{_e.removeChild(t.stateNode)}catch(u){ye(t,l,u)}break;case 18:_e!==null&&(nl?(e=_e,td(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,t.stateNode),wa(e)):td(_e,t.stateNode));break;case 4:a=_e,n=nl,_e=t.stateNode.containerInfo,nl=!0,et(e,l,t),_e=a,nl=n;break;case 0:case 11:case 14:case 15:pt(2,t,l),Le||pt(4,t,l),et(e,l,t);break;case 1:Le||(Rl(t,l),a=t.stateNode,typeof a.componentWillUnmount=="function"&&ar(t,l,a)),et(e,l,t);break;case 21:et(e,l,t);break;case 22:Le=(a=Le)||t.memoizedState!==null,et(e,l,t),Le=a;break;default:et(e,l,t)}}function rr(e,l){if(l.memoizedState===null&&(e=l.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wa(e)}catch(t){ye(l,l.return,t)}}}function dr(e,l){if(l.memoizedState===null&&(e=l.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wa(e)}catch(t){ye(l,l.return,t)}}function Th(e){switch(e.tag){case 31:case 13:case 19:var l=e.stateNode;return l===null&&(l=e.stateNode=new cr),l;case 22:return e=e.stateNode,l=e._retryCache,l===null&&(l=e._retryCache=new cr),l;default:throw Error(d(435,e.tag))}}function Uu(e,l){var t=Th(e);l.forEach(function(a){if(!t.has(a)){t.add(a);var n=_h.bind(null,e,a);a.then(n,n)}})}function ul(e,l){var t=l.deletions;if(t!==null)for(var a=0;a<t.length;a++){var n=t[a],u=e,i=l,c=i;e:for(;c!==null;){switch(c.tag){case 27:if(Ct(c.type)){_e=c.stateNode,nl=!1;break e}break;case 5:_e=c.stateNode,nl=!1;break e;case 3:case 4:_e=c.stateNode.containerInfo,nl=!0;break e}c=c.return}if(_e===null)throw Error(d(160));or(u,i,n),_e=null,nl=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)mr(l,e),l=l.sibling}var Dl=null;function mr(e,l){var t=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(l,e),il(e),a&4&&(pt(3,e,e.return),Tn(3,e),pt(5,e,e.return));break;case 1:ul(l,e),il(e),a&512&&(Le||t===null||Rl(t,t.return)),a&64&&Pl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(t=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=t===null?a:t.concat(a))));break;case 26:var n=Dl;if(ul(l,e),il(e),a&512&&(Le||t===null||Rl(t,t.return)),a&4){var u=t!==null?t.memoizedState:null;if(a=e.memoizedState,t===null)if(a===null)if(e.stateNode===null){e:{a=e.type,t=e.memoizedProps,n=n.ownerDocument||n;l:switch(a){case"title":u=n.getElementsByTagName("title")[0],(!u||u[Ja]||u[ke]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(a),n.head.insertBefore(u,n.querySelector("head > title"))),We(u,a,t),u[ke]=e,Xe(u),a=u;break e;case"link":var i=md("link","href",n).get(a+(t.href||""));if(i){for(var c=0;c<i.length;c++)if(u=i[c],u.getAttribute("href")===(t.href==null||t.href===""?null:t.href)&&u.getAttribute("rel")===(t.rel==null?null:t.rel)&&u.getAttribute("title")===(t.title==null?null:t.title)&&u.getAttribute("crossorigin")===(t.crossOrigin==null?null:t.crossOrigin)){i.splice(c,1);break l}}u=n.createElement(a),We(u,a,t),n.head.appendChild(u);break;case"meta":if(i=md("meta","content",n).get(a+(t.content||""))){for(c=0;c<i.length;c++)if(u=i[c],u.getAttribute("content")===(t.content==null?null:""+t.content)&&u.getAttribute("name")===(t.name==null?null:t.name)&&u.getAttribute("property")===(t.property==null?null:t.property)&&u.getAttribute("http-equiv")===(t.httpEquiv==null?null:t.httpEquiv)&&u.getAttribute("charset")===(t.charSet==null?null:t.charSet)){i.splice(c,1);break l}}u=n.createElement(a),We(u,a,t),n.head.appendChild(u);break;default:throw Error(d(468,a))}u[ke]=e,Xe(u),a=u}e.stateNode=a}else hd(n,e.type,e.stateNode);else e.stateNode=dd(n,a,e.memoizedProps);else u!==a?(u===null?t.stateNode!==null&&(t=t.stateNode,t.parentNode.removeChild(t)):u.count--,a===null?hd(n,e.type,e.stateNode):dd(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&wc(e,e.memoizedProps,t.memoizedProps)}break;case 27:ul(l,e),il(e),a&512&&(Le||t===null||Rl(t,t.return)),t!==null&&a&4&&wc(e,e.memoizedProps,t.memoizedProps);break;case 5:if(ul(l,e),il(e),a&512&&(Le||t===null||Rl(t,t.return)),e.flags&32){n=e.stateNode;try{na(n,"")}catch(R){ye(e,e.return,R)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,wc(e,n,t!==null?t.memoizedProps:n)),a&1024&&(Bc=!0);break;case 6:if(ul(l,e),il(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,t=e.stateNode;try{t.nodeValue=a}catch(R){ye(e,e.return,R)}}break;case 3:if(Ju=null,n=Dl,Dl=Ku(l.containerInfo),ul(l,e),Dl=n,il(e),a&4&&t!==null&&t.memoizedState.isDehydrated)try{wa(l.containerInfo)}catch(R){ye(e,e.return,R)}Bc&&(Bc=!1,hr(e));break;case 4:a=Dl,Dl=Ku(e.stateNode.containerInfo),ul(l,e),il(e),Dl=a;break;case 12:ul(l,e),il(e);break;case 31:ul(l,e),il(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uu(e,a)));break;case 13:ul(l,e),il(e),e.child.flags&8192&&e.memoizedState!==null!=(t!==null&&t.memoizedState!==null)&&(Hu=Q()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uu(e,a)));break;case 22:n=e.memoizedState!==null;var s=t!==null&&t.memoizedState!==null,g=Pl,T=Le;if(Pl=g||n,Le=T||s,ul(l,e),Le=T,Pl=g,il(e),a&8192)e:for(l=e.stateNode,l._visibility=n?l._visibility&-2:l._visibility|1,n&&(t===null||s||Pl||Le||Jt(e)),t=null,l=e;;){if(l.tag===5||l.tag===26){if(t===null){s=t=l;try{if(u=s.stateNode,n)i=u.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{c=s.stateNode;var N=s.memoizedProps.style,p=N!=null&&N.hasOwnProperty("display")?N.display:null;c.style.display=p==null||typeof p=="boolean"?"":(""+p).trim()}}catch(R){ye(s,s.return,R)}}}else if(l.tag===6){if(t===null){s=l;try{s.stateNode.nodeValue=n?"":s.memoizedProps}catch(R){ye(s,s.return,R)}}}else if(l.tag===18){if(t===null){s=l;try{var b=s.stateNode;n?ad(b,!0):ad(s.stateNode,!1)}catch(R){ye(s,s.return,R)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===e)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break e;for(;l.sibling===null;){if(l.return===null||l.return===e)break e;t===l&&(t=null),l=l.return}t===l&&(t=null),l.sibling.return=l.return,l=l.sibling}a&4&&(a=e.updateQueue,a!==null&&(t=a.retryQueue,t!==null&&(a.retryQueue=null,Uu(e,t))));break;case 19:ul(l,e),il(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Uu(e,a)));break;case 30:break;case 21:break;default:ul(l,e),il(e)}}function il(e){var l=e.flags;if(l&2){try{for(var t,a=e.return;a!==null;){if(ur(a)){t=a;break}a=a.return}if(t==null)throw Error(d(160));switch(t.tag){case 27:var n=t.stateNode,u=Rc(e);Du(e,u,n);break;case 5:var i=t.stateNode;t.flags&32&&(na(i,""),t.flags&=-33);var c=Rc(e);Du(e,c,i);break;case 3:case 4:var s=t.stateNode.containerInfo,g=Rc(e);qc(e,g,s);break;default:throw Error(d(161))}}catch(T){ye(e,e.return,T)}e.flags&=-3}l&4096&&(e.flags&=-4097)}function hr(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var l=e;hr(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),e=e.sibling}}function lt(e,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)fr(e,l.alternate,l),l=l.sibling}function Jt(e){for(e=e.child;e!==null;){var l=e;switch(l.tag){case 0:case 11:case 14:case 15:pt(4,l,l.return),Jt(l);break;case 1:Rl(l,l.return);var t=l.stateNode;typeof t.componentWillUnmount=="function"&&ar(l,l.return,t),Jt(l);break;case 27:Dn(l.stateNode);case 26:case 5:Rl(l,l.return),Jt(l);break;case 22:l.memoizedState===null&&Jt(l);break;case 30:Jt(l);break;default:Jt(l)}e=e.sibling}}function tt(e,l,t){for(t=t&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var a=l.alternate,n=e,u=l,i=u.flags;switch(u.tag){case 0:case 11:case 15:tt(n,u,t),Tn(4,u);break;case 1:if(tt(n,u,t),a=u,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(g){ye(a,a.return,g)}if(a=u,n=a.updateQueue,n!==null){var c=a.stateNode;try{var s=n.shared.hiddenCallbacks;if(s!==null)for(n.shared.hiddenCallbacks=null,n=0;n<s.length;n++)Zs(s[n],c)}catch(g){ye(a,a.return,g)}}t&&i&64&&tr(u),An(u,u.return);break;case 27:ir(u);case 26:case 5:tt(n,u,t),t&&a===null&&i&4&&nr(u),An(u,u.return);break;case 12:tt(n,u,t);break;case 31:tt(n,u,t),t&&i&4&&rr(n,u);break;case 13:tt(n,u,t),t&&i&4&&dr(n,u);break;case 22:u.memoizedState===null&&tt(n,u,t),An(u,u.return);break;case 30:break;default:tt(n,u,t)}l=l.sibling}}function Lc(e,l){var t=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),e=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),e!==t&&(e!=null&&e.refCount++,t!=null&&fn(t))}function Yc(e,l){e=null,l.alternate!==null&&(e=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==e&&(l.refCount++,e!=null&&fn(e))}function Ul(e,l,t,a){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)vr(e,l,t,a),l=l.sibling}function vr(e,l,t,a){var n=l.flags;switch(l.tag){case 0:case 11:case 15:Ul(e,l,t,a),n&2048&&Tn(9,l);break;case 1:Ul(e,l,t,a);break;case 3:Ul(e,l,t,a),n&2048&&(e=null,l.alternate!==null&&(e=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==e&&(l.refCount++,e!=null&&fn(e)));break;case 12:if(n&2048){Ul(e,l,t,a),e=l.stateNode;try{var u=l.memoizedProps,i=u.id,c=u.onPostCommit;typeof c=="function"&&c(i,l.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){ye(l,l.return,s)}}else Ul(e,l,t,a);break;case 31:Ul(e,l,t,a);break;case 13:Ul(e,l,t,a);break;case 23:break;case 22:u=l.stateNode,i=l.alternate,l.memoizedState!==null?u._visibility&2?Ul(e,l,t,a):zn(e,l):u._visibility&2?Ul(e,l,t,a):(u._visibility|=2,xa(e,l,t,a,(l.subtreeFlags&10256)!==0||!1)),n&2048&&Lc(i,l);break;case 24:Ul(e,l,t,a),n&2048&&Yc(l.alternate,l);break;default:Ul(e,l,t,a)}}function xa(e,l,t,a,n){for(n=n&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var u=e,i=l,c=t,s=a,g=i.flags;switch(i.tag){case 0:case 11:case 15:xa(u,i,c,s,n),Tn(8,i);break;case 23:break;case 22:var T=i.stateNode;i.memoizedState!==null?T._visibility&2?xa(u,i,c,s,n):zn(u,i):(T._visibility|=2,xa(u,i,c,s,n)),n&&g&2048&&Lc(i.alternate,i);break;case 24:xa(u,i,c,s,n),n&&g&2048&&Yc(i.alternate,i);break;default:xa(u,i,c,s,n)}l=l.sibling}}function zn(e,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var t=e,a=l,n=a.flags;switch(a.tag){case 22:zn(t,a),n&2048&&Lc(a.alternate,a);break;case 24:zn(t,a),n&2048&&Yc(a.alternate,a);break;default:zn(t,a)}l=l.sibling}}var xn=8192;function Ca(e,l,t){if(e.subtreeFlags&xn)for(e=e.child;e!==null;)yr(e,l,t),e=e.sibling}function yr(e,l,t){switch(e.tag){case 26:Ca(e,l,t),e.flags&xn&&e.memoizedState!==null&&cv(t,Dl,e.memoizedState,e.memoizedProps);break;case 5:Ca(e,l,t);break;case 3:case 4:var a=Dl;Dl=Ku(e.stateNode.containerInfo),Ca(e,l,t),Dl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=xn,xn=16777216,Ca(e,l,t),xn=a):Ca(e,l,t));break;default:Ca(e,l,t)}}function gr(e){var l=e.alternate;if(l!==null&&(e=l.child,e!==null)){l.child=null;do l=e.sibling,e.sibling=null,e=l;while(e!==null)}}function Cn(e){var l=e.deletions;if((e.flags&16)!==0){if(l!==null)for(var t=0;t<l.length;t++){var a=l[t];Ze=a,br(a,e)}gr(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)pr(e),e=e.sibling}function pr(e){switch(e.tag){case 0:case 11:case 15:Cn(e),e.flags&2048&&pt(9,e,e.return);break;case 3:Cn(e);break;case 12:Cn(e);break;case 22:var l=e.stateNode;e.memoizedState!==null&&l._visibility&2&&(e.return===null||e.return.tag!==13)?(l._visibility&=-3,Mu(e)):Cn(e);break;default:Cn(e)}}function Mu(e){var l=e.deletions;if((e.flags&16)!==0){if(l!==null)for(var t=0;t<l.length;t++){var a=l[t];Ze=a,br(a,e)}gr(e)}for(e=e.child;e!==null;){switch(l=e,l.tag){case 0:case 11:case 15:pt(8,l,l.return),Mu(l);break;case 22:t=l.stateNode,t._visibility&2&&(t._visibility&=-3,Mu(l));break;default:Mu(l)}e=e.sibling}}function br(e,l){for(;Ze!==null;){var t=Ze;switch(t.tag){case 0:case 11:case 15:pt(8,t,l);break;case 23:case 22:if(t.memoizedState!==null&&t.memoizedState.cachePool!==null){var a=t.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:fn(t.memoizedState.cache)}if(a=t.child,a!==null)a.return=t,Ze=a;else e:for(t=e;Ze!==null;){a=Ze;var n=a.sibling,u=a.return;if(sr(a),a===t){Ze=null;break e}if(n!==null){n.return=u,Ze=n;break e}Ze=u}}}var Ah={getCacheForType:function(e){var l=Ve(Re),t=l.data.get(e);return t===void 0&&(t=e(),l.data.set(e,t)),t},cacheSignal:function(){return Ve(Re).controller.signal}},zh=typeof WeakMap=="function"?WeakMap:Map,he=0,ze=null,te=null,ue=0,ve=0,vl=null,bt=!1,Na=!1,Qc=!1,at=0,Ue=0,St=0,Wt=0,Gc=0,yl=0,Ea=0,Nn=null,cl=null,Xc=!1,Hu=0,Sr=0,wu=1/0,Ru=null,Tt=null,Qe=0,At=null,ja=null,nt=0,Zc=0,kc=null,Tr=null,En=0,Kc=null;function gl(){return(he&2)!==0&&ue!==0?ue&-ue:m.T!==null?$c():Rf()}function Ar(){if(yl===0)if((ue&536870912)===0||ce){var e=Zn;Zn<<=1,(Zn&3932160)===0&&(Zn=262144),yl=e}else yl=536870912;return e=ml.current,e!==null&&(e.flags|=32),yl}function fl(e,l,t){(e===ze&&(ve===2||ve===9)||e.cancelPendingCommit!==null)&&(Oa(e,0),zt(e,ue,yl,!1)),Va(e,t),((he&2)===0||e!==ze)&&(e===ze&&((he&2)===0&&(Wt|=t),Ue===4&&zt(e,ue,yl,!1)),ql(e))}function zr(e,l,t){if((he&6)!==0)throw Error(d(327));var a=!t&&(l&127)===0&&(l&e.expiredLanes)===0||Ka(e,l),n=a?Nh(e,l):Jc(e,l,!0),u=a;do{if(n===0){Na&&!a&&zt(e,l,0,!1);break}else{if(t=e.current.alternate,u&&!xh(t)){n=Jc(e,l,!1),u=!1;continue}if(n===2){if(u=l,e.errorRecoveryDisabledLanes&u)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){l=i;e:{var c=e;n=Nn;var s=c.current.memoizedState.isDehydrated;if(s&&(Oa(c,i).flags|=256),i=Jc(c,i,!1),i!==2){if(Qc&&!s){c.errorRecoveryDisabledLanes|=u,Wt|=u,n=4;break e}u=cl,cl=n,u!==null&&(cl===null?cl=u:cl.push.apply(cl,u))}n=i}if(u=!1,n!==2)continue}}if(n===1){Oa(e,0),zt(e,l,0,!0);break}e:{switch(a=e,u=n,u){case 0:case 1:throw Error(d(345));case 4:if((l&4194048)!==l)break;case 6:zt(a,l,yl,!bt);break e;case 2:cl=null;break;case 3:case 5:break;default:throw Error(d(329))}if((l&62914560)===l&&(n=Hu+300-Q(),10<n)){if(zt(a,l,yl,!bt),Kn(a,0,!0)!==0)break e;nt=l,a.timeoutHandle=ed(xr.bind(null,a,t,cl,Ru,Xc,l,yl,Wt,Ea,bt,u,"Throttled",-0,0),n);break e}xr(a,t,cl,Ru,Xc,l,yl,Wt,Ea,bt,u,null,-0,0)}}break}while(!0);ql(e)}function xr(e,l,t,a,n,u,i,c,s,g,T,N,p,b){if(e.timeoutHandle=-1,N=l.subtreeFlags,N&8192||(N&16785408)===16785408){N={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xl},yr(l,u,N);var R=(u&62914560)===u?Hu-Q():(u&4194048)===u?Sr-Q():0;if(R=fv(N,R),R!==null){nt=u,e.cancelPendingCommit=R(Ur.bind(null,e,l,u,t,a,n,i,c,s,T,N,null,p,b)),zt(e,u,i,!g);return}}Ur(e,l,u,t,a,n,i,c,s)}function xh(e){for(var l=e;;){var t=l.tag;if((t===0||t===11||t===15)&&l.flags&16384&&(t=l.updateQueue,t!==null&&(t=t.stores,t!==null)))for(var a=0;a<t.length;a++){var n=t[a],u=n.getSnapshot;n=n.value;try{if(!rl(u(),n))return!1}catch{return!1}}if(t=l.child,l.subtreeFlags&16384&&t!==null)t.return=l,l=t;else{if(l===e)break;for(;l.sibling===null;){if(l.return===null||l.return===e)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function zt(e,l,t,a){l&=~Gc,l&=~Wt,e.suspendedLanes|=l,e.pingedLanes&=~l,a&&(e.warmLanes|=l),a=e.expirationTimes;for(var n=l;0<n;){var u=31-ol(n),i=1<<u;a[u]=-1,n&=~i}t!==0&&Mf(e,t,l)}function qu(){return(he&6)===0?(jn(0),!1):!0}function Vc(){if(te!==null){if(ve===0)var e=te.return;else e=te,Vl=Yt=null,sc(e),ba=null,on=0,e=te;for(;e!==null;)lr(e.alternate,e),e=e.return;te=null}}function Oa(e,l){var t=e.timeoutHandle;t!==-1&&(e.timeoutHandle=-1,Zh(t)),t=e.cancelPendingCommit,t!==null&&(e.cancelPendingCommit=null,t()),nt=0,Vc(),ze=e,te=t=kl(e.current,null),ue=l,ve=0,vl=null,bt=!1,Na=Ka(e,l),Qc=!1,Ea=yl=Gc=Wt=St=Ue=0,cl=Nn=null,Xc=!1,(l&8)!==0&&(l|=l&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=l;0<a;){var n=31-ol(a),u=1<<n;l|=e[n],a&=~u}return at=l,nu(),t}function Cr(e,l){W=null,m.H=pn,l===pa||l===du?(l=Ys(),ve=3):l===Fi?(l=Ys(),ve=4):ve=l===Cc?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,vl=l,te===null&&(Ue=1,Nu(e,Al(l,e.current)))}function Nr(){var e=ml.current;return e===null?!0:(ue&4194048)===ue?Nl===null:(ue&62914560)===ue||(ue&536870912)!==0?e===Nl:!1}function Er(){var e=m.H;return m.H=pn,e===null?pn:e}function jr(){var e=m.A;return m.A=Ah,e}function Bu(){Ue=4,bt||(ue&4194048)!==ue&&ml.current!==null||(Na=!0),(St&134217727)===0&&(Wt&134217727)===0||ze===null||zt(ze,ue,yl,!1)}function Jc(e,l,t){var a=he;he|=2;var n=Er(),u=jr();(ze!==e||ue!==l)&&(Ru=null,Oa(e,l)),l=!1;var i=Ue;e:do try{if(ve!==0&&te!==null){var c=te,s=vl;switch(ve){case 8:Vc(),i=6;break e;case 3:case 2:case 9:case 6:ml.current===null&&(l=!0);var g=ve;if(ve=0,vl=null,_a(e,c,s,g),t&&Na){i=0;break e}break;default:g=ve,ve=0,vl=null,_a(e,c,s,g)}}Ch(),i=Ue;break}catch(T){Cr(e,T)}while(!0);return l&&e.shellSuspendCounter++,Vl=Yt=null,he=a,m.H=n,m.A=u,te===null&&(ze=null,ue=0,nu()),i}function Ch(){for(;te!==null;)Or(te)}function Nh(e,l){var t=he;he|=2;var a=Er(),n=jr();ze!==e||ue!==l?(Ru=null,wu=Q()+500,Oa(e,l)):Na=Ka(e,l);e:do try{if(ve!==0&&te!==null){l=te;var u=vl;l:switch(ve){case 1:ve=0,vl=null,_a(e,l,u,1);break;case 2:case 9:if(Bs(u)){ve=0,vl=null,_r(l);break}l=function(){ve!==2&&ve!==9||ze!==e||(ve=7),ql(e)},u.then(l,l);break e;case 3:ve=7;break e;case 4:ve=5;break e;case 7:Bs(u)?(ve=0,vl=null,_r(l)):(ve=0,vl=null,_a(e,l,u,7));break;case 5:var i=null;switch(te.tag){case 26:i=te.memoizedState;case 5:case 27:var c=te;if(i?vd(i):c.stateNode.complete){ve=0,vl=null;var s=c.sibling;if(s!==null)te=s;else{var g=c.return;g!==null?(te=g,Lu(g)):te=null}break l}}ve=0,vl=null,_a(e,l,u,5);break;case 6:ve=0,vl=null,_a(e,l,u,6);break;case 8:Vc(),Ue=6;break e;default:throw Error(d(462))}}Eh();break}catch(T){Cr(e,T)}while(!0);return Vl=Yt=null,m.H=a,m.A=n,he=t,te!==null?0:(ze=null,ue=0,nu(),Ue)}function Eh(){for(;te!==null&&!ci();)Or(te)}function Or(e){var l=Po(e.alternate,e,at);e.memoizedProps=e.pendingProps,l===null?Lu(e):te=l}function _r(e){var l=e,t=l.alternate;switch(l.tag){case 15:case 0:l=Vo(t,l,l.pendingProps,l.type,void 0,ue);break;case 11:l=Vo(t,l,l.pendingProps,l.type.render,l.ref,ue);break;case 5:sc(l);default:lr(t,l),l=te=Es(l,at),l=Po(t,l,at)}e.memoizedProps=e.pendingProps,l===null?Lu(e):te=l}function _a(e,l,t,a){Vl=Yt=null,sc(l),ba=null,on=0;var n=l.return;try{if(vh(e,n,l,t,ue)){Ue=1,Nu(e,Al(t,e.current)),te=null;return}}catch(u){if(n!==null)throw te=n,u;Ue=1,Nu(e,Al(t,e.current)),te=null;return}l.flags&32768?(ce||a===1?e=!0:Na||(ue&536870912)!==0?e=!1:(bt=e=!0,(a===2||a===9||a===3||a===6)&&(a=ml.current,a!==null&&a.tag===13&&(a.flags|=16384))),Dr(l,e)):Lu(l)}function Lu(e){var l=e;do{if((l.flags&32768)!==0){Dr(l,bt);return}e=l.return;var t=ph(l.alternate,l,at);if(t!==null){te=t;return}if(l=l.sibling,l!==null){te=l;return}te=l=e}while(l!==null);Ue===0&&(Ue=5)}function Dr(e,l){do{var t=bh(e.alternate,e);if(t!==null){t.flags&=32767,te=t;return}if(t=e.return,t!==null&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!l&&(e=e.sibling,e!==null)){te=e;return}te=e=t}while(e!==null);Ue=6,te=null}function Ur(e,l,t,a,n,u,i,c,s){e.cancelPendingCommit=null;do Yu();while(Qe!==0);if((he&6)!==0)throw Error(d(327));if(l!==null){if(l===e.current)throw Error(d(177));if(u=l.lanes|l.childLanes,u|=Ri,im(e,t,u,i,c,s),e===ze&&(te=ze=null,ue=0),ja=l,At=e,nt=t,Zc=u,kc=n,Tr=a,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Dh(Yl,function(){return qr(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||a){a=m.T,m.T=null,n=A.p,A.p=2,i=he,he|=4;try{Sh(e,l,t)}finally{he=i,A.p=n,m.T=a}}Qe=1,Mr(),Hr(),wr()}}function Mr(){if(Qe===1){Qe=0;var e=At,l=ja,t=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||t){t=m.T,m.T=null;var a=A.p;A.p=2;var n=he;he|=4;try{mr(l,e);var u=cf,i=ps(e.containerInfo),c=u.focusedElem,s=u.selectionRange;if(i!==c&&c&&c.ownerDocument&&gs(c.ownerDocument.documentElement,c)){if(s!==null&&Di(c)){var g=s.start,T=s.end;if(T===void 0&&(T=g),"selectionStart"in c)c.selectionStart=g,c.selectionEnd=Math.min(T,c.value.length);else{var N=c.ownerDocument||document,p=N&&N.defaultView||window;if(p.getSelection){var b=p.getSelection(),R=c.textContent.length,X=Math.min(s.start,R),Se=s.end===void 0?X:Math.min(s.end,R);!b.extend&&X>Se&&(i=Se,Se=X,X=i);var h=ys(c,X),r=ys(c,Se);if(h&&r&&(b.rangeCount!==1||b.anchorNode!==h.node||b.anchorOffset!==h.offset||b.focusNode!==r.node||b.focusOffset!==r.offset)){var y=N.createRange();y.setStart(h.node,h.offset),b.removeAllRanges(),X>Se?(b.addRange(y),b.extend(r.node,r.offset)):(y.setEnd(r.node,r.offset),b.addRange(y))}}}}for(N=[],b=c;b=b.parentNode;)b.nodeType===1&&N.push({element:b,left:b.scrollLeft,top:b.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<N.length;c++){var C=N[c];C.element.scrollLeft=C.left,C.element.scrollTop=C.top}}$u=!!uf,cf=uf=null}finally{he=n,A.p=a,m.T=t}}e.current=l,Qe=2}}function Hr(){if(Qe===2){Qe=0;var e=At,l=ja,t=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||t){t=m.T,m.T=null;var a=A.p;A.p=2;var n=he;he|=4;try{fr(e,l.alternate,l)}finally{he=n,A.p=a,m.T=t}}Qe=3}}function wr(){if(Qe===4||Qe===3){Qe=0,M();var e=At,l=ja,t=nt,a=Tr;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Qe=5:(Qe=0,ja=At=null,Rr(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Tt=null),di(t),l=l.stateNode,sl&&typeof sl.onCommitFiberRoot=="function")try{sl.onCommitFiberRoot(Ql,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=m.T,n=A.p,A.p=2,m.T=null;try{for(var u=e.onRecoverableError,i=0;i<a.length;i++){var c=a[i];u(c.value,{componentStack:c.stack})}}finally{m.T=l,A.p=n}}(nt&3)!==0&&Yu(),ql(e),n=e.pendingLanes,(t&261930)!==0&&(n&42)!==0?e===Kc?En++:(En=0,Kc=e):En=0,jn(0)}}function Rr(e,l){(e.pooledCacheLanes&=l)===0&&(l=e.pooledCache,l!=null&&(e.pooledCache=null,fn(l)))}function Yu(){return Mr(),Hr(),wr(),qr()}function qr(){if(Qe!==5)return!1;var e=At,l=Zc;Zc=0;var t=di(nt),a=m.T,n=A.p;try{A.p=32>t?32:t,m.T=null,t=kc,kc=null;var u=At,i=nt;if(Qe=0,ja=At=null,nt=0,(he&6)!==0)throw Error(d(331));var c=he;if(he|=4,pr(u.current),vr(u,u.current,i,t),he=c,jn(0,!1),sl&&typeof sl.onPostCommitFiberRoot=="function")try{sl.onPostCommitFiberRoot(Ql,u)}catch{}return!0}finally{A.p=n,m.T=a,Rr(e,l)}}function Br(e,l,t){l=Al(t,l),l=xc(e.stateNode,l,2),e=vt(e,l,2),e!==null&&(Va(e,2),ql(e))}function ye(e,l,t){if(e.tag===3)Br(e,e,t);else for(;l!==null;){if(l.tag===3){Br(l,e,t);break}else if(l.tag===1){var a=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Tt===null||!Tt.has(a))){e=Al(t,e),t=Lo(2),a=vt(l,t,2),a!==null&&(Yo(t,a,l,e),Va(a,2),ql(a));break}}l=l.return}}function Wc(e,l,t){var a=e.pingCache;if(a===null){a=e.pingCache=new zh;var n=new Set;a.set(l,n)}else n=a.get(l),n===void 0&&(n=new Set,a.set(l,n));n.has(t)||(Qc=!0,n.add(t),e=jh.bind(null,e,l,t),l.then(e,e))}function jh(e,l,t){var a=e.pingCache;a!==null&&a.delete(l),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,ze===e&&(ue&t)===t&&(Ue===4||Ue===3&&(ue&62914560)===ue&&300>Q()-Hu?(he&2)===0&&Oa(e,0):Gc|=t,Ea===ue&&(Ea=0)),ql(e)}function Lr(e,l){l===0&&(l=Uf()),e=qt(e,l),e!==null&&(Va(e,l),ql(e))}function Oh(e){var l=e.memoizedState,t=0;l!==null&&(t=l.retryLane),Lr(e,t)}function _h(e,l){var t=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(t=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(l),Lr(e,t)}function Dh(e,l){return Xa(e,l)}var Qu=null,Da=null,Ic=!1,Gu=!1,Fc=!1,xt=0;function ql(e){e!==Da&&e.next===null&&(Da===null?Qu=Da=e:Da=Da.next=e),Gu=!0,Ic||(Ic=!0,Mh())}function jn(e,l){if(!Fc&&Gu){Fc=!0;do for(var t=!1,a=Qu;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,c=a.pingedLanes;u=(1<<31-ol(42|e)+1)-1,u&=n&~(i&~c),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(t=!0,Xr(a,u))}else u=ue,u=Kn(a,a===ze?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Ka(a,u)||(t=!0,Xr(a,u));a=a.next}while(t);Fc=!1}}function Uh(){Yr()}function Yr(){Gu=Ic=!1;var e=0;xt!==0&&Xh()&&(e=xt);for(var l=Q(),t=null,a=Qu;a!==null;){var n=a.next,u=Qr(a,l);u===0?(a.next=null,t===null?Qu=n:t.next=n,n===null&&(Da=t)):(t=a,(e!==0||(u&3)!==0)&&(Gu=!0)),a=n}Qe!==0&&Qe!==5||jn(e),xt!==0&&(xt=0)}function Qr(e,l){for(var t=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var i=31-ol(u),c=1<<i,s=n[i];s===-1?((c&t)===0||(c&a)!==0)&&(n[i]=um(c,l)):s<=l&&(e.expiredLanes|=c),u&=~c}if(l=ze,t=ue,t=Kn(e,e===l?t:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,t===0||e===l&&(ve===2||ve===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Za(a),e.callbackNode=null,e.callbackPriority=0;if((t&3)===0||Ka(e,t)){if(l=t&-t,l===e.callbackPriority)return l;switch(a!==null&&Za(a),di(t)){case 2:case 8:t=pl;break;case 32:t=Yl;break;case 268435456:t=Gn;break;default:t=Yl}return a=Gr.bind(null,e),t=Xa(t,a),e.callbackPriority=l,e.callbackNode=t,l}return a!==null&&a!==null&&Za(a),e.callbackPriority=2,e.callbackNode=null,2}function Gr(e,l){if(Qe!==0&&Qe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var t=e.callbackNode;if(Yu()&&e.callbackNode!==t)return null;var a=ue;return a=Kn(e,e===ze?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(zr(e,a,l),Qr(e,Q()),e.callbackNode!=null&&e.callbackNode===t?Gr.bind(null,e):null)}function Xr(e,l){if(Yu())return null;zr(e,l,!0)}function Mh(){kh(function(){(he&6)!==0?Xa(xe,Uh):Yr()})}function $c(){if(xt===0){var e=ya;e===0&&(e=Xn,Xn<<=1,(Xn&261888)===0&&(Xn=256)),xt=e}return xt}function Zr(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:In(""+e)}function kr(e,l){var t=l.ownerDocument.createElement("input");return t.name=l.name,t.value=l.value,e.id&&t.setAttribute("form",e.id),l.parentNode.insertBefore(t,l),e=new FormData(e),t.parentNode.removeChild(t),e}function Hh(e,l,t,a,n){if(l==="submit"&&t&&t.stateNode===n){var u=Zr((n[tl]||null).action),i=a.submitter;i&&(l=(l=i[tl]||null)?Zr(l.formAction):i.getAttribute("formAction"),l!==null&&(u=l,i=null));var c=new eu("action","action",null,a,n);e.push({event:c,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(xt!==0){var s=i?kr(n,i):new FormData(n);pc(t,{pending:!0,data:s,method:n.method,action:u},null,s)}}else typeof u=="function"&&(c.preventDefault(),s=i?kr(n,i):new FormData(n),pc(t,{pending:!0,data:s,method:n.method,action:u},u,s))},currentTarget:n}]})}}for(var Pc=0;Pc<wi.length;Pc++){var ef=wi[Pc],wh=ef.toLowerCase(),Rh=ef[0].toUpperCase()+ef.slice(1);_l(wh,"on"+Rh)}_l(Ts,"onAnimationEnd"),_l(As,"onAnimationIteration"),_l(zs,"onAnimationStart"),_l("dblclick","onDoubleClick"),_l("focusin","onFocus"),_l("focusout","onBlur"),_l($m,"onTransitionRun"),_l(Pm,"onTransitionStart"),_l(eh,"onTransitionCancel"),_l(xs,"onTransitionEnd"),ta("onMouseEnter",["mouseout","mouseover"]),ta("onMouseLeave",["mouseout","mouseover"]),ta("onPointerEnter",["pointerout","pointerover"]),ta("onPointerLeave",["pointerout","pointerover"]),Mt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var On="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(" "),qh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(On));function Kr(e,l){l=(l&4)!==0;for(var t=0;t<e.length;t++){var a=e[t],n=a.event;a=a.listeners;e:{var u=void 0;if(l)for(var i=a.length-1;0<=i;i--){var c=a[i],s=c.instance,g=c.currentTarget;if(c=c.listener,s!==u&&n.isPropagationStopped())break e;u=c,n.currentTarget=g;try{u(n)}catch(T){au(T)}n.currentTarget=null,u=s}else for(i=0;i<a.length;i++){if(c=a[i],s=c.instance,g=c.currentTarget,c=c.listener,s!==u&&n.isPropagationStopped())break e;u=c,n.currentTarget=g;try{u(n)}catch(T){au(T)}n.currentTarget=null,u=s}}}}function ae(e,l){var t=l[mi];t===void 0&&(t=l[mi]=new Set);var a=e+"__bubble";t.has(a)||(Vr(l,e,2,!1),t.add(a))}function lf(e,l,t){var a=0;l&&(a|=4),Vr(t,e,a,l)}var Xu="_reactListening"+Math.random().toString(36).slice(2);function tf(e){if(!e[Xu]){e[Xu]=!0,Lf.forEach(function(t){t!=="selectionchange"&&(qh.has(t)||lf(t,!1,e),lf(t,!0,e))});var l=e.nodeType===9?e:e.ownerDocument;l===null||l[Xu]||(l[Xu]=!0,lf("selectionchange",!1,l))}}function Vr(e,l,t,a){switch(Ad(l)){case 2:var n=rv;break;case 8:n=dv;break;default:n=pf}t=n.bind(null,l,t,e),n=void 0,!Ai||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(l,t,{capture:!0,passive:n}):e.addEventListener(l,t,!0):n!==void 0?e.addEventListener(l,t,{passive:n}):e.addEventListener(l,t,!1)}function af(e,l,t,a,n){var u=a;if((l&1)===0&&(l&2)===0&&a!==null)e:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var c=a.stateNode.containerInfo;if(c===n)break;if(i===4)for(i=a.return;i!==null;){var s=i.tag;if((s===3||s===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;c!==null;){if(i=Pt(c),i===null)return;if(s=i.tag,s===5||s===6||s===26||s===27){a=u=i;continue e}c=c.parentNode}}a=a.return}Ff(function(){var g=u,T=Si(t),N=[];e:{var p=Cs.get(e);if(p!==void 0){var b=eu,R=e;switch(e){case"keypress":if($n(t)===0)break e;case"keydown":case"keyup":b=_m;break;case"focusin":R="focus",b=Ni;break;case"focusout":R="blur",b=Ni;break;case"beforeblur":case"afterblur":b=Ni;break;case"click":if(t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=es;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=pm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=Mm;break;case Ts:case As:case zs:b=Tm;break;case xs:b=wm;break;case"scroll":case"scrollend":b=ym;break;case"wheel":b=qm;break;case"copy":case"cut":case"paste":b=zm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=ts;break;case"toggle":case"beforetoggle":b=Lm}var X=(l&4)!==0,Se=!X&&(e==="scroll"||e==="scrollend"),h=X?p!==null?p+"Capture":null:p;X=[];for(var r=g,y;r!==null;){var C=r;if(y=C.stateNode,C=C.tag,C!==5&&C!==26&&C!==27||y===null||h===null||(C=Ia(r,h),C!=null&&X.push(_n(r,C,y))),Se)break;r=r.return}0<X.length&&(p=new b(p,R,null,t,T),N.push({event:p,listeners:X}))}}if((l&7)===0){e:{if(p=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",p&&t!==bi&&(R=t.relatedTarget||t.fromElement)&&(Pt(R)||R[$t]))break e;if((b||p)&&(p=T.window===T?T:(p=T.ownerDocument)?p.defaultView||p.parentWindow:window,b?(R=t.relatedTarget||t.toElement,b=g,R=R?Pt(R):null,R!==null&&(Se=O(R),X=R.tag,R!==Se||X!==5&&X!==27&&X!==6)&&(R=null)):(b=null,R=g),b!==R)){if(X=es,C="onMouseLeave",h="onMouseEnter",r="mouse",(e==="pointerout"||e==="pointerover")&&(X=ts,C="onPointerLeave",h="onPointerEnter",r="pointer"),Se=b==null?p:Wa(b),y=R==null?p:Wa(R),p=new X(C,r+"leave",b,t,T),p.target=Se,p.relatedTarget=y,C=null,Pt(T)===g&&(X=new X(h,r+"enter",R,t,T),X.target=y,X.relatedTarget=Se,C=X),Se=C,b&&R)l:{for(X=Bh,h=b,r=R,y=0,C=h;C;C=X(C))y++;C=0;for(var L=r;L;L=X(L))C++;for(;0<y-C;)h=X(h),y--;for(;0<C-y;)r=X(r),C--;for(;y--;){if(h===r||r!==null&&h===r.alternate){X=h;break l}h=X(h),r=X(r)}X=null}else X=null;b!==null&&Jr(N,p,b,X,!1),R!==null&&Se!==null&&Jr(N,Se,R,X,!0)}}e:{if(p=g?Wa(g):window,b=p.nodeName&&p.nodeName.toLowerCase(),b==="select"||b==="input"&&p.type==="file")var re=os;else if(fs(p))if(rs)re=Wm;else{re=Vm;var B=Km}else b=p.nodeName,!b||b.toLowerCase()!=="input"||p.type!=="checkbox"&&p.type!=="radio"?g&&pi(g.elementType)&&(re=os):re=Jm;if(re&&(re=re(e,g))){ss(N,re,t,T);break e}B&&B(e,p,g),e==="focusout"&&g&&p.type==="number"&&g.memoizedProps.value!=null&&gi(p,"number",p.value)}switch(B=g?Wa(g):window,e){case"focusin":(fs(B)||B.contentEditable==="true")&&(fa=B,Ui=g,nn=null);break;case"focusout":nn=Ui=fa=null;break;case"mousedown":Mi=!0;break;case"contextmenu":case"mouseup":case"dragend":Mi=!1,bs(N,t,T);break;case"selectionchange":if(Fm)break;case"keydown":case"keyup":bs(N,t,T)}var I;if(ji)e:{switch(e){case"compositionstart":var ie="onCompositionStart";break e;case"compositionend":ie="onCompositionEnd";break e;case"compositionupdate":ie="onCompositionUpdate";break e}ie=void 0}else ca?is(e,t)&&(ie="onCompositionEnd"):e==="keydown"&&t.keyCode===229&&(ie="onCompositionStart");ie&&(as&&t.locale!=="ko"&&(ca||ie!=="onCompositionStart"?ie==="onCompositionEnd"&&ca&&(I=$f()):(ft=T,zi="value"in ft?ft.value:ft.textContent,ca=!0)),B=Zu(g,ie),0<B.length&&(ie=new ls(ie,e,null,t,T),N.push({event:ie,listeners:B}),I?ie.data=I:(I=cs(t),I!==null&&(ie.data=I)))),(I=Qm?Gm(e,t):Xm(e,t))&&(ie=Zu(g,"onBeforeInput"),0<ie.length&&(B=new ls("onBeforeInput","beforeinput",null,t,T),N.push({event:B,listeners:ie}),B.data=I)),Hh(N,e,g,t,T)}Kr(N,l)})}function _n(e,l,t){return{instance:e,listener:l,currentTarget:t}}function Zu(e,l){for(var t=l+"Capture",a=[];e!==null;){var n=e,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=Ia(e,t),n!=null&&a.unshift(_n(e,n,u)),n=Ia(e,l),n!=null&&a.push(_n(e,n,u))),e.tag===3)return a;e=e.return}return[]}function Bh(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Jr(e,l,t,a,n){for(var u=l._reactName,i=[];t!==null&&t!==a;){var c=t,s=c.alternate,g=c.stateNode;if(c=c.tag,s!==null&&s===a)break;c!==5&&c!==26&&c!==27||g===null||(s=g,n?(g=Ia(t,u),g!=null&&i.unshift(_n(t,g,s))):n||(g=Ia(t,u),g!=null&&i.push(_n(t,g,s)))),t=t.return}i.length!==0&&e.push({event:l,listeners:i})}var Lh=/\r\n?/g,Yh=/\u0000|\uFFFD/g;function Wr(e){return(typeof e=="string"?e:""+e).replace(Lh,`
49
- `).replace(Yh,"")}function Ir(e,l){return l=Wr(l),Wr(e)===l}function be(e,l,t,a,n,u){switch(t){case"children":typeof a=="string"?l==="body"||l==="textarea"&&a===""||na(e,a):(typeof a=="number"||typeof a=="bigint")&&l!=="body"&&na(e,""+a);break;case"className":Jn(e,"class",a);break;case"tabIndex":Jn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Jn(e,t,a);break;case"style":Wf(e,a,u);break;case"data":if(l!=="object"){Jn(e,"data",a);break}case"src":case"href":if(a===""&&(l!=="a"||t!=="href")){e.removeAttribute(t);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(t);break}a=In(""+a),e.setAttribute(t,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(t,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(t==="formAction"?(l!=="input"&&be(e,l,"name",n.name,n,null),be(e,l,"formEncType",n.formEncType,n,null),be(e,l,"formMethod",n.formMethod,n,null),be(e,l,"formTarget",n.formTarget,n,null)):(be(e,l,"encType",n.encType,n,null),be(e,l,"method",n.method,n,null),be(e,l,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(t);break}a=In(""+a),e.setAttribute(t,a);break;case"onClick":a!=null&&(e.onclick=Xl);break;case"onScroll":a!=null&&ae("scroll",e);break;case"onScrollEnd":a!=null&&ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(t=a.__html,t!=null){if(n.children!=null)throw Error(d(60));e.innerHTML=t}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}t=In(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(t,""+a):e.removeAttribute(t);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(t,""):e.removeAttribute(t);break;case"capture":case"download":a===!0?e.setAttribute(t,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(t,a):e.removeAttribute(t);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(t,a):e.removeAttribute(t);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(t):e.setAttribute(t,a);break;case"popover":ae("beforetoggle",e),ae("toggle",e),Vn(e,"popover",a);break;case"xlinkActuate":Gl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Gl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Gl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Gl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Gl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Gl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Vn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(t=hm.get(t)||t,Vn(e,t,a))}}function nf(e,l,t,a,n,u){switch(t){case"style":Wf(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(t=a.__html,t!=null){if(n.children!=null)throw Error(d(60));e.innerHTML=t}}break;case"children":typeof a=="string"?na(e,a):(typeof a=="number"||typeof a=="bigint")&&na(e,""+a);break;case"onScroll":a!=null&&ae("scroll",e);break;case"onScrollEnd":a!=null&&ae("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Xl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yf.hasOwnProperty(t))e:{if(t[0]==="o"&&t[1]==="n"&&(n=t.endsWith("Capture"),l=t.slice(2,n?t.length-7:void 0),u=e[tl]||null,u=u!=null?u[t]:null,typeof u=="function"&&e.removeEventListener(l,u,n),typeof a=="function")){typeof u!="function"&&u!==null&&(t in e?e[t]=null:e.hasAttribute(t)&&e.removeAttribute(t)),e.addEventListener(l,a,n);break e}t in e?e[t]=a:a===!0?e.setAttribute(t,""):Vn(e,t,a)}}}function We(e,l,t){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ae("error",e),ae("load",e);var a=!1,n=!1,u;for(u in t)if(t.hasOwnProperty(u)){var i=t[u];if(i!=null)switch(u){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,l));default:be(e,l,u,i,t,null)}}n&&be(e,l,"srcSet",t.srcSet,t,null),a&&be(e,l,"src",t.src,t,null);return;case"input":ae("invalid",e);var c=u=i=n=null,s=null,g=null;for(a in t)if(t.hasOwnProperty(a)){var T=t[a];if(T!=null)switch(a){case"name":n=T;break;case"type":i=T;break;case"checked":s=T;break;case"defaultChecked":g=T;break;case"value":u=T;break;case"defaultValue":c=T;break;case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(d(137,l));break;default:be(e,l,a,T,t,null)}}kf(e,u,c,s,g,i,n,!1);return;case"select":ae("invalid",e),a=i=u=null;for(n in t)if(t.hasOwnProperty(n)&&(c=t[n],c!=null))switch(n){case"value":u=c;break;case"defaultValue":i=c;break;case"multiple":a=c;default:be(e,l,n,c,t,null)}l=u,t=i,e.multiple=!!a,l!=null?aa(e,!!a,l,!1):t!=null&&aa(e,!!a,t,!0);return;case"textarea":ae("invalid",e),u=n=a=null;for(i in t)if(t.hasOwnProperty(i)&&(c=t[i],c!=null))switch(i){case"value":a=c;break;case"defaultValue":n=c;break;case"children":u=c;break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(d(91));break;default:be(e,l,i,c,t,null)}Vf(e,a,n,u);return;case"option":for(s in t)if(t.hasOwnProperty(s)&&(a=t[s],a!=null))switch(s){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:be(e,l,s,a,t,null)}return;case"dialog":ae("beforetoggle",e),ae("toggle",e),ae("cancel",e),ae("close",e);break;case"iframe":case"object":ae("load",e);break;case"video":case"audio":for(a=0;a<On.length;a++)ae(On[a],e);break;case"image":ae("error",e),ae("load",e);break;case"details":ae("toggle",e);break;case"embed":case"source":case"link":ae("error",e),ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(g in t)if(t.hasOwnProperty(g)&&(a=t[g],a!=null))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,l));default:be(e,l,g,a,t,null)}return;default:if(pi(l)){for(T in t)t.hasOwnProperty(T)&&(a=t[T],a!==void 0&&nf(e,l,T,a,t,void 0));return}}for(c in t)t.hasOwnProperty(c)&&(a=t[c],a!=null&&be(e,l,c,a,t,null))}function Qh(e,l,t,a){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,u=null,i=null,c=null,s=null,g=null,T=null;for(b in t){var N=t[b];if(t.hasOwnProperty(b)&&N!=null)switch(b){case"checked":break;case"value":break;case"defaultValue":s=N;default:a.hasOwnProperty(b)||be(e,l,b,null,a,N)}}for(var p in a){var b=a[p];if(N=t[p],a.hasOwnProperty(p)&&(b!=null||N!=null))switch(p){case"type":u=b;break;case"name":n=b;break;case"checked":g=b;break;case"defaultChecked":T=b;break;case"value":i=b;break;case"defaultValue":c=b;break;case"children":case"dangerouslySetInnerHTML":if(b!=null)throw Error(d(137,l));break;default:b!==N&&be(e,l,p,b,a,N)}}yi(e,i,c,s,g,T,u,n);return;case"select":b=i=c=p=null;for(u in t)if(s=t[u],t.hasOwnProperty(u)&&s!=null)switch(u){case"value":break;case"multiple":b=s;default:a.hasOwnProperty(u)||be(e,l,u,null,a,s)}for(n in a)if(u=a[n],s=t[n],a.hasOwnProperty(n)&&(u!=null||s!=null))switch(n){case"value":p=u;break;case"defaultValue":c=u;break;case"multiple":i=u;default:u!==s&&be(e,l,n,u,a,s)}l=c,t=i,a=b,p!=null?aa(e,!!t,p,!1):!!a!=!!t&&(l!=null?aa(e,!!t,l,!0):aa(e,!!t,t?[]:"",!1));return;case"textarea":b=p=null;for(c in t)if(n=t[c],t.hasOwnProperty(c)&&n!=null&&!a.hasOwnProperty(c))switch(c){case"value":break;case"children":break;default:be(e,l,c,null,a,n)}for(i in a)if(n=a[i],u=t[i],a.hasOwnProperty(i)&&(n!=null||u!=null))switch(i){case"value":p=n;break;case"defaultValue":b=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(d(91));break;default:n!==u&&be(e,l,i,n,a,u)}Kf(e,p,b);return;case"option":for(var R in t)if(p=t[R],t.hasOwnProperty(R)&&p!=null&&!a.hasOwnProperty(R))switch(R){case"selected":e.selected=!1;break;default:be(e,l,R,null,a,p)}for(s in a)if(p=a[s],b=t[s],a.hasOwnProperty(s)&&p!==b&&(p!=null||b!=null))switch(s){case"selected":e.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:be(e,l,s,p,a,b)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var X in t)p=t[X],t.hasOwnProperty(X)&&p!=null&&!a.hasOwnProperty(X)&&be(e,l,X,null,a,p);for(g in a)if(p=a[g],b=t[g],a.hasOwnProperty(g)&&p!==b&&(p!=null||b!=null))switch(g){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(d(137,l));break;default:be(e,l,g,p,a,b)}return;default:if(pi(l)){for(var Se in t)p=t[Se],t.hasOwnProperty(Se)&&p!==void 0&&!a.hasOwnProperty(Se)&&nf(e,l,Se,void 0,a,p);for(T in a)p=a[T],b=t[T],!a.hasOwnProperty(T)||p===b||p===void 0&&b===void 0||nf(e,l,T,p,a,b);return}}for(var h in t)p=t[h],t.hasOwnProperty(h)&&p!=null&&!a.hasOwnProperty(h)&&be(e,l,h,null,a,p);for(N in a)p=a[N],b=t[N],!a.hasOwnProperty(N)||p===b||p==null&&b==null||be(e,l,N,p,a,b)}function Fr(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gh(){if(typeof performance.getEntriesByType=="function"){for(var e=0,l=0,t=performance.getEntriesByType("resource"),a=0;a<t.length;a++){var n=t[a],u=n.transferSize,i=n.initiatorType,c=n.duration;if(u&&c&&Fr(i)){for(i=0,c=n.responseEnd,a+=1;a<t.length;a++){var s=t[a],g=s.startTime;if(g>c)break;var T=s.transferSize,N=s.initiatorType;T&&Fr(N)&&(s=s.responseEnd,i+=T*(s<c?1:(c-g)/(s-g)))}if(--a,l+=8*(u+i)/(n.duration/1e3),e++,10<e)break}}if(0<e)return l/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var uf=null,cf=null;function ku(e){return e.nodeType===9?e:e.ownerDocument}function $r(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pr(e,l){if(e===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&l==="foreignObject"?0:e}function ff(e,l){return e==="textarea"||e==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var sf=null;function Xh(){var e=window.event;return e&&e.type==="popstate"?e===sf?!1:(sf=e,!0):(sf=null,!1)}var ed=typeof setTimeout=="function"?setTimeout:void 0,Zh=typeof clearTimeout=="function"?clearTimeout:void 0,ld=typeof Promise=="function"?Promise:void 0,kh=typeof queueMicrotask=="function"?queueMicrotask:typeof ld<"u"?function(e){return ld.resolve(null).then(e).catch(Kh)}:ed;function Kh(e){setTimeout(function(){throw e})}function Ct(e){return e==="head"}function td(e,l){var t=l,a=0;do{var n=t.nextSibling;if(e.removeChild(t),n&&n.nodeType===8)if(t=n.data,t==="/$"||t==="/&"){if(a===0){e.removeChild(n),wa(l);return}a--}else if(t==="$"||t==="$?"||t==="$~"||t==="$!"||t==="&")a++;else if(t==="html")Dn(e.ownerDocument.documentElement);else if(t==="head"){t=e.ownerDocument.head,Dn(t);for(var u=t.firstChild;u;){var i=u.nextSibling,c=u.nodeName;u[Ja]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&u.rel.toLowerCase()==="stylesheet"||t.removeChild(u),u=i}}else t==="body"&&Dn(e.ownerDocument.body);t=n}while(t);wa(l)}function ad(e,l){var t=e;e=0;do{var a=t.nextSibling;if(t.nodeType===1?l?(t._stashedDisplay=t.style.display,t.style.display="none"):(t.style.display=t._stashedDisplay||"",t.getAttribute("style")===""&&t.removeAttribute("style")):t.nodeType===3&&(l?(t._stashedText=t.nodeValue,t.nodeValue=""):t.nodeValue=t._stashedText||""),a&&a.nodeType===8)if(t=a.data,t==="/$"){if(e===0)break;e--}else t!=="$"&&t!=="$?"&&t!=="$~"&&t!=="$!"||e++;t=a}while(t)}function of(e){var l=e.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var t=l;switch(l=l.nextSibling,t.nodeName){case"HTML":case"HEAD":case"BODY":of(t),hi(t);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(t.rel.toLowerCase()==="stylesheet")continue}e.removeChild(t)}}function Vh(e,l,t,a){for(;e.nodeType===1;){var n=t;if(e.nodeName.toLowerCase()!==l.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ja])switch(l){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(l==="input"&&e.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=El(e.nextSibling),e===null)break}return null}function Jh(e,l,t){if(l==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=El(e.nextSibling),e===null))return null;return e}function nd(e,l){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=El(e.nextSibling),e===null))return null;return e}function rf(e){return e.data==="$?"||e.data==="$~"}function df(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Wh(e,l){var t=e.ownerDocument;if(e.data==="$~")e._reactRetry=l;else if(e.data!=="$?"||t.readyState!=="loading")l();else{var a=function(){l(),t.removeEventListener("DOMContentLoaded",a)};t.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function El(e){for(;e!=null;e=e.nextSibling){var l=e.nodeType;if(l===1||l===3)break;if(l===8){if(l=e.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return e}var mf=null;function ud(e){e=e.nextSibling;for(var l=0;e;){if(e.nodeType===8){var t=e.data;if(t==="/$"||t==="/&"){if(l===0)return El(e.nextSibling);l--}else t!=="$"&&t!=="$!"&&t!=="$?"&&t!=="$~"&&t!=="&"||l++}e=e.nextSibling}return null}function id(e){e=e.previousSibling;for(var l=0;e;){if(e.nodeType===8){var t=e.data;if(t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"){if(l===0)return e;l--}else t!=="/$"&&t!=="/&"||l++}e=e.previousSibling}return null}function cd(e,l,t){switch(l=ku(t),e){case"html":if(e=l.documentElement,!e)throw Error(d(452));return e;case"head":if(e=l.head,!e)throw Error(d(453));return e;case"body":if(e=l.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function Dn(e){for(var l=e.attributes;l.length;)e.removeAttributeNode(l[0]);hi(e)}var jl=new Map,fd=new Set;function Ku(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ut=A.d;A.d={f:Ih,r:Fh,D:$h,C:Ph,L:ev,m:lv,X:av,S:tv,M:nv};function Ih(){var e=ut.f(),l=qu();return e||l}function Fh(e){var l=ea(e);l!==null&&l.tag===5&&l.type==="form"?Co(l):ut.r(e)}var Ua=typeof document>"u"?null:document;function sd(e,l,t){var a=Ua;if(a&&typeof l=="string"&&l){var n=Sl(l);n='link[rel="'+e+'"][href="'+n+'"]',typeof t=="string"&&(n+='[crossorigin="'+t+'"]'),fd.has(n)||(fd.add(n),e={rel:e,crossOrigin:t,href:l},a.querySelector(n)===null&&(l=a.createElement("link"),We(l,"link",e),Xe(l),a.head.appendChild(l)))}}function $h(e){ut.D(e),sd("dns-prefetch",e,null)}function Ph(e,l){ut.C(e,l),sd("preconnect",e,l)}function ev(e,l,t){ut.L(e,l,t);var a=Ua;if(a&&e&&l){var n='link[rel="preload"][as="'+Sl(l)+'"]';l==="image"&&t&&t.imageSrcSet?(n+='[imagesrcset="'+Sl(t.imageSrcSet)+'"]',typeof t.imageSizes=="string"&&(n+='[imagesizes="'+Sl(t.imageSizes)+'"]')):n+='[href="'+Sl(e)+'"]';var u=n;switch(l){case"style":u=Ma(e);break;case"script":u=Ha(e)}jl.has(u)||(e=q({rel:"preload",href:l==="image"&&t&&t.imageSrcSet?void 0:e,as:l},t),jl.set(u,e),a.querySelector(n)!==null||l==="style"&&a.querySelector(Un(u))||l==="script"&&a.querySelector(Mn(u))||(l=a.createElement("link"),We(l,"link",e),Xe(l),a.head.appendChild(l)))}}function lv(e,l){ut.m(e,l);var t=Ua;if(t&&e){var a=l&&typeof l.as=="string"?l.as:"script",n='link[rel="modulepreload"][as="'+Sl(a)+'"][href="'+Sl(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ha(e)}if(!jl.has(u)&&(e=q({rel:"modulepreload",href:e},l),jl.set(u,e),t.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(Mn(u)))return}a=t.createElement("link"),We(a,"link",e),Xe(a),t.head.appendChild(a)}}}function tv(e,l,t){ut.S(e,l,t);var a=Ua;if(a&&e){var n=la(a).hoistableStyles,u=Ma(e);l=l||"default";var i=n.get(u);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(Un(u)))c.loading=5;else{e=q({rel:"stylesheet",href:e,"data-precedence":l},t),(t=jl.get(u))&&hf(e,t);var s=i=a.createElement("link");Xe(s),We(s,"link",e),s._p=new Promise(function(g,T){s.onload=g,s.onerror=T}),s.addEventListener("load",function(){c.loading|=1}),s.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Vu(i,l,a)}i={type:"stylesheet",instance:i,count:1,state:c},n.set(u,i)}}}function av(e,l){ut.X(e,l);var t=Ua;if(t&&e){var a=la(t).hoistableScripts,n=Ha(e),u=a.get(n);u||(u=t.querySelector(Mn(n)),u||(e=q({src:e,async:!0},l),(l=jl.get(n))&&vf(e,l),u=t.createElement("script"),Xe(u),We(u,"link",e),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function nv(e,l){ut.M(e,l);var t=Ua;if(t&&e){var a=la(t).hoistableScripts,n=Ha(e),u=a.get(n);u||(u=t.querySelector(Mn(n)),u||(e=q({src:e,async:!0,type:"module"},l),(l=jl.get(n))&&vf(e,l),u=t.createElement("script"),Xe(u),We(u,"link",e),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function od(e,l,t,a){var n=(n=P.current)?Ku(n):null;if(!n)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof t.precedence=="string"&&typeof t.href=="string"?(l=Ma(t.href),t=la(n).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(t.rel==="stylesheet"&&typeof t.href=="string"&&typeof t.precedence=="string"){e=Ma(t.href);var u=la(n).hoistableStyles,i=u.get(e);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,i),(u=n.querySelector(Un(e)))&&!u._p&&(i.instance=u,i.state.loading=5),jl.has(e)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},jl.set(e,t),u||uv(n,e,t,i.state))),l&&a===null)throw Error(d(528,""));return i}if(l&&a!==null)throw Error(d(529,""));return null;case"script":return l=t.async,t=t.src,typeof t=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ha(t),t=la(n).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function Ma(e){return'href="'+Sl(e)+'"'}function Un(e){return'link[rel="stylesheet"]['+e+"]"}function rd(e){return q({},e,{"data-precedence":e.precedence,precedence:null})}function uv(e,l,t,a){e.querySelector('link[rel="preload"][as="style"]['+l+"]")?a.loading=1:(l=e.createElement("link"),a.preload=l,l.addEventListener("load",function(){return a.loading|=1}),l.addEventListener("error",function(){return a.loading|=2}),We(l,"link",t),Xe(l),e.head.appendChild(l))}function Ha(e){return'[src="'+Sl(e)+'"]'}function Mn(e){return"script[async]"+e}function dd(e,l,t){if(l.count++,l.instance===null)switch(l.type){case"style":var a=e.querySelector('style[data-href~="'+Sl(t.href)+'"]');if(a)return l.instance=a,Xe(a),a;var n=q({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Xe(a),We(a,"style",n),Vu(a,t.precedence,e),l.instance=a;case"stylesheet":n=Ma(t.href);var u=e.querySelector(Un(n));if(u)return l.state.loading|=4,l.instance=u,Xe(u),u;a=rd(t),(n=jl.get(n))&&hf(a,n),u=(e.ownerDocument||e).createElement("link"),Xe(u);var i=u;return i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),We(u,"link",a),l.state.loading|=4,Vu(u,t.precedence,e),l.instance=u;case"script":return u=Ha(t.src),(n=e.querySelector(Mn(u)))?(l.instance=n,Xe(n),n):(a=t,(n=jl.get(u))&&(a=q({},t),vf(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Xe(n),We(n,"link",a),e.head.appendChild(n),l.instance=n);case"void":return null;default:throw Error(d(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(a=l.instance,l.state.loading|=4,Vu(a,t.precedence,e));return l.instance}function Vu(e,l,t){for(var a=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i<a.length;i++){var c=a[i];if(c.dataset.precedence===l)u=c;else if(u!==n)break}u?u.parentNode.insertBefore(e,u.nextSibling):(l=t.nodeType===9?t.head:t,l.insertBefore(e,l.firstChild))}function hf(e,l){e.crossOrigin==null&&(e.crossOrigin=l.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=l.referrerPolicy),e.title==null&&(e.title=l.title)}function vf(e,l){e.crossOrigin==null&&(e.crossOrigin=l.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=l.referrerPolicy),e.integrity==null&&(e.integrity=l.integrity)}var Ju=null;function md(e,l,t){if(Ju===null){var a=new Map,n=Ju=new Map;n.set(t,a)}else n=Ju,a=n.get(t),a||(a=new Map,n.set(t,a));if(a.has(e))return a;for(a.set(e,null),t=t.getElementsByTagName(e),n=0;n<t.length;n++){var u=t[n];if(!(u[Ja]||u[ke]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var i=u.getAttribute(l)||"";i=e+i;var c=a.get(i);c?c.push(u):a.set(i,[u])}}return a}function hd(e,l,t){e=e.ownerDocument||e,e.head.insertBefore(t,l==="title"?e.querySelector("head > title"):null)}function iv(e,l,t){if(t===1||l.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return e=l.disabled,typeof l.precedence=="string"&&e==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function vd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function cv(e,l,t,a){if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var n=Ma(a.href),u=l.querySelector(Un(n));if(u){l=u._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(e.count++,e=Wu.bind(e),l.then(e,e)),t.state.loading|=4,t.instance=u,Xe(u);return}u=l.ownerDocument||l,a=rd(a),(n=jl.get(n))&&hf(a,n),u=u.createElement("link"),Xe(u);var i=u;i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),We(u,"link",a),t.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(t,l),(l=t.state.preload)&&(t.state.loading&3)===0&&(e.count++,t=Wu.bind(e),l.addEventListener("load",t),l.addEventListener("error",t))}}var yf=0;function fv(e,l){return e.stylesheets&&e.count===0&&Fu(e,e.stylesheets),0<e.count||0<e.imgCount?function(t){var a=setTimeout(function(){if(e.stylesheets&&Fu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+l);0<e.imgBytes&&yf===0&&(yf=62500*Gh());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Fu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>yf?50:800)+l);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Wu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Iu=null;function Fu(e,l){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Iu=new Map,l.forEach(sv,e),Iu=null,Wu.call(e))}function sv(e,l){if(!(l.state.loading&4)){var t=Iu.get(e);if(t)var a=t.get(null);else{t=new Map,Iu.set(e,t);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var i=n[u];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(t.set(i.dataset.precedence,i),a=i)}a&&t.set(null,a)}n=l.instance,i=n.getAttribute("data-precedence"),u=t.get(i)||a,u===a&&t.set(null,n),t.set(i,n),this.count++,a=Wu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),u?u.parentNode.insertBefore(n,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),l.state.loading|=4}}var Hn={$$typeof:Te,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function ov(e,l,t,a,n,u,i,c,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.hiddenUpdates=oi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function yd(e,l,t,a,n,u,i,c,s,g,T,N){return e=new ov(e,l,t,i,s,g,T,N,c),l=1,u===!0&&(l|=24),u=dl(3,null,null,l),e.current=u,u.stateNode=e,l=Ji(),l.refCount++,e.pooledCache=l,l.refCount++,u.memoizedState={element:a,isDehydrated:t,cache:l},$i(u),e}function gd(e){return e?(e=ra,e):ra}function pd(e,l,t,a,n,u){n=gd(n),a.context===null?a.context=n:a.pendingContext=n,a=ht(l),a.payload={element:t},u=u===void 0?null:u,u!==null&&(a.callback=u),t=vt(e,a,l),t!==null&&(fl(t,e,l),dn(t,e,l))}function bd(e,l){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var t=e.retryLane;e.retryLane=t!==0&&t<l?t:l}}function gf(e,l){bd(e,l),(e=e.alternate)&&bd(e,l)}function Sd(e){if(e.tag===13||e.tag===31){var l=qt(e,67108864);l!==null&&fl(l,e,67108864),gf(e,67108864)}}function Td(e){if(e.tag===13||e.tag===31){var l=gl();l=ri(l);var t=qt(e,l);t!==null&&fl(t,e,l),gf(e,l)}}var $u=!0;function rv(e,l,t,a){var n=m.T;m.T=null;var u=A.p;try{A.p=2,pf(e,l,t,a)}finally{A.p=u,m.T=n}}function dv(e,l,t,a){var n=m.T;m.T=null;var u=A.p;try{A.p=8,pf(e,l,t,a)}finally{A.p=u,m.T=n}}function pf(e,l,t,a){if($u){var n=bf(a);if(n===null)af(e,l,a,Pu,t),zd(e,a);else if(hv(n,e,l,t,a))a.stopPropagation();else if(zd(e,a),l&4&&-1<mv.indexOf(e)){for(;n!==null;){var u=ea(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=Ut(u.pendingLanes);if(i!==0){var c=u;for(c.pendingLanes|=2,c.entangledLanes|=2;i;){var s=1<<31-ol(i);c.entanglements[1]|=s,i&=~s}ql(u),(he&6)===0&&(wu=Q()+500,jn(0))}}break;case 31:case 13:c=qt(u,2),c!==null&&fl(c,u,2),qu(),gf(u,2)}if(u=bf(a),u===null&&af(e,l,a,Pu,t),u===n)break;n=u}n!==null&&a.stopPropagation()}else af(e,l,a,null,t)}}function bf(e){return e=Si(e),Sf(e)}var Pu=null;function Sf(e){if(Pu=null,e=Pt(e),e!==null){var l=O(e);if(l===null)e=null;else{var t=l.tag;if(t===13){if(e=k(l),e!==null)return e;e=null}else if(t===31){if(e=U(l),e!==null)return e;e=null}else if(t===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;e=null}else l!==e&&(e=null)}}return Pu=e,null}function Ad(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ae()){case xe:return 2;case pl:return 8;case Yl:case ka:return 32;case Gn:return 268435456;default:return 32}default:return 32}}var Tf=!1,Nt=null,Et=null,jt=null,wn=new Map,Rn=new Map,Ot=[],mv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function zd(e,l){switch(e){case"focusin":case"focusout":Nt=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":wn.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rn.delete(l.pointerId)}}function qn(e,l,t,a,n,u){return e===null||e.nativeEvent!==u?(e={blockedOn:l,domEventName:t,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},l!==null&&(l=ea(l),l!==null&&Sd(l)),e):(e.eventSystemFlags|=a,l=e.targetContainers,n!==null&&l.indexOf(n)===-1&&l.push(n),e)}function hv(e,l,t,a,n){switch(l){case"focusin":return Nt=qn(Nt,e,l,t,a,n),!0;case"dragenter":return Et=qn(Et,e,l,t,a,n),!0;case"mouseover":return jt=qn(jt,e,l,t,a,n),!0;case"pointerover":var u=n.pointerId;return wn.set(u,qn(wn.get(u)||null,e,l,t,a,n)),!0;case"gotpointercapture":return u=n.pointerId,Rn.set(u,qn(Rn.get(u)||null,e,l,t,a,n)),!0}return!1}function xd(e){var l=Pt(e.target);if(l!==null){var t=O(l);if(t!==null){if(l=t.tag,l===13){if(l=k(t),l!==null){e.blockedOn=l,qf(e.priority,function(){Td(t)});return}}else if(l===31){if(l=U(t),l!==null){e.blockedOn=l,qf(e.priority,function(){Td(t)});return}}else if(l===3&&t.stateNode.current.memoizedState.isDehydrated){e.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ei(e){if(e.blockedOn!==null)return!1;for(var l=e.targetContainers;0<l.length;){var t=bf(e.nativeEvent);if(t===null){t=e.nativeEvent;var a=new t.constructor(t.type,t);bi=a,t.target.dispatchEvent(a),bi=null}else return l=ea(t),l!==null&&Sd(l),e.blockedOn=t,!1;l.shift()}return!0}function Cd(e,l,t){ei(e)&&t.delete(l)}function vv(){Tf=!1,Nt!==null&&ei(Nt)&&(Nt=null),Et!==null&&ei(Et)&&(Et=null),jt!==null&&ei(jt)&&(jt=null),wn.forEach(Cd),Rn.forEach(Cd)}function li(e,l){e.blockedOn===l&&(e.blockedOn=null,Tf||(Tf=!0,v.unstable_scheduleCallback(v.unstable_NormalPriority,vv)))}var ti=null;function Nd(e){ti!==e&&(ti=e,v.unstable_scheduleCallback(v.unstable_NormalPriority,function(){ti===e&&(ti=null);for(var l=0;l<e.length;l+=3){var t=e[l],a=e[l+1],n=e[l+2];if(typeof a!="function"){if(Sf(a||t)===null)continue;break}var u=ea(t);u!==null&&(e.splice(l,3),l-=3,pc(u,{pending:!0,data:n,method:t.method,action:a},a,n))}}))}function wa(e){function l(s){return li(s,e)}Nt!==null&&li(Nt,e),Et!==null&&li(Et,e),jt!==null&&li(jt,e),wn.forEach(l),Rn.forEach(l);for(var t=0;t<Ot.length;t++){var a=Ot[t];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ot.length&&(t=Ot[0],t.blockedOn===null);)xd(t),t.blockedOn===null&&Ot.shift();if(t=(e.ownerDocument||e).$$reactFormReplay,t!=null)for(a=0;a<t.length;a+=3){var n=t[a],u=t[a+1],i=n[tl]||null;if(typeof u=="function")i||Nd(t);else if(i){var c=null;if(u&&u.hasAttribute("formAction")){if(n=u,i=u[tl]||null)c=i.formAction;else if(Sf(n)!==null)continue}else c=i.action;typeof c=="function"?t[a+1]=c:(t.splice(a,3),a-=3),Nd(t)}}}function Ed(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function l(){n!==null&&(n(),n=null),a||setTimeout(t,20)}function t(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(t,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),n!==null&&(n(),n=null)}}}function Af(e){this._internalRoot=e}ai.prototype.render=Af.prototype.render=function(e){var l=this._internalRoot;if(l===null)throw Error(d(409));var t=l.current,a=gl();pd(t,a,e,l,null,null)},ai.prototype.unmount=Af.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var l=e.containerInfo;pd(e.current,2,null,e,null,null),qu(),l[$t]=null}};function ai(e){this._internalRoot=e}ai.prototype.unstable_scheduleHydration=function(e){if(e){var l=Rf();e={blockedOn:null,target:e,priority:l};for(var t=0;t<Ot.length&&l!==0&&l<Ot[t].priority;t++);Ot.splice(t,0,e),t===0&&xd(e)}};var jd=x.version;if(jd!=="19.2.4")throw Error(d(527,jd,"19.2.4"));A.findDOMNode=function(e){var l=e._reactInternals;if(l===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=S(l),e=e!==null?Y(e):null,e=e===null?null:e.stateNode,e};var yv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:m,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ni=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ni.isDisabled&&ni.supportsFiber)try{Ql=ni.inject(yv),sl=ni}catch{}}return Ln.createRoot=function(e,l){if(!H(e))throw Error(d(299));var t=!1,a="",n=wo,u=Ro,i=qo;return l!=null&&(l.unstable_strictMode===!0&&(t=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(n=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(i=l.onRecoverableError)),l=yd(e,1,!1,null,null,t,a,null,n,u,i,Ed),e[$t]=l.current,tf(e),new Af(l)},Ln.hydrateRoot=function(e,l,t){if(!H(e))throw Error(d(299));var a=!1,n="",u=wo,i=Ro,c=qo,s=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError),t.formState!==void 0&&(s=t.formState)),l=yd(e,1,!0,l,t??null,a,n,s,u,i,c,Ed),l.context=gd(null),t=l.current,a=gl(),a=ri(a),n=ht(a),n.callback=null,vt(t,n,a),t=a,l.current.lanes=t,Va(l,t),ql(l),e[$t]=l.current,tf(e),new ai(l)},Ln.version="19.2.4",Ln}var Bd;function Nv(){if(Bd)return Cf.exports;Bd=1;function v(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v)}catch(x){console.error(x)}}return v(),Cf.exports=Cv(),Cf.exports}var Ev=Nv();function Ld(v){return async function(E,d={}){const H=v().replace(/\/$/,""),O=E.startsWith("http")?E:H+E,{headers:k,...U}=d,j=await fetch(O,{credentials:"include",...U,headers:{"content-type":"application/json",...k}}),S=await j.json();if(!j.ok)throw new Error(typeof S.error=="string"?S.error:"Request failed");return S}}function Vd(v){let x=v.trim();return x?(/^https?:\/\//i.test(x)||(x=`http://${x}`),x.replace(/\/$/,"")):""}function ui(){if(typeof window>"u"||window.location.protocol!=="https:")return!1;const v=window.location.hostname;return v!=="localhost"&&v!=="127.0.0.1"}function Jd(v){const x=Vd(v);if(!x)return!1;try{const E=new URL(x);return E.protocol!=="http:"?!1:E.hostname==="localhost"||E.hostname==="127.0.0.1"}catch{return!1}}const Wd=Z.createContext(null);function jv({request:v,children:x}){return f.jsx(Wd.Provider,{value:v,children:x})}function Ov(){const v=Z.useContext(Wd);if(!v)throw new Error("useApi must be used within ApiProvider");return v}const Yd="open-im-web-lang",Id="open-im-web-dark-mode",Fd="open-im-web-api-base",_f="http://127.0.0.1:39282",_v=1e4,Bl=["telegram","feishu","qq","wework","dingtalk","workbuddy","clawbot"],It=[{key:"telegram",label:"Telegram",fields:["aiCommand","botToken","proxy","allowedUserIds"],testFields:["botToken","proxy"],requiredFields:["botToken"],sensitiveFields:["botToken"]},{key:"feishu",label:"Feishu",fields:["aiCommand","appId","appSecret","allowedUserIds"],testFields:["appId","appSecret"],requiredFields:["appId","appSecret"],sensitiveFields:["appSecret"]},{key:"qq",label:"QQ",fields:["aiCommand","appId","secret","allowedUserIds"],testFields:["appId","secret"],requiredFields:["appId","secret"],sensitiveFields:["secret"]},{key:"wework",label:"WeWork",fields:["aiCommand","corpId","secret","allowedUserIds"],testFields:["corpId","secret"],requiredFields:["corpId","secret"],sensitiveFields:["secret"]},{key:"dingtalk",label:"DingTalk",fields:["aiCommand","clientId","clientSecret","cardTemplateId","allowedUserIds"],testFields:["clientId","clientSecret"],requiredFields:["clientId","clientSecret"],sensitiveFields:["clientSecret"]},{key:"workbuddy",label:"WorkBuddy",fields:["aiCommand","accessToken","refreshToken","userId","baseUrl","allowedUserIds"],testFields:["accessToken","refreshToken","userId"],requiredFields:["accessToken","refreshToken","userId"],sensitiveFields:["accessToken","refreshToken"]},{key:"clawbot",label:"ClawBot",fields:["aiCommand","apiUrl","apiToken","allowedUserIds"],testFields:["apiUrl","apiToken"],requiredFields:["apiToken"],sensitiveFields:["apiToken"]}],Ra={en:{pageTitle:"open-im local control",heroBadge:"open-im local control",heroTitle:"Local bridge control.",heroBody:"",heroBodyFull:"One local bridge for Telegram, Feishu, QQ, WeWork, DingTalk, WorkBuddy, and ClawBot.",heroKicker:"Local AI bridge",langButton:"中文",darkModeToggle:"Toggle dark mode",headerToolbarAria:"Bridge: validate, save, start, stop",controlCenter:"Control center",sidebarNoteTitle:"Local workflow",sidebarNoteBody:"Configure at least one platform, save the config, then start the bridge from Service.",mode:"Flow",dashboardTitle:"Dashboard",dashboardSubtitle:"Platform health status",dashboardSubtitleFull:"Platform and service status",quickActionsTitle:"Quick Actions",refreshHealth:"Refresh Health Status",viewConfig:"View Configuration",overviewTitle:"Start here",overviewBody:"Configure at least one platform, save the configuration, then start the bridge from the service section.",openPlatforms:"Open Platforms",openService:"Open Service",healthChecking:"Checking...",healthy:"Healthy",unhealthy:"Issues Found",notConfigured:"Not Configured",disabled:"Disabled",statConfiguredLabel:"Configured",statConfiguredMeta:"Platforms with saved credentials",statEnabledLabel:"Enabled",statEnabledMeta:"Platforms selected for startup",statServiceLabel:"Service",serviceRunningShort:"Running",serviceIdleShort:"Idle",serviceRunningMeta:"Local bridge process is active",serviceIdleMeta:"Bridge has not been started yet",listSeparator:", ",platformsTitle:"Platforms",navConfigFiles:"Config files",configFilesTitle:"Config files (JSON)",configFilesHint:"Edit the files on disk directly. Each card has its own Save. Platform / AI forms and Service → Save config still apply.",openImConfigCardHint:"Full open-im configuration. Use Format, then Save. Invalid JSON is rejected.",claudeSettingsCardHint:"Claude SDK environment (ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL, ANTHROPIC_MODEL, etc.). Set API access here without shell exports.",claudeJsonShortcutHint:"Edit ~/.claude/settings.json in the sidebar «Config files» section below.",platformsHint:"Disabled platforms keep their saved values.",enabled:"Enabled",readyState:"Ready",setupRequired:"Setup required",credentialProgress:"{done}/{total} credentials",telegramSummary:"Bot token and optional proxy.",feishuSummary:"App ID, App Secret, and allowed user scope.",qqSummary:"App ID and secret for bot access.",weworkSummary:"Corp ID and secret for enterprise delivery.",dingtalkSummary:"Client credentials plus optional card template.",workbuddySummary:"CodeBuddy OAuth for WeChat customer service.",clawbotSummary:"WeChat iLink API via ClawBot.",clawbotApiUrl:"API URL",clawbotApiToken:"API Token (Bearer)",clawbotHelp:'Click "Scan QR Login" to authenticate via WeChat, or paste token manually.',qrLoginBtn:"Scan QR Login",qrLoginScanning:"Waiting for QR code scan...",qrLoginSuccess:"Login successful! Credentials saved.",qrLoginFailed:"Login failed",qrLoginExpired:"QR code expired, please try again",qrScanHint:"Use WeChat to scan the QR code",platformCredentialsTitle:"Credentials",platformAccessTitle:"Routing and access",platformTestNote:"Checks required credentials against the platform.",platformAiTool:"AI tool override",inheritDefaultAi:"Use default AI tool",botToken:"Bot token",proxy:"Proxy",allowedUserIds:"Allowed user IDs",telegramHelp:'Get credentials: visit <a href="https://t.me/BotFather" target="_blank">@BotFather</a>, send /newbot, then copy the Bot Token',appId:"App ID",appSecret:"App Secret",feishuHelp:'Get credentials: visit <a href="https://open.feishu.cn/" target="_blank">Feishu Open Platform</a>, create an app, enable the bot, and copy the App ID / App Secret',qqAppId:"App ID",qqAppSecret:"App Secret",qqHelp:'Get credentials: visit <a href="https://bot.q.qq.com" target="_blank">QQ Open Platform</a>, create a bot, and copy the App ID / App Secret',corpId:"Corp ID / Bot ID",weworkHelp:'Get credentials: visit <a href="https://work.weixin.qq.com/" target="_blank">WeWork Admin Console</a>, create an app, and copy the Bot ID (Corp ID) / Secret',clientId:"Client ID / AppKey",clientSecret:"Client Secret / AppSecret",dingtalkHelp:'Get credentials: Create an enterprise internal app on <a href="https://open-dev.dingtalk.com/" target="_blank">DingTalk Open Platform</a>, enable Stream Mode, and get Client ID / Client Secret',workbuddyHelp:"Get credentials: Login via CodeBuddy OAuth to get access/refresh tokens. WorkBuddy connects WeChat customer service through Centrifuge WebSocket.",secret:"Secret",cardTemplateId:"Card template ID",workbuddyAccessToken:"Access Token",workbuddyRefreshToken:"Refresh Token",workbuddyUserId:"User ID",workbuddyBaseUrl:"Base URL",optional:"Optional",commaSeparatedIds:"Comma-separated IDs",aiTitle:"AI Tooling",aiHint:"Claude SDK keys: sidebar Config files → ~/.claude/settings.json. Set which AI each platform uses under Platforms above. Codex / CodeBuddy need a CLI path in the panels below when any platform uses them.",aiPerPlatformHint:"Which AI to use is configured per platform in the Platforms section (default: claude). This section sets shared paths, proxy, and logs.",claudeNote:"Claude credentials are still read from environment variables or ~/.claude/settings.json. This page manages local bridge config, not Claude account auth.",aiCommonTitle:"Shared defaults",aiCommonHint:"Choose the default AI tool first. Tool-specific fields are shown below.",aiToolConfigTitle:"Tool-specific settings",aiToolConfigHint:"Only the selected tool's fields are shown.",aiConfigSummary:"Editing {tool} settings. Switch tools above if you need to configure another runtime.",aiTool:"Default AI tool",workDir:"Default work directory",claudeCli:"Claude CLI path",codexCli:"Codex CLI path",codebuddyCli:"CodeBuddy CLI path",codexProxy:"Codex proxy",codexApiKey:"OPENAI_API_KEY",codexApiKeyTip:"Set the OpenAI API key used by Codex. You can also edit the auth file below.",claudeConfigPath:"Config file location",claudeAuthToken:"ANTHROPIC_AUTH_TOKEN",claudeBaseUrl:"ANTHROPIC_BASE_URL",claudeModel:"ANTHROPIC_MODEL",claudeProxy:"Proxy (optional)",hookPort:"Hook port",logLevel:"Log level",logLevelDefault:"default (app default)",validate:"Validate",test:"Check config",testing:"Checking...",testSuccess:"Configuration looks valid.",testFailed:"Configuration issue: {error}",save:"Save config",start:"Start bridge",stop:"Stop bridge",bridgeRunning:"Bridge running (pid {pid})",bridgeStopped:"Bridge stopped",bridgeActive:"Bridge worker is active.",bridgeInactive:"Bridge worker is currently stopped.",summaryEnabled:"Enabled platforms: {platforms} | AI tool: {tool}",summaryEmpty:"No platform enabled yet | AI tool: {tool}",ready:"Control surface ready.",validationOk:"Configuration looks internally consistent.",saveOk:"Configuration saved.",startOk:"Bridge started.",stopOk:"Bridge stopped.",configEditorTitle:"Config Editor",configEditorHint:"Edit ~/.open-im/config.json directly",claudeSettingsLabel:"~/.claude/settings.json",codexSettingsLabel:"~/.codex/auth.json",codexSettingsCardHint:"Codex CLI auth (OPENAI_API_KEY etc.). Set API access here, or use the OPENAI_API_KEY field in the Codex tool tab.",configJson:"~/.open-im/config.json",formatJson:"Format",resetJson:"Reset",saveBtn:"Save",jsonValid:"Valid JSON",jsonInvalid:"Invalid JSON: {error}",validationNoPlatformEnabled:"Enable at least one IM platform and fill its required credentials before saving.",validationPlatformIncomplete:'Platform "{platform}" is enabled but these required fields are empty: {fields}',validationAiCodexNoCli:"Default AI is Codex but Codex CLI path is empty. Set it under AI Tooling or change the default tool.",validationAiCodebuddyNoCli:"Default AI is CodeBuddy but CodeBuddy CLI path is empty. Set it under AI Tooling or change the default tool.",tipTelegramToken:'From Telegram, open <a href="https://t.me/BotFather" target="_blank" rel="noopener">@BotFather</a> → /newbot → copy the token.',tipFeishuAppId:"Feishu Open Platform → your app → Credentials → App ID.",tipFeishuSecret:"Same page → App Secret (click show / reset if needed).",tipQqAppId:'<a href="https://bot.q.qq.com" target="_blank" rel="noopener">QQ bot console</a> → your bot → App ID.',tipQqSecret:"Same console → App Secret.",tipWeworkCorp:"WeCom admin → app → view Corp ID (or smart-bot Bot ID) and Secret.",tipDingtalkClient:'<a href="https://open-dev.dingtalk.com" target="_blank" rel="noopener">DingTalk Open Platform</a> → internal app → App Key & App Secret.',tipWorkbuddyToken:"Use terminal <code>open-im init</code> for WorkBuddy OAuth, or paste tokens from CodeBuddy login.",tipClawbotApiToken:"Run <code>open-im init</code> and select ClawBot to scan QR code, or paste token from ClawBot iLink login.",navSetupWizard:"Setup Wizard",wizardStepLabel_welcome:"Welcome",wizardStepLabel_ai:"AI Backend",wizardStepLabel_platforms:"Platforms",wizardStepLabel_credentials:"Credentials",wizardStepLabel_review:"Review",wizardWelcomeTitle:"Welcome to open-im",wizardWelcomeDesc:"This wizard will guide you through configuring your AI coding assistant bridge. It takes about 2 minutes.",wizardStepAi:"Choose your AI backend and working directory",wizardStepPlatforms:"Pick which chat platforms to connect",wizardStepCredentials:"Enter API keys and tokens",wizardStepReview:"Review your choices, then save and start",wizardAiTitle:"AI Backend",wizardAiDesc:"open-im bridges chat apps to AI coding tools. Set up the paths below — the platform-level AI selection comes in the next step.",wizardWorkDirHint:"The directory where the AI tool will work. Leave empty to use the bridge's process directory.",wizardPlatformsTitle:"Choose Platforms",wizardPlatformsDesc:"Select at least one chat platform to connect. You can enable more later from the Dashboard.",wizardPickAtLeastOne:"Please select at least one platform.",wizardCredentialsTitle:"Enter Credentials",wizardCredentialsDesc:"Fill in the required credentials for each enabled platform.",wizardReviewTitle:"Review & Start",wizardReviewDesc:"Check your configuration below. When you're ready, click Save & Start to apply everything and launch the bridge.",wizardDoneTitle:"You're all set!",wizardDoneDesc:"The bridge is running. You can now message your bot on any enabled platform.",wizardGoToDashboard:"Go to Dashboard",wizardBack:"Back",wizardNext:"Next",wizardFinish:"Save & Start",wizardWorking:"Working...",wizardSaving:"Saving configuration...",wizardStarting:"Starting bridge..."},zh:{pageTitle:"open-im 本地控制台",heroBadge:"open-im",heroTitle:"本地桥接控制台",heroBody:"",heroBodyFull:"一个本地桥接入口,统一连接 Telegram、Feishu、QQ、WeWork、DingTalk、WorkBuddy 和 ClawBot。",heroKicker:"本地 AI 桥接",langButton:"EN",darkModeToggle:"切换暗黑模式",headerToolbarAria:"桥接:校验、保存、启动、停止",controlCenter:"控制中心",sidebarNoteTitle:"本地工作流",sidebarNoteBody:"至少配置一个平台,保存配置,然后在服务控制区启动桥接。",mode:"模式",dashboardTitle:"概览",dashboardSubtitle:"平台健康状态",dashboardSubtitleFull:"平台与服务状态",quickActionsTitle:"快捷操作",refreshHealth:"刷新健康状态",viewConfig:"查看配置",overviewTitle:"先完成基础配置",overviewBody:"先配置至少一个平台,保存本地配置,再到服务控制区启动桥接。",openPlatforms:"打开平台配置",openService:"打开服务控制",healthChecking:"检查中...",healthy:"正常",unhealthy:"有问题",notConfigured:"未配置",disabled:"已禁用",statConfiguredLabel:"已配置",statConfiguredMeta:"已填写凭证的平台数量",statEnabledLabel:"已启用",statEnabledMeta:"会随服务启动的平台数量",statServiceLabel:"服务",serviceRunningShort:"运行中",serviceIdleShort:"未启动",serviceRunningMeta:"本地桥接进程正在运行",serviceIdleMeta:"桥接服务尚未启动",listSeparator:"、",platformsTitle:"平台配置",navConfigFiles:"配置文件",configFilesTitle:"配置文件(JSON)",configFilesHint:"直接编辑磁盘上的文件,每张卡片有独立保存按钮。平台 / AI 表单与服务区的「保存配置」仍然有效。",openImConfigCardHint:"open-im 完整配置。先格式化再保存;JSON 不合法时无法写入。",claudeSettingsCardHint:"Claude SDK 环境变量(ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL、ANTHROPIC_MODEL 等)。在此配置 API,无需在终端 export。",claudeJsonShortcutHint:"提示:请在左侧栏「配置文件」分区编辑 ~/.claude/settings.json。",platformsHint:"禁用的平台仍保留已保存的值。",enabled:"启用",readyState:"已就绪",setupRequired:"需要完成配置",credentialProgress:"凭证 {done}/{total}",telegramSummary:"Bot Token 与可选代理。",feishuSummary:"App ID、App Secret 以及可访问用户范围。",qqSummary:"QQ 机器人 App ID 与 Secret。",weworkSummary:"企业微信 Corp ID 与 Secret。",dingtalkSummary:"钉钉 Client 凭证,可选配置卡片模板 ID。",workbuddySummary:"CodeBuddy OAuth 连接微信客服。",clawbotSummary:"通过 ClawBot 连接微信 iLink API。",clawbotApiUrl:"API 地址",clawbotApiToken:"API Token (Bearer)",clawbotHelp:"点击“扫码登录”通过微信认证,或手动粘贴 Token。",qrLoginBtn:"扫码登录",qrLoginScanning:"等待扫码...",qrLoginSuccess:"登录成功!凭证已保存。",qrLoginFailed:"登录失败",qrLoginExpired:"二维码已过期,请重试",qrScanHint:"请使用微信扫描二维码",platformCredentialsTitle:"凭证",platformAccessTitle:"路由与访问",platformTestNote:"只会检查该平台的必填凭证是否可用。",platformAiTool:"平台 AI 工具覆盖",inheritDefaultAi:"使用默认 AI 工具",botToken:"Bot Token",proxy:"代理",allowedUserIds:"允许的用户 ID",telegramHelp:'获取凭证:访问 <a href="https://t.me/BotFather" target="_blank">@BotFather</a>,发送 /newbot 创建机器人并拿到 Bot Token',appId:"App ID",appSecret:"App Secret",feishuHelp:'获取凭证:访问 <a href="https://open.feishu.cn/" target="_blank">飞书开放平台</a>,创建应用、启用机器人并拿到 App ID / App Secret',qqAppId:"App ID",qqAppSecret:"App Secret",qqHelp:'获取凭证:访问 <a href="https://bot.q.qq.com" target="_blank">QQ 开放平台</a>,创建机器人并拿到 App ID / App Secret',corpId:"Corp ID / Bot ID",weworkHelp:'获取凭证:访问 <a href="https://work.weixin.qq.com/" target="_blank">企业微信管理后台</a>,创建应用并拿到 Bot ID(Corp ID)/ Secret',clientId:"Client ID / AppKey",clientSecret:"Client Secret / AppSecret",dingtalkHelp:'获取凭证:在 <a href="https://open-dev.dingtalk.com/" target="_blank">钉钉开放平台</a> 创建企业内部应用,启用 Stream Mode,并拿到 Client ID / Client Secret',workbuddyHelp:"获取凭证:通过 CodeBuddy OAuth 登录获取 access/refresh token。WorkBuddy 通过 Centrifuge WebSocket 连接微信客服。",cardTemplateId:"卡片模板 ID",workbuddyAccessToken:"Access Token",workbuddyRefreshToken:"Refresh Token",workbuddyUserId:"User ID",workbuddyBaseUrl:"基础 URL",optional:"可选",commaSeparatedIds:"多个 ID 用逗号分隔",aiTitle:"AI 工具配置",aiHint:"Claude SDK:左侧栏「配置文件」→ ~/.claude/settings.json。各渠道用哪个 AI 在上方「平台」里分别设置。若任一平台选 Codex/CodeBuddy,再在下方填对应 CLI 路径。",aiPerPlatformHint:"每个平台的 AI 工具在上方「平台」中配置(默认 claude)。本区域设置共用路径、代理与日志。",claudeNote:"Claude 凭证仍然从环境变量或 ~/.claude/settings.json 读取。这个页面只管理本地桥接配置,不负责 Claude 账号登录。",aiCommonTitle:"公共默认配置",aiCommonHint:"先选择默认 AI 工具,下方再显示对应的工具专属配置。",aiToolConfigTitle:"工具专属配置",aiToolConfigHint:"只显示当前选中 AI 工具的字段。",aiConfigSummary:"正在编辑 {tool} 的配置,如需配置其他工具,可在上方切换。",aiTool:"默认 AI 工具",workDir:"默认工作目录",claudeCli:"Claude CLI 路径",codexCli:"Codex CLI 路径",codebuddyCli:"CodeBuddy CLI 路径",codexProxy:"Codex 代理",codexApiKey:"OPENAI_API_KEY",codexApiKeyTip:"设置 Codex 使用的 OpenAI API Key。也可以在下方编辑 auth 文件。",claudeConfigPath:"配置文件位置",claudeProxy:"代理(可选)",hookPort:"Hook 端口",logLevel:"日志级别",logLevelDefault:"default(程序默认)",validate:"校验配置",test:"校验配置",testing:"校验中...",testSuccess:"配置校验通过。",testFailed:"配置有问题:{error}",save:"保存配置",start:"启动桥接",stop:"停止桥接",bridgeRunning:"桥接运行中(pid {pid})",bridgeStopped:"桥接已停止",bridgeActive:"桥接 worker 正在运行。",bridgeInactive:"桥接 worker 当前已停止。",summaryEnabled:"已启用平台:{platforms} | AI 工具:{tool}",summaryEmpty:"暂未启用平台 | AI 工具:{tool}",ready:"控制台已就绪。",validationOk:"配置校验通过。",saveOk:"配置已保存。",startOk:"桥接已启动。",stopOk:"桥接已停止。",configEditorTitle:"JSON 配置编辑器",configEditorHint:"直接编辑 ~/.open-im/config.json",claudeSettingsLabel:"~/.claude/settings.json",codexSettingsLabel:"~/.codex/auth.json",codexSettingsCardHint:"Codex CLI 认证信息(OPENAI_API_KEY 等)。在此配置 API 访问,或在 Codex 工具标签页填写 OPENAI_API_KEY。",configJson:"~/.open-im/config.json",configJsonHint:"编辑配置 JSON。点击服务区的“保存配置”按钮后侘存更改。",formatJson:"格式化",resetJson:"重置",saveBtn:"保存",jsonValid:"JSON 有效",jsonInvalid:"JSON 无效:{error}",validationNoPlatformEnabled:"保存前请至少启用一个 IM 平台,并填完必填凭证。",validationPlatformIncomplete:"平台「{platform}」已启用,但以下必填项为空:{fields}",validationAiCodexNoCli:"默认 AI 为 Codex,但 Codex CLI 路径为空。请在 AI 区填写,或改默认工具。",validationAiCodebuddyNoCli:"默认 AI 为 CodeBuddy,但 CodeBuddy CLI 路径为空。请在 AI 区填写,或改默认工具。",tipTelegramToken:'在 Telegram 搜 <a href="https://t.me/BotFather" target="_blank" rel="noopener">@BotFather</a>,发 /newbot 创建机器人后复制 Token。',tipFeishuAppId:"飞书开放平台 → 应用 → 凭证与基础信息 → App ID。",tipFeishuSecret:"同一页 App Secret(可重置后查看)。",tipQqAppId:'<a href="https://bot.q.qq.com" target="_blank" rel="noopener">QQ 开放平台</a> → 机器人 → App ID。',tipQqSecret:"同一处获取 App Secret。",tipWeworkCorp:"企业微信管理后台 → 应用 → 查省 Corp ID / 智能机器人 Bot ID 与 Secret。",tipDingtalkClient:'<a href="https://open-dev.dingtalk.com" target="_blank" rel="noopener">钉钉开放平台</a> → 企业内部应用 → AppKey / AppSecret。',tipWorkbuddyToken:"建议在终端运行 <code>open-im init</code> 完成 WorkBuddy 授权;或粘贴 CodeBuddy 登录后的 Token。",tipClawbotApiToken:"在终端运行 <code>open-im init</code> 选择 ClawBot 扫码登录,或从 ClawBot iLink 登录后复制 Token。",navSetupWizard:"设置向导",wizardStepLabel_welcome:"欢迎",wizardStepLabel_ai:"AI 后端",wizardStepLabel_platforms:"平台",wizardStepLabel_credentials:"凭证",wizardStepLabel_review:"确认",wizardWelcomeTitle:"欢迎使用 open-im",wizardWelcomeDesc:"这个向导将引导你配置 AI 编程助手桥接。大约需要 2 分钟。",wizardStepAi:"选择 AI 后端和工作目录",wizardStepPlatforms:"选择要连接的聊天平台",wizardStepCredentials:"输入 API Key 和 Token",wizardStepReview:"检查配置,然后保存启动",wizardAiTitle:"AI 后端",wizardAiDesc:"open-im 将聊天 App 桥接到 AI 编程工具。在下方设置路径,平台级的 AI 选择在下一步。",wizardWorkDirHint:"AI 工具的工作目录。留空则使用桥接进程的工作目录。",wizardPlatformsTitle:"选择平台",wizardPlatformsDesc:"至少选择一个聊天平台。后续可在概览页启用更多。",wizardPickAtLeastOne:"请至少选择一个平台。",wizardCredentialsTitle:"输入凭证",wizardCredentialsDesc:"为每个已启用的平台填写必要的凭证信息。",wizardReviewTitle:"确认并启动",wizardReviewDesc:"检查下方配置。准备好后点击“保存并启动”应用配置并启动桥接。",wizardDoneTitle:"配置完成!",wizardDoneDesc:"桥接已运行。你现在可以在任何已启用的平台上向机器人发消息了。",wizardGoToDashboard:"进入概览",wizardBack:"上一步",wizardNext:"下一步",wizardFinish:"保存并启动",wizardWorking:"处理中...",wizardSaving:"正在保存配置...",wizardStarting:"正在启动桥接..."}};function Dv(v){const x=Z.useCallback((d,H={})=>{const O=Ra[v]??Ra.en,k=Ra.en,U=O[d]??k[d]??d;return Object.keys(H).reduce((j,S)=>j.replaceAll(`{${S}}`,String(H[S])),U)},[v]),E=Z.useCallback(d=>{const H=Ra[v]??Ra.en,O=Ra.en;return H[d]??O[d]??""},[v]);return Z.useMemo(()=>({t:x,html:E}),[x,E])}function Uv(){return f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:[f.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),f.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),f.jsx("rect",{x:"14",y:"14",width:"7",height:"7"}),f.jsx("rect",{x:"3",y:"14",width:"7",height:"7"})]})}function Mv(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:f.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})})}function Hv(){return f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),f.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function wv(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:f.jsx("path",{d:"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 14a4 4 0 1 1 4-4 4 4 0 0 1-4 4z"})})}function Rv(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:f.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})})}function qv({activeNav:v,onNavigate:x,t:E}){return f.jsxs("aside",{className:"sidebar",children:[f.jsx("div",{className:"sidebar-header",children:f.jsxs("div",{className:"sidebar-brand",children:[f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"24",height:"24",children:f.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})}),"open-im"]})}),f.jsxs("nav",{className:"sidebar-nav",children:[f.jsxs("button",{type:"button",className:`nav-item ${v==="overview"?"active":""}`,onClick:()=>x("overview"),children:[f.jsx(Uv,{}),f.jsx("span",{children:E("dashboardTitle")})]}),f.jsxs("button",{type:"button",className:`nav-item ${v==="wizard"?"active":""}`,onClick:()=>x("wizard"),children:[f.jsx(Rv,{}),f.jsx("span",{children:E("navSetupWizard")})]}),f.jsxs("button",{type:"button",className:`nav-item ${v==="platforms"?"active":""}`,onClick:()=>x("platforms"),children:[f.jsx(Mv,{}),f.jsx("span",{children:E("platformsTitle")})]}),f.jsxs("button",{type:"button",className:`nav-item ${v==="files"?"active":""}`,onClick:()=>x("files"),children:[f.jsx(Hv,{}),f.jsx("span",{children:E("navConfigFiles")})]}),f.jsxs("button",{type:"button",className:`nav-item ${v==="ai"?"active":""}`,onClick:()=>x("ai"),children:[f.jsx(wv,{}),f.jsx("span",{children:E("aiTitle")})]})]})]})}function Bv({lang:v,toggleLang:x,toggleDark:E,serviceStatus:d,busy:H,onValidate:O,onSave:k,onToggleService:U,t:j}){return f.jsxs("header",{className:"main-header",children:[f.jsxs("div",{className:"main-header-top",children:[f.jsx("div",{children:f.jsx("h1",{className:"main-title",children:j("dashboardTitle")})}),f.jsxs("div",{className:"header-actions",children:[f.jsx("a",{href:"https://github.com/wu529778790/open-im",target:"_blank",rel:"noreferrer",className:"btn btn-ghost btn-sm",children:"GitHub"}),f.jsx("button",{type:"button",className:"dark-mode-toggle",onClick:E,"aria-label":j("darkModeToggle"),children:"◐"}),f.jsx("button",{type:"button",className:"lang-button",onClick:x,children:v==="zh"?"EN":"中文"})]})]}),f.jsxs("div",{className:"main-header-toolbar",role:"toolbar","aria-label":j("headerToolbarAria"),children:[f.jsx("button",{type:"button",className:"btn btn-warning btn-sm",disabled:H,onClick:O,children:j("validate")}),f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",disabled:H,onClick:k,children:j("save")}),f.jsx("button",{type:"button",className:`btn btn-sm ${d.running?"btn-danger":"btn-primary"}`,disabled:H,onClick:U,children:d.running?j("stop"):j("start")})]})]})}function Lv({health:v,serviceStatus:x,t:E}){const d=(v==null?void 0:v.platforms)??{};let H=0,O=0;Bl.forEach(U=>{const j=d[U];j!=null&&j.configured&&(H+=1),j!=null&&j.enabled&&(O+=1)});const k=Bl.length;return f.jsx("section",{className:"section",children:f.jsxs("div",{className:"stats-grid",children:[f.jsxs("div",{className:"stat-card",children:[f.jsx("div",{className:"stat-label",children:E("statConfiguredLabel")}),f.jsxs("div",{className:"stat-value",children:[H,"/",k]})]}),f.jsxs("div",{className:"stat-card",children:[f.jsx("div",{className:"stat-label",children:E("statEnabledLabel")}),f.jsx("div",{className:"stat-value",children:O})]}),f.jsxs("div",{className:"stat-card",children:[f.jsx("div",{className:"stat-label",children:E("statServiceLabel")}),f.jsx("div",{className:"stat-value",children:x.running?E("serviceRunningShort"):E("serviceIdleShort")})]})]})})}const $d={telegram:{botToken:"botToken",proxy:"proxy",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},feishu:{appId:"appId",appSecret:"appSecret",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},qq:{appId:"qqAppId",secret:"qqAppSecret",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},wework:{corpId:"corpId",secret:"secret",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},dingtalk:{clientId:"clientId",clientSecret:"clientSecret",cardTemplateId:"cardTemplateId",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},workbuddy:{aiCommand:"platformAiTool",accessToken:"workbuddyAccessToken",refreshToken:"workbuddyRefreshToken",userId:"workbuddyUserId",baseUrl:"workbuddyBaseUrl",allowedUserIds:"allowedUserIds"},clawbot:{aiCommand:"platformAiTool",apiUrl:"clawbotApiUrl",apiToken:"clawbotApiToken",allowedUserIds:"allowedUserIds"}},Pd={telegram:"telegramSummary",feishu:"feishuSummary",qq:"qqSummary",wework:"weworkSummary",dingtalk:"dingtalkSummary",workbuddy:"workbuddySummary",clawbot:"clawbotSummary"},Yv={telegram:"telegramHelp",feishu:"feishuHelp",qq:"qqHelp",wework:"weworkHelp",dingtalk:"dingtalkHelp",workbuddy:"workbuddyHelp",clawbot:"clawbotHelp"},em={"telegram-botToken":"tipTelegramToken","feishu-appId":"tipFeishuAppId","feishu-appSecret":"tipFeishuSecret","qq-appId":"tipQqAppId","qq-secret":"tipQqSecret","wework-corpId":"tipWeworkCorp","dingtalk-clientId":"tipDingtalkClient","workbuddy-accessToken":"tipWorkbuddyToken","clawbot-apiToken":"tipClawbotApiToken"};function Qv({def:v,values:x,t:E,html:d,disabledVisual:H,onChange:O,onTest:k,testing:U,testResult:j,qrState:S,qrCodeUrl:Y,qrMessage:q,onQrLogin:ne}){const $=Pd[v.key],K=Yv[v.key],ge=ee=>{const F=$d[v.key],oe=F?F[ee]:void 0,Te=`${v.key}-${ee}`,me=em[Te],Me=ee==="allowedUserIds",je=v.sensitiveFields.includes(ee);return f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:oe?E(oe):ee}),Me?f.jsx("textarea",{className:"form-textarea mono",value:String(x[ee]??""),onChange:V=>O({[ee]:V.target.value})}):ee==="aiCommand"?f.jsxs("select",{className:"form-select",value:String(x[ee]||"claude"),onChange:V=>O({aiCommand:V.target.value}),children:[f.jsx("option",{value:"claude",children:"claude"}),f.jsx("option",{value:"codex",children:"codex"}),f.jsx("option",{value:"codebuddy",children:"codebuddy"})]}):f.jsx("input",{className:"form-input mono",type:je?"password":"text",value:String(x[ee]??""),onChange:V=>O({[ee]:V.target.value})}),ee==="allowedUserIds"?f.jsx("div",{className:"form-hint",children:E("commaSeparatedIds")}):null,me?f.jsx("div",{className:"field-inline-tip",dangerouslySetInnerHTML:{__html:d(me)}}):null]},ee)};return f.jsxs("div",{className:`platform-card ${H?"disabled":""}`,children:[f.jsxs("div",{className:"platform-header",children:[f.jsx("h3",{className:"platform-title",children:v.label}),f.jsxs("label",{className:"toggle",children:[f.jsx("input",{type:"checkbox",className:"toggle-input",checked:x.enabled??!1,onChange:ee=>O({enabled:ee.target.checked})}),f.jsx("span",{className:"toggle-switch"}),f.jsx("span",{className:"toggle-label",children:E("enabled")})]})]}),f.jsxs("div",{className:"platform-body",children:[f.jsx("p",{className:"form-hint",children:$?E($):""}),v.fields.map(ee=>ge(ee)),K?f.jsx("div",{className:"form-help",dangerouslySetInnerHTML:{__html:d(K)}}):null,f.jsx("div",{style:{display:"flex",gap:12,flexWrap:"wrap"},children:f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",disabled:U,onClick:k,children:E(U?"testing":"test")})}),j!=null&&j.text?f.jsx("div",{className:`message mt-4 ${j.ok?"message-success":"message-error"}`,children:j.text}):null,ne?f.jsxs("div",{style:{marginTop:12},children:[f.jsxs("div",{style:{display:"flex",gap:12,flexWrap:"wrap",alignItems:"center"},children:[f.jsx("button",{type:"button",className:"btn btn-primary btn-sm",disabled:S==="loading"||S==="scanning",onClick:ne,children:S==="loading"?"...":E(S==="scanning"?"qrLoginScanning":"qrLoginBtn")}),S==="scanning"?f.jsx("span",{className:"form-hint",children:E("qrScanHint")}):null]}),Y&&S==="scanning"?f.jsx("div",{style:{marginTop:12,textAlign:"center"},children:f.jsx("img",{src:Y.startsWith("data:")?Y:`data:image/png;base64,${Y}`,alt:"QR Code",style:{width:200,height:200,border:"1px solid var(--border)",borderRadius:8}})}):null,q?f.jsx("div",{className:`message mt-4 ${S==="success"?"message-success":S==="error"?"message-error":""}`,children:q}):null]}):null]})]})}function Gv({ai:v,onUpdate:x,t:E,html:d,forwardRef:H}){const[O,k]=Z.useState("claude");return f.jsxs("section",{className:"section",ref:H,children:[f.jsxs("div",{className:"section-header",children:[f.jsx("h2",{className:"section-title",children:E("aiTitle")}),f.jsx("p",{className:"section-description",children:E("aiHint")})]}),f.jsxs("div",{className:"ai-grid",children:[f.jsxs("div",{className:"ai-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("h3",{className:"card-title",children:E("aiCommonTitle")})}),f.jsxs("div",{className:"ai-card-body",children:[f.jsx("p",{className:"form-hint",style:{marginBottom:12},children:E("aiPerPlatformHint")}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("workDir")}),f.jsx("input",{className:"form-input mono",value:v.claudeWorkDir,onChange:U=>x({claudeWorkDir:U.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("hookPort")}),f.jsx("input",{type:"number",min:1,className:"form-input",value:v.hookPort||"",onChange:U=>x({hookPort:Number(U.target.value)||0})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("logLevel")}),f.jsxs("select",{className:"form-select",value:v.logLevel,onChange:U=>x({logLevel:U.target.value}),children:[f.jsx("option",{value:"default",children:E("logLevelDefault")}),f.jsx("option",{value:"DEBUG",children:"DEBUG"}),f.jsx("option",{value:"INFO",children:"INFO"}),f.jsx("option",{value:"WARN",children:"WARN"}),f.jsx("option",{value:"ERROR",children:"ERROR"})]})]})]})]}),f.jsxs("div",{className:"ai-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("div",{className:"tabs",children:["claude","codex","codebuddy"].map(U=>f.jsx("button",{type:"button",className:`tab ${O===U?"active":""}`,onClick:()=>k(U),children:U},U))})}),f.jsxs("div",{className:"ai-card-body",children:[f.jsxs("div",{className:`ai-tool-panel ${O==="claude"?"active":""}`,children:[f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("claudeProxy")}),f.jsx("input",{className:"form-input mono",value:v.claudeProxy,onChange:U=>x({claudeProxy:U.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("claudeConfigPath")}),f.jsx("input",{className:"form-input mono",readOnly:!0,style:{background:"var(--bg-secondary)"},value:v.claudeConfigPath})]})]}),f.jsxs("div",{className:`ai-tool-panel ${O==="codex"?"active":""}`,children:[f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("codexApiKey")}),f.jsx("input",{className:"form-input mono",type:"password",value:v.codexApiKey??"",onChange:U=>x({codexApiKey:U.target.value})}),f.jsx("p",{className:"field-inline-tip",dangerouslySetInnerHTML:{__html:E("codexApiKeyTip")}})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("codexCli")}),f.jsx("input",{className:"form-input mono",value:v.codexCliPath,onChange:U=>x({codexCliPath:U.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("codexProxy")}),f.jsx("input",{className:"form-input mono",value:v.codexProxy,onChange:U=>x({codexProxy:U.target.value})})]})]}),f.jsx("div",{className:`ai-tool-panel ${O==="codebuddy"?"active":""}`,children:f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("codebuddyCli")}),f.jsx("input",{className:"form-input mono",value:v.codebuddyCliPath,onChange:U=>x({codebuddyCliPath:U.target.value})})]})})]})]})]})]})}function Xv({configJson:v,setConfigJson:x,claudeSettingsJson:E,setClaudeSettingsJson:d,codexSettingsJson:H,setCodexSettingsJson:O,jsonValidation:k,onSaveConfig:U,onSaveClaude:j,onSaveCodex:S,onFormat:Y,onReset:q,meta:ne,setMessage:$,t:K,forwardRef:ge}){const ee=F=>F instanceof Error?F.message:String(F);return f.jsxs("section",{className:"section",ref:ge,children:[f.jsxs("div",{className:"section-header",children:[f.jsx("h2",{className:"section-title",children:K("configFilesTitle")}),f.jsx("p",{className:"section-description",children:K("configFilesHint")})]}),f.jsxs("div",{className:"config-files-stack",children:[f.jsxs("div",{className:"card config-file-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("h3",{className:"card-title mono",children:K("configJson")})}),f.jsxs("div",{className:"card-body",children:[f.jsx("p",{className:"form-hint",children:K("openImConfigCardHint")}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginBottom:8},children:[f.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:Y,children:K("formatJson")}),f.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:q,children:K("resetJson")})]}),f.jsx("textarea",{className:"form-input mono",rows:18,spellCheck:!1,value:v,onChange:F=>x(F.target.value),style:{minHeight:360,resize:"vertical",whiteSpace:"pre"}}),k?f.jsx("div",{className:`message mt-4 ${k.type==="success"?"message-success":"message-error"}`,children:k.text}):null,f.jsx("div",{style:{marginTop:10},children:f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",onClick:()=>void(async()=>{try{await U(),$({text:K("saveOk"),type:"success"})}catch(F){$({text:ee(F),type:"error"})}})(),children:K("saveBtn")})})]})]}),f.jsxs("div",{className:"card config-file-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("h3",{className:"card-title mono",children:K("claudeSettingsLabel")})}),f.jsxs("div",{className:"card-body",children:[f.jsx("p",{className:"form-hint",children:K("claudeSettingsCardHint")}),f.jsx("textarea",{className:"form-input mono",rows:12,spellCheck:!1,value:E,onChange:F=>d(F.target.value),style:{minHeight:220,resize:"vertical",whiteSpace:"pre"}}),f.jsx("div",{style:{marginTop:10},children:f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",onClick:()=>void(async()=>{try{await j(),$({text:K("saveOk"),type:"success"})}catch(F){$({text:ee(F),type:"error"})}})(),children:K("saveBtn")})})]})]}),f.jsxs("div",{className:"card config-file-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("h3",{className:"card-title mono",children:K("codexSettingsLabel")})}),f.jsxs("div",{className:"card-body",children:[f.jsx("p",{className:"form-hint",children:K("codexSettingsCardHint")}),f.jsx("textarea",{className:"form-input mono",rows:8,spellCheck:!1,value:H,onChange:F=>O(F.target.value),style:{minHeight:160,resize:"vertical",whiteSpace:"pre"}}),f.jsx("div",{style:{marginTop:10},children:f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",onClick:()=>void(async()=>{try{await S(),$({text:K("saveOk"),type:"success"})}catch(F){$({text:ee(F),type:"error"})}})(),children:K("saveBtn")})})]})]})]}),f.jsx("p",{className:"form-hint",style:{marginTop:24},children:ne.configPath?`${K("configJson")}: ${ne.configPath}`:""})]})}function Qd(v){return v instanceof Error?v.message:String(v)}function Zv(){return{platforms:{telegram:{enabled:!1,aiCommand:"claude",botToken:"",proxy:"",allowedUserIds:""},feishu:{enabled:!1,aiCommand:"claude",appId:"",appSecret:"",allowedUserIds:""},qq:{enabled:!1,aiCommand:"claude",appId:"",secret:"",allowedUserIds:""},wework:{enabled:!1,aiCommand:"claude",corpId:"",secret:"",allowedUserIds:""},dingtalk:{enabled:!1,aiCommand:"claude",clientId:"",clientSecret:"",cardTemplateId:"",allowedUserIds:""},workbuddy:{enabled:!1,aiCommand:"claude",accessToken:"",refreshToken:"",userId:"",baseUrl:"",allowedUserIds:""},clawbot:{enabled:!1,aiCommand:"claude",apiUrl:"http://127.0.0.1:26322",apiToken:"",allowedUserIds:""}},ai:{claudeWorkDir:"",claudeConfigPath:"",claudeProxy:"",codexCliPath:"codex",codexProxy:"",codebuddyCliPath:"codebuddy",hookPort:0,logLevel:"default"}}}const Ba=["welcome","ai","platforms","credentials","review"];function Of(v){return Ba.indexOf(v)}function kv({request:v,t:x,html:E,onComplete:d,initialPayload:H}){const[O,k]=Z.useState("welcome"),[U,j]=Z.useState(H??Zv()),[S,Y]=Z.useState(!1),[q,ne]=Z.useState(""),[$,K]=Z.useState("idle"),[ge,ee]=Z.useState(""),[F,oe]=Z.useState(""),[Te,me]=Z.useState("idle"),Me=Z.useCallback((m,A)=>{j(D=>({...D,platforms:{...D.platforms,[m]:{...D.platforms[m],...A}}}))},[]),je=Z.useCallback(m=>{j(A=>({...A,ai:{...A.ai,...m}}))},[]),V=()=>{switch(O){case"welcome":return!0;case"ai":return!0;case"platforms":return Bl.some(m=>U.platforms[m].enabled);case"credentials":return Bl.filter(m=>U.platforms[m].enabled).every(m=>{const A=It.find(D=>D.key===m);return A?A.requiredFields.every(D=>String(U.platforms[m][D]??"").trim()!==""):!0});case"review":return!0}},Ge=()=>{const m=Of(O);m<Ba.length-1&&k(Ba[m+1])},Ie=()=>{const m=Of(O);m>0&&k(Ba[m-1])},Ml=async()=>{K("loading"),oe(""),ee("");try{const m=await v("/api/clawbot/qr-login/start");if(!m.success||!m.qrcodeUrl||!m.sessionKey){K("error"),oe(m.error||x("qrLoginFailed"));return}ee(m.qrcodeUrl),K("scanning");const A=await v("/api/clawbot/qr-login/wait",{method:"POST",body:JSON.stringify({sessionKey:m.sessionKey,qrcode:m.sessionKey,qrcodeUrl:m.qrcodeUrl})});A.success&&A.botToken?(K("success"),oe(x("qrLoginSuccess")),Me("clawbot",{apiToken:A.botToken,...A.baseUrl?{apiUrl:A.baseUrl}:{},enabled:!0})):(K("error"),oe(A.message||A.error||x("qrLoginFailed")))}catch(m){K("error"),oe(Qd(m))}},el=async()=>{ne(""),Y(!0),me("saving");try{await v("/api/config/save",{method:"POST",body:JSON.stringify(U)}),me("starting"),await v("/api/service/start",{method:"POST"}),me("done")}catch(m){ne(Qd(m)),me("error")}finally{Y(!1)}},Ce=Of(O),Ol=(Ce+1)/Ba.length*100,ll=(m,A,D)=>{const le=U.platforms[D],se=$d[D],o=se?se[A]:void 0,z=`${D}-${A}`,_=em[z],w=m.sensitiveFields.includes(A);return f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:o?x(o):A}),A==="allowedUserIds"?f.jsxs(f.Fragment,{children:[f.jsx("textarea",{className:"form-textarea mono",value:String(le[A]??""),onChange:G=>Me(D,{[A]:G.target.value})}),f.jsx("div",{className:"form-hint",children:x("commaSeparatedIds")})]}):A==="aiCommand"?f.jsxs("select",{className:"form-select",value:String(le[A]||"claude"),onChange:G=>Me(D,{aiCommand:G.target.value}),children:[f.jsx("option",{value:"claude",children:"claude"}),f.jsx("option",{value:"codex",children:"codex"}),f.jsx("option",{value:"codebuddy",children:"codebuddy"})]}):f.jsx("input",{className:"form-input mono",type:w?"password":"text",value:String(le[A]??""),onChange:G=>Me(D,{[A]:G.target.value})}),_?f.jsx("div",{className:"field-inline-tip",dangerouslySetInnerHTML:{__html:E(_)}}):null]},A)},$e=()=>{switch(O){case"welcome":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("div",{className:"wizard-step-icon",children:"🚀"}),f.jsx("h2",{className:"wizard-step-title",children:x("wizardWelcomeTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardWelcomeDesc")}),f.jsxs("div",{className:"wizard-steps-list",children:[f.jsxs("div",{className:"wizard-steps-item",children:[f.jsx("span",{className:"wizard-steps-num",children:"1"}),f.jsx("span",{children:x("wizardStepAi")})]}),f.jsxs("div",{className:"wizard-steps-item",children:[f.jsx("span",{className:"wizard-steps-num",children:"2"}),f.jsx("span",{children:x("wizardStepPlatforms")})]}),f.jsxs("div",{className:"wizard-steps-item",children:[f.jsx("span",{className:"wizard-steps-num",children:"3"}),f.jsx("span",{children:x("wizardStepCredentials")})]}),f.jsxs("div",{className:"wizard-steps-item",children:[f.jsx("span",{className:"wizard-steps-num",children:"4"}),f.jsx("span",{children:x("wizardStepReview")})]})]})]});case"ai":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("h2",{className:"wizard-step-title",children:x("wizardAiTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardAiDesc")}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:x("workDir")}),f.jsx("input",{className:"form-input mono",placeholder:"/path/to/project",value:U.ai.claudeWorkDir,onChange:m=>je({claudeWorkDir:m.target.value})}),f.jsx("p",{className:"form-hint",children:x("wizardWorkDirHint")})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:x("codexCli")}),f.jsx("input",{className:"form-input mono",value:U.ai.codexCliPath,onChange:m=>je({codexCliPath:m.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:x("codebuddyCli")}),f.jsx("input",{className:"form-input mono",value:U.ai.codebuddyCliPath,onChange:m=>je({codebuddyCliPath:m.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:x("logLevel")}),f.jsxs("select",{className:"form-select",value:U.ai.logLevel,onChange:m=>je({logLevel:m.target.value}),children:[f.jsx("option",{value:"default",children:x("logLevelDefault")}),f.jsx("option",{value:"DEBUG",children:"DEBUG"}),f.jsx("option",{value:"INFO",children:"INFO"}),f.jsx("option",{value:"WARN",children:"WARN"}),f.jsx("option",{value:"ERROR",children:"ERROR"})]})]})]});case"platforms":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("h2",{className:"wizard-step-title",children:x("wizardPlatformsTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardPlatformsDesc")}),f.jsx("div",{className:"wizard-platform-grid",children:It.map(m=>{const A=m.key,D=U.platforms[A].enabled;return f.jsxs("button",{type:"button",className:`wizard-platform-chip ${D?"selected":""}`,onClick:()=>Me(A,{enabled:!D}),children:[f.jsx("div",{className:"wizard-platform-chip-name",children:m.label}),f.jsx("div",{className:"wizard-platform-chip-hint",children:x(Pd[A]||"")})]},A)})}),!Bl.some(m=>U.platforms[m].enabled)&&f.jsx("p",{className:"form-hint",style:{color:"var(--warning-text)",marginTop:12},children:x("wizardPickAtLeastOne")})]});case"credentials":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("h2",{className:"wizard-step-title",children:x("wizardCredentialsTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardCredentialsDesc")}),Bl.filter(m=>U.platforms[m].enabled).map(m=>{const A=It.find(D=>D.key===m);return f.jsxs("div",{className:"wizard-credential-card",children:[f.jsx("h3",{className:"wizard-credential-name",children:A.label}),A.fields.map(D=>ll(A,D,m)),m==="clawbot"&&f.jsxs("div",{style:{marginTop:12},children:[f.jsxs("div",{style:{display:"flex",gap:12,flexWrap:"wrap",alignItems:"center"},children:[f.jsx("button",{type:"button",className:"btn btn-primary btn-sm",disabled:$==="loading"||$==="scanning",onClick:()=>void Ml(),children:$==="loading"?"...":x($==="scanning"?"qrLoginScanning":"qrLoginBtn")}),$==="scanning"?f.jsx("span",{className:"form-hint",children:x("qrScanHint")}):null]}),ge&&$==="scanning"&&f.jsx("div",{style:{marginTop:12,textAlign:"center"},children:f.jsx("img",{src:ge.startsWith("data:")?ge:`data:image/png;base64,${ge}`,alt:"QR Code",style:{width:180,height:180,border:"1px solid var(--border)",borderRadius:8}})}),F&&f.jsx("div",{className:`message mt-4 ${$==="success"?"message-success":$==="error"?"message-error":""}`,children:F})]})]},m)})]});case"review":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("h2",{className:"wizard-step-title",children:x("wizardReviewTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardReviewDesc")}),Te==="done"?f.jsxs("div",{className:"wizard-done",children:[f.jsx("div",{className:"wizard-step-icon",children:"✅"}),f.jsx("h2",{className:"wizard-step-title",children:x("wizardDoneTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardDoneDesc")}),f.jsx("button",{type:"button",className:"btn btn-primary",onClick:d,children:x("wizardGoToDashboard")})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"wizard-review-section",children:[f.jsx("h3",{className:"wizard-review-heading",children:x("aiTitle")}),f.jsxs("div",{className:"wizard-review-kv",children:[f.jsx("span",{children:x("workDir")}),f.jsx("code",{children:U.ai.claudeWorkDir||"—"})]}),f.jsxs("div",{className:"wizard-review-kv",children:[f.jsx("span",{children:x("codexCli")}),f.jsx("code",{children:U.ai.codexCliPath})]}),f.jsxs("div",{className:"wizard-review-kv",children:[f.jsx("span",{children:x("logLevel")}),f.jsx("code",{children:U.ai.logLevel})]})]}),f.jsxs("div",{className:"wizard-review-section",children:[f.jsx("h3",{className:"wizard-review-heading",children:x("platformsTitle")}),f.jsx("div",{className:"wizard-review-platforms",children:Bl.filter(m=>U.platforms[m].enabled).map(m=>{const A=It.find(le=>le.key===m),D=U.platforms[m].aiCommand||"claude";return f.jsxs("div",{className:"wizard-review-platform-badge",children:[f.jsx("strong",{children:A.label}),f.jsx("span",{className:"wizard-review-platform-cmd",children:D})]},m)})})]}),q&&f.jsx("div",{className:"message message-error",style:{marginTop:16},children:q}),Te!=="idle"&&Te!=="error"&&f.jsxs("div",{className:"wizard-progress-indicator",children:[Te==="saving"&&x("wizardSaving"),Te==="starting"&&x("wizardStarting")]})]})]})}};return f.jsxs("div",{className:"wizard",children:[f.jsx("div",{className:"wizard-progress-bar",children:f.jsx("div",{className:"wizard-progress-fill",style:{width:`${Ol}%`}})}),f.jsx("div",{className:"wizard-step-labels",children:Ba.map((m,A)=>f.jsxs("button",{type:"button",className:`wizard-step-label ${A===Ce?"active":A<Ce?"done":""}`,onClick:()=>{A<Ce&&k(m)},disabled:A>Ce,children:[f.jsx("span",{className:"wizard-step-label-num",children:A+1}),f.jsx("span",{className:"wizard-step-label-text",children:x(`wizardStepLabel_${m}`)})]},m))}),f.jsx("div",{className:"wizard-content",children:$e()}),Te!=="done"&&f.jsxs("div",{className:"wizard-nav",children:[Ce>0&&f.jsx("button",{type:"button",className:"btn btn-secondary",onClick:Ie,disabled:S,children:x("wizardBack")}),f.jsx("div",{style:{flex:1}}),O==="review"?f.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>void el(),disabled:S||!V(),children:x(S?"wizardWorking":"wizardFinish")}):f.jsx("button",{type:"button",className:"btn btn-primary",onClick:Ge,disabled:!V(),children:x("wizardNext")})]})]})}function qa(v){return v instanceof Error?v.message:String(v)}function Gd(v){return JSON.stringify(JSON.parse(v),null,2)+`
49
+ `).replace(Yh,"")}function Ir(e,l){return l=Wr(l),Wr(e)===l}function be(e,l,t,a,n,u){switch(t){case"children":typeof a=="string"?l==="body"||l==="textarea"&&a===""||na(e,a):(typeof a=="number"||typeof a=="bigint")&&l!=="body"&&na(e,""+a);break;case"className":Jn(e,"class",a);break;case"tabIndex":Jn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Jn(e,t,a);break;case"style":Wf(e,a,u);break;case"data":if(l!=="object"){Jn(e,"data",a);break}case"src":case"href":if(a===""&&(l!=="a"||t!=="href")){e.removeAttribute(t);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(t);break}a=In(""+a),e.setAttribute(t,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(t,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(t==="formAction"?(l!=="input"&&be(e,l,"name",n.name,n,null),be(e,l,"formEncType",n.formEncType,n,null),be(e,l,"formMethod",n.formMethod,n,null),be(e,l,"formTarget",n.formTarget,n,null)):(be(e,l,"encType",n.encType,n,null),be(e,l,"method",n.method,n,null),be(e,l,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(t);break}a=In(""+a),e.setAttribute(t,a);break;case"onClick":a!=null&&(e.onclick=Xl);break;case"onScroll":a!=null&&ae("scroll",e);break;case"onScrollEnd":a!=null&&ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(t=a.__html,t!=null){if(n.children!=null)throw Error(d(60));e.innerHTML=t}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}t=In(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(t,""+a):e.removeAttribute(t);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(t,""):e.removeAttribute(t);break;case"capture":case"download":a===!0?e.setAttribute(t,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(t,a):e.removeAttribute(t);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(t,a):e.removeAttribute(t);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(t):e.setAttribute(t,a);break;case"popover":ae("beforetoggle",e),ae("toggle",e),Vn(e,"popover",a);break;case"xlinkActuate":Gl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Gl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Gl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Gl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Gl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Gl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Vn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(t=hm.get(t)||t,Vn(e,t,a))}}function nf(e,l,t,a,n,u){switch(t){case"style":Wf(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(t=a.__html,t!=null){if(n.children!=null)throw Error(d(60));e.innerHTML=t}}break;case"children":typeof a=="string"?na(e,a):(typeof a=="number"||typeof a=="bigint")&&na(e,""+a);break;case"onScroll":a!=null&&ae("scroll",e);break;case"onScrollEnd":a!=null&&ae("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Xl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yf.hasOwnProperty(t))e:{if(t[0]==="o"&&t[1]==="n"&&(n=t.endsWith("Capture"),l=t.slice(2,n?t.length-7:void 0),u=e[tl]||null,u=u!=null?u[t]:null,typeof u=="function"&&e.removeEventListener(l,u,n),typeof a=="function")){typeof u!="function"&&u!==null&&(t in e?e[t]=null:e.hasAttribute(t)&&e.removeAttribute(t)),e.addEventListener(l,a,n);break e}t in e?e[t]=a:a===!0?e.setAttribute(t,""):Vn(e,t,a)}}}function We(e,l,t){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ae("error",e),ae("load",e);var a=!1,n=!1,u;for(u in t)if(t.hasOwnProperty(u)){var i=t[u];if(i!=null)switch(u){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,l));default:be(e,l,u,i,t,null)}}n&&be(e,l,"srcSet",t.srcSet,t,null),a&&be(e,l,"src",t.src,t,null);return;case"input":ae("invalid",e);var c=u=i=n=null,s=null,g=null;for(a in t)if(t.hasOwnProperty(a)){var T=t[a];if(T!=null)switch(a){case"name":n=T;break;case"type":i=T;break;case"checked":s=T;break;case"defaultChecked":g=T;break;case"value":u=T;break;case"defaultValue":c=T;break;case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(d(137,l));break;default:be(e,l,a,T,t,null)}}kf(e,u,c,s,g,i,n,!1);return;case"select":ae("invalid",e),a=i=u=null;for(n in t)if(t.hasOwnProperty(n)&&(c=t[n],c!=null))switch(n){case"value":u=c;break;case"defaultValue":i=c;break;case"multiple":a=c;default:be(e,l,n,c,t,null)}l=u,t=i,e.multiple=!!a,l!=null?aa(e,!!a,l,!1):t!=null&&aa(e,!!a,t,!0);return;case"textarea":ae("invalid",e),u=n=a=null;for(i in t)if(t.hasOwnProperty(i)&&(c=t[i],c!=null))switch(i){case"value":a=c;break;case"defaultValue":n=c;break;case"children":u=c;break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(d(91));break;default:be(e,l,i,c,t,null)}Vf(e,a,n,u);return;case"option":for(s in t)if(t.hasOwnProperty(s)&&(a=t[s],a!=null))switch(s){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:be(e,l,s,a,t,null)}return;case"dialog":ae("beforetoggle",e),ae("toggle",e),ae("cancel",e),ae("close",e);break;case"iframe":case"object":ae("load",e);break;case"video":case"audio":for(a=0;a<On.length;a++)ae(On[a],e);break;case"image":ae("error",e),ae("load",e);break;case"details":ae("toggle",e);break;case"embed":case"source":case"link":ae("error",e),ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(g in t)if(t.hasOwnProperty(g)&&(a=t[g],a!=null))switch(g){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,l));default:be(e,l,g,a,t,null)}return;default:if(pi(l)){for(T in t)t.hasOwnProperty(T)&&(a=t[T],a!==void 0&&nf(e,l,T,a,t,void 0));return}}for(c in t)t.hasOwnProperty(c)&&(a=t[c],a!=null&&be(e,l,c,a,t,null))}function Qh(e,l,t,a){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,u=null,i=null,c=null,s=null,g=null,T=null;for(b in t){var N=t[b];if(t.hasOwnProperty(b)&&N!=null)switch(b){case"checked":break;case"value":break;case"defaultValue":s=N;default:a.hasOwnProperty(b)||be(e,l,b,null,a,N)}}for(var p in a){var b=a[p];if(N=t[p],a.hasOwnProperty(p)&&(b!=null||N!=null))switch(p){case"type":u=b;break;case"name":n=b;break;case"checked":g=b;break;case"defaultChecked":T=b;break;case"value":i=b;break;case"defaultValue":c=b;break;case"children":case"dangerouslySetInnerHTML":if(b!=null)throw Error(d(137,l));break;default:b!==N&&be(e,l,p,b,a,N)}}yi(e,i,c,s,g,T,u,n);return;case"select":b=i=c=p=null;for(u in t)if(s=t[u],t.hasOwnProperty(u)&&s!=null)switch(u){case"value":break;case"multiple":b=s;default:a.hasOwnProperty(u)||be(e,l,u,null,a,s)}for(n in a)if(u=a[n],s=t[n],a.hasOwnProperty(n)&&(u!=null||s!=null))switch(n){case"value":p=u;break;case"defaultValue":c=u;break;case"multiple":i=u;default:u!==s&&be(e,l,n,u,a,s)}l=c,t=i,a=b,p!=null?aa(e,!!t,p,!1):!!a!=!!t&&(l!=null?aa(e,!!t,l,!0):aa(e,!!t,t?[]:"",!1));return;case"textarea":b=p=null;for(c in t)if(n=t[c],t.hasOwnProperty(c)&&n!=null&&!a.hasOwnProperty(c))switch(c){case"value":break;case"children":break;default:be(e,l,c,null,a,n)}for(i in a)if(n=a[i],u=t[i],a.hasOwnProperty(i)&&(n!=null||u!=null))switch(i){case"value":p=n;break;case"defaultValue":b=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(d(91));break;default:n!==u&&be(e,l,i,n,a,u)}Kf(e,p,b);return;case"option":for(var R in t)if(p=t[R],t.hasOwnProperty(R)&&p!=null&&!a.hasOwnProperty(R))switch(R){case"selected":e.selected=!1;break;default:be(e,l,R,null,a,p)}for(s in a)if(p=a[s],b=t[s],a.hasOwnProperty(s)&&p!==b&&(p!=null||b!=null))switch(s){case"selected":e.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:be(e,l,s,p,a,b)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var X in t)p=t[X],t.hasOwnProperty(X)&&p!=null&&!a.hasOwnProperty(X)&&be(e,l,X,null,a,p);for(g in a)if(p=a[g],b=t[g],a.hasOwnProperty(g)&&p!==b&&(p!=null||b!=null))switch(g){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(d(137,l));break;default:be(e,l,g,p,a,b)}return;default:if(pi(l)){for(var Se in t)p=t[Se],t.hasOwnProperty(Se)&&p!==void 0&&!a.hasOwnProperty(Se)&&nf(e,l,Se,void 0,a,p);for(T in a)p=a[T],b=t[T],!a.hasOwnProperty(T)||p===b||p===void 0&&b===void 0||nf(e,l,T,p,a,b);return}}for(var h in t)p=t[h],t.hasOwnProperty(h)&&p!=null&&!a.hasOwnProperty(h)&&be(e,l,h,null,a,p);for(N in a)p=a[N],b=t[N],!a.hasOwnProperty(N)||p===b||p==null&&b==null||be(e,l,N,p,a,b)}function Fr(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gh(){if(typeof performance.getEntriesByType=="function"){for(var e=0,l=0,t=performance.getEntriesByType("resource"),a=0;a<t.length;a++){var n=t[a],u=n.transferSize,i=n.initiatorType,c=n.duration;if(u&&c&&Fr(i)){for(i=0,c=n.responseEnd,a+=1;a<t.length;a++){var s=t[a],g=s.startTime;if(g>c)break;var T=s.transferSize,N=s.initiatorType;T&&Fr(N)&&(s=s.responseEnd,i+=T*(s<c?1:(c-g)/(s-g)))}if(--a,l+=8*(u+i)/(n.duration/1e3),e++,10<e)break}}if(0<e)return l/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var uf=null,cf=null;function ku(e){return e.nodeType===9?e:e.ownerDocument}function $r(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pr(e,l){if(e===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&l==="foreignObject"?0:e}function ff(e,l){return e==="textarea"||e==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var sf=null;function Xh(){var e=window.event;return e&&e.type==="popstate"?e===sf?!1:(sf=e,!0):(sf=null,!1)}var ed=typeof setTimeout=="function"?setTimeout:void 0,Zh=typeof clearTimeout=="function"?clearTimeout:void 0,ld=typeof Promise=="function"?Promise:void 0,kh=typeof queueMicrotask=="function"?queueMicrotask:typeof ld<"u"?function(e){return ld.resolve(null).then(e).catch(Kh)}:ed;function Kh(e){setTimeout(function(){throw e})}function Ct(e){return e==="head"}function td(e,l){var t=l,a=0;do{var n=t.nextSibling;if(e.removeChild(t),n&&n.nodeType===8)if(t=n.data,t==="/$"||t==="/&"){if(a===0){e.removeChild(n),wa(l);return}a--}else if(t==="$"||t==="$?"||t==="$~"||t==="$!"||t==="&")a++;else if(t==="html")Dn(e.ownerDocument.documentElement);else if(t==="head"){t=e.ownerDocument.head,Dn(t);for(var u=t.firstChild;u;){var i=u.nextSibling,c=u.nodeName;u[Ja]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&u.rel.toLowerCase()==="stylesheet"||t.removeChild(u),u=i}}else t==="body"&&Dn(e.ownerDocument.body);t=n}while(t);wa(l)}function ad(e,l){var t=e;e=0;do{var a=t.nextSibling;if(t.nodeType===1?l?(t._stashedDisplay=t.style.display,t.style.display="none"):(t.style.display=t._stashedDisplay||"",t.getAttribute("style")===""&&t.removeAttribute("style")):t.nodeType===3&&(l?(t._stashedText=t.nodeValue,t.nodeValue=""):t.nodeValue=t._stashedText||""),a&&a.nodeType===8)if(t=a.data,t==="/$"){if(e===0)break;e--}else t!=="$"&&t!=="$?"&&t!=="$~"&&t!=="$!"||e++;t=a}while(t)}function of(e){var l=e.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var t=l;switch(l=l.nextSibling,t.nodeName){case"HTML":case"HEAD":case"BODY":of(t),hi(t);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(t.rel.toLowerCase()==="stylesheet")continue}e.removeChild(t)}}function Vh(e,l,t,a){for(;e.nodeType===1;){var n=t;if(e.nodeName.toLowerCase()!==l.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ja])switch(l){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(l==="input"&&e.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=El(e.nextSibling),e===null)break}return null}function Jh(e,l,t){if(l==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=El(e.nextSibling),e===null))return null;return e}function nd(e,l){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=El(e.nextSibling),e===null))return null;return e}function rf(e){return e.data==="$?"||e.data==="$~"}function df(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Wh(e,l){var t=e.ownerDocument;if(e.data==="$~")e._reactRetry=l;else if(e.data!=="$?"||t.readyState!=="loading")l();else{var a=function(){l(),t.removeEventListener("DOMContentLoaded",a)};t.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function El(e){for(;e!=null;e=e.nextSibling){var l=e.nodeType;if(l===1||l===3)break;if(l===8){if(l=e.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return e}var mf=null;function ud(e){e=e.nextSibling;for(var l=0;e;){if(e.nodeType===8){var t=e.data;if(t==="/$"||t==="/&"){if(l===0)return El(e.nextSibling);l--}else t!=="$"&&t!=="$!"&&t!=="$?"&&t!=="$~"&&t!=="&"||l++}e=e.nextSibling}return null}function id(e){e=e.previousSibling;for(var l=0;e;){if(e.nodeType===8){var t=e.data;if(t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"){if(l===0)return e;l--}else t!=="/$"&&t!=="/&"||l++}e=e.previousSibling}return null}function cd(e,l,t){switch(l=ku(t),e){case"html":if(e=l.documentElement,!e)throw Error(d(452));return e;case"head":if(e=l.head,!e)throw Error(d(453));return e;case"body":if(e=l.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function Dn(e){for(var l=e.attributes;l.length;)e.removeAttributeNode(l[0]);hi(e)}var jl=new Map,fd=new Set;function Ku(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ut=A.d;A.d={f:Ih,r:Fh,D:$h,C:Ph,L:ev,m:lv,X:av,S:tv,M:nv};function Ih(){var e=ut.f(),l=qu();return e||l}function Fh(e){var l=ea(e);l!==null&&l.tag===5&&l.type==="form"?Co(l):ut.r(e)}var Ua=typeof document>"u"?null:document;function sd(e,l,t){var a=Ua;if(a&&typeof l=="string"&&l){var n=Sl(l);n='link[rel="'+e+'"][href="'+n+'"]',typeof t=="string"&&(n+='[crossorigin="'+t+'"]'),fd.has(n)||(fd.add(n),e={rel:e,crossOrigin:t,href:l},a.querySelector(n)===null&&(l=a.createElement("link"),We(l,"link",e),Xe(l),a.head.appendChild(l)))}}function $h(e){ut.D(e),sd("dns-prefetch",e,null)}function Ph(e,l){ut.C(e,l),sd("preconnect",e,l)}function ev(e,l,t){ut.L(e,l,t);var a=Ua;if(a&&e&&l){var n='link[rel="preload"][as="'+Sl(l)+'"]';l==="image"&&t&&t.imageSrcSet?(n+='[imagesrcset="'+Sl(t.imageSrcSet)+'"]',typeof t.imageSizes=="string"&&(n+='[imagesizes="'+Sl(t.imageSizes)+'"]')):n+='[href="'+Sl(e)+'"]';var u=n;switch(l){case"style":u=Ma(e);break;case"script":u=Ha(e)}jl.has(u)||(e=q({rel:"preload",href:l==="image"&&t&&t.imageSrcSet?void 0:e,as:l},t),jl.set(u,e),a.querySelector(n)!==null||l==="style"&&a.querySelector(Un(u))||l==="script"&&a.querySelector(Mn(u))||(l=a.createElement("link"),We(l,"link",e),Xe(l),a.head.appendChild(l)))}}function lv(e,l){ut.m(e,l);var t=Ua;if(t&&e){var a=l&&typeof l.as=="string"?l.as:"script",n='link[rel="modulepreload"][as="'+Sl(a)+'"][href="'+Sl(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ha(e)}if(!jl.has(u)&&(e=q({rel:"modulepreload",href:e},l),jl.set(u,e),t.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(t.querySelector(Mn(u)))return}a=t.createElement("link"),We(a,"link",e),Xe(a),t.head.appendChild(a)}}}function tv(e,l,t){ut.S(e,l,t);var a=Ua;if(a&&e){var n=la(a).hoistableStyles,u=Ma(e);l=l||"default";var i=n.get(u);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(Un(u)))c.loading=5;else{e=q({rel:"stylesheet",href:e,"data-precedence":l},t),(t=jl.get(u))&&hf(e,t);var s=i=a.createElement("link");Xe(s),We(s,"link",e),s._p=new Promise(function(g,T){s.onload=g,s.onerror=T}),s.addEventListener("load",function(){c.loading|=1}),s.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Vu(i,l,a)}i={type:"stylesheet",instance:i,count:1,state:c},n.set(u,i)}}}function av(e,l){ut.X(e,l);var t=Ua;if(t&&e){var a=la(t).hoistableScripts,n=Ha(e),u=a.get(n);u||(u=t.querySelector(Mn(n)),u||(e=q({src:e,async:!0},l),(l=jl.get(n))&&vf(e,l),u=t.createElement("script"),Xe(u),We(u,"link",e),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function nv(e,l){ut.M(e,l);var t=Ua;if(t&&e){var a=la(t).hoistableScripts,n=Ha(e),u=a.get(n);u||(u=t.querySelector(Mn(n)),u||(e=q({src:e,async:!0,type:"module"},l),(l=jl.get(n))&&vf(e,l),u=t.createElement("script"),Xe(u),We(u,"link",e),t.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function od(e,l,t,a){var n=(n=P.current)?Ku(n):null;if(!n)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof t.precedence=="string"&&typeof t.href=="string"?(l=Ma(t.href),t=la(n).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(t.rel==="stylesheet"&&typeof t.href=="string"&&typeof t.precedence=="string"){e=Ma(t.href);var u=la(n).hoistableStyles,i=u.get(e);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,i),(u=n.querySelector(Un(e)))&&!u._p&&(i.instance=u,i.state.loading=5),jl.has(e)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},jl.set(e,t),u||uv(n,e,t,i.state))),l&&a===null)throw Error(d(528,""));return i}if(l&&a!==null)throw Error(d(529,""));return null;case"script":return l=t.async,t=t.src,typeof t=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Ha(t),t=la(n).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function Ma(e){return'href="'+Sl(e)+'"'}function Un(e){return'link[rel="stylesheet"]['+e+"]"}function rd(e){return q({},e,{"data-precedence":e.precedence,precedence:null})}function uv(e,l,t,a){e.querySelector('link[rel="preload"][as="style"]['+l+"]")?a.loading=1:(l=e.createElement("link"),a.preload=l,l.addEventListener("load",function(){return a.loading|=1}),l.addEventListener("error",function(){return a.loading|=2}),We(l,"link",t),Xe(l),e.head.appendChild(l))}function Ha(e){return'[src="'+Sl(e)+'"]'}function Mn(e){return"script[async]"+e}function dd(e,l,t){if(l.count++,l.instance===null)switch(l.type){case"style":var a=e.querySelector('style[data-href~="'+Sl(t.href)+'"]');if(a)return l.instance=a,Xe(a),a;var n=q({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Xe(a),We(a,"style",n),Vu(a,t.precedence,e),l.instance=a;case"stylesheet":n=Ma(t.href);var u=e.querySelector(Un(n));if(u)return l.state.loading|=4,l.instance=u,Xe(u),u;a=rd(t),(n=jl.get(n))&&hf(a,n),u=(e.ownerDocument||e).createElement("link"),Xe(u);var i=u;return i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),We(u,"link",a),l.state.loading|=4,Vu(u,t.precedence,e),l.instance=u;case"script":return u=Ha(t.src),(n=e.querySelector(Mn(u)))?(l.instance=n,Xe(n),n):(a=t,(n=jl.get(u))&&(a=q({},t),vf(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Xe(n),We(n,"link",a),e.head.appendChild(n),l.instance=n);case"void":return null;default:throw Error(d(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(a=l.instance,l.state.loading|=4,Vu(a,t.precedence,e));return l.instance}function Vu(e,l,t){for(var a=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i<a.length;i++){var c=a[i];if(c.dataset.precedence===l)u=c;else if(u!==n)break}u?u.parentNode.insertBefore(e,u.nextSibling):(l=t.nodeType===9?t.head:t,l.insertBefore(e,l.firstChild))}function hf(e,l){e.crossOrigin==null&&(e.crossOrigin=l.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=l.referrerPolicy),e.title==null&&(e.title=l.title)}function vf(e,l){e.crossOrigin==null&&(e.crossOrigin=l.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=l.referrerPolicy),e.integrity==null&&(e.integrity=l.integrity)}var Ju=null;function md(e,l,t){if(Ju===null){var a=new Map,n=Ju=new Map;n.set(t,a)}else n=Ju,a=n.get(t),a||(a=new Map,n.set(t,a));if(a.has(e))return a;for(a.set(e,null),t=t.getElementsByTagName(e),n=0;n<t.length;n++){var u=t[n];if(!(u[Ja]||u[ke]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var i=u.getAttribute(l)||"";i=e+i;var c=a.get(i);c?c.push(u):a.set(i,[u])}}return a}function hd(e,l,t){e=e.ownerDocument||e,e.head.insertBefore(t,l==="title"?e.querySelector("head > title"):null)}function iv(e,l,t){if(t===1||l.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return e=l.disabled,typeof l.precedence=="string"&&e==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function vd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function cv(e,l,t,a){if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var n=Ma(a.href),u=l.querySelector(Un(n));if(u){l=u._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(e.count++,e=Wu.bind(e),l.then(e,e)),t.state.loading|=4,t.instance=u,Xe(u);return}u=l.ownerDocument||l,a=rd(a),(n=jl.get(n))&&hf(a,n),u=u.createElement("link"),Xe(u);var i=u;i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),We(u,"link",a),t.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(t,l),(l=t.state.preload)&&(t.state.loading&3)===0&&(e.count++,t=Wu.bind(e),l.addEventListener("load",t),l.addEventListener("error",t))}}var yf=0;function fv(e,l){return e.stylesheets&&e.count===0&&Fu(e,e.stylesheets),0<e.count||0<e.imgCount?function(t){var a=setTimeout(function(){if(e.stylesheets&&Fu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+l);0<e.imgBytes&&yf===0&&(yf=62500*Gh());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Fu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>yf?50:800)+l);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Wu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Iu=null;function Fu(e,l){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Iu=new Map,l.forEach(sv,e),Iu=null,Wu.call(e))}function sv(e,l){if(!(l.state.loading&4)){var t=Iu.get(e);if(t)var a=t.get(null);else{t=new Map,Iu.set(e,t);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var i=n[u];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(t.set(i.dataset.precedence,i),a=i)}a&&t.set(null,a)}n=l.instance,i=n.getAttribute("data-precedence"),u=t.get(i)||a,u===a&&t.set(null,n),t.set(i,n),this.count++,a=Wu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),u?u.parentNode.insertBefore(n,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),l.state.loading|=4}}var Hn={$$typeof:Te,Provider:null,Consumer:null,_currentValue:D,_currentValue2:D,_threadCount:0};function ov(e,l,t,a,n,u,i,c,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=oi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.hiddenUpdates=oi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function yd(e,l,t,a,n,u,i,c,s,g,T,N){return e=new ov(e,l,t,i,s,g,T,N,c),l=1,u===!0&&(l|=24),u=dl(3,null,null,l),e.current=u,u.stateNode=e,l=Ji(),l.refCount++,e.pooledCache=l,l.refCount++,u.memoizedState={element:a,isDehydrated:t,cache:l},$i(u),e}function gd(e){return e?(e=ra,e):ra}function pd(e,l,t,a,n,u){n=gd(n),a.context===null?a.context=n:a.pendingContext=n,a=ht(l),a.payload={element:t},u=u===void 0?null:u,u!==null&&(a.callback=u),t=vt(e,a,l),t!==null&&(fl(t,e,l),dn(t,e,l))}function bd(e,l){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var t=e.retryLane;e.retryLane=t!==0&&t<l?t:l}}function gf(e,l){bd(e,l),(e=e.alternate)&&bd(e,l)}function Sd(e){if(e.tag===13||e.tag===31){var l=qt(e,67108864);l!==null&&fl(l,e,67108864),gf(e,67108864)}}function Td(e){if(e.tag===13||e.tag===31){var l=gl();l=ri(l);var t=qt(e,l);t!==null&&fl(t,e,l),gf(e,l)}}var $u=!0;function rv(e,l,t,a){var n=m.T;m.T=null;var u=A.p;try{A.p=2,pf(e,l,t,a)}finally{A.p=u,m.T=n}}function dv(e,l,t,a){var n=m.T;m.T=null;var u=A.p;try{A.p=8,pf(e,l,t,a)}finally{A.p=u,m.T=n}}function pf(e,l,t,a){if($u){var n=bf(a);if(n===null)af(e,l,a,Pu,t),zd(e,a);else if(hv(n,e,l,t,a))a.stopPropagation();else if(zd(e,a),l&4&&-1<mv.indexOf(e)){for(;n!==null;){var u=ea(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=Ut(u.pendingLanes);if(i!==0){var c=u;for(c.pendingLanes|=2,c.entangledLanes|=2;i;){var s=1<<31-ol(i);c.entanglements[1]|=s,i&=~s}ql(u),(he&6)===0&&(wu=Q()+500,jn(0))}}break;case 31:case 13:c=qt(u,2),c!==null&&fl(c,u,2),qu(),gf(u,2)}if(u=bf(a),u===null&&af(e,l,a,Pu,t),u===n)break;n=u}n!==null&&a.stopPropagation()}else af(e,l,a,null,t)}}function bf(e){return e=Si(e),Sf(e)}var Pu=null;function Sf(e){if(Pu=null,e=Pt(e),e!==null){var l=O(e);if(l===null)e=null;else{var t=l.tag;if(t===13){if(e=k(l),e!==null)return e;e=null}else if(t===31){if(e=U(l),e!==null)return e;e=null}else if(t===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;e=null}else l!==e&&(e=null)}}return Pu=e,null}function Ad(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ae()){case xe:return 2;case pl:return 8;case Yl:case ka:return 32;case Gn:return 268435456;default:return 32}default:return 32}}var Tf=!1,Nt=null,Et=null,jt=null,wn=new Map,Rn=new Map,Ot=[],mv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function zd(e,l){switch(e){case"focusin":case"focusout":Nt=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":wn.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rn.delete(l.pointerId)}}function qn(e,l,t,a,n,u){return e===null||e.nativeEvent!==u?(e={blockedOn:l,domEventName:t,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},l!==null&&(l=ea(l),l!==null&&Sd(l)),e):(e.eventSystemFlags|=a,l=e.targetContainers,n!==null&&l.indexOf(n)===-1&&l.push(n),e)}function hv(e,l,t,a,n){switch(l){case"focusin":return Nt=qn(Nt,e,l,t,a,n),!0;case"dragenter":return Et=qn(Et,e,l,t,a,n),!0;case"mouseover":return jt=qn(jt,e,l,t,a,n),!0;case"pointerover":var u=n.pointerId;return wn.set(u,qn(wn.get(u)||null,e,l,t,a,n)),!0;case"gotpointercapture":return u=n.pointerId,Rn.set(u,qn(Rn.get(u)||null,e,l,t,a,n)),!0}return!1}function xd(e){var l=Pt(e.target);if(l!==null){var t=O(l);if(t!==null){if(l=t.tag,l===13){if(l=k(t),l!==null){e.blockedOn=l,qf(e.priority,function(){Td(t)});return}}else if(l===31){if(l=U(t),l!==null){e.blockedOn=l,qf(e.priority,function(){Td(t)});return}}else if(l===3&&t.stateNode.current.memoizedState.isDehydrated){e.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ei(e){if(e.blockedOn!==null)return!1;for(var l=e.targetContainers;0<l.length;){var t=bf(e.nativeEvent);if(t===null){t=e.nativeEvent;var a=new t.constructor(t.type,t);bi=a,t.target.dispatchEvent(a),bi=null}else return l=ea(t),l!==null&&Sd(l),e.blockedOn=t,!1;l.shift()}return!0}function Cd(e,l,t){ei(e)&&t.delete(l)}function vv(){Tf=!1,Nt!==null&&ei(Nt)&&(Nt=null),Et!==null&&ei(Et)&&(Et=null),jt!==null&&ei(jt)&&(jt=null),wn.forEach(Cd),Rn.forEach(Cd)}function li(e,l){e.blockedOn===l&&(e.blockedOn=null,Tf||(Tf=!0,v.unstable_scheduleCallback(v.unstable_NormalPriority,vv)))}var ti=null;function Nd(e){ti!==e&&(ti=e,v.unstable_scheduleCallback(v.unstable_NormalPriority,function(){ti===e&&(ti=null);for(var l=0;l<e.length;l+=3){var t=e[l],a=e[l+1],n=e[l+2];if(typeof a!="function"){if(Sf(a||t)===null)continue;break}var u=ea(t);u!==null&&(e.splice(l,3),l-=3,pc(u,{pending:!0,data:n,method:t.method,action:a},a,n))}}))}function wa(e){function l(s){return li(s,e)}Nt!==null&&li(Nt,e),Et!==null&&li(Et,e),jt!==null&&li(jt,e),wn.forEach(l),Rn.forEach(l);for(var t=0;t<Ot.length;t++){var a=Ot[t];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ot.length&&(t=Ot[0],t.blockedOn===null);)xd(t),t.blockedOn===null&&Ot.shift();if(t=(e.ownerDocument||e).$$reactFormReplay,t!=null)for(a=0;a<t.length;a+=3){var n=t[a],u=t[a+1],i=n[tl]||null;if(typeof u=="function")i||Nd(t);else if(i){var c=null;if(u&&u.hasAttribute("formAction")){if(n=u,i=u[tl]||null)c=i.formAction;else if(Sf(n)!==null)continue}else c=i.action;typeof c=="function"?t[a+1]=c:(t.splice(a,3),a-=3),Nd(t)}}}function Ed(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function l(){n!==null&&(n(),n=null),a||setTimeout(t,20)}function t(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(t,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),n!==null&&(n(),n=null)}}}function Af(e){this._internalRoot=e}ai.prototype.render=Af.prototype.render=function(e){var l=this._internalRoot;if(l===null)throw Error(d(409));var t=l.current,a=gl();pd(t,a,e,l,null,null)},ai.prototype.unmount=Af.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var l=e.containerInfo;pd(e.current,2,null,e,null,null),qu(),l[$t]=null}};function ai(e){this._internalRoot=e}ai.prototype.unstable_scheduleHydration=function(e){if(e){var l=Rf();e={blockedOn:null,target:e,priority:l};for(var t=0;t<Ot.length&&l!==0&&l<Ot[t].priority;t++);Ot.splice(t,0,e),t===0&&xd(e)}};var jd=x.version;if(jd!=="19.2.4")throw Error(d(527,jd,"19.2.4"));A.findDOMNode=function(e){var l=e._reactInternals;if(l===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=S(l),e=e!==null?Y(e):null,e=e===null?null:e.stateNode,e};var yv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:m,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ni=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ni.isDisabled&&ni.supportsFiber)try{Ql=ni.inject(yv),sl=ni}catch{}}return Ln.createRoot=function(e,l){if(!H(e))throw Error(d(299));var t=!1,a="",n=wo,u=Ro,i=qo;return l!=null&&(l.unstable_strictMode===!0&&(t=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(n=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(i=l.onRecoverableError)),l=yd(e,1,!1,null,null,t,a,null,n,u,i,Ed),e[$t]=l.current,tf(e),new Af(l)},Ln.hydrateRoot=function(e,l,t){if(!H(e))throw Error(d(299));var a=!1,n="",u=wo,i=Ro,c=qo,s=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError),t.formState!==void 0&&(s=t.formState)),l=yd(e,1,!0,l,t??null,a,n,s,u,i,c,Ed),l.context=gd(null),t=l.current,a=gl(),a=ri(a),n=ht(a),n.callback=null,vt(t,n,a),t=a,l.current.lanes=t,Va(l,t),ql(l),e[$t]=l.current,tf(e),new ai(l)},Ln.version="19.2.4",Ln}var Bd;function Nv(){if(Bd)return Cf.exports;Bd=1;function v(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v)}catch(x){console.error(x)}}return v(),Cf.exports=Cv(),Cf.exports}var Ev=Nv();function Ld(v){return async function(E,d={}){const H=v().replace(/\/$/,""),O=E.startsWith("http")?E:H+E,{headers:k,...U}=d,j=await fetch(O,{credentials:"include",...U,headers:{"content-type":"application/json",...k}}),S=await j.json();if(!j.ok)throw new Error(typeof S.error=="string"?S.error:"Request failed");return S}}function Vd(v){let x=v.trim();return x?(/^https?:\/\//i.test(x)||(x=`http://${x}`),x.replace(/\/$/,"")):""}function ui(){if(typeof window>"u"||window.location.protocol!=="https:")return!1;const v=window.location.hostname;return v!=="localhost"&&v!=="127.0.0.1"}function Jd(v){const x=Vd(v);if(!x)return!1;try{const E=new URL(x);return E.protocol!=="http:"?!1:E.hostname==="localhost"||E.hostname==="127.0.0.1"}catch{return!1}}const Wd=Z.createContext(null);function jv({request:v,children:x}){return f.jsx(Wd.Provider,{value:v,children:x})}function Ov(){const v=Z.useContext(Wd);if(!v)throw new Error("useApi must be used within ApiProvider");return v}const Yd="open-im-web-lang",Id="open-im-web-dark-mode",Fd="open-im-web-api-base",_f="http://127.0.0.1:39282",_v=1e4,Bl=["telegram","feishu","qq","wework","dingtalk","workbuddy","clawbot"],It=[{key:"telegram",label:"Telegram",fields:["aiCommand","botToken","proxy","allowedUserIds"],testFields:["botToken","proxy"],requiredFields:["botToken"],sensitiveFields:["botToken"]},{key:"feishu",label:"Feishu",fields:["aiCommand","appId","appSecret","allowedUserIds"],testFields:["appId","appSecret"],requiredFields:["appId","appSecret"],sensitiveFields:["appSecret"]},{key:"qq",label:"QQ",fields:["aiCommand","appId","secret","allowedUserIds"],testFields:["appId","secret"],requiredFields:["appId","secret"],sensitiveFields:["secret"]},{key:"wework",label:"WeWork",fields:["aiCommand","corpId","secret","allowedUserIds"],testFields:["corpId","secret"],requiredFields:["corpId","secret"],sensitiveFields:["secret"]},{key:"dingtalk",label:"DingTalk",fields:["aiCommand","clientId","clientSecret","cardTemplateId","allowedUserIds"],testFields:["clientId","clientSecret"],requiredFields:["clientId","clientSecret"],sensitiveFields:["clientSecret"]},{key:"workbuddy",label:"WorkBuddy",fields:["aiCommand","accessToken","refreshToken","userId","baseUrl","allowedUserIds"],testFields:["accessToken","refreshToken","userId"],requiredFields:["accessToken","refreshToken","userId"],sensitiveFields:["accessToken","refreshToken"]},{key:"clawbot",label:"ClawBot",fields:["aiCommand","apiUrl","apiToken","allowedUserIds"],testFields:["apiUrl","apiToken"],requiredFields:["apiToken"],sensitiveFields:["apiToken"]}],Ra={en:{pageTitle:"open-im local control",heroBadge:"open-im local control",heroTitle:"Local bridge control.",heroBody:"",heroBodyFull:"One local bridge for Telegram, Feishu, QQ, WeWork, DingTalk, WorkBuddy, and ClawBot.",heroKicker:"Local AI bridge",langButton:"中文",darkModeToggle:"Toggle dark mode",headerToolbarAria:"Bridge: validate, save, start, stop",controlCenter:"Control center",sidebarNoteTitle:"Local workflow",sidebarNoteBody:"Configure at least one platform, save the config, then start the bridge from Service.",mode:"Flow",dashboardTitle:"Dashboard",dashboardSubtitle:"Platform health status",dashboardSubtitleFull:"Platform and service status",quickActionsTitle:"Quick Actions",refreshHealth:"Refresh Health Status",viewConfig:"View Configuration",overviewTitle:"Start here",overviewBody:"Configure at least one platform, save the configuration, then start the bridge from the service section.",openPlatforms:"Open Platforms",openService:"Open Service",healthChecking:"Checking...",healthy:"Healthy",unhealthy:"Issues Found",notConfigured:"Not Configured",disabled:"Disabled",statConfiguredLabel:"Configured",statConfiguredMeta:"Platforms with saved credentials",statEnabledLabel:"Enabled",statEnabledMeta:"Platforms selected for startup",statServiceLabel:"Service",serviceRunningShort:"Running",serviceIdleShort:"Idle",serviceRunningMeta:"Local bridge process is active",serviceIdleMeta:"Bridge has not been started yet",listSeparator:", ",platformsTitle:"Platforms",navConfigFiles:"Config files",configFilesTitle:"Config files (JSON)",configFilesHint:"Edit the files on disk directly. Each card has its own Save. Platform / AI forms and Service → Save config still apply.",openImConfigCardHint:"Full open-im configuration. Use Format, then Save. Invalid JSON is rejected.",claudeSettingsCardHint:"Claude SDK environment (ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL, ANTHROPIC_MODEL, etc.). Set API access here without shell exports.",claudeJsonShortcutHint:"Edit ~/.claude/settings.json in the sidebar «Config files» section below.",platformsHint:"Disabled platforms keep their saved values.",enabled:"Enabled",readyState:"Ready",setupRequired:"Setup required",credentialProgress:"{done}/{total} credentials",telegramSummary:"Bot token and optional proxy.",feishuSummary:"App ID, App Secret, and allowed user scope.",qqSummary:"App ID and secret for bot access.",weworkSummary:"Corp ID and secret for enterprise delivery.",dingtalkSummary:"Client credentials plus optional card template.",workbuddySummary:"CodeBuddy OAuth for WeChat customer service.",clawbotSummary:"WeChat iLink API via ClawBot.",clawbotApiUrl:"API URL",clawbotApiToken:"API Token (Bearer)",clawbotHelp:'Click "Scan QR Login" to authenticate via WeChat, or paste token manually.',qrLoginBtn:"Scan QR Login",qrLoginScanning:"Waiting for QR code scan...",qrLoginSuccess:"Login successful! Credentials saved.",qrLoginFailed:"Login failed",qrLoginExpired:"QR code expired, please try again",qrScanHint:"Use WeChat to scan the QR code",platformCredentialsTitle:"Credentials",platformAccessTitle:"Routing and access",platformTestNote:"Checks required credentials against the platform.",platformAiTool:"AI tool override",inheritDefaultAi:"Use default AI tool",botToken:"Bot token",proxy:"Proxy",allowedUserIds:"Allowed user IDs",telegramHelp:'Get credentials: visit <a href="https://t.me/BotFather" target="_blank">@BotFather</a>, send /newbot, then copy the Bot Token',appId:"App ID",appSecret:"App Secret",feishuHelp:'Get credentials: visit <a href="https://open.feishu.cn/" target="_blank">Feishu Open Platform</a>, create an app, enable the bot, and copy the App ID / App Secret',qqAppId:"App ID",qqAppSecret:"App Secret",qqHelp:'Get credentials: visit <a href="https://bot.q.qq.com" target="_blank">QQ Open Platform</a>, create a bot, and copy the App ID / App Secret',corpId:"Corp ID / Bot ID",weworkHelp:'Get credentials: visit <a href="https://work.weixin.qq.com/" target="_blank">WeWork Admin Console</a>, create an app, and copy the Bot ID (Corp ID) / Secret',clientId:"Client ID / AppKey",clientSecret:"Client Secret / AppSecret",dingtalkHelp:'Get credentials: Create an enterprise internal app on <a href="https://open-dev.dingtalk.com/" target="_blank">DingTalk Open Platform</a>, enable Stream Mode, and get Client ID / Client Secret',workbuddyHelp:"Get credentials: Login via CodeBuddy OAuth to get access/refresh tokens. WorkBuddy connects WeChat customer service through Centrifuge WebSocket.",secret:"Secret",cardTemplateId:"Card template ID",workbuddyAccessToken:"Access Token",workbuddyRefreshToken:"Refresh Token",workbuddyUserId:"User ID",workbuddyBaseUrl:"Base URL",optional:"Optional",commaSeparatedIds:"Comma-separated IDs",aiTitle:"AI Tooling",aiHint:"Claude SDK keys: sidebar Config files → ~/.claude/settings.json. Set which AI each platform uses under Platforms above. Codex / CodeBuddy need a CLI path in the panels below when any platform uses them.",aiPerPlatformHint:"Which AI to use is configured per platform in the Platforms section (default: claude). This section sets shared paths, proxy, and logs.",claudeNote:"Claude credentials are still read from environment variables or ~/.claude/settings.json. This page manages local bridge config, not Claude account auth.",aiCommonTitle:"Shared defaults",aiCommonHint:"Choose the default AI tool first. Tool-specific fields are shown below.",aiToolConfigTitle:"Tool-specific settings",aiToolConfigHint:"Only the selected tool's fields are shown.",aiConfigSummary:"Editing {tool} settings. Switch tools above if you need to configure another runtime.",aiTool:"Default AI tool",workDir:"Default work directory",claudeCli:"Claude CLI path",codexCli:"Codex CLI path",codebuddyCli:"CodeBuddy CLI path",codexProxy:"Codex proxy",codexApiKey:"OPENAI_API_KEY",codexApiKeyTip:"Set the OpenAI API key used by Codex. You can also edit the auth file below.",claudeConfigPath:"Config file location",claudeAuthToken:"ANTHROPIC_AUTH_TOKEN",claudeBaseUrl:"ANTHROPIC_BASE_URL",claudeModel:"ANTHROPIC_MODEL",claudeProxy:"Proxy (optional)",hookPort:"Hook port",logLevel:"Log level",logLevelDefault:"default (app default)",validate:"Validate",test:"Check config",testing:"Checking...",testSuccess:"Configuration looks valid.",testFailed:"Configuration issue: {error}",save:"Save config",start:"Start bridge",stop:"Stop bridge",bridgeRunning:"Bridge running (pid {pid})",bridgeStopped:"Bridge stopped",bridgeActive:"Bridge worker is active.",bridgeInactive:"Bridge worker is currently stopped.",summaryEnabled:"Enabled platforms: {platforms} | AI tool: {tool}",summaryEmpty:"No platform enabled yet | AI tool: {tool}",ready:"Control surface ready.",validationOk:"Configuration looks internally consistent.",saveOk:"Configuration saved.",startOk:"Bridge started.",stopOk:"Bridge stopped.",configEditorTitle:"Config Editor",configEditorHint:"Edit ~/.open-im/config.json directly",claudeSettingsLabel:"~/.claude/settings.json",codexSettingsLabel:"~/.codex/auth.json",codexSettingsCardHint:"Codex CLI auth (OPENAI_API_KEY etc.). Set API access here, or use the OPENAI_API_KEY field in the Codex tool tab.",configJson:"~/.open-im/config.json",formatJson:"Format",resetJson:"Reset",saveBtn:"Save",jsonValid:"Valid JSON",jsonInvalid:"Invalid JSON: {error}",validationNoPlatformEnabled:"Enable at least one IM platform and fill its required credentials before saving.",validationPlatformIncomplete:'Platform "{platform}" is enabled but these required fields are empty: {fields}',validationAiCodexNoCli:"Default AI is Codex but Codex CLI path is empty. Set it under AI Tooling or change the default tool.",validationAiCodebuddyNoCli:"Default AI is CodeBuddy but CodeBuddy CLI path is empty. Set it under AI Tooling or change the default tool.",tipTelegramToken:'From Telegram, open <a href="https://t.me/BotFather" target="_blank" rel="noopener">@BotFather</a> → /newbot → copy the token.',tipFeishuAppId:"Feishu Open Platform → your app → Credentials → App ID.",tipFeishuSecret:"Same page → App Secret (click show / reset if needed).",tipQqAppId:'<a href="https://bot.q.qq.com" target="_blank" rel="noopener">QQ bot console</a> → your bot → App ID.',tipQqSecret:"Same console → App Secret.",tipWeworkCorp:"WeCom admin → app → view Corp ID (or smart-bot Bot ID) and Secret.",tipDingtalkClient:'<a href="https://open-dev.dingtalk.com" target="_blank" rel="noopener">DingTalk Open Platform</a> → internal app → App Key & App Secret.',tipWorkbuddyToken:"Use terminal <code>open-im init</code> for WorkBuddy OAuth, or paste tokens from CodeBuddy login.",tipClawbotApiToken:"Run <code>open-im init</code> and select ClawBot to scan QR code, or paste token from ClawBot iLink login.",navSetupWizard:"Setup Wizard",wizardStepLabel_welcome:"Welcome",wizardStepLabel_ai:"AI Backend",wizardStepLabel_platforms:"Platforms",wizardStepLabel_credentials:"Credentials",wizardStepLabel_review:"Review",wizardWelcomeTitle:"Welcome to open-im",wizardWelcomeDesc:"This wizard will guide you through configuring your AI coding assistant bridge. It takes about 2 minutes.",wizardStepAi:"Choose your AI backend and working directory",wizardStepPlatforms:"Pick which chat platforms to connect",wizardStepCredentials:"Enter API keys and tokens",wizardStepReview:"Review your choices, then save and start",wizardAiTitle:"AI Backend",wizardAiDesc:"open-im bridges chat apps to AI coding tools. Set up the paths below — the platform-level AI selection comes in the next step.",wizardWorkDirHint:"The directory where the AI tool will work. Leave empty to use the bridge's process directory.",wizardPlatformsTitle:"Choose Platforms",wizardPlatformsDesc:"Select at least one chat platform to connect. You can enable more later from the Dashboard.",wizardPickAtLeastOne:"Please select at least one platform.",wizardCredentialsTitle:"Enter Credentials",wizardCredentialsDesc:"Fill in the required credentials for each enabled platform.",wizardReviewTitle:"Review & Start",wizardReviewDesc:"Check your configuration below. When you're ready, click Save & Start to apply everything and launch the bridge.",wizardDoneTitle:"You're all set!",wizardDoneDesc:"The bridge is running. You can now message your bot on any enabled platform.",wizardGoToDashboard:"Go to Dashboard",wizardBack:"Back",wizardNext:"Next",wizardFinish:"Save & Start",wizardWorking:"Working...",wizardSaving:"Saving configuration...",wizardStarting:"Starting bridge..."},zh:{pageTitle:"open-im 本地控制台",heroBadge:"open-im",heroTitle:"本地桥接控制台",heroBody:"",heroBodyFull:"一个本地桥接入口,统一连接 Telegram、Feishu、QQ、WeWork、DingTalk、WorkBuddy 和 ClawBot。",heroKicker:"本地 AI 桥接",langButton:"EN",darkModeToggle:"切换暗黑模式",headerToolbarAria:"桥接:校验、保存、启动、停止",controlCenter:"控制中心",sidebarNoteTitle:"本地工作流",sidebarNoteBody:"至少配置一个平台,保存配置,然后在服务控制区启动桥接。",mode:"模式",dashboardTitle:"概览",dashboardSubtitle:"平台健康状态",dashboardSubtitleFull:"平台与服务状态",quickActionsTitle:"快捷操作",refreshHealth:"刷新健康状态",viewConfig:"查看配置",overviewTitle:"先完成基础配置",overviewBody:"先配置至少一个平台,保存本地配置,再到服务控制区启动桥接。",openPlatforms:"打开平台配置",openService:"打开服务控制",healthChecking:"检查中...",healthy:"正常",unhealthy:"有问题",notConfigured:"未配置",disabled:"已禁用",statConfiguredLabel:"已配置",statConfiguredMeta:"已填写凭证的平台数量",statEnabledLabel:"已启用",statEnabledMeta:"会随服务启动的平台数量",statServiceLabel:"服务",serviceRunningShort:"运行中",serviceIdleShort:"未启动",serviceRunningMeta:"本地桥接进程正在运行",serviceIdleMeta:"桥接服务尚未启动",listSeparator:"、",platformsTitle:"平台配置",navConfigFiles:"配置文件",configFilesTitle:"配置文件(JSON)",configFilesHint:"直接编辑磁盘上的文件,每张卡片有独立保存按钮。平台 / AI 表单与服务区的「保存配置」仍然有效。",openImConfigCardHint:"open-im 完整配置。先格式化再保存;JSON 不合法时无法写入。",claudeSettingsCardHint:"Claude SDK 环境变量(ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL、ANTHROPIC_MODEL 等)。在此配置 API,无需在终端 export。",claudeJsonShortcutHint:"提示:请在左侧栏「配置文件」分区编辑 ~/.claude/settings.json。",platformsHint:"禁用的平台仍保留已保存的值。",enabled:"启用",readyState:"已就绪",setupRequired:"需要完成配置",credentialProgress:"凭证 {done}/{total}",telegramSummary:"Bot Token 与可选代理。",feishuSummary:"App ID、App Secret 以及可访问用户范围。",qqSummary:"QQ 机器人 App ID 与 Secret。",weworkSummary:"企业微信 Corp ID 与 Secret。",dingtalkSummary:"钉钉 Client 凭证,可选配置卡片模板 ID。",workbuddySummary:"CodeBuddy OAuth 连接微信客服。",clawbotSummary:"通过 ClawBot 连接微信 iLink API。",clawbotApiUrl:"API 地址",clawbotApiToken:"API Token (Bearer)",clawbotHelp:"点击“扫码登录”通过微信认证,或手动粘贴 Token。",qrLoginBtn:"扫码登录",qrLoginScanning:"等待扫码...",qrLoginSuccess:"登录成功!凭证已保存。",qrLoginFailed:"登录失败",qrLoginExpired:"二维码已过期,请重试",qrScanHint:"请使用微信扫描二维码",platformCredentialsTitle:"凭证",platformAccessTitle:"路由与访问",platformTestNote:"只会检查该平台的必填凭证是否可用。",platformAiTool:"平台 AI 工具覆盖",inheritDefaultAi:"使用默认 AI 工具",botToken:"Bot Token",proxy:"代理",allowedUserIds:"允许的用户 ID",telegramHelp:'获取凭证:访问 <a href="https://t.me/BotFather" target="_blank">@BotFather</a>,发送 /newbot 创建机器人并拿到 Bot Token',appId:"App ID",appSecret:"App Secret",feishuHelp:'获取凭证:访问 <a href="https://open.feishu.cn/" target="_blank">飞书开放平台</a>,创建应用、启用机器人并拿到 App ID / App Secret',qqAppId:"App ID",qqAppSecret:"App Secret",qqHelp:'获取凭证:访问 <a href="https://bot.q.qq.com" target="_blank">QQ 开放平台</a>,创建机器人并拿到 App ID / App Secret',corpId:"Corp ID / Bot ID",weworkHelp:'获取凭证:访问 <a href="https://work.weixin.qq.com/" target="_blank">企业微信管理后台</a>,创建应用并拿到 Bot ID(Corp ID)/ Secret',clientId:"Client ID / AppKey",clientSecret:"Client Secret / AppSecret",dingtalkHelp:'获取凭证:在 <a href="https://open-dev.dingtalk.com/" target="_blank">钉钉开放平台</a> 创建企业内部应用,启用 Stream Mode,并拿到 Client ID / Client Secret',workbuddyHelp:"获取凭证:通过 CodeBuddy OAuth 登录获取 access/refresh token。WorkBuddy 通过 Centrifuge WebSocket 连接微信客服。",cardTemplateId:"卡片模板 ID",workbuddyAccessToken:"Access Token",workbuddyRefreshToken:"Refresh Token",workbuddyUserId:"User ID",workbuddyBaseUrl:"基础 URL",optional:"可选",commaSeparatedIds:"多个 ID 用逗号分隔",aiTitle:"AI 工具配置",aiHint:"Claude SDK:左侧栏「配置文件」→ ~/.claude/settings.json。各渠道用哪个 AI 在上方「平台」里分别设置。若任一平台选 Codex/CodeBuddy,再在下方填对应 CLI 路径。",aiPerPlatformHint:"每个平台的 AI 工具在上方「平台」中配置(默认 claude)。本区域设置共用路径、代理与日志。",claudeNote:"Claude 凭证仍然从环境变量或 ~/.claude/settings.json 读取。这个页面只管理本地桥接配置,不负责 Claude 账号登录。",aiCommonTitle:"公共默认配置",aiCommonHint:"先选择默认 AI 工具,下方再显示对应的工具专属配置。",aiToolConfigTitle:"工具专属配置",aiToolConfigHint:"只显示当前选中 AI 工具的字段。",aiConfigSummary:"正在编辑 {tool} 的配置,如需配置其他工具,可在上方切换。",aiTool:"默认 AI 工具",workDir:"默认工作目录",claudeCli:"Claude CLI 路径",codexCli:"Codex CLI 路径",codebuddyCli:"CodeBuddy CLI 路径",codexProxy:"Codex 代理",codexApiKey:"OPENAI_API_KEY",codexApiKeyTip:"设置 Codex 使用的 OpenAI API Key。也可以在下方编辑 auth 文件。",claudeConfigPath:"配置文件位置",claudeProxy:"代理(可选)",hookPort:"Hook 端口",logLevel:"日志级别",logLevelDefault:"default(程序默认)",validate:"校验配置",test:"校验配置",testing:"校验中...",testSuccess:"配置校验通过。",testFailed:"配置有问题:{error}",save:"保存配置",start:"启动桥接",stop:"停止桥接",bridgeRunning:"桥接运行中(pid {pid})",bridgeStopped:"桥接已停止",bridgeActive:"桥接 worker 正在运行。",bridgeInactive:"桥接 worker 当前已停止。",summaryEnabled:"已启用平台:{platforms} | AI 工具:{tool}",summaryEmpty:"暂未启用平台 | AI 工具:{tool}",ready:"控制台已就绪。",validationOk:"配置校验通过。",saveOk:"配置已保存。",startOk:"桥接已启动。",stopOk:"桥接已停止。",configEditorTitle:"JSON 配置编辑器",configEditorHint:"直接编辑 ~/.open-im/config.json",claudeSettingsLabel:"~/.claude/settings.json",codexSettingsLabel:"~/.codex/auth.json",codexSettingsCardHint:"Codex CLI 认证信息(OPENAI_API_KEY 等)。在此配置 API 访问,或在 Codex 工具标签页填写 OPENAI_API_KEY。",configJson:"~/.open-im/config.json",configJsonHint:"编辑配置 JSON。点击服务区的“保存配置”按钮后侘存更改。",formatJson:"格式化",resetJson:"重置",saveBtn:"保存",jsonValid:"JSON 有效",jsonInvalid:"JSON 无效:{error}",validationNoPlatformEnabled:"保存前请至少启用一个 IM 平台,并填完必填凭证。",validationPlatformIncomplete:"平台「{platform}」已启用,但以下必填项为空:{fields}",validationAiCodexNoCli:"默认 AI 为 Codex,但 Codex CLI 路径为空。请在 AI 区填写,或改默认工具。",validationAiCodebuddyNoCli:"默认 AI 为 CodeBuddy,但 CodeBuddy CLI 路径为空。请在 AI 区填写,或改默认工具。",tipTelegramToken:'在 Telegram 搜 <a href="https://t.me/BotFather" target="_blank" rel="noopener">@BotFather</a>,发 /newbot 创建机器人后复制 Token。',tipFeishuAppId:"飞书开放平台 → 应用 → 凭证与基础信息 → App ID。",tipFeishuSecret:"同一页 App Secret(可重置后查看)。",tipQqAppId:'<a href="https://bot.q.qq.com" target="_blank" rel="noopener">QQ 开放平台</a> → 机器人 → App ID。',tipQqSecret:"同一处获取 App Secret。",tipWeworkCorp:"企业微信管理后台 → 应用 → 查省 Corp ID / 智能机器人 Bot ID 与 Secret。",tipDingtalkClient:'<a href="https://open-dev.dingtalk.com" target="_blank" rel="noopener">钉钉开放平台</a> → 企业内部应用 → AppKey / AppSecret。',tipWorkbuddyToken:"建议在终端运行 <code>open-im init</code> 完成 WorkBuddy 授权;或粘贴 CodeBuddy 登录后的 Token。",tipClawbotApiToken:"在终端运行 <code>open-im init</code> 选择 ClawBot 扫码登录,或从 ClawBot iLink 登录后复制 Token。",navSetupWizard:"设置向导",wizardStepLabel_welcome:"欢迎",wizardStepLabel_ai:"AI 后端",wizardStepLabel_platforms:"平台",wizardStepLabel_credentials:"凭证",wizardStepLabel_review:"确认",wizardWelcomeTitle:"欢迎使用 open-im",wizardWelcomeDesc:"这个向导将引导你配置 AI 编程助手桥接。大约需要 2 分钟。",wizardStepAi:"选择 AI 后端和工作目录",wizardStepPlatforms:"选择要连接的聊天平台",wizardStepCredentials:"输入 API Key 和 Token",wizardStepReview:"检查配置,然后保存启动",wizardAiTitle:"AI 后端",wizardAiDesc:"open-im 将聊天 App 桥接到 AI 编程工具。在下方设置路径,平台级的 AI 选择在下一步。",wizardWorkDirHint:"AI 工具的工作目录。留空则使用桥接进程的工作目录。",wizardPlatformsTitle:"选择平台",wizardPlatformsDesc:"至少选择一个聊天平台。后续可在概览页启用更多。",wizardPickAtLeastOne:"请至少选择一个平台。",wizardCredentialsTitle:"输入凭证",wizardCredentialsDesc:"为每个已启用的平台填写必要的凭证信息。",wizardReviewTitle:"确认并启动",wizardReviewDesc:"检查下方配置。准备好后点击“保存并启动”应用配置并启动桥接。",wizardDoneTitle:"配置完成!",wizardDoneDesc:"桥接已运行。你现在可以在任何已启用的平台上向机器人发消息了。",wizardGoToDashboard:"进入概览",wizardBack:"上一步",wizardNext:"下一步",wizardFinish:"保存并启动",wizardWorking:"处理中...",wizardSaving:"正在保存配置...",wizardStarting:"正在启动桥接..."}};function Dv(v){const x=Z.useCallback((d,H={})=>{const O=Ra[v]??Ra.en,k=Ra.en,U=O[d]??k[d]??d;return Object.keys(H).reduce((j,S)=>j.replaceAll(`{${S}}`,String(H[S])),U)},[v]),E=Z.useCallback(d=>{const H=Ra[v]??Ra.en,O=Ra.en;return H[d]??O[d]??""},[v]);return Z.useMemo(()=>({t:x,html:E}),[x,E])}function Uv(){return f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:[f.jsx("rect",{x:"3",y:"3",width:"7",height:"7"}),f.jsx("rect",{x:"14",y:"3",width:"7",height:"7"}),f.jsx("rect",{x:"14",y:"14",width:"7",height:"7"}),f.jsx("rect",{x:"3",y:"14",width:"7",height:"7"})]})}function Mv(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:f.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})})}function Hv(){return f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),f.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function wv(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:f.jsx("path",{d:"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 14a4 4 0 1 1 4-4 4 4 0 0 1-4 4z"})})}function Rv(){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"18",height:"18",children:f.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})})}function qv({activeNav:v,onNavigate:x,t:E}){return f.jsxs("aside",{className:"sidebar",children:[f.jsx("div",{className:"sidebar-header",children:f.jsxs("div",{className:"sidebar-brand",children:[f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",width:"24",height:"24",children:f.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})}),"open-im"]})}),f.jsxs("nav",{className:"sidebar-nav",children:[f.jsxs("button",{type:"button",className:`nav-item ${v==="overview"?"active":""}`,onClick:()=>x("overview"),children:[f.jsx(Uv,{}),f.jsx("span",{children:E("dashboardTitle")})]}),f.jsxs("button",{type:"button",className:`nav-item ${v==="wizard"?"active":""}`,onClick:()=>x("wizard"),children:[f.jsx(Rv,{}),f.jsx("span",{children:E("navSetupWizard")})]}),f.jsxs("button",{type:"button",className:`nav-item ${v==="platforms"?"active":""}`,onClick:()=>x("platforms"),children:[f.jsx(Mv,{}),f.jsx("span",{children:E("platformsTitle")})]}),f.jsxs("button",{type:"button",className:`nav-item ${v==="files"?"active":""}`,onClick:()=>x("files"),children:[f.jsx(Hv,{}),f.jsx("span",{children:E("navConfigFiles")})]}),f.jsxs("button",{type:"button",className:`nav-item ${v==="ai"?"active":""}`,onClick:()=>x("ai"),children:[f.jsx(wv,{}),f.jsx("span",{children:E("aiTitle")})]})]})]})}function Bv({lang:v,toggleLang:x,toggleDark:E,serviceStatus:d,busy:H,onValidate:O,onSave:k,onToggleService:U,t:j}){return f.jsxs("header",{className:"main-header",children:[f.jsxs("div",{className:"main-header-top",children:[f.jsx("div",{children:f.jsx("h1",{className:"main-title",children:j("dashboardTitle")})}),f.jsxs("div",{className:"header-actions",children:[f.jsx("a",{href:"https://github.com/wu529778790/open-im",target:"_blank",rel:"noreferrer",className:"btn btn-ghost btn-sm",children:"GitHub"}),f.jsx("button",{type:"button",className:"dark-mode-toggle",onClick:E,"aria-label":j("darkModeToggle"),children:"◐"}),f.jsx("button",{type:"button",className:"lang-button",onClick:x,children:v==="zh"?"EN":"中文"})]})]}),f.jsxs("div",{className:"main-header-toolbar",role:"toolbar","aria-label":j("headerToolbarAria"),children:[f.jsx("button",{type:"button",className:"btn btn-warning btn-sm",disabled:H,onClick:O,children:j("validate")}),f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",disabled:H,onClick:k,children:j("save")}),f.jsx("button",{type:"button",className:`btn btn-sm ${d.running?"btn-danger":"btn-primary"}`,disabled:H,onClick:U,children:d.running?j("stop"):j("start")})]})]})}function Lv({health:v,serviceStatus:x,t:E}){const d=(v==null?void 0:v.platforms)??{};let H=0,O=0;Bl.forEach(U=>{const j=d[U];j!=null&&j.configured&&(H+=1),j!=null&&j.enabled&&(O+=1)});const k=Bl.length;return f.jsx("section",{className:"section",children:f.jsxs("div",{className:"stats-grid",children:[f.jsxs("div",{className:"stat-card",children:[f.jsx("div",{className:"stat-label",children:E("statConfiguredLabel")}),f.jsxs("div",{className:"stat-value",children:[H,"/",k]})]}),f.jsxs("div",{className:"stat-card",children:[f.jsx("div",{className:"stat-label",children:E("statEnabledLabel")}),f.jsx("div",{className:"stat-value",children:O})]}),f.jsxs("div",{className:"stat-card",children:[f.jsx("div",{className:"stat-label",children:E("statServiceLabel")}),f.jsx("div",{className:"stat-value",children:x.running?E("serviceRunningShort"):E("serviceIdleShort")})]})]})})}const $d={telegram:{botToken:"botToken",proxy:"proxy",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},feishu:{appId:"appId",appSecret:"appSecret",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},qq:{appId:"qqAppId",secret:"qqAppSecret",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},wework:{corpId:"corpId",secret:"secret",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},dingtalk:{clientId:"clientId",clientSecret:"clientSecret",cardTemplateId:"cardTemplateId",aiCommand:"platformAiTool",allowedUserIds:"allowedUserIds"},workbuddy:{aiCommand:"platformAiTool",accessToken:"workbuddyAccessToken",refreshToken:"workbuddyRefreshToken",userId:"workbuddyUserId",baseUrl:"workbuddyBaseUrl",allowedUserIds:"allowedUserIds"},clawbot:{aiCommand:"platformAiTool",apiUrl:"clawbotApiUrl",apiToken:"clawbotApiToken",allowedUserIds:"allowedUserIds"}},Pd={telegram:"telegramSummary",feishu:"feishuSummary",qq:"qqSummary",wework:"weworkSummary",dingtalk:"dingtalkSummary",workbuddy:"workbuddySummary",clawbot:"clawbotSummary"},Yv={telegram:"telegramHelp",feishu:"feishuHelp",qq:"qqHelp",wework:"weworkHelp",dingtalk:"dingtalkHelp",workbuddy:"workbuddyHelp",clawbot:"clawbotHelp"},em={"telegram-botToken":"tipTelegramToken","feishu-appId":"tipFeishuAppId","feishu-appSecret":"tipFeishuSecret","qq-appId":"tipQqAppId","qq-secret":"tipQqSecret","wework-corpId":"tipWeworkCorp","dingtalk-clientId":"tipDingtalkClient","workbuddy-accessToken":"tipWorkbuddyToken","clawbot-apiToken":"tipClawbotApiToken"};function Qv({def:v,values:x,t:E,html:d,disabledVisual:H,onChange:O,onTest:k,testing:U,testResult:j,qrState:S,qrCodeUrl:Y,qrMessage:q,onQrLogin:ne}){const $=Pd[v.key],K=Yv[v.key],ge=ee=>{const F=$d[v.key],oe=F?F[ee]:void 0,Te=`${v.key}-${ee}`,me=em[Te],Me=ee==="allowedUserIds",je=v.sensitiveFields.includes(ee);return f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:oe?E(oe):ee}),Me?f.jsx("textarea",{className:"form-textarea mono",value:String(x[ee]??""),onChange:V=>O({[ee]:V.target.value})}):ee==="aiCommand"?f.jsxs("select",{className:"form-select",value:String(x[ee]||"claude"),onChange:V=>O({aiCommand:V.target.value}),children:[f.jsx("option",{value:"claude",children:"claude"}),f.jsx("option",{value:"codex",children:"codex"}),f.jsx("option",{value:"codebuddy",children:"codebuddy"})]}):f.jsx("input",{className:"form-input mono",type:je?"password":"text",value:String(x[ee]??""),onChange:V=>O({[ee]:V.target.value})}),ee==="allowedUserIds"?f.jsx("div",{className:"form-hint",children:E("commaSeparatedIds")}):null,me?f.jsx("div",{className:"field-inline-tip",dangerouslySetInnerHTML:{__html:d(me)}}):null]},ee)};return f.jsxs("div",{className:`platform-card ${H?"disabled":""}`,children:[f.jsxs("div",{className:"platform-header",children:[f.jsx("h3",{className:"platform-title",children:v.label}),f.jsxs("label",{className:"toggle",children:[f.jsx("input",{type:"checkbox",className:"toggle-input",checked:x.enabled??!1,onChange:ee=>O({enabled:ee.target.checked})}),f.jsx("span",{className:"toggle-switch"}),f.jsx("span",{className:"toggle-label",children:E("enabled")})]})]}),f.jsxs("div",{className:"platform-body",children:[f.jsx("p",{className:"form-hint",children:$?E($):""}),v.fields.map(ee=>ge(ee)),K?f.jsx("div",{className:"form-help",dangerouslySetInnerHTML:{__html:d(K)}}):null,f.jsx("div",{style:{display:"flex",gap:12,flexWrap:"wrap"},children:f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",disabled:U,onClick:k,children:E(U?"testing":"test")})}),j!=null&&j.text?f.jsx("div",{className:`message mt-4 ${j.ok?"message-success":"message-error"}`,children:j.text}):null,ne?f.jsxs("div",{style:{marginTop:12},children:[f.jsxs("div",{style:{display:"flex",gap:12,flexWrap:"wrap",alignItems:"center"},children:[f.jsx("button",{type:"button",className:"btn btn-primary btn-sm",disabled:S==="loading"||S==="scanning",onClick:ne,children:S==="loading"?"...":E(S==="scanning"?"qrLoginScanning":"qrLoginBtn")}),S==="scanning"?f.jsx("span",{className:"form-hint",children:E("qrScanHint")}):null]}),Y&&S==="scanning"?f.jsx("div",{style:{marginTop:12,textAlign:"center"},children:f.jsx("img",{src:Y.startsWith("data:")?Y:`data:image/png;base64,${Y}`,alt:"QR Code",style:{width:200,height:200,border:"1px solid var(--border)",borderRadius:8}})}):null,q?f.jsx("div",{className:`message mt-4 ${S==="success"?"message-success":S==="error"?"message-error":""}`,children:q}):null]}):null]})]})}function Gv({ai:v,onUpdate:x,t:E,html:d,forwardRef:H}){const[O,k]=Z.useState("claude");return f.jsxs("section",{className:"section",ref:H,children:[f.jsxs("div",{className:"section-header",children:[f.jsx("h2",{className:"section-title",children:E("aiTitle")}),f.jsx("p",{className:"section-description",children:E("aiHint")})]}),f.jsxs("div",{className:"ai-grid",children:[f.jsxs("div",{className:"ai-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("h3",{className:"card-title",children:E("aiCommonTitle")})}),f.jsxs("div",{className:"ai-card-body",children:[f.jsx("p",{className:"form-hint",style:{marginBottom:12},children:E("aiPerPlatformHint")}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("workDir")}),f.jsx("input",{className:"form-input mono",value:v.claudeWorkDir,onChange:U=>x({claudeWorkDir:U.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("hookPort")}),f.jsx("input",{type:"number",min:1,className:"form-input",value:v.hookPort||"",onChange:U=>x({hookPort:Number(U.target.value)||0})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("logLevel")}),f.jsxs("select",{className:"form-select",value:v.logLevel,onChange:U=>x({logLevel:U.target.value}),children:[f.jsx("option",{value:"default",children:E("logLevelDefault")}),f.jsx("option",{value:"DEBUG",children:"DEBUG"}),f.jsx("option",{value:"INFO",children:"INFO"}),f.jsx("option",{value:"WARN",children:"WARN"}),f.jsx("option",{value:"ERROR",children:"ERROR"})]})]})]})]}),f.jsxs("div",{className:"ai-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("div",{className:"tabs",children:["claude","codex","codebuddy"].map(U=>f.jsx("button",{type:"button",className:`tab ${O===U?"active":""}`,onClick:()=>k(U),children:U},U))})}),f.jsxs("div",{className:"ai-card-body",children:[f.jsxs("div",{className:`ai-tool-panel ${O==="claude"?"active":""}`,children:[f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("claudeProxy")}),f.jsx("input",{className:"form-input mono",value:v.claudeProxy,onChange:U=>x({claudeProxy:U.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("claudeConfigPath")}),f.jsx("input",{className:"form-input mono",readOnly:!0,style:{background:"var(--bg-secondary)"},value:v.claudeConfigPath})]})]}),f.jsxs("div",{className:`ai-tool-panel ${O==="codex"?"active":""}`,children:[f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("codexApiKey")}),f.jsx("input",{className:"form-input mono",type:"password",value:v.codexApiKey??"",onChange:U=>x({codexApiKey:U.target.value})}),f.jsx("p",{className:"field-inline-tip",dangerouslySetInnerHTML:{__html:E("codexApiKeyTip")}})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("codexCli")}),f.jsx("input",{className:"form-input mono",value:v.codexCliPath,onChange:U=>x({codexCliPath:U.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("codexProxy")}),f.jsx("input",{className:"form-input mono",value:v.codexProxy,onChange:U=>x({codexProxy:U.target.value})})]})]}),f.jsx("div",{className:`ai-tool-panel ${O==="codebuddy"?"active":""}`,children:f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:E("codebuddyCli")}),f.jsx("input",{className:"form-input mono",value:v.codebuddyCliPath,onChange:U=>x({codebuddyCliPath:U.target.value})})]})})]})]})]})]})}function Xv({configJson:v,setConfigJson:x,claudeSettingsJson:E,setClaudeSettingsJson:d,codexSettingsJson:H,setCodexSettingsJson:O,jsonValidation:k,onSaveConfig:U,onSaveClaude:j,onSaveCodex:S,onFormat:Y,onReset:q,meta:ne,setMessage:$,t:K,forwardRef:ge}){const ee=F=>F instanceof Error?F.message:String(F);return f.jsxs("section",{className:"section",ref:ge,children:[f.jsxs("div",{className:"section-header",children:[f.jsx("h2",{className:"section-title",children:K("configFilesTitle")}),f.jsx("p",{className:"section-description",children:K("configFilesHint")})]}),f.jsxs("div",{className:"config-files-stack",children:[f.jsxs("div",{className:"card config-file-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("h3",{className:"card-title mono",children:K("configJson")})}),f.jsxs("div",{className:"card-body",children:[f.jsx("p",{className:"form-hint",children:K("openImConfigCardHint")}),f.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginBottom:8},children:[f.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:Y,children:K("formatJson")}),f.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:q,children:K("resetJson")})]}),f.jsx("textarea",{className:"form-input mono",rows:18,spellCheck:!1,value:v,onChange:F=>x(F.target.value),style:{minHeight:360,resize:"vertical",whiteSpace:"pre"}}),k?f.jsx("div",{className:`message mt-4 ${k.type==="success"?"message-success":"message-error"}`,children:k.text}):null,f.jsx("div",{style:{marginTop:10},children:f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",onClick:()=>void(async()=>{try{await U(),$({text:K("saveOk"),type:"success"})}catch(F){$({text:ee(F),type:"error"})}})(),children:K("saveBtn")})})]})]}),f.jsxs("div",{className:"card config-file-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("h3",{className:"card-title mono",children:K("claudeSettingsLabel")})}),f.jsxs("div",{className:"card-body",children:[f.jsx("p",{className:"form-hint",children:K("claudeSettingsCardHint")}),f.jsx("textarea",{className:"form-input mono",rows:12,spellCheck:!1,value:E,onChange:F=>d(F.target.value),style:{minHeight:220,resize:"vertical",whiteSpace:"pre"}}),f.jsx("div",{style:{marginTop:10},children:f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",onClick:()=>void(async()=>{try{await j(),$({text:K("saveOk"),type:"success"})}catch(F){$({text:ee(F),type:"error"})}})(),children:K("saveBtn")})})]})]}),f.jsxs("div",{className:"card config-file-card",children:[f.jsx("div",{className:"card-header",children:f.jsx("h3",{className:"card-title mono",children:K("codexSettingsLabel")})}),f.jsxs("div",{className:"card-body",children:[f.jsx("p",{className:"form-hint",children:K("codexSettingsCardHint")}),f.jsx("textarea",{className:"form-input mono",rows:8,spellCheck:!1,value:H,onChange:F=>O(F.target.value),style:{minHeight:160,resize:"vertical",whiteSpace:"pre"}}),f.jsx("div",{style:{marginTop:10},children:f.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",onClick:()=>void(async()=>{try{await S(),$({text:K("saveOk"),type:"success"})}catch(F){$({text:ee(F),type:"error"})}})(),children:K("saveBtn")})})]})]})]}),f.jsx("p",{className:"form-hint",style:{marginTop:24},children:ne.configPath?`${K("configJson")}: ${ne.configPath}`:""})]})}function Qd(v){return v instanceof Error?v.message:String(v)}function Zv(){return{platforms:{telegram:{enabled:!1,aiCommand:"claude",botToken:"",proxy:"",allowedUserIds:""},feishu:{enabled:!1,aiCommand:"claude",appId:"",appSecret:"",allowedUserIds:""},qq:{enabled:!1,aiCommand:"claude",appId:"",secret:"",allowedUserIds:""},wework:{enabled:!1,aiCommand:"claude",corpId:"",secret:"",allowedUserIds:""},dingtalk:{enabled:!1,aiCommand:"claude",clientId:"",clientSecret:"",cardTemplateId:"",allowedUserIds:""},workbuddy:{enabled:!1,aiCommand:"claude",accessToken:"",refreshToken:"",userId:"",baseUrl:"",allowedUserIds:""},clawbot:{enabled:!1,aiCommand:"claude",apiUrl:"http://127.0.0.1:26322",apiToken:"",allowedUserIds:""}},ai:{claudeWorkDir:"",claudeConfigPath:"",claudeProxy:"",codexCliPath:"codex",codexProxy:"",codebuddyCliPath:"codebuddy",hookPort:0,logLevel:"default"}}}const Ba=["welcome","ai","platforms","credentials","review"];function Of(v){return Ba.indexOf(v)}function kv({request:v,t:x,html:E,onComplete:d,initialPayload:H}){const[O,k]=Z.useState("welcome"),[U,j]=Z.useState(H??Zv()),[S,Y]=Z.useState(!1),[q,ne]=Z.useState(""),[$,K]=Z.useState("idle"),[ge,ee]=Z.useState(""),[F,oe]=Z.useState(""),[Te,me]=Z.useState("idle"),Me=Z.useCallback((m,A)=>{j(D=>({...D,platforms:{...D.platforms,[m]:{...D.platforms[m],...A}}}))},[]),je=Z.useCallback(m=>{j(A=>({...A,ai:{...A.ai,...m}}))},[]),V=()=>{switch(O){case"welcome":return!0;case"ai":return!0;case"platforms":return Bl.some(m=>U.platforms[m].enabled);case"credentials":return Bl.filter(m=>U.platforms[m].enabled).every(m=>{const A=It.find(D=>D.key===m);return A?A.requiredFields.every(D=>String(U.platforms[m][D]??"").trim()!==""):!0});case"review":return!0}},Ge=()=>{const m=Of(O);m<Ba.length-1&&k(Ba[m+1])},Ie=()=>{const m=Of(O);m>0&&k(Ba[m-1])},Ml=async()=>{K("loading"),oe(""),ee("");try{const m=await v("/api/clawbot/qr-login/start",{method:"POST"});if(!m.success||!m.qrcodeUrl||!m.sessionKey){K("error"),oe(m.error||x("qrLoginFailed"));return}ee(m.qrcodeUrl),K("scanning");const A=await v("/api/clawbot/qr-login/wait",{method:"POST",body:JSON.stringify({sessionKey:m.sessionKey,qrcode:m.sessionKey,qrcodeUrl:m.qrcodeUrl})});A.success&&A.botToken?(K("success"),oe(x("qrLoginSuccess")),Me("clawbot",{apiToken:A.botToken,...A.baseUrl?{apiUrl:A.baseUrl}:{},enabled:!0})):(K("error"),oe(A.message||A.error||x("qrLoginFailed")))}catch(m){K("error"),oe(Qd(m))}},el=async()=>{ne(""),Y(!0),me("saving");try{await v("/api/config/save",{method:"POST",body:JSON.stringify(U)}),me("starting"),await v("/api/service/start",{method:"POST"}),me("done")}catch(m){ne(Qd(m)),me("error")}finally{Y(!1)}},Ce=Of(O),Ol=(Ce+1)/Ba.length*100,ll=(m,A,D)=>{const le=U.platforms[D],se=$d[D],o=se?se[A]:void 0,z=`${D}-${A}`,_=em[z],w=m.sensitiveFields.includes(A);return f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:o?x(o):A}),A==="allowedUserIds"?f.jsxs(f.Fragment,{children:[f.jsx("textarea",{className:"form-textarea mono",value:String(le[A]??""),onChange:G=>Me(D,{[A]:G.target.value})}),f.jsx("div",{className:"form-hint",children:x("commaSeparatedIds")})]}):A==="aiCommand"?f.jsxs("select",{className:"form-select",value:String(le[A]||"claude"),onChange:G=>Me(D,{aiCommand:G.target.value}),children:[f.jsx("option",{value:"claude",children:"claude"}),f.jsx("option",{value:"codex",children:"codex"}),f.jsx("option",{value:"codebuddy",children:"codebuddy"})]}):f.jsx("input",{className:"form-input mono",type:w?"password":"text",value:String(le[A]??""),onChange:G=>Me(D,{[A]:G.target.value})}),_?f.jsx("div",{className:"field-inline-tip",dangerouslySetInnerHTML:{__html:E(_)}}):null]},A)},$e=()=>{switch(O){case"welcome":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("div",{className:"wizard-step-icon",children:"🚀"}),f.jsx("h2",{className:"wizard-step-title",children:x("wizardWelcomeTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardWelcomeDesc")}),f.jsxs("div",{className:"wizard-steps-list",children:[f.jsxs("div",{className:"wizard-steps-item",children:[f.jsx("span",{className:"wizard-steps-num",children:"1"}),f.jsx("span",{children:x("wizardStepAi")})]}),f.jsxs("div",{className:"wizard-steps-item",children:[f.jsx("span",{className:"wizard-steps-num",children:"2"}),f.jsx("span",{children:x("wizardStepPlatforms")})]}),f.jsxs("div",{className:"wizard-steps-item",children:[f.jsx("span",{className:"wizard-steps-num",children:"3"}),f.jsx("span",{children:x("wizardStepCredentials")})]}),f.jsxs("div",{className:"wizard-steps-item",children:[f.jsx("span",{className:"wizard-steps-num",children:"4"}),f.jsx("span",{children:x("wizardStepReview")})]})]})]});case"ai":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("h2",{className:"wizard-step-title",children:x("wizardAiTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardAiDesc")}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:x("workDir")}),f.jsx("input",{className:"form-input mono",placeholder:"/path/to/project",value:U.ai.claudeWorkDir,onChange:m=>je({claudeWorkDir:m.target.value})}),f.jsx("p",{className:"form-hint",children:x("wizardWorkDirHint")})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:x("codexCli")}),f.jsx("input",{className:"form-input mono",value:U.ai.codexCliPath,onChange:m=>je({codexCliPath:m.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:x("codebuddyCli")}),f.jsx("input",{className:"form-input mono",value:U.ai.codebuddyCliPath,onChange:m=>je({codebuddyCliPath:m.target.value})})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("label",{className:"form-label",children:x("logLevel")}),f.jsxs("select",{className:"form-select",value:U.ai.logLevel,onChange:m=>je({logLevel:m.target.value}),children:[f.jsx("option",{value:"default",children:x("logLevelDefault")}),f.jsx("option",{value:"DEBUG",children:"DEBUG"}),f.jsx("option",{value:"INFO",children:"INFO"}),f.jsx("option",{value:"WARN",children:"WARN"}),f.jsx("option",{value:"ERROR",children:"ERROR"})]})]})]});case"platforms":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("h2",{className:"wizard-step-title",children:x("wizardPlatformsTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardPlatformsDesc")}),f.jsx("div",{className:"wizard-platform-grid",children:It.map(m=>{const A=m.key,D=U.platforms[A].enabled;return f.jsxs("button",{type:"button",className:`wizard-platform-chip ${D?"selected":""}`,onClick:()=>Me(A,{enabled:!D}),children:[f.jsx("div",{className:"wizard-platform-chip-name",children:m.label}),f.jsx("div",{className:"wizard-platform-chip-hint",children:x(Pd[A]||"")})]},A)})}),!Bl.some(m=>U.platforms[m].enabled)&&f.jsx("p",{className:"form-hint",style:{color:"var(--warning-text)",marginTop:12},children:x("wizardPickAtLeastOne")})]});case"credentials":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("h2",{className:"wizard-step-title",children:x("wizardCredentialsTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardCredentialsDesc")}),Bl.filter(m=>U.platforms[m].enabled).map(m=>{const A=It.find(D=>D.key===m);return f.jsxs("div",{className:"wizard-credential-card",children:[f.jsx("h3",{className:"wizard-credential-name",children:A.label}),A.fields.map(D=>ll(A,D,m)),m==="clawbot"&&f.jsxs("div",{style:{marginTop:12},children:[f.jsxs("div",{style:{display:"flex",gap:12,flexWrap:"wrap",alignItems:"center"},children:[f.jsx("button",{type:"button",className:"btn btn-primary btn-sm",disabled:$==="loading"||$==="scanning",onClick:()=>void Ml(),children:$==="loading"?"...":x($==="scanning"?"qrLoginScanning":"qrLoginBtn")}),$==="scanning"?f.jsx("span",{className:"form-hint",children:x("qrScanHint")}):null]}),ge&&$==="scanning"&&f.jsx("div",{style:{marginTop:12,textAlign:"center"},children:f.jsx("img",{src:ge.startsWith("data:")?ge:`data:image/png;base64,${ge}`,alt:"QR Code",style:{width:180,height:180,border:"1px solid var(--border)",borderRadius:8}})}),F&&f.jsx("div",{className:`message mt-4 ${$==="success"?"message-success":$==="error"?"message-error":""}`,children:F})]})]},m)})]});case"review":return f.jsxs("div",{className:"wizard-step",children:[f.jsx("h2",{className:"wizard-step-title",children:x("wizardReviewTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardReviewDesc")}),Te==="done"?f.jsxs("div",{className:"wizard-done",children:[f.jsx("div",{className:"wizard-step-icon",children:"✅"}),f.jsx("h2",{className:"wizard-step-title",children:x("wizardDoneTitle")}),f.jsx("p",{className:"wizard-step-desc",children:x("wizardDoneDesc")}),f.jsx("button",{type:"button",className:"btn btn-primary",onClick:d,children:x("wizardGoToDashboard")})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"wizard-review-section",children:[f.jsx("h3",{className:"wizard-review-heading",children:x("aiTitle")}),f.jsxs("div",{className:"wizard-review-kv",children:[f.jsx("span",{children:x("workDir")}),f.jsx("code",{children:U.ai.claudeWorkDir||"—"})]}),f.jsxs("div",{className:"wizard-review-kv",children:[f.jsx("span",{children:x("codexCli")}),f.jsx("code",{children:U.ai.codexCliPath})]}),f.jsxs("div",{className:"wizard-review-kv",children:[f.jsx("span",{children:x("logLevel")}),f.jsx("code",{children:U.ai.logLevel})]})]}),f.jsxs("div",{className:"wizard-review-section",children:[f.jsx("h3",{className:"wizard-review-heading",children:x("platformsTitle")}),f.jsx("div",{className:"wizard-review-platforms",children:Bl.filter(m=>U.platforms[m].enabled).map(m=>{const A=It.find(le=>le.key===m),D=U.platforms[m].aiCommand||"claude";return f.jsxs("div",{className:"wizard-review-platform-badge",children:[f.jsx("strong",{children:A.label}),f.jsx("span",{className:"wizard-review-platform-cmd",children:D})]},m)})})]}),q&&f.jsx("div",{className:"message message-error",style:{marginTop:16},children:q}),Te!=="idle"&&Te!=="error"&&f.jsxs("div",{className:"wizard-progress-indicator",children:[Te==="saving"&&x("wizardSaving"),Te==="starting"&&x("wizardStarting")]})]})]})}};return f.jsxs("div",{className:"wizard",children:[f.jsx("div",{className:"wizard-progress-bar",children:f.jsx("div",{className:"wizard-progress-fill",style:{width:`${Ol}%`}})}),f.jsx("div",{className:"wizard-step-labels",children:Ba.map((m,A)=>f.jsxs("button",{type:"button",className:`wizard-step-label ${A===Ce?"active":A<Ce?"done":""}`,onClick:()=>{A<Ce&&k(m)},disabled:A>Ce,children:[f.jsx("span",{className:"wizard-step-label-num",children:A+1}),f.jsx("span",{className:"wizard-step-label-text",children:x(`wizardStepLabel_${m}`)})]},m))}),f.jsx("div",{className:"wizard-content",children:$e()}),Te!=="done"&&f.jsxs("div",{className:"wizard-nav",children:[Ce>0&&f.jsx("button",{type:"button",className:"btn btn-secondary",onClick:Ie,disabled:S,children:x("wizardBack")}),f.jsx("div",{style:{flex:1}}),O==="review"?f.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>void el(),disabled:S||!V(),children:x(S?"wizardWorking":"wizardFinish")}):f.jsx("button",{type:"button",className:"btn btn-primary",onClick:Ge,disabled:!V(),children:x("wizardNext")})]})]})}function qa(v){return v instanceof Error?v.message:String(v)}function Gd(v){return JSON.stringify(JSON.parse(v),null,2)+`
50
50
  `}function Kv(v){return v==="codex"||v==="codebuddy"||v==="claude"||v===""?v:"claude"}function lm(){return{platforms:{telegram:{enabled:!1,aiCommand:"claude",botToken:"",proxy:"",allowedUserIds:""},feishu:{enabled:!1,aiCommand:"claude",appId:"",appSecret:"",allowedUserIds:""},qq:{enabled:!1,aiCommand:"claude",appId:"",secret:"",allowedUserIds:""},wework:{enabled:!1,aiCommand:"claude",corpId:"",secret:"",allowedUserIds:""},dingtalk:{enabled:!1,aiCommand:"claude",clientId:"",clientSecret:"",cardTemplateId:"",allowedUserIds:""},workbuddy:{enabled:!1,aiCommand:"claude",accessToken:"",refreshToken:"",userId:"",baseUrl:"",allowedUserIds:""},clawbot:{enabled:!1,aiCommand:"claude",apiUrl:"http://127.0.0.1:26322",apiToken:"",allowedUserIds:""}},ai:{claudeWorkDir:"",claudeConfigPath:"",claudeProxy:"",codexCliPath:"codex",codexProxy:"",codebuddyCliPath:"codebuddy",hookPort:0,logLevel:"default"}}}function Xd(v){const x=lm(),E=d=>{const H={...x.platforms[d],...v.platforms[d]};return{...H,aiCommand:Kv(H.aiCommand)}};return{platforms:{telegram:E("telegram"),feishu:E("feishu"),qq:E("qq"),wework:E("wework"),dingtalk:E("dingtalk"),workbuddy:E("workbuddy"),clawbot:E("clawbot")},ai:{...x.ai,...v.ai,hookPort:typeof v.ai.hookPort=="number"?v.ai.hookPort:Number(v.ai.hookPort)||0}}}function Vv(){const v=Ov(),[x,E]=Z.useState(()=>(localStorage.getItem(Yd)||"").startsWith("zh")||typeof navigator<"u"&&navigator.language.startsWith("zh")?"zh":"en"),{t:d,html:H}=Dv(x),[O,k]=Z.useState(lm),[U,j]=Z.useState({configPath:""}),[S,Y]=Z.useState(""),[q,ne]=Z.useState(""),[$,K]=Z.useState(""),[ge,ee]=Z.useState(""),[F,oe]=Z.useState({text:"",type:""}),[Te,me]=Z.useState(!1),[Me,je]=Z.useState("overview"),[V,Ge]=Z.useState(null),[Ie,Ml]=Z.useState({running:!1}),[el,Ce]=Z.useState(null),[Ol,ll]=Z.useState(null),[$e,m]=Z.useState({}),A=Z.useRef(null),D=Z.useRef(null),le=Z.useRef(null),se=Z.useRef(null),o=Z.useCallback(async()=>{const M=await v("/api/service/status"),Q={running:!!M.running,pid:M.pid};return Ml(Ae=>Ae.running===Q.running&&Ae.pid===Q.pid?Ae:Q),M},[v]),z=Z.useCallback(async()=>{try{const M=await v("/api/health");Ge(Q=>Q&&JSON.stringify(Q)===JSON.stringify(M)?Q:M)}catch{}},[v]);Z.useEffect(()=>{let M=!1;return(async()=>{me(!0),oe({text:"",type:""});try{const Q=await v("/api/config");if(M)return;const Ae=Xd(Q.payload);k(Ae),j({configPath:Q.meta.configPath});const[xe,pl,Yl]=await Promise.all([v("/api/claude/settings"),v("/api/codex/settings"),v("/api/config/file"),o(),z()]);if(M)return;const ka=(fi,si)=>{const Ql=(fi??"").trim();if(!Ql)return si;try{return Gd(Ql)}catch{return Ql}};Y(ka(xe.contents,`{
51
51
  }
52
52
  `)),ne(ka(pl.contents,`{
@@ -7,7 +7,7 @@
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com" />
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9
9
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
10
- <script type="module" crossorigin src="./assets/index-D9wB9QhK.js"></script>
10
+ <script type="module" crossorigin src="./assets/index-OkGMhNyw.js"></script>
11
11
  <link rel="stylesheet" crossorigin href="./assets/index-BmPrR_n2.css">
12
12
  </head>
13
13
  <body>