studylens 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,183 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();var mc={exports:{}},Ro={},gc={exports:{}},Z={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ol=Symbol.for("react.element"),Sp=Symbol.for("react.portal"),wp=Symbol.for("react.fragment"),kp=Symbol.for("react.strict_mode"),Ep=Symbol.for("react.profiler"),Cp=Symbol.for("react.provider"),jp=Symbol.for("react.context"),Rp=Symbol.for("react.forward_ref"),zp=Symbol.for("react.suspense"),_p=Symbol.for("react.memo"),bp=Symbol.for("react.lazy"),Ka=Symbol.iterator;function Pp(e){return e===null||typeof e!="object"?null:(e=Ka&&e[Ka]||e["@@iterator"],typeof e=="function"?e:null)}var yc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vc=Object.assign,xc={};function lr(e,t,n){this.props=e,this.context=t,this.refs=xc,this.updater=n||yc}lr.prototype.isReactComponent={};lr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};lr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sc(){}Sc.prototype=lr.prototype;function Ts(e,t,n){this.props=e,this.context=t,this.refs=xc,this.updater=n||yc}var Ns=Ts.prototype=new Sc;Ns.constructor=Ts;vc(Ns,lr.prototype);Ns.isPureReactComponent=!0;var Ya=Array.isArray,wc=Object.prototype.hasOwnProperty,Is={current:null},kc={key:!0,ref:!0,__self:!0,__source:!0};function Ec(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)wc.call(t,r)&&!kc.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];l.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)l[r]===void 0&&(l[r]=s[r]);return{$$typeof:ol,type:e,key:o,ref:i,props:l,_owner:Is.current}}function Lp(e,t){return{$$typeof:ol,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ds(e){return typeof e=="object"&&e!==null&&e.$$typeof===ol}function Tp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qa=/\/+/g;function ei(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Tp(""+e.key):t.toString(36)}function Fl(e,t,n,r,l){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case ol:case Sp:i=!0}}if(i)return i=e,l=l(i),e=r===""?"."+ei(i,0):r,Ya(l)?(n="",e!=null&&(n=e.replace(qa,"$&/")+"/"),Fl(l,t,n,"",function(c){return c})):l!=null&&(Ds(l)&&(l=Lp(l,n+(!l.key||i&&i.key===l.key?"":(""+l.key).replace(qa,"$&/")+"/")+e)),t.push(l)),1;if(i=0,r=r===""?".":r+":",Ya(e))for(var s=0;s<e.length;s++){o=e[s];var u=r+ei(o,s);i+=Fl(o,t,n,u,l)}else if(u=Pp(e),typeof u=="function")for(e=u.call(e),s=0;!(o=e.next()).done;)o=o.value,u=r+ei(o,s++),i+=Fl(o,t,n,u,l);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Sl(e,t,n){if(e==null)return e;var r=[],l=0;return Fl(e,r,"","",function(o){return t.call(n,o,l++)}),r}function Np(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Be={current:null},Bl={transition:null},Ip={ReactCurrentDispatcher:Be,ReactCurrentBatchConfig:Bl,ReactCurrentOwner:Is};function Cc(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:Sl,forEach:function(e,t,n){Sl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Sl(e,function(){t++}),t},toArray:function(e){return Sl(e,function(t){return t})||[]},only:function(e){if(!Ds(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=lr;Z.Fragment=wp;Z.Profiler=Ep;Z.PureComponent=Ts;Z.StrictMode=kp;Z.Suspense=zp;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ip;Z.act=Cc;Z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=vc({},e.props),l=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Is.current),t.key!==void 0&&(l=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)wc.call(t,u)&&!kc.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&s!==void 0?s[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){s=Array(u);for(var c=0;c<u;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:ol,type:e.type,key:l,ref:o,props:r,_owner:i}};Z.createContext=function(e){return e={$$typeof:jp,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Cp,_context:e},e.Consumer=e};Z.createElement=Ec;Z.createFactory=function(e){var t=Ec.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:Rp,render:e}};Z.isValidElement=Ds;Z.lazy=function(e){return{$$typeof:bp,_payload:{_status:-1,_result:e},_init:Np}};Z.memo=function(e,t){return{$$typeof:_p,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=Bl.transition;Bl.transition={};try{e()}finally{Bl.transition=t}};Z.unstable_act=Cc;Z.useCallback=function(e,t){return Be.current.useCallback(e,t)};Z.useContext=function(e){return Be.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return Be.current.useDeferredValue(e)};Z.useEffect=function(e,t){return Be.current.useEffect(e,t)};Z.useId=function(){return Be.current.useId()};Z.useImperativeHandle=function(e,t,n){return Be.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return Be.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return Be.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return Be.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return Be.current.useReducer(e,t,n)};Z.useRef=function(e){return Be.current.useRef(e)};Z.useState=function(e){return Be.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return Be.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return Be.current.useTransition()};Z.version="18.3.1";gc.exports=Z;var m=gc.exports;/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Dp=m,Mp=Symbol.for("react.element"),$p=Symbol.for("react.fragment"),Op=Object.prototype.hasOwnProperty,Fp=Dp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bp={key:!0,ref:!0,__self:!0,__source:!0};function jc(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Op.call(t,r)&&!Bp.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:Mp,type:e,key:o,ref:i,props:l,_owner:Fp.current}}Ro.Fragment=$p;Ro.jsx=jc;Ro.jsxs=jc;mc.exports=Ro;var a=mc.exports,Di={},Rc={exports:{}},Ze={},zc={exports:{}},_c={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(M,W){var _=M.length;M.push(W);e:for(;0<_;){var U=_-1>>>1,A=M[U];if(0<l(A,W))M[U]=W,M[_]=A,_=U;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var W=M[0],_=M.pop();if(_!==W){M[0]=_;e:for(var U=0,A=M.length,oe=A>>>1;U<oe;){var z=2*(U+1)-1,K=M[z],Q=z+1,de=M[Q];if(0>l(K,_))Q<A&&0>l(de,K)?(M[U]=de,M[Q]=_,U=Q):(M[U]=K,M[z]=_,U=z);else if(Q<A&&0>l(de,_))M[U]=de,M[Q]=_,U=Q;else break e}}return W}function l(M,W){var _=M.sortIndex-W.sortIndex;return _!==0?_:M.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var u=[],c=[],d=1,f=null,y=3,x=!1,k=!1,w=!1,R=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(M){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=M)r(c),W.sortIndex=W.expirationTime,t(u,W);else break;W=n(c)}}function E(M){if(w=!1,v(M),!k)if(n(u)!==null)k=!0,T(P);else{var W=n(c);W!==null&&X(E,W.startTime-M)}}function P(M,W){k=!1,w&&(w=!1,p(D),D=-1),x=!0;var _=y;try{for(v(W),f=n(u);f!==null&&(!(f.expirationTime>W)||M&&!G());){var U=f.callback;if(typeof U=="function"){f.callback=null,y=f.priorityLevel;var A=U(f.expirationTime<=W);W=e.unstable_now(),typeof A=="function"?f.callback=A:f===n(u)&&r(u),v(W)}else r(u);f=n(u)}if(f!==null)var oe=!0;else{var z=n(c);z!==null&&X(E,z.startTime-W),oe=!1}return oe}finally{f=null,y=_,x=!1}}var C=!1,L=null,D=-1,H=5,O=-1;function G(){return!(e.unstable_now()-O<H)}function ae(){if(L!==null){var M=e.unstable_now();O=M;var W=!0;try{W=L(!0,M)}finally{W?te():(C=!1,L=null)}}else C=!1}var te;if(typeof h=="function")te=function(){h(ae)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,ne=re.port2;re.port1.onmessage=ae,te=function(){ne.postMessage(null)}}else te=function(){R(ae,0)};function T(M){L=M,C||(C=!0,te())}function X(M,W){D=R(function(){M(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){k||x||(k=!0,T(P))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(M){switch(y){case 1:case 2:case 3:var W=3;break;default:W=y}var _=y;y=W;try{return M()}finally{y=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,W){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var _=y;y=M;try{return W()}finally{y=_}},e.unstable_scheduleCallback=function(M,W,_){var U=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?U+_:U):_=U,M){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=_+A,M={id:d++,callback:W,priorityLevel:M,startTime:_,expirationTime:A,sortIndex:-1},_>U?(M.sortIndex=_,t(c,M),n(u)===null&&M===n(c)&&(w?(p(D),D=-1):w=!0,X(E,_-U))):(M.sortIndex=A,t(u,M),k||x||(k=!0,T(P))),M},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(M){var W=y;return function(){var _=y;y=W;try{return M.apply(this,arguments)}finally{y=_}}}})(_c);zc.exports=_c;var Ap=zc.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Up=m,Je=Ap;function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var bc=new Set,Ar={};function _n(e,t){Xn(e,t),Xn(e+"Capture",t)}function Xn(e,t){for(Ar[e]=t,e=0;e<t.length;e++)bc.add(t[e])}var Tt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mi=Object.prototype.hasOwnProperty,Wp=/^[: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]*$/,Ga={},Xa={};function Hp(e){return Mi.call(Xa,e)?!0:Mi.call(Ga,e)?!1:Wp.test(e)?Xa[e]=!0:(Ga[e]=!0,!1)}function Vp(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 Qp(e,t,n,r){if(t===null||typeof t>"u"||Vp(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 Ae(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 Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new Ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new Ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new Ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new Ae(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){Pe[e]=new Ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new Ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new Ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new Ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new Ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ms=/[\-:]([a-z])/g;function $s(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(Ms,$s);Pe[t]=new Ae(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(Ms,$s);Pe[t]=new Ae(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(Ms,$s);Pe[t]=new Ae(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new Ae(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new Ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function Os(e,t,n,r){var l=Pe.hasOwnProperty(t)?Pe[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Qp(t,n,l,r)&&(n=null),r||l===null?Hp(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):l.mustUseProperty?e[l.propertyName]=n===null?l.type===3?!1:"":n:(t=l.attributeName,r=l.attributeNamespace,n===null?e.removeAttribute(t):(l=l.type,n=l===3||l===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var $t=Up.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,wl=Symbol.for("react.element"),Nn=Symbol.for("react.portal"),In=Symbol.for("react.fragment"),Fs=Symbol.for("react.strict_mode"),$i=Symbol.for("react.profiler"),Pc=Symbol.for("react.provider"),Lc=Symbol.for("react.context"),Bs=Symbol.for("react.forward_ref"),Oi=Symbol.for("react.suspense"),Fi=Symbol.for("react.suspense_list"),As=Symbol.for("react.memo"),Vt=Symbol.for("react.lazy"),Tc=Symbol.for("react.offscreen"),Ja=Symbol.iterator;function gr(e){return e===null||typeof e!="object"?null:(e=Ja&&e[Ja]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Object.assign,ti;function zr(e){if(ti===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ti=t&&t[1]||""}return`
34
+ `+ti+e}var ni=!1;function ri(e,t){if(!e||ni)return"";ni=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
35
+ `),o=r.stack.split(`
36
+ `),i=l.length-1,s=o.length-1;1<=i&&0<=s&&l[i]!==o[s];)s--;for(;1<=i&&0<=s;i--,s--)if(l[i]!==o[s]){if(i!==1||s!==1)do if(i--,s--,0>s||l[i]!==o[s]){var u=`
37
+ `+l[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=i&&0<=s);break}}}finally{ni=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zr(e):""}function Kp(e){switch(e.tag){case 5:return zr(e.type);case 16:return zr("Lazy");case 13:return zr("Suspense");case 19:return zr("SuspenseList");case 0:case 2:case 15:return e=ri(e.type,!1),e;case 11:return e=ri(e.type.render,!1),e;case 1:return e=ri(e.type,!0),e;default:return""}}function Bi(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 In:return"Fragment";case Nn:return"Portal";case $i:return"Profiler";case Fs:return"StrictMode";case Oi:return"Suspense";case Fi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lc:return(e.displayName||"Context")+".Consumer";case Pc:return(e._context.displayName||"Context")+".Provider";case Bs:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case As:return t=e.displayName||null,t!==null?t:Bi(e.type)||"Memo";case Vt:t=e._payload,e=e._init;try{return Bi(e(t))}catch{}}return null}function Yp(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 Bi(t);case 8:return t===Fs?"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 on(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qp(e){var t=Nc(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 kl(e){e._valueTracker||(e._valueTracker=qp(e))}function Ic(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Nc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zl(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 Ai(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Za(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=on(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 Dc(e,t){t=t.checked,t!=null&&Os(e,"checked",t,!1)}function Ui(e,t){Dc(e,t);var n=on(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")?Wi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Wi(e,t.type,on(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function eu(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 Wi(e,t,n){(t!=="number"||Zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var _r=Array.isArray;function Vn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+on(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Hi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(N(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function tu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(N(92));if(_r(n)){if(1<n.length)throw Error(N(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:on(n)}}function Mc(e,t){var n=on(t.value),r=on(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function nu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $c(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Vi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$c(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var El,Oc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,l){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,l)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(El=El||document.createElement("div"),El.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=El.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ur(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Tr={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},Gp=["Webkit","ms","Moz","O"];Object.keys(Tr).forEach(function(e){Gp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Tr[t]=Tr[e]})});function Fc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Tr.hasOwnProperty(e)&&Tr[e]?(""+t).trim():t+"px"}function Bc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Fc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Xp=ye({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 Qi(e,t){if(t){if(Xp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Ki(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 Yi=null;function Us(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qi=null,Qn=null,Kn=null;function ru(e){if(e=al(e)){if(typeof qi!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Lo(t),qi(e.stateNode,e.type,t))}}function Ac(e){Qn?Kn?Kn.push(e):Kn=[e]:Qn=e}function Uc(){if(Qn){var e=Qn,t=Kn;if(Kn=Qn=null,ru(e),t)for(e=0;e<t.length;e++)ru(t[e])}}function Wc(e,t){return e(t)}function Hc(){}var li=!1;function Vc(e,t,n){if(li)return e(t,n);li=!0;try{return Wc(e,t,n)}finally{li=!1,(Qn!==null||Kn!==null)&&(Hc(),Uc())}}function Wr(e,t){var n=e.stateNode;if(n===null)return null;var r=Lo(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(N(231,t,typeof n));return n}var Gi=!1;if(Tt)try{var yr={};Object.defineProperty(yr,"passive",{get:function(){Gi=!0}}),window.addEventListener("test",yr,yr),window.removeEventListener("test",yr,yr)}catch{Gi=!1}function Jp(e,t,n,r,l,o,i,s,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Nr=!1,eo=null,to=!1,Xi=null,Zp={onError:function(e){Nr=!0,eo=e}};function eh(e,t,n,r,l,o,i,s,u){Nr=!1,eo=null,Jp.apply(Zp,arguments)}function th(e,t,n,r,l,o,i,s,u){if(eh.apply(this,arguments),Nr){if(Nr){var c=eo;Nr=!1,eo=null}else throw Error(N(198));to||(to=!0,Xi=c)}}function bn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Qc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function lu(e){if(bn(e)!==e)throw Error(N(188))}function nh(e){var t=e.alternate;if(!t){if(t=bn(e),t===null)throw Error(N(188));return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return lu(l),e;if(o===r)return lu(l),t;o=o.sibling}throw Error(N(188))}if(n.return!==r.return)n=l,r=o;else{for(var i=!1,s=l.child;s;){if(s===n){i=!0,n=l,r=o;break}if(s===r){i=!0,r=l,n=o;break}s=s.sibling}if(!i){for(s=o.child;s;){if(s===n){i=!0,n=o,r=l;break}if(s===r){i=!0,r=o,n=l;break}s=s.sibling}if(!i)throw Error(N(189))}}if(n.alternate!==r)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function Kc(e){return e=nh(e),e!==null?Yc(e):null}function Yc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Yc(e);if(t!==null)return t;e=e.sibling}return null}var qc=Je.unstable_scheduleCallback,ou=Je.unstable_cancelCallback,rh=Je.unstable_shouldYield,lh=Je.unstable_requestPaint,xe=Je.unstable_now,oh=Je.unstable_getCurrentPriorityLevel,Ws=Je.unstable_ImmediatePriority,Gc=Je.unstable_UserBlockingPriority,no=Je.unstable_NormalPriority,ih=Je.unstable_LowPriority,Xc=Je.unstable_IdlePriority,zo=null,wt=null;function sh(e){if(wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(zo,e,void 0,(e.current.flags&128)===128)}catch{}}var ht=Math.clz32?Math.clz32:ch,ah=Math.log,uh=Math.LN2;function ch(e){return e>>>=0,e===0?32:31-(ah(e)/uh|0)|0}var Cl=64,jl=4194304;function br(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 ro(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 s=i&~l;s!==0?r=br(s):(o&=i,o!==0&&(r=br(o)))}else i=n&~l,i!==0?r=br(i):o!==0&&(r=br(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ht(t),l=1<<n,r|=e[n],t&=~l;return r}function dh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fh(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-ht(o),s=1<<i,u=l[i];u===-1?(!(s&n)||s&r)&&(l[i]=dh(s,t)):u<=t&&(e.expiredLanes|=s),o&=~s}}function Ji(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Jc(){var e=Cl;return Cl<<=1,!(Cl&4194240)&&(Cl=64),e}function oi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function il(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function ph(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<n;){var l=31-ht(n),o=1<<l;t[l]=0,r[l]=-1,e[l]=-1,n&=~o}}function Hs(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ht(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}var le=0;function Zc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ed,Vs,td,nd,rd,Zi=!1,Rl=[],Xt=null,Jt=null,Zt=null,Hr=new Map,Vr=new Map,Kt=[],hh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function iu(e,t){switch(e){case"focusin":case"focusout":Xt=null;break;case"dragenter":case"dragleave":Jt=null;break;case"mouseover":case"mouseout":Zt=null;break;case"pointerover":case"pointerout":Hr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vr.delete(t.pointerId)}}function vr(e,t,n,r,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[l]},t!==null&&(t=al(t),t!==null&&Vs(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function mh(e,t,n,r,l){switch(t){case"focusin":return Xt=vr(Xt,e,t,n,r,l),!0;case"dragenter":return Jt=vr(Jt,e,t,n,r,l),!0;case"mouseover":return Zt=vr(Zt,e,t,n,r,l),!0;case"pointerover":var o=l.pointerId;return Hr.set(o,vr(Hr.get(o)||null,e,t,n,r,l)),!0;case"gotpointercapture":return o=l.pointerId,Vr.set(o,vr(Vr.get(o)||null,e,t,n,r,l)),!0}return!1}function ld(e){var t=vn(e.target);if(t!==null){var n=bn(t);if(n!==null){if(t=n.tag,t===13){if(t=Qc(n),t!==null){e.blockedOn=t,rd(e.priority,function(){td(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Al(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=es(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yi=r,n.target.dispatchEvent(r),Yi=null}else return t=al(n),t!==null&&Vs(t),e.blockedOn=n,!1;t.shift()}return!0}function su(e,t,n){Al(e)&&n.delete(t)}function gh(){Zi=!1,Xt!==null&&Al(Xt)&&(Xt=null),Jt!==null&&Al(Jt)&&(Jt=null),Zt!==null&&Al(Zt)&&(Zt=null),Hr.forEach(su),Vr.forEach(su)}function xr(e,t){e.blockedOn===t&&(e.blockedOn=null,Zi||(Zi=!0,Je.unstable_scheduleCallback(Je.unstable_NormalPriority,gh)))}function Qr(e){function t(l){return xr(l,e)}if(0<Rl.length){xr(Rl[0],e);for(var n=1;n<Rl.length;n++){var r=Rl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Xt!==null&&xr(Xt,e),Jt!==null&&xr(Jt,e),Zt!==null&&xr(Zt,e),Hr.forEach(t),Vr.forEach(t),n=0;n<Kt.length;n++)r=Kt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Kt.length&&(n=Kt[0],n.blockedOn===null);)ld(n),n.blockedOn===null&&Kt.shift()}var Yn=$t.ReactCurrentBatchConfig,lo=!0;function yh(e,t,n,r){var l=le,o=Yn.transition;Yn.transition=null;try{le=1,Qs(e,t,n,r)}finally{le=l,Yn.transition=o}}function vh(e,t,n,r){var l=le,o=Yn.transition;Yn.transition=null;try{le=4,Qs(e,t,n,r)}finally{le=l,Yn.transition=o}}function Qs(e,t,n,r){if(lo){var l=es(e,t,n,r);if(l===null)mi(e,t,r,oo,n),iu(e,r);else if(mh(l,e,t,n,r))r.stopPropagation();else if(iu(e,r),t&4&&-1<hh.indexOf(e)){for(;l!==null;){var o=al(l);if(o!==null&&ed(o),o=es(e,t,n,r),o===null&&mi(e,t,r,oo,n),o===l)break;l=o}l!==null&&r.stopPropagation()}else mi(e,t,r,null,n)}}var oo=null;function es(e,t,n,r){if(oo=null,e=Us(r),e=vn(e),e!==null)if(t=bn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Qc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return oo=e,null}function od(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(oh()){case Ws:return 1;case Gc:return 4;case no:case ih:return 16;case Xc:return 536870912;default:return 16}default:return 16}}var qt=null,Ks=null,Ul=null;function id(){if(Ul)return Ul;var e,t=Ks,n=t.length,r,l="value"in qt?qt.value:qt.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===l[o-r];r++);return Ul=l.slice(e,1<r?1-r:void 0)}function Wl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zl(){return!0}function au(){return!1}function et(e){function t(n,r,l,o,i){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?zl:au,this.isPropagationStopped=au,this}return ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=zl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zl)},persist:function(){},isPersistent:zl}),t}var or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ys=et(or),sl=ye({},or,{view:0,detail:0}),xh=et(sl),ii,si,Sr,_o=ye({},sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qs,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!==Sr&&(Sr&&e.type==="mousemove"?(ii=e.screenX-Sr.screenX,si=e.screenY-Sr.screenY):si=ii=0,Sr=e),ii)},movementY:function(e){return"movementY"in e?e.movementY:si}}),uu=et(_o),Sh=ye({},_o,{dataTransfer:0}),wh=et(Sh),kh=ye({},sl,{relatedTarget:0}),ai=et(kh),Eh=ye({},or,{animationName:0,elapsedTime:0,pseudoElement:0}),Ch=et(Eh),jh=ye({},or,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rh=et(jh),zh=ye({},or,{data:0}),cu=et(zh),_h={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bh={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"},Ph={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ph[e])?!!t[e]:!1}function qs(){return Lh}var Th=ye({},sl,{key:function(e){if(e.key){var t=_h[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qs,charCode:function(e){return e.type==="keypress"?Wl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nh=et(Th),Ih=ye({},_o,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),du=et(Ih),Dh=ye({},sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qs}),Mh=et(Dh),$h=ye({},or,{propertyName:0,elapsedTime:0,pseudoElement:0}),Oh=et($h),Fh=ye({},_o,{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}),Bh=et(Fh),Ah=[9,13,27,32],Gs=Tt&&"CompositionEvent"in window,Ir=null;Tt&&"documentMode"in document&&(Ir=document.documentMode);var Uh=Tt&&"TextEvent"in window&&!Ir,sd=Tt&&(!Gs||Ir&&8<Ir&&11>=Ir),fu=" ",pu=!1;function ad(e,t){switch(e){case"keyup":return Ah.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ud(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dn=!1;function Wh(e,t){switch(e){case"compositionend":return ud(t);case"keypress":return t.which!==32?null:(pu=!0,fu);case"textInput":return e=t.data,e===fu&&pu?null:e;default:return null}}function Hh(e,t){if(Dn)return e==="compositionend"||!Gs&&ad(e,t)?(e=id(),Ul=Ks=qt=null,Dn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return sd&&t.locale!=="ko"?null:t.data;default:return null}}var Vh={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 hu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Vh[e.type]:t==="textarea"}function cd(e,t,n,r){Ac(r),t=io(t,"onChange"),0<t.length&&(n=new Ys("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Kr=null;function Qh(e){wd(e,0)}function bo(e){var t=On(e);if(Ic(t))return e}function Kh(e,t){if(e==="change")return t}var dd=!1;if(Tt){var ui;if(Tt){var ci="oninput"in document;if(!ci){var mu=document.createElement("div");mu.setAttribute("oninput","return;"),ci=typeof mu.oninput=="function"}ui=ci}else ui=!1;dd=ui&&(!document.documentMode||9<document.documentMode)}function gu(){Dr&&(Dr.detachEvent("onpropertychange",fd),Kr=Dr=null)}function fd(e){if(e.propertyName==="value"&&bo(Kr)){var t=[];cd(t,Kr,e,Us(e)),Vc(Qh,t)}}function Yh(e,t,n){e==="focusin"?(gu(),Dr=t,Kr=n,Dr.attachEvent("onpropertychange",fd)):e==="focusout"&&gu()}function qh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bo(Kr)}function Gh(e,t){if(e==="click")return bo(t)}function Xh(e,t){if(e==="input"||e==="change")return bo(t)}function Jh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:Jh;function Yr(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!Mi.call(t,l)||!yt(e[l],t[l]))return!1}return!0}function yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vu(e,t){var n=yu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=yu(n)}}function pd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hd(){for(var e=window,t=Zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zl(e.document)}return t}function Xs(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 Zh(e){var t=hd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pd(n.ownerDocument.documentElement,n)){if(r!==null&&Xs(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=vu(n,o);var i=vu(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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var em=Tt&&"documentMode"in document&&11>=document.documentMode,Mn=null,ts=null,Mr=null,ns=!1;function xu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ns||Mn==null||Mn!==Zl(r)||(r=Mn,"selectionStart"in r&&Xs(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}),Mr&&Yr(Mr,r)||(Mr=r,r=io(ts,"onSelect"),0<r.length&&(t=new Ys("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Mn)))}function _l(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var $n={animationend:_l("Animation","AnimationEnd"),animationiteration:_l("Animation","AnimationIteration"),animationstart:_l("Animation","AnimationStart"),transitionend:_l("Transition","TransitionEnd")},di={},md={};Tt&&(md=document.createElement("div").style,"AnimationEvent"in window||(delete $n.animationend.animation,delete $n.animationiteration.animation,delete $n.animationstart.animation),"TransitionEvent"in window||delete $n.transitionend.transition);function Po(e){if(di[e])return di[e];if(!$n[e])return e;var t=$n[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in md)return di[e]=t[n];return e}var gd=Po("animationend"),yd=Po("animationiteration"),vd=Po("animationstart"),xd=Po("transitionend"),Sd=new Map,Su="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function an(e,t){Sd.set(e,t),_n(t,[e])}for(var fi=0;fi<Su.length;fi++){var pi=Su[fi],tm=pi.toLowerCase(),nm=pi[0].toUpperCase()+pi.slice(1);an(tm,"on"+nm)}an(gd,"onAnimationEnd");an(yd,"onAnimationIteration");an(vd,"onAnimationStart");an("dblclick","onDoubleClick");an("focusin","onFocus");an("focusout","onBlur");an(xd,"onTransitionEnd");Xn("onMouseEnter",["mouseout","mouseover"]);Xn("onMouseLeave",["mouseout","mouseover"]);Xn("onPointerEnter",["pointerout","pointerover"]);Xn("onPointerLeave",["pointerout","pointerover"]);_n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));_n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));_n("onBeforeInput",["compositionend","keypress","textInput","paste"]);_n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));_n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));_n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pr="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(" "),rm=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pr));function wu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,th(r,t,void 0,e),e.currentTarget=null}function wd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],l=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==o&&l.isPropagationStopped())break e;wu(l,s,c),o=u}else for(i=0;i<r.length;i++){if(s=r[i],u=s.instance,c=s.currentTarget,s=s.listener,u!==o&&l.isPropagationStopped())break e;wu(l,s,c),o=u}}}if(to)throw e=Xi,to=!1,Xi=null,e}function ue(e,t){var n=t[ss];n===void 0&&(n=t[ss]=new Set);var r=e+"__bubble";n.has(r)||(kd(t,e,2,!1),n.add(r))}function hi(e,t,n){var r=0;t&&(r|=4),kd(n,e,r,t)}var bl="_reactListening"+Math.random().toString(36).slice(2);function qr(e){if(!e[bl]){e[bl]=!0,bc.forEach(function(n){n!=="selectionchange"&&(rm.has(n)||hi(n,!1,e),hi(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bl]||(t[bl]=!0,hi("selectionchange",!1,t))}}function kd(e,t,n,r){switch(od(t)){case 1:var l=yh;break;case 4:l=vh;break;default:l=Qs}n=l.bind(null,t,n,e),l=void 0,!Gi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function mi(e,t,n,r,l){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var s=r.stateNode.containerInfo;if(s===l||s.nodeType===8&&s.parentNode===l)break;if(i===4)for(i=r.return;i!==null;){var u=i.tag;if((u===3||u===4)&&(u=i.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;i=i.return}for(;s!==null;){if(i=vn(s),i===null)return;if(u=i.tag,u===5||u===6){r=o=i;continue e}s=s.parentNode}}r=r.return}Vc(function(){var c=o,d=Us(n),f=[];e:{var y=Sd.get(e);if(y!==void 0){var x=Ys,k=e;switch(e){case"keypress":if(Wl(n)===0)break e;case"keydown":case"keyup":x=Nh;break;case"focusin":k="focus",x=ai;break;case"focusout":k="blur",x=ai;break;case"beforeblur":case"afterblur":x=ai;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=uu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=wh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=Mh;break;case gd:case yd:case vd:x=Ch;break;case xd:x=Oh;break;case"scroll":x=xh;break;case"wheel":x=Bh;break;case"copy":case"cut":case"paste":x=Rh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=du}var w=(t&4)!==0,R=!w&&e==="scroll",p=w?y!==null?y+"Capture":null:y;w=[];for(var h=c,v;h!==null;){v=h;var E=v.stateNode;if(v.tag===5&&E!==null&&(v=E,p!==null&&(E=Wr(h,p),E!=null&&w.push(Gr(h,E,v)))),R)break;h=h.return}0<w.length&&(y=new x(y,k,null,n,d),f.push({event:y,listeners:w}))}}if(!(t&7)){e:{if(y=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",y&&n!==Yi&&(k=n.relatedTarget||n.fromElement)&&(vn(k)||k[Nt]))break e;if((x||y)&&(y=d.window===d?d:(y=d.ownerDocument)?y.defaultView||y.parentWindow:window,x?(k=n.relatedTarget||n.toElement,x=c,k=k?vn(k):null,k!==null&&(R=bn(k),k!==R||k.tag!==5&&k.tag!==6)&&(k=null)):(x=null,k=c),x!==k)){if(w=uu,E="onMouseLeave",p="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(w=du,E="onPointerLeave",p="onPointerEnter",h="pointer"),R=x==null?y:On(x),v=k==null?y:On(k),y=new w(E,h+"leave",x,n,d),y.target=R,y.relatedTarget=v,E=null,vn(d)===c&&(w=new w(p,h+"enter",k,n,d),w.target=v,w.relatedTarget=R,E=w),R=E,x&&k)t:{for(w=x,p=k,h=0,v=w;v;v=Tn(v))h++;for(v=0,E=p;E;E=Tn(E))v++;for(;0<h-v;)w=Tn(w),h--;for(;0<v-h;)p=Tn(p),v--;for(;h--;){if(w===p||p!==null&&w===p.alternate)break t;w=Tn(w),p=Tn(p)}w=null}else w=null;x!==null&&ku(f,y,x,w,!1),k!==null&&R!==null&&ku(f,R,k,w,!0)}}e:{if(y=c?On(c):window,x=y.nodeName&&y.nodeName.toLowerCase(),x==="select"||x==="input"&&y.type==="file")var P=Kh;else if(hu(y))if(dd)P=Xh;else{P=qh;var C=Yh}else(x=y.nodeName)&&x.toLowerCase()==="input"&&(y.type==="checkbox"||y.type==="radio")&&(P=Gh);if(P&&(P=P(e,c))){cd(f,P,n,d);break e}C&&C(e,y,c),e==="focusout"&&(C=y._wrapperState)&&C.controlled&&y.type==="number"&&Wi(y,"number",y.value)}switch(C=c?On(c):window,e){case"focusin":(hu(C)||C.contentEditable==="true")&&(Mn=C,ts=c,Mr=null);break;case"focusout":Mr=ts=Mn=null;break;case"mousedown":ns=!0;break;case"contextmenu":case"mouseup":case"dragend":ns=!1,xu(f,n,d);break;case"selectionchange":if(em)break;case"keydown":case"keyup":xu(f,n,d)}var L;if(Gs)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Dn?ad(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(sd&&n.locale!=="ko"&&(Dn||D!=="onCompositionStart"?D==="onCompositionEnd"&&Dn&&(L=id()):(qt=d,Ks="value"in qt?qt.value:qt.textContent,Dn=!0)),C=io(c,D),0<C.length&&(D=new cu(D,e,null,n,d),f.push({event:D,listeners:C}),L?D.data=L:(L=ud(n),L!==null&&(D.data=L)))),(L=Uh?Wh(e,n):Hh(e,n))&&(c=io(c,"onBeforeInput"),0<c.length&&(d=new cu("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=L))}wd(f,t)})}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function io(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,o=l.stateNode;l.tag===5&&o!==null&&(l=o,o=Wr(e,n),o!=null&&r.unshift(Gr(e,o,l)),o=Wr(e,t),o!=null&&r.push(Gr(e,o,l))),e=e.return}return r}function Tn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ku(e,t,n,r,l){for(var o=t._reactName,i=[];n!==null&&n!==r;){var s=n,u=s.alternate,c=s.stateNode;if(u!==null&&u===r)break;s.tag===5&&c!==null&&(s=c,l?(u=Wr(n,o),u!=null&&i.unshift(Gr(n,u,s))):l||(u=Wr(n,o),u!=null&&i.push(Gr(n,u,s)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var lm=/\r\n?/g,om=/\u0000|\uFFFD/g;function Eu(e){return(typeof e=="string"?e:""+e).replace(lm,`
38
+ `).replace(om,"")}function Pl(e,t,n){if(t=Eu(t),Eu(e)!==t&&n)throw Error(N(425))}function so(){}var rs=null,ls=null;function os(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var is=typeof setTimeout=="function"?setTimeout:void 0,im=typeof clearTimeout=="function"?clearTimeout:void 0,Cu=typeof Promise=="function"?Promise:void 0,sm=typeof queueMicrotask=="function"?queueMicrotask:typeof Cu<"u"?function(e){return Cu.resolve(null).then(e).catch(am)}:is;function am(e){setTimeout(function(){throw e})}function gi(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Qr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Qr(t)}function en(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ju(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ir=Math.random().toString(36).slice(2),St="__reactFiber$"+ir,Xr="__reactProps$"+ir,Nt="__reactContainer$"+ir,ss="__reactEvents$"+ir,um="__reactListeners$"+ir,cm="__reactHandles$"+ir;function vn(e){var t=e[St];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Nt]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ju(e);e!==null;){if(n=e[St])return n;e=ju(e)}return t}e=n,n=e.parentNode}return null}function al(e){return e=e[St]||e[Nt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function On(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(N(33))}function Lo(e){return e[Xr]||null}var as=[],Fn=-1;function un(e){return{current:e}}function ce(e){0>Fn||(e.current=as[Fn],as[Fn]=null,Fn--)}function se(e,t){Fn++,as[Fn]=e.current,e.current=t}var sn={},De=un(sn),He=un(!1),En=sn;function Jn(e,t){var n=e.type.contextTypes;if(!n)return sn;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 Ve(e){return e=e.childContextTypes,e!=null}function ao(){ce(He),ce(De)}function Ru(e,t,n){if(De.current!==sn)throw Error(N(168));se(De,t),se(He,n)}function Ed(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(N(108,Yp(e)||"Unknown",l));return ye({},n,r)}function uo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sn,En=De.current,se(De,e),se(He,He.current),!0}function zu(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=Ed(e,t,En),r.__reactInternalMemoizedMergedChildContext=e,ce(He),ce(De),se(De,e)):ce(He),se(He,n)}var zt=null,To=!1,yi=!1;function Cd(e){zt===null?zt=[e]:zt.push(e)}function dm(e){To=!0,Cd(e)}function cn(){if(!yi&&zt!==null){yi=!0;var e=0,t=le;try{var n=zt;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zt=null,To=!1}catch(l){throw zt!==null&&(zt=zt.slice(e+1)),qc(Ws,cn),l}finally{le=t,yi=!1}}return null}var Bn=[],An=0,co=null,fo=0,rt=[],lt=0,Cn=null,bt=1,Pt="";function gn(e,t){Bn[An++]=fo,Bn[An++]=co,co=e,fo=t}function jd(e,t,n){rt[lt++]=bt,rt[lt++]=Pt,rt[lt++]=Cn,Cn=e;var r=bt;e=Pt;var l=32-ht(r)-1;r&=~(1<<l),n+=1;var o=32-ht(t)+l;if(30<o){var i=l-l%5;o=(r&(1<<i)-1).toString(32),r>>=i,l-=i,bt=1<<32-ht(t)+l|n<<l|r,Pt=o+e}else bt=1<<o|n<<l|r,Pt=e}function Js(e){e.return!==null&&(gn(e,1),jd(e,1,0))}function Zs(e){for(;e===co;)co=Bn[--An],Bn[An]=null,fo=Bn[--An],Bn[An]=null;for(;e===Cn;)Cn=rt[--lt],rt[lt]=null,Pt=rt[--lt],rt[lt]=null,bt=rt[--lt],rt[lt]=null}var Xe=null,Ge=null,pe=!1,pt=null;function Rd(e,t){var n=ot(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _u(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Xe=e,Ge=en(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xe=e,Ge=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Cn!==null?{id:bt,overflow:Pt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ot(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xe=e,Ge=null,!0):!1;default:return!1}}function us(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cs(e){if(pe){var t=Ge;if(t){var n=t;if(!_u(e,t)){if(us(e))throw Error(N(418));t=en(n.nextSibling);var r=Xe;t&&_u(e,t)?Rd(r,n):(e.flags=e.flags&-4097|2,pe=!1,Xe=e)}}else{if(us(e))throw Error(N(418));e.flags=e.flags&-4097|2,pe=!1,Xe=e}}}function bu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xe=e}function Ll(e){if(e!==Xe)return!1;if(!pe)return bu(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!os(e.type,e.memoizedProps)),t&&(t=Ge)){if(us(e))throw zd(),Error(N(418));for(;t;)Rd(e,t),t=en(t.nextSibling)}if(bu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ge=en(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ge=null}}else Ge=Xe?en(e.stateNode.nextSibling):null;return!0}function zd(){for(var e=Ge;e;)e=en(e.nextSibling)}function Zn(){Ge=Xe=null,pe=!1}function ea(e){pt===null?pt=[e]:pt.push(e)}var fm=$t.ReactCurrentBatchConfig;function wr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(N(309));var r=n.stateNode}if(!r)throw Error(N(147,e));var l=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=l.refs;i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(N(284));if(!n._owner)throw Error(N(290,e))}return e}function Tl(e,t){throw e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pu(e){var t=e._init;return t(e._payload)}function _d(e){function t(p,h){if(e){var v=p.deletions;v===null?(p.deletions=[h],p.flags|=16):v.push(h)}}function n(p,h){if(!e)return null;for(;h!==null;)t(p,h),h=h.sibling;return null}function r(p,h){for(p=new Map;h!==null;)h.key!==null?p.set(h.key,h):p.set(h.index,h),h=h.sibling;return p}function l(p,h){return p=ln(p,h),p.index=0,p.sibling=null,p}function o(p,h,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<h?(p.flags|=2,h):v):(p.flags|=2,h)):(p.flags|=1048576,h)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function s(p,h,v,E){return h===null||h.tag!==6?(h=Ci(v,p.mode,E),h.return=p,h):(h=l(h,v),h.return=p,h)}function u(p,h,v,E){var P=v.type;return P===In?d(p,h,v.props.children,E,v.key):h!==null&&(h.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Vt&&Pu(P)===h.type)?(E=l(h,v.props),E.ref=wr(p,h,v),E.return=p,E):(E=Gl(v.type,v.key,v.props,null,p.mode,E),E.ref=wr(p,h,v),E.return=p,E)}function c(p,h,v,E){return h===null||h.tag!==4||h.stateNode.containerInfo!==v.containerInfo||h.stateNode.implementation!==v.implementation?(h=ji(v,p.mode,E),h.return=p,h):(h=l(h,v.children||[]),h.return=p,h)}function d(p,h,v,E,P){return h===null||h.tag!==7?(h=kn(v,p.mode,E,P),h.return=p,h):(h=l(h,v),h.return=p,h)}function f(p,h,v){if(typeof h=="string"&&h!==""||typeof h=="number")return h=Ci(""+h,p.mode,v),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case wl:return v=Gl(h.type,h.key,h.props,null,p.mode,v),v.ref=wr(p,null,h),v.return=p,v;case Nn:return h=ji(h,p.mode,v),h.return=p,h;case Vt:var E=h._init;return f(p,E(h._payload),v)}if(_r(h)||gr(h))return h=kn(h,p.mode,v,null),h.return=p,h;Tl(p,h)}return null}function y(p,h,v,E){var P=h!==null?h.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return P!==null?null:s(p,h,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case wl:return v.key===P?u(p,h,v,E):null;case Nn:return v.key===P?c(p,h,v,E):null;case Vt:return P=v._init,y(p,h,P(v._payload),E)}if(_r(v)||gr(v))return P!==null?null:d(p,h,v,E,null);Tl(p,v)}return null}function x(p,h,v,E,P){if(typeof E=="string"&&E!==""||typeof E=="number")return p=p.get(v)||null,s(h,p,""+E,P);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case wl:return p=p.get(E.key===null?v:E.key)||null,u(h,p,E,P);case Nn:return p=p.get(E.key===null?v:E.key)||null,c(h,p,E,P);case Vt:var C=E._init;return x(p,h,v,C(E._payload),P)}if(_r(E)||gr(E))return p=p.get(v)||null,d(h,p,E,P,null);Tl(h,E)}return null}function k(p,h,v,E){for(var P=null,C=null,L=h,D=h=0,H=null;L!==null&&D<v.length;D++){L.index>D?(H=L,L=null):H=L.sibling;var O=y(p,L,v[D],E);if(O===null){L===null&&(L=H);break}e&&L&&O.alternate===null&&t(p,L),h=o(O,h,D),C===null?P=O:C.sibling=O,C=O,L=H}if(D===v.length)return n(p,L),pe&&gn(p,D),P;if(L===null){for(;D<v.length;D++)L=f(p,v[D],E),L!==null&&(h=o(L,h,D),C===null?P=L:C.sibling=L,C=L);return pe&&gn(p,D),P}for(L=r(p,L);D<v.length;D++)H=x(L,p,D,v[D],E),H!==null&&(e&&H.alternate!==null&&L.delete(H.key===null?D:H.key),h=o(H,h,D),C===null?P=H:C.sibling=H,C=H);return e&&L.forEach(function(G){return t(p,G)}),pe&&gn(p,D),P}function w(p,h,v,E){var P=gr(v);if(typeof P!="function")throw Error(N(150));if(v=P.call(v),v==null)throw Error(N(151));for(var C=P=null,L=h,D=h=0,H=null,O=v.next();L!==null&&!O.done;D++,O=v.next()){L.index>D?(H=L,L=null):H=L.sibling;var G=y(p,L,O.value,E);if(G===null){L===null&&(L=H);break}e&&L&&G.alternate===null&&t(p,L),h=o(G,h,D),C===null?P=G:C.sibling=G,C=G,L=H}if(O.done)return n(p,L),pe&&gn(p,D),P;if(L===null){for(;!O.done;D++,O=v.next())O=f(p,O.value,E),O!==null&&(h=o(O,h,D),C===null?P=O:C.sibling=O,C=O);return pe&&gn(p,D),P}for(L=r(p,L);!O.done;D++,O=v.next())O=x(L,p,D,O.value,E),O!==null&&(e&&O.alternate!==null&&L.delete(O.key===null?D:O.key),h=o(O,h,D),C===null?P=O:C.sibling=O,C=O);return e&&L.forEach(function(ae){return t(p,ae)}),pe&&gn(p,D),P}function R(p,h,v,E){if(typeof v=="object"&&v!==null&&v.type===In&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case wl:e:{for(var P=v.key,C=h;C!==null;){if(C.key===P){if(P=v.type,P===In){if(C.tag===7){n(p,C.sibling),h=l(C,v.props.children),h.return=p,p=h;break e}}else if(C.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Vt&&Pu(P)===C.type){n(p,C.sibling),h=l(C,v.props),h.ref=wr(p,C,v),h.return=p,p=h;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===In?(h=kn(v.props.children,p.mode,E,v.key),h.return=p,p=h):(E=Gl(v.type,v.key,v.props,null,p.mode,E),E.ref=wr(p,h,v),E.return=p,p=E)}return i(p);case Nn:e:{for(C=v.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===v.containerInfo&&h.stateNode.implementation===v.implementation){n(p,h.sibling),h=l(h,v.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=ji(v,p.mode,E),h.return=p,p=h}return i(p);case Vt:return C=v._init,R(p,h,C(v._payload),E)}if(_r(v))return k(p,h,v,E);if(gr(v))return w(p,h,v,E);Tl(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,h!==null&&h.tag===6?(n(p,h.sibling),h=l(h,v),h.return=p,p=h):(n(p,h),h=Ci(v,p.mode,E),h.return=p,p=h),i(p)):n(p,h)}return R}var er=_d(!0),bd=_d(!1),po=un(null),ho=null,Un=null,ta=null;function na(){ta=Un=ho=null}function ra(e){var t=po.current;ce(po),e._currentValue=t}function ds(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 qn(e,t){ho=e,ta=Un=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(We=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(ta!==e)if(e={context:e,memoizedValue:t,next:null},Un===null){if(ho===null)throw Error(N(308));Un=e,ho.dependencies={lanes:0,firstContext:e}}else Un=Un.next=e;return t}var xn=null;function la(e){xn===null?xn=[e]:xn.push(e)}function Pd(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,la(t)):(n.next=l.next,l.next=n),t.interleaved=n,It(e,r)}function It(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 Qt=!1;function oa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ld(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 Lt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ee&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,It(e,n)}return l=r.interleaved,l===null?(t.next=t,la(r)):(t.next=l.next,l.next=t),r.interleaved=t,It(e,n)}function Hl(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,Hs(e,n)}}function Lu(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 mo(e,t,n,r){var l=e.updateQueue;Qt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var u=s,c=u.next;u.next=null,i===null?o=c:i.next=c,i=u;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==i&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=u))}if(o!==null){var f=l.baseState;i=0,d=c=u=null,s=o;do{var y=s.lane,x=s.eventTime;if((r&y)===y){d!==null&&(d=d.next={eventTime:x,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var k=e,w=s;switch(y=t,x=n,w.tag){case 1:if(k=w.payload,typeof k=="function"){f=k.call(x,f,y);break e}f=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=w.payload,y=typeof k=="function"?k.call(x,f,y):k,y==null)break e;f=ye({},f,y);break e;case 2:Qt=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,y=l.effects,y===null?l.effects=[s]:y.push(s))}else x={eventTime:x,lane:y,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=x,u=f):d=d.next=x,i|=y;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;y=s,s=y.next,y.next=null,l.lastBaseUpdate=y,l.shared.pending=null}}while(!0);if(d===null&&(u=f),l.baseState=u,l.firstBaseUpdate=c,l.lastBaseUpdate=d,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);Rn|=i,e.lanes=i,e.memoizedState=f}}function Tu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],l=r.callback;if(l!==null){if(r.callback=null,r=n,typeof l!="function")throw Error(N(191,l));l.call(r)}}}var ul={},kt=un(ul),Jr=un(ul),Zr=un(ul);function Sn(e){if(e===ul)throw Error(N(174));return e}function ia(e,t){switch(se(Zr,t),se(Jr,e),se(kt,ul),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Vi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Vi(t,e)}ce(kt),se(kt,t)}function tr(){ce(kt),ce(Jr),ce(Zr)}function Td(e){Sn(Zr.current);var t=Sn(kt.current),n=Vi(t,e.type);t!==n&&(se(Jr,e),se(kt,n))}function sa(e){Jr.current===e&&(ce(kt),ce(Jr))}var he=un(0);function go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vi=[];function aa(){for(var e=0;e<vi.length;e++)vi[e]._workInProgressVersionPrimary=null;vi.length=0}var Vl=$t.ReactCurrentDispatcher,xi=$t.ReactCurrentBatchConfig,jn=0,me=null,Ee=null,je=null,yo=!1,$r=!1,el=0,pm=0;function Te(){throw Error(N(321))}function ua(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function ca(e,t,n,r,l,o){if(jn=o,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Vl.current=e===null||e.memoizedState===null?ym:vm,e=n(r,l),$r){o=0;do{if($r=!1,el=0,25<=o)throw Error(N(301));o+=1,je=Ee=null,t.updateQueue=null,Vl.current=xm,e=n(r,l)}while($r)}if(Vl.current=vo,t=Ee!==null&&Ee.next!==null,jn=0,je=Ee=me=null,yo=!1,t)throw Error(N(300));return e}function da(){var e=el!==0;return el=0,e}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?me.memoizedState=je=e:je=je.next=e,je}function at(){if(Ee===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=je===null?me.memoizedState:je.next;if(t!==null)je=t,Ee=e;else{if(e===null)throw Error(N(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},je===null?me.memoizedState=je=e:je=je.next=e}return je}function tl(e,t){return typeof t=="function"?t(e):t}function Si(e){var t=at(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=Ee,l=r.baseQueue,o=n.pending;if(o!==null){if(l!==null){var i=l.next;l.next=o.next,o.next=i}r.baseQueue=l=o,n.pending=null}if(l!==null){o=l.next,r=r.baseState;var s=i=null,u=null,c=o;do{var d=c.lane;if((jn&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(s=u=f,i=r):u=u.next=f,me.lanes|=d,Rn|=d}c=c.next}while(c!==null&&c!==o);u===null?i=r:u.next=s,yt(r,t.memoizedState)||(We=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){l=e;do o=l.lane,me.lanes|=o,Rn|=o,l=l.next;while(l!==e)}else l===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wi(e){var t=at(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var i=l=l.next;do o=e(o,i.action),i=i.next;while(i!==l);yt(o,t.memoizedState)||(We=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Nd(){}function Id(e,t){var n=me,r=at(),l=t(),o=!yt(r.memoizedState,l);if(o&&(r.memoizedState=l,We=!0),r=r.queue,fa($d.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||je!==null&&je.memoizedState.tag&1){if(n.flags|=2048,nl(9,Md.bind(null,n,r,l,t),void 0,null),Re===null)throw Error(N(349));jn&30||Dd(n,t,l)}return l}function Dd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Md(e,t,n,r){t.value=n,t.getSnapshot=r,Od(t)&&Fd(e)}function $d(e,t,n){return n(function(){Od(t)&&Fd(e)})}function Od(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yt(e,n)}catch{return!0}}function Fd(e){var t=It(e,1);t!==null&&mt(t,e,1,-1)}function Nu(e){var t=xt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tl,lastRenderedState:e},t.queue=e,e=e.dispatch=gm.bind(null,me,e),[t.memoizedState,e]}function nl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Bd(){return at().memoizedState}function Ql(e,t,n,r){var l=xt();me.flags|=e,l.memoizedState=nl(1|t,n,void 0,r===void 0?null:r)}function No(e,t,n,r){var l=at();r=r===void 0?null:r;var o=void 0;if(Ee!==null){var i=Ee.memoizedState;if(o=i.destroy,r!==null&&ua(r,i.deps)){l.memoizedState=nl(t,n,o,r);return}}me.flags|=e,l.memoizedState=nl(1|t,n,o,r)}function Iu(e,t){return Ql(8390656,8,e,t)}function fa(e,t){return No(2048,8,e,t)}function Ad(e,t){return No(4,2,e,t)}function Ud(e,t){return No(4,4,e,t)}function Wd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Hd(e,t,n){return n=n!=null?n.concat([e]):null,No(4,4,Wd.bind(null,t,e),n)}function pa(){}function Vd(e,t){var n=at();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ua(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qd(e,t){var n=at();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ua(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Kd(e,t,n){return jn&21?(yt(n,t)||(n=Jc(),me.lanes|=n,Rn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,We=!0),e.memoizedState=n)}function hm(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=xi.transition;xi.transition={};try{e(!1),t()}finally{le=n,xi.transition=r}}function Yd(){return at().memoizedState}function mm(e,t,n){var r=rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},qd(e))Gd(t,n);else if(n=Pd(e,t,n,r),n!==null){var l=Fe();mt(n,e,r,l),Xd(n,t,r)}}function gm(e,t,n){var r=rn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(qd(e))Gd(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,s=o(i,n);if(l.hasEagerState=!0,l.eagerState=s,yt(s,i)){var u=t.interleaved;u===null?(l.next=l,la(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Pd(e,t,l,r),n!==null&&(l=Fe(),mt(n,e,r,l),Xd(n,t,r))}}function qd(e){var t=e.alternate;return e===me||t!==null&&t===me}function Gd(e,t){$r=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hs(e,n)}}var vo={readContext:st,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},ym={readContext:st,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Iu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ql(4194308,4,Wd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ql(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ql(4,2,e,t)},useMemo:function(e,t){var n=xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xt();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=mm.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:Nu,useDebugValue:pa,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=Nu(!1),t=e[0];return e=hm.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=me,l=xt();if(pe){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),Re===null)throw Error(N(349));jn&30||Dd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Iu($d.bind(null,r,o,e),[e]),r.flags|=2048,nl(9,Md.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=xt(),t=Re.identifierPrefix;if(pe){var n=Pt,r=bt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=el++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=pm++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vm={readContext:st,useCallback:Vd,useContext:st,useEffect:fa,useImperativeHandle:Hd,useInsertionEffect:Ad,useLayoutEffect:Ud,useMemo:Qd,useReducer:Si,useRef:Bd,useState:function(){return Si(tl)},useDebugValue:pa,useDeferredValue:function(e){var t=at();return Kd(t,Ee.memoizedState,e)},useTransition:function(){var e=Si(tl)[0],t=at().memoizedState;return[e,t]},useMutableSource:Nd,useSyncExternalStore:Id,useId:Yd,unstable_isNewReconciler:!1},xm={readContext:st,useCallback:Vd,useContext:st,useEffect:fa,useImperativeHandle:Hd,useInsertionEffect:Ad,useLayoutEffect:Ud,useMemo:Qd,useReducer:wi,useRef:Bd,useState:function(){return wi(tl)},useDebugValue:pa,useDeferredValue:function(e){var t=at();return Ee===null?t.memoizedState=e:Kd(t,Ee.memoizedState,e)},useTransition:function(){var e=wi(tl)[0],t=at().memoizedState;return[e,t]},useMutableSource:Nd,useSyncExternalStore:Id,useId:Yd,unstable_isNewReconciler:!1};function dt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function fs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Io={isMounted:function(e){return(e=e._reactInternals)?bn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),l=rn(e),o=Lt(r,l);o.payload=t,n!=null&&(o.callback=n),t=tn(e,o,l),t!==null&&(mt(t,e,l,r),Hl(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),l=rn(e),o=Lt(r,l);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=tn(e,o,l),t!==null&&(mt(t,e,l,r),Hl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=rn(e),l=Lt(n,r);l.tag=2,t!=null&&(l.callback=t),t=tn(e,l,r),t!==null&&(mt(t,e,r,n),Hl(t,e,r))}};function Du(e,t,n,r,l,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!Yr(n,r)||!Yr(l,o):!0}function Jd(e,t,n){var r=!1,l=sn,o=t.contextType;return typeof o=="object"&&o!==null?o=st(o):(l=Ve(t)?En:De.current,r=t.contextTypes,o=(r=r!=null)?Jn(e,l):sn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Io,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=o),t}function Mu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Io.enqueueReplaceState(t,t.state,null)}function ps(e,t,n,r){var l=e.stateNode;l.props=n,l.state=e.memoizedState,l.refs={},oa(e);var o=t.contextType;typeof o=="object"&&o!==null?l.context=st(o):(o=Ve(t)?En:De.current,l.context=Jn(e,o)),l.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(fs(e,t,o,n),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&Io.enqueueReplaceState(l,l.state,null),mo(e,n,l,r),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function nr(e,t){try{var n="",r=t;do n+=Kp(r),r=r.return;while(r);var l=n}catch(o){l=`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}return{value:e,source:t,stack:l,digest:null}}function ki(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function hs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Sm=typeof WeakMap=="function"?WeakMap:Map;function Zd(e,t,n){n=Lt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){So||(So=!0,Cs=r),hs(e,t)},n}function ef(e,t,n){n=Lt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){hs(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){hs(e,t),typeof r!="function"&&(nn===null?nn=new Set([this]):nn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Sm;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Im.bind(null,e,t,n),t.then(e,e))}function Ou(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Fu(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Lt(-1,1),t.tag=2,tn(n,t,1))),n.lanes|=1),e)}var wm=$t.ReactCurrentOwner,We=!1;function Oe(e,t,n,r){t.child=e===null?bd(t,null,n,r):er(t,e.child,n,r)}function Bu(e,t,n,r,l){n=n.render;var o=t.ref;return qn(t,l),r=ca(e,t,n,r,o,l),n=da(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Dt(e,t,l)):(pe&&n&&Js(t),t.flags|=1,Oe(e,t,r,l),t.child)}function Au(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!wa(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,tf(e,t,o,r,l)):(e=Gl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:Yr,n(i,r)&&e.ref===t.ref)return Dt(e,t,l)}return t.flags|=1,e=ln(o,r),e.ref=t.ref,e.return=t,t.child=e}function tf(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(Yr(o,r)&&e.ref===t.ref)if(We=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(We=!0);else return t.lanes=e.lanes,Dt(e,t,l)}return ms(e,t,n,r,l)}function nf(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(Hn,qe),qe|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,se(Hn,qe),qe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,se(Hn,qe),qe|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,se(Hn,qe),qe|=r;return Oe(e,t,l,n),t.child}function rf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ms(e,t,n,r,l){var o=Ve(n)?En:De.current;return o=Jn(t,o),qn(t,l),n=ca(e,t,n,r,o,l),r=da(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Dt(e,t,l)):(pe&&r&&Js(t),t.flags|=1,Oe(e,t,n,l),t.child)}function Uu(e,t,n,r,l){if(Ve(n)){var o=!0;uo(t)}else o=!1;if(qn(t,l),t.stateNode===null)Kl(e,t),Jd(t,n,r),ps(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var u=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=st(c):(c=Ve(n)?En:De.current,c=Jn(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==r||u!==c)&&Mu(t,i,r,c),Qt=!1;var y=t.memoizedState;i.state=y,mo(t,r,i,l),u=t.memoizedState,s!==r||y!==u||He.current||Qt?(typeof d=="function"&&(fs(t,n,d,r),u=t.memoizedState),(s=Qt||Du(t,n,s,r,y,u,c))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=c,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ld(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:dt(t.type,s),i.props=c,f=t.pendingProps,y=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=st(u):(u=Ve(n)?En:De.current,u=Jn(t,u));var x=n.getDerivedStateFromProps;(d=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==f||y!==u)&&Mu(t,i,r,u),Qt=!1,y=t.memoizedState,i.state=y,mo(t,r,i,l);var k=t.memoizedState;s!==f||y!==k||He.current||Qt?(typeof x=="function"&&(fs(t,n,x,r),k=t.memoizedState),(c=Qt||Du(t,n,c,r,y,k,u)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,k,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,k,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),i.props=r,i.state=k,i.context=u,r=c):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),r=!1)}return gs(e,t,n,r,o,l)}function gs(e,t,n,r,l,o){rf(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&zu(t,n,!1),Dt(e,t,o);r=t.stateNode,wm.current=t;var s=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=er(t,e.child,null,o),t.child=er(t,null,s,o)):Oe(e,t,s,o),t.memoizedState=r.state,l&&zu(t,n,!0),t.child}function lf(e){var t=e.stateNode;t.pendingContext?Ru(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ru(e,t.context,!1),ia(e,t.containerInfo)}function Wu(e,t,n,r,l){return Zn(),ea(l),t.flags|=256,Oe(e,t,n,r),t.child}var ys={dehydrated:null,treeContext:null,retryLane:0};function vs(e){return{baseLanes:e,cachePool:null,transitions:null}}function of(e,t,n){var r=t.pendingProps,l=he.current,o=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(l&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),se(he,l&1),e===null)return cs(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=$o(i,r,0,null),e=kn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=vs(n),t.memoizedState=ys,e):ha(t,i));if(l=e.memoizedState,l!==null&&(s=l.dehydrated,s!==null))return km(e,t,i,r,s,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,s=l.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=ln(l,u),r.subtreeFlags=l.subtreeFlags&14680064),s!==null?o=ln(s,o):(o=kn(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?vs(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=ys,r}return o=e.child,e=o.sibling,r=ln(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ha(e,t){return t=$o({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Nl(e,t,n,r){return r!==null&&ea(r),er(t,e.child,null,n),e=ha(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function km(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=ki(Error(N(422))),Nl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=$o({mode:"visible",children:r.children},l,0,null),o=kn(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&er(t,e.child,null,i),t.child.memoizedState=vs(i),t.memoizedState=ys,o);if(!(t.mode&1))return Nl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(N(419)),r=ki(o,r,void 0),Nl(e,t,i,r)}if(s=(i&e.childLanes)!==0,We||s){if(r=Re,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,It(e,l),mt(r,e,l,-1))}return Sa(),r=ki(Error(N(421))),Nl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Dm.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,Ge=en(l.nextSibling),Xe=t,pe=!0,pt=null,e!==null&&(rt[lt++]=bt,rt[lt++]=Pt,rt[lt++]=Cn,bt=e.id,Pt=e.overflow,Cn=t),t=ha(t,r.children),t.flags|=4096,t)}function Hu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ds(e.return,t,n)}function Ei(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function sf(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Oe(e,t,r.children,n),r=he.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hu(e,n,t);else if(e.tag===19)Hu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(se(he,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&go(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Ei(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&go(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Ei(t,!0,n,null,o);break;case"together":Ei(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Kl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Dt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Rn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=ln(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ln(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Em(e,t,n){switch(t.tag){case 3:lf(t),Zn();break;case 5:Td(t);break;case 1:Ve(t.type)&&uo(t);break;case 4:ia(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;se(po,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(se(he,he.current&1),t.flags|=128,null):n&t.child.childLanes?of(e,t,n):(se(he,he.current&1),e=Dt(e,t,n),e!==null?e.sibling:null);se(he,he.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return sf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),se(he,he.current),r)break;return null;case 22:case 23:return t.lanes=0,nf(e,t,n)}return Dt(e,t,n)}var af,xs,uf,cf;af=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};xs=function(){};uf=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Sn(kt.current);var o=null;switch(n){case"input":l=Ai(e,l),r=Ai(e,r),o=[];break;case"select":l=ye({},l,{value:void 0}),r=ye({},r,{value:void 0}),o=[];break;case"textarea":l=Hi(e,l),r=Hi(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=so)}Qi(n,r);var i;n=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var s=l[c];for(i in s)s.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ar.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(s=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&u!==s&&(u!=null||s!=null))if(c==="style")if(s){for(i in s)!s.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&s[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(o||(o=[]),o.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ar.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&ue("scroll",e),o||s===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};cf=function(e,t,n,r){n!==r&&(t.flags|=4)};function kr(e,t){if(!pe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ne(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Cm(e,t,n){var r=t.pendingProps;switch(Zs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ne(t),null;case 1:return Ve(t.type)&&ao(),Ne(t),null;case 3:return r=t.stateNode,tr(),ce(He),ce(De),aa(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ll(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&(zs(pt),pt=null))),xs(e,t),Ne(t),null;case 5:sa(t);var l=Sn(Zr.current);if(n=t.type,e!==null&&t.stateNode!=null)uf(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(N(166));return Ne(t),null}if(e=Sn(kt.current),Ll(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[St]=t,r[Xr]=o,e=(t.mode&1)!==0,n){case"dialog":ue("cancel",r),ue("close",r);break;case"iframe":case"object":case"embed":ue("load",r);break;case"video":case"audio":for(l=0;l<Pr.length;l++)ue(Pr[l],r);break;case"source":ue("error",r);break;case"img":case"image":case"link":ue("error",r),ue("load",r);break;case"details":ue("toggle",r);break;case"input":Za(r,o),ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ue("invalid",r);break;case"textarea":tu(r,o),ue("invalid",r)}Qi(n,o),l=null;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];i==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&Pl(r.textContent,s,e),l=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&Pl(r.textContent,s,e),l=["children",""+s]):Ar.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&ue("scroll",r)}switch(n){case"input":kl(r),eu(r,o,!0);break;case"textarea":kl(r),nu(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=so)}r=l,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$c(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/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[St]=t,e[Xr]=r,af(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ki(n,r),n){case"dialog":ue("cancel",e),ue("close",e),l=r;break;case"iframe":case"object":case"embed":ue("load",e),l=r;break;case"video":case"audio":for(l=0;l<Pr.length;l++)ue(Pr[l],e);l=r;break;case"source":ue("error",e),l=r;break;case"img":case"image":case"link":ue("error",e),ue("load",e),l=r;break;case"details":ue("toggle",e),l=r;break;case"input":Za(e,r),l=Ai(e,r),ue("invalid",e);break;case"option":l=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},l=ye({},r,{value:void 0}),ue("invalid",e);break;case"textarea":tu(e,r),l=Hi(e,r),ue("invalid",e);break;default:l=r}Qi(n,l),s=l;for(o in s)if(s.hasOwnProperty(o)){var u=s[o];o==="style"?Bc(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Oc(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Ur(e,u):typeof u=="number"&&Ur(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ar.hasOwnProperty(o)?u!=null&&o==="onScroll"&&ue("scroll",e):u!=null&&Os(e,o,u,i))}switch(n){case"input":kl(e),eu(e,r,!1);break;case"textarea":kl(e),nu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+on(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Vn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Vn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=so)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ne(t),null;case 6:if(e&&t.stateNode!=null)cf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(N(166));if(n=Sn(Zr.current),Sn(kt.current),Ll(t)){if(r=t.stateNode,n=t.memoizedProps,r[St]=t,(o=r.nodeValue!==n)&&(e=Xe,e!==null))switch(e.tag){case 3:Pl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Pl(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[St]=t,t.stateNode=r}return Ne(t),null;case 13:if(ce(he),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&Ge!==null&&t.mode&1&&!(t.flags&128))zd(),Zn(),t.flags|=98560,o=!1;else if(o=Ll(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(N(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(N(317));o[St]=t}else Zn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ne(t),o=!1}else pt!==null&&(zs(pt),pt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||he.current&1?Ce===0&&(Ce=3):Sa())),t.updateQueue!==null&&(t.flags|=4),Ne(t),null);case 4:return tr(),xs(e,t),e===null&&qr(t.stateNode.containerInfo),Ne(t),null;case 10:return ra(t.type._context),Ne(t),null;case 17:return Ve(t.type)&&ao(),Ne(t),null;case 19:if(ce(he),o=t.memoizedState,o===null)return Ne(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)kr(o,!1);else{if(Ce!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=go(e),i!==null){for(t.flags|=128,kr(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return se(he,he.current&1|2),t.child}e=e.sibling}o.tail!==null&&xe()>rr&&(t.flags|=128,r=!0,kr(o,!1),t.lanes=4194304)}else{if(!r)if(e=go(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),kr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!pe)return Ne(t),null}else 2*xe()-o.renderingStartTime>rr&&n!==1073741824&&(t.flags|=128,r=!0,kr(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=xe(),t.sibling=null,n=he.current,se(he,r?n&1|2:n&1),t):(Ne(t),null);case 22:case 23:return xa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?qe&1073741824&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function jm(e,t){switch(Zs(t),t.tag){case 1:return Ve(t.type)&&ao(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tr(),ce(He),ce(De),aa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sa(t),null;case 13:if(ce(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));Zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(he),null;case 4:return tr(),null;case 10:return ra(t.type._context),null;case 22:case 23:return xa(),null;case 24:return null;default:return null}}var Il=!1,Ie=!1,Rm=typeof WeakSet=="function"?WeakSet:Set,B=null;function Wn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ve(e,t,r)}else n.current=null}function Ss(e,t,n){try{n()}catch(r){ve(e,t,r)}}var Vu=!1;function zm(e,t){if(rs=lo,e=hd(),Xs(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,s=-1,u=-1,c=0,d=0,f=e,y=null;t:for(;;){for(var x;f!==n||l!==0&&f.nodeType!==3||(s=i+l),f!==o||r!==0&&f.nodeType!==3||(u=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(x=f.firstChild)!==null;)y=f,f=x;for(;;){if(f===e)break t;if(y===n&&++c===l&&(s=i),y===o&&++d===r&&(u=i),(x=f.nextSibling)!==null)break;f=y,y=f.parentNode}f=x}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ls={focusedElem:e,selectionRange:n},lo=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var w=k.memoizedProps,R=k.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:dt(t.type,w),R);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(E){ve(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return k=Vu,Vu=!1,k}function Or(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&&Ss(t,n,o)}l=l.next}while(l!==r)}}function Do(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 ws(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 df(e){var t=e.alternate;t!==null&&(e.alternate=null,df(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[Xr],delete t[ss],delete t[um],delete t[cm])),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 ff(e){return e.tag===5||e.tag===3||e.tag===4}function Qu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ff(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 ks(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=so));else if(r!==4&&(e=e.child,e!==null))for(ks(e,t,n),e=e.sibling;e!==null;)ks(e,t,n),e=e.sibling}function Es(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(Es(e,t,n),e=e.sibling;e!==null;)Es(e,t,n),e=e.sibling}var _e=null,ft=!1;function Ht(e,t,n){for(n=n.child;n!==null;)pf(e,t,n),n=n.sibling}function pf(e,t,n){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(zo,n)}catch{}switch(n.tag){case 5:Ie||Wn(n,t);case 6:var r=_e,l=ft;_e=null,Ht(e,t,n),_e=r,ft=l,_e!==null&&(ft?(e=_e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_e.removeChild(n.stateNode));break;case 18:_e!==null&&(ft?(e=_e,n=n.stateNode,e.nodeType===8?gi(e.parentNode,n):e.nodeType===1&&gi(e,n),Qr(e)):gi(_e,n.stateNode));break;case 4:r=_e,l=ft,_e=n.stateNode.containerInfo,ft=!0,Ht(e,t,n),_e=r,ft=l;break;case 0:case 11:case 14:case 15:if(!Ie&&(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||o&4)&&Ss(n,t,i),l=l.next}while(l!==r)}Ht(e,t,n);break;case 1:if(!Ie&&(Wn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ve(n,t,s)}Ht(e,t,n);break;case 21:Ht(e,t,n);break;case 22:n.mode&1?(Ie=(r=Ie)||n.memoizedState!==null,Ht(e,t,n),Ie=r):Ht(e,t,n);break;default:Ht(e,t,n)}}function Ku(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Rm),t.forEach(function(r){var l=Mm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=n[r];try{var o=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:_e=s.stateNode,ft=!1;break e;case 3:_e=s.stateNode.containerInfo,ft=!0;break e;case 4:_e=s.stateNode.containerInfo,ft=!0;break e}s=s.return}if(_e===null)throw Error(N(160));pf(o,i,l),_e=null,ft=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(c){ve(l,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)hf(t,e),t=t.sibling}function hf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ct(t,e),vt(e),r&4){try{Or(3,e,e.return),Do(3,e)}catch(w){ve(e,e.return,w)}try{Or(5,e,e.return)}catch(w){ve(e,e.return,w)}}break;case 1:ct(t,e),vt(e),r&512&&n!==null&&Wn(n,n.return);break;case 5:if(ct(t,e),vt(e),r&512&&n!==null&&Wn(n,n.return),e.flags&32){var l=e.stateNode;try{Ur(l,"")}catch(w){ve(e,e.return,w)}}if(r&4&&(l=e.stateNode,l!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,s=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&Dc(l,o),Ki(s,i);var c=Ki(s,o);for(i=0;i<u.length;i+=2){var d=u[i],f=u[i+1];d==="style"?Bc(l,f):d==="dangerouslySetInnerHTML"?Oc(l,f):d==="children"?Ur(l,f):Os(l,d,f,c)}switch(s){case"input":Ui(l,o);break;case"textarea":Mc(l,o);break;case"select":var y=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!o.multiple;var x=o.value;x!=null?Vn(l,!!o.multiple,x,!1):y!==!!o.multiple&&(o.defaultValue!=null?Vn(l,!!o.multiple,o.defaultValue,!0):Vn(l,!!o.multiple,o.multiple?[]:"",!1))}l[Xr]=o}catch(w){ve(e,e.return,w)}}break;case 6:if(ct(t,e),vt(e),r&4){if(e.stateNode===null)throw Error(N(162));l=e.stateNode,o=e.memoizedProps;try{l.nodeValue=o}catch(w){ve(e,e.return,w)}}break;case 3:if(ct(t,e),vt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Qr(t.containerInfo)}catch(w){ve(e,e.return,w)}break;case 4:ct(t,e),vt(e);break;case 13:ct(t,e),vt(e),l=e.child,l.flags&8192&&(o=l.memoizedState!==null,l.stateNode.isHidden=o,!o||l.alternate!==null&&l.alternate.memoizedState!==null||(ya=xe())),r&4&&Ku(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ie=(c=Ie)||d,ct(t,e),Ie=c):ct(t,e),vt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(B=e,d=e.child;d!==null;){for(f=B=d;B!==null;){switch(y=B,x=y.child,y.tag){case 0:case 11:case 14:case 15:Or(4,y,y.return);break;case 1:Wn(y,y.return);var k=y.stateNode;if(typeof k.componentWillUnmount=="function"){r=y,n=y.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(w){ve(r,n,w)}}break;case 5:Wn(y,y.return);break;case 22:if(y.memoizedState!==null){qu(f);continue}}x!==null?(x.return=y,B=x):qu(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{l=f.stateNode,c?(o=l.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=f.stateNode,u=f.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null,s.style.display=Fc("display",i))}catch(w){ve(e,e.return,w)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(w){ve(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:ct(t,e),vt(e),r&4&&Ku(e);break;case 21:break;default:ct(t,e),vt(e)}}function vt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ff(n)){var r=n;break e}n=n.return}throw Error(N(160))}switch(r.tag){case 5:var l=r.stateNode;r.flags&32&&(Ur(l,""),r.flags&=-33);var o=Qu(e);Es(e,o,l);break;case 3:case 4:var i=r.stateNode.containerInfo,s=Qu(e);ks(e,s,i);break;default:throw Error(N(161))}}catch(u){ve(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _m(e,t,n){B=e,mf(e)}function mf(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var l=B,o=l.child;if(l.tag===22&&r){var i=l.memoizedState!==null||Il;if(!i){var s=l.alternate,u=s!==null&&s.memoizedState!==null||Ie;s=Il;var c=Ie;if(Il=i,(Ie=u)&&!c)for(B=l;B!==null;)i=B,u=i.child,i.tag===22&&i.memoizedState!==null?Gu(l):u!==null?(u.return=i,B=u):Gu(l);for(;o!==null;)B=o,mf(o),o=o.sibling;B=l,Il=s,Ie=c}Yu(e)}else l.subtreeFlags&8772&&o!==null?(o.return=l,B=o):Yu(e)}}function Yu(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ie||Do(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ie)if(n===null)r.componentDidMount();else{var l=t.elementType===t.type?n.memoizedProps:dt(t.type,n.memoizedProps);r.componentDidUpdate(l,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Tu(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Tu(t,i,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Qr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(N(163))}Ie||t.flags&512&&ws(t)}catch(y){ve(t,t.return,y)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function qu(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function Gu(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Do(4,t)}catch(u){ve(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var l=t.return;try{r.componentDidMount()}catch(u){ve(t,l,u)}}var o=t.return;try{ws(t)}catch(u){ve(t,o,u)}break;case 5:var i=t.return;try{ws(t)}catch(u){ve(t,i,u)}}}catch(u){ve(t,t.return,u)}if(t===e){B=null;break}var s=t.sibling;if(s!==null){s.return=t.return,B=s;break}B=t.return}}var bm=Math.ceil,xo=$t.ReactCurrentDispatcher,ma=$t.ReactCurrentOwner,it=$t.ReactCurrentBatchConfig,ee=0,Re=null,we=null,be=0,qe=0,Hn=un(0),Ce=0,rl=null,Rn=0,Mo=0,ga=0,Fr=null,Ue=null,ya=0,rr=1/0,Rt=null,So=!1,Cs=null,nn=null,Dl=!1,Gt=null,wo=0,Br=0,js=null,Yl=-1,ql=0;function Fe(){return ee&6?xe():Yl!==-1?Yl:Yl=xe()}function rn(e){return e.mode&1?ee&2&&be!==0?be&-be:fm.transition!==null?(ql===0&&(ql=Jc()),ql):(e=le,e!==0||(e=window.event,e=e===void 0?16:od(e.type)),e):1}function mt(e,t,n,r){if(50<Br)throw Br=0,js=null,Error(N(185));il(e,n,r),(!(ee&2)||e!==Re)&&(e===Re&&(!(ee&2)&&(Mo|=n),Ce===4&&Yt(e,be)),Qe(e,r),n===1&&ee===0&&!(t.mode&1)&&(rr=xe()+500,To&&cn()))}function Qe(e,t){var n=e.callbackNode;fh(e,t);var r=ro(e,e===Re?be:0);if(r===0)n!==null&&ou(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ou(n),t===1)e.tag===0?dm(Xu.bind(null,e)):Cd(Xu.bind(null,e)),sm(function(){!(ee&6)&&cn()}),n=null;else{switch(Zc(r)){case 1:n=Ws;break;case 4:n=Gc;break;case 16:n=no;break;case 536870912:n=Xc;break;default:n=no}n=Ef(n,gf.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function gf(e,t){if(Yl=-1,ql=0,ee&6)throw Error(N(327));var n=e.callbackNode;if(Gn()&&e.callbackNode!==n)return null;var r=ro(e,e===Re?be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ko(e,r);else{t=r;var l=ee;ee|=2;var o=vf();(Re!==e||be!==t)&&(Rt=null,rr=xe()+500,wn(e,t));do try{Tm();break}catch(s){yf(e,s)}while(!0);na(),xo.current=o,ee=l,we!==null?t=0:(Re=null,be=0,t=Ce)}if(t!==0){if(t===2&&(l=Ji(e),l!==0&&(r=l,t=Rs(e,l))),t===1)throw n=rl,wn(e,0),Yt(e,r),Qe(e,xe()),n;if(t===6)Yt(e,r);else{if(l=e.current.alternate,!(r&30)&&!Pm(l)&&(t=ko(e,r),t===2&&(o=Ji(e),o!==0&&(r=o,t=Rs(e,o))),t===1))throw n=rl,wn(e,0),Yt(e,r),Qe(e,xe()),n;switch(e.finishedWork=l,e.finishedLanes=r,t){case 0:case 1:throw Error(N(345));case 2:yn(e,Ue,Rt);break;case 3:if(Yt(e,r),(r&130023424)===r&&(t=ya+500-xe(),10<t)){if(ro(e,0)!==0)break;if(l=e.suspendedLanes,(l&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=is(yn.bind(null,e,Ue,Rt),t);break}yn(e,Ue,Rt);break;case 4:if(Yt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,l=-1;0<r;){var i=31-ht(r);o=1<<i,i=t[i],i>l&&(l=i),r&=~o}if(r=l,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bm(r/1960))-r,10<r){e.timeoutHandle=is(yn.bind(null,e,Ue,Rt),r);break}yn(e,Ue,Rt);break;case 5:yn(e,Ue,Rt);break;default:throw Error(N(329))}}}return Qe(e,xe()),e.callbackNode===n?gf.bind(null,e):null}function Rs(e,t){var n=Fr;return e.current.memoizedState.isDehydrated&&(wn(e,t).flags|=256),e=ko(e,t),e!==2&&(t=Ue,Ue=n,t!==null&&zs(t)),e}function zs(e){Ue===null?Ue=e:Ue.push.apply(Ue,e)}function Pm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var l=n[r],o=l.getSnapshot;l=l.value;try{if(!yt(o(),l))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yt(e,t){for(t&=~ga,t&=~Mo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ht(t),r=1<<n;e[n]=-1,t&=~r}}function Xu(e){if(ee&6)throw Error(N(327));Gn();var t=ro(e,0);if(!(t&1))return Qe(e,xe()),null;var n=ko(e,t);if(e.tag!==0&&n===2){var r=Ji(e);r!==0&&(t=r,n=Rs(e,r))}if(n===1)throw n=rl,wn(e,0),Yt(e,t),Qe(e,xe()),n;if(n===6)throw Error(N(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yn(e,Ue,Rt),Qe(e,xe()),null}function va(e,t){var n=ee;ee|=1;try{return e(t)}finally{ee=n,ee===0&&(rr=xe()+500,To&&cn())}}function zn(e){Gt!==null&&Gt.tag===0&&!(ee&6)&&Gn();var t=ee;ee|=1;var n=it.transition,r=le;try{if(it.transition=null,le=1,e)return e()}finally{le=r,it.transition=n,ee=t,!(ee&6)&&cn()}}function xa(){qe=Hn.current,ce(Hn)}function wn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,im(n)),we!==null)for(n=we.return;n!==null;){var r=n;switch(Zs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ao();break;case 3:tr(),ce(He),ce(De),aa();break;case 5:sa(r);break;case 4:tr();break;case 13:ce(he);break;case 19:ce(he);break;case 10:ra(r.type._context);break;case 22:case 23:xa()}n=n.return}if(Re=e,we=e=ln(e.current,null),be=qe=t,Ce=0,rl=null,ga=Mo=Rn=0,Ue=Fr=null,xn!==null){for(t=0;t<xn.length;t++)if(n=xn[t],r=n.interleaved,r!==null){n.interleaved=null;var l=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=l,r.next=i}n.pending=r}xn=null}return e}function yf(e,t){do{var n=we;try{if(na(),Vl.current=vo,yo){for(var r=me.memoizedState;r!==null;){var l=r.queue;l!==null&&(l.pending=null),r=r.next}yo=!1}if(jn=0,je=Ee=me=null,$r=!1,el=0,ma.current=null,n===null||n.return===null){Ce=1,rl=t,we=null;break}e:{var o=e,i=n.return,s=n,u=t;if(t=be,s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=s,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var y=d.alternate;y?(d.updateQueue=y.updateQueue,d.memoizedState=y.memoizedState,d.lanes=y.lanes):(d.updateQueue=null,d.memoizedState=null)}var x=Ou(i);if(x!==null){x.flags&=-257,Fu(x,i,s,o,t),x.mode&1&&$u(o,c,t),t=x,u=c;var k=t.updateQueue;if(k===null){var w=new Set;w.add(u),t.updateQueue=w}else k.add(u);break e}else{if(!(t&1)){$u(o,c,t),Sa();break e}u=Error(N(426))}}else if(pe&&s.mode&1){var R=Ou(i);if(R!==null){!(R.flags&65536)&&(R.flags|=256),Fu(R,i,s,o,t),ea(nr(u,s));break e}}o=u=nr(u,s),Ce!==4&&(Ce=2),Fr===null?Fr=[o]:Fr.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=Zd(o,u,t);Lu(o,p);break e;case 1:s=u;var h=o.type,v=o.stateNode;if(!(o.flags&128)&&(typeof h.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(nn===null||!nn.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t;var E=ef(o,s,t);Lu(o,E);break e}}o=o.return}while(o!==null)}Sf(n)}catch(P){t=P,we===n&&n!==null&&(we=n=n.return);continue}break}while(!0)}function vf(){var e=xo.current;return xo.current=vo,e===null?vo:e}function Sa(){(Ce===0||Ce===3||Ce===2)&&(Ce=4),Re===null||!(Rn&268435455)&&!(Mo&268435455)||Yt(Re,be)}function ko(e,t){var n=ee;ee|=2;var r=vf();(Re!==e||be!==t)&&(Rt=null,wn(e,t));do try{Lm();break}catch(l){yf(e,l)}while(!0);if(na(),ee=n,xo.current=r,we!==null)throw Error(N(261));return Re=null,be=0,Ce}function Lm(){for(;we!==null;)xf(we)}function Tm(){for(;we!==null&&!rh();)xf(we)}function xf(e){var t=kf(e.alternate,e,qe);e.memoizedProps=e.pendingProps,t===null?Sf(e):we=t,ma.current=null}function Sf(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=jm(n,t),n!==null){n.flags&=32767,we=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ce=6,we=null;return}}else if(n=Cm(n,t,qe),n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);Ce===0&&(Ce=5)}function yn(e,t,n){var r=le,l=it.transition;try{it.transition=null,le=1,Nm(e,t,n,r)}finally{it.transition=l,le=r}return null}function Nm(e,t,n,r){do Gn();while(Gt!==null);if(ee&6)throw Error(N(327));n=e.finishedWork;var l=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(N(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(ph(e,o),e===Re&&(we=Re=null,be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Dl||(Dl=!0,Ef(no,function(){return Gn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=it.transition,it.transition=null;var i=le;le=1;var s=ee;ee|=4,ma.current=null,zm(e,n),hf(n,e),Zh(ls),lo=!!rs,ls=rs=null,e.current=n,_m(n),lh(),ee=s,le=i,it.transition=o}else e.current=n;if(Dl&&(Dl=!1,Gt=e,wo=l),o=e.pendingLanes,o===0&&(nn=null),sh(n.stateNode),Qe(e,xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)l=t[n],r(l.value,{componentStack:l.stack,digest:l.digest});if(So)throw So=!1,e=Cs,Cs=null,e;return wo&1&&e.tag!==0&&Gn(),o=e.pendingLanes,o&1?e===js?Br++:(Br=0,js=e):Br=0,cn(),null}function Gn(){if(Gt!==null){var e=Zc(wo),t=it.transition,n=le;try{if(it.transition=null,le=16>e?16:e,Gt===null)var r=!1;else{if(e=Gt,Gt=null,wo=0,ee&6)throw Error(N(331));var l=ee;for(ee|=4,B=e.current;B!==null;){var o=B,i=o.child;if(B.flags&16){var s=o.deletions;if(s!==null){for(var u=0;u<s.length;u++){var c=s[u];for(B=c;B!==null;){var d=B;switch(d.tag){case 0:case 11:case 15:Or(8,d,o)}var f=d.child;if(f!==null)f.return=d,B=f;else for(;B!==null;){d=B;var y=d.sibling,x=d.return;if(df(d),d===c){B=null;break}if(y!==null){y.return=x,B=y;break}B=x}}}var k=o.alternate;if(k!==null){var w=k.child;if(w!==null){k.child=null;do{var R=w.sibling;w.sibling=null,w=R}while(w!==null)}}B=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,B=i;else e:for(;B!==null;){if(o=B,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Or(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,B=p;break e}B=o.return}}var h=e.current;for(B=h;B!==null;){i=B;var v=i.child;if(i.subtreeFlags&2064&&v!==null)v.return=i,B=v;else e:for(i=h;B!==null;){if(s=B,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Do(9,s)}}catch(P){ve(s,s.return,P)}if(s===i){B=null;break e}var E=s.sibling;if(E!==null){E.return=s.return,B=E;break e}B=s.return}}if(ee=l,cn(),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(zo,e)}catch{}r=!0}return r}finally{le=n,it.transition=t}}return!1}function Ju(e,t,n){t=nr(n,t),t=Zd(e,t,1),e=tn(e,t,1),t=Fe(),e!==null&&(il(e,1,t),Qe(e,t))}function ve(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(nn===null||!nn.has(r))){e=nr(n,e),e=ef(t,e,1),t=tn(t,e,1),e=Fe(),t!==null&&(il(t,1,e),Qe(t,e));break}}t=t.return}}function Im(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,Re===e&&(be&n)===n&&(Ce===4||Ce===3&&(be&130023424)===be&&500>xe()-ya?wn(e,0):ga|=n),Qe(e,t)}function wf(e,t){t===0&&(e.mode&1?(t=jl,jl<<=1,!(jl&130023424)&&(jl=4194304)):t=1);var n=Fe();e=It(e,t),e!==null&&(il(e,t,n),Qe(e,n))}function Dm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wf(e,n)}function Mm(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(N(314))}r!==null&&r.delete(t),wf(e,n)}var kf;kf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)We=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return We=!1,Em(e,t,n);We=!!(e.flags&131072)}else We=!1,pe&&t.flags&1048576&&jd(t,fo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kl(e,t),e=t.pendingProps;var l=Jn(t,De.current);qn(t,n),l=ca(null,t,r,e,l,n);var o=da();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,Ve(r)?(o=!0,uo(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,oa(t),l.updater=Io,t.stateNode=l,l._reactInternals=t,ps(t,r,e,n),t=gs(null,t,r,!0,o,n)):(t.tag=0,pe&&o&&Js(t),Oe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Om(r),e=dt(r,e),l){case 0:t=ms(null,t,r,e,n);break e;case 1:t=Uu(null,t,r,e,n);break e;case 11:t=Bu(null,t,r,e,n);break e;case 14:t=Au(null,t,r,dt(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:dt(r,l),ms(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:dt(r,l),Uu(e,t,r,l,n);case 3:e:{if(lf(t),e===null)throw Error(N(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Ld(e,t),mo(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=nr(Error(N(423)),t),t=Wu(e,t,r,n,l);break e}else if(r!==l){l=nr(Error(N(424)),t),t=Wu(e,t,r,n,l);break e}else for(Ge=en(t.stateNode.containerInfo.firstChild),Xe=t,pe=!0,pt=null,n=bd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zn(),r===l){t=Dt(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return Td(t),e===null&&cs(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,os(r,l)?i=null:o!==null&&os(r,o)&&(t.flags|=32),rf(e,t),Oe(e,t,i,n),t.child;case 6:return e===null&&cs(t),null;case 13:return of(e,t,n);case 4:return ia(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=er(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:dt(r,l),Bu(e,t,r,l,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(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,se(po,r._currentValue),r._currentValue=i,o!==null)if(yt(o.value,i)){if(o.children===l.children&&!He.current){t=Dt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Lt(-1,n&-n),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),ds(o.return,n,t),s.lanes|=n;break}u=u.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(N(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),ds(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}Oe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,qn(t,n),l=st(l),r=r(l),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,l=dt(r,t.pendingProps),l=dt(r.type,l),Au(e,t,r,l,n);case 15:return tf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:dt(r,l),Kl(e,t),t.tag=1,Ve(r)?(e=!0,uo(t)):e=!1,qn(t,n),Jd(t,r,l),ps(t,r,l,n),gs(null,t,r,!0,e,n);case 19:return sf(e,t,n);case 22:return nf(e,t,n)}throw Error(N(156,t.tag))};function Ef(e,t){return qc(e,t)}function $m(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 ot(e,t,n,r){return new $m(e,t,n,r)}function wa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Om(e){if(typeof e=="function")return wa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bs)return 11;if(e===As)return 14}return 2}function ln(e,t){var n=e.alternate;return n===null?(n=ot(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 Gl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")wa(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case In:return kn(n.children,l,o,t);case Fs:i=8,l|=8;break;case $i:return e=ot(12,n,t,l|2),e.elementType=$i,e.lanes=o,e;case Oi:return e=ot(13,n,t,l),e.elementType=Oi,e.lanes=o,e;case Fi:return e=ot(19,n,t,l),e.elementType=Fi,e.lanes=o,e;case Tc:return $o(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pc:i=10;break e;case Lc:i=9;break e;case Bs:i=11;break e;case As:i=14;break e;case Vt:i=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=ot(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function kn(e,t,n,r){return e=ot(7,e,r,t),e.lanes=n,e}function $o(e,t,n,r){return e=ot(22,e,r,t),e.elementType=Tc,e.lanes=n,e.stateNode={isHidden:!1},e}function Ci(e,t,n){return e=ot(6,e,null,t),e.lanes=n,e}function ji(e,t,n){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fm(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=oi(0),this.expirationTimes=oi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function ka(e,t,n,r,l,o,i,s,u){return e=new Fm(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ot(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},oa(o),e}function Bm(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Nn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Cf(e){if(!e)return sn;e=e._reactInternals;e:{if(bn(e)!==e||e.tag!==1)throw Error(N(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ve(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(N(171))}if(e.tag===1){var n=e.type;if(Ve(n))return Ed(e,n,t)}return t}function jf(e,t,n,r,l,o,i,s,u){return e=ka(n,r,!0,e,l,o,i,s,u),e.context=Cf(null),n=e.current,r=Fe(),l=rn(n),o=Lt(r,l),o.callback=t??null,tn(n,o,l),e.current.lanes=l,il(e,l,r),Qe(e,r),e}function Oo(e,t,n,r){var l=t.current,o=Fe(),i=rn(l);return n=Cf(n),t.context===null?t.context=n:t.pendingContext=n,t=Lt(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=tn(l,t,i),e!==null&&(mt(e,l,i,o),Hl(e,l,i)),i}function Eo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Zu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ea(e,t){Zu(e,t),(e=e.alternate)&&Zu(e,t)}function Am(){return null}var Rf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ca(e){this._internalRoot=e}Fo.prototype.render=Ca.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));Oo(e,t,null,null)};Fo.prototype.unmount=Ca.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zn(function(){Oo(null,e,null,null)}),t[Nt]=null}};function Fo(e){this._internalRoot=e}Fo.prototype.unstable_scheduleHydration=function(e){if(e){var t=nd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kt.length&&t!==0&&t<Kt[n].priority;n++);Kt.splice(n,0,e),n===0&&ld(e)}};function ja(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ec(){}function Um(e,t,n,r,l){if(l){if(typeof r=="function"){var o=r;r=function(){var c=Eo(i);o.call(c)}}var i=jf(t,r,e,0,null,!1,!1,"",ec);return e._reactRootContainer=i,e[Nt]=i.current,qr(e.nodeType===8?e.parentNode:e),zn(),i}for(;l=e.lastChild;)e.removeChild(l);if(typeof r=="function"){var s=r;r=function(){var c=Eo(u);s.call(c)}}var u=ka(e,0,!1,null,null,!1,!1,"",ec);return e._reactRootContainer=u,e[Nt]=u.current,qr(e.nodeType===8?e.parentNode:e),zn(function(){Oo(t,u,n,r)}),u}function Ao(e,t,n,r,l){var o=n._reactRootContainer;if(o){var i=o;if(typeof l=="function"){var s=l;l=function(){var u=Eo(i);s.call(u)}}Oo(t,i,e,l)}else i=Um(n,t,e,l,r);return Eo(i)}ed=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=br(t.pendingLanes);n!==0&&(Hs(t,n|1),Qe(t,xe()),!(ee&6)&&(rr=xe()+500,cn()))}break;case 13:zn(function(){var r=It(e,1);if(r!==null){var l=Fe();mt(r,e,1,l)}}),Ea(e,1)}};Vs=function(e){if(e.tag===13){var t=It(e,134217728);if(t!==null){var n=Fe();mt(t,e,134217728,n)}Ea(e,134217728)}};td=function(e){if(e.tag===13){var t=rn(e),n=It(e,t);if(n!==null){var r=Fe();mt(n,e,t,r)}Ea(e,t)}};nd=function(){return le};rd=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};qi=function(e,t,n){switch(t){case"input":if(Ui(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=Lo(r);if(!l)throw Error(N(90));Ic(r),Ui(r,l)}}}break;case"textarea":Mc(e,n);break;case"select":t=n.value,t!=null&&Vn(e,!!n.multiple,t,!1)}};Wc=va;Hc=zn;var Wm={usingClientEntryPoint:!1,Events:[al,On,Lo,Ac,Uc,va]},Er={findFiberByHostInstance:vn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Hm={bundleType:Er.bundleType,version:Er.version,rendererPackageName:Er.rendererPackageName,rendererConfig:Er.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$t.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Kc(e),e===null?null:e.stateNode},findFiberByHostInstance:Er.findFiberByHostInstance||Am,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ml=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ml.isDisabled&&Ml.supportsFiber)try{zo=Ml.inject(Hm),wt=Ml}catch{}}Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wm;Ze.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ja(t))throw Error(N(200));return Bm(e,t,null,n)};Ze.createRoot=function(e,t){if(!ja(e))throw Error(N(299));var n=!1,r="",l=Rf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=ka(e,1,!1,null,null,n,!1,r,l),e[Nt]=t.current,qr(e.nodeType===8?e.parentNode:e),new Ca(t)};Ze.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=Kc(t),e=e===null?null:e.stateNode,e};Ze.flushSync=function(e){return zn(e)};Ze.hydrate=function(e,t,n){if(!Bo(t))throw Error(N(200));return Ao(null,e,t,!0,n)};Ze.hydrateRoot=function(e,t,n){if(!ja(e))throw Error(N(405));var r=n!=null&&n.hydratedSources||null,l=!1,o="",i=Rf;if(n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=jf(t,null,e,1,n??null,l,!1,o,i),e[Nt]=t.current,qr(e),r)for(e=0;e<r.length;e++)n=r[e],l=n._getVersion,l=l(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,l]:t.mutableSourceEagerHydrationData.push(n,l);return new Fo(t)};Ze.render=function(e,t,n){if(!Bo(t))throw Error(N(200));return Ao(null,e,t,!1,n)};Ze.unmountComponentAtNode=function(e){if(!Bo(e))throw Error(N(40));return e._reactRootContainer?(zn(function(){Ao(null,null,e,!1,function(){e._reactRootContainer=null,e[Nt]=null})}),!0):!1};Ze.unstable_batchedUpdates=va;Ze.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bo(n))throw Error(N(200));if(e==null||e._reactInternals===void 0)throw Error(N(38));return Ao(e,t,n,!1,r)};Ze.version="18.3.1-next-f1338f8080-20240426";function zf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zf)}catch(e){console.error(e)}}zf(),Rc.exports=Ze;var Vm=Rc.exports,tc=Vm;Di.createRoot=tc.createRoot,Di.hydrateRoot=tc.hydrateRoot;/**
41
+ * react-router v7.14.2
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */var nc="popstate";function rc(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Qm(e={}){function t(r,l){var c;let o=(c=l.state)==null?void 0:c.masked,{pathname:i,search:s,hash:u}=o||r.location;return _s("",{pathname:i,search:s,hash:u},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,l){return typeof l=="string"?l:ll(l)}return Ym(t,n,null,e)}function ge(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Et(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Km(){return Math.random().toString(36).substring(2,10)}function lc(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function _s(e,t,n=null,r,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?sr(t):t,state:n,key:t&&t.key||r||Km(),unstable_mask:l}}function ll({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function sr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Ym(e,t,n,r={}){let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,s="POP",u=null,c=d();c==null&&(c=0,i.replaceState({...i.state,idx:c},""));function d(){return(i.state||{idx:null}).idx}function f(){s="POP";let R=d(),p=R==null?null:R-c;c=R,u&&u({action:s,location:w.location,delta:p})}function y(R,p){s="PUSH";let h=rc(R)?R:_s(w.location,R,p);c=d()+1;let v=lc(h,c),E=w.createHref(h.unstable_mask||h);try{i.pushState(v,"",E)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;l.location.assign(E)}o&&u&&u({action:s,location:w.location,delta:1})}function x(R,p){s="REPLACE";let h=rc(R)?R:_s(w.location,R,p);c=d();let v=lc(h,c),E=w.createHref(h.unstable_mask||h);i.replaceState(v,"",E),o&&u&&u({action:s,location:w.location,delta:0})}function k(R){return qm(R)}let w={get action(){return s},get location(){return e(l,i)},listen(R){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(nc,f),u=R,()=>{l.removeEventListener(nc,f),u=null}},createHref(R){return t(l,R)},createURL:k,encodeLocation(R){let p=k(R);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:y,replace:x,go(R){return i.go(R)}};return w}function qm(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ge(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ll(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function _f(e,t,n="/"){return Gm(e,t,n,!1)}function Gm(e,t,n,r){let l=typeof t=="string"?sr(t):t,o=Mt(l.pathname||"/",n);if(o==null)return null;let i=bf(e);Xm(i);let s=null;for(let u=0;s==null&&u<i.length;++u){let c=ag(o);s=ig(i[u],c,r)}return s}function bf(e,t=[],n=[],r="",l=!1){let o=(i,s,u=l,c)=>{let d={relativePath:c===void 0?i.path||"":c,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(r)&&u)return;ge(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length)}let f=gt([r,d.relativePath]),y=n.concat(d);i.children&&i.children.length>0&&(ge(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),bf(i.children,t,y,f,u)),!(i.path==null&&!i.index)&&t.push({path:f,score:lg(f,i.index),routesMeta:y})};return e.forEach((i,s)=>{var u;if(i.path===""||!((u=i.path)!=null&&u.includes("?")))o(i,s);else for(let c of Pf(i.path))o(i,s,!0,c)}),t}function Pf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=Pf(r.join("/")),s=[];return s.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&s.push(...i),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Xm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:og(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Jm=/^:[\w-]+$/,Zm=3,eg=2,tg=1,ng=10,rg=-2,oc=e=>e==="*";function lg(e,t){let n=e.split("/"),r=n.length;return n.some(oc)&&(r+=rg),t&&(r+=eg),n.filter(l=>!oc(l)).reduce((l,o)=>l+(Jm.test(o)?Zm:o===""?tg:ng),r)}function og(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function ig(e,t,n=!1){let{routesMeta:r}=e,l={},o="/",i=[];for(let s=0;s<r.length;++s){let u=r[s],c=s===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=Co({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),y=u.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=Co({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;Object.assign(l,f.params),i.push({params:l,pathname:gt([o,f.pathname]),pathnameBase:fg(gt([o,f.pathnameBase])),route:y}),f.pathnameBase!=="/"&&(o=gt([o,f.pathnameBase]))}return i}function Co(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=sg(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let o=l[0],i=o.replace(/(.)\/+$/,"$1"),s=l.slice(1);return{params:r.reduce((c,{paramName:d,isOptional:f},y)=>{if(d==="*"){let k=s[y]||"";i=o.slice(0,o.length-k.length).replace(/(.)\/+$/,"$1")}const x=s[y];return f&&!x?c[d]=void 0:c[d]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function sg(e,t=!1,n=!0){Et(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,u,c,d)=>{if(r.push({paramName:s,isOptional:u!=null}),u){let f=d.charAt(c+i.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function ag(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Et(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Mt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var ug=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function cg(e,t="/"){let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?sr(e):e,o;return n?(n=Tf(n),n.startsWith("/")?o=ic(n.substring(1),"/"):o=ic(n,t)):o=t,{pathname:o,search:pg(r),hash:hg(l)}}function ic(e,t){let n=jo(t).split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Ri(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function dg(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Lf(e){let t=dg(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Ra(e,t,n,r=!1){let l;typeof e=="string"?l=sr(e):(l={...e},ge(!l.pathname||!l.pathname.includes("?"),Ri("?","pathname","search",l)),ge(!l.pathname||!l.pathname.includes("#"),Ri("#","pathname","hash",l)),ge(!l.search||!l.search.includes("#"),Ri("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,s;if(i==null)s=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),f-=1;l.pathname=y.join("/")}s=f>=0?t[f]:"/"}let u=cg(l,s),c=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var Tf=e=>e.replace(/\/\/+/g,"/"),gt=e=>Tf(e.join("/")),jo=e=>e.replace(/\/+$/,""),fg=e=>jo(e).replace(/^\/*/,"/"),pg=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,mg=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function gg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function yg(e){let t=e.map(n=>n.route.path).filter(Boolean);return gt(t)||"/"}var Nf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function If(e,t){let n=e;if(typeof n!="string"||!ug.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,l=!1;if(Nf)try{let o=new URL(window.location.href),i=n.startsWith("//")?new URL(o.protocol+n):new URL(n),s=Mt(i.pathname,t);i.origin===o.origin&&s!=null?n=s+i.search+i.hash:l=!0}catch{Et(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:l,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Df=["POST","PUT","PATCH","DELETE"];new Set(Df);var vg=["GET",...Df];new Set(vg);var ar=m.createContext(null);ar.displayName="DataRouter";var Uo=m.createContext(null);Uo.displayName="DataRouterState";var Mf=m.createContext(!1);function xg(){return m.useContext(Mf)}var $f=m.createContext({isTransitioning:!1});$f.displayName="ViewTransition";var Sg=m.createContext(new Map);Sg.displayName="Fetchers";var wg=m.createContext(null);wg.displayName="Await";var ut=m.createContext(null);ut.displayName="Navigation";var cl=m.createContext(null);cl.displayName="Location";var Ct=m.createContext({outlet:null,matches:[],isDataRoute:!1});Ct.displayName="Route";var za=m.createContext(null);za.displayName="RouteError";var Of="REACT_ROUTER_ERROR",kg="REDIRECT",Eg="ROUTE_ERROR_RESPONSE";function Cg(e){if(e.startsWith(`${Of}:${kg}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function jg(e){if(e.startsWith(`${Of}:${Eg}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new mg(t.status,t.statusText,t.data)}catch{}}function Rg(e,{relative:t}={}){ge(dl(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=m.useContext(ut),{hash:l,pathname:o,search:i}=fl(e,{relative:t}),s=o;return n!=="/"&&(s=o==="/"?n:gt([n,o])),r.createHref({pathname:s,search:i,hash:l})}function dl(){return m.useContext(cl)!=null}function Ot(){return ge(dl(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(cl).location}var Ff="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Bf(e){m.useContext(ut).static||m.useLayoutEffect(e)}function Wo(){let{isDataRoute:e}=m.useContext(Ct);return e?Bg():zg()}function zg(){ge(dl(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(ar),{basename:t,navigator:n}=m.useContext(ut),{matches:r}=m.useContext(Ct),{pathname:l}=Ot(),o=JSON.stringify(Lf(r)),i=m.useRef(!1);return Bf(()=>{i.current=!0}),m.useCallback((u,c={})=>{if(Et(i.current,Ff),!i.current)return;if(typeof u=="number"){n.go(u);return}let d=Ra(u,JSON.parse(o),l,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:gt([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,o,l,e])}m.createContext(null);function _g(){let{matches:e}=m.useContext(Ct),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function fl(e,{relative:t}={}){let{matches:n}=m.useContext(Ct),{pathname:r}=Ot(),l=JSON.stringify(Lf(n));return m.useMemo(()=>Ra(e,JSON.parse(l),r,t==="path"),[e,l,r,t])}function bg(e,t){return Af(e,t)}function Af(e,t,n){var R;ge(dl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=m.useContext(ut),{matches:l}=m.useContext(Ct),o=l[l.length-1],i=o?o.params:{},s=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let p=c&&c.path||"";Wf(s,!c||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
+
51
+ Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let d=Ot(),f;if(t){let p=typeof t=="string"?sr(t):t;ge(u==="/"||((R=p.pathname)==null?void 0:R.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${p.pathname}" was given in the \`location\` prop.`),f=p}else f=d;let y=f.pathname||"/",x=y;if(u!=="/"){let p=u.replace(/^\//,"").split("/");x="/"+y.replace(/^\//,"").split("/").slice(p.length).join("/")}let k=_f(e,{pathname:x});Et(c||k!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Et(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=Ig(k&&k.map(p=>Object.assign({},p,{params:Object.assign({},i,p.params),pathname:gt([u,r.encodeLocation?r.encodeLocation(p.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?u:gt([u,r.encodeLocation?r.encodeLocation(p.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),l,n);return t&&w?m.createElement(cl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...f},navigationType:"POP"}},w):w}function Pg(){let e=Fg(),t=gg(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:o},"ErrorBoundary")," or"," ",m.createElement("code",{style:o},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:l},n):null,i)}var Lg=m.createElement(Pg,null),Uf=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=jg(e.digest);n&&(e=n)}let t=e!==void 0?m.createElement(Ct.Provider,{value:this.props.routeContext},m.createElement(za.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?m.createElement(Tg,{error:e},t):t}};Uf.contextType=Mf;var zi=new WeakMap;function Tg({children:e,error:t}){let{basename:n}=m.useContext(ut);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=Cg(t.digest);if(r){let l=zi.get(t);if(l)throw l;let o=If(r.location,n);if(Nf&&!zi.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw zi.set(t,i),i}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Ng({routeContext:e,match:t,children:n}){let r=m.useContext(ar);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(Ct.Provider,{value:e},n)}function Ig(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let l=e,o=r==null?void 0:r.errors;if(o!=null){let d=l.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);ge(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,d+1))}let i=!1,s=-1;if(n&&r){i=r.renderFallback;for(let d=0;d<l.length;d++){let f=l[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(s=d),f.route.id){let{loaderData:y,errors:x}=r,k=f.route.loader&&!y.hasOwnProperty(f.route.id)&&(!x||x[f.route.id]===void 0);if(f.route.lazy||k){n.isStatic&&(i=!0),s>=0?l=l.slice(0,s+1):l=[l[0]];break}}}}let u=n==null?void 0:n.onError,c=r&&u?(d,f)=>{var y,x;u(d,{location:r.location,params:((x=(y=r.matches)==null?void 0:y[0])==null?void 0:x.params)??{},unstable_pattern:yg(r.matches),errorInfo:f})}:void 0;return l.reduceRight((d,f,y)=>{let x,k=!1,w=null,R=null;r&&(x=o&&f.route.id?o[f.route.id]:void 0,w=f.route.errorElement||Lg,i&&(s<0&&y===0?(Wf("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,R=null):s===y&&(k=!0,R=f.route.hydrateFallbackElement||null)));let p=t.concat(l.slice(0,y+1)),h=()=>{let v;return x?v=w:k?v=R:f.route.Component?v=m.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,m.createElement(Ng,{match:f,routeContext:{outlet:d,matches:p,isDataRoute:r!=null},children:v})};return r&&(f.route.ErrorBoundary||f.route.errorElement||y===0)?m.createElement(Uf,{location:r.location,revalidation:r.revalidation,component:w,error:x,children:h(),routeContext:{outlet:null,matches:p,isDataRoute:!0},onError:c}):h()},null)}function _a(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dg(e){let t=m.useContext(ar);return ge(t,_a(e)),t}function Mg(e){let t=m.useContext(Uo);return ge(t,_a(e)),t}function $g(e){let t=m.useContext(Ct);return ge(t,_a(e)),t}function ba(e){let t=$g(e),n=t.matches[t.matches.length-1];return ge(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Og(){return ba("useRouteId")}function Fg(){var r;let e=m.useContext(za),t=Mg("useRouteError"),n=ba("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Bg(){let{router:e}=Dg("useNavigate"),t=ba("useNavigate"),n=m.useRef(!1);return Bf(()=>{n.current=!0}),m.useCallback(async(l,o={})=>{Et(n.current,Ff),n.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var sc={};function Wf(e,t,n){!t&&!sc[e]&&(sc[e]=!0,Et(!1,n))}m.memo(Ag);function Ag({routes:e,future:t,state:n,isStatic:r,onError:l}){return Af(e,void 0,{state:n,isStatic:r,onError:l})}function bs(e){ge(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ug({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:l,static:o=!1,unstable_useTransitions:i}){ge(!dl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:s,navigator:l,static:o,unstable_useTransitions:i,future:{}}),[s,l,o,i]);typeof n=="string"&&(n=sr(n));let{pathname:c="/",search:d="",hash:f="",state:y=null,key:x="default",unstable_mask:k}=n,w=m.useMemo(()=>{let R=Mt(c,s);return R==null?null:{location:{pathname:R,search:d,hash:f,state:y,key:x,unstable_mask:k},navigationType:r}},[s,c,d,f,y,x,r,k]);return Et(w!=null,`<Router basename="${s}"> is not able to match the URL "${c}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:m.createElement(ut.Provider,{value:u},m.createElement(cl.Provider,{children:t,value:w}))}function Wg({children:e,location:t}){return bg(Ps(e),t)}function Ps(e,t=[]){let n=[];return m.Children.forEach(e,(r,l)=>{if(!m.isValidElement(r))return;let o=[...t,l];if(r.type===m.Fragment){n.push.apply(n,Ps(r.props.children,o));return}ge(r.type===bs,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ge(!r.props.index||!r.props.children,"An index route cannot have child routes.");let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Ps(r.props.children,o)),n.push(i)}),n}var Xl="get",Jl="application/x-www-form-urlencoded";function Ho(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Hg(e){return Ho(e)&&e.tagName.toLowerCase()==="button"}function Vg(e){return Ho(e)&&e.tagName.toLowerCase()==="form"}function Qg(e){return Ho(e)&&e.tagName.toLowerCase()==="input"}function Kg(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yg(e,t){return e.button===0&&(!t||t==="_self")&&!Kg(e)}var $l=null;function qg(){if($l===null)try{new FormData(document.createElement("form"),0),$l=!1}catch{$l=!0}return $l}var Gg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _i(e){return e!=null&&!Gg.has(e)?(Et(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jl}"`),null):e}function Xg(e,t){let n,r,l,o,i;if(Vg(e)){let s=e.getAttribute("action");r=s?Mt(s,t):null,n=e.getAttribute("method")||Xl,l=_i(e.getAttribute("enctype"))||Jl,o=new FormData(e)}else if(Hg(e)||Qg(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||s.getAttribute("action");if(r=u?Mt(u,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||Xl,l=_i(e.getAttribute("formenctype"))||_i(s.getAttribute("enctype"))||Jl,o=new FormData(s,e),!qg()){let{name:c,type:d,value:f}=e;if(d==="image"){let y=c?`${c}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else c&&o.append(c,f)}}else{if(Ho(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Xl,r=null,l=Jl,i=e}return o&&l==="text/plain"&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:l,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Pa(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hf(e,t,n,r){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${r}`:l.pathname=`${l.pathname}.${r}`:l.pathname==="/"?l.pathname=`_root.${r}`:t&&Mt(l.pathname,t)==="/"?l.pathname=`${jo(t)}/_root.${r}`:l.pathname=`${jo(l.pathname)}.${r}`,l}async function Jg(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Zg(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function ey(e,t,n){let r=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let i=await Jg(o,n);return i.links?i.links():[]}return[]}));return ly(r.flat(1).filter(Zg).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function ac(e,t,n,r,l,o){let i=(u,c)=>n[c]?u.route.id!==n[c].route.id:!0,s=(u,c)=>{var d;return n[c].pathname!==u.pathname||((d=n[c].route.path)==null?void 0:d.endsWith("*"))&&n[c].params["*"]!==u.params["*"]};return o==="assets"?t.filter((u,c)=>i(u,c)||s(u,c)):o==="data"?t.filter((u,c)=>{var f;let d=r.routes[u.route.id];if(!d||!d.hasLoader)return!1;if(i(u,c)||s(u,c))return!0;if(u.route.shouldRevalidate){let y=u.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function ty(e,t,{includeHydrateFallback:n}={}){return ny(e.map(r=>{let l=t.routes[r.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),n&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function ny(e){return[...new Set(e)]}function ry(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ly(e,t){let n=new Set;return new Set(t),e.reduce((r,l)=>{let o=JSON.stringify(ry(l));return n.has(o)||(n.add(o),r.push({key:o,link:l})),r},[])}function La(){let e=m.useContext(ar);return Pa(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function oy(){let e=m.useContext(Uo);return Pa(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ta=m.createContext(void 0);Ta.displayName="FrameworkContext";function Na(){let e=m.useContext(Ta);return Pa(e,"You must render this element inside a <HydratedRouter> element"),e}function iy(e,t){let n=m.useContext(Ta),[r,l]=m.useState(!1),[o,i]=m.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:f}=t,y=m.useRef(null);m.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let w=p=>{p.forEach(h=>{i(h.isIntersecting)})},R=new IntersectionObserver(w,{threshold:.5});return y.current&&R.observe(y.current),()=>{R.disconnect()}}},[e]),m.useEffect(()=>{if(r){let w=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(w)}}},[r]);let x=()=>{l(!0)},k=()=>{l(!1),i(!1)};return n?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Cr(s,x),onBlur:Cr(u,k),onMouseEnter:Cr(c,x),onMouseLeave:Cr(d,k),onTouchStart:Cr(f,x)}]:[!1,y,{}]}function Cr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function sy({page:e,...t}){let n=xg(),{router:r}=La(),l=m.useMemo(()=>_f(r.routes,e,r.basename),[r.routes,e,r.basename]);return l?n?m.createElement(uy,{page:e,matches:l,...t}):m.createElement(cy,{page:e,matches:l,...t}):null}function ay(e){let{manifest:t,routeModules:n}=Na(),[r,l]=m.useState([]);return m.useEffect(()=>{let o=!1;return ey(e,t,n).then(i=>{o||l(i)}),()=>{o=!0}},[e,t,n]),r}function uy({page:e,matches:t,...n}){let r=Ot(),{future:l}=Na(),{basename:o}=La(),i=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let s=Hf(e,o,l.unstable_trailingSlashAwareDataRequests,"rsc"),u=!1,c=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?u=!0:c.push(d.route.id);return u&&c.length>0&&s.searchParams.set("_routes",c.join(",")),[s.pathname+s.search]},[o,l.unstable_trailingSlashAwareDataRequests,e,r,t]);return m.createElement(m.Fragment,null,i.map(s=>m.createElement("link",{key:s,rel:"prefetch",as:"fetch",href:s,...n})))}function cy({page:e,matches:t,...n}){let r=Ot(),{future:l,manifest:o,routeModules:i}=Na(),{basename:s}=La(),{loaderData:u,matches:c}=oy(),d=m.useMemo(()=>ac(e,t,c,o,r,"data"),[e,t,c,o,r]),f=m.useMemo(()=>ac(e,t,c,o,r,"assets"),[e,t,c,o,r]),y=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,R=!1;if(t.forEach(h=>{var E;let v=o.routes[h.route.id];!v||!v.hasLoader||(!d.some(P=>P.route.id===h.route.id)&&h.route.id in u&&((E=i[h.route.id])!=null&&E.shouldRevalidate)||v.hasClientLoader?R=!0:w.add(h.route.id))}),w.size===0)return[];let p=Hf(e,s,l.unstable_trailingSlashAwareDataRequests,"data");return R&&w.size>0&&p.searchParams.set("_routes",t.filter(h=>w.has(h.route.id)).map(h=>h.route.id).join(",")),[p.pathname+p.search]},[s,l.unstable_trailingSlashAwareDataRequests,u,r,o,d,t,e,i]),x=m.useMemo(()=>ty(f,o),[f,o]),k=ay(f);return m.createElement(m.Fragment,null,y.map(w=>m.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>m.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),k.map(({key:w,link:R})=>m.createElement("link",{key:w,nonce:n.nonce,...R,crossOrigin:R.crossOrigin??n.crossOrigin})))}function dy(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var fy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fy&&(window.__reactRouterVersion="7.14.2")}catch{}function py({basename:e,children:t,unstable_useTransitions:n,window:r}){let l=m.useRef();l.current==null&&(l.current=Qm({window:r,v5Compat:!0}));let o=l.current,[i,s]=m.useState({action:o.action,location:o.location}),u=m.useCallback(c=>{n===!1?s(c):m.startTransition(()=>s(c))},[n]);return m.useLayoutEffect(()=>o.listen(u),[o,u]),m.createElement(Ug,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,unstable_useTransitions:n})}var Vf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qf=m.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:l,reloadDocument:o,replace:i,unstable_mask:s,state:u,target:c,to:d,preventScrollReset:f,viewTransition:y,unstable_defaultShouldRevalidate:x,...k},w){let{basename:R,navigator:p,unstable_useTransitions:h}=m.useContext(ut),v=typeof d=="string"&&Vf.test(d),E=If(d,R);d=E.to;let P=Rg(d,{relative:l}),C=Ot(),L=null;if(s){let ne=Ra(s,[],C.unstable_mask?C.unstable_mask.pathname:"/",!0);R!=="/"&&(ne.pathname=ne.pathname==="/"?R:gt([R,ne.pathname])),L=p.createHref(ne)}let[D,H,O]=iy(r,k),G=yy(d,{replace:i,unstable_mask:s,state:u,target:c,preventScrollReset:f,relative:l,viewTransition:y,unstable_defaultShouldRevalidate:x,unstable_useTransitions:h});function ae(ne){t&&t(ne),ne.defaultPrevented||G(ne)}let te=!(E.isExternal||o),re=m.createElement("a",{...k,...O,href:(te?L:void 0)||E.absoluteURL||P,onClick:te?ae:t,ref:dy(w,H),target:c,"data-discover":!v&&n==="render"?"true":void 0});return D&&!v?m.createElement(m.Fragment,null,re,m.createElement(sy,{page:P})):re});Qf.displayName="Link";var hy=m.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:l=!1,style:o,to:i,viewTransition:s,children:u,...c},d){let f=fl(i,{relative:c.relative}),y=Ot(),x=m.useContext(Uo),{navigator:k,basename:w}=m.useContext(ut),R=x!=null&&ky(f)&&s===!0,p=k.encodeLocation?k.encodeLocation(f).pathname:f.pathname,h=y.pathname,v=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(h=h.toLowerCase(),v=v?v.toLowerCase():null,p=p.toLowerCase()),v&&w&&(v=Mt(v,w)||v);const E=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let P=h===p||!l&&h.startsWith(p)&&h.charAt(E)==="/",C=v!=null&&(v===p||!l&&v.startsWith(p)&&v.charAt(p.length)==="/"),L={isActive:P,isPending:C,isTransitioning:R},D=P?t:void 0,H;typeof r=="function"?H=r(L):H=[r,P?"active":null,C?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let O=typeof o=="function"?o(L):o;return m.createElement(Qf,{...c,"aria-current":D,className:H,ref:d,style:O,to:i,viewTransition:s},typeof u=="function"?u(L):u)});hy.displayName="NavLink";var my=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:l,state:o,method:i=Xl,action:s,onSubmit:u,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:y,...x},k)=>{let{unstable_useTransitions:w}=m.useContext(ut),R=Sy(),p=wy(s,{relative:c}),h=i.toLowerCase()==="get"?"get":"post",v=typeof s=="string"&&Vf.test(s),E=P=>{if(u&&u(P),P.defaultPrevented)return;P.preventDefault();let C=P.nativeEvent.submitter,L=(C==null?void 0:C.getAttribute("formmethod"))||i,D=()=>R(C||P.currentTarget,{fetcherKey:t,method:L,navigate:n,replace:l,state:o,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:y});w&&n!==!1?m.startTransition(()=>D()):D()};return m.createElement("form",{ref:k,method:h,action:p,onSubmit:r?u:E,...x,"data-discover":!v&&e==="render"?"true":void 0})});my.displayName="Form";function gy(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kf(e){let t=m.useContext(ar);return ge(t,gy(e)),t}function yy(e,{target:t,replace:n,unstable_mask:r,state:l,preventScrollReset:o,relative:i,viewTransition:s,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let d=Wo(),f=Ot(),y=fl(e,{relative:i});return m.useCallback(x=>{if(Yg(x,t)){x.preventDefault();let k=n!==void 0?n:ll(f)===ll(y),w=()=>d(e,{replace:k,unstable_mask:r,state:l,preventScrollReset:o,relative:i,viewTransition:s,unstable_defaultShouldRevalidate:u});c?m.startTransition(()=>w()):w()}},[f,d,y,n,r,l,t,e,o,i,s,u,c])}var vy=0,xy=()=>`__${String(++vy)}__`;function Sy(){let{router:e}=Kf("useSubmit"),{basename:t}=m.useContext(ut),n=Og(),r=e.fetch,l=e.navigate;return m.useCallback(async(o,i={})=>{let{action:s,method:u,encType:c,formData:d,body:f}=Xg(o,t);if(i.navigate===!1){let y=i.fetcherKey||xy();await r(y,n,i.action||s,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||u,formEncType:i.encType||c,flushSync:i.flushSync})}else await l(i.action||s,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:d,body:f,formMethod:i.method||u,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,l,t,n])}function wy(e,{relative:t}={}){let{basename:n}=m.useContext(ut),r=m.useContext(Ct);ge(r,"useFormAction must be used inside a RouteContext");let[l]=r.matches.slice(-1),o={...fl(e||".",{relative:t})},i=Ot();if(e==null){o.search=i.search;let s=new URLSearchParams(o.search),u=s.getAll("index");if(u.some(d=>d==="")){s.delete("index"),u.filter(f=>f).forEach(f=>s.append("index",f));let d=s.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:gt([n,o.pathname])),ll(o)}function ky(e,{relative:t}={}){let n=m.useContext($f);ge(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Kf("useViewTransitionState"),l=fl(e,{relative:t});if(!n.isTransitioning)return!1;let o=Mt(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=Mt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Co(l.pathname,i)!=null||Co(l.pathname,o)!=null}const uc=["#4285f4","#ea4335","#34a853","#fbbc05","#9c27b0","#ff6d00","#00bcd4","#e91e63"],bi={};let Ey=0;function _t(e){return e?(bi[e]||(bi[e]=uc[Ey++%uc.length]),bi[e]):"#999"}const Cy={"历史-隋朝":{order:1,start:581,end:618,label:"隋朝"},"历史-唐朝":{order:2,start:618,end:907,label:"唐朝"},"历史-辽":{order:3,start:916,end:1125,label:"辽"},"历史-北宋":{order:4,start:960,end:1127,label:"北宋"},"历史-西夏":{order:5,start:1038,end:1227,label:"西夏"},"历史-金":{order:6,start:1115,end:1234,label:"金"},"历史-南宋":{order:7,start:1127,end:1279,label:"南宋"},"历史-宋朝":{order:7.5,start:960,end:1279,label:"宋朝"},"历史-元朝":{order:8,start:1271,end:1368,label:"元朝"}};function Pi(e){return Cy[e]||{order:99,start:null,end:null,label:(e==null?void 0:e.replace("历史-",""))||"其他"}}function cc(e){const t=e.match(/(\d{3,4})年/);return t?parseInt(t[1]):null}function jy({entries:e,onEntryClick:t,selectedId:n,compact:r}){const[l,o]=m.useState(!1),i=m.useMemo(()=>{const d={};return e.forEach(f=>{const y=f.subject||"其他";d[y]||(d[y]=[]),d[y].push({...f,year:cc(f.content)})}),Object.entries(d).sort(([f],[y])=>Pi(f).order-Pi(y).order).map(([f,y])=>{const x=Pi(f),k=y.filter(R=>R.year!==null).sort((R,p)=>R.year-p.year),w=y.filter(R=>R.year===null);return{subject:f,info:x,dated:k,undated:w,all:y}})},[e]),s=d=>{const f=d.id===n;return a.jsx("div",{onClick:()=>t(d),style:{padding:"6px 10px",marginBottom:3,borderRadius:6,cursor:"pointer",background:f?"#2a2d45":"#1c1f2e",borderLeft:`3px solid ${_t(d.subject)}`,transition:"background 0.15s"},onMouseEnter:y=>{f||(y.currentTarget.style.background="#222640")},onMouseLeave:y=>{f||(y.currentTarget.style.background="#1c1f2e")},children:a.jsxs("div",{style:{fontSize:12,fontWeight:500,color:"#ddd"},children:[d.year&&a.jsxs("span",{style:{color:"#888",marginRight:4,fontSize:10},children:[d.year,"年"]}),d.title]})},d.id)},u=(d,f)=>{const y=d.id===n;return a.jsxs("div",{style:{position:"relative",marginBottom:6,marginLeft:f?24:0},children:[a.jsx("div",{style:{position:"absolute",left:-19,top:14,width:f?6:8,height:f?6:8,borderRadius:"50%",background:_t(d.subject),border:y?"2px solid #fff":"2px solid #0f1117",opacity:f?.6:1}}),d.year&&a.jsxs("div",{style:{position:"absolute",left:-76,top:12,width:50,textAlign:"right",fontSize:11,color:"#888",fontWeight:500},children:[d.year,"年"]}),a.jsxs("div",{onClick:()=>t(d),style:{padding:"10px 14px",marginLeft:8,borderRadius:8,cursor:"pointer",background:y?"#2a2d45":"#161822",borderLeft:`3px solid ${_t(d.subject)}`,transition:"background 0.15s",opacity:f?.85:1},onMouseEnter:x=>{y||(x.currentTarget.style.background="#1c2030")},onMouseLeave:x=>{y||(x.currentTarget.style.background="#161822")},children:[a.jsxs("div",{style:{fontSize:15,fontWeight:600,color:"#fff",marginBottom:3},children:[d.title,!d.year&&a.jsx("span",{style:{fontSize:10,color:"#666",marginLeft:6},children:"(无明确年份)"})]}),a.jsx("div",{style:{fontSize:13,color:"#bbb",lineHeight:1.6},children:d.content}),(d.tags||[]).length>0&&a.jsx("div",{style:{display:"flex",gap:4,flexWrap:"wrap",marginTop:6},children:d.tags.slice(0,5).map((x,k)=>a.jsx("span",{style:{fontSize:10,padding:"1px 7px",borderRadius:10,background:"#1c1f2e",color:"#777"},children:x},k))})]})]},d.id)},c=(d,f,y,x)=>a.jsxs("div",{style:{position:"relative",marginBottom:6},children:[a.jsx("div",{style:{position:"absolute",left:-22,top:4,width:14,height:14,borderRadius:x==="start"?"50%":2,background:y,border:"3px solid #0f1117"}}),a.jsxs("div",{style:{position:"absolute",left:-76,top:4,width:50,textAlign:"right",fontSize:11,color:"#aaa",fontWeight:600},children:[f,"年"]}),a.jsx("div",{style:{marginLeft:8,padding:"4px 12px",fontSize:13,color:"#aaa",fontStyle:"italic"},children:x==="start"?`── ${d} 建立`:`── ${d} 灭亡 ──`})]});return r?a.jsxs("div",{style:{padding:"6px 10px"},children:[a.jsxs("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:[e.length," 个知识点(时间线)"]}),i.map((d,f)=>a.jsxs("div",{style:{marginBottom:8},children:[a.jsxs("div",{style:{fontSize:12,fontWeight:600,color:_t(d.subject),marginBottom:4},children:[d.info.label,d.info.start&&a.jsxs("span",{style:{fontSize:10,color:"#666",marginLeft:4},children:[d.info.start,"—",d.info.end]})]}),[...d.dated,...l?[]:d.undated].map(y=>s(y))]},f))]}):a.jsx("div",{style:{height:"100%",overflowY:"auto",padding:"20px 30px",background:"#0f1117"},children:a.jsxs("div",{style:{maxWidth:900,margin:"0 auto"},children:[a.jsxs("div",{style:{marginBottom:16,display:"flex",alignItems:"center",gap:10},children:[a.jsx("button",{onClick:()=>o(!l),style:{padding:"5px 14px",borderRadius:8,border:"none",cursor:"pointer",fontSize:12,background:l?"#4285f4":"#1c1f2e",color:l?"#fff":"#aaa"},children:l?"✓ 仅显示有明确时间的":"显示全部"}),a.jsx("span",{style:{fontSize:11,color:"#666"},children:l?`${e.filter(d=>cc(d.content)!==null).length} 个有明确时间`:`共 ${e.length} 个知识点`})]}),a.jsxs("div",{style:{position:"relative",paddingLeft:80},children:[a.jsx("div",{style:{position:"absolute",left:64,top:0,bottom:0,width:2,background:"#2a2d35"}}),i.map((d,f)=>{const y=_t(d.subject),x=d.info.start!==null,k=d.dated,w=l?[]:d.undated;return l&&k.length===0?null:a.jsxs("div",{style:{marginBottom:28},children:[a.jsxs("div",{style:{position:"relative",marginBottom:12,marginTop:f>0?16:0},children:[a.jsx("div",{style:{position:"absolute",left:-22,top:6,width:14,height:14,borderRadius:"50%",background:y,border:"3px solid #0f1117"}}),a.jsx("div",{style:{fontSize:17,fontWeight:700,color:y},children:d.info.label}),x&&a.jsxs("div",{style:{fontSize:12,color:"#888",marginTop:2},children:[d.info.start,"—",d.info.end,"年 · ",l?k.length:d.all.length,"个知识点",w.length>0&&` (${w.length}个无明确年份)`]})]}),x&&c(d.info.label,d.info.start,y,"start"),k.map(R=>u(R,!1)),w.length>0&&a.jsxs(a.Fragment,{children:[w.length>0&&!l&&a.jsx("div",{style:{marginLeft:32,fontSize:11,color:"#555",marginBottom:4,marginTop:8},children:"── 其他相关知识 ──"}),w.map(R=>u(R,!0))]}),x&&c(d.info.label,d.info.end,y,"end")]},f)})]})]})})}const Ia="";async function dn(e){return(await fetch(`${Ia}${e}`)).json()}async function Le(e,t,{method:n="POST",throwOnError:r=!1}={}){const l=t instanceof FormData,o=await fetch(`${Ia}${e}`,{method:n,...l?{body:t}:t!=null?{headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}:{}});if(r&&!o.ok)throw new Error((await o.json()).error||"Request failed");return o.json()}const Ry=()=>dn("/api/graph"),dc=e=>dn(`/api/entries/${e}/topic-pages`),Ls=e=>dn(`/api/entries/${e}/topic-page/latest`),zy=e=>dn(`/api/entries/${e}/children`),_y=()=>dn("/api/settings"),Yf=()=>dn("/api/llm/config"),by=e=>dn(`/api/entries/${e}/qa`);async function Li(e,t){return(await dn(`/api/entries/${e}/topic-page/version/${t}`)).page||null}const Py=e=>fetch(`${Ia}/api/entries/${e}`,{method:"DELETE"}),Ly=(e,t)=>Le(`/api/entries/${e}/topic-page/${t}`,null,{method:"DELETE"}),Ty=(e,t="",n)=>Le("/api/ingest",{text:e,subject:t,source_type:"text",...n&&{maxPoints:n}}),qf=(e,t)=>Le(`/api/entries/${e}`,t,{method:"PUT"}),Ny=e=>Le(`/api/entries/${e}/questions`,{}),Ti=(e,t,n=[])=>Le(`/api/entries/${e}/ask`,{question:t,history:n}),Iy=(e,t)=>Le(`/api/entries/${e}/qa`,{qaHistory:t},{method:"PUT"}),jr=(e,t=[],n="",r="",l="")=>Le(`/api/entries/${e}/topic-page`,{qaHistory:t,existingHTML:n,requirements:r,mode:l},{throwOnError:!0}),mn=(e,t,n=[],r=[],l=[])=>Le(`/api/entries/${e}/topic-page/save`,{html:t,qaHistory:n,comments:r,includedQaIds:l}),fc=(e,t)=>Le(`/api/topic-pages/${e}/comments`,{comments:t},{method:"PUT"}),Dy=(e,t)=>Le(`/api/topic-pages/${e}/qa-history`,{qaHistory:t},{method:"PUT"}),My=e=>Le(`/api/entries/${e}/expand`,{}),$y=(e,t)=>Le(`/api/entries/${e}/children`,t),Oy=e=>Le("/api/settings",e,{method:"PUT"}),Fy=e=>Le("/api/llm/config",e),By=e=>Le("/api/llm/test",{providerName:e});async function Ay(e,t="",n){const r=new FormData;return r.append("file",e),t&&r.append("subject",t),n&&r.append("maxPoints",String(n)),Le("/api/ingest/file",r,{throwOnError:!0})}async function Uy(e,t="",n){return Le("/api/ingest/url",{url:e,subject:t,...n&&{maxPoints:n}},{throwOnError:!0})}const Wy=[{id:"text",label:"📝 文本"},{id:"file",label:"📄 文件"},{id:"url",label:"🔗 网页"}],Hy=".pdf,.docx,.xlsx,.xls,.txt,.md";function Vy({onIngested:e,loading:t,setLoading:n}){var P;const[r,l]=m.useState("text"),[o,i]=m.useState(""),[s,u]=m.useState(""),[c,d]=m.useState(""),[f,y]=m.useState(""),x=m.useRef(null),[k,w]=m.useState(""),[R,p]=m.useState(null),h={width:"100%",padding:"6px 10px",background:"#1c1f2e",border:"1px solid #2a2d35",borderRadius:6,color:"#e0e0e0",fontSize:13,boxSizing:"border-box"},v=async()=>{var C,L,D;if(!t){n(!0),p(null);try{let H;if(r==="text"){if(!o.trim())return;const O=k?parseInt(k,10):void 0;H=await Ty(o.trim(),s.trim(),O),i("")}else if(r==="file"){const O=(L=(C=x.current)==null?void 0:C.files)==null?void 0:L[0];if(!O)return;const G=k?parseInt(k,10):void 0;H=await Ay(O,s.trim(),G),x.current.value="",y("")}else if(r==="url"){if(!c.trim())return;const O=k?parseInt(k,10):void 0;H=await Uy(c.trim(),s.trim(),O),d("")}p({ok:!0,count:((D=H.created)==null?void 0:D.length)||0,skipped:H.skipped||[]}),e()}catch(H){p({ok:!1,msg:H.message})}finally{n(!1)}}},E=r==="text"?o.trim():r==="file"?f:r==="url"?c.trim():!1;return a.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid #2a2d35"},children:[a.jsx("div",{style:{display:"flex",gap:2,marginBottom:8},children:Wy.map(C=>a.jsx("button",{onClick:()=>l(C.id),style:{flex:1,padding:"4px 0",borderRadius:4,border:"none",cursor:"pointer",fontSize:11,background:r===C.id?"#2a2d45":"transparent",color:r===C.id?"#fff":"#777"},children:C.label},C.id))}),a.jsx("input",{value:s,onChange:C=>u(C.target.value),placeholder:"学科 (可选)",style:{...h,marginBottom:8}}),a.jsx("input",{type:"number",min:"1",max:"50",value:k,onChange:C=>w(C.target.value),placeholder:"最多提取知识点数 (可选)",style:{...h,marginBottom:8}}),r==="text"&&a.jsx("textarea",{value:o,onChange:C=>i(C.target.value),placeholder:"粘贴笔记内容...",rows:4,style:{...h,resize:"vertical"}}),r==="file"&&a.jsxs("div",{style:{...h,padding:"10px",cursor:"pointer",textAlign:"center",borderStyle:"dashed"},onClick:()=>{var C;return(C=x.current)==null?void 0:C.click()},children:[a.jsx("input",{ref:x,type:"file",accept:Hy,style:{display:"none"},onChange:C=>{var L,D;return y(((D=(L=C.target.files)==null?void 0:L[0])==null?void 0:D.name)||"")}}),f?a.jsx("span",{style:{color:"#4285f4"},children:f}):a.jsx("span",{style:{color:"#666"},children:"点击选择文件 (PDF / Word / Excel / TXT)"})]}),r==="url"&&a.jsx("input",{value:c,onChange:C=>d(C.target.value),placeholder:"https://...",style:h}),a.jsx("button",{onClick:v,disabled:!E||t,style:{width:"100%",marginTop:8,padding:"8px 0",background:t?"#555":"#4285f4",color:"#fff",border:"none",borderRadius:6,cursor:t?"not-allowed":"pointer",fontSize:13,fontWeight:500},children:t?"分析中...":"📥 添加知识"}),R&&a.jsxs("div",{style:{marginTop:6,fontSize:12,color:R.ok?"#34a853":"#ef5350"},children:[R.ok?`成功提取 ${R.count} 个知识点`:`错误: ${R.msg}`,((P=R.skipped)==null?void 0:P.length)>0&&a.jsxs("div",{style:{marginTop:4,color:"#ffb74d"},children:["跳过 ",R.skipped.length," 个重复知识点:",R.skipped.map((C,L)=>a.jsxs("div",{style:{marginLeft:8,fontSize:11,color:"#999"},children:["• ",C.title," — 与「",C.duplicateTitle,"」重复: ",C.reason]},L))]})]})]})}const Gf=`body { padding: 20px !important; background: #fff !important; color: #222 !important; }
52
+ * { max-width: 100% !important; overflow: visible !important; height: auto !important; max-height: none !important; -webkit-text-fill-color: initial !important; -webkit-background-clip: initial !important; background-clip: initial !important; color: #222 !important; background: transparent !important; background-image: none !important; }
53
+ strong, b { color: #111 !important; }
54
+ .badge { background: #e8e8e8 !important; color: #333 !important; }
55
+ .highlight { background: #f5f5dc !important; border-left-color: #ccc !important; }
56
+ .card { background: #fafafa !important; border-color: #ddd !important; box-shadow: none !important; }
57
+ .hero { background: #f0f0f0 !important; }
58
+ .hero h1 { color: #111 !important; }
59
+ a { color: #1a73e8 !important; }
60
+ .compare-table th { background: #f0f0f0 !important; color: #333 !important; }
61
+ .compare-table td { border-color: #ddd !important; }
62
+ h1,h2,h3,h4,h5,h6 { page-break-after: avoid; color: #111 !important; }
63
+ pre, code { background: #f5f5f5 !important; color: #333 !important; }
64
+ pre, blockquote, table, .card, .hero, .highlight, section, .compare-table, details, figure, ul, ol { page-break-inside: avoid; break-inside: avoid; border-color: #ccc !important; }
65
+ img { max-width: 100% !important; }`,Qy='body, body > div, body > section, body > article, body > main, [class*="container"], [class*="wrapper"], [class*="content"] { max-width: 100% !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 20px !important; padding-right: 20px !important; }',Ky=`${Qy} @media print { ${Gf} }`;function Xf(e,t,n){const r=`<!DOCTYPE html><html><head><meta charset="utf-8"><title>${t}</title><style>${Ky}</style></head><body>${e}</body></html>`,l=new Blob([r],{type:"text/html"}),o=document.createElement("a");o.href=URL.createObjectURL(l),o.download=n,o.click(),URL.revokeObjectURL(o.href)}const Rr={概念:"#4285f4",原因:"#ea4335",影响:"#34a853",对比:"#fbbc05",思考:"#9c27b0",自定义:"#ff6d00"},Lr=e=>e.filter(t=>t.answer&&!t.loading),pc=e=>Lr(e).map((t,n)=>t._qid||`qa_${n}`),Ni=(e,t)=>e.filter(n=>!t.some(r=>r.question===n.question&&r.answer&&!r.loading)),Ol={input:{width:"100%",padding:"8px 10px",borderRadius:6,border:"1px solid #2a2d45",background:"#1c1f2e",color:"#ddd",fontSize:13,boxSizing:"border-box",fontFamily:"inherit",outline:"none"},btnPrimary:{padding:"4px 12px",borderRadius:4,border:"none",background:"#34a853",color:"#fff",cursor:"pointer",fontSize:11},btnCancel:{padding:"4px 12px",borderRadius:4,border:"none",background:"#666",color:"#fff",cursor:"pointer",fontSize:11}};function Jf({entry:e,allEntries:t=[],onClose:n,onDeleted:r,onNavigate:l,onUpdated:o,sharedCacheRef:i}){const s=Wo(),[u,c]=m.useState("topic"),[d,f]=m.useState([]),[y,x]=m.useState(new Set),[k,w]=m.useState(!1),[R,p]=m.useState(null),[h,v]=m.useState(""),[E,P]=m.useState(""),[C,L]=m.useState([]),[D,H]=m.useState(!1),[O,G]=m.useState(""),[ae,te]=m.useState(null),[re,ne]=m.useState(0),[T,X]=m.useState(0),[M,W]=m.useState([]),[_,U]=m.useState(null),[A,oe]=m.useState(!1),[z,K]=m.useState([]),[Q,de]=m.useState(!1),[Ft,Ke]=m.useState(""),[V,Se]=m.useState(!1),[fe,Y]=m.useState(""),[fn,Me]=m.useState(!1),[tt,pl]=m.useState(!1),Bt=m.useRef(null),[Da,jt]=m.useState(""),[Ye,Pn]=m.useState([]),[ur,Vo]=m.useState(!1),[Qo,ep]=m.useState(""),[hl,Ko]=m.useState(""),[cr,pn]=m.useState(null),[$e,hn]=m.useState({}),[ml,Ma]=m.useState(!1),[$a,Yo]=m.useState(""),[dr,fr]=m.useState([]),[tp,Oa]=m.useState(new Set),[np,qo]=m.useState(null),[Fa,gl]=m.useState(""),[Ba,Aa]=m.useState(""),pr=m.useRef(null),Go=m.useRef({}),ie=m.useRef(e.id);m.useRef({}),m.useRef(0);const rp=m.useRef({}),nt=i||rp,[hr,Xo]=m.useState(!1),yl=m.useRef(null),lp=()=>({topicHTML:O,topicPageId:ae,topicVersion:re,topicVersionCount:T,topicVersionList:M,qaHistory:C,includedQaIds:dr,comments:Ye,lastUpdated:Da,topicStatus:fe,topicDirty:fn,asking:D,loadingTopic:V,smartQuestions:d,selectedQs:[...y],editMode:tt,tab:u}),op=g=>{H(g.asking||!1),w(!1),Se(g.loadingTopic||!1),G(g.topicHTML||""),te(g.topicPageId||null),ne(g.topicVersion||0),X(g.topicVersionCount||0),W(g.topicVersionList||[]),L(g.qaHistory||[]),Pn(g.comments||[]),fr(g.includedQaIds||[]),jt(g.lastUpdated||""),Y(g.topicStatus||""),Me(g.topicDirty||!1),f(g.smartQuestions||[]),x(new Set(g.selectedQs||[])),pl(g.editMode||!1),c(g.tab||"topic"),U(null),Xo(!1)},Ln=g=>{const S=g.filter(j=>!j.loading&&j.answer).map(j=>({question:j.question,answer:j.answer,category:j.category||""}));Iy(e.id,S).catch(j=>{console.error("QA sync failed:",j),ze("QA保存失败")})},ze=g=>{Aa(g),setTimeout(()=>Aa(""),4e3)};m.useEffect(()=>{ie.current=e.id,pn(null),Vo(!1);const g=nt.current[e.id];if(g?op(g):(H(!1),w(!1),Se(!1),f([]),x(new Set),L([]),G(""),te(null),ne(0),X(0),W([]),U(null),Y(""),Me(!1),jt(""),Pn([]),fr([]),Oa(new Set),c("topic"),Xo(!0),Jo()),!g){const S=Go.current[e.id];S?(f(S),x(new Set(S.map(j=>j.id)))):(f([]),x(new Set))}},[e.id]),m.useEffect(()=>{if(!e.id||hr)return;const g=lp();nt.current[e.id]=g,yl.current={id:e.id,state:g}},[e.id,hr,O,ae,re,T,C,dr,Ye,Da,fe,fn,D,V,d,y,tt,u]),m.useEffect(()=>()=>{yl.current&&(nt.current[yl.current.id]=yl.current.state)},[]);const Jo=async()=>{const g=e.id;try{const S=await by(g);if(ie.current!==g)return;S.length&&L(S);const j=await Ls(g);if(ie.current!==g)return;if(j.page){if(G(j.page.html),te(j.page.id),ne(j.page.version),X(j.page.version),Pn(j.page.comments||[]),fr(j.page.included_qa_ids||[]),!S.length){const b=(j.page.qa_history||[]).filter($=>$.answer);b.length&&L(b)}jt(j.page.created_at),Y(`v${j.page.version} 已保存`),Me(!1)}const I=await dc(g);if(ie.current!==g)return;W((I.pages||[]).map(b=>b.version).sort((b,$)=>b-$))}catch(S){console.error(S),ze("加载专题页失败")}ie.current===g&&Xo(!1)},Ua=async()=>{const g=e.id;ie.current===g&&w(!0);try{const j=((await Ny(g)).questions||[]).map((I,b)=>{const $=C.some(F=>F.answer&&(F.question===I.question||F.question.includes(I.question)||I.question.includes(F.question)));return{...I,id:b,answered:$}});Go.current[g]=j,ie.current===g&&(f(j),x(new Set(j.filter(I=>!I.answered).map(I=>I.id))))}catch(S){console.error(S),ze("生成智能问题失败")}ie.current===g&&w(!1)},ip=g=>{x(S=>{const j=new Set(S);return j.has(g)?j.delete(g):j.add(g),j})},sp=g=>{f(S=>S.filter(j=>j.id!==g)),x(S=>{const j=new Set(S);return j.delete(g),j})},Wa=g=>{h.trim()&&(f(S=>S.map(j=>j.id===g?{...j,question:h.trim()}:j)),p(null))},Ha=()=>{if(!E.trim())return;const g=Date.now(),S={id:g,question:E.trim(),category:"自定义"};f(j=>[...j,S]),x(j=>new Set(j).add(g)),P("")},ap=async g=>{if(!g||D)return;const S=e.id;H(!0);const j=C.map(I=>({question:I.question,answer:I.answer}));L(I=>[...I,{question:g,answer:"",loading:!0}]);try{const I=await Ti(S,g,j);if(ie.current!==S){Ln([...j,{question:g,answer:I.answer}]),H(!1);return}const b={question:g,answer:I.answer,cards:I.suggestedCards||[],loading:!1};L($=>{const F=[...$];return F[F.length-1]=b,Ln(F),F}),Me(!0)}catch(I){if(ie.current!==S){H(!1);return}L(b=>{const $=[...b];return $[$.length-1]={question:g,answer:`错误: ${I.message}`,loading:!1},$})}H(!1),setTimeout(()=>{var I;return(I=pr.current)==null?void 0:I.scrollTo(0,pr.current.scrollHeight)},100)},up=async g=>{const S=C[g];if(!S||S.loading)return;const j=S.question,I=S._qid;L(b=>{const $=[...b];return $[g]={...$[g],answer:"",loading:!0},$}),H(!0);try{const b=C.filter((F,q)=>q!==g&&!F.loading).map(F=>({question:F.question,answer:F.answer})),$=await Ti(e.id,j,b);L(F=>{const q=[...F];return q[g]={question:j,answer:$.answer,cards:$.suggestedCards||[],loading:!1,_qid:I},Ln(q),q}),Me(!0)}catch(b){L($=>{const F=[...$];return F[g]={question:j,answer:`错误: ${b.message}`,loading:!1,_qid:I},F})}H(!1)},cp=g=>{L(S=>{const j=[...S];return j[g]={...j[g],answer:Fa},Ln(j),j}),Me(!0),qo(null),gl("")},dp=async()=>{const g=d.filter(J=>y.has(J.id));if(!g.length)return;const S=e.id,j=ae,I=C.filter(J=>!J.loading).map(J=>({question:J.question,answer:J.answer}));ie.current===S&&H(!0);const b=g.map(J=>({question:J.question,answer:"",loading:!0,_qid:J.id}));ie.current===S&&L(J=>[...J,...b]);const $=nt.current[S];$&&($.asking=!0,$.qaHistory=[...$.qaHistory||[],...b]);const F={},q=g.map(async J=>{try{const ke=await Ti(S,J.question,I);F[J.id]={question:J.question,answer:ke.answer,cards:ke.suggestedCards||[],loading:!1}}catch(ke){F[J.id]={question:J.question,answer:`错误: ${ke.message}`,loading:!1}}if(ie.current===S)L(ke=>ke.map(Wt=>Wt._qid===J.id?{...F[J.id],_qid:J.id}:Wt)),Me(!0);else{const ke=nt.current[S];ke&&(ke.qaHistory=(ke.qaHistory||[]).map(Wt=>Wt._qid===J.id?{...F[J.id],_qid:J.id}:Wt),ke.topicDirty=!0)}if(j){const ke=[...I,...Object.values(F).map(Wt=>({question:Wt.question,answer:Wt.answer}))];Ln(ke)}});if(await Promise.all(q),ie.current===S)H(!1),setTimeout(()=>{var J;return(J=pr.current)==null?void 0:J.scrollTo(0,pr.current.scrollHeight)},100);else{const J=nt.current[S];J&&(J.asking=!1)}},vl=g=>{const j=`<div data-timestamp style="text-align:right;padding:8px 16px;font-size:11px;color:#666;border-bottom:1px solid #333;">最后更新: ${new Date().toLocaleString("zh-CN",{timeZone:"Asia/Shanghai"})}</div>`;let I=g;for(;/<div[^>]*>最后更新:[\s\S]*?<\/div>/g.test(I);)I=I.replace(/<div[^>]*>最后更新:[\s\S]*?<\/div>/g,"");return I=I.replace(/<div data-timestamp[^>]*>[\s\S]*?<\/div>/g,""),I.replace(/<body[^>]*>/,b=>b+j)||j+I},xl=async()=>{const g=e.id;Se(!0),Y("正在生成...");try{const S=await jr(g,C,"",Qo);if(!S.html||S.html.replace(/<[^>]*>/g,"").trim().length<50){ie.current===g&&Y("生成内容为空,请重试"),Se(!1);return}if(ie.current!==g){const b=nt.current[g];b&&(b.loadingTopic=!1,b.topicHTML=S.html,b.topicStatus="已生成(后台完成)");return}const j=vl(S.html),I=pc(C);G(j),c("topic");try{const b=await mn(g,j,C,Ye,I);if(ie.current!==g){const $=nt.current[g];$&&($.loadingTopic=!1,$.topicPageId=b.id,$.topicVersion=b.version,$.topicVersionCount=b.version,$.topicVersionList=[...($.topicVersionList||[]).filter(F=>F!==b.version),b.version].sort((F,q)=>F-q),$.lastUpdated=b.created_at,$.topicStatus=`v${b.version} 已保存`,$.topicDirty=!1,$.topicHTML=j,$.includedQaIds=I);return}te(b.id),ne(b.version),X(b.version),W($=>[...$.filter(F=>F!==b.version),b.version].sort((F,q)=>F-q)),jt(b.created_at),U(null),Y(`v${b.version} 已保存`),Me(!1),fr(I)}catch(b){console.error("Save failed:",b),ie.current===g&&(Y("已生成(保存失败,请重试)"),ze("专题页保存失败"))}}catch(S){ie.current===g&&(Y("生成失败"),ze(`专题页生成失败: ${S.message}`)),console.error(S)}if(ie.current===g)Se(!1);else{const S=nt.current[g];S&&(S.loadingTopic=!1)}},Zo=async()=>{const g=e.id;Se(!0),Y("正在更新...");try{const S=await jr(g,C,O,Qo);if(!S.html||S.html.replace(/<[^>]*>/g,"").trim().length<50){ie.current===g&&Y("生成内容为空,请重试"),Se(!1);return}const j=vl(S.html),I=pc(C);if(ie.current!==g){const b=nt.current[g];b&&(b.loadingTopic=!1,b.topicHTML=j,b.topicStatus="已更新(后台完成)");try{await mn(g,j,C,Ye,I)}catch{}return}G(j);try{const b=await mn(g,j,C,Ye,I);if(ie.current!==g){const $=nt.current[g];$&&($.loadingTopic=!1,$.topicPageId=b.id,$.topicVersion=b.version,$.topicVersionCount=b.version,$.topicVersionList=[...($.topicVersionList||[]).filter(F=>F!==b.version),b.version].sort((F,q)=>F-q),$.lastUpdated=b.created_at,$.topicStatus=`v${b.version} 已保存`,$.topicDirty=!1,$.topicHTML=j,$.includedQaIds=I);return}te(b.id),ne(b.version),X(b.version),W($=>[...$.filter(F=>F!==b.version),b.version].sort((F,q)=>F-q)),jt(b.created_at),U(null),Y(`v${b.version} 已保存`),Me(!1),fr(I)}catch(b){console.error("Save failed:",b),ie.current===g&&(Y("已更新(保存失败,请重试)"),ze("专题页保存失败"))}}catch(S){ie.current===g&&(Y("更新失败"),ze(`专题页更新失败: ${S.message}`))}if(ie.current===g)Se(!1);else{const S=nt.current[g];S&&(S.loadingTopic=!1)}},Va=async g=>{if(g===re){U(null),Jo();return}try{const S=await Li(e.id,g);S&&(G(S.html),U(g),Y(`正在查看 v${g}`))}catch(S){console.error(S),ze("加载版本失败")}},fp=async g=>{try{await Ly(e.id,g);const j=((await dc(e.id)).pages||[]).map(I=>I.version).sort((I,b)=>I-b);if(W(j),j.length>0){const I=j[j.length-1];X(I),(g===re||_===g)&&(U(null),Jo())}else X(0),G(""),te(null),ne(0),U(null);Y(`v${g} 已删除`)}catch{ze("删除失败")}},pp=async(g,S)=>{try{const j=await Li(e.id,g),I=await Li(e.id,S);if(!j||!I){ze("版本加载失败");return}Se(!0),Y(`合并 v${g} 和 v${S} 中...`);const b=[...j.qa_history||[]];(I.qa_history||[]).forEach(J=>{b.some(ke=>ke.question===J.question)||b.push(J)});const F=(await jr(e.id,b,j.html,`请合并以下两个版本的专题页内容。版本1是基础,版本2有补充内容需要融入。保留两个版本中所有有价值的内容。
66
+
67
+ 版本2核心内容:
68
+ ${I.html.replace(/<[^>]*>/g," ").slice(0,3e3)}`,"merge")).html||"";if(F.replace(/<[^>]*>/g,"").trim().length<50){Y("合并生成内容为空,请重试"),Se(!1);return}G(F);const q=await mn(e.id,F,b,[]);te(q.id),ne(q.version),X(q.version),jt(q.created_at),U(null),Y(`v${q.version} 已保存(合并自 v${g}+v${S})`),Se(!1)}catch{ze("合并失败"),Se(!1)}},Qa=()=>{if(!hl.trim())return;const g=[...Ye,{id:Date.now(),text:hl.trim(),created:new Date().toISOString()}];Pn(g),Ko(""),ae&&fc(ae,g)},hp=g=>{const S=Ye.filter(j=>j.id!==g);Pn(S),ae&&fc(ae,S)};m.useEffect(()=>{const g=S=>{var j;((j=S.data)==null?void 0:j.type)==="inline-comment"&&(Vo(!0),Ko(`【针对: "${S.data.selectedText.slice(0,50)}"】`))};return window.addEventListener("message",g),()=>window.removeEventListener("message",g)},[]);const mp=async()=>{if(Ye.length){Se(!0),Y("根据批注更新中...");try{const g=Ye.map($=>$.text).join(`
69
+ `),j=(await jr(e.id,[],O,g,"annotation")).html||"";if(j.replace(/<[^>]*>/g,"").trim().length<100){Y("生成内容过短,未保存。请重试"),Se(!1);return}const I=vl(j);G(I);const b=await mn(e.id,I,C,[]);te(b.id),ne(b.version),X(b.version),W($=>[...$.filter(F=>F!==b.version),b.version].sort((F,q)=>F-q)),jt(b.created_at),U(null),Pn([]),Y(`v${b.version} 已保存(已应用批注)`),Me(!1)}catch{Y("应用批注失败"),ze("应用批注失败")}Se(!1)}},gp=()=>{const g=!tt;if(pl(g),Bt.current)try{const S=Bt.current.contentDocument||Bt.current.contentWindow.document;if(S.body.contentEditable=g?"true":"false",S.body.style.cursor=g?"text":"default",S.body.style.outline="none",g){const j=S.createElement("style");j.id="_edit_style",j.textContent=`
70
+ ._del_btn { display:none; position:absolute; top:4px; right:4px; background:#ea4335; color:#fff; border:none; border-radius:4px; padding:2px 8px; font-size:11px; cursor:pointer; z-index:9999; }
71
+ [data-edit-hover] { position:relative !important; outline: 1px dashed #34a85344 !important; }
72
+ [data-edit-hover]:hover { outline: 1px dashed #34a853 !important; }
73
+ [data-edit-hover]:hover > ._del_btn { display:block; }
74
+ `,S.head.appendChild(j),S.querySelectorAll('section, [class*="card"], [class*="section"], [class*="block"], [class*="chapter"], [class*="module"]').forEach(I=>{I.setAttribute("data-edit-hover","");const b=S.createElement("button");b.className="_del_btn",b.textContent="× 删除此区块",b.onclick=$=>{$.stopPropagation(),I.remove()},I.appendChild(b)}),S.querySelectorAll("[data-edit-hover]").length===0&&S.body.querySelectorAll(":scope > div").forEach(I=>{if(I.textContent.trim().length>20){I.setAttribute("data-edit-hover","");const b=S.createElement("button");b.className="_del_btn",b.textContent="× 删除此区块",b.onclick=$=>{$.stopPropagation(),I.remove()},I.appendChild(b)}})}else{const j=S.getElementById("_edit_style");j&&j.remove(),S.querySelectorAll("._del_btn").forEach(I=>I.remove()),S.querySelectorAll("[data-edit-hover]").forEach(I=>I.removeAttribute("data-edit-hover"))}}catch{}},yp=async()=>{const g=Bt.current;if(g)try{const S=g.contentDocument||g.contentWindow.document;S.querySelectorAll("._del_btn").forEach(q=>q.remove()),S.querySelectorAll("[data-edit-hover]").forEach(q=>q.removeAttribute("data-edit-hover"));const j=S.getElementById("_edit_style");j&&j.remove(),S.body.contentEditable="false";const b=("<!DOCTYPE html>"+S.documentElement.outerHTML).replace(/<script[\s\S]*?<\/script>/gi,"");if(b.replace(/<[^>]*>/g,"").trim().length<50){ze("编辑后内容过短,未保存");return}const $=vl(b);G($);const F=await mn(e.id,$,C,[]);te(F.id),ne(F.version),X(F.version),W(q=>[...q.filter(J=>J!==F.version),F.version].sort((J,ke)=>J-ke)),jt(F.created_at),U(null),Y(`v${F.version} 已保存(手工编辑)`),Me(!1),pl(!1)}catch{ze("保存失败")}},mr=g=>{hn({title:e.title,content:e.content,subject:e.subject,tags:[...e.tags||[]]}),pn(g),Yo("")},At=async()=>{Ma(!0);try{await qf(e.id,$e),pn(null),o&&o()}catch{ze("保存失败")}finally{Ma(!1)}},vp=async()=>{try{await Py(e.id),r()}catch{ze("删除失败")}},Ut=Ol.input,xp=g=>g?g.split(`
75
+ `).filter(Boolean).map((S,j)=>a.jsx("p",{style:{margin:"6px 0",lineHeight:1.8},children:S},j)):null;return a.jsxs("div",{style:{height:"100%",background:"#0f1117",display:"flex",flexDirection:"column",position:"relative"},children:[Ba&&a.jsx("div",{style:{position:"absolute",top:12,left:"50%",transform:"translateX(-50%)",zIndex:1e3,padding:"8px 20px",borderRadius:8,background:"#d32f2f",color:"#fff",fontSize:13,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:Ba}),a.jsxs("div",{style:{padding:"14px 24px",borderBottom:"1px solid #2a2d35",background:"#161822"},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[cr==="title"?a.jsx("input",{value:$e.title,onChange:g=>hn({...$e,title:g.target.value}),onBlur:At,onKeyDown:g=>{g.key==="Enter"&&At(),g.key==="Escape"&&pn(null)},autoFocus:!0,style:{...Ut,fontSize:20,fontWeight:600,flex:1}}):a.jsx("h2",{onClick:()=>mr("title"),style:{margin:0,fontSize:20,color:"#fff",flex:1,cursor:"pointer"},title:"点击编辑",children:e.title}),a.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",flexShrink:0},children:[a.jsx("button",{onClick:vp,style:{background:"#d32f2f22",border:"1px solid #d32f2f44",color:"#ef5350",borderRadius:6,cursor:"pointer",fontSize:11,padding:"4px 10px"},children:"删除"}),a.jsx("button",{onClick:n,style:{background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:22,padding:"0 4px"},children:"×"})]})]}),a.jsxs("div",{style:{fontSize:12,color:"#888",display:"flex",gap:6,flexWrap:"wrap",alignItems:"center"},children:[cr==="subject"?a.jsx("input",{value:$e.subject,onChange:g=>hn({...$e,subject:g.target.value}),onBlur:At,onKeyDown:g=>{g.key==="Enter"&&At(),g.key==="Escape"&&pn(null)},autoFocus:!0,style:{...Ut,width:120,fontSize:12,padding:"2px 8px"}}):e.subject&&a.jsx("span",{onClick:()=>mr("subject"),style:{background:"#2a2d45",padding:"2px 10px",borderRadius:10,cursor:"pointer"},title:"点击编辑",children:e.subject}),a.jsx("span",{style:{background:"#1c1f2e",padding:"2px 10px",borderRadius:10},children:e.created_date}),(e.tags||[]).map((g,S)=>a.jsxs("span",{style:{background:"#1c1f2e",padding:"2px 8px",borderRadius:10,fontSize:11,color:"#777"},children:["#",g]},S)),cr==="tags"?a.jsxs("div",{style:{display:"flex",gap:4,alignItems:"center",flexWrap:"wrap"},children:[($e.tags||[]).map((g,S)=>a.jsxs("span",{style:{background:"#2a2d45",padding:"2px 8px",borderRadius:10,fontSize:11,color:"#ccc",display:"inline-flex",alignItems:"center",gap:3},children:["#",g,a.jsx("span",{onClick:()=>hn({...$e,tags:$e.tags.filter((j,I)=>I!==S)}),style:{cursor:"pointer",color:"#e53935",fontSize:13,lineHeight:1,marginLeft:2},children:"×"})]},S)),a.jsx("input",{value:$a,onChange:g=>Yo(g.target.value),onKeyDown:g=>{if(g.key==="Enter"){const S=$a.trim();S&&!$e.tags.includes(S)&&hn({...$e,tags:[...$e.tags,S]}),Yo("")}g.key==="Escape"&&At()},autoFocus:!0,placeholder:"添加标签...",style:{...Ut,width:80,fontSize:11,padding:"2px 6px"}}),a.jsx("button",{onClick:At,style:{fontSize:10,color:"#34a853",background:"none",border:"none",cursor:"pointer"},children:"✓"})]}):a.jsx("span",{onClick:()=>mr("tags"),style:{fontSize:11,color:"#4285f4",cursor:"pointer"},children:"+标签"})]})]}),a.jsx("div",{style:{display:"flex",borderBottom:"1px solid #2a2d35",background:"#161822"},children:[{id:"topic",label:"📄 专题页"},{id:"explore",label:"🔍 探索更多"}].map(g=>a.jsxs("button",{onClick:()=>c(g.id),style:{flex:1,padding:"10px 4px",border:"none",cursor:"pointer",fontSize:13,background:u===g.id?"#2a2d45":"transparent",color:u===g.id?"#fff":"#777",borderBottom:u===g.id?"2px solid #4285f4":"2px solid transparent"},children:[g.label,g.id==="topic"&&re>0&&a.jsxs("span",{style:{fontSize:10,marginLeft:4,color:"#34a853"},children:["v",re]}),g.id==="explore"&&(()=>{const j=Lr(C).filter((I,b)=>!dr.includes(I._qid||`qa_${b}`)).length;return j>0?a.jsxs("span",{style:{fontSize:10,marginLeft:4,color:"#fbbc05"},children:["+",j]}):null})()]},g.id))}),hr&&a.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:"#888"},children:a.jsxs("div",{style:{textAlign:"center"},children:[a.jsx("div",{style:{fontSize:24,marginBottom:8},children:"⏳"}),a.jsx("div",{style:{fontSize:13},children:"加载中..."})]})}),!hr&&u==="topic"&&a.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[cr==="content"?a.jsxs("div",{style:{padding:"10px 16px",borderBottom:"1px solid #2a2d35"},children:[a.jsx("textarea",{value:$e.content,onChange:g=>hn({...$e,content:g.target.value}),rows:4,style:{...Ut,lineHeight:1.8,resize:"vertical"}}),a.jsxs("div",{style:{display:"flex",gap:6,marginTop:4},children:[a.jsx("button",{onClick:At,disabled:ml,style:{padding:"4px 12px",borderRadius:4,border:"none",background:"#34a853",color:"#fff",cursor:"pointer",fontSize:11},children:ml?"...":"保存"}),a.jsx("button",{onClick:()=>pn(null),style:{padding:"4px 12px",borderRadius:4,border:"none",background:"#666",color:"#fff",cursor:"pointer",fontSize:11},children:"取消"})]})]}):a.jsx("div",{onClick:()=>mr("content"),style:{fontSize:13,lineHeight:1.7,color:"#bbb",background:"#161822",padding:"10px 16px",borderBottom:"1px solid #2a2d35",cursor:"pointer",maxHeight:80,overflow:"hidden"},title:"点击编辑",children:e.content}),a.jsxs("div",{style:{padding:"6px 16px",borderBottom:"1px solid #2a2d35",display:"flex",justifyContent:"space-between",alignItems:"center",background:"#161822",flexWrap:"wrap",gap:4},children:[a.jsxs("div",{style:{fontSize:11,color:"#888",display:"flex",alignItems:"center",gap:8},children:[a.jsx("span",{children:fe||(V?"生成中...":"未生成")}),M.length>1&&a.jsxs("div",{style:{display:"flex",gap:2,alignItems:"center",flexWrap:"wrap"},children:[M.map(g=>a.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:1},children:[a.jsxs("button",{onClick:()=>A?(()=>{const S=z.includes(g)?z.filter(j=>j!==g):[...z,g].slice(-2);K(S)})():Va(g),style:{padding:"1px 6px",borderRadius:3,border:A&&z.includes(g)?"1px solid #fbbc05":"none",cursor:"pointer",fontSize:10,background:A?z.includes(g)?"#fbbc0533":"#1c1f2e":_===g||!_&&g===re?"#4285f4":"#1c1f2e",color:A?z.includes(g)?"#fbbc05":"#666":_===g||!_&&g===re?"#fff":"#666"},children:["v",g]}),!A&&(_===g||!_&&g===re)&&M.length>1&&a.jsx("button",{onClick:S=>{S.stopPropagation(),fp(g)},style:{padding:"0 3px",borderRadius:2,border:"none",cursor:"pointer",fontSize:9,background:"transparent",color:"#ea4335",lineHeight:1},title:`删除 v${g}`,children:"✕"})]},g)),a.jsx("button",{onClick:()=>{oe(!A),K([])},style:{padding:"1px 6px",borderRadius:3,border:"none",cursor:"pointer",fontSize:10,background:A?"#fbbc0533":"#1c1f2e",color:A?"#fbbc05":"#666"},children:A?"取消合并":"合并"}),A&&z.length===2&&a.jsxs("button",{onClick:()=>{pp(z[0],z[1]),oe(!1),K([])},disabled:V,style:{padding:"1px 8px",borderRadius:3,border:"none",cursor:"pointer",fontSize:10,background:"#34a85333",color:"#34a853"},children:["合并 v",z[0],"+v",z[1]]})]})]}),a.jsxs("div",{style:{display:"flex",gap:6},children:[a.jsxs("button",{onClick:()=>Vo(!ur),style:{padding:"3px 10px",borderRadius:4,border:"none",fontSize:11,cursor:"pointer",background:ur?"#fbbc0544":"#1c1f2e",color:ur?"#fbbc05":"#888"},children:[ur?"✎ 批注中":"✎ 添加批注",Ye.length>0&&a.jsxs("span",{style:{marginLeft:4,color:"#fbbc05"},children:["(",Ye.length,")"]})]}),Ye.length>0&&a.jsx("button",{onClick:mp,disabled:V,style:{padding:"3px 10px",borderRadius:4,border:"none",fontSize:11,cursor:V?"wait":"pointer",background:"#9c27b033",color:"#ce93d8"},children:"应用批注更新"}),O&&a.jsx("button",{onClick:()=>{Xf(O,`${e.title} - 专题页`,`${e.title}_专题页_v${re}.html`)},style:{padding:"3px 10px",borderRadius:4,border:"none",fontSize:11,cursor:"pointer",background:"#1c1f2e",color:"#888"},children:"📥 导出HTML"}),O&&!tt&&a.jsx("button",{onClick:gp,style:{padding:"3px 10px",borderRadius:4,border:"none",fontSize:11,cursor:"pointer",background:"#1c1f2e",color:"#888"},children:"✏️ 直接编辑"}),tt&&a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:yp,style:{padding:"3px 10px",borderRadius:4,border:"none",fontSize:11,cursor:"pointer",background:"#34a853",color:"#fff"},children:"💾 保存编辑"}),a.jsx("button",{onClick:()=>{pl(!1)},style:{padding:"3px 10px",borderRadius:4,border:"none",fontSize:11,cursor:"pointer",background:"#ea4335",color:"#fff"},children:"取消编辑"})]}),a.jsx("button",{onClick:fn?Zo:xl,disabled:V,style:{padding:"3px 10px",borderRadius:4,border:"none",fontSize:11,cursor:V?"default":"pointer",background:V?"#333":fn?"#4285f4":"#1c1f2e",color:V?"#666":fn?"#fff":"#888",opacity:V?.5:1},children:V?"更新中...":fn?"🔄 用新回答更新":"🔄 重新生成"})]})]}),tt&&a.jsx("div",{style:{padding:"6px 16px",background:"#34a85322",borderBottom:"1px solid #34a85344",fontSize:12,color:"#34a853",display:"flex",justifyContent:"space-between"},children:a.jsx("span",{children:'✏️ 编辑模式 — 直接在页面上点击并修改内容,完成后点击"保存编辑"'})}),_&&_!==re&&a.jsxs("div",{style:{padding:"6px 16px",background:"#fbbc0522",borderBottom:"1px solid #fbbc0544",fontSize:12,color:"#fbbc05",display:"flex",justifyContent:"space-between"},children:[a.jsxs("span",{children:["正在查看历史版本 v",_,"(最新为 v",re,")"]}),a.jsx("span",{onClick:()=>Va(re),style:{cursor:"pointer",textDecoration:"underline"},children:"返回最新版"})]}),ur&&a.jsxs("div",{style:{padding:"8px 16px",borderBottom:"1px solid #2a2d35",background:"#1a1c28"},children:[a.jsx("div",{style:{fontSize:11,color:"#fbbc05",marginBottom:6},children:'批注(输入修改建议,点击"应用批注更新"来更新专题页)'}),Ye.map(g=>a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:6,marginBottom:4,padding:"4px 8px",background:"#161822",borderRadius:6,borderLeft:"2px solid #fbbc05"},children:[a.jsx("span",{style:{flex:1,fontSize:12,color:"#ddd"},children:g.text}),a.jsx("span",{onClick:()=>hp(g.id),style:{color:"#666",cursor:"pointer",fontSize:14,flexShrink:0},children:"×"})]},g.id)),a.jsxs("div",{style:{display:"flex",gap:4,marginTop:4},children:[a.jsx("input",{value:hl,onChange:g=>Ko(g.target.value),onKeyDown:g=>{g.key==="Enter"&&Qa()},placeholder:"例如: 第二章需要扩充更多细节...",style:{...Ut,flex:1,fontSize:12}}),a.jsx("button",{onClick:Qa,disabled:!hl.trim(),style:{padding:"4px 10px",borderRadius:6,border:"none",background:"#fbbc05",color:"#000",cursor:"pointer",fontSize:12,flexShrink:0},children:"+"})]})]}),V&&!O?a.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:12,color:"#888"},children:[a.jsx("div",{style:{fontSize:36},children:"⏳"}),a.jsx("div",{style:{fontSize:14},children:"正在根据智能问题自动生成专题页面..."}),a.jsx("div",{style:{fontSize:12,color:"#666",maxWidth:400,textAlign:"center"},children:"系统会用AI生成的学习问题来构建专题页面,首次生成可能需要10-30秒"})]}):O?a.jsx("iframe",{srcDoc:O+`<script>
76
+ document.addEventListener('contextmenu', function(e) { e.preventDefault(); });
77
+ var _ann_text = '';
78
+ document.addEventListener('mouseup', function(e) {
79
+ setTimeout(function() {
80
+ var sel = window.getSelection();
81
+ var text = sel.toString().trim();
82
+ var old = document.getElementById('_ann_btn');
83
+ if (old) old.remove();
84
+ if (!text) return;
85
+ _ann_text = text;
86
+ var btn = document.createElement('div');
87
+ btn.id = '_ann_btn';
88
+ btn.textContent = '+ 添加批注';
89
+ btn.style.cssText = 'position:fixed;z-index:9999;padding:6px 14px;background:#fbbc05;color:#000;border-radius:6px;font-size:13px;cursor:pointer;box-shadow:0 2px 12px rgba(0,0,0,0.4);user-select:none;-webkit-user-select:none;';
90
+ var x = Math.min(e.clientX, window.innerWidth - 120);
91
+ var y = Math.max(e.clientY - 36, 4);
92
+ btn.style.left = x + 'px';
93
+ btn.style.top = y + 'px';
94
+ btn.onmousedown = function(ev) { ev.preventDefault(); ev.stopPropagation(); };
95
+ btn.onclick = function(ev) {
96
+ ev.stopPropagation();
97
+ window.parent.postMessage({ type: 'inline-comment', selectedText: _ann_text }, '*');
98
+ btn.remove();
99
+ };
100
+ document.body.appendChild(btn);
101
+ }, 10);
102
+ });
103
+ document.addEventListener('mousedown', function(e) {
104
+ if (e.target.id !== '_ann_btn') { var old = document.getElementById('_ann_btn'); if (old) old.remove(); }
105
+ });
106
+ <\/script>`,ref:Bt,onLoad:()=>{if(Bt.current){const g=Bt.current.contentDocument||Bt.current.contentWindow.document;tt&&(g.body.contentEditable="true",g.body.style.outline="none",g.body.style.cursor="text");const S=g.createElement("style");S.id="_sg_width_fix",S.textContent="body, .container, .content, main, article, .wrapper, .page { max-width: 100% !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; } body { padding: 16px 24px !important; box-sizing: border-box !important; } @media print { *, *::before, *::after { background: transparent !important; background-image: none !important; color: #000 !important; text-shadow: none !important; box-shadow: none !important; border-color: #ccc !important; } body { padding: 20px !important; } pre, code { background: #f5f5f5 !important; } pre, blockquote, table { page-break-inside: avoid; border: 1px solid #ccc !important; } img { max-width: 100% !important; } a { text-decoration: underline; } }",g.head.appendChild(S)}},style:{flex:1,border:tt?"2px solid #34a853":"none",background:"#0f1117"},title:"知识专题"}):a.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:12,color:"#666"},children:[a.jsx("div",{style:{fontSize:48},children:"📄"}),Lr(C).length>0?a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{fontSize:14},children:"尚未生成专题页"}),a.jsx("input",{value:Qo,onChange:g=>ep(g.target.value),placeholder:"输入你对专题页的要求(可选,如:重点讲解背景原因)",style:{width:360,padding:"8px 12px",borderRadius:6,border:"1px solid #2a2d45",background:"#1c1f2e",color:"#ddd",fontSize:12,outline:"none",fontFamily:"inherit",textAlign:"center"}}),a.jsx("button",{onClick:xl,disabled:V,style:{padding:"8px 20px",borderRadius:8,border:"none",background:"#4285f4",color:"#fff",cursor:"pointer",fontSize:14},children:V?"生成中...":"生成专题页"})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{fontSize:14,marginBottom:4},children:"选择一种方式来定制你的专题页"}),a.jsxs("div",{style:{display:"flex",gap:12,flexWrap:"wrap",justifyContent:"center"},children:[a.jsxs("div",{onClick:()=>c("explore"),style:{width:200,padding:"16px",borderRadius:10,border:"1px solid #34a85344",background:"#34a85311",cursor:"pointer",textAlign:"center"},children:[a.jsx("div",{style:{fontSize:28,marginBottom:8},children:"🔍"}),a.jsx("div",{style:{fontSize:14,color:"#34a853",fontWeight:600,marginBottom:4},children:"智能问答探索"}),a.jsx("div",{style:{fontSize:11,color:"#888"},children:"AI生成问题,逐个回答后生成专题页"})]}),a.jsxs("div",{onClick:()=>de(!0),style:{width:200,padding:"16px",borderRadius:10,border:"1px solid #fbbc0544",background:"#fbbc0511",cursor:"pointer",textAlign:"center"},children:[a.jsx("div",{style:{fontSize:28,marginBottom:8},children:"✏️"}),a.jsx("div",{style:{fontSize:14,color:"#fbbc05",fontWeight:600,marginBottom:4},children:"手工输入需求"}),a.jsx("div",{style:{fontSize:11,color:"#888"},children:"输入你的学习需求,直接生成专题页"})]})]}),Q&&a.jsxs("div",{style:{marginTop:16,width:"100%",maxWidth:420},children:[a.jsx("textarea",{value:Ft,onChange:g=>Ke(g.target.value),placeholder:"描述你的学习需求,例如:我想重点了解王安石变法的背景和各项具体政策的内容...",style:{...Ol.input,minHeight:80,resize:"vertical",marginBottom:8}}),a.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"center"},children:[a.jsx("button",{onClick:()=>{de(!1),Ke("")},style:Ol.btnCancel,children:"取消"}),a.jsx("button",{disabled:!Ft.trim()||V,onClick:async()=>{Se(!0),Y("生成中...");try{const g=await jr(e.id,[],"",Ft.trim());if(g.html&&g.html.replace(/<[^>]*>/g,"").trim().length>=50){G(g.html);const S=await mn(e.id,g.html,[],[],[]);te(S.id),ne(S.version),X(S.version),W(j=>[...j,S.version]),jt(S.created_at),Y(`v${S.version} 已保存`),Me(!1),de(!1),Ke("")}else Y("生成内容为空,请重试")}catch{ze("生成失败")}Se(!1)},style:Ol.btnPrimary,children:V?"生成中...":"生成专题页"})]})]})]})]})]}),!hr&&u==="explore"&&a.jsxs("div",{ref:pr,style:{flex:1,overflowY:"auto",padding:"16px 24px"},children:[cr==="content"?a.jsxs("div",{style:{marginBottom:16},children:[a.jsx("textarea",{value:$e.content,onChange:g=>hn({...$e,content:g.target.value}),rows:6,style:{...Ut,lineHeight:1.8,resize:"vertical"}}),a.jsxs("div",{style:{display:"flex",gap:6,marginTop:4},children:[a.jsx("button",{onClick:At,disabled:ml,style:{padding:"4px 12px",borderRadius:4,border:"none",background:"#34a853",color:"#fff",cursor:"pointer",fontSize:11},children:ml?"...":"保存"}),a.jsx("button",{onClick:()=>pn(null),style:{padding:"4px 12px",borderRadius:4,border:"none",background:"#666",color:"#fff",cursor:"pointer",fontSize:11},children:"取消"})]})]}):a.jsx("div",{onClick:()=>mr("content"),style:{fontSize:14,lineHeight:1.8,color:"#ddd",background:"#161822",padding:"14px 16px",borderRadius:8,marginBottom:16,border:"1px solid #2a2d35",cursor:"pointer"},title:"点击编辑",children:e.content}),(()=>{const g=Lr(C);if(g.length===0)return null;const S={};g.forEach((I,b)=>{var F;const $=I.category||((F=d.find(q=>q.question===I.question))==null?void 0:F.category)||"其他";S[$]||(S[$]=[]),S[$].push({...I,idx:b})});const j=g.filter((I,b)=>{const $=I._qid||`qa_${b}`;return!dr.includes($)}).length;return a.jsxs("div",{style:{marginBottom:16},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[a.jsxs("span",{style:{fontSize:14,fontWeight:600,color:"#fff"},children:[g.length," 个已回答问题"]}),O&&j>0&&a.jsx("button",{onClick:Zo,disabled:V,style:{padding:"4px 12px",borderRadius:6,border:"none",fontSize:12,background:"#9c27b033",color:"#ce93d8",cursor:V?"wait":"pointer"},children:V?"更新中...":`更新专题页 (+${j}个新回答)`}),!O&&a.jsx("button",{onClick:xl,disabled:V,style:{padding:"4px 12px",borderRadius:6,border:"none",fontSize:12,background:"#34a85333",color:"#34a853",cursor:V?"wait":"pointer"},children:V?"生成中...":"生成专题页"})]}),Object.entries(S).map(([I,b])=>{const $=tp.has(I);return a.jsxs("div",{style:{marginBottom:8},children:[a.jsxs("div",{onClick:()=>Oa(F=>{const q=new Set(F);return $?q.delete(I):q.add(I),q}),style:{display:"flex",alignItems:"center",gap:6,padding:"6px 10px",borderRadius:6,background:"#161822",cursor:"pointer",borderLeft:`3px solid ${Rr[I]||"#666"}`},children:[a.jsx("span",{style:{fontSize:12,color:"#888",transform:$?"rotate(-90deg)":"rotate(0)",transition:"transform 0.2s"},children:"▼"}),a.jsx("span",{style:{fontSize:13,fontWeight:500,color:Rr[I]||"#aaa"},children:I}),a.jsxs("span",{style:{fontSize:11,color:"#666"},children:["(",b.length,")"]})]}),!$&&b.map(F=>a.jsxs("div",{style:{marginLeft:16,marginTop:6},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:3},children:[a.jsxs("div",{style:{fontSize:13,color:"#4285f4",fontWeight:500},children:["Q: ",F.question]}),a.jsxs("div",{style:{display:"flex",gap:4},children:[a.jsx("span",{onClick:()=>{qo(F.idx),gl(F.answer)},title:"手动编辑答案",style:{fontSize:12,cursor:"pointer",color:"#888",padding:"2px 6px",borderRadius:4,background:"#1c1f2e"},children:"✏️"}),a.jsx("span",{onClick:()=>up(F.idx),title:"AI重新生成答案",style:{fontSize:12,cursor:D?"not-allowed":"pointer",color:"#888",padding:"2px 6px",borderRadius:4,background:"#1c1f2e",opacity:D?.4:1},children:"🔄"}),a.jsx("span",{onClick:()=>{const q=C.filter((J,ke)=>ke!==F.idx);L(q),Me(!0),ae&&Dy(ae,q),Ln(q)},title:"删除此问答",style:{fontSize:12,cursor:"pointer",color:"#ea4335",padding:"2px 6px",borderRadius:4,background:"#1c1f2e"},children:"🗑"})]})]}),np===F.idx?a.jsxs("div",{children:[a.jsx("textarea",{value:Fa,onChange:q=>gl(q.target.value),style:{width:"100%",minHeight:120,padding:"8px 12px",borderRadius:6,border:"1px solid #4285f4",background:"#1a1c28",color:"#ddd",fontSize:13,fontFamily:"inherit",resize:"vertical",outline:"none",boxSizing:"border-box"}}),a.jsxs("div",{style:{display:"flex",gap:6,marginTop:4},children:[a.jsx("button",{onClick:()=>cp(F.idx),style:{padding:"4px 12px",borderRadius:4,border:"none",background:"#34a853",color:"#fff",fontSize:12,cursor:"pointer"},children:"保存"}),a.jsx("button",{onClick:()=>{qo(null),gl("")},style:{padding:"4px 12px",borderRadius:4,border:"none",background:"#333",color:"#aaa",fontSize:12,cursor:"pointer"},children:"取消"})]})]}):a.jsx("div",{style:{fontSize:13,color:"#ccc",background:"#1a1c28",padding:"8px 12px",borderRadius:6,border:"1px solid #2a2d35"},children:xp(F.answer)})]},F.idx))]},I)})]})})(),a.jsxs("div",{style:{marginBottom:16},children:[a.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:10},children:[a.jsx("span",{style:{fontSize:14,fontWeight:600,color:"#fff"},children:"💡 深入学习"}),a.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[d.length>0&&a.jsx("span",{onClick:()=>{const g=Ni(d,C),S=g.every(j=>y.has(j.id));x(S?new Set:new Set(g.map(j=>j.id)))},style:{fontSize:11,color:"#4285f4",cursor:"pointer"},children:Ni(d,C).every(g=>y.has(g.id))?"取消全选":"全选"}),!k&&a.jsx("span",{onClick:()=>{delete Go.current[e.id],Ua()},style:{fontSize:11,color:"#4285f4",cursor:"pointer"},children:"重新生成问题"})]})]}),k?a.jsx("div",{style:{fontSize:12,color:"#888",padding:8},children:"正在生成智能问题..."}):d.length===0?a.jsx("button",{onClick:Ua,style:{width:"100%",padding:"10px",borderRadius:6,border:"1px dashed #4285f444",background:"#4285f411",color:"#4285f4",cursor:"pointer",fontSize:13},children:"💡 生成智能问题"}):a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4},children:(()=>{const g=Ni(d,C);return g.length===0?a.jsxs("div",{style:{padding:12,textAlign:"center",color:"#666",fontSize:12},children:["所有问题已回答完毕!",O?Lr(C).filter((S,j)=>!dr.includes(S._qid||`qa_${j}`)).length>0?a.jsx("button",{onClick:Zo,disabled:V,style:{marginTop:8,display:"block",width:"100%",padding:"8px",borderRadius:6,border:"none",fontSize:13,background:"#9c27b033",color:"#ce93d8",cursor:V?"wait":"pointer"},children:V?"更新中...":"用新回答更新专题页"}):a.jsx("span",{children:" 点击「重新生成问题」获取新一批问题,或在下方添加自定义问题。"}):a.jsx("button",{onClick:xl,disabled:V,style:{marginTop:8,display:"block",width:"100%",padding:"8px",borderRadius:6,border:"none",fontSize:13,background:"#34a85333",color:"#34a853",cursor:V?"wait":"pointer"},children:V?"生成中...":"根据回答生成专题页"})]}):g.map(S=>a.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:6},children:[a.jsx("input",{type:"checkbox",checked:y.has(S.id),onChange:()=>ip(S.id),style:{marginTop:10,accentColor:Rr[S.category]||"#4285f4",flexShrink:0}}),R===S.id?a.jsxs("div",{style:{flex:1,display:"flex",gap:4},children:[a.jsx("input",{value:h,onChange:j=>v(j.target.value),onKeyDown:j=>{j.key==="Enter"&&Wa(S.id),j.key==="Escape"&&p(null)},autoFocus:!0,style:{...Ut,flex:1}}),a.jsx("button",{onClick:()=>Wa(S.id),style:{padding:"4px 8px",borderRadius:4,border:"none",background:"#34a853",color:"#fff",cursor:"pointer",fontSize:11},children:"✓"}),a.jsx("button",{onClick:()=>p(null),style:{padding:"4px 8px",borderRadius:4,border:"none",background:"#666",color:"#fff",cursor:"pointer",fontSize:11},children:"✕"})]}):a.jsxs("div",{style:{flex:1,padding:"8px 12px",borderRadius:8,cursor:"pointer",background:"#161822",borderLeft:`3px solid ${Rr[S.category]||"#666"}`,transition:"background 0.15s",position:"relative"},onClick:()=>ap(S.question),onMouseEnter:j=>j.currentTarget.style.background="#1c2030",onMouseLeave:j=>j.currentTarget.style.background="#161822",children:[a.jsx("div",{style:{fontSize:13,color:S.answered?"#888":"#ddd",paddingRight:40},children:S.question}),a.jsx("span",{style:{fontSize:10,color:Rr[S.category]||"#888"},children:S.category}),S.answered&&a.jsx("span",{style:{fontSize:10,color:"#34a853",marginLeft:6},children:"✓ 已回答"}),a.jsxs("div",{style:{position:"absolute",right:8,top:8,display:"flex",gap:4},onClick:j=>j.stopPropagation(),children:[a.jsx("span",{onClick:()=>{p(S.id),v(S.question)},style:{fontSize:11,color:"#666",cursor:"pointer"},children:"✎"}),a.jsx("span",{onClick:()=>sp(S.id),style:{fontSize:11,color:"#666",cursor:"pointer"},children:"×"})]})]})]},S.id))})()}),y.size>0&&a.jsx("button",{onClick:dp,disabled:D,style:{marginTop:8,width:"100%",padding:"8px",borderRadius:6,border:"1px solid #4285f444",background:"#4285f422",color:"#4285f4",cursor:D?"wait":"pointer",fontSize:12},children:D?"正在逐个提问...":`批量提问选中的 ${y.size} 个问题`})]}),a.jsxs("div",{style:{display:"flex",gap:6,marginBottom:16},children:[a.jsx("input",{value:E,onChange:g=>P(g.target.value),onKeyDown:g=>{g.key==="Enter"&&Ha()},placeholder:"添加自定义问题到列表...",style:{...Ut,flex:1}}),a.jsx("button",{onClick:Ha,disabled:!E.trim(),style:{padding:"8px 14px",borderRadius:6,border:"none",cursor:E.trim()?"pointer":"default",background:"#34a853",color:"#fff",fontSize:13,flexShrink:0,opacity:E.trim()?1:.5},children:"+添加"})]}),C.filter(g=>g.loading).map((g,S)=>a.jsxs("div",{style:{marginBottom:14},children:[a.jsxs("div",{style:{fontSize:13,color:"#4285f4",fontWeight:500,marginBottom:4},children:["❓ ",g.question]}),a.jsx("div",{style:{fontSize:12,color:"#888",padding:8},children:"AI 正在思考..."})]},`loading_${S}`)),!e.parent_id&&a.jsx("div",{style:{marginTop:16,padding:"12px 16px",background:"#161822",borderRadius:8,border:"1px solid #2a2d35"},children:a.jsx("button",{onClick:()=>s(`/deep/${e.id}`),style:{width:"100%",padding:"10px",borderRadius:8,border:"1px solid #9c27b044",background:"#9c27b022",color:"#ce93d8",cursor:"pointer",fontSize:13,fontWeight:500},children:"🔬 深入分析 — 分解子主题并逐个探索"})})]})]})}const Ii=[{key:"analyzePrompt",label:"知识提取 Prompt"},{key:"questionsPrompt",label:"智能提问 Prompt"},{key:"topicPrompt",label:"专题页 Prompt"},{key:"qaPrompt",label:"问答 Prompt"}];function Yy({onClose:e,firstRun:t}){const[n,r]=m.useState({subjects:{},defaultPrompts:{}}),[l,o]=m.useState(!1),[i,s]=m.useState(!1),[u,c]=m.useState(""),[d,f]=m.useState(null),[y,x]=m.useState(!1),[k,w]=m.useState(!1),[R,p]=m.useState(null),[h,v]=m.useState(!!t),[E,P]=m.useState(!1),[C,L]=m.useState(!1),[D,H]=m.useState({}),O=m.useRef(null),G=m.useRef(null);m.useEffect(()=>{_y().then(z=>{r(z),G.current=JSON.stringify(z)}),Yf().then(z=>{p(z),O.current=JSON.stringify(z)})},[]);const ae=Object.keys(n.subjects),te=n.defaultPrompts||{},re=z=>{r(K=>{const Q=typeof z=="function"?z(K):z;return s(JSON.stringify(Q)!==G.current),Q})},ne=async()=>{o(!0),await Oy(n),G.current=JSON.stringify(n),s(!1),o(!1)},T=z=>{p(K=>{const Q=typeof z=="function"?z(K):z;return P(JSON.stringify(Q)!==O.current),Q})},X=async()=>{L(!0),await Fy(R),O.current=JSON.stringify(R),P(!1),L(!1)},M=async z=>{H(Q=>({...Q,[z]:{testing:!0}}));const K=await By(z);H(Q=>({...Q,[z]:K}))},W=()=>{const z=u.trim();if(!z||n.subjects[z])return;const K={};for(const Q of Ii)te[Q.key]&&(K[Q.key]=te[Q.key]);re(Q=>({...Q,subjects:{...Q.subjects,[z]:K}})),c(""),f(z)},_=z=>{re(K=>{const{[z]:Q,...de}=K.subjects;return{...K,subjects:de}}),d===z&&f(null)},U=(z,K,Q)=>{re(de=>({...de,subjects:{...de.subjects,[z]:{...de.subjects[z],[K]:Q}}}))},A=(z,K)=>{re(Q=>({...Q,defaultPrompts:{...Q.defaultPrompts,[z]:K}}))},oe={width:"100%",padding:"8px 10px",borderRadius:6,border:"1px solid #2a2d45",background:"#1c1f2e",color:"#ddd",fontSize:12,fontFamily:"inherit",resize:"vertical",outline:"none",boxSizing:"border-box"};return a.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",background:"#0f1117"},children:[a.jsxs("div",{style:{padding:"16px 24px",borderBottom:"1px solid #2a2d35",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[a.jsx("h2",{style:{margin:0,fontSize:18,color:"#fff"},children:"⚙️ 设置"}),a.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[i&&a.jsx("span",{style:{fontSize:11,color:"#fbbc05"},children:"有未保存的修改"}),a.jsx("button",{onClick:ne,disabled:l||!i,style:{padding:"6px 16px",borderRadius:6,border:"none",cursor:i?"pointer":"default",background:i?"#34a853":"#2a2d35",color:i?"#fff":"#666",fontSize:13,opacity:l?.6:1},children:l?"保存中...":"保存"}),a.jsx("button",{onClick:e,style:{padding:"6px 16px",borderRadius:6,border:"none",cursor:"pointer",background:"#4285f4",color:"#fff",fontSize:13},children:"← 返回"})]})]}),a.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"16px 24px"},children:[t&&a.jsx("div",{style:{padding:"12px 16px",marginBottom:16,borderRadius:8,background:"#4285f415",border:"1px solid #4285f440",color:"#8ab4f8",fontSize:13},children:"👋 欢迎使用 StudyLens!请先配置 AI 模型才能使用智能功能。展开下方「LLM 模型配置」,启用并测试至少一个 Provider。"}),R&&a.jsxs("div",{style:{marginBottom:20,borderRadius:8,border:"1px solid #2a2d35",background:"#161822"},children:[a.jsxs("div",{onClick:()=>v(!h),style:{padding:"12px 14px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[a.jsxs("span",{style:{fontSize:14,fontWeight:600,color:"#fff"},children:[h?"▼":"▶"," LLM 模型配置"]}),E&&a.jsx("span",{style:{fontSize:11,color:"#fbbc05"},children:"未保存"})]}),h&&a.jsxs("div",{style:{padding:"0 14px 14px"},children:[a.jsxs("div",{style:{marginBottom:12},children:[a.jsx("label",{style:{fontSize:12,color:"#999",display:"block",marginBottom:4},children:"默认模式"}),a.jsxs("select",{value:R.defaultProvider||"auto",onChange:z=>T(K=>({...K,defaultProvider:z.target.value})),style:{...oe,cursor:"pointer"},children:[a.jsx("option",{value:"auto",children:"自动检测 (推荐)"}),Object.keys(R.providers||{}).map(z=>a.jsx("option",{value:z,children:z},z))]})]}),Object.entries(R.providers||{}).map(([z,K])=>{var de,Ft;const Q=z==="agent-maestro"?"通过 VS Code Copilot 免费使用(需 Agent Maestro 扩展)":z==="openai-compatible"?"使用 OpenAI 或兼容 API(需要 API Key)":z==="ollama"?"本地免费模型(需安装 Ollama)":"";return a.jsxs("div",{style:{marginBottom:12,padding:10,borderRadius:6,border:"1px solid #2a2d45",background:"#1a1d2e"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4},children:[a.jsx("span",{style:{fontSize:13,fontWeight:500,color:"#ddd"},children:z}),a.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[a.jsxs("label",{style:{fontSize:11,color:"#999",display:"flex",alignItems:"center",gap:4},children:[a.jsx("input",{type:"checkbox",checked:K.enabled!==!1,onChange:Ke=>T(V=>({...V,providers:{...V.providers,[z]:{...V.providers[z],enabled:Ke.target.checked}}}))}),"启用"]}),a.jsx("button",{onClick:()=>M(z),disabled:(de=D[z])==null?void 0:de.testing,style:{padding:"2px 8px",borderRadius:4,border:"none",cursor:"pointer",background:"#4285f420",color:"#4285f4",fontSize:11},children:(Ft=D[z])!=null&&Ft.testing?"测试中...":"测试"})]})]}),Q&&a.jsx("div",{style:{fontSize:11,color:"#666",marginBottom:8},children:Q}),D[z]&&!D[z].testing&&a.jsx("div",{style:{fontSize:11,padding:"4px 8px",borderRadius:4,marginBottom:6,background:D[z].ok?"#34a85320":"#ea433520",color:D[z].ok?"#34a853":"#ea4335"},children:D[z].message}),a.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[a.jsxs("div",{children:[a.jsx("label",{style:{fontSize:11,color:"#777"},children:"Base URL"}),a.jsx("input",{value:K.baseUrl||"",onChange:Ke=>T(V=>({...V,providers:{...V.providers,[z]:{...V.providers[z],baseUrl:Ke.target.value}}})),style:{...oe,fontSize:11}})]}),a.jsxs("div",{children:[a.jsx("label",{style:{fontSize:11,color:"#777"},children:"模型"}),a.jsx("input",{value:K.model||"",onChange:Ke=>T(V=>({...V,providers:{...V.providers,[z]:{...V.providers[z],model:Ke.target.value}}})),style:{...oe,fontSize:11}})]})]}),z==="openai-compatible"&&a.jsxs("div",{style:{marginTop:6},children:[a.jsx("label",{style:{fontSize:11,color:"#777"},children:"API Key"}),a.jsx("input",{type:"password",value:K.apiKey||"",onChange:Ke=>T(V=>({...V,providers:{...V.providers,[z]:{...V.providers[z],apiKey:Ke.target.value}}})),style:{...oe,fontSize:11}})]})]},z)}),a.jsxs("div",{style:{marginTop:12},children:[a.jsx("label",{style:{fontSize:12,color:"#999",display:"block",marginBottom:6},children:"任务路由"}),a.jsx("p",{style:{fontSize:11,color:"#666",marginBottom:8},children:"指定每种任务使用哪个 Provider(default = 使用默认模式)"}),Object.entries(R.taskRouting||{}).map(([z,K])=>a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[a.jsx("span",{style:{fontSize:12,color:"#aaa",width:80},children:z}),a.jsxs("select",{value:K||"default",onChange:Q=>T(de=>({...de,taskRouting:{...de.taskRouting,[z]:Q.target.value}})),style:{...oe,flex:1,fontSize:11,cursor:"pointer"},children:[a.jsx("option",{value:"default",children:"default(跟随默认模式)"}),Object.keys(R.providers||{}).map(Q=>a.jsx("option",{value:Q,children:Q},Q))]})]},z))]}),a.jsx("button",{onClick:X,disabled:C||!E,style:{marginTop:12,padding:"6px 16px",borderRadius:6,border:"none",cursor:E?"pointer":"default",background:E?"#34a853":"#2a2d35",color:E?"#fff":"#666",fontSize:12},children:C?"保存中...":"保存 LLM 配置"})]})]}),a.jsxs("div",{style:{marginBottom:20,borderRadius:8,border:"1px solid #2a2d35",background:"#161822"},children:[a.jsxs("div",{onClick:()=>x(!y),style:{padding:"12px 14px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[a.jsxs("span",{style:{fontSize:14,fontWeight:600,color:"#fff"},children:[y?"▼":"▶"," Prompt 配置"]}),i&&a.jsx("span",{style:{fontSize:11,color:"#fbbc05"},children:"未保存"})]}),y&&a.jsxs("div",{style:{padding:"0 14px 14px"},children:[a.jsxs("div",{style:{marginBottom:16,borderRadius:6,border:"1px solid #2a2d45",background:"#1a1d2e"},children:[a.jsx("div",{onClick:()=>w(!k),style:{padding:"10px 12px",cursor:"pointer",display:"flex",alignItems:"center"},children:a.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"#ddd"},children:[k?"▼":"▶"," 默认 Prompt(所有学科通用)"]})}),k&&a.jsxs("div",{style:{padding:"0 12px 12px"},children:[a.jsx("p",{style:{fontSize:11,color:"#666",marginBottom:10},children:"这些是系统默认的 AI 提示词。修改后将影响所有未单独配置的学科。"}),Ii.map(z=>a.jsxs("div",{style:{marginBottom:12},children:[a.jsx("label",{style:{fontSize:12,color:"#999",display:"block",marginBottom:4},children:z.label}),a.jsx("textarea",{value:te[z.key]||"",onChange:K=>A(z.key,K.target.value),rows:8,style:oe})]},z.key))]})]}),a.jsx("h4",{style:{fontSize:13,color:"#ccc",marginBottom:8},children:"学科专属配置"}),a.jsx("p",{style:{fontSize:11,color:"#666",marginBottom:12},children:"添加学科后会自动填入默认提示词,你只需针对该学科做定制修改。留空则使用默认值。"}),a.jsxs("div",{style:{display:"flex",gap:8,marginBottom:16},children:[a.jsx("input",{value:u,onChange:z=>c(z.target.value),onKeyDown:z=>z.key==="Enter"&&W(),placeholder:"添加学科(如:生物、英语、地理)",style:{...oe,flex:1}}),a.jsx("button",{onClick:W,style:{padding:"8px 16px",borderRadius:6,border:"none",cursor:"pointer",background:"#4285f4",color:"#fff",fontSize:12,whiteSpace:"nowrap"},children:"+ 添加"})]}),ae.length===0&&a.jsx("div",{style:{padding:20,textAlign:"center",color:"#555",fontSize:13},children:"暂无学科配置。添加学科后,可为每个学科定制 AI 提示词。"}),ae.map(z=>a.jsxs("div",{style:{marginBottom:8,borderRadius:6,border:"1px solid #2a2d45",background:"#1a1d2e"},children:[a.jsxs("div",{onClick:()=>f(d===z?null:z),style:{padding:"10px 12px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[a.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"#ddd"},children:[d===z?"▼":"▶"," ",z]}),a.jsx("button",{onClick:K=>{K.stopPropagation(),_(z)},style:{padding:"2px 8px",borderRadius:4,border:"none",cursor:"pointer",background:"#ea433520",color:"#ea4335",fontSize:11},children:"删除"})]}),d===z&&a.jsx("div",{style:{padding:"0 12px 12px"},children:Ii.map(K=>{var Q;return a.jsxs("div",{style:{marginBottom:12},children:[a.jsx("label",{style:{fontSize:12,color:"#999",display:"block",marginBottom:4},children:K.label}),a.jsx("textarea",{value:((Q=n.subjects[z])==null?void 0:Q[K.key])||"",onChange:de=>U(z,K.key,de.target.value),placeholder:te[K.key]||"",rows:4,style:oe})]},K.key)})})]},z)),a.jsx("button",{onClick:ne,disabled:l||!i,style:{marginTop:12,padding:"6px 16px",borderRadius:6,border:"none",cursor:i?"pointer":"default",background:i?"#34a853":"#2a2d35",color:i?"#fff":"#666",fontSize:12},children:l?"保存中...":"保存 Prompt 配置"})]})]})]})]})}const qy=[{id:"timeline",label:"📅 时间线"},{id:"category",label:"📂 分类"}];function Gy(){const e=Wo(),t=m.useRef(window.__sg_entry_cache||{}),[n,r]=m.useState([]),[l,o]=m.useState(null),i=m.useRef(null),[s,u]=m.useState(!1),[c,d]=m.useState(360),[f,y]=m.useState(!1),[x,k]=m.useState(()=>{try{return JSON.parse(sessionStorage.getItem("sg_filterDiscipline"))}catch{return null}}),[w,R]=m.useState(()=>{try{return JSON.parse(sessionStorage.getItem("sg_filterSubCategory"))}catch{return null}}),[p,h]=m.useState(()=>sessionStorage.getItem("sg_viewMode")||"category"),[v,E]=m.useState(""),[P,C]=m.useState(!1),[L,D]=m.useState(!1),H=m.useRef(sessionStorage.getItem("sg_selectedEntryId"));m.useEffect(()=>{window.__sg_entry_cache=t.current},[]),m.useEffect(()=>{Yf().then(T=>{const X=(T==null?void 0:T.providers)||{};Object.values(X).some(W=>W.enabled&&(W.apiKey||W.baseUrl!=="http://localhost:23333/api/anthropic"))||(C(!0),D(!0))}).catch(()=>{})},[]);const O=m.useCallback(async()=>{const{entries:T}=await Ry();if(r(T),H.current){const X=T.find(M=>M.id===H.current);X&&(o(X),i.current=X.id),H.current=null}else if(i.current){const X=T.find(M=>M.id===i.current);X&&o(X)}},[]);m.useEffect(()=>{O()},[O]),m.useEffect(()=>{sessionStorage.setItem("sg_filterDiscipline",JSON.stringify(x))},[x]),m.useEffect(()=>{sessionStorage.setItem("sg_filterSubCategory",JSON.stringify(w))},[w]),m.useEffect(()=>{sessionStorage.setItem("sg_viewMode",p)},[p]),m.useEffect(()=>{sessionStorage.setItem("sg_selectedEntryId",(l==null?void 0:l.id)||"")},[l]),m.useEffect(()=>{if(!f)return;const T=M=>d(Math.max(280,Math.min(500,M.clientX))),X=()=>y(!1);return window.addEventListener("mousemove",T),window.addEventListener("mouseup",X),()=>{window.removeEventListener("mousemove",T),window.removeEventListener("mouseup",X)}},[f]);const G=[...new Set(n.map(T=>T.subject).filter(Boolean))],ae=[...new Set(G.map(T=>T.split("-")[0]))],te=x?[...new Set(G.filter(T=>T.startsWith(x+"-")).map(T=>T.split("-").slice(1).join("-")))]:[],re=T=>{o(T),i.current=(T==null?void 0:T.id)||null},ne=n.filter(T=>{if(x&&(!T.subject||!T.subject.startsWith(x)||w&&T.subject!==x+"-"+w))return!1;if(v){const X=v.toLowerCase();return(T.title+T.content+(T.tags||[]).join(" ")+T.subject).toLowerCase().includes(X)}return!0});return a.jsxs("div",{style:{display:"flex",height:"100vh",fontFamily:"system-ui, -apple-system, sans-serif",background:"#0f1117",color:"#e0e0e0",overflow:"hidden"},children:[a.jsxs("div",{style:{width:c,minWidth:280,borderRight:"1px solid #2a2d35",display:"flex",flexDirection:"column",background:"#161822",flexShrink:0},children:[a.jsx("div",{style:{padding:"12px 16px",borderBottom:"1px solid #2a2d35"},children:a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[a.jsx("h1",{style:{margin:0,fontSize:18,color:"#fff"},children:"📚 StudyLens"}),a.jsx("button",{"data-testid":"settings-btn",onClick:()=>C(!P),style:{padding:"4px 8px",borderRadius:4,border:"none",cursor:"pointer",fontSize:14,background:P?"#4285f4":"#1c1f2e",color:P?"#fff":"#888"},children:"⚙️"})]})}),a.jsx(Vy,{onIngested:O,loading:s,setLoading:u}),a.jsxs("div",{style:{padding:"6px 12px",borderBottom:"1px solid #2a2d35",display:"flex",gap:4,alignItems:"center"},children:[qy.map(T=>a.jsx("button",{onClick:()=>h(T.id),style:{padding:"5px 10px",borderRadius:6,border:"none",cursor:"pointer",fontSize:12,background:p===T.id?"#4285f4":"#1c1f2e",color:p===T.id?"#fff":"#aaa"},children:T.label},T.id)),a.jsx("input",{value:v,onChange:T=>E(T.target.value),placeholder:"🔍 搜索...",style:{flex:1,padding:"5px 10px",borderRadius:6,border:"1px solid #2a2d45",background:"#1c1f2e",color:"#ddd",fontSize:12,outline:"none",fontFamily:"inherit",minWidth:0}})]}),ae.length>0&&a.jsxs("div",{style:{padding:"6px 12px",borderBottom:"1px solid #2a2d35",display:"flex",flexWrap:"wrap",gap:3},children:[a.jsx("span",{onClick:()=>{k(null),R(null)},style:{padding:"3px 10px",borderRadius:10,fontSize:11,cursor:"pointer",fontWeight:500,background:x===null?"#4285f4":"#1c1f2e",color:x===null?"#fff":"#aaa"},children:"全部"}),ae.map(T=>a.jsx("span",{onClick:()=>{k(T===x?null:T),R(null)},style:{padding:"3px 10px",borderRadius:10,fontSize:11,cursor:"pointer",fontWeight:500,background:T===x?_t(T):"#1c1f2e",color:T===x?"#fff":"#aaa"},children:T},T))]}),p==="category"&&x&&te.length>0&&a.jsxs("div",{style:{padding:"4px 12px",borderBottom:"1px solid #2a2d35",display:"flex",flexWrap:"wrap",gap:3},children:[a.jsxs("span",{onClick:()=>R(null),style:{padding:"2px 8px",borderRadius:10,fontSize:10,cursor:"pointer",background:w===null?"#4285f433":"#1c1f2e",color:w===null?"#ddd":"#777"},children:["全部",x]}),te.map(T=>a.jsx("span",{onClick:()=>R(T===w?null:T),style:{padding:"2px 8px",borderRadius:10,fontSize:10,cursor:"pointer",background:T===w?_t(x+"-"+T):"#1c1f2e",color:T===w?"#fff":"#aaa",borderLeft:`2px solid ${_t(x+"-"+T)}`},children:T},T))]}),a.jsx("div",{style:{flex:1,overflowY:"auto"},children:p==="category"?a.jsxs("div",{style:{padding:"6px 10px"},children:[a.jsxs("div",{style:{fontSize:11,color:"#666",marginBottom:6},children:[ne.length," 个知识点"]}),ne.map(T=>a.jsxs("div",{onClick:()=>re(T),style:{padding:"8px 10px",marginBottom:4,borderRadius:6,cursor:"pointer",background:(l==null?void 0:l.id)===T.id?"#2a2d45":"#1c1f2e",borderLeft:`3px solid ${_t(T.subject)}`,transition:"background 0.15s"},onMouseEnter:X=>{(l==null?void 0:l.id)!==T.id&&(X.currentTarget.style.background="#222640")},onMouseLeave:X=>{(l==null?void 0:l.id)!==T.id&&(X.currentTarget.style.background="#1c1f2e")},children:[a.jsx("div",{style:{fontSize:13,fontWeight:500},children:T.title}),a.jsx("div",{style:{fontSize:11,color:"#888",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:T.content}),a.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginTop:2},children:[a.jsx("span",{style:{fontSize:10,color:"#555"},children:T.subject}),a.jsxs("span",{style:{display:"flex",gap:3,alignItems:"center"},children:[T.has_topic_page&&a.jsx("span",{style:{fontSize:9,color:"#4caf50",padding:"0 4px",borderRadius:3,background:"#4caf5018",lineHeight:"16px"},children:"专题"}),T.has_qa&&a.jsx("span",{style:{fontSize:9,color:"#ff9800",padding:"0 4px",borderRadius:3,background:"#ff980018",lineHeight:"16px"},children:"问答"}),T.has_children&&a.jsx("span",{onClick:X=>{X.stopPropagation(),e(`/deep/${T.id}`)},style:{fontSize:9,color:"#4285f4",cursor:"pointer",padding:"0 4px",borderRadius:3,background:"#4285f418",lineHeight:"16px"},children:"深入"})]})]})]},T.id))]}):a.jsx(jy,{entries:ne,onEntryClick:re,selectedId:l==null?void 0:l.id,compact:!0})})]}),a.jsx("div",{onMouseDown:()=>y(!0),style:{width:4,cursor:"col-resize",background:f?"#4285f4":"transparent",flexShrink:0},onMouseEnter:T=>T.currentTarget.style.background="#4285f4",onMouseLeave:T=>{f||(T.currentTarget.style.background="transparent")}}),a.jsxs("div",{style:{flex:1,overflow:"hidden",position:"relative"},children:[P&&a.jsx("div",{style:{position:"absolute",inset:0,zIndex:10},children:a.jsx(Yy,{onClose:()=>{C(!1),D(!1)},firstRun:L})}),l?a.jsx(Jf,{entry:l,allEntries:n,onClose:()=>{o(null),i.current=null},onDeleted:()=>{o(null),i.current=null,O()},onNavigate:T=>{o(T),i.current=(T==null?void 0:T.id)||null},onUpdated:O,sharedCacheRef:t}):a.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsxs("div",{style:{textAlign:"center",color:"#444"},children:[a.jsx("div",{style:{fontSize:64,marginBottom:16},children:"📚"}),a.jsx("div",{style:{fontSize:18,color:"#666"},children:"选择一个知识点开始探索"}),a.jsx("div",{style:{fontSize:13,color:"#444",marginTop:8},children:"点击左侧列表中的知识点,深入学习"})]})})]})]})}const Zf={背景:"#4285f4",内容:"#34a853",影响:"#fbbc05",对比:"#9c27b0",评价:"#ea4335",其他:"#666"};function hc(e){for(const[t,n]of Object.entries(Zf))if(e!=null&&e.some(r=>r.includes(t)))return n;return"#666"}function Xy(){const{entryId:e}=_g(),t=Wo(),[n,r]=m.useState(null),[l,o]=m.useState([]),[i,s]=m.useState(null),u=m.useRef({}),[c,d]=m.useState(!1),[f,y]=m.useState(340),[x,k]=m.useState(!1),[w,R]=m.useState(!1),[p,h]=m.useState(""),[v,E]=m.useState(""),[P,C]=m.useState(""),[L,D]=m.useState(null),[H,O]=m.useState(null),[G,ae]=m.useState(0),te=m.useCallback(async()=>{const _=await fetch(`/api/entries/${e}`);if(_.ok){const A=await _.json();r(A)}const U=await zy(e);o((U.children||[]).sort((A,oe)=>(A.sort_order??999)-(oe.sort_order??999)));try{const A=await Ls(e);A.page&&(C(A.page.html),ae(A.page.version))}catch{}},[e]);m.useEffect(()=>{te()},[te]),m.useEffect(()=>{if(!x)return;const _=A=>y(Math.max(260,Math.min(480,A.clientX))),U=()=>k(!1);return window.addEventListener("mousemove",_),window.addEventListener("mouseup",U),()=>{window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",U)}},[x]);const re=async()=>{d(!0);try{const _=await My(e);o(U=>[...U,..._.children||[]])}catch(_){console.error(_)}d(!1)},ne=async()=>{if(!p.trim())return;const _=await $y(e,{title:p,content:v});o(U=>[...U,_]),h(""),E(""),R(!1)},T=async()=>{var Se;const _=[];for(const fe of l)try{const Y=await Ls(fe.id);(Se=Y==null?void 0:Y.page)!=null&&Se.html?_.push({title:fe.title,html:Y.page.html}):_.push({title:fe.title,html:'<div style="padding:24px;color:#888">暂无专题页</div>'})}catch{_.push({title:fe.title,html:'<div style="padding:24px;color:#888">加载失败</div>'})}const U=P||'<div style="padding:24px;color:#888">暂无综述</div>',A=fe=>{const Y=[];return fe.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(fn,Me)=>{let tt=Me.replace(/\bbody\b/g,".page-body");return tt=tt.replace(/background:\s*#0f1117/g,"background:#fff").replace(/background:\s*#1[0-9a-f]{5}/gi,"background:#fafafa").replace(/background:\s*linear-gradient\([^)]*#1a1a2e[^)]*\)/g,"background:#f0f0f0").replace(/background:\s*linear-gradient\(145deg,\s*#1a1e2e[^)]*\)/g,"background:#fafafa").replace(/background:\s*linear-gradient\(145deg,\s*#1a2e1a[^)]*\)/g,"background:#f0f8f0").replace(/color:\s*#e0e0e0/g,"color:#222").replace(/color:\s*#8892b0/g,"color:#555").replace(/-webkit-text-fill-color:\s*transparent/g,"-webkit-text-fill-color:initial").replace(/-webkit-background-clip:\s*text/g,"-webkit-background-clip:initial").replace(/border-bottom:\s*2px solid rgba\(255,255,255,[^)]*\)/g,"border-bottom:2px solid #ddd").replace(/border:\s*1px solid rgba\(255,255,255,[^)]*\)/g,"border:1px solid #ddd").replace(/box-shadow:\s*0[^;]*/g,"box-shadow:none"),Y.push(`<style>${tt}</style>`),""}),fe.replace(/<!DOCTYPE[^>]*>/gi,"").replace(/<html[^>]*>/gi,"").replace(/<\/html>/gi,"").replace(/<head>[\s\S]*?<\/head>/gi,Y.join(`
107
+ `)).replace(/<body[^>]*>/gi,'<div class="page-body">').replace(/<\/body>/gi,"</div>")},oe="<style>*{max-width:100%!important;box-sizing:border-box!important}body{width:100%!important;margin:0!important;padding:20px 24px!important}</style>",z=fe=>fe.includes("</head>")?fe.replace("</head>",oe+"</head>"):fe.includes("</body>")?fe.replace("</body>",oe+"</body>"):fe+oe,K=A(U),Q=(n==null?void 0:n.title)||"深入分析",de=_.map((fe,Y)=>`<a href="#" onclick="showPage('child-${Y}');return false" class="nav-item child" id="nav-child-${Y}"><span class="dot"></span>${fe.title}</a>`).join(`
108
+ `),Ft=`<!DOCTYPE html>
109
+ <html lang="zh-CN">
110
+ <head>
111
+ <meta charset="UTF-8">
112
+ <title>${Q} - 深入分析</title>
113
+ <style>
114
+ * { margin: 0; padding: 0; box-sizing: border-box; }
115
+ body { background: #0f1117; color: #e0e0e0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; display: flex; height: 100vh; overflow: hidden; }
116
+ .sidebar { width: 280px; min-width: 280px; background: linear-gradient(180deg, #161822 0%, #12141e 100%); border-right: 1px solid #2a2d3a; display: flex; flex-direction: column; }
117
+ .sidebar-header { padding: 24px 20px 16px; border-bottom: 1px solid #2a2d3a; }
118
+ .sidebar-header h2 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 4px; }
119
+ .sidebar-header .subtitle { font-size: 11px; color: #666; }
120
+ .sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
121
+ .nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 2px; border-radius: 8px; color: #999; text-decoration: none; font-size: 13px; transition: all 0.15s; cursor: pointer; }
122
+ .nav-item:hover { background: #1e2235; color: #ccc; }
123
+ .nav-item.active { background: #1e2640; color: #64b5f6; font-weight: 600; }
124
+ .nav-item.summary { font-size: 14px; font-weight: 600; padding: 12px 14px; margin-bottom: 8px; border-bottom: 1px solid #2a2d3a; border-radius: 8px 8px 0 0; }
125
+ .nav-item.summary .icon { font-size: 16px; }
126
+ .nav-item.child { padding-left: 28px; font-size: 12.5px; }
127
+ .nav-item.child .dot { width: 6px; height: 6px; border-radius: 50%; background: #444; flex-shrink: 0; transition: background 0.15s; }
128
+ .nav-item.child.active .dot { background: #64b5f6; }
129
+ .nav-item.child:hover .dot { background: #888; }
130
+ .nav-count { font-size: 10px; color: #555; padding: 4px 16px 8px; }
131
+ .main-content { flex: 1; overflow: hidden; background: #0f1117; }
132
+ .main-content iframe { width: 100%; height: 100%; border: none; background: #0f1117; }
133
+ .print-content { display: none; }
134
+ .print-content .page-body { max-width: 100% !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
135
+ @media print {
136
+ .sidebar { display: none !important; }
137
+ .main-content { display: none !important; }
138
+ .print-content { display: block !important; max-width: 100% !important; width: 100% !important; }
139
+ .print-content .print-section { page-break-before: always; padding: 20px 0; }
140
+ .print-content .print-section:first-child { page-break-before: avoid; }
141
+ .print-content h2 { border-bottom: 2px solid #ccc !important; padding-bottom: 8px; margin-bottom: 16px; }
142
+ .print-content .print-section, .print-content .page-body { width: 100% !important; }
143
+ .print-content .page-body { padding: 0 !important; }
144
+ ${Gf}
145
+ }
146
+ </style>
147
+ </head>
148
+ <body>
149
+ <div class="sidebar">
150
+ <div class="sidebar-header">
151
+ <h2>${Q}</h2>
152
+ <div class="subtitle">深入分析 · ${_.length} 个子专题</div>
153
+ </div>
154
+ <div class="sidebar-nav">
155
+ <a href="#" onclick="showPage('summary');return false" class="nav-item summary active" id="nav-summary"><span class="icon">📄</span>综述</a>
156
+ <div class="nav-count">子专题</div>
157
+ ${de}
158
+ </div>
159
+ </div>
160
+ <div class="main-content">
161
+ ${_.map((fe,Y)=>`<iframe id="frame-child-${Y}" style="display:none" srcdoc="${z(fe.html).replace(/"/g,"&quot;")}"></iframe>`).join(`
162
+ `)}
163
+ <iframe id="frame-summary" srcdoc="${z(U).replace(/"/g,"&quot;")}"></iframe>
164
+ </div>
165
+ <div class="print-content">
166
+ <div class="print-section"><h2>📄 综述: ${Q}</h2>${K}</div>
167
+ ${_.map((fe,Y)=>`<div class="print-section"><h2>${Y+1}. ${fe.title}</h2>${A(fe.html)}</div>`).join(`
168
+ `)}
169
+ </div>
170
+ <script>
171
+ var current = 'summary';
172
+ function showPage(id) {
173
+ document.getElementById('frame-' + current).style.display = 'none';
174
+ var oldNav = document.getElementById('nav-' + current);
175
+ oldNav.classList.remove('active');
176
+ document.getElementById('frame-' + id).style.display = 'block';
177
+ var newNav = document.getElementById('nav-' + id);
178
+ newNav.classList.add('active');
179
+ current = id;
180
+ }
181
+ <\/script>
182
+ </body>
183
+ </html>`,Ke=new Blob([Ft],{type:"text/html"}),V=document.createElement("a");V.href=URL.createObjectURL(Ke),V.download=`${Q}_深入分析.html`,V.click(),URL.revokeObjectURL(V.href)},X=async(_,U)=>{if(_===U)return;const A=[...l],[oe]=A.splice(_,1);A.splice(U,0,oe),o(A);for(let z=0;z<A.length;z++)A[z].sort_order!==z&&(A[z].sort_order=z,qf(A[z].id,{sort_order:z}).catch(()=>{}))},M={};l.forEach(_=>{var A;const U=((A=_.tags)==null?void 0:A.find(oe=>Object.keys(Zf).some(z=>oe.includes(z))))||"其他";M[U]||(M[U]=[]),M[U].push(_)});const W={padding:"6px 10px",borderRadius:6,border:"1px solid #2a2d45",background:"#1c1f2e",color:"#ddd",fontSize:12,outline:"none",fontFamily:"inherit"};return n?a.jsxs("div",{style:{display:"flex",height:"100vh",fontFamily:"system-ui, -apple-system, sans-serif",background:"#0f1117",color:"#e0e0e0",overflow:"hidden"},children:[a.jsxs("div",{style:{width:f,minWidth:260,borderRight:"1px solid #2a2d35",display:"flex",flexDirection:"column",background:"#161822",flexShrink:0},children:[a.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid #2a2d35"},children:[a.jsx("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:a.jsx("span",{onClick:()=>t("/"),style:{cursor:"pointer",color:"#4285f4",fontSize:12},children:"← 返回主页"})}),a.jsxs("h2",{style:{margin:0,fontSize:16,color:"#fff"},children:["🔬 ",n.title]}),a.jsxs("div",{style:{fontSize:11,color:"#888",marginTop:4},children:["深入分析 · ",l.length," 个子节点"]})]}),a.jsxs("div",{onClick:()=>s(null),style:{padding:"10px 16px",borderBottom:"1px solid #2a2d35",cursor:"pointer",background:i===null?"#2a2d45":"#161822",transition:"background 0.15s"},onMouseEnter:_=>{i!==null&&(_.currentTarget.style.background="#222640")},onMouseLeave:_=>{i!==null&&(_.currentTarget.style.background="#161822")},children:[a.jsxs("div",{style:{fontSize:13,fontWeight:600,color:i===null?"#4285f4":"#aaa"},children:["📄 综述: ",n.title]}),a.jsx("div",{style:{fontSize:11,color:"#666",marginTop:2},children:G>0?`v${G} · 点击查看综述`:"点击查看综述"})]}),a.jsxs("div",{style:{padding:"8px 12px",borderBottom:"1px solid #2a2d35",display:"flex",gap:6},children:[a.jsx("button",{onClick:re,disabled:c,style:{flex:1,padding:"6px",borderRadius:6,border:"none",background:"#4285f422",color:"#4285f4",cursor:c?"wait":"pointer",fontSize:12},children:c?"AI拆解中...":"🤖 AI自动拆解"}),a.jsx("button",{onClick:()=>R(!w),style:{padding:"6px 12px",borderRadius:6,border:"none",background:"#34a85322",color:"#34a853",cursor:"pointer",fontSize:12},children:"+ 手动添加"})]}),w&&a.jsxs("div",{style:{padding:"8px 12px",borderBottom:"1px solid #2a2d35",display:"flex",flexDirection:"column",gap:6},children:[a.jsx("input",{value:p,onChange:_=>h(_.target.value),placeholder:"子知识点标题",style:{...W}}),a.jsx("textarea",{value:v,onChange:_=>E(_.target.value),placeholder:"内容描述",rows:2,style:{...W,resize:"vertical"}}),a.jsxs("div",{style:{display:"flex",gap:4},children:[a.jsx("button",{onClick:ne,disabled:!p.trim(),style:{flex:1,padding:"5px",borderRadius:4,border:"none",background:"#34a853",color:"#fff",cursor:"pointer",fontSize:11},children:"添加"}),a.jsx("button",{onClick:()=>R(!1),style:{padding:"5px 10px",borderRadius:4,border:"none",background:"#333",color:"#aaa",cursor:"pointer",fontSize:11},children:"取消"})]})]}),a.jsx("div",{style:{flex:1,overflowY:"auto",padding:"6px 10px"},children:l.length===0?a.jsx("div",{style:{padding:20,textAlign:"center",color:"#555",fontSize:13},children:"暂无子节点,点击「AI自动拆解」或「手动添加」开始"}):l.map((_,U)=>a.jsx("div",{draggable:!0,onDragStart:()=>D(U),onDragOver:A=>{A.preventDefault(),O(U)},onDragEnd:()=>{L!==null&&H!==null&&X(L,H),D(null),O(null)},onClick:()=>s(_),style:{padding:"8px 10px",marginTop:4,borderRadius:6,cursor:"grab",background:H===U?"#2a2d55":(i==null?void 0:i.id)===_.id?"#2a2d45":"#1c1f2e",borderLeft:`3px solid ${hc(_.tags)}`,transition:"background 0.15s",opacity:L===U?.5:1},onMouseEnter:A=>{(i==null?void 0:i.id)!==_.id&&L===null&&(A.currentTarget.style.background="#222640")},onMouseLeave:A=>{(i==null?void 0:i.id)!==_.id&&L===null&&(A.currentTarget.style.background="#1c1f2e")},children:a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[a.jsx("span",{style:{color:"#555",fontSize:10,cursor:"grab"},children:"⠿"}),a.jsxs("div",{style:{flex:1},children:[a.jsx("div",{style:{fontSize:13,fontWeight:500},children:_.title}),a.jsx("div",{style:{fontSize:11,color:"#888",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:_.content})]})]})},_.id))})]}),a.jsx("div",{onMouseDown:()=>k(!0),style:{width:4,cursor:"col-resize",background:x?"#4285f4":"transparent",flexShrink:0},onMouseEnter:_=>_.currentTarget.style.background="#4285f4",onMouseLeave:_=>{x||(_.currentTarget.style.background="transparent")}}),a.jsx("div",{style:{flex:1,overflow:"hidden"},children:i?a.jsx(Jf,{entry:i,allEntries:l,onClose:()=>s(null),onDeleted:()=>{s(null),te()},onNavigate:_=>s(_),onUpdated:te,sharedCacheRef:u},i.id):a.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[a.jsxs("div",{style:{padding:"10px 16px",borderBottom:"1px solid #2a2d35",background:"#161822",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[a.jsxs("div",{style:{fontSize:14,fontWeight:600,color:"#fff"},children:["📄 ",n.title," — 综述",G>0&&a.jsxs("span",{style:{fontSize:11,color:"#34a853",marginLeft:6},children:["v",G]})]}),a.jsxs("div",{style:{display:"flex",gap:6},children:[P&&a.jsx("button",{onClick:()=>Xf(P,`${n.title} - 综述`,`${n.title}_综述.html`),style:{padding:"5px 14px",borderRadius:6,border:"none",fontSize:12,background:"#1565c033",color:"#64b5f6",cursor:"pointer"},children:"📄 导出当前页面"}),a.jsx("button",{onClick:T,style:{padding:"5px 14px",borderRadius:6,border:"none",fontSize:12,background:"#1565c033",color:"#64b5f6",cursor:"pointer"},children:"📥 导出整体"})]})]}),P?a.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[a.jsx("iframe",{srcDoc:P,style:{flex:1,border:"none",background:"#0f1117"},title:"综述页面",onLoad:_=>{try{const U=_.target.contentDocument,A=U.createElement("style");A.textContent="* { max-width: 100% !important; box-sizing: border-box !important; } body { width: 100% !important; margin: 0 !important; padding: 16px 24px !important; }",U.head.appendChild(A)}catch{}}}),l.length>0&&a.jsxs("div",{style:{padding:"8px 16px",borderTop:"1px solid #2a2d35",background:"#161822"},children:[a.jsx("div",{style:{fontSize:11,color:"#888",marginBottom:4},children:"子主题导航"}),a.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:l.map(_=>a.jsx("span",{onClick:()=>s(_),style:{padding:"3px 8px",borderRadius:4,fontSize:11,cursor:"pointer",background:"#1c1f2e",color:"#aaa",borderLeft:`2px solid ${hc(_.tags)}`},children:_.title},_.id))})]})]}):a.jsx("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsxs("div",{style:{textAlign:"center",color:"#444"},children:[a.jsx("div",{style:{fontSize:64,marginBottom:16},children:"🔬"}),a.jsxs("div",{style:{fontSize:18,color:"#666"},children:[n.title," - 深入分析"]}),a.jsx("div",{style:{fontSize:13,color:"#444",marginTop:8},children:l.length>0?"选择左侧子知识点开始探索,或点击「更新综述」生成综合页面":"点击「AI自动拆解」生成子知识点"})]})})]})})]}):a.jsx("div",{style:{height:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"#0f1117",color:"#888"},children:"加载中..."})}Di.createRoot(document.getElementById("root")).render(a.jsx(py,{children:a.jsxs(Wg,{children:[a.jsx(bs,{path:"/",element:a.jsx(Gy,{})}),a.jsx(bs,{path:"/deep/:entryId",element:a.jsx(Xy,{})})]})}));