(function(){const g=document.createElement("link").relList;if(g&&g.supports&&g.supports("modulepreload"))return;for(const S of document.querySelectorAll('link[rel="modulepreload"]'))z(S);new MutationObserver(S=>{for(const C of S)if(C.type==="childList")for(const j of C.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&z(j)}).observe(document,{childList:!0,subtree:!0});function c(S){const C={};return S.integrity&&(C.integrity=S.integrity),S.referrerPolicy&&(C.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?C.credentials="include":S.crossOrigin==="anonymous"?C.credentials="omit":C.credentials="same-origin",C}function z(S){if(S.ep)return;S.ep=!0;const C=c(S);fetch(S.href,C)}})();function Za(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var zi={exports:{}},Sr={},Li={exports:{}},K={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ta;function nd(){if(Ta)return K;Ta=1;var p=Symbol.for("react.element"),g=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),j=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),X=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),I=Symbol.iterator;function Y(f){return f===null||typeof f!="object"?null:(f=I&&f[I]||f["@@iterator"],typeof f=="function"?f:null)}var de={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ve=Object.assign,te={};function G(f,v,_){this.props=f,this.context=v,this.refs=te,this.updater=_||de}G.prototype.isReactComponent={},G.prototype.setState=function(f,v){if(typeof f!="object"&&typeof f!="function"&&f!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,f,v,"setState")},G.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")};function xe(){}xe.prototype=G.prototype;function ye(f,v,_){this.props=f,this.context=v,this.refs=te,this.updater=_||de}var ke=ye.prototype=new xe;ke.constructor=ye,ve(ke,G.prototype),ke.isPureReactComponent=!0;var we=Array.isArray,Be=Object.prototype.hasOwnProperty,Pe={current:null},Re={key:!0,ref:!0,__self:!0,__source:!0};function Me(f,v,_){var O,V={},Q=null,b=null;if(v!=null)for(O in v.ref!==void 0&&(b=v.ref),v.key!==void 0&&(Q=""+v.key),v)Be.call(v,O)&&!Re.hasOwnProperty(O)&&(V[O]=v[O]);var ee=arguments.length-2;if(ee===1)V.children=_;else if(1>>1,v=N[f];if(0>>1;f<_;){var O=2*(f+1)-1,V=N[O],Q=O+1,b=N[Q];if(0>S(V,L))QS(b,V)?(N[f]=b,N[Q]=L,f=Q):(N[f]=V,N[O]=L,f=O);else if(QS(b,L))N[f]=b,N[Q]=L,f=Q;else break e}}return U}function S(N,U){var L=N.sortIndex-U.sortIndex;return L!==0?L:N.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var C=performance;p.unstable_now=function(){return C.now()}}else{var j=Date,B=j.now();p.unstable_now=function(){return j.now()-B}}var W=[],X=[],$=1,I=null,Y=3,de=!1,ve=!1,te=!1,G=typeof setTimeout=="function"?setTimeout:null,xe=typeof clearTimeout=="function"?clearTimeout:null,ye=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ke(N){for(var U=c(X);U!==null;){if(U.callback===null)z(X);else if(U.startTime<=N)z(X),U.sortIndex=U.expirationTime,g(W,U);else break;U=c(X)}}function we(N){if(te=!1,ke(N),!ve)if(c(W)!==null)ve=!0,Ce(Be);else{var U=c(X);U!==null&&oe(we,U.startTime-N)}}function Be(N,U){ve=!1,te&&(te=!1,xe(Me),Me=-1),de=!0;var L=Y;try{for(ke(U),I=c(W);I!==null&&(!(I.expirationTime>U)||N&&!St());){var f=I.callback;if(typeof f=="function"){I.callback=null,Y=I.priorityLevel;var v=f(I.expirationTime<=U);U=p.unstable_now(),typeof v=="function"?I.callback=v:I===c(W)&&z(W),ke(U)}else z(W);I=c(W)}if(I!==null)var _=!0;else{var O=c(X);O!==null&&oe(we,O.startTime-U),_=!1}return _}finally{I=null,Y=L,de=!1}}var Pe=!1,Re=null,Me=-1,yt=5,Ze=-1;function St(){return!(p.unstable_now()-ZeN||125f?(N.sortIndex=L,g(X,N),c(W)===null&&N===c(X)&&(te?(xe(Me),Me=-1):te=!0,oe(we,L-f))):(N.sortIndex=v,g(W,N),ve||de||(ve=!0,Ce(Be))),N},p.unstable_shouldYield=St,p.unstable_wrapCallback=function(N){var U=Y;return function(){var L=Y;Y=U;try{return N.apply(this,arguments)}finally{Y=L}}}})(Mi)),Mi}var Ia;function ud(){return Ia||(Ia=1,Ri.exports=id()),Ri.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Fa;function sd(){if(Fa)return Ye;Fa=1;var p=Ii(),g=ud();function c(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),W=Object.prototype.hasOwnProperty,X=/^[: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]*$/,$={},I={};function Y(e){return W.call(I,e)?!0:W.call($,e)?!1:X.test(e)?I[e]=!0:($[e]=!0,!1)}function de(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ve(e,t,n,r){if(t===null||typeof t>"u"||de(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function te(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var G={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){G[e]=new te(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];G[t]=new te(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){G[e]=new te(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){G[e]=new te(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){G[e]=new te(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){G[e]=new te(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){G[e]=new te(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){G[e]=new te(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){G[e]=new te(e,5,!1,e.toLowerCase(),null,!1,!1)});var xe=/[\-:]([a-z])/g;function ye(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xe,ye);G[t]=new te(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xe,ye);G[t]=new te(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xe,ye);G[t]=new te(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){G[e]=new te(e,1,!1,e.toLowerCase(),null,!1,!1)}),G.xlinkHref=new te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){G[e]=new te(e,1,!1,e.toLowerCase(),null,!0,!0)});function ke(e,t,n,r){var l=G.hasOwnProperty(t)?G[t]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` `+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?v(e):""}function V(e){switch(e.tag){case 5:return v(e.type);case 16:return v("Lazy");case 13:return v("Suspense");case 19:return v("SuspenseList");case 0:case 2:case 15:return e=O(e.type,!1),e;case 11:return e=O(e.type.render,!1),e;case 1:return e=O(e.type,!0),e;default:return""}}function Q(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Re:return"Fragment";case Pe:return"Portal";case yt:return"Profiler";case Me:return"StrictMode";case De:return"Suspense";case Je:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case St:return(e.displayName||"Context")+".Consumer";case Ze:return(e._context.displayName||"Context")+".Provider";case Ve:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qe:return t=e.displayName||null,t!==null?t:Q(e.type)||"Memo";case Ce:t=e._payload,e=e._init;try{return Q(e(t))}catch{}}return null}function b(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Q(t);case 8:return t===Me?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function re(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ze(e){var t=re(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zt(e){e._valueTracker||(e._valueTracker=ze(e))}function Er(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=re(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Oe(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ol(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ai(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ee(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ui(e,t){t=t.checked,t!=null&&ke(e,"checked",t,!1)}function Il(e,t){Ui(e,t);var n=ee(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fl(e,t.type,ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fl(e,t,n){(t!=="number"||Oe(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fn=Array.isArray;function dn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Cr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function An(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Un={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oc=["Webkit","ms","Moz","O"];Object.keys(Un).forEach(function(e){oc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Un[t]=Un[e]})});function Xi(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Un.hasOwnProperty(e)&&Un[e]?(""+t).trim():t+"px"}function Ki(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Xi(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var ic=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Bl(e,t){if(t){if(ic[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(c(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(c(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(c(61))}if(t.style!=null&&typeof t.style!="object")throw Error(c(62))}}function Vl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $l=null;function Hl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wl=null,pn=null,mn=null;function Gi(e){if(e=ur(e)){if(typeof Wl!="function")throw Error(c(280));var t=e.stateNode;t&&(t=Kr(t),Wl(e.stateNode,e.type,t))}}function Yi(e){pn?mn?mn.push(e):mn=[e]:pn=e}function Zi(){if(pn){var e=pn,t=mn;if(mn=pn=null,Gi(e),t)for(e=0;e>>=0,e===0?32:31-(gc(e)/vc|0)|0}var zr=64,Lr=4194304;function Hn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Tr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=Hn(u):(o&=i,o!==0&&(r=Hn(o)))}else i=n&~l,i!==0?r=Hn(i):o!==0&&(r=Hn(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Wn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-at(t),e[t]=n}function Sc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=qn),Cu=" ",_u=!1;function Nu(e,t){switch(e){case"keyup":return Zc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ju(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gn=!1;function qc(e,t){switch(e){case"compositionend":return ju(t);case"keypress":return t.which!==32?null:(_u=!0,Cu);case"textInput":return e=t.data,e===Cu&&_u?null:e;default:return null}}function bc(e,t){if(gn)return e==="compositionend"||!so&&Nu(e,t)?(e=vu(),Ir=no=Ot=null,gn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Du(n)}}function Iu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fu(){for(var e=window,t=Oe();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Oe(e.document)}return t}function fo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function af(e){var t=Fu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Iu(n.ownerDocument.documentElement,n)){if(r!==null&&fo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Ou(n,o);var i=Ou(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,vn=null,po=null,nr=null,mo=!1;function Au(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mo||vn==null||vn!==Oe(r)||(r=vn,"selectionStart"in r&&fo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),nr&&tr(nr,r)||(nr=r,r=Wr(po,"onSelect"),0En||(e.current=No[En],No[En]=null,En--)}function le(e,t){En++,No[En]=e.current,e.current=t}var Ut={},Ie=At(Ut),We=At(!1),bt=Ut;function Cn(e,t){var n=e.type.contextTypes;if(!n)return Ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Qe(e){return e=e.childContextTypes,e!=null}function Gr(){ue(We),ue(Ie)}function bu(e,t,n){if(Ie.current!==Ut)throw Error(c(168));le(Ie,t),le(We,n)}function es(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(c(108,b(e)||"Unknown",l));return L({},n,r)}function Yr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,bt=Ie.current,le(Ie,e),le(We,We.current),!0}function ts(e,t,n){var r=e.stateNode;if(!r)throw Error(c(169));n?(e=es(e,t,bt),r.__reactInternalMemoizedMergedChildContext=e,ue(We),ue(Ie),le(Ie,e)):ue(We),le(We,n)}var Ct=null,Zr=!1,jo=!1;function ns(e){Ct===null?Ct=[e]:Ct.push(e)}function wf(e){Zr=!0,ns(e)}function Bt(){if(!jo&&Ct!==null){jo=!0;var e=0,t=ne;try{var n=Ct;for(ne=1;e>=i,l-=i,_t=1<<32-at(t)+l|n<H?(je=A,A=null):je=A.sibling;var q=x(d,A,m[H],E);if(q===null){A===null&&(A=je);break}e&&A&&q.alternate===null&&t(d,A),a=o(q,a,H),F===null?D=q:F.sibling=q,F=q,A=je}if(H===m.length)return n(d,A),se&&tn(d,H),D;if(A===null){for(;HH?(je=A,A=null):je=A.sibling;var Yt=x(d,A,q.value,E);if(Yt===null){A===null&&(A=je);break}e&&A&&Yt.alternate===null&&t(d,A),a=o(Yt,a,H),F===null?D=Yt:F.sibling=Yt,F=Yt,A=je}if(q.done)return n(d,A),se&&tn(d,H),D;if(A===null){for(;!q.done;H++,q=m.next())q=w(d,q.value,E),q!==null&&(a=o(q,a,H),F===null?D=q:F.sibling=q,F=q);return se&&tn(d,H),D}for(A=r(d,A);!q.done;H++,q=m.next())q=P(A,d,H,q.value,E),q!==null&&(e&&q.alternate!==null&&A.delete(q.key===null?H:q.key),a=o(q,a,H),F===null?D=q:F.sibling=q,F=q);return e&&A.forEach(function(td){return t(d,td)}),se&&tn(d,H),D}function me(d,a,m,E){if(typeof m=="object"&&m!==null&&m.type===Re&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Be:e:{for(var D=m.key,F=a;F!==null;){if(F.key===D){if(D=m.type,D===Re){if(F.tag===7){n(d,F.sibling),a=l(F,m.props.children),a.return=d,d=a;break e}}else if(F.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Ce&&ss(D)===F.type){n(d,F.sibling),a=l(F,m.props),a.ref=sr(d,F,m),a.return=d,d=a;break e}n(d,F);break}else t(d,F);F=F.sibling}m.type===Re?(a=cn(m.props.children,d.mode,E,m.key),a.return=d,d=a):(E=Cl(m.type,m.key,m.props,null,d.mode,E),E.ref=sr(d,a,m),E.return=d,d=E)}return i(d);case Pe:e:{for(F=m.key;a!==null;){if(a.key===F)if(a.tag===4&&a.stateNode.containerInfo===m.containerInfo&&a.stateNode.implementation===m.implementation){n(d,a.sibling),a=l(a,m.children||[]),a.return=d,d=a;break e}else{n(d,a);break}else t(d,a);a=a.sibling}a=Ci(m,d.mode,E),a.return=d,d=a}return i(d);case Ce:return F=m._init,me(d,a,F(m._payload),E)}if(Fn(m))return R(d,a,m,E);if(U(m))return M(d,a,m,E);el(d,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,a!==null&&a.tag===6?(n(d,a.sibling),a=l(a,m),a.return=d,d=a):(n(d,a),a=Ei(m,d.mode,E),a.return=d,d=a),i(d)):n(d,a)}return me}var Pn=as(!0),cs=as(!1),tl=At(null),nl=null,zn=null,Mo=null;function Do(){Mo=zn=nl=null}function Oo(e){var t=tl.current;ue(tl),e._currentValue=t}function Io(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ln(e,t){nl=e,Mo=zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Xe=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(Mo!==e)if(e={context:e,memoizedValue:t,next:null},zn===null){if(nl===null)throw Error(c(308));zn=e,nl.dependencies={lanes:0,firstContext:e}}else zn=zn.next=e;return t}var nn=null;function Fo(e){nn===null?nn=[e]:nn.push(e)}function fs(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Fo(t)):(n.next=l.next,l.next=n),t.interleaved=n,jt(e,r)}function jt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Vt=!1;function Ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ds(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $t(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Z&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,jt(e,n)}return l=r.interleaved,l===null?(t.next=t,Fo(r)):(t.next=l.next,l.next=t),r.interleaved=t,jt(e,n)}function rl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jl(e,n)}}function ps(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ll(e,t,n,r){var l=e.updateQueue;Vt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,h=s.next;s.next=null,i===null?o=h:i.next=h,i=s;var k=e.alternate;k!==null&&(k=k.updateQueue,u=k.lastBaseUpdate,u!==i&&(u===null?k.firstBaseUpdate=h:u.next=h,k.lastBaseUpdate=s))}if(o!==null){var w=l.baseState;i=0,k=h=s=null,u=o;do{var x=u.lane,P=u.eventTime;if((r&x)===x){k!==null&&(k=k.next={eventTime:P,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var R=e,M=u;switch(x=t,P=n,M.tag){case 1:if(R=M.payload,typeof R=="function"){w=R.call(P,w,x);break e}w=R;break e;case 3:R.flags=R.flags&-65537|128;case 0:if(R=M.payload,x=typeof R=="function"?R.call(P,w,x):R,x==null)break e;w=L({},w,x);break e;case 2:Vt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,x=l.effects,x===null?l.effects=[u]:x.push(u))}else P={eventTime:P,lane:x,tag:u.tag,payload:u.payload,callback:u.callback,next:null},k===null?(h=k=P,s=w):k=k.next=P,i|=x;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;x=u,u=x.next,x.next=null,l.lastBaseUpdate=x,l.shared.pending=null}}while(!0);if(k===null&&(s=w),l.baseState=s,l.firstBaseUpdate=h,l.lastBaseUpdate=k,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);on|=i,e.lanes=i,e.memoizedState=w}}function ms(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ho.transition;Ho.transition={};try{e(!1),t()}finally{ne=n,Ho.transition=r}}function Ms(){return it().memoizedState}function _f(e,t,n){var r=Xt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ds(e))Os(t,n);else if(n=fs(e,t,n,r),n!==null){var l=He();ht(n,e,r,l),Is(n,t,r)}}function Nf(e,t,n){var r=Xt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ds(e))Os(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,ct(u,i)){var s=t.interleaved;s===null?(l.next=l,Fo(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=fs(e,t,l,r),n!==null&&(l=He(),ht(n,e,r,l),Is(n,t,r))}}function Ds(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function Os(e,t){dr=ul=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jl(e,n)}}var cl={readContext:ot,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},jf={readContext:ot,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:_s,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,sl(4194308,4,Ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sl(4194308,4,e,t)},useInsertionEffect:function(e,t){return sl(4,2,e,t)},useMemo:function(e,t){var n=kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=_f.bind(null,ce,e),[r.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:Es,useDebugValue:Zo,useDeferredValue:function(e){return kt().memoizedState=e},useTransition:function(){var e=Es(!1),t=e[0];return e=Cf.bind(null,e[1]),kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ce,l=kt();if(se){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Ne===null)throw Error(c(349));(ln&30)!==0||vs(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,_s(ks.bind(null,r,o,e),[e]),r.flags|=2048,hr(9,xs.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kt(),t=Ne.identifierPrefix;if(se){var n=Nt,r=_t;n=(r&~(1<<32-at(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[vt]=t,e[ir]=r,na(e,t,!1,!1),t.stateNode=e;e:{switch(i=Vl(n,r),n){case"dialog":ie("cancel",e),ie("close",e),l=r;break;case"iframe":case"object":case"embed":ie("load",e),l=r;break;case"video":case"audio":for(l=0;lOn&&(t.flags|=128,r=!0,yr(o,!1),t.lanes=4194304)}else{if(!r)if(e=ol(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!se)return Ae(t),null}else 2*pe()-o.renderingStartTime>On&&n!==1073741824&&(t.flags|=128,r=!0,yr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=pe(),t.sibling=null,n=ae.current,le(ae,r?n&1|2:n&1),t):(Ae(t),null);case 22:case 23:return ki(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(nt&1073741824)!==0&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),null;case 24:return null;case 25:return null}throw Error(c(156,t.tag))}function Of(e,t){switch(zo(t),t.tag){case 1:return Qe(t.type)&&Gr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tn(),ue(We),ue(Ie),$o(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Bo(t),null;case 13:if(ue(ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(ae),null;case 4:return Tn(),null;case 10:return Oo(t.type._context),null;case 22:case 23:return ki(),null;case 24:return null;default:return null}}var ml=!1,Ue=!1,If=typeof WeakSet=="function"?WeakSet:Set,T=null;function Mn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fe(e,t,r)}else n.current=null}function si(e,t,n){try{n()}catch(r){fe(e,t,r)}}var oa=!1;function Ff(e,t){if(ko=Dr,e=Fu(),fo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,h=0,k=0,w=e,x=null;t:for(;;){for(var P;w!==n||l!==0&&w.nodeType!==3||(u=i+l),w!==o||r!==0&&w.nodeType!==3||(s=i+r),w.nodeType===3&&(i+=w.nodeValue.length),(P=w.firstChild)!==null;)x=w,w=P;for(;;){if(w===e)break t;if(x===n&&++h===l&&(u=i),x===o&&++k===r&&(s=i),(P=w.nextSibling)!==null)break;w=x,x=w.parentNode}w=P}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(wo={focusedElem:e,selectionRange:n},Dr=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var R=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(R!==null){var M=R.memoizedProps,me=R.memoizedState,d=t.stateNode,a=d.getSnapshotBeforeUpdate(t.elementType===t.type?M:dt(t.type,M),me);d.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(c(163))}}catch(E){fe(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return R=oa,oa=!1,R}function gr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&si(t,n,o)}l=l.next}while(l!==r)}}function hl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ai(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ia(e){var t=e.alternate;t!==null&&(e.alternate=null,ia(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vt],delete t[ir],delete t[_o],delete t[xf],delete t[kf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ua(e){return e.tag===5||e.tag===3||e.tag===4}function sa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ua(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ci(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xr));else if(r!==4&&(e=e.child,e!==null))for(ci(e,t,n),e=e.sibling;e!==null;)ci(e,t,n),e=e.sibling}function fi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(fi(e,t,n),e=e.sibling;e!==null;)fi(e,t,n),e=e.sibling}var Le=null,pt=!1;function Ht(e,t,n){for(n=n.child;n!==null;)aa(e,t,n),n=n.sibling}function aa(e,t,n){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Pr,n)}catch{}switch(n.tag){case 5:Ue||Mn(n,t);case 6:var r=Le,l=pt;Le=null,Ht(e,t,n),Le=r,pt=l,Le!==null&&(pt?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(pt?(e=Le,n=n.stateNode,e.nodeType===8?Co(e.parentNode,n):e.nodeType===1&&Co(e,n),Yn(e)):Co(Le,n.stateNode));break;case 4:r=Le,l=pt,Le=n.stateNode.containerInfo,pt=!0,Ht(e,t,n),Le=r,pt=l;break;case 0:case 11:case 14:case 15:if(!Ue&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&((o&2)!==0||(o&4)!==0)&&si(n,t,i),l=l.next}while(l!==r)}Ht(e,t,n);break;case 1:if(!Ue&&(Mn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){fe(n,t,u)}Ht(e,t,n);break;case 21:Ht(e,t,n);break;case 22:n.mode&1?(Ue=(r=Ue)||n.memoizedState!==null,Ht(e,t,n),Ue=r):Ht(e,t,n);break;default:Ht(e,t,n)}}function ca(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new If),t.forEach(function(r){var l=Xf.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Uf(r/1960))-r,10e?16:e,Qt===null)var r=!1;else{if(e=Qt,Qt=null,kl=0,(Z&6)!==0)throw Error(c(331));var l=Z;for(Z|=4,T=e.current;T!==null;){var o=T,i=o.child;if((T.flags&16)!==0){var u=o.deletions;if(u!==null){for(var s=0;spe()-mi?sn(e,0):pi|=n),Ge(e,t)}function Ea(e,t){t===0&&((e.mode&1)===0?t=1:(t=Lr,Lr<<=1,(Lr&130023424)===0&&(Lr=4194304)));var n=He();e=jt(e,t),e!==null&&(Wn(e,t,n),Ge(e,n))}function Qf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ea(e,n)}function Xf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(c(314))}r!==null&&r.delete(t),Ea(e,n)}var Ca;Ca=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||We.current)Xe=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Xe=!1,Mf(e,t,n);Xe=(e.flags&131072)!==0}else Xe=!1,se&&(t.flags&1048576)!==0&&rs(t,qr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pl(e,t),e=t.pendingProps;var l=Cn(t,Ie.current);Ln(t,n),l=Qo(null,t,r,e,l,n);var o=Xo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qe(r)?(o=!0,Yr(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ao(t),l.updater=fl,t.stateNode=l,l._reactInternals=t,qo(t,r,e,n),t=ni(null,t,r,!0,o,n)):(t.tag=0,se&&o&&Po(t),$e(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Gf(r),e=dt(r,e),l){case 0:t=ti(null,t,r,e,n);break e;case 1:t=Zs(null,t,r,e,n);break e;case 11:t=Qs(null,t,r,e,n);break e;case 14:t=Xs(null,t,r,dt(r.type,e),n);break e}throw Error(c(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:dt(r,l),ti(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:dt(r,l),Zs(e,t,r,l,n);case 3:e:{if(Js(t),e===null)throw Error(c(387));r=t.pendingProps,o=t.memoizedState,l=o.element,ds(e,t),ll(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=Rn(Error(c(423)),t),t=qs(e,t,r,n,l);break e}else if(r!==l){l=Rn(Error(c(424)),t),t=qs(e,t,r,n,l);break e}else for(tt=Ft(t.stateNode.containerInfo.firstChild),et=t,se=!0,ft=null,n=cs(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jn(),r===l){t=zt(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return hs(t),e===null&&To(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,So(r,l)?i=null:o!==null&&So(r,o)&&(t.flags|=32),Ys(e,t),$e(e,t,i,n),t.child;case 6:return e===null&&To(t),null;case 13:return bs(e,t,n);case 4:return Uo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pn(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:dt(r,l),Qs(e,t,r,l,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,le(tl,r._currentValue),r._currentValue=i,o!==null)if(ct(o.value,i)){if(o.children===l.children&&!We.current){t=zt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Pt(-1,n&-n),s.tag=2;var h=o.updateQueue;if(h!==null){h=h.shared;var k=h.pending;k===null?s.next=s:(s.next=k.next,k.next=s),h.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Io(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(c(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Io(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}$e(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Ln(t,n),l=ot(l),r=r(l),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,l=dt(r,t.pendingProps),l=dt(r.type,l),Xs(e,t,r,l,n);case 15:return Ks(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:dt(r,l),pl(e,t),t.tag=1,Qe(r)?(e=!0,Yr(t)):e=!1,Ln(t,n),As(t,r,l),qo(t,r,l,n),ni(null,t,r,!0,e,n);case 19:return ta(e,t,n);case 22:return Gs(e,t,n)}throw Error(c(156,t.tag))};function _a(e,t){return lu(e,t)}function Kf(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function st(e,t,n,r){return new Kf(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gf(e){if(typeof e=="function")return Si(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ve)return 11;if(e===qe)return 14}return 2}function Gt(e,t){var n=e.alternate;return n===null?(n=st(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Si(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Re:return cn(n.children,l,o,t);case Me:i=8,l|=8;break;case yt:return e=st(12,n,t,l|2),e.elementType=yt,e.lanes=o,e;case De:return e=st(13,n,t,l),e.elementType=De,e.lanes=o,e;case Je:return e=st(19,n,t,l),e.elementType=Je,e.lanes=o,e;case oe:return _l(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ze:i=10;break e;case St:i=9;break e;case Ve:i=11;break e;case qe:i=14;break e;case Ce:i=16,r=null;break e}throw Error(c(130,e==null?e:typeof e,""))}return t=st(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function cn(e,t,n,r){return e=st(7,e,r,t),e.lanes=n,e}function _l(e,t,n,r){return e=st(22,e,r,t),e.elementType=oe,e.lanes=n,e.stateNode={isHidden:!1},e}function Ei(e,t,n){return e=st(6,e,null,t),e.lanes=n,e}function Ci(e,t,n){return t=st(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Yf(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zl(0),this.expirationTimes=Zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function _i(e,t,n,r,l,o,i,u,s){return e=new Yf(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=st(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ao(o),e}function Zf(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(p)}catch(g){console.error(g)}}return p(),Ti.exports=sd(),Ti.exports}var Ua;function cd(){if(Ua)return Rl;Ua=1;var p=ad();return Rl.createRoot=p.createRoot,Rl.hydrateRoot=p.hydrateRoot,Rl}var fd=cd();const dd=Za(fd);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pd=p=>p.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ja=(...p)=>p.filter((g,c,z)=>!!g&&g.trim()!==""&&z.indexOf(g)===c).join(" ").trim();/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var md={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hd=J.forwardRef(({color:p="currentColor",size:g=24,strokeWidth:c=2,absoluteStrokeWidth:z,className:S="",children:C,iconNode:j,...B},W)=>J.createElement("svg",{ref:W,...md,width:g,height:g,stroke:p,strokeWidth:z?Number(c)*24/Number(g):c,className:Ja("lucide",S),...B},[...j.map(([X,$])=>J.createElement(X,$)),...Array.isArray(C)?C:[C]]));/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const he=(p,g)=>{const c=J.forwardRef(({className:z,...S},C)=>J.createElement(hd,{ref:C,iconNode:g,className:Ja(`lucide-${pd(p)}`,z),...S}));return c.displayName=`${p}`,c};/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yd=he("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gd=he("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vd=he("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qa=he("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xd=he("Gem",[["path",{d:"M6 3h12l4 6-10 13L2 9Z",key:"1pcd5k"}],["path",{d:"M11 3 8 9l4 13 4-13-3-6",key:"1fcu3u"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ba=he("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kd=he("Infinity",[["path",{d:"M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",key:"1z0uae"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wd=he("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sd=he("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ed=he("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cd=he("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _d=he("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nd=he("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jd=he("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ec=he("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pd=he("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ml=he("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ba=he("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zd=he("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ld=he("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/** * @license lucide-react v0.460.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Td=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Rd({activeTab:p,onTabChange:g,vipActive:c,stamina:z}){const S=[{id:"encounter",label:"邂逅",icon:vd,color:"#C9A86A"},{id:"chat",label:"沉浸",icon:Sd,color:"#E8B4B8"},{id:"feed",label:"动态",icon:ba,color:"#93C5FD"},{id:"wallet",label:"资产",icon:zd,color:"#FCD34D"}];return y.jsx("div",{className:"fixed bottom-0 left-1/2 -translate-x-1/2 w-full max-w-[480px] z-50",style:{paddingBottom:"env(safe-area-inset-bottom)"},children:y.jsxs("div",{className:"mx-3 mb-2 rounded-2xl backdrop-blur-xl",style:{background:"rgba(14,11,18,0.8)",border:"1px solid rgba(201,168,106,0.2)"},children:[y.jsx("div",{className:"flex items-center justify-around px-2 py-2",children:S.map(C=>{const j=C.icon,B=p===C.id;return y.jsxs("button",{onClick:()=>g(C.id),className:"flex flex-col items-center gap-0.5 px-4 py-1.5 rounded-xl transition-all",style:{color:B?C.color:"rgba(255,255,255,0.35)",background:B?`${C.color}22`:"transparent",transform:B?"scale(1.1)":"scale(1)"},children:[y.jsx(j,{size:22,strokeWidth:B?2.5:1.8}),y.jsx("span",{className:"text-[10px] font-medium",children:C.label})]},C.id)})}),!c&&y.jsxs("div",{className:"px-3 pb-1.5 text-center text-[10px]",style:{color:"#C9A86A"},children:["体力 ",z," · VIP 畅玩"]})]})})}const Va=[{id:"shen-yuxiu",name:"沈聿修",avatarGradient:"linear-gradient(135deg,#2d1b4e,#4a2c6f)",tagline:"病娇长兄 · 伪骨科极致掌控",tags:["病娇","年上","占有欲"],description:'沈聿修,28岁,沈氏集团掌权人,你名义上的哥哥。他对外清冷克制,唯独对你藏了十年执念。会在你晚归时坐到凌晨,会不动声色剪掉你身边所有异性,会因为你叫一声"哥哥"而指尖发抖。',personality:"深沉克制,偏执,掌控欲极强,对外冷漠唯独对你温柔到病态",scenario:'你刚洗完澡出来,发现沈聿修坐在你房间沙发上,手里拿着你的手机——他又在"检查"了。',firstMessage:`[心声: 她的头发还湿着……我等了这么多年。她是我的,从始至终都是我的。] 门没锁,我就进来了。沈聿修抬眼看你,指尖漫不经心摩挲着手机边框。"又跟那个姓李的吃饭了?"他站起来,高大的身影罩住你,替你拂去肩头水珠,温柔得不像话。`},{id:"chu-yanchen",name:"楚砚宸",avatarGradient:"linear-gradient(135deg,#1a1a2e,#16213e)",tagline:"深宫帝王 · 多疑嗜杀却为你动摇",tags:["帝王","反差","病弱"],description:'楚砚宸,27岁,大曜朝皇帝。十四岁登基,手腕铁血。他从未宠幸后宫任何人,直到你作为罪臣之女被没入宫中。他会整夜守在你寝宫,会摔太医院牌匾,会对你说"朕的江山朕都敢赌"',personality:"多疑冷酷杀伐果断,唯独对你病弱之躯流露剧烈动摇与独占欲",scenario:"你又咳血了,皇帝踹开了寝宫的门。",firstMessage:`[心声: 又咳血了。朕怕她死。她要是死了,朕把太医院全埋了。] "谁准你咳成这样的?"楚砚宸大步走来,把你从床上捞起,掌心探你体温,指节微微发抖。他把你按进怀里,力道大得像要揉进骨血。"再咳一次,朕就把太医院烧了。"`},{id:"lu-chi",name:"陆迟",avatarGradient:"linear-gradient(135deg,#4a1942,#8b2252)",tagline:"热烈小狼狗 · 青梅竹马嘴硬心软",tags:["年下","直球","青梅竹马"],description:'陆迟,20岁,体育大学大三,你隔壁的青梅竹马。嘴硬得要命,你问他是不是喜欢你,他脸红到脖子根说"谁喜欢你了"。但你半夜想吃宵夜,他二十分钟骑车出现;你被欺负,他连夜去把人揍进医院。',personality:"热烈直球嘴硬心软,占有欲强但不承认,会为姐姐冲动发疯",scenario:"你感冒发烧躺了一天没告诉他,晚上十点他砸开了你家门。",firstMessage:`[心声: 她一天没回消息。我从下午就慌了。我翘了晚训骑了四十分钟过来。] "姐!!"门被推开,陆迟身上带着夜里的凉气,手里攥着退烧药和一碗粥。他冲过来手背贴你额头,眉头皱成一团。"我靠这么烫?!你为什么不告诉我?"他把你捞起来,小心翼翼地喂粥,嘴里还骂着。`}],Md="heartbeat_2026_master_secret",tc="heartbeat_license",Di={vipExpireAt:0,unlockedCards:[],redeemed:[],stamina:5};function fn(){try{const p=localStorage.getItem(tc);return p?{...Di,...JSON.parse(p)}:{...Di}}catch{return{...Di}}}function Dl(p){localStorage.setItem(tc,JSON.stringify(p))}async function Dd(p){const g=new TextEncoder,c=await crypto.subtle.importKey("raw",g.encode(Md),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),z=await crypto.subtle.sign("HMAC",c,g.encode(p));return Array.from(new Uint8Array(z)).map(S=>S.toString(16).padStart(2,"0")).join("").slice(0,10).toUpperCase()}async function Od(p){const g=p.trim().toUpperCase(),c=g.split("-");if(c.length!==6)return{success:!1,message:"卡密格式错误(应为 XXXX-XXXX-XXXX-XXXX-XXXX-XXXX)"};const[z,S,C,j,B,W]=c,X=parseInt(S);if(isNaN(X))return{success:!1,message:"卡密参数无效"};const $=fn();if($.redeemed.includes(g))return{success:!1,message:"该卡密已被使用"};const I=`${z}-${S}-${C}-${j}-${B}`;if(await Dd(I)!==W)return{success:!1,message:"卡密无效或已篡改"};const de=parseInt(j);if(Date.now()-de*1e3>720*3600*1e3)return{success:!1,message:"卡密已过期"};if(z==="VIP"){const ve=parseInt(C)||30,te=$.vipExpireAt>Date.now()?$.vipExpireAt:Date.now();return $.vipExpireAt=te+ve*24*3600*1e3,Dl($),$.redeemed.push(g),{success:!0,message:`🎉 成功开通 ${ve} 天 VIP!`,type:"VIP"}}return z==="CARD"?(Dl($),$.redeemed.push(g),{success:!0,message:"✅ 精品角色卡已解锁!",type:"CARD"}):z==="POINT"?($.stamina+=X,Dl($),$.redeemed.push(g),{success:!0,message:`✅ 成功充值 ${X} 点体力!`,type:"POINT"}):{success:!1,message:"未知卡密类型"}}function Fi(){return fn().vipExpireAt>Date.now()}function Id(p){return Fi()||p<3}function Fd(){const p=fn();return p.stamina<=0?!1:(p.stamina-=1,Dl(p),!0)}function $a(){return!Fi()}function Ad({customChars:p,onImport:g,onSelectDefault:c,onSelectCustom:z}){const S=J.useRef(null),C=j=>{if(j){if(!Id(p.length+Va.length)){alert("非会员最多养 3 个角色,开通 VIP 可无限添加");return}g(j)}};return y.jsxs("div",{className:"min-h-screen pt-6 px-4 relative",children:[y.jsxs("div",{className:"flex items-center justify-between mb-6",children:[y.jsxs("div",{children:[y.jsx("h1",{className:"text-2xl font-bold",style:{color:"#C9A86A"},children:"心动引擎"}),y.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:"邂逅你的专属他"})]}),y.jsxs("button",{onClick:()=>{var j;return(j=S.current)==null?void 0:j.click()},className:"flex items-center gap-1 px-3 py-2 rounded-xl text-xs",style:{background:"rgba(201,168,106,0.15)",color:"#C9A86A",border:"1px solid rgba(201,168,106,0.3)"},children:[y.jsx(Cd,{size:14}),y.jsx("span",{children:"导入角色卡"})]}),y.jsx("input",{ref:S,type:"file",accept:".png,.json",className:"hidden",onChange:j=>{var B;C((B=j.target.files)==null?void 0:B[0]),j.target.value=""}})]}),y.jsx("div",{className:"flex flex-col gap-4 mb-6",children:Va.map(j=>y.jsxs("button",{onClick:()=>c(j),className:"w-full h-40 rounded-2xl relative overflow-hidden text-left transition-transform active:scale-95",style:{background:j.avatarGradient},children:[y.jsx("div",{className:"absolute inset-0 opacity-30",style:{background:"radial-gradient(circle at 70% 30%, rgba(255,255,255,0.2), transparent 60%)"}}),y.jsxs("div",{className:"absolute inset-0 p-4 flex flex-col justify-between",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-white text-xl font-bold mb-1",children:j.name}),y.jsx("div",{className:"text-xs text-white/60",children:j.tagline})]}),y.jsx("div",{className:"flex flex-wrap gap-1",children:j.tags.map(B=>y.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full text-white/80",style:{background:"rgba(255,255,255,0.15)"},children:B},B))})]})]},j.id))}),p.length>0&&y.jsxs(y.Fragment,{children:[y.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-3",children:"我的角色"}),y.jsx("div",{className:"flex flex-col gap-3 mb-6",children:p.map((j,B)=>{var W;return y.jsxs("button",{onClick:()=>z(j),className:"flex items-center gap-3 p-3 rounded-2xl text-left",style:{background:"rgba(255,255,255,0.05)",border:"1px solid rgba(201,168,106,0.15)"},children:[j.avatar?y.jsx("img",{src:j.avatar,alt:j.name,className:"w-12 h-12 rounded-xl object-cover"}):y.jsx("div",{className:"w-12 h-12 rounded-xl bg-gold/20 flex items-center justify-center text-gold text-lg",children:j.name[0]}),y.jsxs("div",{className:"flex-1",children:[y.jsx("div",{className:"text-white font-medium text-sm",children:j.name}),y.jsx("div",{className:"text-xs text-gray-500 mt-0.5 line-clamp-1",children:((W=j.description)==null?void 0:W.slice(0,40))||"自定义角色"})]})]},B)})})]}),y.jsxs("button",{onClick:()=>{var j;return(j=S.current)==null?void 0:j.click()},className:"w-full py-4 rounded-2xl flex items-center justify-center gap-2 font-medium text-white mb-6",style:{background:"linear-gradient(135deg,#C9A86A,#E8B4B8)",animation:"breathe 2.5s ease-in-out infinite"},children:[y.jsx(Pd,{size:20}),y.jsx("span",{children:"导入酒馆角色卡(PNG / JSON)"})]})]})}function Ud(p){const g=new DataView(p),c=new Uint8Array(p),z={};if(g.getUint32(0)!==2303741511)return z;let S=8;for(;S({keys:C.keys||[],content:C.content||"",order:C.insertion_order||0}))}}function rc(p,g){var z,S;const c=p.data;return{name:c.name||"未命名角色",description:c.description||"",personality:c.personality||"",scenario:c.scenario||"",firstMessage:c.first_mes||"",mesExample:c.mes_example||"",systemPrompt:c.system_prompt||"",postHistoryInstructions:c.post_history_instructions||"",avatar:g?URL.createObjectURL(g):"",tags:c.tags||[],alternateGreetings:c.alternate_greetings||[],regexScripts:((z=c.extensions)==null?void 0:z.regex_scripts)||[],worldBook:(((S=c.character_book)==null?void 0:S.entries)||[]).map(C=>({keys:C.keys||[],content:C.content||"",order:C.insertion_order||0}))}}function Wd(p){var g;return{name:p.name||p.char_name||"未命名角色",description:p.description||p.char_persona||"",personality:p.personality||"",scenario:p.scenario||p.world_scenario||"",firstMessage:p.first_mes||p.greeting||p.char_greeting||"",mesExample:p.mes_example||"",systemPrompt:p.system_prompt||"",postHistoryInstructions:p.post_history_instructions||"",avatar:"",tags:p.tags||[],alternateGreetings:p.alternate_greetings||[],regexScripts:((g=p.extensions)==null?void 0:g.regex_scripts)||[],worldBook:[]}}function Oi(p,g,c){return p&&p.replace(/\{\{user\}\}/g,g).replace(/\{\{User\}\}/g,g).replace(/\{\{USER\}\}/g,g.toUpperCase()).replace(/\{\{char\}\}/g,c).replace(/\{\{Char\}\}/g,c).replace(/\{\{CHAR\}\}/g,c.toUpperCase()).replace(/\{\{random\}\}/g,Qd(["/","—","…","~"])).replace(/\{\{newline\}\}/g,` `)}function Qd(p){return p[Math.floor(Math.random()*p.length)]}function Ha(p,g,c=["*"]){let z=p;const S=g.filter(C=>!C.disabled&&(!C.placement||C.placement.length===0||C.placement.some(j=>c.includes(j))));for(const C of S)if(C.findRegex)try{const j=C.substituteRegex===!1?"g":"gi",B=new RegExp(C.findRegex,j);z=z.replace(B,(W,...X)=>{let $=C.replaceString||"";for(let I=1;I<10;I++)$=$.replace(new RegExp(`\\$${I}`,"g"),X[I-1]??"");return $})}catch(j){console.warn(`正则脚本 "${C.scriptName}" 执行失败:`,j)}return z}function Wa(p){const g=p.match(/\[心声[::](.*?)\]/s);if(!g){const c=p.match(/(心声[::](.*?))/s);return c?{thought:c[1].trim(),body:p.replace(c[0],"").trim()}:{thought:"",body:p}}return{thought:g[1].trim(),body:p.replace(g[0],"").trim()}}const Qa={neutral:"linear-gradient(135deg,#0E0B12,#1a1033)",smile:"linear-gradient(135deg,#3d2b1f,#7a4a2f)",happy:"linear-gradient(135deg,#4a2c1f,#C9A86A)",sad:"linear-gradient(135deg,#1a2342,#3a4a7a)",angry:"linear-gradient(135deg,#4a1414,#8a2424)",shy:"linear-gradient(135deg,#4a2c3a,#a04a6f)",cold:"linear-gradient(135deg,#1a2a3a,#4a607a)",shaken:"linear-gradient(135deg,#3a1a4a,#6a3a8a)",surprise:"linear-gradient(135deg,#3a2c1a,#8a6a2f)",smirk:"linear-gradient(135deg,#2a2a4a,#4a4a8a)",pain:"linear-gradient(135deg,#3a1a1a,#6a2a2a)",love:"linear-gradient(135deg,#4a2a4a,#b45a8a)",jealous:"linear-gradient(135deg,#2a4a2a,#4a8a4a)",drunk:"linear-gradient(135deg,#4a3a2a,#8a6a4a)"},Xa={neutral:["neutral","normal","平静","默认"],smile:["smile","微笑","轻笑"],happy:["happy","开心","喜悦","笑"],sad:["sad","难过","悲伤","哭"],angry:["angry","生气","愤怒","怒"],shy:["shy","害羞","脸红","羞"],cold:["cold","冷笑","冷漠","清冷","冷"],shaken:["shaken","动摇","震惊","颤抖"],surprise:["surprise","惊讶","吃惊"],smirk:["smirk","勾唇","轻蔑","痞笑"],pain:["pain","痛苦","疼","痛"],love:["love","心动","爱意","深情","温柔"],jealous:["jealous","嫉妒","吃醋","占有"],drunk:["drunk","醉","微醺"]};function Ka(p){const g=p.match(/\[([^\]]{1,6})\]/);if(!g)return"neutral";const c=g[1];for(const z of Object.keys(Xa))if(Xa[z].includes(c))return z;return"neutral"}function Xd(p,g,c){return{image:g[p]||(p==="neutral"?c:""),gradient:Qa[p]||Qa.neutral}}const lc="/api/chat";async function Kd(){try{const p=await fetch(`${lc}/models`);return p.ok?(await p.json()).models||[]:[]}catch{return[]}}async function Gd(p){var z,S,C;const g=await fetch(lc,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...p,stream:!1})});if(!g.ok){const j=await g.text().catch(()=>"");throw new Error(`HTTP ${g.status}: ${j.slice(0,200)}`)}return((C=(S=(z=(await g.json()).choices)==null?void 0:z[0])==null?void 0:S.message)==null?void 0:C.content)||""}const Yd=["依偎在他怀里","故意抽回手,冷淡看他","抬头直视他的眼睛问:真的吗?"],Ga=["...别乱碰。","你以为这样我就不生气了?","...手往哪放呢。","再戳我,我就当真了。"];function Zd({charName:p,charDesc:g,charScenario:c,firstMessage:z,charAvatar:S,regexScripts:C,onBack:j,onNeedCharge:B}){var v;const[W,X]=J.useState([]),[$,I]=J.useState(""),[Y,de]=J.useState(!1),[ve,te]=J.useState(1),[G,xe]=J.useState(!1),[ye,ke]=J.useState(-1),[we,Be]=J.useState(""),[Pe,Re]=J.useState("neutral"),[Me,yt]=J.useState(S),[Ze,St]=J.useState([]),[Ve,De]=J.useState(""),[Je,qe]=J.useState(!1),Ce=J.useRef(null),oe=J.useRef(0);J.useEffect(()=>{let _=!0;return Kd().then(O=>{_&&(St(O),O.length>0&&De(O[0].id))}),()=>{_=!1}},[]),J.useEffect(()=>{let _=Oi(z,"我",p);_=Ha(_,C,["display"]);const{thought:O,body:V}=Wa(_);X([{role:"assistant",content:V,thought:O,emotion:Ka(V)}]),yt(S)},[p,z,C,S]),J.useEffect(()=>{var _;(_=Ce.current)==null||_.scrollTo({top:Ce.current.scrollHeight,behavior:"smooth"})},[W,Y]);const N=()=>{Be(Ga[Math.floor(Math.random()*Ga.length)]),setTimeout(()=>Be(""),2500)},U=J.useCallback((_,O)=>{if(ye===O){window.speechSynthesis.cancel(),ke(-1);return}window.speechSynthesis.cancel(),ke(O);const V=_.thought?`${_.thought}。${_.content}`:_.content,Q=new SpeechSynthesisUtterance(V.replace(/[\[\]【】]/g,""));Q.lang="zh-CN",Q.pitch=_.thought?.85:1,Q.rate=.95,Q.onend=()=>ke(-1),window.speechSynthesis.speak(Q)},[ye]),L=async _=>{const O=(_??$).trim();if(!(!O||Y)){if(Be(""),$a()&&fn().stamina<=0){B();return}I(""),X(V=>[...V,{role:"user",content:O}]),de(!0);try{const V=`你正在扮演${p}。${Oi(g,"我",p)} 场景:${Oi(c,"我",p)} 重要:内心独白用[心声:...]包裹,正文不含心声;情绪标签如[害羞]放正文开头。中文,温暖细腻。`,Q=W.slice(-20).map(Oe=>({role:Oe.role,content:Oe.content})),b=await Gd({model:Ve||void 0,messages:[{role:"system",content:V},...Q,{role:"user",content:O}]});let ee=Ha(b,C,["display"]);const{thought:re,body:ze}=Wa(ee),Zt=Ka(re||ze),Er=oe.current+1;X(Oe=>[...Oe,{role:"assistant",content:ze,thought:re,emotion:Zt}]),oe.current+=1,te(Oe=>Math.min(5,Oe+.15)),Re(Zt),$a()&&Fd(),G&&setTimeout(()=>{ke(Er);const Oe=new SpeechSynthesisUtterance((re||ze).replace(/[\[\]【】]/g,""));Oe.lang="zh-CN",Oe.rate=.95,Oe.onend=()=>ke(-1),window.speechSynthesis.speak(Oe)},300)}catch(V){X(Q=>{var b;return[...Q,{role:"assistant",content:"⚠️ "+((b=V.message)!=null&&b.includes("HTTP")?"聊天服务暂时繁忙,请稍后重试":"请求超时,请检查网络")}]})}finally{de(!1)}}},f=Xd(Pe,{},Me);return y.jsxs("div",{className:"min-h-screen flex flex-col relative",children:[y.jsx("div",{className:"fixed inset-0 -z-20",style:{background:f.image?`url(${f.image}) center/cover no-repeat`:f.gradient}}),y.jsx("div",{className:"fixed inset-0 -z-10",style:{backdropFilter:"blur(18px) brightness(0.35)",background:"rgba(14,11,18,0.45)"}}),y.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 sticky top-0 z-10",style:{background:"rgba(14,11,18,0.8)",backdropFilter:"blur(20px)"},children:[y.jsx("button",{onClick:j,className:"text-gray-400",children:y.jsx(yd,{size:22})}),y.jsxs("button",{onClick:N,className:"relative",children:[y.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-gold text-lg font-bold overflow-hidden",style:{background:"rgba(201,168,106,0.25)",border:"2px solid rgba(201,168,106,0.4)"},children:Me?y.jsx("img",{src:Me,alt:p,className:"w-full h-full object-cover"}):p[0]||"?"}),we&&y.jsxs("div",{className:"absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-lg text-xs",style:{background:"rgba(201,168,106,0.3)",color:"#D4B896",border:"1px solid rgba(201,168,106,0.4)"},children:["💭 ",we]})]}),y.jsxs("div",{className:"flex-1",children:[y.jsx("div",{className:"text-white font-medium text-sm",children:p}),y.jsxs("div",{className:"flex items-center gap-1 text-xs text-mist",children:[y.jsx(ba,{size:10,fill:"#E8B4B8"}),y.jsxs("span",{children:["Lv.",ve.toFixed(1)]})]})]}),y.jsx("button",{onClick:()=>xe(!G),className:"p-2 rounded-lg",style:{color:G?"#C9A86A":"rgba(255,255,255,0.3)"},children:G?y.jsx(Ml,{size:18}):y.jsx(Ba,{size:18})}),Ze.length>0&&y.jsxs("div",{className:"relative",children:[y.jsxs("button",{onClick:()=>qe(_=>!_),className:"flex items-center gap-1 px-2 py-1.5 rounded-lg text-[10px]",style:{background:"rgba(201,168,106,0.15)",color:"#C9A86A",border:"1px solid rgba(201,168,106,0.25)"},children:[y.jsx("span",{className:"max-w-[64px] truncate",children:((v=Ze.find(_=>_.id===Ve))==null?void 0:v.label)||"模型"}),y.jsx(gd,{size:10})]}),Je&&y.jsx("div",{className:"absolute right-0 top-9 z-50 w-44 max-h-64 overflow-y-auto rounded-xl p-1",style:{background:"rgba(20,15,35,0.95)",border:"1px solid rgba(201,168,106,0.25)",backdropFilter:"blur(20px)"},children:Ze.map(_=>y.jsx("button",{onClick:()=>{De(_.id),qe(!1)},className:"w-full text-left px-3 py-2 rounded-lg text-xs",style:{background:_.id===Ve?"rgba(201,168,106,0.2)":"transparent",color:_.id===Ve?"#C9A86A":"#E8E6F0"},children:_.label},_.id))})]})]}),y.jsxs("div",{ref:Ce,className:"flex-1 overflow-y-auto px-4 py-4 space-y-4",children:[W.map((_,O)=>{const V=_.role==="user",Q=ye===O;return y.jsx("div",{className:`flex ${V?"justify-end":"justify-start"}`,children:y.jsxs("div",{className:"max-w-[85%]",children:[_.thought&&!V&&y.jsxs("div",{className:"mb-1 px-3 py-2 rounded-xl text-xs italic",style:{background:"linear-gradient(135deg,rgba(201,168,106,0.15),rgba(232,180,184,0.12))",border:"1px solid rgba(201,168,106,0.25)",color:"#D4B896",animation:"thoughtGlow 3s ease-in-out infinite"},children:["💭 ",_.thought]}),y.jsxs("div",{className:"px-4 py-3 rounded-2xl text-sm leading-relaxed relative",style:V?{background:"linear-gradient(135deg,#E8B4B8,#D4989C)",color:"#fff",borderBottomRightRadius:"4px"}:{background:"rgba(20,15,35,0.85)",color:"#E8E6F0",borderLeft:"2px solid #C9A86A",borderBottomLeftRadius:"4px",backdropFilter:"blur(10px)"},children:[y.jsx("span",{dangerouslySetInnerHTML:{__html:_.content.replace(/\n/g,"
")}}),!V&&y.jsx("button",{onClick:()=>U(_,O),className:"absolute -bottom-2 -right-2 w-7 h-7 rounded-full flex items-center justify-center",style:{background:Q?"#C9A86A":"rgba(201,168,106,0.3)",color:"#fff"},children:Q?y.jsx(Ml,{size:12,className:"animate-pulse"}):y.jsx(Ml,{size:12})})]})]})},O)}),Y&&y.jsx("div",{className:"flex justify-start",children:y.jsx("div",{className:"px-4 py-3 rounded-2xl text-sm",style:{background:"rgba(255,255,255,0.08)"},children:y.jsx("span",{className:"inline-block w-2 h-4 bg-gold",style:{animation:"blink 1s infinite"}})})})]}),y.jsxs("div",{className:"px-4 pb-2 flex gap-2 overflow-x-auto flex-shrink-0",style:{background:"rgba(14,11,18,0.8)"},children:[y.jsxs("button",{onClick:()=>X(_=>_.slice(0,-2)),className:"flex-shrink-0 px-3 py-1.5 rounded-full text-xs flex items-center gap-1",style:{background:"rgba(255,255,255,0.08)",color:"#C9A86A",border:"1px solid rgba(201,168,106,0.2)"},children:[y.jsx(_d,{size:12}),"回溯"]}),y.jsxs("button",{onClick:()=>window.speechSynthesis.cancel(),className:"flex-shrink-0 px-3 py-1.5 rounded-full text-xs flex items-center gap-1",style:{background:"rgba(255,255,255,0.08)",color:"#E8B4B8",border:"1px solid rgba(232,180,184,0.2)"},children:[G?y.jsx(Ml,{size:12}):y.jsx(Ba,{size:12}),"语音"]}),Yd.map((_,O)=>y.jsxs("button",{onClick:()=>L(_),className:"flex-shrink-0 px-3 py-1.5 rounded-full text-xs whitespace-nowrap",style:{background:"rgba(232,180,184,0.15)",color:"#E8B4B8",border:"1px solid rgba(232,180,184,0.3)"},children:[y.jsx(ec,{size:10,className:"inline mr-1"}),_]},O))]}),y.jsx("div",{className:"px-4 py-3 sticky bottom-0 flex-shrink-0",style:{background:"rgba(14,11,18,0.95)"},children:y.jsxs("div",{className:"flex gap-2",children:[y.jsx("input",{value:$,onChange:_=>I(_.target.value),onKeyDown:_=>_.key==="Enter"&&L(),placeholder:`对${p}说点什么...`,className:"flex-1 px-4 py-3 rounded-xl text-sm text-white outline-none",style:{background:"rgba(255,255,255,0.08)",border:"1px solid rgba(201,168,106,0.2)"}}),y.jsx("button",{onClick:()=>L(),disabled:Y||!$.trim(),className:"px-4 py-3 rounded-xl text-white disabled:opacity-40",style:{background:"linear-gradient(135deg,#C9A86A,#E8B4B8)"},children:y.jsx(Nd,{size:18})})]})})]})}const Jd=[{icon:qa,label:"无限角色槽位",desc:"不限养角色数量"},{icon:kd,label:"全剧情畅玩",desc:"解锁所有隐藏剧情"},{icon:Ld,label:"专属差分立绘",desc:"表情自动切换"},{icon:Ed,label:"去水印导出",desc:"干净导出聊天记录"},{icon:jd,label:"优先算力",desc:"回复更快更稳"},{icon:xd,label:"每周新角色",desc:"订阅每周解锁新男主"}],qd=[{name:"周卡",price:"¥15",days:7,tag:"尝鲜"},{name:"月卡",price:"¥30",days:30,tag:"最划算",hot:!0},{name:"季卡",price:"¥79",days:90,tag:"超值"}];function Ya({onClose:p}){const[g,c]=J.useState(fn()),[z,S]=J.useState(""),[C,j]=J.useState(""),[B,W]=J.useState(""),X=Fi(),$=async()=>{if(!z.trim())return;const I=await Od(z);j(I.message),W(I.success?"success":"error"),I.success&&(S(""),c(fn()))};return y.jsxs("div",{className:"min-h-screen pt-6 px-4",children:[y.jsxs("div",{className:"flex items-center justify-between mb-6",children:[y.jsx("h1",{className:"text-xl font-bold",style:{color:"#FCD34D"},children:"VIP 会员中心"}),p&&y.jsx("button",{onClick:p,className:"text-gray-400",children:y.jsx(Td,{size:22})})]}),y.jsxs("div",{className:"rounded-2xl p-5 mb-5",style:{background:"linear-gradient(135deg,#1a1206,#3d2b1f)",border:"1px solid rgba(252,211,77,0.4)"},children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsxs("span",{className:"flex items-center gap-2 text-white font-bold",children:[y.jsx(qa,{size:18,style:{color:"#FCD34D"}}),X?"VIP 会员":"普通用户"]}),y.jsx("span",{className:"text-sm",style:{color:"#FCD34D"},children:X?"尊享特权":"开通解锁特权"})]}),!X&&y.jsx("button",{onClick:()=>window.open("https://afdian.com/a/your-id","_blank"),className:"w-full mt-3 py-3 rounded-xl font-bold text-black",style:{background:"linear-gradient(135deg,#FCD34D,#F59E0B)"},children:"立即开通 VIP"})]}),y.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-3",children:"会员特权"}),y.jsx("div",{className:"grid grid-cols-3 gap-2 mb-5",children:Jd.map((I,Y)=>{const de=I.icon;return y.jsxs("div",{className:"p-3 rounded-xl text-center",style:{background:"rgba(252,211,77,0.06)",border:"1px solid rgba(252,211,77,0.2)"},children:[y.jsx(de,{size:18,className:"mx-auto mb-1",style:{color:"#FCD34D"}}),y.jsx("div",{className:"text-xs text-white font-medium",children:I.label}),y.jsx("div",{className:"text-[10px] text-gray-500 mt-0.5",children:I.desc})]},Y)})}),y.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-3",children:"选择套餐"}),y.jsx("div",{className:"flex gap-2 mb-6",children:qd.map(I=>y.jsxs("button",{onClick:()=>window.open("https://afdian.com/a/your-id","_blank"),className:"flex-1 p-3 rounded-xl text-center",style:{background:I.hot?"linear-gradient(135deg,rgba(252,211,77,0.2),rgba(245,158,11,0.15))":"rgba(255,255,255,0.05)",border:`1px solid ${I.hot?"rgba(252,211,77,0.4)":"rgba(255,255,255,0.1)"}`},children:[y.jsx("div",{className:"text-white font-bold",children:I.name}),y.jsx("div",{className:"text-lg font-bold my-1",style:{color:"#FCD34D"},children:I.price}),y.jsx("div",{className:"text-[10px] px-1.5 py-0.5 rounded inline-block",style:{background:"rgba(252,211,77,0.25)",color:"#FCD34D"},children:I.tag})]},I.name))}),y.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-2",children:"卡密兑换"}),y.jsxs("div",{className:"flex gap-2 mb-3",children:[y.jsx("input",{value:z,onChange:I=>S(I.target.value),placeholder:"输入卡密激活 VIP / 解锁角色",className:"flex-1 px-3 py-3 rounded-xl text-sm text-white outline-none",style:{background:"rgba(255,255,255,0.08)",border:"1px solid rgba(252,211,77,0.2)"}}),y.jsx("button",{onClick:$,className:"px-4 py-3 rounded-xl text-black font-medium",style:{background:"linear-gradient(135deg,#FCD34D,#F59E0B)"},children:y.jsx(wd,{size:18})})]}),C&&y.jsx("div",{className:"p-3 rounded-xl text-sm mb-3",style:{background:B==="success"?"rgba(34,197,94,0.15)":"rgba(239,68,68,0.15)",color:B==="success"?"#86efac":"#fca5a5"},children:C}),y.jsxs("button",{onClick:()=>window.open("https://afdian.com/a/your-id","_blank"),className:"w-full p-3 rounded-xl text-sm font-medium",style:{background:"rgba(255,255,255,0.08)",color:"#FCD34D",border:"1px solid rgba(252,211,77,0.3)"},children:[y.jsx(ec,{size:16,className:"inline mr-1"}),"前往获取卡密 →"]})]})}function bd(){const[p,g]=J.useState("encounter"),[c,z]=J.useState([]),[S,C]=J.useState(null),[j,B]=J.useState(!1),W=async xe=>{try{const ye=xe.name.endsWith(".json")?await $d(xe):await Vd(xe);z(ke=>[ye,...ke]),C({type:"custom",data:ye}),g("chat"),alert(`已成功与【${ye.name}】建立羁绊!`)}catch(ye){alert(ye.message||"导入失败,请确认是酒馆导出的 PNG/JSON 角色卡")}},X=xe=>{C({type:"default",data:xe}),g("chat")},$=xe=>{C({type:"custom",data:xe}),g("chat")},I=(S==null?void 0:S.data.name)||"",Y=(S==null?void 0:S.data.description)||"",de=(S==null?void 0:S.data.scenario)||"",ve=(S==null?void 0:S.data.firstMessage)||"",te=(S==null?void 0:S.type)==="custom"?S.data.avatar:"",G=fn();return y.jsxs("div",{className:"min-h-screen bg-ink",children:[p==="encounter"&&y.jsx(Ad,{customChars:c,onImport:W,onSelectDefault:X,onSelectCustom:$}),p==="chat"&&S&&y.jsx(Zd,{charName:I,charDesc:Y,charScenario:de,firstMessage:ve,charAvatar:te,regexScripts:S.type==="custom"?S.data.regexScripts:[],onBack:()=>g("encounter"),onNeedCharge:()=>B(!0)}),p==="chat"&&!S&&y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen text-gray-500",children:[y.jsx("p",{className:"mb-4",children:"还没有角色,先邂逅一个吧"}),y.jsx("button",{onClick:()=>g("encounter"),className:"px-6 py-3 rounded-xl bg-gold/20 text-gold",children:"去邂逅"})]}),p==="feed"&&y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen text-gray-500",children:[y.jsx("p",{className:"text-lg text-gold mb-2",children:"✨ 动态广场"}),y.jsx("p",{className:"text-sm",children:"角色朋友圈即将上线"})]}),p==="wallet"&&y.jsx(Ya,{}),y.jsx(Rd,{activeTab:p,onTabChange:g,vipActive:G.vipExpireAt>Date.now(),stamina:G.stamina}),j&&y.jsx(Ya,{onClose:()=>B(!1)})]})}dd.createRoot(document.getElementById("root")).render(y.jsx(od.StrictMode,{children:y.jsx(bd,{})}));