@actalk/inkos-studio 1.1.1 → 1.2.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.
- package/LICENSE +661 -21
- package/dist/api/errors.d.ts +0 -1
- package/dist/api/errors.d.ts.map +1 -1
- package/dist/api/errors.js +0 -3
- package/dist/api/errors.js.map +1 -1
- package/dist/api/safety.d.ts +0 -28
- package/dist/api/safety.d.ts.map +1 -1
- package/dist/api/safety.js +1 -53
- package/dist/api/safety.js.map +1 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +118 -76
- package/dist/api/server.js.map +1 -1
- package/dist/assets/index-CrV75dEH.css +1 -0
- package/dist/assets/index-tV8pf10O.js +395 -0
- package/dist/index.html +2 -2
- package/package.json +4 -9
- package/dist/assets/index-BIif-YIZ.css +0 -1
- package/dist/assets/index-DW3qJzCW.js +0 -395
|
@@ -1,395 +0,0 @@
|
|
|
1
|
-
(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const x of m)if(x.type==="childList")for(const y of x.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&o(y)}).observe(document,{childList:!0,subtree:!0});function u(m){const x={};return m.integrity&&(x.integrity=m.integrity),m.referrerPolicy&&(x.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?x.credentials="include":m.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function o(m){if(m.ep)return;m.ep=!0;const x=u(m);fetch(m.href,x)}})();var Lc={exports:{}},Kn={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and 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 gm;function qg(){if(gm)return Kn;gm=1;var c=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function u(o,m,x){var y=null;if(x!==void 0&&(y=""+x),m.key!==void 0&&(y=""+m.key),"key"in m){x={};for(var E in m)E!=="key"&&(x[E]=m[E])}else x=m;return m=x.ref,{$$typeof:c,type:o,key:y,ref:m!==void 0?m:null,props:x}}return Kn.Fragment=f,Kn.jsx=u,Kn.jsxs=u,Kn}var xm;function Lg(){return xm||(xm=1,Lc.exports=qg()),Lc.exports}var s=Lg(),Gc={exports:{}},oe={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and 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 ym;function Gg(){if(ym)return oe;ym=1;var c=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),y=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),q=Symbol.iterator;function D(v){return v===null||typeof v!="object"?null:(v=q&&v[q]||v["@@iterator"],typeof v=="function"?v:null)}var V={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,L={};function ue(v,R,Q){this.props=v,this.context=R,this.refs=L,this.updater=Q||V}ue.prototype.isReactComponent={},ue.prototype.setState=function(v,R){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,R,"setState")},ue.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function re(){}re.prototype=ue.prototype;function P(v,R,Q){this.props=v,this.context=R,this.refs=L,this.updater=Q||V}var pe=P.prototype=new re;pe.constructor=P,X(pe,ue.prototype),pe.isPureReactComponent=!0;var be=Array.isArray;function H(){}var K={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function ee(v,R,Q){var Z=Q.ref;return{$$typeof:c,type:v,key:R,ref:Z!==void 0?Z:null,props:Q}}function Ne(v,R){return ee(v.type,R,v.props)}function Re(v){return typeof v=="object"&&v!==null&&v.$$typeof===c}function Oe(v){var R={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(Q){return R[Q]})}var ie=/\/+/g;function Ge(v,R){return typeof v=="object"&&v!==null&&v.key!=null?Oe(""+v.key):R.toString(36)}function Le(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(H,H):(v.status="pending",v.then(function(R){v.status==="pending"&&(v.status="fulfilled",v.value=R)},function(R){v.status==="pending"&&(v.status="rejected",v.reason=R)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function w(v,R,Q,Z,te){var le=typeof v;(le==="undefined"||le==="boolean")&&(v=null);var ce=!1;if(v===null)ce=!0;else switch(le){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(v.$$typeof){case c:case f:ce=!0;break;case M:return ce=v._init,w(ce(v._payload),R,Q,Z,te)}}if(ce)return te=te(v),ce=Z===""?"."+Ge(v,0):Z,be(te)?(Q="",ce!=null&&(Q=ce.replace(ie,"$&/")+"/"),w(te,R,Q,"",function(qt){return qt})):te!=null&&(Re(te)&&(te=Ne(te,Q+(te.key==null||v&&v.key===te.key?"":(""+te.key).replace(ie,"$&/")+"/")+ce)),R.push(te)),1;ce=0;var He=Z===""?".":Z+":";if(be(v))for(var de=0;de<v.length;de++)Z=v[de],le=He+Ge(Z,de),ce+=w(Z,R,Q,le,te);else if(de=D(v),typeof de=="function")for(v=de.call(v),de=0;!(Z=v.next()).done;)Z=Z.value,le=He+Ge(Z,de++),ce+=w(Z,R,Q,le,te);else if(le==="object"){if(typeof v.then=="function")return w(Le(v),R,Q,Z,te);throw R=String(v),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return ce}function Y(v,R,Q){if(v==null)return v;var Z=[],te=0;return w(v,Z,"","",function(le){return R.call(Q,le,te++)}),Z}function F(v){if(v._status===-1){var R=v._result;R=R(),R.then(function(Q){(v._status===0||v._status===-1)&&(v._status=1,v._result=Q)},function(Q){(v._status===0||v._status===-1)&&(v._status=2,v._result=Q)}),v._status===-1&&(v._status=0,v._result=R)}if(v._status===1)return v._result.default;throw v._result}var he=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},A={map:Y,forEach:function(v,R,Q){Y(v,function(){R.apply(this,arguments)},Q)},count:function(v){var R=0;return Y(v,function(){R++}),R},toArray:function(v){return Y(v,function(R){return R})||[]},only:function(v){if(!Re(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return oe.Activity=S,oe.Children=A,oe.Component=ue,oe.Fragment=u,oe.Profiler=m,oe.PureComponent=P,oe.StrictMode=o,oe.Suspense=g,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,oe.__COMPILER_RUNTIME={__proto__:null,c:function(v){return K.H.useMemoCache(v)}},oe.cache=function(v){return function(){return v.apply(null,arguments)}},oe.cacheSignal=function(){return null},oe.cloneElement=function(v,R,Q){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var Z=X({},v.props),te=v.key;if(R!=null)for(le in R.key!==void 0&&(te=""+R.key),R)!C.call(R,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&R.ref===void 0||(Z[le]=R[le]);var le=arguments.length-2;if(le===1)Z.children=Q;else if(1<le){for(var ce=Array(le),He=0;He<le;He++)ce[He]=arguments[He+2];Z.children=ce}return ee(v.type,te,Z)},oe.createContext=function(v){return v={$$typeof:y,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:x,_context:v},v},oe.createElement=function(v,R,Q){var Z,te={},le=null;if(R!=null)for(Z in R.key!==void 0&&(le=""+R.key),R)C.call(R,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(te[Z]=R[Z]);var ce=arguments.length-2;if(ce===1)te.children=Q;else if(1<ce){for(var He=Array(ce),de=0;de<ce;de++)He[de]=arguments[de+2];te.children=He}if(v&&v.defaultProps)for(Z in ce=v.defaultProps,ce)te[Z]===void 0&&(te[Z]=ce[Z]);return ee(v,le,te)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(v){return{$$typeof:E,render:v}},oe.isValidElement=Re,oe.lazy=function(v){return{$$typeof:M,_payload:{_status:-1,_result:v},_init:F}},oe.memo=function(v,R){return{$$typeof:h,type:v,compare:R===void 0?null:R}},oe.startTransition=function(v){var R=K.T,Q={};K.T=Q;try{var Z=v(),te=K.S;te!==null&&te(Q,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(H,he)}catch(le){he(le)}finally{R!==null&&Q.types!==null&&(R.types=Q.types),K.T=R}},oe.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},oe.use=function(v){return K.H.use(v)},oe.useActionState=function(v,R,Q){return K.H.useActionState(v,R,Q)},oe.useCallback=function(v,R){return K.H.useCallback(v,R)},oe.useContext=function(v){return K.H.useContext(v)},oe.useDebugValue=function(){},oe.useDeferredValue=function(v,R){return K.H.useDeferredValue(v,R)},oe.useEffect=function(v,R){return K.H.useEffect(v,R)},oe.useEffectEvent=function(v){return K.H.useEffectEvent(v)},oe.useId=function(){return K.H.useId()},oe.useImperativeHandle=function(v,R,Q){return K.H.useImperativeHandle(v,R,Q)},oe.useInsertionEffect=function(v,R){return K.H.useInsertionEffect(v,R)},oe.useLayoutEffect=function(v,R){return K.H.useLayoutEffect(v,R)},oe.useMemo=function(v,R){return K.H.useMemo(v,R)},oe.useOptimistic=function(v,R){return K.H.useOptimistic(v,R)},oe.useReducer=function(v,R,Q){return K.H.useReducer(v,R,Q)},oe.useRef=function(v){return K.H.useRef(v)},oe.useState=function(v){return K.H.useState(v)},oe.useSyncExternalStore=function(v,R,Q){return K.H.useSyncExternalStore(v,R,Q)},oe.useTransition=function(){return K.H.useTransition()},oe.version="19.2.4",oe}var bm;function to(){return bm||(bm=1,Gc.exports=Gg()),Gc.exports}var B=to(),Yc={exports:{}},Jn={},Vc={exports:{}},Xc={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and 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
|
-
*/var vm;function Yg(){return vm||(vm=1,(function(c){function f(w,Y){var F=w.length;w.push(Y);e:for(;0<F;){var he=F-1>>>1,A=w[he];if(0<m(A,Y))w[he]=Y,w[F]=A,F=he;else break e}}function u(w){return w.length===0?null:w[0]}function o(w){if(w.length===0)return null;var Y=w[0],F=w.pop();if(F!==Y){w[0]=F;e:for(var he=0,A=w.length,v=A>>>1;he<v;){var R=2*(he+1)-1,Q=w[R],Z=R+1,te=w[Z];if(0>m(Q,F))Z<A&&0>m(te,Q)?(w[he]=te,w[Z]=F,he=Z):(w[he]=Q,w[R]=F,he=R);else if(Z<A&&0>m(te,F))w[he]=te,w[Z]=F,he=Z;else break e}}return Y}function m(w,Y){var F=w.sortIndex-Y.sortIndex;return F!==0?F:w.id-Y.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;c.unstable_now=function(){return x.now()}}else{var y=Date,E=y.now();c.unstable_now=function(){return y.now()-E}}var g=[],h=[],M=1,S=null,q=3,D=!1,V=!1,X=!1,L=!1,ue=typeof setTimeout=="function"?setTimeout:null,re=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function pe(w){for(var Y=u(h);Y!==null;){if(Y.callback===null)o(h);else if(Y.startTime<=w)o(h),Y.sortIndex=Y.expirationTime,f(g,Y);else break;Y=u(h)}}function be(w){if(X=!1,pe(w),!V)if(u(g)!==null)V=!0,H||(H=!0,Oe());else{var Y=u(h);Y!==null&&Le(be,Y.startTime-w)}}var H=!1,K=-1,C=5,ee=-1;function Ne(){return L?!0:!(c.unstable_now()-ee<C)}function Re(){if(L=!1,H){var w=c.unstable_now();ee=w;var Y=!0;try{e:{V=!1,X&&(X=!1,re(K),K=-1),D=!0;var F=q;try{t:{for(pe(w),S=u(g);S!==null&&!(S.expirationTime>w&&Ne());){var he=S.callback;if(typeof he=="function"){S.callback=null,q=S.priorityLevel;var A=he(S.expirationTime<=w);if(w=c.unstable_now(),typeof A=="function"){S.callback=A,pe(w),Y=!0;break t}S===u(g)&&o(g),pe(w)}else o(g);S=u(g)}if(S!==null)Y=!0;else{var v=u(h);v!==null&&Le(be,v.startTime-w),Y=!1}}break e}finally{S=null,q=F,D=!1}Y=void 0}}finally{Y?Oe():H=!1}}}var Oe;if(typeof P=="function")Oe=function(){P(Re)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,Ge=ie.port2;ie.port1.onmessage=Re,Oe=function(){Ge.postMessage(null)}}else Oe=function(){ue(Re,0)};function Le(w,Y){K=ue(function(){w(c.unstable_now())},Y)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(w){w.callback=null},c.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<w?Math.floor(1e3/w):5},c.unstable_getCurrentPriorityLevel=function(){return q},c.unstable_next=function(w){switch(q){case 1:case 2:case 3:var Y=3;break;default:Y=q}var F=q;q=Y;try{return w()}finally{q=F}},c.unstable_requestPaint=function(){L=!0},c.unstable_runWithPriority=function(w,Y){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var F=q;q=w;try{return Y()}finally{q=F}},c.unstable_scheduleCallback=function(w,Y,F){var he=c.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?he+F:he):F=he,w){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=F+A,w={id:M++,callback:Y,priorityLevel:w,startTime:F,expirationTime:A,sortIndex:-1},F>he?(w.sortIndex=F,f(h,w),u(g)===null&&w===u(h)&&(X?(re(K),K=-1):X=!0,Le(be,F-he))):(w.sortIndex=A,f(g,w),V||D||(V=!0,H||(H=!0,Oe()))),w},c.unstable_shouldYield=Ne,c.unstable_wrapCallback=function(w){var Y=q;return function(){var F=q;q=Y;try{return w.apply(this,arguments)}finally{q=F}}}})(Xc)),Xc}var jm;function Vg(){return jm||(jm=1,Vc.exports=Yg()),Vc.exports}var Qc={exports:{}},ct={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and 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 Sm;function Xg(){if(Sm)return ct;Sm=1;var c=to();function f(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var M=2;M<arguments.length;M++)h+="&args[]="+encodeURIComponent(arguments[M])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var o={d:{f:u,r:function(){throw Error(f(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},m=Symbol.for("react.portal");function x(g,h,M){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:S==null?null:""+S,children:g,containerInfo:h,implementation:M}}var y=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ct.createPortal=function(g,h){var M=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(f(299));return x(g,h,null,M)},ct.flushSync=function(g){var h=y.T,M=o.p;try{if(y.T=null,o.p=2,g)return g()}finally{y.T=h,o.p=M,o.d.f()}},ct.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(g,h))},ct.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},ct.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var M=h.as,S=E(M,h.crossOrigin),q=typeof h.integrity=="string"?h.integrity:void 0,D=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;M==="style"?o.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:q,fetchPriority:D}):M==="script"&&o.d.X(g,{crossOrigin:S,integrity:q,fetchPriority:D,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ct.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var M=E(h.as,h.crossOrigin);o.d.M(g,{crossOrigin:M,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(g)},ct.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var M=h.as,S=E(M,h.crossOrigin);o.d.L(g,M,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},ct.preloadModule=function(g,h){if(typeof g=="string")if(h){var M=E(h.as,h.crossOrigin);o.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:M,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(g)},ct.requestFormReset=function(g){o.d.r(g)},ct.unstable_batchedUpdates=function(g,h){return g(h)},ct.useFormState=function(g,h,M){return y.H.useFormState(g,h,M)},ct.useFormStatus=function(){return y.H.useHostTransitionStatus()},ct.version="19.2.4",ct}var Nm;function Qg(){if(Nm)return Qc.exports;Nm=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(f){console.error(f)}}return c(),Qc.exports=Xg(),Qc.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var zm;function Zg(){if(zm)return Jn;zm=1;var c=Vg(),f=to(),u=Qg();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function y(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 E(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(x(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,l=t;;){var n=a.return;if(n===null)break;var i=n.alternate;if(i===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===a)return g(n),e;if(i===l)return g(n),t;i=i.sibling}throw Error(o(188))}if(a.return!==l.return)a=n,l=i;else{for(var r=!1,d=n.child;d;){if(d===a){r=!0,a=n,l=i;break}if(d===l){r=!0,l=n,a=i;break}d=d.sibling}if(!r){for(d=i.child;d;){if(d===a){r=!0,a=i,l=n;break}if(d===l){r=!0,l=i,a=n;break}d=d.sibling}if(!r)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function M(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=M(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,q=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),re=Symbol.for("react.consumer"),P=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),Ne=Symbol.for("react.memo_cache_sentinel"),Re=Symbol.iterator;function Oe(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function Ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case ue:return"Profiler";case L:return"StrictMode";case be:return"Suspense";case H:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case V:return"Portal";case P:return e.displayName||"Context";case re:return(e._context.displayName||"Context")+".Consumer";case pe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:Ge(e.type)||"Memo";case C:t=e._payload,e=e._init;try{return Ge(e(t))}catch{}}return null}var Le=Array.isArray,w=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},he=[],A=-1;function v(e){return{current:e}}function R(e){0>A||(e.current=he[A],he[A]=null,A--)}function Q(e,t){A++,he[A]=e.current,e.current=t}var Z=v(null),te=v(null),le=v(null),ce=v(null);function He(e,t){switch(Q(le,t),Q(te,e),Q(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qf(t),e=Lf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}R(Z),Q(Z,e)}function de(){R(Z),R(te),R(le)}function qt(e){e.memoizedState!==null&&Q(ce,e);var t=Z.current,a=Lf(t,e.type);t!==a&&(Q(te,e),Q(Z,a))}function Lt(e){te.current===e&&(R(Z),R(te)),ce.current===e&&(R(ce),Vn._currentValue=F)}var Xt,pa;function G(e){if(Xt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Xt=t&&t[1]||"",pa=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Xt+e+pa}var De=!1;function ut(e,t){if(!e||De)return"";De=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(T){var k=T}Reflect.construct(e,[],U)}else{try{U.call()}catch(T){k=T}e.call(U.prototype)}}else{try{throw Error()}catch(T){k=T}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(T){if(T&&k&&typeof T.stack=="string")return[T.stack,k.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),r=i[0],d=i[1];if(r&&d){var p=r.split(`
|
|
44
|
-
`),z=d.split(`
|
|
45
|
-
`);for(n=l=0;l<p.length&&!p[l].includes("DetermineComponentFrameRoot");)l++;for(;n<z.length&&!z[n].includes("DetermineComponentFrameRoot");)n++;if(l===p.length||n===z.length)for(l=p.length-1,n=z.length-1;1<=l&&0<=n&&p[l]!==z[n];)n--;for(;1<=l&&0<=n;l--,n--)if(p[l]!==z[n]){if(l!==1||n!==1)do if(l--,n--,0>n||p[l]!==z[n]){var _=`
|
|
46
|
-
`+p[l].replace(" at new "," at ");return e.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",e.displayName)),_}while(1<=l&&0<=n);break}}}finally{De=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?G(a):""}function hl(e,t){switch(e.tag){case 26:case 27:case 5:return G(e.type);case 16:return G("Lazy");case 13:return e.child!==t&&t!==null?G("Suspense Fallback"):G("Suspense");case 19:return G("SuspenseList");case 0:case 15:return ut(e.type,!1);case 11:return ut(e.type.render,!1);case 1:return ut(e.type,!0);case 31:return G("Activity");default:return""}}function Pl(e){try{var t="",a=null;do t+=hl(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var ga=Object.prototype.hasOwnProperty,$t=c.unstable_scheduleCallback,Ti=c.unstable_cancelCallback,xh=c.unstable_shouldYield,yh=c.unstable_requestPaint,yt=c.unstable_now,bh=c.unstable_getCurrentPriorityLevel,go=c.unstable_ImmediatePriority,xo=c.unstable_UserBlockingPriority,Pn=c.unstable_NormalPriority,vh=c.unstable_LowPriority,yo=c.unstable_IdlePriority,jh=c.log,Sh=c.unstable_setDisableYieldValue,en=null,bt=null;function xa(e){if(typeof jh=="function"&&Sh(e),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(en,e)}catch{}}var vt=Math.clz32?Math.clz32:kh,Nh=Math.log,zh=Math.LN2;function kh(e){return e>>>=0,e===0?32:31-(Nh(e)/zh|0)|0}var es=256,ts=262144,as=4194304;function Ka(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ls(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var n=0,i=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~i,l!==0?n=Ka(l):(r&=d,r!==0?n=Ka(r):a||(a=d&~e,a!==0&&(n=Ka(a))))):(d=l&~i,d!==0?n=Ka(d):r!==0?n=Ka(r):a||(a=l&~e,a!==0&&(n=Ka(a)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:n}function tn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Eh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bo(){var e=as;return as<<=1,(as&62914560)===0&&(as=4194304),e}function wi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function an(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Th(e,t,a,l,n,i){var r=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var d=e.entanglements,p=e.expirationTimes,z=e.hiddenUpdates;for(a=r&~a;0<a;){var _=31-vt(a),U=1<<_;d[_]=0,p[_]=-1;var k=z[_];if(k!==null)for(z[_]=null,_=0;_<k.length;_++){var T=k[_];T!==null&&(T.lane&=-536870913)}a&=~U}l!==0&&vo(e,l,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(r&~t))}function vo(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-vt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function jo(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-vt(a),n=1<<l;n&t|e[l]&t&&(e[l]|=t),a&=~n}}function So(e,t){var a=t&-t;return a=(a&42)!==0?1:Ci(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ci(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ai(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function No(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:om(e.type))}function zo(e,t){var a=Y.p;try{return Y.p=e,t()}finally{Y.p=a}}var ya=Math.random().toString(36).slice(2),lt="__reactFiber$"+ya,dt="__reactProps$"+ya,pl="__reactContainer$"+ya,Mi="__reactEvents$"+ya,wh="__reactListeners$"+ya,Ch="__reactHandles$"+ya,ko="__reactResources$"+ya,ln="__reactMarker$"+ya;function _i(e){delete e[lt],delete e[dt],delete e[Mi],delete e[wh],delete e[Ch]}function gl(e){var t=e[lt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[pl]||a[lt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Kf(e);e!==null;){if(a=e[lt])return a;e=Kf(e)}return t}e=a,a=e.parentNode}return null}function xl(e){if(e=e[lt]||e[pl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function nn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function yl(e){var t=e[ko];return t||(t=e[ko]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[ln]=!0}var Eo=new Set,To={};function Ja(e,t){bl(e,t),bl(e+"Capture",t)}function bl(e,t){for(To[e]=t,e=0;e<t.length;e++)Eo.add(t[e])}var Ah=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),wo={},Co={};function Mh(e){return ga.call(Co,e)?!0:ga.call(wo,e)?!1:Ah.test(e)?Co[e]=!0:(wo[e]=!0,!1)}function ns(e,t,a){if(Mh(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ss(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Wt(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ao(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _h(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var n=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(r){a=""+r,i.call(this,r)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(r){a=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Oi(e){if(!e._valueTracker){var t=Ao(e)?"checked":"value";e._valueTracker=_h(e,t,""+e[t])}}function Mo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Ao(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function is(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Oh=/[\n"\\]/g;function Ct(e){return e.replace(Oh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Di(e,t,a,l,n,i,r,d){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+wt(t)):e.value!==""+wt(t)&&(e.value=""+wt(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?Ri(e,r,wt(t)):a!=null?Ri(e,r,wt(a)):l!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+wt(d):e.removeAttribute("name")}function _o(e,t,a,l,n,i,r,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Oi(e);return}a=a!=null?""+wt(a):"",t=t!=null?""+wt(t):a,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Oi(e)}function Ri(e,t,a){t==="number"&&is(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function vl(e,t,a,l){if(e=e.options,t){t={};for(var n=0;n<a.length;n++)t["$"+a[n]]=!0;for(a=0;a<e.length;a++)n=t.hasOwnProperty("$"+e[a].value),e[a].selected!==n&&(e[a].selected=n),n&&l&&(e[a].defaultSelected=!0)}else{for(a=""+wt(a),t=null,n=0;n<e.length;n++){if(e[n].value===a){e[n].selected=!0,l&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Oo(e,t,a){if(t!=null&&(t=""+wt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+wt(a):""}function Do(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(Le(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=wt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Oi(e)}function jl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Dh=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ro(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Dh.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Uo(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var n in t)l=t[n],t.hasOwnProperty(n)&&a[n]!==l&&Ro(e,n,l)}else for(var i in t)t.hasOwnProperty(i)&&Ro(e,i,t[i])}function Ui(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rh=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Uh=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function rs(e){return Uh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ft(){}var Bi=null;function Hi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sl=null,Nl=null;function Bo(e){var t=xl(e);if(t&&(e=t.stateNode)){var a=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Di(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ct(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var n=l[dt]||null;if(!n)throw Error(o(90));Di(l,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Mo(l)}break e;case"textarea":Oo(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&vl(e,!!a.multiple,t,!1)}}}var qi=!1;function Ho(e,t,a){if(qi)return e(t,a);qi=!0;try{var l=e(t);return l}finally{if(qi=!1,(Sl!==null||Nl!==null)&&(Js(),Sl&&(t=Sl,e=Nl,Nl=Sl=null,Bo(t),e)))for(t=0;t<e.length;t++)Bo(e[t])}}function sn(e,t){var a=e.stateNode;if(a===null)return null;var l=a[dt]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Li=!1;if(It)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){Li=!0}}),window.addEventListener("test",rn,rn),window.removeEventListener("test",rn,rn)}catch{Li=!1}var ba=null,Gi=null,cs=null;function qo(){if(cs)return cs;var e,t=Gi,a=t.length,l,n="value"in ba?ba.value:ba.textContent,i=n.length;for(e=0;e<a&&t[e]===n[e];e++);var r=a-e;for(l=1;l<=r&&t[a-l]===n[i-l];l++);return cs=n.slice(e,1<l?1-l:void 0)}function os(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 us(){return!0}function Lo(){return!1}function ft(e){function t(a,l,n,i,r){this._reactName=a,this._targetInst=n,this.type=l,this.nativeEvent=i,this.target=r,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(a=e[d],this[d]=a?a(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?us:Lo,this.isPropagationStopped=Lo,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=us)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=us)},persist:function(){},isPersistent:us}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ds=ft($a),cn=S({},$a,{view:0,detail:0}),Bh=ft(cn),Yi,Vi,on,fs=S({},cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qi,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!==on&&(on&&e.type==="mousemove"?(Yi=e.screenX-on.screenX,Vi=e.screenY-on.screenY):Vi=Yi=0,on=e),Yi)},movementY:function(e){return"movementY"in e?e.movementY:Vi}}),Go=ft(fs),Hh=S({},fs,{dataTransfer:0}),qh=ft(Hh),Lh=S({},cn,{relatedTarget:0}),Xi=ft(Lh),Gh=S({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),Yh=ft(Gh),Vh=S({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xh=ft(Vh),Qh=S({},$a,{data:0}),Yo=ft(Qh),Zh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kh={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"},Jh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $h(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jh[e])?!!t[e]:!1}function Qi(){return $h}var Wh=S({},cn,{key:function(e){if(e.key){var t=Zh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=os(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Kh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qi,charCode:function(e){return e.type==="keypress"?os(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?os(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fh=ft(Wh),Ih=S({},fs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vo=ft(Ih),Ph=S({},cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qi}),ep=ft(Ph),tp=S({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),ap=ft(tp),lp=S({},fs,{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}),np=ft(lp),sp=S({},$a,{newState:0,oldState:0}),ip=ft(sp),rp=[9,13,27,32],Zi=It&&"CompositionEvent"in window,un=null;It&&"documentMode"in document&&(un=document.documentMode);var cp=It&&"TextEvent"in window&&!un,Xo=It&&(!Zi||un&&8<un&&11>=un),Qo=" ",Zo=!1;function Ko(e,t){switch(e){case"keyup":return rp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zl=!1;function op(e,t){switch(e){case"compositionend":return Jo(t);case"keypress":return t.which!==32?null:(Zo=!0,Qo);case"textInput":return e=t.data,e===Qo&&Zo?null:e;default:return null}}function up(e,t){if(zl)return e==="compositionend"||!Zi&&Ko(e,t)?(e=qo(),cs=Gi=ba=null,zl=!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 Xo&&t.locale!=="ko"?null:t.data;default:return null}}var dp={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 $o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dp[e.type]:t==="textarea"}function Wo(e,t,a,l){Sl?Nl?Nl.push(l):Nl=[l]:Sl=l,t=ti(t,"onChange"),0<t.length&&(a=new ds("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var dn=null,fn=null;function fp(e){Of(e,0)}function ms(e){var t=nn(e);if(Mo(t))return e}function Fo(e,t){if(e==="change")return t}var Io=!1;if(It){var Ki;if(It){var Ji="oninput"in document;if(!Ji){var Po=document.createElement("div");Po.setAttribute("oninput","return;"),Ji=typeof Po.oninput=="function"}Ki=Ji}else Ki=!1;Io=Ki&&(!document.documentMode||9<document.documentMode)}function eu(){dn&&(dn.detachEvent("onpropertychange",tu),fn=dn=null)}function tu(e){if(e.propertyName==="value"&&ms(fn)){var t=[];Wo(t,fn,e,Hi(e)),Ho(fp,t)}}function mp(e,t,a){e==="focusin"?(eu(),dn=t,fn=a,dn.attachEvent("onpropertychange",tu)):e==="focusout"&&eu()}function hp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ms(fn)}function pp(e,t){if(e==="click")return ms(t)}function gp(e,t){if(e==="input"||e==="change")return ms(t)}function xp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:xp;function mn(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var n=a[l];if(!ga.call(t,n)||!jt(e[n],t[n]))return!1}return!0}function au(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lu(e,t){var a=au(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=au(a)}}function nu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function su(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=is(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=is(e.document)}return t}function $i(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")}var yp=It&&"documentMode"in document&&11>=document.documentMode,kl=null,Wi=null,hn=null,Fi=!1;function iu(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Fi||kl==null||kl!==is(l)||(l=kl,"selectionStart"in l&&$i(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),hn&&mn(hn,l)||(hn=l,l=ti(Wi,"onSelect"),0<l.length&&(t=new ds("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=kl)))}function Wa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var El={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionrun:Wa("Transition","TransitionRun"),transitionstart:Wa("Transition","TransitionStart"),transitioncancel:Wa("Transition","TransitionCancel"),transitionend:Wa("Transition","TransitionEnd")},Ii={},ru={};It&&(ru=document.createElement("div").style,"AnimationEvent"in window||(delete El.animationend.animation,delete El.animationiteration.animation,delete El.animationstart.animation),"TransitionEvent"in window||delete El.transitionend.transition);function Fa(e){if(Ii[e])return Ii[e];if(!El[e])return e;var t=El[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in ru)return Ii[e]=t[a];return e}var cu=Fa("animationend"),ou=Fa("animationiteration"),uu=Fa("animationstart"),bp=Fa("transitionrun"),vp=Fa("transitionstart"),jp=Fa("transitioncancel"),du=Fa("transitionend"),fu=new Map,Pi="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Pi.push("scrollEnd");function Gt(e,t){fu.set(e,t),Ja(t,[e])}var hs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},At=[],Tl=0,er=0;function ps(){for(var e=Tl,t=er=Tl=0;t<e;){var a=At[t];At[t++]=null;var l=At[t];At[t++]=null;var n=At[t];At[t++]=null;var i=At[t];if(At[t++]=null,l!==null&&n!==null){var r=l.pending;r===null?n.next=n:(n.next=r.next,r.next=n),l.pending=n}i!==0&&mu(a,n,i)}}function gs(e,t,a,l){At[Tl++]=e,At[Tl++]=t,At[Tl++]=a,At[Tl++]=l,er|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function tr(e,t,a,l){return gs(e,t,a,l),xs(e)}function Ia(e,t){return gs(e,null,null,t),xs(e)}function mu(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var n=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-vt(a),e=i.hiddenUpdates,l=e[n],l===null?e[n]=[t]:l.push(t),t.lane=a|536870912),i):null}function xs(e){if(50<Un)throw Un=0,uc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var wl={};function Sp(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,a,l){return new Sp(e,t,a,l)}function ar(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pt(e,t){var a=e.alternate;return a===null?(a=St(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function hu(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ys(e,t,a,l,n,i){var r=0;if(l=e,typeof e=="function")ar(e)&&(r=1);else if(typeof e=="string")r=Tg(e,a,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=St(31,a,t,n),e.elementType=ee,e.lanes=i,e;case X:return Pa(a.children,n,i,t);case L:r=8,n|=24;break;case ue:return e=St(12,a,t,n|2),e.elementType=ue,e.lanes=i,e;case be:return e=St(13,a,t,n),e.elementType=be,e.lanes=i,e;case H:return e=St(19,a,t,n),e.elementType=H,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P:r=10;break e;case re:r=9;break e;case pe:r=11;break e;case K:r=14;break e;case C:r=16,l=null;break e}r=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=St(r,a,t,n),t.elementType=e,t.type=l,t.lanes=i,t}function Pa(e,t,a,l){return e=St(7,e,l,t),e.lanes=a,e}function lr(e,t,a){return e=St(6,e,null,t),e.lanes=a,e}function pu(e){var t=St(18,null,null,0);return t.stateNode=e,t}function nr(e,t,a){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gu=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var a=gu.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Pl(t)},gu.set(e,t),t)}return{value:e,source:t,stack:Pl(t)}}var Cl=[],Al=0,bs=null,pn=0,_t=[],Ot=0,va=null,Qt=1,Zt="";function ea(e,t){Cl[Al++]=pn,Cl[Al++]=bs,bs=e,pn=t}function xu(e,t,a){_t[Ot++]=Qt,_t[Ot++]=Zt,_t[Ot++]=va,va=e;var l=Qt;e=Zt;var n=32-vt(l)-1;l&=~(1<<n),a+=1;var i=32-vt(t)+n;if(30<i){var r=n-n%5;i=(l&(1<<r)-1).toString(32),l>>=r,n-=r,Qt=1<<32-vt(t)+n|a<<n|l,Zt=i+e}else Qt=1<<i|a<<n|l,Zt=e}function sr(e){e.return!==null&&(ea(e,1),xu(e,1,0))}function ir(e){for(;e===bs;)bs=Cl[--Al],Cl[Al]=null,pn=Cl[--Al],Cl[Al]=null;for(;e===va;)va=_t[--Ot],_t[Ot]=null,Zt=_t[--Ot],_t[Ot]=null,Qt=_t[--Ot],_t[Ot]=null}function yu(e,t){_t[Ot++]=Qt,_t[Ot++]=Zt,_t[Ot++]=va,Qt=t.id,Zt=t.overflow,va=e}var nt=null,Ue=null,Se=!1,ja=null,Dt=!1,rr=Error(o(519));function Sa(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gn(Mt(t,e)),rr}function bu(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[lt]=e,t[dt]=l,a){case"dialog":ye("cancel",t),ye("close",t);break;case"iframe":case"object":case"embed":ye("load",t);break;case"video":case"audio":for(a=0;a<Hn.length;a++)ye(Hn[a],t);break;case"source":ye("error",t);break;case"img":case"image":case"link":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"input":ye("invalid",t),_o(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ye("invalid",t);break;case"textarea":ye("invalid",t),Do(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Bf(t.textContent,a)?(l.popover!=null&&(ye("beforetoggle",t),ye("toggle",t)),l.onScroll!=null&&ye("scroll",t),l.onScrollEnd!=null&&ye("scrollend",t),l.onClick!=null&&(t.onclick=Ft),t=!0):t=!1,t||Sa(e,!0)}function vu(e){for(nt=e.return;nt;)switch(nt.tag){case 5:case 31:case 13:Dt=!1;return;case 27:case 3:Dt=!0;return;default:nt=nt.return}}function Ml(e){if(e!==nt)return!1;if(!Se)return vu(e),Se=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||kc(e.type,e.memoizedProps)),a=!a),a&&Ue&&Sa(e),vu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ue=Zf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Ue=Zf(e)}else t===27?(t=Ue,Ua(e.type)?(e=Ac,Ac=null,Ue=e):Ue=t):Ue=nt?Ut(e.stateNode.nextSibling):null;return!0}function el(){Ue=nt=null,Se=!1}function cr(){var e=ja;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),ja=null),e}function gn(e){ja===null?ja=[e]:ja.push(e)}var or=v(null),tl=null,ta=null;function Na(e,t,a){Q(or,t._currentValue),t._currentValue=a}function aa(e){e._currentValue=or.current,R(or)}function ur(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function dr(e,t,a,l){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var r=n.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=n;for(var p=0;p<t.length;p++)if(d.context===t[p]){i.lanes|=a,d=i.alternate,d!==null&&(d.lanes|=a),ur(i.return,a,e),l||(r=null);break e}i=d.next}}else if(n.tag===18){if(r=n.return,r===null)throw Error(o(341));r.lanes|=a,i=r.alternate,i!==null&&(i.lanes|=a),ur(r,a,e),r=null}else r=n.child;if(r!==null)r.return=n;else for(r=n;r!==null;){if(r===e){r=null;break}if(n=r.sibling,n!==null){n.return=r.return,r=n;break}r=r.return}n=r}}function _l(e,t,a,l){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var r=n.alternate;if(r===null)throw Error(o(387));if(r=r.memoizedProps,r!==null){var d=n.type;jt(n.pendingProps.value,r.value)||(e!==null?e.push(d):e=[d])}}else if(n===ce.current){if(r=n.alternate,r===null)throw Error(o(387));r.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Vn):e=[Vn])}n=n.return}e!==null&&dr(t,e,a,l),t.flags|=262144}function vs(e){for(e=e.firstContext;e!==null;){if(!jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function al(e){tl=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function st(e){return ju(tl,e)}function js(e,t){return tl===null&&al(e),ju(e,t)}function ju(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ta===null){if(e===null)throw Error(o(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return a}var Np=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},zp=c.unstable_scheduleCallback,kp=c.unstable_NormalPriority,Ke={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fr(){return{controller:new Np,data:new Map,refCount:0}}function xn(e){e.refCount--,e.refCount===0&&zp(kp,function(){e.controller.abort()})}var yn=null,mr=0,Ol=0,Dl=null;function Ep(e,t){if(yn===null){var a=yn=[];mr=0,Ol=gc(),Dl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return mr++,t.then(Su,Su),t}function Su(){if(--mr===0&&yn!==null){Dl!==null&&(Dl.status="fulfilled");var e=yn;yn=null,Ol=0,Dl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tp(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var n=0;n<a.length;n++)(0,a[n])(t)},function(n){for(l.status="rejected",l.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),l}var Nu=w.S;w.S=function(e,t){rf=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ep(e,t),Nu!==null&&Nu(e,t)};var ll=v(null);function hr(){var e=ll.current;return e!==null?e:_e.pooledCache}function Ss(e,t){t===null?Q(ll,ll.current):Q(ll,t.pool)}function zu(){var e=hr();return e===null?null:{parent:Ke._currentValue,pool:e}}var Rl=Error(o(460)),pr=Error(o(474)),Ns=Error(o(542)),zs={then:function(){}};function ku(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Eu(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ft,Ft),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wu(e),e;default:if(typeof t.status=="string")t.then(Ft,Ft);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=l}},function(l){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wu(e),e}throw sl=t,Rl}}function nl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(sl=a,Rl):a}}var sl=null;function Tu(){if(sl===null)throw Error(o(459));var e=sl;return sl=null,e}function wu(e){if(e===Rl||e===Ns)throw Error(o(483))}var Ul=null,bn=0;function ks(e){var t=bn;return bn+=1,Ul===null&&(Ul=[]),Eu(Ul,e,t)}function vn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Es(e,t){throw t.$$typeof===q?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Cu(e){function t(j,b){if(e){var N=j.deletions;N===null?(j.deletions=[b],j.flags|=16):N.push(b)}}function a(j,b){if(!e)return null;for(;b!==null;)t(j,b),b=b.sibling;return null}function l(j){for(var b=new Map;j!==null;)j.key!==null?b.set(j.key,j):b.set(j.index,j),j=j.sibling;return b}function n(j,b){return j=Pt(j,b),j.index=0,j.sibling=null,j}function i(j,b,N){return j.index=N,e?(N=j.alternate,N!==null?(N=N.index,N<b?(j.flags|=67108866,b):N):(j.flags|=67108866,b)):(j.flags|=1048576,b)}function r(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function d(j,b,N,O){return b===null||b.tag!==6?(b=lr(N,j.mode,O),b.return=j,b):(b=n(b,N),b.return=j,b)}function p(j,b,N,O){var ne=N.type;return ne===X?_(j,b,N.props.children,O,N.key):b!==null&&(b.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===C&&nl(ne)===b.type)?(b=n(b,N.props),vn(b,N),b.return=j,b):(b=ys(N.type,N.key,N.props,null,j.mode,O),vn(b,N),b.return=j,b)}function z(j,b,N,O){return b===null||b.tag!==4||b.stateNode.containerInfo!==N.containerInfo||b.stateNode.implementation!==N.implementation?(b=nr(N,j.mode,O),b.return=j,b):(b=n(b,N.children||[]),b.return=j,b)}function _(j,b,N,O,ne){return b===null||b.tag!==7?(b=Pa(N,j.mode,O,ne),b.return=j,b):(b=n(b,N),b.return=j,b)}function U(j,b,N){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return b=lr(""+b,j.mode,N),b.return=j,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case D:return N=ys(b.type,b.key,b.props,null,j.mode,N),vn(N,b),N.return=j,N;case V:return b=nr(b,j.mode,N),b.return=j,b;case C:return b=nl(b),U(j,b,N)}if(Le(b)||Oe(b))return b=Pa(b,j.mode,N,null),b.return=j,b;if(typeof b.then=="function")return U(j,ks(b),N);if(b.$$typeof===P)return U(j,js(j,b),N);Es(j,b)}return null}function k(j,b,N,O){var ne=b!==null?b.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return ne!==null?null:d(j,b,""+N,O);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case D:return N.key===ne?p(j,b,N,O):null;case V:return N.key===ne?z(j,b,N,O):null;case C:return N=nl(N),k(j,b,N,O)}if(Le(N)||Oe(N))return ne!==null?null:_(j,b,N,O,null);if(typeof N.then=="function")return k(j,b,ks(N),O);if(N.$$typeof===P)return k(j,b,js(j,N),O);Es(j,N)}return null}function T(j,b,N,O,ne){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return j=j.get(N)||null,d(b,j,""+O,ne);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case D:return j=j.get(O.key===null?N:O.key)||null,p(b,j,O,ne);case V:return j=j.get(O.key===null?N:O.key)||null,z(b,j,O,ne);case C:return O=nl(O),T(j,b,N,O,ne)}if(Le(O)||Oe(O))return j=j.get(N)||null,_(b,j,O,ne,null);if(typeof O.then=="function")return T(j,b,N,ks(O),ne);if(O.$$typeof===P)return T(j,b,N,js(b,O),ne);Es(b,O)}return null}function J(j,b,N,O){for(var ne=null,ze=null,I=b,me=b=0,je=null;I!==null&&me<N.length;me++){I.index>me?(je=I,I=null):je=I.sibling;var ke=k(j,I,N[me],O);if(ke===null){I===null&&(I=je);break}e&&I&&ke.alternate===null&&t(j,I),b=i(ke,b,me),ze===null?ne=ke:ze.sibling=ke,ze=ke,I=je}if(me===N.length)return a(j,I),Se&&ea(j,me),ne;if(I===null){for(;me<N.length;me++)I=U(j,N[me],O),I!==null&&(b=i(I,b,me),ze===null?ne=I:ze.sibling=I,ze=I);return Se&&ea(j,me),ne}for(I=l(I);me<N.length;me++)je=T(I,j,me,N[me],O),je!==null&&(e&&je.alternate!==null&&I.delete(je.key===null?me:je.key),b=i(je,b,me),ze===null?ne=je:ze.sibling=je,ze=je);return e&&I.forEach(function(Ga){return t(j,Ga)}),Se&&ea(j,me),ne}function se(j,b,N,O){if(N==null)throw Error(o(151));for(var ne=null,ze=null,I=b,me=b=0,je=null,ke=N.next();I!==null&&!ke.done;me++,ke=N.next()){I.index>me?(je=I,I=null):je=I.sibling;var Ga=k(j,I,ke.value,O);if(Ga===null){I===null&&(I=je);break}e&&I&&Ga.alternate===null&&t(j,I),b=i(Ga,b,me),ze===null?ne=Ga:ze.sibling=Ga,ze=Ga,I=je}if(ke.done)return a(j,I),Se&&ea(j,me),ne;if(I===null){for(;!ke.done;me++,ke=N.next())ke=U(j,ke.value,O),ke!==null&&(b=i(ke,b,me),ze===null?ne=ke:ze.sibling=ke,ze=ke);return Se&&ea(j,me),ne}for(I=l(I);!ke.done;me++,ke=N.next())ke=T(I,j,me,ke.value,O),ke!==null&&(e&&ke.alternate!==null&&I.delete(ke.key===null?me:ke.key),b=i(ke,b,me),ze===null?ne=ke:ze.sibling=ke,ze=ke);return e&&I.forEach(function(Hg){return t(j,Hg)}),Se&&ea(j,me),ne}function Me(j,b,N,O){if(typeof N=="object"&&N!==null&&N.type===X&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case D:e:{for(var ne=N.key;b!==null;){if(b.key===ne){if(ne=N.type,ne===X){if(b.tag===7){a(j,b.sibling),O=n(b,N.props.children),O.return=j,j=O;break e}}else if(b.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===C&&nl(ne)===b.type){a(j,b.sibling),O=n(b,N.props),vn(O,N),O.return=j,j=O;break e}a(j,b);break}else t(j,b);b=b.sibling}N.type===X?(O=Pa(N.props.children,j.mode,O,N.key),O.return=j,j=O):(O=ys(N.type,N.key,N.props,null,j.mode,O),vn(O,N),O.return=j,j=O)}return r(j);case V:e:{for(ne=N.key;b!==null;){if(b.key===ne)if(b.tag===4&&b.stateNode.containerInfo===N.containerInfo&&b.stateNode.implementation===N.implementation){a(j,b.sibling),O=n(b,N.children||[]),O.return=j,j=O;break e}else{a(j,b);break}else t(j,b);b=b.sibling}O=nr(N,j.mode,O),O.return=j,j=O}return r(j);case C:return N=nl(N),Me(j,b,N,O)}if(Le(N))return J(j,b,N,O);if(Oe(N)){if(ne=Oe(N),typeof ne!="function")throw Error(o(150));return N=ne.call(N),se(j,b,N,O)}if(typeof N.then=="function")return Me(j,b,ks(N),O);if(N.$$typeof===P)return Me(j,b,js(j,N),O);Es(j,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,b!==null&&b.tag===6?(a(j,b.sibling),O=n(b,N),O.return=j,j=O):(a(j,b),O=lr(N,j.mode,O),O.return=j,j=O),r(j)):a(j,b)}return function(j,b,N,O){try{bn=0;var ne=Me(j,b,N,O);return Ul=null,ne}catch(I){if(I===Rl||I===Ns)throw I;var ze=St(29,I,null,j.mode);return ze.lanes=O,ze.return=j,ze}finally{}}}var il=Cu(!0),Au=Cu(!1),za=!1;function gr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function xr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ea(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ee&2)!==0){var n=l.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),l.pending=t,t=xs(e),mu(e,null,a),t}return gs(e,l,t,a),xs(e)}function jn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,jo(e,a)}}function yr(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var n=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var r={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?n=i=r:i=i.next=r,a=a.next}while(a!==null);i===null?n=i=t:i=i.next=t}else n=i=t;a={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var br=!1;function Sn(){if(br){var e=Dl;if(e!==null)throw e}}function Nn(e,t,a,l){br=!1;var n=e.updateQueue;za=!1;var i=n.firstBaseUpdate,r=n.lastBaseUpdate,d=n.shared.pending;if(d!==null){n.shared.pending=null;var p=d,z=p.next;p.next=null,r===null?i=z:r.next=z,r=p;var _=e.alternate;_!==null&&(_=_.updateQueue,d=_.lastBaseUpdate,d!==r&&(d===null?_.firstBaseUpdate=z:d.next=z,_.lastBaseUpdate=p))}if(i!==null){var U=n.baseState;r=0,_=z=p=null,d=i;do{var k=d.lane&-536870913,T=k!==d.lane;if(T?(ve&k)===k:(l&k)===k){k!==0&&k===Ol&&(br=!0),_!==null&&(_=_.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var J=e,se=d;k=t;var Me=a;switch(se.tag){case 1:if(J=se.payload,typeof J=="function"){U=J.call(Me,U,k);break e}U=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=se.payload,k=typeof J=="function"?J.call(Me,U,k):J,k==null)break e;U=S({},U,k);break e;case 2:za=!0}}k=d.callback,k!==null&&(e.flags|=64,T&&(e.flags|=8192),T=n.callbacks,T===null?n.callbacks=[k]:T.push(k))}else T={lane:k,tag:d.tag,payload:d.payload,callback:d.callback,next:null},_===null?(z=_=T,p=U):_=_.next=T,r|=k;if(d=d.next,d===null){if(d=n.shared.pending,d===null)break;T=d,d=T.next,T.next=null,n.lastBaseUpdate=T,n.shared.pending=null}}while(!0);_===null&&(p=U),n.baseState=p,n.firstBaseUpdate=z,n.lastBaseUpdate=_,i===null&&(n.shared.lanes=0),Ma|=r,e.lanes=r,e.memoizedState=U}}function Mu(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function _u(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Mu(a[e],t)}var Bl=v(null),Ts=v(0);function Ou(e,t){e=da,Q(Ts,e),Q(Bl,t),da=e|t.baseLanes}function vr(){Q(Ts,da),Q(Bl,Bl.current)}function jr(){da=Ts.current,R(Bl),R(Ts)}var Nt=v(null),Rt=null;function Ta(e){var t=e.alternate;Q(Xe,Xe.current&1),Q(Nt,e),Rt===null&&(t===null||Bl.current!==null||t.memoizedState!==null)&&(Rt=e)}function Sr(e){Q(Xe,Xe.current),Q(Nt,e),Rt===null&&(Rt=e)}function Du(e){e.tag===22?(Q(Xe,Xe.current),Q(Nt,e),Rt===null&&(Rt=e)):wa()}function wa(){Q(Xe,Xe.current),Q(Nt,Nt.current)}function zt(e){R(Nt),Rt===e&&(Rt=null),R(Xe)}var Xe=v(0);function ws(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||wc(a)||Cc(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var la=0,fe=null,Ce=null,Je=null,Cs=!1,Hl=!1,rl=!1,As=0,zn=0,ql=null,wp=0;function Ye(){throw Error(o(321))}function Nr(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!jt(e[a],t[a]))return!1;return!0}function zr(e,t,a,l,n,i){return la=i,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?xd:qr,rl=!1,i=a(l,n),rl=!1,Hl&&(i=Uu(t,a,l,n)),Ru(e),i}function Ru(e){w.H=Tn;var t=Ce!==null&&Ce.next!==null;if(la=0,Je=Ce=fe=null,Cs=!1,zn=0,ql=null,t)throw Error(o(300));e===null||$e||(e=e.dependencies,e!==null&&vs(e)&&($e=!0))}function Uu(e,t,a,l){fe=e;var n=0;do{if(Hl&&(ql=null),zn=0,Hl=!1,25<=n)throw Error(o(301));if(n+=1,Je=Ce=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}w.H=yd,i=t(a,l)}while(Hl);return i}function Cp(){var e=w.H,t=e.useState()[0];return t=typeof t.then=="function"?kn(t):t,e=e.useState()[0],(Ce!==null?Ce.memoizedState:null)!==e&&(fe.flags|=1024),t}function kr(){var e=As!==0;return As=0,e}function Er(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Tr(e){if(Cs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cs=!1}la=0,Je=Ce=fe=null,Hl=!1,zn=As=0,ql=null}function ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?fe.memoizedState=Je=e:Je=Je.next=e,Je}function Qe(){if(Ce===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=Je===null?fe.memoizedState:Je.next;if(t!==null)Je=t,Ce=e;else{if(e===null)throw fe.alternate===null?Error(o(467)):Error(o(310));Ce=e,e={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Je===null?fe.memoizedState=Je=e:Je=Je.next=e}return Je}function Ms(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kn(e){var t=zn;return zn+=1,ql===null&&(ql=[]),e=Eu(ql,e,t),t=fe,(Je===null?t.memoizedState:Je.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?xd:qr),e}function _s(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kn(e);if(e.$$typeof===P)return st(e)}throw Error(o(438,String(e)))}function wr(e){var t=null,a=fe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=fe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ms(),fe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=Ne;return t.index++,a}function na(e,t){return typeof t=="function"?t(e):t}function Os(e){var t=Qe();return Cr(t,Ce,e)}function Cr(e,t,a){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=a;var n=e.baseQueue,i=l.pending;if(i!==null){if(n!==null){var r=n.next;n.next=i.next,i.next=r}t.baseQueue=n=i,l.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var d=r=null,p=null,z=t,_=!1;do{var U=z.lane&-536870913;if(U!==z.lane?(ve&U)===U:(la&U)===U){var k=z.revertLane;if(k===0)p!==null&&(p=p.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),U===Ol&&(_=!0);else if((la&k)===k){z=z.next,k===Ol&&(_=!0);continue}else U={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},p===null?(d=p=U,r=i):p=p.next=U,fe.lanes|=k,Ma|=k;U=z.action,rl&&a(i,U),i=z.hasEagerState?z.eagerState:a(i,U)}else k={lane:U,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},p===null?(d=p=k,r=i):p=p.next=k,fe.lanes|=U,Ma|=U;z=z.next}while(z!==null&&z!==t);if(p===null?r=i:p.next=d,!jt(i,e.memoizedState)&&($e=!0,_&&(a=Dl,a!==null)))throw a;e.memoizedState=i,e.baseState=r,e.baseQueue=p,l.lastRenderedState=i}return n===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ar(e){var t=Qe(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var l=a.dispatch,n=a.pending,i=t.memoizedState;if(n!==null){a.pending=null;var r=n=n.next;do i=e(i,r.action),r=r.next;while(r!==n);jt(i,t.memoizedState)||($e=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Bu(e,t,a){var l=fe,n=Qe(),i=Se;if(i){if(a===void 0)throw Error(o(407));a=a()}else a=t();var r=!jt((Ce||n).memoizedState,a);if(r&&(n.memoizedState=a,$e=!0),n=n.queue,Or(Lu.bind(null,l,n,e),[e]),n.getSnapshot!==t||r||Je!==null&&Je.memoizedState.tag&1){if(l.flags|=2048,Ll(9,{destroy:void 0},qu.bind(null,l,n,a,t),null),_e===null)throw Error(o(349));i||(la&127)!==0||Hu(l,t,a)}return a}function Hu(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=fe.updateQueue,t===null?(t=Ms(),fe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function qu(e,t,a,l){t.value=a,t.getSnapshot=l,Gu(t)&&Yu(e)}function Lu(e,t,a){return a(function(){Gu(t)&&Yu(e)})}function Gu(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!jt(e,a)}catch{return!0}}function Yu(e){var t=Ia(e,2);t!==null&&xt(t,e,2)}function Mr(e){var t=ot();if(typeof e=="function"){var a=e;if(e=a(),rl){xa(!0);try{a()}finally{xa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:e},t}function Vu(e,t,a,l){return e.baseState=a,Cr(e,Ce,typeof l=="function"?l:na)}function Ap(e,t,a,l,n){if(Us(e))throw Error(o(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){i.listeners.push(r)}};w.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,Xu(t,i)):(i.next=a.next,t.pending=a.next=i)}}function Xu(e,t){var a=t.action,l=t.payload,n=e.state;if(t.isTransition){var i=w.T,r={};w.T=r;try{var d=a(n,l),p=w.S;p!==null&&p(r,d),Qu(e,t,d)}catch(z){_r(e,t,z)}finally{i!==null&&r.types!==null&&(i.types=r.types),w.T=i}}else try{i=a(n,l),Qu(e,t,i)}catch(z){_r(e,t,z)}}function Qu(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Zu(e,t,l)},function(l){return _r(e,t,l)}):Zu(e,t,a)}function Zu(e,t,a){t.status="fulfilled",t.value=a,Ku(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Xu(e,a)))}function _r(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Ku(t),t=t.next;while(t!==l)}e.action=null}function Ku(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ju(e,t){return t}function $u(e,t){if(Se){var a=_e.formState;if(a!==null){e:{var l=fe;if(Se){if(Ue){t:{for(var n=Ue,i=Dt;n.nodeType!==8;){if(!i){n=null;break t}if(n=Ut(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Ue=Ut(n.nextSibling),l=n.data==="F!";break e}}Sa(l)}l=!1}l&&(t=a[0])}}return a=ot(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ju,lastRenderedState:t},a.queue=l,a=hd.bind(null,fe,l),l.dispatch=a,l=Mr(!1),i=Hr.bind(null,fe,!1,l.queue),l=ot(),n={state:t,dispatch:null,action:e,pending:null},l.queue=n,a=Ap.bind(null,fe,n,i,a),n.dispatch=a,l.memoizedState=e,[t,a,!1]}function Wu(e){var t=Qe();return Fu(t,Ce,e)}function Fu(e,t,a){if(t=Cr(e,t,Ju)[0],e=Os(na)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=kn(t)}catch(r){throw r===Rl?Ns:r}else l=t;t=Qe();var n=t.queue,i=n.dispatch;return a!==t.memoizedState&&(fe.flags|=2048,Ll(9,{destroy:void 0},Mp.bind(null,n,a),null)),[l,i,e]}function Mp(e,t){e.action=t}function Iu(e){var t=Qe(),a=Ce;if(a!==null)return Fu(t,a,e);Qe(),t=t.memoizedState,a=Qe();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Ll(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=fe.updateQueue,t===null&&(t=Ms(),fe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Pu(){return Qe().memoizedState}function Ds(e,t,a,l){var n=ot();fe.flags|=e,n.memoizedState=Ll(1|t,{destroy:void 0},a,l===void 0?null:l)}function Rs(e,t,a,l){var n=Qe();l=l===void 0?null:l;var i=n.memoizedState.inst;Ce!==null&&l!==null&&Nr(l,Ce.memoizedState.deps)?n.memoizedState=Ll(t,i,a,l):(fe.flags|=e,n.memoizedState=Ll(1|t,i,a,l))}function ed(e,t){Ds(8390656,8,e,t)}function Or(e,t){Rs(2048,8,e,t)}function _p(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=Ms(),fe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function td(e){var t=Qe().memoizedState;return _p({ref:t,nextImpl:e}),function(){if((Ee&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function ad(e,t){return Rs(4,2,e,t)}function ld(e,t){return Rs(4,4,e,t)}function nd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sd(e,t,a){a=a!=null?a.concat([e]):null,Rs(4,4,nd.bind(null,t,e),a)}function Dr(){}function id(e,t){var a=Qe();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Nr(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function rd(e,t){var a=Qe();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Nr(t,l[1]))return l[0];if(l=e(),rl){xa(!0);try{e()}finally{xa(!1)}}return a.memoizedState=[l,t],l}function Rr(e,t,a){return a===void 0||(la&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=of(),fe.lanes|=e,Ma|=e,a)}function cd(e,t,a,l){return jt(a,t)?a:Bl.current!==null?(e=Rr(e,a,l),jt(e,t)||($e=!0),e):(la&42)===0||(la&1073741824)!==0&&(ve&261930)===0?($e=!0,e.memoizedState=a):(e=of(),fe.lanes|=e,Ma|=e,t)}function od(e,t,a,l,n){var i=Y.p;Y.p=i!==0&&8>i?i:8;var r=w.T,d={};w.T=d,Hr(e,!1,t,a);try{var p=n(),z=w.S;if(z!==null&&z(d,p),p!==null&&typeof p=="object"&&typeof p.then=="function"){var _=Tp(p,l);En(e,t,_,Tt(e))}else En(e,t,l,Tt(e))}catch(U){En(e,t,{then:function(){},status:"rejected",reason:U},Tt())}finally{Y.p=i,r!==null&&d.types!==null&&(r.types=d.types),w.T=r}}function Op(){}function Ur(e,t,a,l){if(e.tag!==5)throw Error(o(476));var n=ud(e).queue;od(e,n,t,F,a===null?Op:function(){return dd(e),a(l)})}function ud(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:F},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function dd(e){var t=ud(e);t.next===null&&(t=e.alternate.memoizedState),En(e,t.next.queue,{},Tt())}function Br(){return st(Vn)}function fd(){return Qe().memoizedState}function md(){return Qe().memoizedState}function Dp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Tt();e=ka(a);var l=Ea(t,e,a);l!==null&&(xt(l,t,a),jn(l,t,a)),t={cache:fr()},e.payload=t;return}t=t.return}}function Rp(e,t,a){var l=Tt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Us(e)?pd(t,a):(a=tr(e,t,a,l),a!==null&&(xt(a,e,l),gd(a,t,l)))}function hd(e,t,a){var l=Tt();En(e,t,a,l)}function En(e,t,a,l){var n={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Us(e))pd(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var r=t.lastRenderedState,d=i(r,a);if(n.hasEagerState=!0,n.eagerState=d,jt(d,r))return gs(e,t,n,0),_e===null&&ps(),!1}catch{}finally{}if(a=tr(e,t,n,l),a!==null)return xt(a,e,l),gd(a,t,l),!0}return!1}function Hr(e,t,a,l){if(l={lane:2,revertLane:gc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Us(e)){if(t)throw Error(o(479))}else t=tr(e,a,l,2),t!==null&&xt(t,e,2)}function Us(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function pd(e,t){Hl=Cs=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function gd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,jo(e,a)}}var Tn={readContext:st,use:_s,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Tn.useEffectEvent=Ye;var xd={readContext:st,use:_s,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:ed,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ds(4194308,4,nd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ds(4194308,4,e,t)},useInsertionEffect:function(e,t){Ds(4,2,e,t)},useMemo:function(e,t){var a=ot();t=t===void 0?null:t;var l=e();if(rl){xa(!0);try{e()}finally{xa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=ot();if(a!==void 0){var n=a(t);if(rl){xa(!0);try{a(t)}finally{xa(!1)}}}else n=t;return l.memoizedState=l.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=Rp.bind(null,fe,e),[l.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:function(e){e=Mr(e);var t=e.queue,a=hd.bind(null,fe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Dr,useDeferredValue:function(e,t){var a=ot();return Rr(a,e,t)},useTransition:function(){var e=Mr(!1);return e=od.bind(null,fe,e.queue,!0,!1),ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=fe,n=ot();if(Se){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),_e===null)throw Error(o(349));(ve&127)!==0||Hu(l,t,a)}n.memoizedState=a;var i={value:a,getSnapshot:t};return n.queue=i,ed(Lu.bind(null,l,i,e),[e]),l.flags|=2048,Ll(9,{destroy:void 0},qu.bind(null,l,i,a,t),null),a},useId:function(){var e=ot(),t=_e.identifierPrefix;if(Se){var a=Zt,l=Qt;a=(l&~(1<<32-vt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=As++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=wp++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Br,useFormState:$u,useActionState:$u,useOptimistic:function(e){var t=ot();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Hr.bind(null,fe,!0,a),a.dispatch=t,[e,t]},useMemoCache:wr,useCacheRefresh:function(){return ot().memoizedState=Dp.bind(null,fe)},useEffectEvent:function(e){var t=ot(),a={impl:e};return t.memoizedState=a,function(){if((Ee&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},qr={readContext:st,use:_s,useCallback:id,useContext:st,useEffect:Or,useImperativeHandle:sd,useInsertionEffect:ad,useLayoutEffect:ld,useMemo:rd,useReducer:Os,useRef:Pu,useState:function(){return Os(na)},useDebugValue:Dr,useDeferredValue:function(e,t){var a=Qe();return cd(a,Ce.memoizedState,e,t)},useTransition:function(){var e=Os(na)[0],t=Qe().memoizedState;return[typeof e=="boolean"?e:kn(e),t]},useSyncExternalStore:Bu,useId:fd,useHostTransitionStatus:Br,useFormState:Wu,useActionState:Wu,useOptimistic:function(e,t){var a=Qe();return Vu(a,Ce,e,t)},useMemoCache:wr,useCacheRefresh:md};qr.useEffectEvent=td;var yd={readContext:st,use:_s,useCallback:id,useContext:st,useEffect:Or,useImperativeHandle:sd,useInsertionEffect:ad,useLayoutEffect:ld,useMemo:rd,useReducer:Ar,useRef:Pu,useState:function(){return Ar(na)},useDebugValue:Dr,useDeferredValue:function(e,t){var a=Qe();return Ce===null?Rr(a,e,t):cd(a,Ce.memoizedState,e,t)},useTransition:function(){var e=Ar(na)[0],t=Qe().memoizedState;return[typeof e=="boolean"?e:kn(e),t]},useSyncExternalStore:Bu,useId:fd,useHostTransitionStatus:Br,useFormState:Iu,useActionState:Iu,useOptimistic:function(e,t){var a=Qe();return Ce!==null?Vu(a,Ce,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:wr,useCacheRefresh:md};yd.useEffectEvent=td;function Lr(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:S({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Gr={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Tt(),n=ka(l);n.payload=t,a!=null&&(n.callback=a),t=Ea(e,n,l),t!==null&&(xt(t,e,l),jn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Tt(),n=ka(l);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=Ea(e,n,l),t!==null&&(xt(t,e,l),jn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Tt(),l=ka(a);l.tag=2,t!=null&&(l.callback=t),t=Ea(e,l,a),t!==null&&(xt(t,e,a),jn(t,e,a))}};function bd(e,t,a,l,n,i,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,r):t.prototype&&t.prototype.isPureReactComponent?!mn(a,l)||!mn(n,i):!0}function vd(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Gr.enqueueReplaceState(t,t.state,null)}function cl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=S({},a));for(var n in e)a[n]===void 0&&(a[n]=e[n])}return a}function jd(e){hs(e)}function Sd(e){console.error(e)}function Nd(e){hs(e)}function Bs(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function zd(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Yr(e,t,a){return a=ka(a),a.tag=3,a.payload={element:null},a.callback=function(){Bs(e,t)},a}function kd(e){return e=ka(e),e.tag=3,e}function Ed(e,t,a,l){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var i=l.value;e.payload=function(){return n(i)},e.callback=function(){zd(t,a,l)}}var r=a.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){zd(t,a,l),typeof n!="function"&&(_a===null?_a=new Set([this]):_a.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function Up(e,t,a,l,n){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&_l(t,a,n,!0),a=Nt.current,a!==null){switch(a.tag){case 31:case 13:return Rt===null?$s():a.alternate===null&&Ve===0&&(Ve=3),a.flags&=-257,a.flags|=65536,a.lanes=n,l===zs?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),mc(e,l,n)),!1;case 22:return a.flags|=65536,l===zs?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),mc(e,l,n)),!1}throw Error(o(435,a.tag))}return mc(e,l,n),$s(),!1}if(Se)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,l!==rr&&(e=Error(o(422),{cause:l}),gn(Mt(e,a)))):(l!==rr&&(t=Error(o(423),{cause:l}),gn(Mt(t,a))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,l=Mt(l,a),n=Yr(e.stateNode,l,n),yr(e,n),Ve!==4&&(Ve=2)),!1;var i=Error(o(520),{cause:l});if(i=Mt(i,a),Rn===null?Rn=[i]:Rn.push(i),Ve!==4&&(Ve=2),t===null)return!0;l=Mt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=n&-n,a.lanes|=e,e=Yr(a.stateNode,l,e),yr(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(_a===null||!_a.has(i))))return a.flags|=65536,n&=-n,a.lanes|=n,n=kd(n),Ed(n,e,a,l),yr(a,n),!1}a=a.return}while(a!==null);return!1}var Vr=Error(o(461)),$e=!1;function it(e,t,a,l){t.child=e===null?Au(t,null,a,l):il(t,e.child,a,l)}function Td(e,t,a,l,n){a=a.render;var i=t.ref;if("ref"in l){var r={};for(var d in l)d!=="ref"&&(r[d]=l[d])}else r=l;return al(t),l=zr(e,t,a,r,i,n),d=kr(),e!==null&&!$e?(Er(e,t,n),sa(e,t,n)):(Se&&d&&sr(t),t.flags|=1,it(e,t,l,n),t.child)}function wd(e,t,a,l,n){if(e===null){var i=a.type;return typeof i=="function"&&!ar(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Cd(e,t,i,l,n)):(e=ys(a.type,null,l,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Fr(e,n)){var r=i.memoizedProps;if(a=a.compare,a=a!==null?a:mn,a(r,l)&&e.ref===t.ref)return sa(e,t,n)}return t.flags|=1,e=Pt(i,l),e.ref=t.ref,e.return=t,t.child=e}function Cd(e,t,a,l,n){if(e!==null){var i=e.memoizedProps;if(mn(i,l)&&e.ref===t.ref)if($e=!1,t.pendingProps=l=i,Fr(e,n))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,sa(e,t,n)}return Xr(e,t,a,l,n)}function Ad(e,t,a,l){var n=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,n=0;l!==null;)n=n|l.lanes|l.childLanes,l=l.sibling;l=n&~i}else l=0,t.child=null;return Md(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ss(t,i!==null?i.cachePool:null),i!==null?Ou(t,i):vr(),Du(t);else return l=t.lanes=536870912,Md(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(Ss(t,i.cachePool),Ou(t,i),wa(),t.memoizedState=null):(e!==null&&Ss(t,null),vr(),wa());return it(e,t,n,a),t.child}function wn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Md(e,t,a,l,n){var i=hr();return i=i===null?null:{parent:Ke._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Ss(t,null),vr(),Du(t),e!==null&&_l(e,t,l,!0),t.childLanes=n,null}function Hs(e,t){return t=Ls({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _d(e,t,a){return il(t,e.child,null,a),e=Hs(t,t.pendingProps),e.flags|=2,zt(t),t.memoizedState=null,e}function Bp(e,t,a){var l=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(l.mode==="hidden")return e=Hs(t,l),t.lanes=536870912,wn(null,e);if(Sr(t),(e=Ue)?(e=Qf(e,Dt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:va!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=pu(e),a.return=t,t.child=a,nt=t,Ue=null)):e=null,e===null)throw Sa(t);return t.lanes=536870912,null}return Hs(t,l)}var i=e.memoizedState;if(i!==null){var r=i.dehydrated;if(Sr(t),n)if(t.flags&256)t.flags&=-257,t=_d(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if($e||_l(e,t,a,!1),n=(a&e.childLanes)!==0,$e||n){if(l=_e,l!==null&&(r=So(l,a),r!==0&&r!==i.retryLane))throw i.retryLane=r,Ia(e,r),xt(l,e,r),Vr;$s(),t=_d(e,t,a)}else e=i.treeContext,Ue=Ut(r.nextSibling),nt=t,Se=!0,ja=null,Dt=!1,e!==null&&yu(t,e),t=Hs(t,l),t.flags|=4096;return t}return e=Pt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Xr(e,t,a,l,n){return al(t),a=zr(e,t,a,l,void 0,n),l=kr(),e!==null&&!$e?(Er(e,t,n),sa(e,t,n)):(Se&&l&&sr(t),t.flags|=1,it(e,t,a,n),t.child)}function Od(e,t,a,l,n,i){return al(t),t.updateQueue=null,a=Uu(t,l,a,n),Ru(e),l=kr(),e!==null&&!$e?(Er(e,t,i),sa(e,t,i)):(Se&&l&&sr(t),t.flags|=1,it(e,t,a,i),t.child)}function Dd(e,t,a,l,n){if(al(t),t.stateNode===null){var i=wl,r=a.contextType;typeof r=="object"&&r!==null&&(i=st(r)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Gr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},gr(t),r=a.contextType,i.context=typeof r=="object"&&r!==null?st(r):wl,i.state=t.memoizedState,r=a.getDerivedStateFromProps,typeof r=="function"&&(Lr(t,a,r,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(r=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),r!==i.state&&Gr.enqueueReplaceState(i,i.state,null),Nn(t,l,i,n),Sn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,p=cl(a,d);i.props=p;var z=i.context,_=a.contextType;r=wl,typeof _=="object"&&_!==null&&(r=st(_));var U=a.getDerivedStateFromProps;_=typeof U=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,_||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||z!==r)&&vd(t,i,l,r),za=!1;var k=t.memoizedState;i.state=k,Nn(t,l,i,n),Sn(),z=t.memoizedState,d||k!==z||za?(typeof U=="function"&&(Lr(t,a,U,l),z=t.memoizedState),(p=za||bd(t,a,p,l,k,z,r))?(_||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=l,t.memoizedState=z),i.props=l,i.state=z,i.context=r,l=p):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,xr(e,t),r=t.memoizedProps,_=cl(a,r),i.props=_,U=t.pendingProps,k=i.context,z=a.contextType,p=wl,typeof z=="object"&&z!==null&&(p=st(z)),d=a.getDerivedStateFromProps,(z=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(r!==U||k!==p)&&vd(t,i,l,p),za=!1,k=t.memoizedState,i.state=k,Nn(t,l,i,n),Sn();var T=t.memoizedState;r!==U||k!==T||za||e!==null&&e.dependencies!==null&&vs(e.dependencies)?(typeof d=="function"&&(Lr(t,a,d,l),T=t.memoizedState),(_=za||bd(t,a,_,l,k,T,p)||e!==null&&e.dependencies!==null&&vs(e.dependencies))?(z||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,T,p),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,T,p)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=T),i.props=l,i.state=T,i.context=p,l=_):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,qs(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=il(t,e.child,null,n),t.child=il(t,null,a,n)):it(e,t,a,n),t.memoizedState=i.state,e=t.child):e=sa(e,t,n),e}function Rd(e,t,a,l){return el(),t.flags|=256,it(e,t,a,l),t.child}var Qr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Zr(e){return{baseLanes:e,cachePool:zu()}}function Kr(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Et),e}function Ud(e,t,a){var l=t.pendingProps,n=!1,i=(t.flags&128)!==0,r;if((r=i)||(r=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),r&&(n=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(n?Ta(t):wa(),(e=Ue)?(e=Qf(e,Dt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:va!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},a=pu(e),a.return=t,t.child=a,nt=t,Ue=null)):e=null,e===null)throw Sa(t);return Cc(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,n?(wa(),n=t.mode,d=Ls({mode:"hidden",children:d},n),l=Pa(l,n,a,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=Zr(a),l.childLanes=Kr(e,r,a),t.memoizedState=Qr,wn(null,l)):(Ta(t),Jr(t,d))}var p=e.memoizedState;if(p!==null&&(d=p.dehydrated,d!==null)){if(i)t.flags&256?(Ta(t),t.flags&=-257,t=$r(e,t,a)):t.memoizedState!==null?(wa(),t.child=e.child,t.flags|=128,t=null):(wa(),d=l.fallback,n=t.mode,l=Ls({mode:"visible",children:l.children},n),d=Pa(d,n,a,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,il(t,e.child,null,a),l=t.child,l.memoizedState=Zr(a),l.childLanes=Kr(e,r,a),t.memoizedState=Qr,t=wn(null,l));else if(Ta(t),Cc(d)){if(r=d.nextSibling&&d.nextSibling.dataset,r)var z=r.dgst;r=z,l=Error(o(419)),l.stack="",l.digest=r,gn({value:l,source:null,stack:null}),t=$r(e,t,a)}else if($e||_l(e,t,a,!1),r=(a&e.childLanes)!==0,$e||r){if(r=_e,r!==null&&(l=So(r,a),l!==0&&l!==p.retryLane))throw p.retryLane=l,Ia(e,l),xt(r,e,l),Vr;wc(d)||$s(),t=$r(e,t,a)}else wc(d)?(t.flags|=192,t.child=e.child,t=null):(e=p.treeContext,Ue=Ut(d.nextSibling),nt=t,Se=!0,ja=null,Dt=!1,e!==null&&yu(t,e),t=Jr(t,l.children),t.flags|=4096);return t}return n?(wa(),d=l.fallback,n=t.mode,p=e.child,z=p.sibling,l=Pt(p,{mode:"hidden",children:l.children}),l.subtreeFlags=p.subtreeFlags&65011712,z!==null?d=Pt(z,d):(d=Pa(d,n,a,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,wn(null,l),l=t.child,d=e.child.memoizedState,d===null?d=Zr(a):(n=d.cachePool,n!==null?(p=Ke._currentValue,n=n.parent!==p?{parent:p,pool:p}:n):n=zu(),d={baseLanes:d.baseLanes|a,cachePool:n}),l.memoizedState=d,l.childLanes=Kr(e,r,a),t.memoizedState=Qr,wn(e.child,l)):(Ta(t),a=e.child,e=a.sibling,a=Pt(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=a,t.memoizedState=null,a)}function Jr(e,t){return t=Ls({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ls(e,t){return e=St(22,e,null,t),e.lanes=0,e}function $r(e,t,a){return il(t,e.child,null,a),e=Jr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bd(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),ur(e.return,t,a)}function Wr(e,t,a,l,n,i){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:n,treeForkCount:i}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=l,r.tail=a,r.tailMode=n,r.treeForkCount=i)}function Hd(e,t,a){var l=t.pendingProps,n=l.revealOrder,i=l.tail;l=l.children;var r=Xe.current,d=(r&2)!==0;if(d?(r=r&1|2,t.flags|=128):r&=1,Q(Xe,r),it(e,t,l,a),l=Se?pn:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bd(e,a,t);else if(e.tag===19)Bd(e,a,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}switch(n){case"forwards":for(a=t.child,n=null;a!==null;)e=a.alternate,e!==null&&ws(e)===null&&(n=a),a=a.sibling;a=n,a===null?(n=t.child,t.child=null):(n=a.sibling,a.sibling=null),Wr(t,!1,n,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&ws(e)===null){t.child=n;break}e=n.sibling,n.sibling=a,a=n,n=e}Wr(t,!0,a,null,i,l);break;case"together":Wr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function sa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ma|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(_l(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Pt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Pt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Fr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vs(e)))}function Hp(e,t,a){switch(t.tag){case 3:He(t,t.stateNode.containerInfo),Na(t,Ke,e.memoizedState.cache),el();break;case 27:case 5:qt(t);break;case 4:He(t,t.stateNode.containerInfo);break;case 10:Na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ta(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Ud(e,t,a):(Ta(t),e=sa(e,t,a),e!==null?e.sibling:null);Ta(t);break;case 19:var n=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(_l(e,t,a,!1),l=(a&t.childLanes)!==0),n){if(l)return Hd(e,t,a);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Q(Xe,Xe.current),l)break;return null;case 22:return t.lanes=0,Ad(e,t,a,t.pendingProps);case 24:Na(t,Ke,e.memoizedState.cache)}return sa(e,t,a)}function qd(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!Fr(e,a)&&(t.flags&128)===0)return $e=!1,Hp(e,t,a);$e=(e.flags&131072)!==0}else $e=!1,Se&&(t.flags&1048576)!==0&&xu(t,pn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=nl(t.elementType),t.type=e,typeof e=="function")ar(e)?(l=cl(e,l),t.tag=1,t=Dd(null,t,e,l,a)):(t.tag=0,t=Xr(null,t,e,l,a));else{if(e!=null){var n=e.$$typeof;if(n===pe){t.tag=11,t=Td(null,t,e,l,a);break e}else if(n===K){t.tag=14,t=wd(null,t,e,l,a);break e}}throw t=Ge(e)||e,Error(o(306,t,""))}}return t;case 0:return Xr(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,n=cl(l,t.pendingProps),Dd(e,t,l,n,a);case 3:e:{if(He(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var i=t.memoizedState;n=i.element,xr(e,t),Nn(t,l,null,a);var r=t.memoizedState;if(l=r.cache,Na(t,Ke,l),l!==i.cache&&dr(t,[Ke],a,!0),Sn(),l=r.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Rd(e,t,l,a);break e}else if(l!==n){n=Mt(Error(o(424)),t),gn(n),t=Rd(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ue=Ut(e.firstChild),nt=t,Se=!0,ja=null,Dt=!0,a=Au(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(el(),l===n){t=sa(e,t,a);break e}it(e,t,l,a)}t=t.child}return t;case 26:return qs(e,t),e===null?(a=Ff(t.type,null,t.pendingProps,null))?t.memoizedState=a:Se||(a=t.type,e=t.pendingProps,l=ai(le.current).createElement(a),l[lt]=t,l[dt]=e,rt(l,a,e),et(l),t.stateNode=l):t.memoizedState=Ff(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return qt(t),e===null&&Se&&(l=t.stateNode=Jf(t.type,t.pendingProps,le.current),nt=t,Dt=!0,n=Ue,Ua(t.type)?(Ac=n,Ue=Ut(l.firstChild)):Ue=n),it(e,t,t.pendingProps.children,a),qs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((n=l=Ue)&&(l=hg(l,t.type,t.pendingProps,Dt),l!==null?(t.stateNode=l,nt=t,Ue=Ut(l.firstChild),Dt=!1,n=!0):n=!1),n||Sa(t)),qt(t),n=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,l=i.children,kc(n,i)?l=null:r!==null&&kc(n,r)&&(t.flags|=32),t.memoizedState!==null&&(n=zr(e,t,Cp,null,null,a),Vn._currentValue=n),qs(e,t),it(e,t,l,a),t.child;case 6:return e===null&&Se&&((e=a=Ue)&&(a=pg(a,t.pendingProps,Dt),a!==null?(t.stateNode=a,nt=t,Ue=null,e=!0):e=!1),e||Sa(t)),null;case 13:return Ud(e,t,a);case 4:return He(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=il(t,null,l,a):it(e,t,l,a),t.child;case 11:return Td(e,t,t.type,t.pendingProps,a);case 7:return it(e,t,t.pendingProps,a),t.child;case 8:return it(e,t,t.pendingProps.children,a),t.child;case 12:return it(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Na(t,t.type,l.value),it(e,t,l.children,a),t.child;case 9:return n=t.type._context,l=t.pendingProps.children,al(t),n=st(n),l=l(n),t.flags|=1,it(e,t,l,a),t.child;case 14:return wd(e,t,t.type,t.pendingProps,a);case 15:return Cd(e,t,t.type,t.pendingProps,a);case 19:return Hd(e,t,a);case 31:return Bp(e,t,a);case 22:return Ad(e,t,a,t.pendingProps);case 24:return al(t),l=st(Ke),e===null?(n=hr(),n===null&&(n=_e,i=fr(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=a),n=i),t.memoizedState={parent:l,cache:n},gr(t),Na(t,Ke,n)):((e.lanes&a)!==0&&(xr(e,t),Nn(t,null,null,a),Sn()),n=e.memoizedState,i=t.memoizedState,n.parent!==l?(n={parent:l,cache:l},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Na(t,Ke,l)):(l=i.cache,Na(t,Ke,l),l!==n.cache&&dr(t,[Ke],a,!0))),it(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ia(e){e.flags|=4}function Ir(e,t,a,l,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(mf())e.flags|=8192;else throw sl=zs,pr}else e.flags&=-16777217}function Ld(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!am(t))if(mf())e.flags|=8192;else throw sl=zs,pr}function Gs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?bo():536870912,e.lanes|=t,Xl|=t)}function Cn(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags&65011712,l|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags,l|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function qp(e,t,a){var l=t.pendingProps;switch(ir(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),aa(Ke),de(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ml(t)?ia(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,cr())),Be(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(ia(t),i!==null?(Be(t),Ld(t,i)):(Be(t),Ir(t,n,null,l,a))):i?i!==e.memoizedState?(ia(t),Be(t),Ld(t,i)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ia(t),Be(t),Ir(t,n,e,l,a)),null;case 27:if(Lt(t),a=le.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ia(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return Be(t),null}e=Z.current,Ml(t)?bu(t):(e=Jf(n,l,a),t.stateNode=e,ia(t))}return Be(t),null;case 5:if(Lt(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ia(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return Be(t),null}if(i=Z.current,Ml(t))bu(t);else{var r=ai(le.current);switch(i){case 1:i=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=r.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?r.createElement(n,{is:l.is}):r.createElement(n)}}i[lt]=t,i[dt]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)i.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=i;e:switch(rt(i,n,l),n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ia(t)}}return Be(t),Ir(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ia(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=le.current,Ml(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,n=nt,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}e[lt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Bf(e.nodeValue,a)),e||Sa(t,!0)}else e=ai(e).createTextNode(l),e[lt]=t,t.stateNode=e}return Be(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ml(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[lt]=t}else el(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else a=cr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(zt(t),t):(zt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Be(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ml(t),l!==null&&l.dehydrated!==null){if(e===null){if(!n)throw Error(o(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[lt]=t}else el(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),n=!1}else n=cr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(zt(t),t):(zt(t),null)}return zt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==n&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Gs(t,t.updateQueue),Be(t),null);case 4:return de(),e===null&&vc(t.stateNode.containerInfo),Be(t),null;case 10:return aa(t.type),Be(t),null;case 19:if(R(Xe),l=t.memoizedState,l===null)return Be(t),null;if(n=(t.flags&128)!==0,i=l.rendering,i===null)if(n)Cn(l,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=ws(e),i!==null){for(t.flags|=128,Cn(l,!1),e=i.updateQueue,t.updateQueue=e,Gs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)hu(a,e),a=a.sibling;return Q(Xe,Xe.current&1|2),Se&&ea(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&yt()>Zs&&(t.flags|=128,n=!0,Cn(l,!1),t.lanes=4194304)}else{if(!n)if(e=ws(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Gs(t,e),Cn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Se)return Be(t),null}else 2*yt()-l.renderingStartTime>Zs&&a!==536870912&&(t.flags|=128,n=!0,Cn(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=yt(),e.sibling=null,a=Xe.current,Q(Xe,n?a&1|2:a&1),Se&&ea(t,l.treeForkCount),e):(Be(t),null);case 22:case 23:return zt(t),jr(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),a=t.updateQueue,a!==null&&Gs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&R(ll),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),aa(Ke),Be(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Lp(e,t){switch(ir(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return aa(Ke),de(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Lt(t),null;case 31:if(t.memoizedState!==null){if(zt(t),t.alternate===null)throw Error(o(340));el()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));el()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(Xe),null;case 4:return de(),null;case 10:return aa(t.type),null;case 22:case 23:return zt(t),jr(),e!==null&&R(ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return aa(Ke),null;case 25:return null;default:return null}}function Gd(e,t){switch(ir(t),t.tag){case 3:aa(Ke),de();break;case 26:case 27:case 5:Lt(t);break;case 4:de();break;case 31:t.memoizedState!==null&&zt(t);break;case 13:zt(t);break;case 19:R(Xe);break;case 10:aa(t.type);break;case 22:case 23:zt(t),jr(),e!==null&&R(ll);break;case 24:aa(Ke)}}function An(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var n=l.next;a=n;do{if((a.tag&e)===e){l=void 0;var i=a.create,r=a.inst;l=i(),r.destroy=l}a=a.next}while(a!==n)}}catch(d){we(t,t.return,d)}}function Ca(e,t,a){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&e)===e){var r=l.inst,d=r.destroy;if(d!==void 0){r.destroy=void 0,n=t;var p=a,z=d;try{z()}catch(_){we(n,p,_)}}}l=l.next}while(l!==i)}}catch(_){we(t,t.return,_)}}function Yd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{_u(t,a)}catch(l){we(e,e.return,l)}}}function Vd(e,t,a){a.props=cl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){we(e,t,l)}}function Mn(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(n){we(e,t,n)}}function Kt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(n){we(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){we(e,t,n)}else a.current=null}function Xd(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(n){we(e,e.return,n)}}function Pr(e,t,a){try{var l=e.stateNode;cg(l,e.type,a,t),l[dt]=t}catch(n){we(e,e.return,n)}}function Qd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ua(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ft));else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(tc(e,t,a),e=e.sibling;e!==null;)tc(e,t,a),e=e.sibling}function Ys(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ua(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Ys(e,t,a),e=e.sibling;e!==null;)Ys(e,t,a),e=e.sibling}function Zd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);rt(t,l,a),t[lt]=e,t[dt]=a}catch(i){we(e,e.return,i)}}var ra=!1,We=!1,ac=!1,Kd=typeof WeakSet=="function"?WeakSet:Set,tt=null;function Gp(e,t){if(e=e.containerInfo,Nc=oi,e=su(e),$i(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var n=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var r=0,d=-1,p=-1,z=0,_=0,U=e,k=null;t:for(;;){for(var T;U!==a||n!==0&&U.nodeType!==3||(d=r+n),U!==i||l!==0&&U.nodeType!==3||(p=r+l),U.nodeType===3&&(r+=U.nodeValue.length),(T=U.firstChild)!==null;)k=U,U=T;for(;;){if(U===e)break t;if(k===a&&++z===n&&(d=r),k===i&&++_===l&&(p=r),(T=U.nextSibling)!==null)break;U=k,k=U.parentNode}U=T}a=d===-1||p===-1?null:{start:d,end:p}}else a=null}a=a||{start:0,end:0}}else a=null;for(zc={focusedElem:e,selectionRange:a},oi=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){switch(t=tt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)n=e[a],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,n=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var J=cl(a.type,n);e=l.getSnapshotBeforeUpdate(J,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(se){we(a,a.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Tc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,tt=e;break}tt=t.return}}function Jd(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:oa(e,a),l&4&&An(5,a);break;case 1:if(oa(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(r){we(a,a.return,r)}else{var n=cl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){we(a,a.return,r)}}l&64&&Yd(a),l&512&&Mn(a,a.return);break;case 3:if(oa(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{_u(e,t)}catch(r){we(a,a.return,r)}}break;case 27:t===null&&l&4&&Zd(a);case 26:case 5:oa(e,a),t===null&&l&4&&Xd(a),l&512&&Mn(a,a.return);break;case 12:oa(e,a);break;case 31:oa(e,a),l&4&&Fd(e,a);break;case 13:oa(e,a),l&4&&Id(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Wp.bind(null,a),gg(e,a))));break;case 22:if(l=a.memoizedState!==null||ra,!l){t=t!==null&&t.memoizedState!==null||We,n=ra;var i=We;ra=l,(We=t)&&!i?ua(e,a,(a.subtreeFlags&8772)!==0):oa(e,a),ra=n,We=i}break;case 30:break;default:oa(e,a)}}function $d(e){var t=e.alternate;t!==null&&(e.alternate=null,$d(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_i(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qe=null,mt=!1;function ca(e,t,a){for(a=a.child;a!==null;)Wd(e,t,a),a=a.sibling}function Wd(e,t,a){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(en,a)}catch{}switch(a.tag){case 26:We||Kt(a,t),ca(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:We||Kt(a,t);var l=qe,n=mt;Ua(a.type)&&(qe=a.stateNode,mt=!1),ca(e,t,a),Ln(a.stateNode),qe=l,mt=n;break;case 5:We||Kt(a,t);case 6:if(l=qe,n=mt,qe=null,ca(e,t,a),qe=l,mt=n,qe!==null)if(mt)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(a.stateNode)}catch(i){we(a,t,i)}else try{qe.removeChild(a.stateNode)}catch(i){we(a,t,i)}break;case 18:qe!==null&&(mt?(e=qe,Vf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Il(e)):Vf(qe,a.stateNode));break;case 4:l=qe,n=mt,qe=a.stateNode.containerInfo,mt=!0,ca(e,t,a),qe=l,mt=n;break;case 0:case 11:case 14:case 15:Ca(2,a,t),We||Ca(4,a,t),ca(e,t,a);break;case 1:We||(Kt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Vd(a,t,l)),ca(e,t,a);break;case 21:ca(e,t,a);break;case 22:We=(l=We)||a.memoizedState!==null,ca(e,t,a),We=l;break;default:ca(e,t,a)}}function Fd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Il(e)}catch(a){we(t,t.return,a)}}}function Id(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Il(e)}catch(a){we(t,t.return,a)}}function Yp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Kd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Kd),t;default:throw Error(o(435,e.tag))}}function Vs(e,t){var a=Yp(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var n=Fp.bind(null,e,l);l.then(n,n)}})}function ht(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var n=a[l],i=e,r=t,d=r;e:for(;d!==null;){switch(d.tag){case 27:if(Ua(d.type)){qe=d.stateNode,mt=!1;break e}break;case 5:qe=d.stateNode,mt=!1;break e;case 3:case 4:qe=d.stateNode.containerInfo,mt=!0;break e}d=d.return}if(qe===null)throw Error(o(160));Wd(i,r,n),qe=null,mt=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Pd(t,e),t=t.sibling}var Yt=null;function Pd(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ht(t,e),pt(e),l&4&&(Ca(3,e,e.return),An(3,e),Ca(5,e,e.return));break;case 1:ht(t,e),pt(e),l&512&&(We||a===null||Kt(a,a.return)),l&64&&ra&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var n=Yt;if(ht(t,e),pt(e),l&512&&(We||a===null||Kt(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,n=n.ownerDocument||n;t:switch(l){case"title":i=n.getElementsByTagName("title")[0],(!i||i[ln]||i[lt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(l),n.head.insertBefore(i,n.querySelector("head > title"))),rt(i,l,a),i[lt]=e,et(i),l=i;break e;case"link":var r=em("link","href",n).get(l+(a.href||""));if(r){for(var d=0;d<r.length;d++)if(i=r[d],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){r.splice(d,1);break t}}i=n.createElement(l),rt(i,l,a),n.head.appendChild(i);break;case"meta":if(r=em("meta","content",n).get(l+(a.content||""))){for(d=0;d<r.length;d++)if(i=r[d],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){r.splice(d,1);break t}}i=n.createElement(l),rt(i,l,a),n.head.appendChild(i);break;default:throw Error(o(468,l))}i[lt]=e,et(i),l=i}e.stateNode=l}else tm(n,e.type,e.stateNode);else e.stateNode=Pf(n,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?tm(n,e.type,e.stateNode):Pf(n,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Pr(e,e.memoizedProps,a.memoizedProps)}break;case 27:ht(t,e),pt(e),l&512&&(We||a===null||Kt(a,a.return)),a!==null&&l&4&&Pr(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ht(t,e),pt(e),l&512&&(We||a===null||Kt(a,a.return)),e.flags&32){n=e.stateNode;try{jl(n,"")}catch(J){we(e,e.return,J)}}l&4&&e.stateNode!=null&&(n=e.memoizedProps,Pr(e,n,a!==null?a.memoizedProps:n)),l&1024&&(ac=!0);break;case 6:if(ht(t,e),pt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(J){we(e,e.return,J)}}break;case 3:if(si=null,n=Yt,Yt=li(t.containerInfo),ht(t,e),Yt=n,pt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Il(t.containerInfo)}catch(J){we(e,e.return,J)}ac&&(ac=!1,ef(e));break;case 4:l=Yt,Yt=li(e.stateNode.containerInfo),ht(t,e),pt(e),Yt=l;break;case 12:ht(t,e),pt(e);break;case 31:ht(t,e),pt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Vs(e,l)));break;case 13:ht(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Qs=yt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Vs(e,l)));break;case 22:n=e.memoizedState!==null;var p=a!==null&&a.memoizedState!==null,z=ra,_=We;if(ra=z||n,We=_||p,ht(t,e),We=_,ra=z,pt(e),l&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(a===null||p||ra||We||ol(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){p=a=t;try{if(i=p.stateNode,n)r=i.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{d=p.stateNode;var U=p.memoizedProps.style,k=U!=null&&U.hasOwnProperty("display")?U.display:null;d.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(J){we(p,p.return,J)}}}else if(t.tag===6){if(a===null){p=t;try{p.stateNode.nodeValue=n?"":p.memoizedProps}catch(J){we(p,p.return,J)}}}else if(t.tag===18){if(a===null){p=t;try{var T=p.stateNode;n?Xf(T,!0):Xf(p.stateNode,!1)}catch(J){we(p,p.return,J)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Vs(e,a))));break;case 19:ht(t,e),pt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Vs(e,l)));break;case 30:break;case 21:break;default:ht(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Qd(l)){a=l;break}l=l.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var n=a.stateNode,i=ec(e);Ys(e,i,n);break;case 5:var r=a.stateNode;a.flags&32&&(jl(r,""),a.flags&=-33);var d=ec(e);Ys(e,d,r);break;case 3:case 4:var p=a.stateNode.containerInfo,z=ec(e);tc(e,z,p);break;default:throw Error(o(161))}}catch(_){we(e,e.return,_)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ef(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ef(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function oa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Jd(e,t.alternate,t),t=t.sibling}function ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ca(4,t,t.return),ol(t);break;case 1:Kt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Vd(t,t.return,a),ol(t);break;case 27:Ln(t.stateNode);case 26:case 5:Kt(t,t.return),ol(t);break;case 22:t.memoizedState===null&&ol(t);break;case 30:ol(t);break;default:ol(t)}e=e.sibling}}function ua(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,n=e,i=t,r=i.flags;switch(i.tag){case 0:case 11:case 15:ua(n,i,a),An(4,i);break;case 1:if(ua(n,i,a),l=i,n=l.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(z){we(l,l.return,z)}if(l=i,n=l.updateQueue,n!==null){var d=l.stateNode;try{var p=n.shared.hiddenCallbacks;if(p!==null)for(n.shared.hiddenCallbacks=null,n=0;n<p.length;n++)Mu(p[n],d)}catch(z){we(l,l.return,z)}}a&&r&64&&Yd(i),Mn(i,i.return);break;case 27:Zd(i);case 26:case 5:ua(n,i,a),a&&l===null&&r&4&&Xd(i),Mn(i,i.return);break;case 12:ua(n,i,a);break;case 31:ua(n,i,a),a&&r&4&&Fd(n,i);break;case 13:ua(n,i,a),a&&r&4&&Id(n,i);break;case 22:i.memoizedState===null&&ua(n,i,a),Mn(i,i.return);break;case 30:break;default:ua(n,i,a)}t=t.sibling}}function lc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&xn(a))}function nc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xn(e))}function Vt(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)tf(e,t,a,l),t=t.sibling}function tf(e,t,a,l){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Vt(e,t,a,l),n&2048&&An(9,t);break;case 1:Vt(e,t,a,l);break;case 3:Vt(e,t,a,l),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xn(e)));break;case 12:if(n&2048){Vt(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,r=i.id,d=i.onPostCommit;typeof d=="function"&&d(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(p){we(t,t.return,p)}}else Vt(e,t,a,l);break;case 31:Vt(e,t,a,l);break;case 13:Vt(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?i._visibility&2?Vt(e,t,a,l):_n(e,t):i._visibility&2?Vt(e,t,a,l):(i._visibility|=2,Gl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),n&2048&&lc(r,t);break;case 24:Vt(e,t,a,l),n&2048&&nc(t.alternate,t);break;default:Vt(e,t,a,l)}}function Gl(e,t,a,l,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,r=t,d=a,p=l,z=r.flags;switch(r.tag){case 0:case 11:case 15:Gl(i,r,d,p,n),An(8,r);break;case 23:break;case 22:var _=r.stateNode;r.memoizedState!==null?_._visibility&2?Gl(i,r,d,p,n):_n(i,r):(_._visibility|=2,Gl(i,r,d,p,n)),n&&z&2048&&lc(r.alternate,r);break;case 24:Gl(i,r,d,p,n),n&&z&2048&&nc(r.alternate,r);break;default:Gl(i,r,d,p,n)}t=t.sibling}}function _n(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,n=l.flags;switch(l.tag){case 22:_n(a,l),n&2048&&lc(l.alternate,l);break;case 24:_n(a,l),n&2048&&nc(l.alternate,l);break;default:_n(a,l)}t=t.sibling}}var On=8192;function Yl(e,t,a){if(e.subtreeFlags&On)for(e=e.child;e!==null;)af(e,t,a),e=e.sibling}function af(e,t,a){switch(e.tag){case 26:Yl(e,t,a),e.flags&On&&e.memoizedState!==null&&wg(a,Yt,e.memoizedState,e.memoizedProps);break;case 5:Yl(e,t,a);break;case 3:case 4:var l=Yt;Yt=li(e.stateNode.containerInfo),Yl(e,t,a),Yt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=On,On=16777216,Yl(e,t,a),On=l):Yl(e,t,a));break;default:Yl(e,t,a)}}function lf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Dn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];tt=l,sf(l,e)}lf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)nf(e),e=e.sibling}function nf(e){switch(e.tag){case 0:case 11:case 15:Dn(e),e.flags&2048&&Ca(9,e,e.return);break;case 3:Dn(e);break;case 12:Dn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xs(e)):Dn(e);break;default:Dn(e)}}function Xs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];tt=l,sf(l,e)}lf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ca(8,t,t.return),Xs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Xs(t));break;default:Xs(t)}e=e.sibling}}function sf(e,t){for(;tt!==null;){var a=tt;switch(a.tag){case 0:case 11:case 15:Ca(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:xn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,tt=l;else e:for(a=e;tt!==null;){l=tt;var n=l.sibling,i=l.return;if($d(l),l===a){tt=null;break e}if(n!==null){n.return=i,tt=n;break e}tt=i}}}var Vp={getCacheForType:function(e){var t=st(Ke),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return st(Ke).controller.signal}},Xp=typeof WeakMap=="function"?WeakMap:Map,Ee=0,_e=null,xe=null,ve=0,Te=0,kt=null,Aa=!1,Vl=!1,sc=!1,da=0,Ve=0,Ma=0,ul=0,ic=0,Et=0,Xl=0,Rn=null,gt=null,rc=!1,Qs=0,rf=0,Zs=1/0,Ks=null,_a=null,Ie=0,Oa=null,Ql=null,fa=0,cc=0,oc=null,cf=null,Un=0,uc=null;function Tt(){return(Ee&2)!==0&&ve!==0?ve&-ve:w.T!==null?gc():No()}function of(){if(Et===0)if((ve&536870912)===0||Se){var e=ts;ts<<=1,(ts&3932160)===0&&(ts=262144),Et=e}else Et=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Et}function xt(e,t,a){(e===_e&&(Te===2||Te===9)||e.cancelPendingCommit!==null)&&(Zl(e,0),Da(e,ve,Et,!1)),an(e,a),((Ee&2)===0||e!==_e)&&(e===_e&&((Ee&2)===0&&(ul|=a),Ve===4&&Da(e,ve,Et,!1)),Jt(e))}function uf(e,t,a){if((Ee&6)!==0)throw Error(o(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||tn(e,t),n=l?Kp(e,t):fc(e,t,!0),i=l;do{if(n===0){Vl&&!l&&Da(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!Qp(a)){n=fc(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var d=e;n=Rn;var p=d.current.memoizedState.isDehydrated;if(p&&(Zl(d,r).flags|=256),r=fc(d,r,!1),r!==2){if(sc&&!p){d.errorRecoveryDisabledLanes|=i,ul|=i,n=4;break e}i=gt,gt=n,i!==null&&(gt===null?gt=i:gt.push.apply(gt,i))}n=r}if(i=!1,n!==2)continue}}if(n===1){Zl(e,0),Da(e,t,0,!0);break}e:{switch(l=e,i=n,i){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Da(l,t,Et,!Aa);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(n=Qs+300-yt(),10<n)){if(Da(l,t,Et,!Aa),ls(l,0,!0)!==0)break e;fa=t,l.timeoutHandle=Gf(df.bind(null,l,a,gt,Ks,rc,t,Et,ul,Xl,Aa,i,"Throttled",-0,0),n);break e}df(l,a,gt,Ks,rc,t,Et,ul,Xl,Aa,i,null,-0,0)}}break}while(!0);Jt(e)}function df(e,t,a,l,n,i,r,d,p,z,_,U,k,T){if(e.timeoutHandle=-1,U=t.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ft},af(t,i,U);var J=(i&62914560)===i?Qs-yt():(i&4194048)===i?rf-yt():0;if(J=Cg(U,J),J!==null){fa=i,e.cancelPendingCommit=J(bf.bind(null,e,t,i,a,l,n,r,d,p,_,U,null,k,T)),Da(e,i,r,!z);return}}bf(e,t,i,a,l,n,r,d,p)}function Qp(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var n=a[l],i=n.getSnapshot;n=n.value;try{if(!jt(i(),n))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Da(e,t,a,l){t&=~ic,t&=~ul,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var n=t;0<n;){var i=31-vt(n),r=1<<i;l[i]=-1,n&=~r}a!==0&&vo(e,a,t)}function Js(){return(Ee&6)===0?(Bn(0),!1):!0}function dc(){if(xe!==null){if(Te===0)var e=xe.return;else e=xe,ta=tl=null,Tr(e),Ul=null,bn=0,e=xe;for(;e!==null;)Gd(e.alternate,e),e=e.return;xe=null}}function Zl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,dg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),fa=0,dc(),_e=e,xe=a=Pt(e.current,null),ve=t,Te=0,kt=null,Aa=!1,Vl=tn(e,t),sc=!1,Xl=Et=ic=ul=Ma=Ve=0,gt=Rn=null,rc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-vt(l),i=1<<n;t|=e[n],l&=~i}return da=t,ps(),a}function ff(e,t){fe=null,w.H=Tn,t===Rl||t===Ns?(t=Tu(),Te=3):t===pr?(t=Tu(),Te=4):Te=t===Vr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,kt=t,xe===null&&(Ve=1,Bs(e,Mt(t,e.current)))}function mf(){var e=Nt.current;return e===null?!0:(ve&4194048)===ve?Rt===null:(ve&62914560)===ve||(ve&536870912)!==0?e===Rt:!1}function hf(){var e=w.H;return w.H=Tn,e===null?Tn:e}function pf(){var e=w.A;return w.A=Vp,e}function $s(){Ve=4,Aa||(ve&4194048)!==ve&&Nt.current!==null||(Vl=!0),(Ma&134217727)===0&&(ul&134217727)===0||_e===null||Da(_e,ve,Et,!1)}function fc(e,t,a){var l=Ee;Ee|=2;var n=hf(),i=pf();(_e!==e||ve!==t)&&(Ks=null,Zl(e,t)),t=!1;var r=Ve;e:do try{if(Te!==0&&xe!==null){var d=xe,p=kt;switch(Te){case 8:dc(),r=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var z=Te;if(Te=0,kt=null,Kl(e,d,p,z),a&&Vl){r=0;break e}break;default:z=Te,Te=0,kt=null,Kl(e,d,p,z)}}Zp(),r=Ve;break}catch(_){ff(e,_)}while(!0);return t&&e.shellSuspendCounter++,ta=tl=null,Ee=l,w.H=n,w.A=i,xe===null&&(_e=null,ve=0,ps()),r}function Zp(){for(;xe!==null;)gf(xe)}function Kp(e,t){var a=Ee;Ee|=2;var l=hf(),n=pf();_e!==e||ve!==t?(Ks=null,Zs=yt()+500,Zl(e,t)):Vl=tn(e,t);e:do try{if(Te!==0&&xe!==null){t=xe;var i=kt;t:switch(Te){case 1:Te=0,kt=null,Kl(e,t,i,1);break;case 2:case 9:if(ku(i)){Te=0,kt=null,xf(t);break}t=function(){Te!==2&&Te!==9||_e!==e||(Te=7),Jt(e)},i.then(t,t);break e;case 3:Te=7;break e;case 4:Te=5;break e;case 7:ku(i)?(Te=0,kt=null,xf(t)):(Te=0,kt=null,Kl(e,t,i,7));break;case 5:var r=null;switch(xe.tag){case 26:r=xe.memoizedState;case 5:case 27:var d=xe;if(r?am(r):d.stateNode.complete){Te=0,kt=null;var p=d.sibling;if(p!==null)xe=p;else{var z=d.return;z!==null?(xe=z,Ws(z)):xe=null}break t}}Te=0,kt=null,Kl(e,t,i,5);break;case 6:Te=0,kt=null,Kl(e,t,i,6);break;case 8:dc(),Ve=6;break e;default:throw Error(o(462))}}Jp();break}catch(_){ff(e,_)}while(!0);return ta=tl=null,w.H=l,w.A=n,Ee=a,xe!==null?0:(_e=null,ve=0,ps(),Ve)}function Jp(){for(;xe!==null&&!xh();)gf(xe)}function gf(e){var t=qd(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?Ws(e):xe=t}function xf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Od(a,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=Od(a,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:Tr(t);default:Gd(a,t),t=xe=hu(t,da),t=qd(a,t,da)}e.memoizedProps=e.pendingProps,t===null?Ws(e):xe=t}function Kl(e,t,a,l){ta=tl=null,Tr(t),Ul=null,bn=0;var n=t.return;try{if(Up(e,n,t,a,ve)){Ve=1,Bs(e,Mt(a,e.current)),xe=null;return}}catch(i){if(n!==null)throw xe=n,i;Ve=1,Bs(e,Mt(a,e.current)),xe=null;return}t.flags&32768?(Se||l===1?e=!0:Vl||(ve&536870912)!==0?e=!1:(Aa=e=!0,(l===2||l===9||l===3||l===6)&&(l=Nt.current,l!==null&&l.tag===13&&(l.flags|=16384))),yf(t,e)):Ws(t)}function Ws(e){var t=e;do{if((t.flags&32768)!==0){yf(t,Aa);return}e=t.return;var a=qp(t.alternate,t,da);if(a!==null){xe=a;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Ve===0&&(Ve=5)}function yf(e,t){do{var a=Lp(e.alternate,e);if(a!==null){a.flags&=32767,xe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=a}while(e!==null);Ve=6,xe=null}function bf(e,t,a,l,n,i,r,d,p){e.cancelPendingCommit=null;do Fs();while(Ie!==0);if((Ee&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(i=t.lanes|t.childLanes,i|=er,Th(e,a,i,r,d,p),e===_e&&(xe=_e=null,ve=0),Ql=t,Oa=e,fa=a,cc=i,oc=n,cf=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ip(Pn,function(){return zf(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=w.T,w.T=null,n=Y.p,Y.p=2,r=Ee,Ee|=4;try{Gp(e,t,a)}finally{Ee=r,Y.p=n,w.T=l}}Ie=1,vf(),jf(),Sf()}}function vf(){if(Ie===1){Ie=0;var e=Oa,t=Ql,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=w.T,w.T=null;var l=Y.p;Y.p=2;var n=Ee;Ee|=4;try{Pd(t,e);var i=zc,r=su(e.containerInfo),d=i.focusedElem,p=i.selectionRange;if(r!==d&&d&&d.ownerDocument&&nu(d.ownerDocument.documentElement,d)){if(p!==null&&$i(d)){var z=p.start,_=p.end;if(_===void 0&&(_=z),"selectionStart"in d)d.selectionStart=z,d.selectionEnd=Math.min(_,d.value.length);else{var U=d.ownerDocument||document,k=U&&U.defaultView||window;if(k.getSelection){var T=k.getSelection(),J=d.textContent.length,se=Math.min(p.start,J),Me=p.end===void 0?se:Math.min(p.end,J);!T.extend&&se>Me&&(r=Me,Me=se,se=r);var j=lu(d,se),b=lu(d,Me);if(j&&b&&(T.rangeCount!==1||T.anchorNode!==j.node||T.anchorOffset!==j.offset||T.focusNode!==b.node||T.focusOffset!==b.offset)){var N=U.createRange();N.setStart(j.node,j.offset),T.removeAllRanges(),se>Me?(T.addRange(N),T.extend(b.node,b.offset)):(N.setEnd(b.node,b.offset),T.addRange(N))}}}}for(U=[],T=d;T=T.parentNode;)T.nodeType===1&&U.push({element:T,left:T.scrollLeft,top:T.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<U.length;d++){var O=U[d];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}oi=!!Nc,zc=Nc=null}finally{Ee=n,Y.p=l,w.T=a}}e.current=t,Ie=2}}function jf(){if(Ie===2){Ie=0;var e=Oa,t=Ql,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=w.T,w.T=null;var l=Y.p;Y.p=2;var n=Ee;Ee|=4;try{Jd(e,t.alternate,t)}finally{Ee=n,Y.p=l,w.T=a}}Ie=3}}function Sf(){if(Ie===4||Ie===3){Ie=0,yh();var e=Oa,t=Ql,a=fa,l=cf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ie=5:(Ie=0,Ql=Oa=null,Nf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(_a=null),Ai(a),t=t.stateNode,bt&&typeof bt.onCommitFiberRoot=="function")try{bt.onCommitFiberRoot(en,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=w.T,n=Y.p,Y.p=2,w.T=null;try{for(var i=e.onRecoverableError,r=0;r<l.length;r++){var d=l[r];i(d.value,{componentStack:d.stack})}}finally{w.T=t,Y.p=n}}(fa&3)!==0&&Fs(),Jt(e),n=e.pendingLanes,(a&261930)!==0&&(n&42)!==0?e===uc?Un++:(Un=0,uc=e):Un=0,Bn(0)}}function Nf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xn(t)))}function Fs(){return vf(),jf(),Sf(),zf()}function zf(){if(Ie!==5)return!1;var e=Oa,t=cc;cc=0;var a=Ai(fa),l=w.T,n=Y.p;try{Y.p=32>a?32:a,w.T=null,a=oc,oc=null;var i=Oa,r=fa;if(Ie=0,Ql=Oa=null,fa=0,(Ee&6)!==0)throw Error(o(331));var d=Ee;if(Ee|=4,nf(i.current),tf(i,i.current,r,a),Ee=d,Bn(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(en,i)}catch{}return!0}finally{Y.p=n,w.T=l,Nf(e,t)}}function kf(e,t,a){t=Mt(a,t),t=Yr(e.stateNode,t,2),e=Ea(e,t,2),e!==null&&(an(e,2),Jt(e))}function we(e,t,a){if(e.tag===3)kf(e,e,a);else for(;t!==null;){if(t.tag===3){kf(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(_a===null||!_a.has(l))){e=Mt(a,e),a=kd(2),l=Ea(t,a,2),l!==null&&(Ed(a,l,t,e),an(l,2),Jt(l));break}}t=t.return}}function mc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Xp;var n=new Set;l.set(t,n)}else n=l.get(t),n===void 0&&(n=new Set,l.set(t,n));n.has(a)||(sc=!0,n.add(a),e=$p.bind(null,e,t,a),t.then(e,e))}function $p(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,_e===e&&(ve&a)===a&&(Ve===4||Ve===3&&(ve&62914560)===ve&&300>yt()-Qs?(Ee&2)===0&&Zl(e,0):ic|=a,Xl===ve&&(Xl=0)),Jt(e)}function Ef(e,t){t===0&&(t=bo()),e=Ia(e,t),e!==null&&(an(e,t),Jt(e))}function Wp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ef(e,a)}function Fp(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Ef(e,a)}function Ip(e,t){return $t(e,t)}var Is=null,Jl=null,hc=!1,Ps=!1,pc=!1,Ra=0;function Jt(e){e!==Jl&&e.next===null&&(Jl===null?Is=Jl=e:Jl=Jl.next=e),Ps=!0,hc||(hc=!0,eg())}function Bn(e,t){if(!pc&&Ps){pc=!0;do for(var a=!1,l=Is;l!==null;){if(e!==0){var n=l.pendingLanes;if(n===0)var i=0;else{var r=l.suspendedLanes,d=l.pingedLanes;i=(1<<31-vt(42|e)+1)-1,i&=n&~(r&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Af(l,i))}else i=ve,i=ls(l,l===_e?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||tn(l,i)||(a=!0,Af(l,i));l=l.next}while(a);pc=!1}}function Pp(){Tf()}function Tf(){Ps=hc=!1;var e=0;Ra!==0&&ug()&&(e=Ra);for(var t=yt(),a=null,l=Is;l!==null;){var n=l.next,i=wf(l,t);i===0?(l.next=null,a===null?Is=n:a.next=n,n===null&&(Jl=a)):(a=l,(e!==0||(i&3)!==0)&&(Ps=!0)),l=n}Ie!==0&&Ie!==5||Bn(e),Ra!==0&&(Ra=0)}function wf(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var r=31-vt(i),d=1<<r,p=n[r];p===-1?((d&a)===0||(d&l)!==0)&&(n[r]=Eh(d,t)):p<=t&&(e.expiredLanes|=d),i&=~d}if(t=_e,a=ve,a=ls(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Te===2||Te===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ti(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||tn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Ti(l),Ai(a)){case 2:case 8:a=xo;break;case 32:a=Pn;break;case 268435456:a=yo;break;default:a=Pn}return l=Cf.bind(null,e),a=$t(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Ti(l),e.callbackPriority=2,e.callbackNode=null,2}function Cf(e,t){if(Ie!==0&&Ie!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Fs()&&e.callbackNode!==a)return null;var l=ve;return l=ls(e,e===_e?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(uf(e,l,t),wf(e,yt()),e.callbackNode!=null&&e.callbackNode===a?Cf.bind(null,e):null)}function Af(e,t){if(Fs())return null;uf(e,t,!0)}function eg(){fg(function(){(Ee&6)!==0?$t(go,Pp):Tf()})}function gc(){if(Ra===0){var e=Ol;e===0&&(e=es,es<<=1,(es&261888)===0&&(es=256)),Ra=e}return Ra}function Mf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rs(""+e)}function _f(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function tg(e,t,a,l,n){if(t==="submit"&&a&&a.stateNode===n){var i=Mf((n[dt]||null).action),r=l.submitter;r&&(t=(t=r[dt]||null)?Mf(t.formAction):r.getAttribute("formAction"),t!==null&&(i=t,r=null));var d=new ds("action","action",null,l,n);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ra!==0){var p=r?_f(n,r):new FormData(n);Ur(a,{pending:!0,data:p,method:n.method,action:i},null,p)}}else typeof i=="function"&&(d.preventDefault(),p=r?_f(n,r):new FormData(n),Ur(a,{pending:!0,data:p,method:n.method,action:i},i,p))},currentTarget:n}]})}}for(var xc=0;xc<Pi.length;xc++){var yc=Pi[xc],ag=yc.toLowerCase(),lg=yc[0].toUpperCase()+yc.slice(1);Gt(ag,"on"+lg)}Gt(cu,"onAnimationEnd"),Gt(ou,"onAnimationIteration"),Gt(uu,"onAnimationStart"),Gt("dblclick","onDoubleClick"),Gt("focusin","onFocus"),Gt("focusout","onBlur"),Gt(bp,"onTransitionRun"),Gt(vp,"onTransitionStart"),Gt(jp,"onTransitionCancel"),Gt(du,"onTransitionEnd"),bl("onMouseEnter",["mouseout","mouseover"]),bl("onMouseLeave",["mouseout","mouseover"]),bl("onPointerEnter",["pointerout","pointerover"]),bl("onPointerLeave",["pointerout","pointerover"]),Ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hn="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(" "),ng=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hn));function Of(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],n=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var r=l.length-1;0<=r;r--){var d=l[r],p=d.instance,z=d.currentTarget;if(d=d.listener,p!==i&&n.isPropagationStopped())break e;i=d,n.currentTarget=z;try{i(n)}catch(_){hs(_)}n.currentTarget=null,i=p}else for(r=0;r<l.length;r++){if(d=l[r],p=d.instance,z=d.currentTarget,d=d.listener,p!==i&&n.isPropagationStopped())break e;i=d,n.currentTarget=z;try{i(n)}catch(_){hs(_)}n.currentTarget=null,i=p}}}}function ye(e,t){var a=t[Mi];a===void 0&&(a=t[Mi]=new Set);var l=e+"__bubble";a.has(l)||(Df(t,e,2,!1),a.add(l))}function bc(e,t,a){var l=0;t&&(l|=4),Df(a,e,l,t)}var ei="_reactListening"+Math.random().toString(36).slice(2);function vc(e){if(!e[ei]){e[ei]=!0,Eo.forEach(function(a){a!=="selectionchange"&&(ng.has(a)||bc(a,!1,e),bc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ei]||(t[ei]=!0,bc("selectionchange",!1,t))}}function Df(e,t,a,l){switch(om(t)){case 2:var n=_g;break;case 8:n=Og;break;default:n=Rc}a=n.bind(null,t,a,e),n=void 0,!Li||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),l?n!==void 0?e.addEventListener(t,a,{capture:!0,passive:n}):e.addEventListener(t,a,!0):n!==void 0?e.addEventListener(t,a,{passive:n}):e.addEventListener(t,a,!1)}function jc(e,t,a,l,n){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var r=l.tag;if(r===3||r===4){var d=l.stateNode.containerInfo;if(d===n)break;if(r===4)for(r=l.return;r!==null;){var p=r.tag;if((p===3||p===4)&&r.stateNode.containerInfo===n)return;r=r.return}for(;d!==null;){if(r=gl(d),r===null)return;if(p=r.tag,p===5||p===6||p===26||p===27){l=i=r;continue e}d=d.parentNode}}l=l.return}Ho(function(){var z=i,_=Hi(a),U=[];e:{var k=fu.get(e);if(k!==void 0){var T=ds,J=e;switch(e){case"keypress":if(os(a)===0)break e;case"keydown":case"keyup":T=Fh;break;case"focusin":J="focus",T=Xi;break;case"focusout":J="blur",T=Xi;break;case"beforeblur":case"afterblur":T=Xi;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":T=Go;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":T=qh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":T=ep;break;case cu:case ou:case uu:T=Yh;break;case du:T=ap;break;case"scroll":case"scrollend":T=Bh;break;case"wheel":T=np;break;case"copy":case"cut":case"paste":T=Xh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":T=Vo;break;case"toggle":case"beforetoggle":T=ip}var se=(t&4)!==0,Me=!se&&(e==="scroll"||e==="scrollend"),j=se?k!==null?k+"Capture":null:k;se=[];for(var b=z,N;b!==null;){var O=b;if(N=O.stateNode,O=O.tag,O!==5&&O!==26&&O!==27||N===null||j===null||(O=sn(b,j),O!=null&&se.push(qn(b,O,N))),Me)break;b=b.return}0<se.length&&(k=new T(k,J,null,a,_),U.push({event:k,listeners:se}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",T=e==="mouseout"||e==="pointerout",k&&a!==Bi&&(J=a.relatedTarget||a.fromElement)&&(gl(J)||J[pl]))break e;if((T||k)&&(k=_.window===_?_:(k=_.ownerDocument)?k.defaultView||k.parentWindow:window,T?(J=a.relatedTarget||a.toElement,T=z,J=J?gl(J):null,J!==null&&(Me=x(J),se=J.tag,J!==Me||se!==5&&se!==27&&se!==6)&&(J=null)):(T=null,J=z),T!==J)){if(se=Go,O="onMouseLeave",j="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(se=Vo,O="onPointerLeave",j="onPointerEnter",b="pointer"),Me=T==null?k:nn(T),N=J==null?k:nn(J),k=new se(O,b+"leave",T,a,_),k.target=Me,k.relatedTarget=N,O=null,gl(_)===z&&(se=new se(j,b+"enter",J,a,_),se.target=N,se.relatedTarget=Me,O=se),Me=O,T&&J)t:{for(se=sg,j=T,b=J,N=0,O=j;O;O=se(O))N++;O=0;for(var ne=b;ne;ne=se(ne))O++;for(;0<N-O;)j=se(j),N--;for(;0<O-N;)b=se(b),O--;for(;N--;){if(j===b||b!==null&&j===b.alternate){se=j;break t}j=se(j),b=se(b)}se=null}else se=null;T!==null&&Rf(U,k,T,se,!1),J!==null&&Me!==null&&Rf(U,Me,J,se,!0)}}e:{if(k=z?nn(z):window,T=k.nodeName&&k.nodeName.toLowerCase(),T==="select"||T==="input"&&k.type==="file")var ze=Fo;else if($o(k))if(Io)ze=gp;else{ze=hp;var I=mp}else T=k.nodeName,!T||T.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?z&&Ui(z.elementType)&&(ze=Fo):ze=pp;if(ze&&(ze=ze(e,z))){Wo(U,ze,a,_);break e}I&&I(e,k,z),e==="focusout"&&z&&k.type==="number"&&z.memoizedProps.value!=null&&Ri(k,"number",k.value)}switch(I=z?nn(z):window,e){case"focusin":($o(I)||I.contentEditable==="true")&&(kl=I,Wi=z,hn=null);break;case"focusout":hn=Wi=kl=null;break;case"mousedown":Fi=!0;break;case"contextmenu":case"mouseup":case"dragend":Fi=!1,iu(U,a,_);break;case"selectionchange":if(yp)break;case"keydown":case"keyup":iu(U,a,_)}var me;if(Zi)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else zl?Ko(e,a)&&(je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(je="onCompositionStart");je&&(Xo&&a.locale!=="ko"&&(zl||je!=="onCompositionStart"?je==="onCompositionEnd"&&zl&&(me=qo()):(ba=_,Gi="value"in ba?ba.value:ba.textContent,zl=!0)),I=ti(z,je),0<I.length&&(je=new Yo(je,e,null,a,_),U.push({event:je,listeners:I}),me?je.data=me:(me=Jo(a),me!==null&&(je.data=me)))),(me=cp?op(e,a):up(e,a))&&(je=ti(z,"onBeforeInput"),0<je.length&&(I=new Yo("onBeforeInput","beforeinput",null,a,_),U.push({event:I,listeners:je}),I.data=me)),tg(U,e,z,a,_)}Of(U,t)})}function qn(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ti(e,t){for(var a=t+"Capture",l=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=sn(e,a),n!=null&&l.unshift(qn(e,n,i)),n=sn(e,t),n!=null&&l.push(qn(e,n,i))),e.tag===3)return l;e=e.return}return[]}function sg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rf(e,t,a,l,n){for(var i=t._reactName,r=[];a!==null&&a!==l;){var d=a,p=d.alternate,z=d.stateNode;if(d=d.tag,p!==null&&p===l)break;d!==5&&d!==26&&d!==27||z===null||(p=z,n?(z=sn(a,i),z!=null&&r.unshift(qn(a,z,p))):n||(z=sn(a,i),z!=null&&r.push(qn(a,z,p)))),a=a.return}r.length!==0&&e.push({event:t,listeners:r})}var ig=/\r\n?/g,rg=/\u0000|\uFFFD/g;function Uf(e){return(typeof e=="string"?e:""+e).replace(ig,`
|
|
49
|
-
`).replace(rg,"")}function Bf(e,t){return t=Uf(t),Uf(e)===t}function Ae(e,t,a,l,n,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||jl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&jl(e,""+l);break;case"className":ss(e,"class",l);break;case"tabIndex":ss(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ss(e,a,l);break;case"style":Uo(e,l,i);break;case"data":if(t!=="object"){ss(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=rs(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&Ae(e,t,"name",n.name,n,null),Ae(e,t,"formEncType",n.formEncType,n,null),Ae(e,t,"formMethod",n.formMethod,n,null),Ae(e,t,"formTarget",n.formTarget,n,null)):(Ae(e,t,"encType",n.encType,n,null),Ae(e,t,"method",n.method,n,null),Ae(e,t,"target",n.target,n,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=rs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Ft);break;case"onScroll":l!=null&&ye("scroll",e);break;case"onScrollEnd":l!=null&&ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=rs(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":ye("beforetoggle",e),ye("toggle",e),ns(e,"popover",l);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ns(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Rh.get(a)||a,ns(e,a,l))}}function Sc(e,t,a,l,n,i){switch(a){case"style":Uo(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof l=="string"?jl(e,l):(typeof l=="number"||typeof l=="bigint")&&jl(e,""+l);break;case"onScroll":l!=null&&ye("scroll",e);break;case"onScrollEnd":l!=null&&ye("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Ft);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!To.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),t=a.slice(2,n?a.length-7:void 0),i=e[dt]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,n);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ns(e,a,l)}}}function rt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",e),ye("load",e);var l=!1,n=!1,i;for(i in a)if(a.hasOwnProperty(i)){var r=a[i];if(r!=null)switch(i){case"src":l=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ae(e,t,i,r,a,null)}}n&&Ae(e,t,"srcSet",a.srcSet,a,null),l&&Ae(e,t,"src",a.src,a,null);return;case"input":ye("invalid",e);var d=i=r=n=null,p=null,z=null;for(l in a)if(a.hasOwnProperty(l)){var _=a[l];if(_!=null)switch(l){case"name":n=_;break;case"type":r=_;break;case"checked":p=_;break;case"defaultChecked":z=_;break;case"value":i=_;break;case"defaultValue":d=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(137,t));break;default:Ae(e,t,l,_,a,null)}}_o(e,i,d,p,z,r,n,!1);return;case"select":ye("invalid",e),l=r=i=null;for(n in a)if(a.hasOwnProperty(n)&&(d=a[n],d!=null))switch(n){case"value":i=d;break;case"defaultValue":r=d;break;case"multiple":l=d;default:Ae(e,t,n,d,a,null)}t=i,a=r,e.multiple=!!l,t!=null?vl(e,!!l,t,!1):a!=null&&vl(e,!!l,a,!0);return;case"textarea":ye("invalid",e),i=n=l=null;for(r in a)if(a.hasOwnProperty(r)&&(d=a[r],d!=null))switch(r){case"value":l=d;break;case"defaultValue":n=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:Ae(e,t,r,d,a,null)}Do(e,l,n,i);return;case"option":for(p in a)if(a.hasOwnProperty(p)&&(l=a[p],l!=null))switch(p){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ae(e,t,p,l,a,null)}return;case"dialog":ye("beforetoggle",e),ye("toggle",e),ye("cancel",e),ye("close",e);break;case"iframe":case"object":ye("load",e);break;case"video":case"audio":for(l=0;l<Hn.length;l++)ye(Hn[l],e);break;case"image":ye("error",e),ye("load",e);break;case"details":ye("toggle",e);break;case"embed":case"source":case"link":ye("error",e),ye("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in a)if(a.hasOwnProperty(z)&&(l=a[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ae(e,t,z,l,a,null)}return;default:if(Ui(t)){for(_ in a)a.hasOwnProperty(_)&&(l=a[_],l!==void 0&&Sc(e,t,_,l,a,void 0));return}}for(d in a)a.hasOwnProperty(d)&&(l=a[d],l!=null&&Ae(e,t,d,l,a,null))}function cg(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,r=null,d=null,p=null,z=null,_=null;for(T in a){var U=a[T];if(a.hasOwnProperty(T)&&U!=null)switch(T){case"checked":break;case"value":break;case"defaultValue":p=U;default:l.hasOwnProperty(T)||Ae(e,t,T,null,l,U)}}for(var k in l){var T=l[k];if(U=a[k],l.hasOwnProperty(k)&&(T!=null||U!=null))switch(k){case"type":i=T;break;case"name":n=T;break;case"checked":z=T;break;case"defaultChecked":_=T;break;case"value":r=T;break;case"defaultValue":d=T;break;case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(137,t));break;default:T!==U&&Ae(e,t,k,T,l,U)}}Di(e,r,d,p,z,_,i,n);return;case"select":T=r=d=k=null;for(i in a)if(p=a[i],a.hasOwnProperty(i)&&p!=null)switch(i){case"value":break;case"multiple":T=p;default:l.hasOwnProperty(i)||Ae(e,t,i,null,l,p)}for(n in l)if(i=l[n],p=a[n],l.hasOwnProperty(n)&&(i!=null||p!=null))switch(n){case"value":k=i;break;case"defaultValue":d=i;break;case"multiple":r=i;default:i!==p&&Ae(e,t,n,i,l,p)}t=d,a=r,l=T,k!=null?vl(e,!!a,k,!1):!!l!=!!a&&(t!=null?vl(e,!!a,t,!0):vl(e,!!a,a?[]:"",!1));return;case"textarea":T=k=null;for(d in a)if(n=a[d],a.hasOwnProperty(d)&&n!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:Ae(e,t,d,null,l,n)}for(r in l)if(n=l[r],i=a[r],l.hasOwnProperty(r)&&(n!=null||i!=null))switch(r){case"value":k=n;break;case"defaultValue":T=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(o(91));break;default:n!==i&&Ae(e,t,r,n,l,i)}Oo(e,k,T);return;case"option":for(var J in a)if(k=a[J],a.hasOwnProperty(J)&&k!=null&&!l.hasOwnProperty(J))switch(J){case"selected":e.selected=!1;break;default:Ae(e,t,J,null,l,k)}for(p in l)if(k=l[p],T=a[p],l.hasOwnProperty(p)&&k!==T&&(k!=null||T!=null))switch(p){case"selected":e.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:Ae(e,t,p,k,l,T)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var se in a)k=a[se],a.hasOwnProperty(se)&&k!=null&&!l.hasOwnProperty(se)&&Ae(e,t,se,null,l,k);for(z in l)if(k=l[z],T=a[z],l.hasOwnProperty(z)&&k!==T&&(k!=null||T!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(o(137,t));break;default:Ae(e,t,z,k,l,T)}return;default:if(Ui(t)){for(var Me in a)k=a[Me],a.hasOwnProperty(Me)&&k!==void 0&&!l.hasOwnProperty(Me)&&Sc(e,t,Me,void 0,l,k);for(_ in l)k=l[_],T=a[_],!l.hasOwnProperty(_)||k===T||k===void 0&&T===void 0||Sc(e,t,_,k,l,T);return}}for(var j in a)k=a[j],a.hasOwnProperty(j)&&k!=null&&!l.hasOwnProperty(j)&&Ae(e,t,j,null,l,k);for(U in l)k=l[U],T=a[U],!l.hasOwnProperty(U)||k===T||k==null&&T==null||Ae(e,t,U,k,l,T)}function Hf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function og(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var n=a[l],i=n.transferSize,r=n.initiatorType,d=n.duration;if(i&&d&&Hf(r)){for(r=0,d=n.responseEnd,l+=1;l<a.length;l++){var p=a[l],z=p.startTime;if(z>d)break;var _=p.transferSize,U=p.initiatorType;_&&Hf(U)&&(p=p.responseEnd,r+=_*(p<d?1:(d-z)/(p-z)))}if(--l,t+=8*(i+r)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Nc=null,zc=null;function ai(e){return e.nodeType===9?e:e.ownerDocument}function qf(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Lf(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function kc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ec=null;function ug(){var e=window.event;return e&&e.type==="popstate"?e===Ec?!1:(Ec=e,!0):(Ec=null,!1)}var Gf=typeof setTimeout=="function"?setTimeout:void 0,dg=typeof clearTimeout=="function"?clearTimeout:void 0,Yf=typeof Promise=="function"?Promise:void 0,fg=typeof queueMicrotask=="function"?queueMicrotask:typeof Yf<"u"?function(e){return Yf.resolve(null).then(e).catch(mg)}:Gf;function mg(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Vf(e,t){var a=t,l=0;do{var n=a.nextSibling;if(e.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(n),Il(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ln(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ln(a);for(var i=a.firstChild;i;){var r=i.nextSibling,d=i.nodeName;i[ln]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=r}}else a==="body"&&Ln(e.ownerDocument.body);a=n}while(a);Il(t)}function Xf(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Tc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Tc(a),_i(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function hg(e,t,a,l){for(;e.nodeType===1;){var n=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ln])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function pg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ut(e.nextSibling),e===null))return null;return e}function Qf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function wc(e){return e.data==="$?"||e.data==="$~"}function Cc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function gg(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ut(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ac=null;function Zf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ut(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Kf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Jf(e,t,a){switch(t=ai(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ln(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_i(e)}var Bt=new Map,$f=new Set;function li(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ma=Y.d;Y.d={f:xg,r:yg,D:bg,C:vg,L:jg,m:Sg,X:zg,S:Ng,M:kg};function xg(){var e=ma.f(),t=Js();return e||t}function yg(e){var t=xl(e);t!==null&&t.tag===5&&t.type==="form"?dd(t):ma.r(e)}var $l=typeof document>"u"?null:document;function Wf(e,t,a){var l=$l;if(l&&typeof t=="string"&&t){var n=Ct(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),$f.has(n)||($f.add(n),e={rel:e,crossOrigin:a,href:t},l.querySelector(n)===null&&(t=l.createElement("link"),rt(t,"link",e),et(t),l.head.appendChild(t)))}}function bg(e){ma.D(e),Wf("dns-prefetch",e,null)}function vg(e,t){ma.C(e,t),Wf("preconnect",e,t)}function jg(e,t,a){ma.L(e,t,a);var l=$l;if(l&&e&&t){var n='link[rel="preload"][as="'+Ct(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+Ct(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+Ct(a.imageSizes)+'"]')):n+='[href="'+Ct(e)+'"]';var i=n;switch(t){case"style":i=Wl(e);break;case"script":i=Fl(e)}Bt.has(i)||(e=S({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bt.set(i,e),l.querySelector(n)!==null||t==="style"&&l.querySelector(Gn(i))||t==="script"&&l.querySelector(Yn(i))||(t=l.createElement("link"),rt(t,"link",e),et(t),l.head.appendChild(t)))}}function Sg(e,t){ma.m(e,t);var a=$l;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Ct(l)+'"][href="'+Ct(e)+'"]',i=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Fl(e)}if(!Bt.has(i)&&(e=S({rel:"modulepreload",href:e},t),Bt.set(i,e),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Yn(i)))return}l=a.createElement("link"),rt(l,"link",e),et(l),a.head.appendChild(l)}}}function Ng(e,t,a){ma.S(e,t,a);var l=$l;if(l&&e){var n=yl(l).hoistableStyles,i=Wl(e);t=t||"default";var r=n.get(i);if(!r){var d={loading:0,preload:null};if(r=l.querySelector(Gn(i)))d.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bt.get(i))&&Mc(e,a);var p=r=l.createElement("link");et(p),rt(p,"link",e),p._p=new Promise(function(z,_){p.onload=z,p.onerror=_}),p.addEventListener("load",function(){d.loading|=1}),p.addEventListener("error",function(){d.loading|=2}),d.loading|=4,ni(r,t,l)}r={type:"stylesheet",instance:r,count:1,state:d},n.set(i,r)}}}function zg(e,t){ma.X(e,t);var a=$l;if(a&&e){var l=yl(a).hoistableScripts,n=Fl(e),i=l.get(n);i||(i=a.querySelector(Yn(n)),i||(e=S({src:e,async:!0},t),(t=Bt.get(n))&&_c(e,t),i=a.createElement("script"),et(i),rt(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function kg(e,t){ma.M(e,t);var a=$l;if(a&&e){var l=yl(a).hoistableScripts,n=Fl(e),i=l.get(n);i||(i=a.querySelector(Yn(n)),i||(e=S({src:e,async:!0,type:"module"},t),(t=Bt.get(n))&&_c(e,t),i=a.createElement("script"),et(i),rt(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function Ff(e,t,a,l){var n=(n=le.current)?li(n):null;if(!n)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Wl(a.href),a=yl(n).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Wl(a.href);var i=yl(n).hoistableStyles,r=i.get(e);if(r||(n=n.ownerDocument||n,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,r),(i=n.querySelector(Gn(e)))&&!i._p&&(r.instance=i,r.state.loading=5),Bt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Bt.set(e,a),i||Eg(n,e,a,r.state))),t&&l===null)throw Error(o(528,""));return r}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Fl(a),a=yl(n).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Wl(e){return'href="'+Ct(e)+'"'}function Gn(e){return'link[rel="stylesheet"]['+e+"]"}function If(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Eg(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),rt(t,"link",a),et(t),e.head.appendChild(t))}function Fl(e){return'[src="'+Ct(e)+'"]'}function Yn(e){return"script[async]"+e}function Pf(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ct(a.href)+'"]');if(l)return t.instance=l,et(l),l;var n=S({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),et(l),rt(l,"style",n),ni(l,a.precedence,e),t.instance=l;case"stylesheet":n=Wl(a.href);var i=e.querySelector(Gn(n));if(i)return t.state.loading|=4,t.instance=i,et(i),i;l=If(a),(n=Bt.get(n))&&Mc(l,n),i=(e.ownerDocument||e).createElement("link"),et(i);var r=i;return r._p=new Promise(function(d,p){r.onload=d,r.onerror=p}),rt(i,"link",l),t.state.loading|=4,ni(i,a.precedence,e),t.instance=i;case"script":return i=Fl(a.src),(n=e.querySelector(Yn(i)))?(t.instance=n,et(n),n):(l=a,(n=Bt.get(i))&&(l=S({},a),_c(l,n)),e=e.ownerDocument||e,n=e.createElement("script"),et(n),rt(n,"link",l),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ni(l,a.precedence,e));return t.instance}function ni(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,i=n,r=0;r<l.length;r++){var d=l[r];if(d.dataset.precedence===t)i=d;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Mc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function _c(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var si=null;function em(e,t,a){if(si===null){var l=new Map,n=si=new Map;n.set(a,l)}else n=si,l=n.get(a),l||(l=new Map,n.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),n=0;n<a.length;n++){var i=a[n];if(!(i[ln]||i[lt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var r=i.getAttribute(t)||"";r=e+r;var d=l.get(r);d?d.push(i):l.set(r,[i])}}return l}function tm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Tg(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function am(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function wg(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Wl(l.href),i=t.querySelector(Gn(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ii.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,et(i);return}i=t.ownerDocument||t,l=If(l),(n=Bt.get(n))&&Mc(l,n),i=i.createElement("link"),et(i);var r=i;r._p=new Promise(function(d,p){r.onload=d,r.onerror=p}),rt(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ii.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Oc=0;function Cg(e,t){return e.stylesheets&&e.count===0&&ci(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&ci(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Oc===0&&(Oc=62500*og());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ci(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Oc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(n)}}:null}function ii(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ci(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ri=null;function ci(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ri=new Map,t.forEach(Ag,e),ri=null,ii.call(e))}function Ag(e,t){if(!(t.state.loading&4)){var a=ri.get(e);if(a)var l=a.get(null);else{a=new Map,ri.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var r=n[i];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(a.set(r.dataset.precedence,r),l=r)}l&&a.set(null,l)}n=t.instance,r=n.getAttribute("data-precedence"),i=a.get(r)||l,i===l&&a.set(null,n),a.set(r,n),this.count++,l=ii.bind(this),n.addEventListener("load",l),n.addEventListener("error",l),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Vn={$$typeof:P,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Mg(e,t,a,l,n,i,r,d,p){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=wi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wi(0),this.hiddenUpdates=wi(null),this.identifierPrefix=l,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=p,this.incompleteTransitions=new Map}function lm(e,t,a,l,n,i,r,d,p,z,_,U){return e=new Mg(e,t,a,r,p,z,_,U,d),t=1,i===!0&&(t|=24),i=St(3,null,null,t),e.current=i,i.stateNode=e,t=fr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},gr(i),e}function nm(e){return e?(e=wl,e):wl}function sm(e,t,a,l,n,i){n=nm(n),l.context===null?l.context=n:l.pendingContext=n,l=ka(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=Ea(e,l,t),a!==null&&(xt(a,e,t),jn(a,e,t))}function im(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Dc(e,t){im(e,t),(e=e.alternate)&&im(e,t)}function rm(e){if(e.tag===13||e.tag===31){var t=Ia(e,67108864);t!==null&&xt(t,e,67108864),Dc(e,67108864)}}function cm(e){if(e.tag===13||e.tag===31){var t=Tt();t=Ci(t);var a=Ia(e,t);a!==null&&xt(a,e,t),Dc(e,t)}}var oi=!0;function _g(e,t,a,l){var n=w.T;w.T=null;var i=Y.p;try{Y.p=2,Rc(e,t,a,l)}finally{Y.p=i,w.T=n}}function Og(e,t,a,l){var n=w.T;w.T=null;var i=Y.p;try{Y.p=8,Rc(e,t,a,l)}finally{Y.p=i,w.T=n}}function Rc(e,t,a,l){if(oi){var n=Uc(l);if(n===null)jc(e,t,l,ui,a),um(e,l);else if(Rg(n,e,t,a,l))l.stopPropagation();else if(um(e,l),t&4&&-1<Dg.indexOf(e)){for(;n!==null;){var i=xl(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var r=Ka(i.pendingLanes);if(r!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;r;){var p=1<<31-vt(r);d.entanglements[1]|=p,r&=~p}Jt(i),(Ee&6)===0&&(Zs=yt()+500,Bn(0))}}break;case 31:case 13:d=Ia(i,2),d!==null&&xt(d,i,2),Js(),Dc(i,2)}if(i=Uc(l),i===null&&jc(e,t,l,ui,a),i===n)break;n=i}n!==null&&l.stopPropagation()}else jc(e,t,l,null,a)}}function Uc(e){return e=Hi(e),Bc(e)}var ui=null;function Bc(e){if(ui=null,e=gl(e),e!==null){var t=x(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=y(t),e!==null)return e;e=null}else if(a===31){if(e=E(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ui=e,null}function om(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(bh()){case go:return 2;case xo:return 8;case Pn:case vh:return 32;case yo:return 268435456;default:return 32}default:return 32}}var Hc=!1,Ba=null,Ha=null,qa=null,Xn=new Map,Qn=new Map,La=[],Dg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function um(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":Ha=null;break;case"mouseover":case"mouseout":qa=null;break;case"pointerover":case"pointerout":Xn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qn.delete(t.pointerId)}}function Zn(e,t,a,l,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[n]},t!==null&&(t=xl(t),t!==null&&rm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Rg(e,t,a,l,n){switch(t){case"focusin":return Ba=Zn(Ba,e,t,a,l,n),!0;case"dragenter":return Ha=Zn(Ha,e,t,a,l,n),!0;case"mouseover":return qa=Zn(qa,e,t,a,l,n),!0;case"pointerover":var i=n.pointerId;return Xn.set(i,Zn(Xn.get(i)||null,e,t,a,l,n)),!0;case"gotpointercapture":return i=n.pointerId,Qn.set(i,Zn(Qn.get(i)||null,e,t,a,l,n)),!0}return!1}function dm(e){var t=gl(e.target);if(t!==null){var a=x(t);if(a!==null){if(t=a.tag,t===13){if(t=y(a),t!==null){e.blockedOn=t,zo(e.priority,function(){cm(a)});return}}else if(t===31){if(t=E(a),t!==null){e.blockedOn=t,zo(e.priority,function(){cm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function di(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Uc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Bi=l,a.target.dispatchEvent(l),Bi=null}else return t=xl(a),t!==null&&rm(t),e.blockedOn=a,!1;t.shift()}return!0}function fm(e,t,a){di(e)&&a.delete(t)}function Ug(){Hc=!1,Ba!==null&&di(Ba)&&(Ba=null),Ha!==null&&di(Ha)&&(Ha=null),qa!==null&&di(qa)&&(qa=null),Xn.forEach(fm),Qn.forEach(fm)}function fi(e,t){e.blockedOn===t&&(e.blockedOn=null,Hc||(Hc=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,Ug)))}var mi=null;function mm(e){mi!==e&&(mi=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){mi===e&&(mi=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],n=e[t+2];if(typeof l!="function"){if(Bc(l||a)===null)continue;break}var i=xl(a);i!==null&&(e.splice(t,3),t-=3,Ur(i,{pending:!0,data:n,method:a.method,action:l},l,n))}}))}function Il(e){function t(p){return fi(p,e)}Ba!==null&&fi(Ba,e),Ha!==null&&fi(Ha,e),qa!==null&&fi(qa,e),Xn.forEach(t),Qn.forEach(t);for(var a=0;a<La.length;a++){var l=La[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<La.length&&(a=La[0],a.blockedOn===null);)dm(a),a.blockedOn===null&&La.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var n=a[l],i=a[l+1],r=n[dt]||null;if(typeof i=="function")r||mm(a);else if(r){var d=null;if(i&&i.hasAttribute("formAction")){if(n=i,r=i[dt]||null)d=r.formAction;else if(Bc(n)!==null)continue}else d=r.action;typeof d=="function"?a[l+1]=d:(a.splice(l,3),l-=3),mm(a)}}}function hm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(r){return n=r})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function qc(e){this._internalRoot=e}hi.prototype.render=qc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=Tt();sm(a,l,e,t,null,null)},hi.prototype.unmount=qc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sm(e.current,2,null,e,null,null),Js(),t[pl]=null}};function hi(e){this._internalRoot=e}hi.prototype.unstable_scheduleHydration=function(e){if(e){var t=No();e={blockedOn:null,target:e,priority:t};for(var a=0;a<La.length&&t!==0&&t<La[a].priority;a++);La.splice(a,0,e),a===0&&dm(e)}};var pm=f.version;if(pm!=="19.2.4")throw Error(o(527,pm,"19.2.4"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?M(e):null,e=e===null?null:e.stateNode,e};var Bg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pi.isDisabled&&pi.supportsFiber)try{en=pi.inject(Bg),bt=pi}catch{}}return Jn.createRoot=function(e,t){if(!m(e))throw Error(o(299));var a=!1,l="",n=jd,i=Sd,r=Nd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=lm(e,1,!1,null,null,a,l,null,n,i,r,hm),e[pl]=t.current,vc(e),new qc(t)},Jn.hydrateRoot=function(e,t,a){if(!m(e))throw Error(o(299));var l=!1,n="",i=jd,r=Sd,d=Nd,p=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(r=a.onCaughtError),a.onRecoverableError!==void 0&&(d=a.onRecoverableError),a.formState!==void 0&&(p=a.formState)),t=lm(e,1,!0,t,a??null,l,n,p,i,r,d,hm),t.context=nm(null),a=t.current,l=Tt(),l=Ci(l),n=ka(l),n.callback=null,Ea(a,n,l),a=l,t.current.lanes=a,an(t,a),Jt(t),e[pl]=t.current,vc(e),new hi(t)},Jn.version="19.2.4",Jn}var km;function Kg(){if(km)return Yc.exports;km=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(f){console.error(f)}}return c(),Yc.exports=Zg(),Yc.exports}var Jg=Kg();const gi="/api",$c="inkos:api-invalidate";function Si(c){const f=String(c??"").trim();return f?f.startsWith(`${gi}/`)||f===gi?f:f.startsWith("/")?`${gi}${f}`:`${gi}/${f}`:null}function Lm(c){const f=Si(c);if(!f)return[];if(f==="/api/books/create")return["/api/books"];if(f==="/api/project")return["/api/project"];if(f.startsWith("/api/project/"))return["/api/project",f];const u=f.match(/^\/api\/books\/([^/]+)\/(write-next|draft)$/);if(u)return["/api/books",`/api/books/${u[1]}`];const o=f.match(/^\/api\/books\/([^/]+)\/chapters\/\d+\/(approve|reject)$/);return o?["/api/books",`/api/books/${o[1]}`]:/^\/api\/daemon\/(start|stop)$/.test(f)?["/api/daemon"]:[]}function Gm(c){!c.length||typeof window>"u"||window.dispatchEvent(new CustomEvent($c,{detail:{paths:[...new Set(c)]}}))}async function $g(c){if((c.headers.get("content-type")??"").includes("application/json"))try{const u=await c.json();if(typeof u.error=="string"&&u.error.trim())return u.error;if(u.error&&typeof u.error=="object"&&"message"in u.error&&typeof u.error.message=="string"&&u.error.message.trim())return u.error.message}catch{}return`${c.status} ${c.statusText}`.trim()}async function Fe(c,f={},u){const o=Si(c);if(!o)throw new Error("API path is required");const x=await fetch(o,f);if(!x.ok)throw new Error(await $g(x));if(x.status===204)return;if(!(x.headers.get("content-type")??"").includes("application/json")){const E=await x.text();return E.trim()?JSON.parse(E):void 0}return await x.json()}function Ze(c){const[f,u]=B.useState(null),[o,m]=B.useState(!0),[x,y]=B.useState(null),E=B.useCallback(async()=>{const g=Si(c);if(!g){u(null),y(null),m(!1);return}m(!0),y(null);try{const h=await Fe(g);u(h)}catch(h){y(h instanceof Error?h.message:String(h))}finally{m(!1)}},[c]);return B.useEffect(()=>{E()},[E]),B.useEffect(()=>{const g=Si(c);if(!g||typeof window>"u")return;const h=M=>{const S=M.detail;S!=null&&S.paths.includes(g)&&E()};return window.addEventListener($c,h),()=>{window.removeEventListener($c,h)}},[c,E]),{data:f,loading:o,error:x,refetch:E}}async function at(c,f){const u=await Fe(c,{method:"POST",headers:{"Content-Type":"application/json"},body:f?JSON.stringify(f):void 0});return Gm(Lm(c)),u}async function Wg(c,f){const u=await Fe(c,{method:"PUT",headers:{"Content-Type":"application/json"},body:f?JSON.stringify(f):void 0});return Gm(Lm(c)),u}const Fg=new Set(["write:start","draft:start"]),Ig=new Set(["write:complete","write:error","draft:complete","draft:error"]),Pg=new Set(["write:complete","write:error","draft:complete","draft:error","rewrite:complete","rewrite:error","revise:complete","revise:error","audit:complete","audit:error"]),ex=new Set(["book:created","book:deleted","book:error","write:complete","write:error","draft:complete","draft:error","rewrite:complete","rewrite:error","revise:complete","revise:error","audit:complete","audit:error"]),tx=new Set(["daemon:started","daemon:stopped","daemon:error"]);function ao(c){const f=c.data;return typeof(f==null?void 0:f.bookId)=="string"?f.bookId:null}function ax(c){const f=new Set;for(const u of c){const o=ao(u);if(o){if(Fg.has(u.event)){f.add(o);continue}Ig.has(u.event)&&f.delete(o)}}return f}function lx(c,f){let u=!1,o=!1,m=null;for(const x of c){if(ao(x)!==f)continue;const y=x.data;switch(x.event){case"write:start":u=!0,m=null;break;case"write:complete":u=!1,m=null;break;case"write:error":u=!1,m=typeof(y==null?void 0:y.error)=="string"?y.error:"Unknown error";break;case"draft:start":o=!0,m=null;break;case"draft:complete":o=!1,m=null;break;case"draft:error":o=!1,m=typeof(y==null?void 0:y.error)=="string"?y.error:"Unknown error";break}}return{writing:u,drafting:o,lastError:m}}function nx(c,f){return ao(c)===f&&Pg.has(c.event)}function Ym(c){return!!(c&&ex.has(c.event))}function Vm(c){return!!(c&&tx.has(c.event))}/**
|
|
50
|
-
* @license lucide-react v0.577.0 - ISC
|
|
51
|
-
*
|
|
52
|
-
* This source code is licensed under the ISC license.
|
|
53
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const Xm=(...c)=>c.filter((f,u,o)=>!!f&&f.trim()!==""&&o.indexOf(f)===u).join(" ").trim();/**
|
|
55
|
-
* @license lucide-react v0.577.0 - ISC
|
|
56
|
-
*
|
|
57
|
-
* This source code is licensed under the ISC license.
|
|
58
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const sx=c=>c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
60
|
-
* @license lucide-react v0.577.0 - ISC
|
|
61
|
-
*
|
|
62
|
-
* This source code is licensed under the ISC license.
|
|
63
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const ix=c=>c.replace(/^([A-Z])|[\s-_]+(\w)/g,(f,u,o)=>o?o.toUpperCase():u.toLowerCase());/**
|
|
65
|
-
* @license lucide-react v0.577.0 - ISC
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the ISC license.
|
|
68
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const Em=c=>{const f=ix(c);return f.charAt(0).toUpperCase()+f.slice(1)};/**
|
|
70
|
-
* @license lucide-react v0.577.0 - ISC
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the ISC license.
|
|
73
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/var rx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
75
|
-
* @license lucide-react v0.577.0 - ISC
|
|
76
|
-
*
|
|
77
|
-
* This source code is licensed under the ISC license.
|
|
78
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const cx=c=>{for(const f in c)if(f.startsWith("aria-")||f==="role"||f==="title")return!0;return!1};/**
|
|
80
|
-
* @license lucide-react v0.577.0 - ISC
|
|
81
|
-
*
|
|
82
|
-
* This source code is licensed under the ISC license.
|
|
83
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const ox=B.forwardRef(({color:c="currentColor",size:f=24,strokeWidth:u=2,absoluteStrokeWidth:o,className:m="",children:x,iconNode:y,...E},g)=>B.createElement("svg",{ref:g,...rx,width:f,height:f,stroke:c,strokeWidth:o?Number(u)*24/Number(f):u,className:Xm("lucide",m),...!x&&!cx(E)&&{"aria-hidden":"true"},...E},[...y.map(([h,M])=>B.createElement(h,M)),...Array.isArray(x)?x:[x]]));/**
|
|
85
|
-
* @license lucide-react v0.577.0 - ISC
|
|
86
|
-
*
|
|
87
|
-
* This source code is licensed under the ISC license.
|
|
88
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const ae=(c,f)=>{const u=B.forwardRef(({className:o,...m},x)=>B.createElement(ox,{ref:x,iconNode:f,className:Xm(`lucide-${sx(Em(c))}`,`lucide-${c}`,o),...m}));return u.displayName=Em(c),u};/**
|
|
90
|
-
* @license lucide-react v0.577.0 - ISC
|
|
91
|
-
*
|
|
92
|
-
* This source code is licensed under the ISC license.
|
|
93
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/const ux=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],dx=ae("arrow-up",ux);/**
|
|
95
|
-
* @license lucide-react v0.577.0 - ISC
|
|
96
|
-
*
|
|
97
|
-
* This source code is licensed under the ISC license.
|
|
98
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const fx=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],mx=ae("badge-check",fx);/**
|
|
100
|
-
* @license lucide-react v0.577.0 - ISC
|
|
101
|
-
*
|
|
102
|
-
* This source code is licensed under the ISC license.
|
|
103
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const hx=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],px=ae("bell",hx);/**
|
|
105
|
-
* @license lucide-react v0.577.0 - ISC
|
|
106
|
-
*
|
|
107
|
-
* This source code is licensed under the ISC license.
|
|
108
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const gx=[["path",{d:"M5 7a2 2 0 0 0-2 2v11",key:"1yhqjt"}],["path",{d:"M5.803 18H5a2 2 0 0 0 0 4h9.5a.5.5 0 0 0 .5-.5V21",key:"edzzo5"}],["path",{d:"M9 15V4a2 2 0 0 1 2-2h9.5a.5.5 0 0 1 .5.5v14a.5.5 0 0 1-.5.5H11a2 2 0 0 1 0-4h10",key:"1nwzrg"}]],xx=ae("book-copy",gx);/**
|
|
110
|
-
* @license lucide-react v0.577.0 - ISC
|
|
111
|
-
*
|
|
112
|
-
* This source code is licensed under the ISC license.
|
|
113
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/const yx=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Wc=ae("book-open",yx);/**
|
|
115
|
-
* @license lucide-react v0.577.0 - ISC
|
|
116
|
-
*
|
|
117
|
-
* This source code is licensed under the ISC license.
|
|
118
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/const bx=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],vx=ae("book",bx);/**
|
|
120
|
-
* @license lucide-react v0.577.0 - ISC
|
|
121
|
-
*
|
|
122
|
-
* This source code is licensed under the ISC license.
|
|
123
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
-
*/const jx=[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 16a2 2 0 0 1-2 2H8.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 4 20.286V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2z",key:"11gyqh"}],["path",{d:"M9 11v2",key:"1ueba0"}]],Sx=ae("bot-message-square",jx);/**
|
|
125
|
-
* @license lucide-react v0.577.0 - ISC
|
|
126
|
-
*
|
|
127
|
-
* This source code is licensed under the ISC license.
|
|
128
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/const Nx=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],zx=ae("boxes",Nx);/**
|
|
130
|
-
* @license lucide-react v0.577.0 - ISC
|
|
131
|
-
*
|
|
132
|
-
* This source code is licensed under the ISC license.
|
|
133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/const kx=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Qm=ae("brain",kx);/**
|
|
135
|
-
* @license lucide-react v0.577.0 - ISC
|
|
136
|
-
*
|
|
137
|
-
* This source code is licensed under the ISC license.
|
|
138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const Ex=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Tx=ae("chart-column",Ex);/**
|
|
140
|
-
* @license lucide-react v0.577.0 - ISC
|
|
141
|
-
*
|
|
142
|
-
* This source code is licensed under the ISC license.
|
|
143
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const wx=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Zm=ae("chart-no-axes-column",wx);/**
|
|
145
|
-
* @license lucide-react v0.577.0 - ISC
|
|
146
|
-
*
|
|
147
|
-
* This source code is licensed under the ISC license.
|
|
148
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const Cx=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],Ax=ae("check-check",Cx);/**
|
|
150
|
-
* @license lucide-react v0.577.0 - ISC
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the ISC license.
|
|
153
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/const Mx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Km=ae("check",Mx);/**
|
|
155
|
-
* @license lucide-react v0.577.0 - ISC
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the ISC license.
|
|
158
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const _x=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ox=ae("chevron-left",_x);/**
|
|
160
|
-
* @license lucide-react v0.577.0 - ISC
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the ISC license.
|
|
163
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const Dx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Jm=ae("circle-alert",Dx);/**
|
|
165
|
-
* @license lucide-react v0.577.0 - ISC
|
|
166
|
-
*
|
|
167
|
-
* This source code is licensed under the ISC license.
|
|
168
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const Rx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ki=ae("circle-check",Rx);/**
|
|
170
|
-
* @license lucide-react v0.577.0 - ISC
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the ISC license.
|
|
173
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const Ux=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],lo=ae("circle-x",Ux);/**
|
|
175
|
-
* @license lucide-react v0.577.0 - ISC
|
|
176
|
-
*
|
|
177
|
-
* This source code is licensed under the ISC license.
|
|
178
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const Bx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Fc=ae("clock",Bx);/**
|
|
180
|
-
* @license lucide-react v0.577.0 - ISC
|
|
181
|
-
*
|
|
182
|
-
* This source code is licensed under the ISC license.
|
|
183
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/const Hx=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],qx=ae("database",Hx);/**
|
|
185
|
-
* @license lucide-react v0.577.0 - ISC
|
|
186
|
-
*
|
|
187
|
-
* This source code is licensed under the ISC license.
|
|
188
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
-
*/const Lx=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],no=ae("download",Lx);/**
|
|
190
|
-
* @license lucide-react v0.577.0 - ISC
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the ISC license.
|
|
193
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/const Gx=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Yx=ae("ellipsis-vertical",Gx);/**
|
|
195
|
-
* @license lucide-react v0.577.0 - ISC
|
|
196
|
-
*
|
|
197
|
-
* This source code is licensed under the ISC license.
|
|
198
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
-
*/const Vx=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$m=ae("eye",Vx);/**
|
|
200
|
-
* @license lucide-react v0.577.0 - ISC
|
|
201
|
-
*
|
|
202
|
-
* This source code is licensed under the ISC license.
|
|
203
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
-
*/const Xx=[["path",{d:"M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z",key:"18jl4k"}],["path",{d:"M16 8 2 22",key:"vp34q"}],["path",{d:"M17.5 15H9",key:"1oz8nu"}]],Qx=ae("feather",Xx);/**
|
|
205
|
-
* @license lucide-react v0.577.0 - ISC
|
|
206
|
-
*
|
|
207
|
-
* This source code is licensed under the ISC license.
|
|
208
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
-
*/const Zx=[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1",key:"1q9hii"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],Ic=ae("file-input",Zx);/**
|
|
210
|
-
* @license lucide-react v0.577.0 - ISC
|
|
211
|
-
*
|
|
212
|
-
* This source code is licensed under the ISC license.
|
|
213
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
-
*/const Kx=[["path",{d:"M4.226 20.925A2 2 0 0 0 6 22h12a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v3.127",key:"wfxp4w"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Jx=ae("file-output",Kx);/**
|
|
215
|
-
* @license lucide-react v0.577.0 - ISC
|
|
216
|
-
*
|
|
217
|
-
* This source code is licensed under the ISC license.
|
|
218
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/const $x=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Pc=ae("file-text",$x);/**
|
|
220
|
-
* @license lucide-react v0.577.0 - ISC
|
|
221
|
-
*
|
|
222
|
-
* This source code is licensed under the ISC license.
|
|
223
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
-
*/const Wx=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],Fx=ae("flame",Wx);/**
|
|
225
|
-
* @license lucide-react v0.577.0 - ISC
|
|
226
|
-
*
|
|
227
|
-
* This source code is licensed under the ISC license.
|
|
228
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
-
*/const Ix=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Px=ae("hash",Ix);/**
|
|
230
|
-
* @license lucide-react v0.577.0 - ISC
|
|
231
|
-
*
|
|
232
|
-
* This source code is licensed under the ISC license.
|
|
233
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
-
*/const e0=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],t0=ae("lightbulb",e0);/**
|
|
235
|
-
* @license lucide-react v0.577.0 - ISC
|
|
236
|
-
*
|
|
237
|
-
* This source code is licensed under the ISC license.
|
|
238
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
-
*/const a0=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],l0=ae("list",a0);/**
|
|
240
|
-
* @license lucide-react v0.577.0 - ISC
|
|
241
|
-
*
|
|
242
|
-
* This source code is licensed under the ISC license.
|
|
243
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
-
*/const n0=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],In=ae("loader-circle",n0);/**
|
|
245
|
-
* @license lucide-react v0.577.0 - ISC
|
|
246
|
-
*
|
|
247
|
-
* This source code is licensed under the ISC license.
|
|
248
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
-
*/const s0=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Wm=ae("message-square",s0);/**
|
|
250
|
-
* @license lucide-react v0.577.0 - ISC
|
|
251
|
-
*
|
|
252
|
-
* This source code is licensed under the ISC license.
|
|
253
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
-
*/const i0=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],r0=ae("moon",i0);/**
|
|
255
|
-
* @license lucide-react v0.577.0 - ISC
|
|
256
|
-
*
|
|
257
|
-
* This source code is licensed under the ISC license.
|
|
258
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
-
*/const c0=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],o0=ae("panel-right-close",c0);/**
|
|
260
|
-
* @license lucide-react v0.577.0 - ISC
|
|
261
|
-
*
|
|
262
|
-
* This source code is licensed under the ISC license.
|
|
263
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
-
*/const u0=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],d0=ae("pen-tool",u0);/**
|
|
265
|
-
* @license lucide-react v0.577.0 - ISC
|
|
266
|
-
*
|
|
267
|
-
* This source code is licensed under the ISC license.
|
|
268
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
-
*/const f0=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],so=ae("pencil",f0);/**
|
|
270
|
-
* @license lucide-react v0.577.0 - ISC
|
|
271
|
-
*
|
|
272
|
-
* This source code is licensed under the ISC license.
|
|
273
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
-
*/const m0=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ni=ae("plus",m0);/**
|
|
275
|
-
* @license lucide-react v0.577.0 - ISC
|
|
276
|
-
*
|
|
277
|
-
* This source code is licensed under the ISC license.
|
|
278
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
-
*/const h0=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],io=ae("rotate-ccw",h0);/**
|
|
280
|
-
* @license lucide-react v0.577.0 - ISC
|
|
281
|
-
*
|
|
282
|
-
* This source code is licensed under the ISC license.
|
|
283
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
-
*/const p0=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],ro=ae("save",p0);/**
|
|
285
|
-
* @license lucide-react v0.577.0 - ISC
|
|
286
|
-
*
|
|
287
|
-
* This source code is licensed under the ISC license.
|
|
288
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
-
*/const g0=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],x0=ae("scroll-text",g0);/**
|
|
290
|
-
* @license lucide-react v0.577.0 - ISC
|
|
291
|
-
*
|
|
292
|
-
* This source code is licensed under the ISC license.
|
|
293
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
-
*/const y0=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],b0=ae("search",y0);/**
|
|
295
|
-
* @license lucide-react v0.577.0 - ISC
|
|
296
|
-
*
|
|
297
|
-
* This source code is licensed under the ISC license.
|
|
298
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
-
*/const v0=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Fm=ae("settings",v0);/**
|
|
300
|
-
* @license lucide-react v0.577.0 - ISC
|
|
301
|
-
*
|
|
302
|
-
* This source code is licensed under the ISC license.
|
|
303
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
-
*/const j0=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],S0=ae("shield-check",j0);/**
|
|
305
|
-
* @license lucide-react v0.577.0 - ISC
|
|
306
|
-
*
|
|
307
|
-
* This source code is licensed under the ISC license.
|
|
308
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
-
*/const N0=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],z0=ae("shield",N0);/**
|
|
310
|
-
* @license lucide-react v0.577.0 - ISC
|
|
311
|
-
*
|
|
312
|
-
* This source code is licensed under the ISC license.
|
|
313
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
-
*/const k0=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],co=ae("sparkles",k0);/**
|
|
315
|
-
* @license lucide-react v0.577.0 - ISC
|
|
316
|
-
*
|
|
317
|
-
* This source code is licensed under the ISC license.
|
|
318
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
-
*/const E0=[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]],Im=ae("stethoscope",E0);/**
|
|
320
|
-
* @license lucide-react v0.577.0 - ISC
|
|
321
|
-
*
|
|
322
|
-
* This source code is licensed under the ISC license.
|
|
323
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
-
*/const T0=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],w0=ae("sun",T0);/**
|
|
325
|
-
* @license lucide-react v0.577.0 - ISC
|
|
326
|
-
*
|
|
327
|
-
* This source code is licensed under the ISC license.
|
|
328
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
-
*/const C0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],A0=ae("target",C0);/**
|
|
330
|
-
* @license lucide-react v0.577.0 - ISC
|
|
331
|
-
*
|
|
332
|
-
* This source code is licensed under the ISC license.
|
|
333
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
-
*/const M0=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],_0=ae("terminal",M0);/**
|
|
335
|
-
* @license lucide-react v0.577.0 - ISC
|
|
336
|
-
*
|
|
337
|
-
* This source code is licensed under the ISC license.
|
|
338
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
-
*/const O0=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ei=ae("trash-2",O0);/**
|
|
340
|
-
* @license lucide-react v0.577.0 - ISC
|
|
341
|
-
*
|
|
342
|
-
* This source code is licensed under the ISC license.
|
|
343
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
-
*/const D0=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],oo=ae("trending-up",D0);/**
|
|
345
|
-
* @license lucide-react v0.577.0 - ISC
|
|
346
|
-
*
|
|
347
|
-
* This source code is licensed under the ISC license.
|
|
348
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
-
*/const R0=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Pm=ae("triangle-alert",R0);/**
|
|
350
|
-
* @license lucide-react v0.577.0 - ISC
|
|
351
|
-
*
|
|
352
|
-
* This source code is licensed under the ISC license.
|
|
353
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
-
*/const U0=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],B0=ae("type",U0);/**
|
|
355
|
-
* @license lucide-react v0.577.0 - ISC
|
|
356
|
-
*
|
|
357
|
-
* This source code is licensed under the ISC license.
|
|
358
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
-
*/const H0=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],q0=ae("upload",H0);/**
|
|
360
|
-
* @license lucide-react v0.577.0 - ISC
|
|
361
|
-
*
|
|
362
|
-
* This source code is licensed under the ISC license.
|
|
363
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
-
*/const L0=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],G0=ae("user",L0);/**
|
|
365
|
-
* @license lucide-react v0.577.0 - ISC
|
|
366
|
-
*
|
|
367
|
-
* This source code is licensed under the ISC license.
|
|
368
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
-
*/const Y0=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],uo=ae("wand-sparkles",Y0);/**
|
|
370
|
-
* @license lucide-react v0.577.0 - ISC
|
|
371
|
-
*
|
|
372
|
-
* This source code is licensed under the ISC license.
|
|
373
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
-
*/const V0=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],X0=ae("wrench",V0);/**
|
|
375
|
-
* @license lucide-react v0.577.0 - ISC
|
|
376
|
-
*
|
|
377
|
-
* This source code is licensed under the ISC license.
|
|
378
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
-
*/const Q0=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fo=ae("x",Q0);/**
|
|
380
|
-
* @license lucide-react v0.577.0 - ISC
|
|
381
|
-
*
|
|
382
|
-
* This source code is licensed under the ISC license.
|
|
383
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
384
|
-
*/const Z0=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],fl=ae("zap",Z0);function K0({nav:c,activePage:f,sse:u,t:o}){const{data:m,refetch:x}=Ze("/books"),{data:y,refetch:E}=Ze("/daemon");return B.useEffect(()=>{const g=u.messages.at(-1);g&&(Ym(g)&&x(),Vm(g)&&E())},[x,E,u.messages]),s.jsxs("aside",{className:"w-[260px] shrink-0 border-r border-border bg-background/80 backdrop-blur-md flex flex-col h-full overflow-hidden select-none",children:[s.jsx("div",{className:"px-6 py-8",children:s.jsxs("button",{onClick:c.toDashboard,className:"group flex items-center gap-2 hover:opacity-80 transition-all duration-300",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-primary-foreground shadow-lg shadow-primary/20 group-hover:scale-105 transition-transform",children:s.jsx(x0,{size:18})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-serif text-xl leading-none italic font-medium",children:"InkOS"}),s.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground font-bold mt-1",children:"Studio"})]})]})}),s.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-2 space-y-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"px-3 mb-3 flex items-center justify-between",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-widest text-muted-foreground font-bold",children:o("nav.books")}),s.jsx("button",{onClick:c.toBookCreate,className:"p-1 rounded-md text-muted-foreground hover:text-primary hover:bg-primary/10 transition-all group",title:o("nav.newBook"),children:s.jsx(Ni,{size:14,className:"group-hover:rotate-90 transition-transform duration-300"})})]}),s.jsxs("div",{className:"space-y-1",children:[m==null?void 0:m.books.map(g=>s.jsxs("button",{onClick:()=>c.toBook(g.id),className:`w-full group flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-all duration-200 ${f===`book:${g.id}`?"bg-primary/10 text-primary font-semibold":"text-foreground font-medium hover:text-foreground hover:bg-secondary/50"}`,children:[s.jsx(vx,{size:16,className:f===`book:${g.id}`?"text-primary":"text-muted-foreground group-hover:text-foreground"}),s.jsx("span",{className:"truncate flex-1 text-left",children:g.title}),g.chaptersWritten>0&&s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground group-hover:bg-primary/20 group-hover:text-primary transition-colors",children:g.chaptersWritten})]},g.id)),(!(m!=null&&m.books)||m.books.length===0)&&s.jsx("div",{className:"px-3 py-6 text-xs text-muted-foreground/70 italic text-center border border-dashed border-border rounded-lg",children:o("dash.noBooks")})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"px-3 mb-3",children:s.jsx("span",{className:"text-[11px] uppercase tracking-widest text-muted-foreground font-bold",children:o("nav.system")})}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ya,{label:o("create.genre"),icon:s.jsx(zx,{size:16}),active:f==="genres",onClick:c.toGenres}),s.jsx(Ya,{label:o("nav.config"),icon:s.jsx(Fm,{size:16}),active:f==="config",onClick:c.toConfig}),s.jsx(Ya,{label:o("nav.daemon"),icon:s.jsx(fl,{size:16}),active:f==="daemon",onClick:c.toDaemon,badge:y!=null&&y.running?o("nav.running"):void 0,badgeColor:y!=null&&y.running?"bg-emerald-500/10 text-emerald-500":"bg-muted text-muted-foreground"}),s.jsx(Ya,{label:o("nav.logs"),icon:s.jsx(_0,{size:16}),active:f==="logs",onClick:c.toLogs})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"px-3 mb-3",children:s.jsx("span",{className:"text-[11px] uppercase tracking-widest text-muted-foreground font-bold",children:o("nav.tools")})}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(Ya,{label:o("nav.style"),icon:s.jsx(uo,{size:16}),active:f==="style",onClick:c.toStyle}),s.jsx(Ya,{label:o("nav.import"),icon:s.jsx(Ic,{size:16}),active:f==="import",onClick:c.toImport}),s.jsx(Ya,{label:o("nav.radar"),icon:s.jsx(oo,{size:16}),active:f==="radar",onClick:c.toRadar}),s.jsx(Ya,{label:o("nav.doctor"),icon:s.jsx(Im,{size:16}),active:f==="doctor",onClick:c.toDoctor})]})]})]}),s.jsx("div",{className:"p-4 border-t border-border bg-secondary/40",children:s.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg bg-card border border-border shadow-sm",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${y!=null&&y.running?"bg-emerald-500 animate-pulse":"bg-muted-foreground/40"}`}),s.jsx("span",{className:"text-[11px] font-semibold text-foreground/80 uppercase tracking-wider",children:y!=null&&y.running?o("nav.agentOnline"):o("nav.agentOffline")})]})})]})}function Ya({label:c,icon:f,active:u,onClick:o,badge:m,badgeColor:x}){return s.jsxs("button",{onClick:o,className:`w-full group flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-all duration-200 ${u?"bg-secondary text-foreground font-semibold shadow-sm border border-border":"text-foreground font-medium hover:text-foreground hover:bg-secondary/50"}`,children:[s.jsx("span",{className:`transition-colors ${u?"text-primary":"text-muted-foreground group-hover:text-foreground"}`,children:f}),s.jsx("span",{className:"flex-1 text-left",children:c}),m&&s.jsx("span",{className:`text-[9px] px-1.5 py-0.5 rounded-full font-bold uppercase tracking-tight ${x}`,children:m})]})}function eh(c){var f,u,o="";if(typeof c=="string"||typeof c=="number")o+=c;else if(typeof c=="object")if(Array.isArray(c)){var m=c.length;for(f=0;f<m;f++)c[f]&&(u=eh(c[f]))&&(o&&(o+=" "),o+=u)}else for(u in c)c[u]&&(o&&(o+=" "),o+=u);return o}function J0(){for(var c,f,u=0,o="",m=arguments.length;u<m;u++)(c=arguments[u])&&(f=eh(c))&&(o&&(o+=" "),o+=f);return o}const $0=(c,f)=>{const u=new Array(c.length+f.length);for(let o=0;o<c.length;o++)u[o]=c[o];for(let o=0;o<f.length;o++)u[c.length+o]=f[o];return u},W0=(c,f)=>({classGroupId:c,validator:f}),th=(c=new Map,f=null,u)=>({nextPart:c,validators:f,classGroupId:u}),zi="-",Tm=[],F0="arbitrary..",I0=c=>{const f=ey(c),{conflictingClassGroups:u,conflictingClassGroupModifiers:o}=c;return{getClassGroupId:y=>{if(y.startsWith("[")&&y.endsWith("]"))return P0(y);const E=y.split(zi),g=E[0]===""&&E.length>1?1:0;return ah(E,g,f)},getConflictingClassGroupIds:(y,E)=>{if(E){const g=o[y],h=u[y];return g?h?$0(h,g):g:h||Tm}return u[y]||Tm}}},ah=(c,f,u)=>{if(c.length-f===0)return u.classGroupId;const m=c[f],x=u.nextPart.get(m);if(x){const h=ah(c,f+1,x);if(h)return h}const y=u.validators;if(y===null)return;const E=f===0?c.join(zi):c.slice(f).join(zi),g=y.length;for(let h=0;h<g;h++){const M=y[h];if(M.validator(E))return M.classGroupId}},P0=c=>c.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const f=c.slice(1,-1),u=f.indexOf(":"),o=f.slice(0,u);return o?F0+o:void 0})(),ey=c=>{const{theme:f,classGroups:u}=c;return ty(u,f)},ty=(c,f)=>{const u=th();for(const o in c){const m=c[o];mo(m,u,o,f)}return u},mo=(c,f,u,o)=>{const m=c.length;for(let x=0;x<m;x++){const y=c[x];ay(y,f,u,o)}},ay=(c,f,u,o)=>{if(typeof c=="string"){ly(c,f,u);return}if(typeof c=="function"){ny(c,f,u,o);return}sy(c,f,u,o)},ly=(c,f,u)=>{const o=c===""?f:lh(f,c);o.classGroupId=u},ny=(c,f,u,o)=>{if(iy(c)){mo(c(o),f,u,o);return}f.validators===null&&(f.validators=[]),f.validators.push(W0(u,c))},sy=(c,f,u,o)=>{const m=Object.entries(c),x=m.length;for(let y=0;y<x;y++){const[E,g]=m[y];mo(g,lh(f,E),u,o)}},lh=(c,f)=>{let u=c;const o=f.split(zi),m=o.length;for(let x=0;x<m;x++){const y=o[x];let E=u.nextPart.get(y);E||(E=th(),u.nextPart.set(y,E)),u=E}return u},iy=c=>"isThemeGetter"in c&&c.isThemeGetter===!0,ry=c=>{if(c<1)return{get:()=>{},set:()=>{}};let f=0,u=Object.create(null),o=Object.create(null);const m=(x,y)=>{u[x]=y,f++,f>c&&(f=0,o=u,u=Object.create(null))};return{get(x){let y=u[x];if(y!==void 0)return y;if((y=o[x])!==void 0)return m(x,y),y},set(x,y){x in u?u[x]=y:m(x,y)}}},eo="!",wm=":",cy=[],Cm=(c,f,u,o,m)=>({modifiers:c,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:o,isExternal:m}),oy=c=>{const{prefix:f,experimentalParseClassName:u}=c;let o=m=>{const x=[];let y=0,E=0,g=0,h;const M=m.length;for(let X=0;X<M;X++){const L=m[X];if(y===0&&E===0){if(L===wm){x.push(m.slice(g,X)),g=X+1;continue}if(L==="/"){h=X;continue}}L==="["?y++:L==="]"?y--:L==="("?E++:L===")"&&E--}const S=x.length===0?m:m.slice(g);let q=S,D=!1;S.endsWith(eo)?(q=S.slice(0,-1),D=!0):S.startsWith(eo)&&(q=S.slice(1),D=!0);const V=h&&h>g?h-g:void 0;return Cm(x,D,q,V)};if(f){const m=f+wm,x=o;o=y=>y.startsWith(m)?x(y.slice(m.length)):Cm(cy,!1,y,void 0,!0)}if(u){const m=o;o=x=>u({className:x,parseClassName:m})}return o},uy=c=>{const f=new Map;return c.orderSensitiveModifiers.forEach((u,o)=>{f.set(u,1e6+o)}),u=>{const o=[];let m=[];for(let x=0;x<u.length;x++){const y=u[x],E=y[0]==="[",g=f.has(y);E||g?(m.length>0&&(m.sort(),o.push(...m),m=[]),o.push(y)):m.push(y)}return m.length>0&&(m.sort(),o.push(...m)),o}},dy=c=>({cache:ry(c.cacheSize),parseClassName:oy(c),sortModifiers:uy(c),...I0(c)}),fy=/\s+/,my=(c,f)=>{const{parseClassName:u,getClassGroupId:o,getConflictingClassGroupIds:m,sortModifiers:x}=f,y=[],E=c.trim().split(fy);let g="";for(let h=E.length-1;h>=0;h-=1){const M=E[h],{isExternal:S,modifiers:q,hasImportantModifier:D,baseClassName:V,maybePostfixModifierPosition:X}=u(M);if(S){g=M+(g.length>0?" "+g:g);continue}let L=!!X,ue=o(L?V.substring(0,X):V);if(!ue){if(!L){g=M+(g.length>0?" "+g:g);continue}if(ue=o(V),!ue){g=M+(g.length>0?" "+g:g);continue}L=!1}const re=q.length===0?"":q.length===1?q[0]:x(q).join(":"),P=D?re+eo:re,pe=P+ue;if(y.indexOf(pe)>-1)continue;y.push(pe);const be=m(ue,L);for(let H=0;H<be.length;++H){const K=be[H];y.push(P+K)}g=M+(g.length>0?" "+g:g)}return g},hy=(...c)=>{let f=0,u,o,m="";for(;f<c.length;)(u=c[f++])&&(o=nh(u))&&(m&&(m+=" "),m+=o);return m},nh=c=>{if(typeof c=="string")return c;let f,u="";for(let o=0;o<c.length;o++)c[o]&&(f=nh(c[o]))&&(u&&(u+=" "),u+=f);return u},py=(c,...f)=>{let u,o,m,x;const y=g=>{const h=f.reduce((M,S)=>S(M),c());return u=dy(h),o=u.cache.get,m=u.cache.set,x=E,E(g)},E=g=>{const h=o(g);if(h)return h;const M=my(g,u);return m(g,M),M};return x=y,(...g)=>x(hy(...g))},gy=[],Pe=c=>{const f=u=>u[c]||gy;return f.isThemeGetter=!0,f},sh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ih=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xy=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,yy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,by=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,vy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Va=c=>xy.test(c),ge=c=>!!c&&!Number.isNaN(Number(c)),Xa=c=>!!c&&Number.isInteger(Number(c)),Zc=c=>c.endsWith("%")&&ge(c.slice(0,-1)),ha=c=>yy.test(c),rh=()=>!0,Ny=c=>by.test(c)&&!vy.test(c),ho=()=>!1,zy=c=>jy.test(c),ky=c=>Sy.test(c),Ey=c=>!$(c)&&!W(c),Ty=c=>Za(c,uh,ho),$=c=>sh.test(c),dl=c=>Za(c,dh,Ny),Am=c=>Za(c,Ry,ge),wy=c=>Za(c,mh,rh),Cy=c=>Za(c,fh,ho),Mm=c=>Za(c,ch,ho),Ay=c=>Za(c,oh,ky),xi=c=>Za(c,hh,zy),W=c=>ih.test(c),$n=c=>ml(c,dh),My=c=>ml(c,fh),_m=c=>ml(c,ch),_y=c=>ml(c,uh),Oy=c=>ml(c,oh),yi=c=>ml(c,hh,!0),Dy=c=>ml(c,mh,!0),Za=(c,f,u)=>{const o=sh.exec(c);return o?o[1]?f(o[1]):u(o[2]):!1},ml=(c,f,u=!1)=>{const o=ih.exec(c);return o?o[1]?f(o[1]):u:!1},ch=c=>c==="position"||c==="percentage",oh=c=>c==="image"||c==="url",uh=c=>c==="length"||c==="size"||c==="bg-size",dh=c=>c==="length",Ry=c=>c==="number",fh=c=>c==="family-name",mh=c=>c==="number"||c==="weight",hh=c=>c==="shadow",Uy=()=>{const c=Pe("color"),f=Pe("font"),u=Pe("text"),o=Pe("font-weight"),m=Pe("tracking"),x=Pe("leading"),y=Pe("breakpoint"),E=Pe("container"),g=Pe("spacing"),h=Pe("radius"),M=Pe("shadow"),S=Pe("inset-shadow"),q=Pe("text-shadow"),D=Pe("drop-shadow"),V=Pe("blur"),X=Pe("perspective"),L=Pe("aspect"),ue=Pe("ease"),re=Pe("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],pe=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],be=()=>[...pe(),W,$],H=()=>["auto","hidden","clip","visible","scroll"],K=()=>["auto","contain","none"],C=()=>[W,$,g],ee=()=>[Va,"full","auto",...C()],Ne=()=>[Xa,"none","subgrid",W,$],Re=()=>["auto",{span:["full",Xa,W,$]},Xa,W,$],Oe=()=>[Xa,"auto",W,$],ie=()=>["auto","min","max","fr",W,$],Ge=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Le=()=>["start","end","center","stretch","center-safe","end-safe"],w=()=>["auto",...C()],Y=()=>[Va,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],F=()=>[Va,"screen","full","dvw","lvw","svw","min","max","fit",...C()],he=()=>[Va,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],A=()=>[c,W,$],v=()=>[...pe(),_m,Mm,{position:[W,$]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",_y,Ty,{size:[W,$]}],Z=()=>[Zc,$n,dl],te=()=>["","none","full",h,W,$],le=()=>["",ge,$n,dl],ce=()=>["solid","dashed","dotted","double"],He=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[ge,Zc,_m,Mm],qt=()=>["","none",V,W,$],Lt=()=>["none",ge,W,$],Xt=()=>["none",ge,W,$],pa=()=>[ge,W,$],G=()=>[Va,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ha],breakpoint:[ha],color:[rh],container:[ha],"drop-shadow":[ha],ease:["in","out","in-out"],font:[Ey],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ha],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ha],shadow:[ha],spacing:["px",ge],text:[ha],"text-shadow":[ha],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Va,$,W,L]}],container:["container"],columns:[{columns:[ge,$,W,E]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:be()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ee()}],"inset-x":[{"inset-x":ee()}],"inset-y":[{"inset-y":ee()}],start:[{"inset-s":ee(),start:ee()}],end:[{"inset-e":ee(),end:ee()}],"inset-bs":[{"inset-bs":ee()}],"inset-be":[{"inset-be":ee()}],top:[{top:ee()}],right:[{right:ee()}],bottom:[{bottom:ee()}],left:[{left:ee()}],visibility:["visible","invisible","collapse"],z:[{z:[Xa,"auto",W,$]}],basis:[{basis:[Va,"full","auto",E,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,Va,"auto","initial","none",$]}],grow:[{grow:["",ge,W,$]}],shrink:[{shrink:["",ge,W,$]}],order:[{order:[Xa,"first","last","none",W,$]}],"grid-cols":[{"grid-cols":Ne()}],"col-start-end":[{col:Re()}],"col-start":[{"col-start":Oe()}],"col-end":[{"col-end":Oe()}],"grid-rows":[{"grid-rows":Ne()}],"row-start-end":[{row:Re()}],"row-start":[{"row-start":Oe()}],"row-end":[{"row-end":Oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...Ge(),"normal"]}],"justify-items":[{"justify-items":[...Le(),"normal"]}],"justify-self":[{"justify-self":["auto",...Le()]}],"align-content":[{content:["normal",...Ge()]}],"align-items":[{items:[...Le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Le(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ge()}],"place-items":[{"place-items":[...Le(),"baseline"]}],"place-self":[{"place-self":["auto",...Le()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mbs:[{mbs:w()}],mbe:[{mbe:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...F()]}],"min-inline-size":[{"min-inline":["auto",...F()]}],"max-inline-size":[{"max-inline":["none",...F()]}],"block-size":[{block:["auto",...he()]}],"min-block-size":[{"min-block":["auto",...he()]}],"max-block-size":[{"max-block":["none",...he()]}],w:[{w:[E,"screen",...Y()]}],"min-w":[{"min-w":[E,"screen","none",...Y()]}],"max-w":[{"max-w":[E,"screen","none","prose",{screen:[y]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",u,$n,dl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Dy,wy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zc,$]}],"font-family":[{font:[My,Cy,f]}],"font-features":[{"font-features":[$]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[m,W,$]}],"line-clamp":[{"line-clamp":[ge,"none",W,Am]}],leading:[{leading:[x,...C()]}],"list-image":[{"list-image":["none",W,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",W,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",W,dl]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ge,"auto",W,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",W,$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",W,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:v()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Xa,W,$],radial:["",W,$],conic:[Xa,W,$]},Oy,Ay]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:le()}],"border-w-x":[{"border-x":le()}],"border-w-y":[{"border-y":le()}],"border-w-s":[{"border-s":le()}],"border-w-e":[{"border-e":le()}],"border-w-bs":[{"border-bs":le()}],"border-w-be":[{"border-be":le()}],"border-w-t":[{"border-t":le()}],"border-w-r":[{"border-r":le()}],"border-w-b":[{"border-b":le()}],"border-w-l":[{"border-l":le()}],"divide-x":[{"divide-x":le()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":le()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,W,$]}],"outline-w":[{outline:["",ge,$n,dl]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",M,yi,xi]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",S,yi,xi]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ge,dl]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":le()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",q,yi,xi]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ge,W,$]}],"mix-blend":[{"mix-blend":[...He(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":He()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[W,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":pe()}],"mask-image-conic-pos":[{"mask-conic":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:v()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",W,$]}],filter:[{filter:["","none",W,$]}],blur:[{blur:qt()}],brightness:[{brightness:[ge,W,$]}],contrast:[{contrast:[ge,W,$]}],"drop-shadow":[{"drop-shadow":["","none",D,yi,xi]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",ge,W,$]}],"hue-rotate":[{"hue-rotate":[ge,W,$]}],invert:[{invert:["",ge,W,$]}],saturate:[{saturate:[ge,W,$]}],sepia:[{sepia:["",ge,W,$]}],"backdrop-filter":[{"backdrop-filter":["","none",W,$]}],"backdrop-blur":[{"backdrop-blur":qt()}],"backdrop-brightness":[{"backdrop-brightness":[ge,W,$]}],"backdrop-contrast":[{"backdrop-contrast":[ge,W,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,W,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,W,$]}],"backdrop-invert":[{"backdrop-invert":["",ge,W,$]}],"backdrop-opacity":[{"backdrop-opacity":[ge,W,$]}],"backdrop-saturate":[{"backdrop-saturate":[ge,W,$]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,W,$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",W,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",W,$]}],ease:[{ease:["linear","initial",ue,W,$]}],delay:[{delay:[ge,W,$]}],animate:[{animate:["none",re,W,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[X,W,$]}],"perspective-origin":[{"perspective-origin":be()}],rotate:[{rotate:Lt()}],"rotate-x":[{"rotate-x":Lt()}],"rotate-y":[{"rotate-y":Lt()}],"rotate-z":[{"rotate-z":Lt()}],scale:[{scale:Xt()}],"scale-x":[{"scale-x":Xt()}],"scale-y":[{"scale-y":Xt()}],"scale-z":[{"scale-z":Xt()}],"scale-3d":["scale-3d"],skew:[{skew:pa()}],"skew-x":[{"skew-x":pa()}],"skew-y":[{"skew-y":pa()}],transform:[{transform:[W,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:be()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",W,$]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",W,$]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[ge,$n,dl,Am]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},By=py(Uy);function Fn(...c){return By(J0(c))}function Hy(c,f){return c&&f.some(u=>u.id===c)?{bookId:c,reason:"active"}:f.length===1?{bookId:f[0].id,reason:"single"}:f.length===0?{bookId:null,reason:"missing"}:{bookId:null,reason:"ambiguous"}}function qy({phase:c}){const f=c.toLowerCase();return f.includes("think")||f.includes("plan")?s.jsx(Qm,{size:14,className:"text-purple-500 animate-pulse"}):f.includes("writ")||f.includes("draft")||f.includes("stream")?s.jsx(d0,{size:14,className:"text-blue-500 chat-icon-write"}):f.includes("audit")||f.includes("review")?s.jsx(z0,{size:14,className:"text-amber-500 animate-pulse"}):f.includes("revis")||f.includes("fix")||f.includes("spot")?s.jsx(X0,{size:14,className:"text-orange-500 chat-icon-spin-slow"}):f.includes("complet")||f.includes("done")||f.includes("success")?s.jsx(ki,{size:14,className:"text-emerald-500 chat-icon-pop"}):f.includes("error")||f.includes("fail")?s.jsx(Pm,{size:14,className:"text-destructive animate-pulse"}):s.jsx(In,{size:14,className:"text-primary animate-spin"})}function Ly(){return s.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center opacity-40 select-none fade-in",children:[s.jsx("div",{className:"w-14 h-14 rounded-2xl border border-dashed border-border flex items-center justify-center mb-4 bg-secondary/30",children:s.jsx(Sx,{size:24,className:"text-muted-foreground"})}),s.jsx("p",{className:"text-sm italic font-serif mb-1",children:"How shall we proceed today?"}),s.jsx("p",{className:"text-[10px] text-muted-foreground/60 uppercase tracking-widest",children:"Type a command below"})]})}function Gy(){return s.jsxs("div",{className:"flex gap-2.5 chat-msg-assistant",children:[s.jsx("div",{className:"w-7 h-7 rounded-lg bg-secondary flex items-center justify-center shrink-0 chat-thinking-glow",children:s.jsx(Qm,{size:14,className:"text-primary animate-pulse"})}),s.jsxs("div",{className:"bg-card border border-border/50 px-3.5 py-2.5 rounded-2xl rounded-tl-sm flex gap-1.5 items-center",children:[s.jsx("span",{className:"w-1.5 h-1.5 bg-primary/50 rounded-full chat-typing-dot"}),s.jsx("span",{className:"w-1.5 h-1.5 bg-primary/50 rounded-full chat-typing-dot"}),s.jsx("span",{className:"w-1.5 h-1.5 bg-primary/50 rounded-full chat-typing-dot"})]})]})}function Yy({msg:c}){const f=c.role==="user",u=c.content.startsWith("⋯"),o=c.content.startsWith("✓"),m=c.content.startsWith("✗");return s.jsxs("div",{className:Fn("flex gap-2.5",f?"flex-row-reverse chat-msg-user":"chat-msg-assistant"),children:[s.jsx("div",{className:Fn("w-7 h-7 rounded-lg flex items-center justify-center shrink-0 mt-0.5 transition-colors",f?"bg-primary/10":"bg-secondary"),children:f?s.jsx(G0,{size:14,className:"text-primary"}):o?s.jsx(ki,{size:14,className:"text-emerald-500 chat-icon-pop"}):m?s.jsx(lo,{size:14,className:"text-destructive"}):u?s.jsx(In,{size:14,className:"text-primary animate-spin"}):s.jsx(co,{size:14,className:"text-primary"})}),s.jsxs("div",{className:Fn("max-w-[80%] rounded-2xl px-3.5 py-2 text-sm leading-relaxed shadow-sm",f?"bg-primary text-primary-foreground font-medium rounded-tr-sm":u?"bg-secondary/50 border border-border/30 text-muted-foreground font-mono text-xs rounded-tl-sm":"bg-card border border-border/50 text-foreground font-serif rounded-tl-sm"),children:[o&&s.jsxs("span",{className:"flex items-center gap-1.5 text-emerald-600 dark:text-emerald-400 font-sans font-medium text-[10px] mb-1 uppercase tracking-wider",children:[s.jsx(mx,{size:11}),"Complete"]}),m&&s.jsxs("span",{className:"flex items-center gap-1.5 text-destructive font-sans font-medium text-[10px] mb-1 uppercase tracking-wider",children:[s.jsx(Jm,{size:11}),"Error"]}),s.jsx("div",{children:c.content}),s.jsx("div",{className:Fn("text-[9px] mt-1.5 font-mono",f?"text-primary-foreground/40":"text-muted-foreground/40"),children:new Date(c.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})}function bi({icon:c,label:f,onClick:u}){return s.jsxs("button",{onClick:u,className:"shrink-0 flex items-center gap-1 px-2.5 py-1 rounded-lg bg-secondary/50 border border-border/30 text-[10px] font-medium text-muted-foreground hover:text-primary hover:border-primary/30 hover:bg-primary/5 transition-all group",children:[s.jsx("span",{className:"group-hover:scale-110 transition-transform",children:c}),f]})}function Vy({open:c,onClose:f,t:u,sse:o,activeBookId:m}){const[x,y]=B.useState(""),[E,g]=B.useState([]),[h,M]=B.useState(!1),S=B.useRef(null),q=B.useRef(null);B.useEffect(()=>{q.current&&q.current.scrollTo({top:q.current.scrollHeight,behavior:"smooth"})},[E,o.messages.length]),B.useEffect(()=>{c&&setTimeout(()=>{var H;return(H=S.current)==null?void 0:H.focus()},300)},[c]),B.useEffect(()=>{const H=o.messages.slice(-1)[0];if(!H||H.event==="ping")return;const K=H.data;if(H.event==="write:complete"||H.event==="draft:complete"){M(!1);const C=K.title??`Chapter ${K.chapterNumber}`;g(ee=>{var Ne;return[...ee,{role:"assistant",content:`✓ ${C} (${((Ne=K.wordCount)==null?void 0:Ne.toLocaleString())??"?"} chars)`,timestamp:Date.now()}]})}if((H.event==="write:error"||H.event==="draft:error")&&(M(!1),g(C=>[...C,{role:"assistant",content:`✗ ${K.error??"Unknown error"}`,timestamp:Date.now()}])),H.event==="log"&&h){const C=K.message;C&&(C.includes("Phase")||C.includes("streaming")||C.includes("Writing")||C.includes("Audit")||C.includes("Revis"))&&g(ee=>{const Ne=ee[ee.length-1];return(Ne==null?void 0:Ne.role)==="assistant"&&Ne.content.startsWith("⋯")?[...ee.slice(0,-1),{role:"assistant",content:`⋯ ${C}`,timestamp:Date.now()}]:[...ee,{role:"assistant",content:`⋯ ${C}`,timestamp:Date.now()}]})}},[o.messages.length]);const D=B.useMemo(()=>{const H=[...E].reverse().find(K=>K.role==="assistant"&&K.content.startsWith("⋯"));return(H==null?void 0:H.content.replace("⋯ ",""))??"Initializing..."},[E]),V=async()=>{const H=x.trim();if(!H||h)return;y(""),g(C=>[...C,{role:"user",content:H,timestamp:Date.now()}]),M(!0);const K=H.toLowerCase();try{if(K.match(/^(写下一章|write next)/)){const{books:ee}=await Fe("/books"),Ne=Hy(m,ee);if(Ne.bookId){g(Re=>[...Re,{role:"assistant",content:L?`⋯ 开始处理《${Ne.bookId}》...`:`⋯ Starting ${Ne.bookId}...`,timestamp:Date.now()}]),await at(`/books/${Ne.bookId}/write-next`,{});return}M(!1),g(Re=>[...Re,{role:"assistant",content:Ne.reason==="missing"?L?"✗ 还没有书,先创建一本再写。":"✗ No books yet. Create one first.":L?"✗ 当前有多本书,请先打开目标书籍后再执行“写下一章”。":'✗ Multiple books found. Open the target book first, then run "write next".',timestamp:Date.now()}]);return}const C=await Fe("/agent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({instruction:H})});M(!1),g(ee=>[...ee,{role:"assistant",content:C.response??C.error??"Acknowledged.",timestamp:Date.now()}])}catch(C){M(!1),g(ee=>[...ee,{role:"assistant",content:`✗ ${C instanceof Error?C.message:String(C)}`,timestamp:Date.now()}])}},X=H=>{y(H),setTimeout(()=>{V()},50)},L=u("nav.connected")==="已连接",P=L?["写下一章","审计第5章","帮我创建一本都市修仙小说","扫描市场趋势","导出全书为 epub","分析文风 → 导入到我的书","导入已有章节续写","创建一个玄幻题材的同人","修订第5章,spot-fix"]:["write next chapter","audit chapter 5","create a LitRPG novel","scan market trends","export book as epub","analyze style → import","import chapters to continue","create a progression fantasy fanfic","revise chapter 5, spot-fix"],[pe,be]=B.useState(()=>Math.floor(Math.random()*P.length));return B.useEffect(()=>{if(x)return;const H=setInterval(()=>be(K=>(K+1)%P.length),8e3);return()=>clearInterval(H)},[x,P.length]),s.jsx("aside",{className:Fn("h-full flex flex-col border-l border-border/40 bg-background/80 backdrop-blur-md chat-panel-enter shrink-0 overflow-hidden",c?"w-[380px] opacity-100":"w-0 opacity-0"),children:c&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"h-12 shrink-0 px-4 flex items-center justify-between border-b border-border/40",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsxs("div",{className:"relative",children:[s.jsx(co,{size:15,className:"text-primary chat-icon-glow"}),h&&s.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 bg-primary rounded-full animate-ping"})]}),s.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] font-bold text-muted-foreground",children:"InkOS Assistant"})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>g([]),className:"p-1.5 rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors group",title:"Clear conversation",children:s.jsx(Ei,{size:14,className:"group-hover:animate-[shake_0.3s_ease-in-out]"})}),s.jsx("button",{onClick:f,className:"p-1.5 rounded-md text-muted-foreground hover:bg-secondary transition-colors group",title:"Close panel",children:s.jsx(o0,{size:14,className:"group-hover:translate-x-0.5 transition-transform"})})]})]}),h&&s.jsx("div",{className:"shrink-0 px-4 py-2 border-b border-border/30 bg-primary/[0.03] fade-in",children:s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx(qy,{phase:D}),s.jsx("span",{className:"text-xs font-medium text-primary truncate flex-1",children:D}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx("span",{className:"w-1 h-1 bg-primary/40 rounded-full chat-typing-dot"}),s.jsx("span",{className:"w-1 h-1 bg-primary/40 rounded-full chat-typing-dot"}),s.jsx("span",{className:"w-1 h-1 bg-primary/40 rounded-full chat-typing-dot"})]})]})}),s.jsxs("div",{ref:q,className:"flex-1 overflow-y-auto px-4 py-4 space-y-3",children:[E.length===0&&!h&&s.jsx(Ly,{}),E.map(H=>s.jsx(Yy,{msg:H},H.timestamp)),h&&!E.some(H=>H.content.startsWith("⋯"))&&s.jsx(Gy,{})]}),s.jsxs("div",{className:"shrink-0 px-3 py-2 border-t border-border/30 flex gap-1.5 overflow-x-auto",children:[s.jsx(bi,{icon:s.jsx(fl,{size:11}),label:u("dash.writeNext"),onClick:()=>X(L?"写下一章":"write next")}),s.jsx(bi,{icon:s.jsx(b0,{size:11}),label:u("book.audit"),onClick:()=>X(L?"审计第1章":"audit chapter 1")}),s.jsx(bi,{icon:s.jsx(Jx,{size:11}),label:u("book.export"),onClick:()=>X(L?"导出全书":"export book as epub")}),s.jsx(bi,{icon:s.jsx(oo,{size:11}),label:u("nav.radar"),onClick:()=>X(L?"扫描市场趋势":"scan market trends")})]}),s.jsxs("div",{className:"shrink-0 p-3 border-t border-border/40",children:[s.jsxs("div",{className:"flex items-center gap-2 rounded-xl bg-secondary/30 border border-border/40 px-3 py-1.5 focus-within:border-primary/40 focus-within:ring-2 focus-within:ring-primary/10 transition-all",children:[s.jsx(Wm,{size:14,className:"text-muted-foreground/50 shrink-0"}),s.jsx("input",{ref:S,type:"text",value:x,onChange:H=>y(H.target.value),onKeyDown:H=>{H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),V())},placeholder:u("common.enterCommand"),disabled:h,className:"flex-1 bg-transparent text-sm placeholder:text-muted-foreground/50 outline-none ring-0 shadow-none disabled:opacity-50",style:{outline:"none",boxShadow:"none"}}),s.jsx("button",{onClick:V,disabled:!x.trim()||h,className:"w-7 h-7 rounded-lg bg-primary text-primary-foreground flex items-center justify-center hover:scale-105 active:scale-95 transition-all disabled:opacity-20 disabled:scale-100 shadow-sm shadow-primary/20",children:h?s.jsx(In,{size:14,className:"animate-spin"}):s.jsx(dx,{size:14,strokeWidth:2.5})})]}),!x&&s.jsxs("div",{className:"mt-1.5 px-1 flex items-center gap-1.5",children:[s.jsx(t0,{size:10,className:"text-muted-foreground/30 shrink-0"}),s.jsx("span",{className:"text-[9px] text-muted-foreground/40 truncate fade-in",children:P[pe]},pe)]})]})]})})}function Ht(c){return{card:"border-border hover:border-primary/40 transition-all duration-200",cardStatic:"border-border",surface:"bg-card",muted:"text-muted-foreground",subtle:"text-muted-foreground",link:"hover:text-primary transition-colors cursor-pointer",input:"bg-input/40 border border-border text-foreground focus:border-primary focus:ring-2 focus:ring-primary/20 transition-all duration-200",btnPrimary:"bg-primary text-primary-foreground hover:opacity-90 active:opacity-80 transition-opacity",btnSecondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 transition-colors",btnSuccess:"bg-emerald-600 text-white hover:bg-emerald-700 dark:bg-emerald-700 dark:hover:bg-emerald-600 transition-colors",btnDanger:"bg-destructive text-destructive-foreground hover:opacity-90 transition-opacity",tableHeader:"bg-muted/60 text-muted-foreground text-xs uppercase tracking-wider font-medium",tableDivide:"divide-border",tableHover:"hover:bg-muted/40 transition-colors",error:"border-destructive/50 bg-destructive/10 text-destructive",info:"border-primary/30 bg-primary/8 text-primary",code:"bg-muted text-foreground/80 font-mono",active:"text-emerald-500",paused:"text-amber-500",mono:"font-mono text-sm",accent:"text-primary"}}function ph({open:c,title:f,message:u,confirmLabel:o,cancelLabel:m,variant:x="default",onConfirm:y,onCancel:E}){const g=B.useRef(null);if(B.useEffect(()=>{if(!c)return;const M=S=>{S.key==="Escape"&&E()};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[c,E]),!c)return null;const h=x==="danger";return s.jsx("div",{ref:g,className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/40 backdrop-blur-sm fade-in",onClick:M=>{M.target===g.current&&E()},children:s.jsxs("div",{className:"bg-card border border-border rounded-2xl shadow-2xl shadow-primary/10 w-full max-w-md mx-4 overflow-hidden chat-msg-assistant",children:[s.jsxs("div",{className:"flex items-center justify-between px-6 pt-6 pb-2",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[h&&s.jsx("div",{className:"w-10 h-10 rounded-xl bg-destructive/10 flex items-center justify-center",children:s.jsx(Pm,{size:20,className:"text-destructive"})}),s.jsx("h3",{className:"text-lg font-semibold",children:f})]}),s.jsx("button",{onClick:E,className:"p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors",children:s.jsx(fo,{size:16})})]}),s.jsx("div",{className:"px-6 py-4",children:s.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:u})}),s.jsxs("div",{className:"flex justify-end gap-3 px-6 pb-6",children:[s.jsx("button",{onClick:E,className:"px-4 py-2.5 text-sm font-medium rounded-xl bg-secondary text-foreground hover:bg-secondary/80 transition-all border border-border/50",children:m}),s.jsx("button",{onClick:y,className:`px-4 py-2.5 text-sm font-bold rounded-xl transition-all hover:scale-105 active:scale-95 shadow-sm ${h?"bg-destructive text-white hover:shadow-destructive/20":"bg-primary text-primary-foreground hover:shadow-primary/20"}`,children:o})]})]})})}function Xy({bookId:c,bookTitle:f,nav:u,t:o,onDelete:m}){const[x,y]=B.useState(!1),[E,g]=B.useState(!1),h=B.useRef(null);B.useEffect(()=>{if(!x)return;const S=q=>{h.current&&!h.current.contains(q.target)&&y(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[x]);const M=async()=>{g(!1),y(!1),await Fe(`/books/${c}`,{method:"DELETE"}),m()};return s.jsxs("div",{ref:h,className:"relative",children:[s.jsx("button",{onClick:()=>y(S=>!S),className:"p-3 rounded-xl text-muted-foreground hover:text-primary hover:bg-primary/10 hover:scale-105 active:scale-95 transition-all cursor-pointer",children:s.jsx(Yx,{size:18})}),x&&s.jsxs("div",{className:"absolute right-0 top-full mt-1 w-44 bg-card border border-border rounded-xl shadow-lg shadow-primary/5 py-1 z-50 fade-in",children:[s.jsxs("button",{onClick:()=>{y(!1),u.toBook(c)},className:"w-full flex items-center gap-2.5 px-4 py-2.5 text-sm text-foreground hover:bg-secondary/50 transition-colors cursor-pointer",children:[s.jsx(Fm,{size:14,className:"text-muted-foreground"}),o("book.settings")]}),s.jsxs("a",{href:`/api/books/${c}/export?format=txt`,download:!0,onClick:()=>y(!1),className:"w-full flex items-center gap-2.5 px-4 py-2.5 text-sm text-foreground hover:bg-secondary/50 transition-colors cursor-pointer",children:[s.jsx(no,{size:14,className:"text-muted-foreground"}),o("book.export")]}),s.jsx("div",{className:"border-t border-border/50 my-1"}),s.jsxs("button",{onClick:()=>{y(!1),g(!0)},className:"w-full flex items-center gap-2.5 px-4 py-2.5 text-sm text-destructive hover:bg-destructive/10 transition-colors cursor-pointer",children:[s.jsx(Ei,{size:14}),o("book.deleteBook")]})]}),s.jsx(ph,{open:E,title:o("book.deleteBook"),message:`${o("book.confirmDelete")}
|
|
385
|
-
|
|
386
|
-
"${f}"`,confirmLabel:o("common.delete"),cancelLabel:o("common.cancel"),variant:"danger",onConfirm:M,onCancel:()=>g(!1)})]})}function Qy({nav:c,sse:f,theme:u,t:o}){var S,q;const{data:m,loading:x,error:y,refetch:E}=Ze("/books"),g=B.useMemo(()=>ax(f.messages),[f.messages]),h=f.messages.filter(D=>D.event==="log").slice(-8),M=f.messages.filter(D=>D.event==="llm:progress").slice(-1)[0];return B.useEffect(()=>{const D=f.messages.at(-1);D&&Ym(D)&&E()},[E,f.messages]),x?s.jsxs("div",{className:"flex flex-col items-center justify-center py-32 space-y-4",children:[s.jsx("div",{className:"w-8 h-8 border-2 border-primary/20 border-t-primary rounded-full animate-spin"}),s.jsx("span",{className:"text-sm text-muted-foreground animate-pulse",children:"Gathering manuscripts..."})]}):y?s.jsxs("div",{className:"flex flex-col items-center justify-center py-20 bg-destructive/5 border border-destructive/20 rounded-2xl",children:[s.jsx(Jm,{className:"text-destructive mb-4",size:32}),s.jsx("h2",{className:"text-lg font-semibold text-destructive",children:"Failed to load library"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:y})]}):m!=null&&m.books.length?s.jsxs("div",{className:"space-y-12",children:[s.jsxs("div",{className:"flex items-end justify-between border-b border-border/40 pb-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"font-serif text-4xl mb-2",children:o("dash.title")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:o("dash.subtitle")})]}),s.jsxs("button",{onClick:c.toBookCreate,className:"group flex items-center gap-2 px-5 py-2.5 rounded-xl text-sm font-bold bg-primary text-primary-foreground hover:scale-105 active:scale-95 transition-all shadow-lg shadow-primary/20",children:[s.jsx(Ni,{size:16}),o("nav.newBook")]})]}),s.jsx("div",{className:"grid gap-6",children:m.books.map((D,V)=>{const X=g.has(D.id),L=`stagger-${Math.min(V+1,5)}`;return s.jsxs("div",{className:`paper-sheet group relative rounded-2xl overflow-hidden fade-in ${L}`,children:[s.jsxs("div",{className:"p-8 flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary/5 text-primary",children:s.jsx(Wc,{size:20})}),s.jsx("button",{onClick:()=>c.toBook(D.id),className:"font-serif text-2xl hover:text-primary transition-all text-left truncate block font-medium hover:underline underline-offset-4 decoration-primary/30",children:D.title})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-y-2 gap-x-4 text-[13px] text-muted-foreground font-medium",children:[s.jsx("div",{className:"flex items-center gap-1.5 px-2 py-0.5 rounded bg-secondary/50",children:s.jsx("span",{className:"uppercase tracking-wider",children:D.genre})}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Fc,{size:14}),s.jsxs("span",{children:[D.chaptersWritten," ",o("dash.chapters")]})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${D.status==="active"?"bg-emerald-500":D.status==="paused"?"bg-amber-500":"bg-muted-foreground"}`}),s.jsx("span",{children:D.status==="active"?o("book.statusActive"):D.status==="paused"?o("book.statusPaused"):D.status==="outlining"?o("book.statusOutlining"):D.status==="completed"?o("book.statusCompleted"):D.status==="dropped"?o("book.statusDropped"):D.status})]}),D.language==="en"&&s.jsx("span",{className:"px-1.5 py-0.5 rounded border border-primary/20 text-primary text-[10px] font-bold",children:"EN"}),D.fanficMode&&s.jsxs("span",{className:"flex items-center gap-1 text-purple-500",children:[s.jsx(fl,{size:12}),s.jsx("span",{className:"italic",children:D.fanficMode})]})]})]}),s.jsxs("div",{className:"flex items-center gap-3 shrink-0 ml-6",children:[s.jsx("button",{onClick:()=>at(`/books/${D.id}/write-next`),disabled:X,className:`flex items-center gap-2 px-6 py-3 rounded-xl text-sm font-bold transition-all shadow-sm ${X?"bg-primary/20 text-primary cursor-wait animate-pulse":"bg-secondary text-foreground hover:bg-primary hover:text-primary-foreground hover:shadow-lg hover:shadow-primary/20 hover:scale-105 active:scale-95"}`,children:X?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-4 h-4 border-2 border-primary/20 border-t-primary rounded-full animate-spin"}),o("dash.writing")]}):s.jsxs(s.Fragment,{children:[s.jsx(fl,{size:16}),o("dash.writeNext")]})}),s.jsx("button",{onClick:()=>c.toAnalytics(D.id),className:"p-3 rounded-xl bg-secondary text-muted-foreground hover:text-primary hover:bg-primary/10 hover:border-primary/30 hover:shadow-md hover:scale-105 active:scale-95 transition-all border border-border/50 shadow-sm",title:o("dash.stats"),children:s.jsx(Zm,{size:18})}),s.jsx(Xy,{bookId:D.id,bookTitle:D.title,nav:c,t:o,onDelete:()=>E()})]})]}),X&&s.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-secondary overflow-hidden",children:s.jsx("div",{className:"h-full bg-primary w-1/3 animate-[progress_2s_ease-in-out_infinite]"})})]},D.id)})}),g.size>0&&h.length>0&&s.jsxs("div",{className:"glass-panel rounded-2xl p-8 border-primary/20 bg-primary/[0.02] shadow-2xl shadow-primary/5 fade-in",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-primary text-primary-foreground shadow-lg shadow-primary/20",children:s.jsx(Fx,{size:18,className:"animate-pulse"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold uppercase tracking-widest text-primary",children:" Manuscript Foundry"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Real-time LLM generation tracking"})]})]}),M&&s.jsxs("div",{className:"flex items-center gap-4 text-xs font-bold text-primary px-4 py-2 rounded-full bg-primary/10 border border-primary/20",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Fc,{size:12}),s.jsxs("span",{children:[Math.round((((S=M.data)==null?void 0:S.elapsedMs)??0)/1e3),"s"]})]}),s.jsx("div",{className:"w-px h-3 bg-primary/20"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fl,{size:12}),s.jsxs("span",{children:[(((q=M.data)==null?void 0:q.totalChars)??0).toLocaleString()," Chars"]})]})]})]}),s.jsx("div",{className:"space-y-2 font-mono text-xs bg-black/5 dark:bg-black/20 p-6 rounded-xl border border-border/50 max-h-[200px] overflow-y-auto scrollbar-thin",children:h.map((D,V)=>{const X=D.data;return s.jsxs("div",{className:"flex gap-3 leading-relaxed animate-in fade-in slide-in-from-left-2 duration-300",children:[s.jsxs("span",{className:"text-primary/60 font-bold shrink-0",children:["[",X.tag,"]"]}),s.jsx("span",{className:"text-muted-foreground",children:X.message})]},V)})})]}),s.jsx("style",{children:`
|
|
387
|
-
@keyframes progress {
|
|
388
|
-
0% { transform: translateX(-100%); }
|
|
389
|
-
100% { transform: translateX(300%); }
|
|
390
|
-
}
|
|
391
|
-
`})]}):s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] text-center fade-in",children:[s.jsx("div",{className:"w-20 h-20 rounded-full bg-primary/5 flex items-center justify-center mb-8",children:s.jsx(Wc,{size:40,className:"text-primary/20"})}),s.jsx("h2",{className:"font-serif text-3xl italic text-foreground/80 mb-3",children:o("dash.noBooks")}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-xs leading-relaxed mb-10",children:o("dash.createFirst")}),s.jsxs("button",{onClick:c.toBookCreate,className:"group flex items-center gap-2 px-8 py-3.5 rounded-xl text-sm font-bold bg-primary text-primary-foreground hover:scale-105 active:scale-95 transition-all shadow-lg shadow-primary/20",children:[s.jsx(Ni,{size:18}),o("nav.newBook")]})]})}function Zy(c,f){var o;const u={"ready-for-review":()=>f("chapter.readyForReview"),approved:()=>f("chapter.approved"),drafted:()=>f("chapter.drafted"),"needs-revision":()=>f("chapter.needsRevision"),imported:()=>f("chapter.imported"),"audit-failed":()=>f("chapter.auditFailed")};return((o=u[c])==null?void 0:o.call(u))??c}const Om={"ready-for-review":{color:"text-amber-500 bg-amber-500/10",icon:s.jsx($m,{size:12})},approved:{color:"text-emerald-500 bg-emerald-500/10",icon:s.jsx(Km,{size:12})},drafted:{color:"text-muted-foreground bg-muted/20",icon:s.jsx(Pc,{size:12})},"needs-revision":{color:"text-destructive bg-destructive/10",icon:s.jsx(io,{size:12})},imported:{color:"text-blue-500 bg-blue-500/10",icon:s.jsx(no,{size:12})}};function Ky({bookId:c,nav:f,theme:u,t:o,sse:m}){const{data:x,loading:y,error:E,refetch:g}=Ze(`/books/${c}`),[h,M]=B.useState(!1),[S,q]=B.useState(!1),[D,V]=B.useState(!1),[X,L]=B.useState(!1),[ue,re]=B.useState([]),[P,pe]=B.useState([]),[be,H]=B.useState(!1),[K,C]=B.useState(null),[ee,Ne]=B.useState(null),[Re,Oe]=B.useState(null),[ie,Ge]=B.useState("txt"),[Le,w]=B.useState(!1),Y=B.useMemo(()=>lx(m.messages,c),[c,m.messages]),F=h||Y.writing,he=S||Y.drafting;B.useEffect(()=>{const G=m.messages.at(-1);if(!G)return;const De=G.data;if((De==null?void 0:De.bookId)===c){if(G.event==="write:start"){M(!1);return}if(G.event==="draft:start"){q(!1);return}nx(G,c)&&(M(!1),q(!1),g())}},[c,g,m.messages]);const A=async()=>{M(!0);try{await at(`/books/${c}/write-next`)}catch(G){M(!1),alert(G instanceof Error?G.message:"Failed")}},v=async()=>{q(!0);try{await at(`/books/${c}/draft`)}catch(G){q(!1),alert(G instanceof Error?G.message:"Failed")}},R=async()=>{L(!1),V(!0);try{const G=await fetch(`/api/books/${c}`,{method:"DELETE"});if(!G.ok){const De=await G.json().catch(()=>({}));throw new Error(De.error??`${G.status}`)}f.toDashboard()}catch(G){alert(G instanceof Error?G.message:"Delete failed")}finally{V(!1)}},Q=async G=>{re(De=>[...De,G]);try{await at(`/books/${c}/rewrite/${G}`),g()}catch(De){alert(De instanceof Error?De.message:"Rewrite failed")}finally{re(De=>De.filter(ut=>ut!==G))}},Z=async(G,De)=>{pe(ut=>[...ut,G]);try{await Fe(`/books/${c}/revise/${G}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:De})}),g()}catch(ut){alert(ut instanceof Error?ut.message:"Revision failed")}finally{pe(ut=>ut.filter(hl=>hl!==G))}},te=async()=>{if(x){H(!0);try{const G={};K!==null&&(G.chapterWordCount=K),ee!==null&&(G.targetChapters=ee),Re!==null&&(G.status=Re),await Fe(`/books/${c}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(G)}),g()}catch(G){alert(G instanceof Error?G.message:"Save failed")}finally{H(!1)}}},le=async()=>{if(!x)return;const G=x.chapters.filter(De=>De.status==="ready-for-review");for(const De of G)await at(`/books/${c}/chapters/${De.number}/approve`);g()};if(y)return s.jsxs("div",{className:"flex flex-col items-center justify-center py-32 space-y-4",children:[s.jsx("div",{className:"w-8 h-8 border-2 border-primary/20 border-t-primary rounded-full animate-spin"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:o("common.loading")})]});if(E)return s.jsxs("div",{className:"text-destructive p-8 bg-destructive/5 rounded-xl border border-destructive/20",children:["Error: ",E]});if(!x)return null;const{book:ce,chapters:He}=x,de=He.reduce((G,De)=>G+(De.wordCount??0),0),qt=He.filter(G=>G.status==="ready-for-review").length,Lt=K??ce.chapterWordCount,Xt=ee??ce.targetChapters??0,pa=Re??ce.status;return s.jsxs("div",{className:"space-y-8 fade-in",children:[s.jsxs("nav",{className:"flex items-center gap-2 text-[13px] font-medium text-muted-foreground",children:[s.jsxs("button",{onClick:f.toDashboard,className:"hover:text-primary transition-colors flex items-center gap-1",children:[s.jsx(Ox,{size:14}),o("bread.books")]}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{className:"text-foreground",children:ce.title})]}),s.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-6 border-b border-border/40 pb-8",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("h1",{className:"text-4xl font-serif font-medium",children:ce.title}),ce.language==="en"&&s.jsx("span",{className:"px-1.5 py-0.5 rounded border border-primary/20 text-primary text-[10px] font-bold",children:"EN"})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 text-sm text-muted-foreground font-medium",children:[s.jsx("span",{className:"px-2 py-0.5 rounded bg-secondary/50 text-foreground/70 uppercase tracking-wider text-xs",children:ce.genre}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Pc,{size:14}),s.jsxs("span",{children:[He.length," ",o("dash.chapters")]})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(fl,{size:14}),s.jsxs("span",{children:[de.toLocaleString()," ",o("book.words")]})]}),ce.fanficMode&&s.jsxs("span",{className:"flex items-center gap-1 text-purple-500",children:[s.jsx(co,{size:12}),s.jsxs("span",{className:"italic",children:["fanfic:",ce.fanficMode]})]})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("button",{onClick:A,disabled:F||he,className:"flex items-center gap-2 px-5 py-2.5 text-sm font-bold bg-primary text-primary-foreground rounded-xl hover:scale-105 active:scale-95 transition-all shadow-lg shadow-primary/20 disabled:opacity-50",children:[F?s.jsx("div",{className:"w-4 h-4 border-2 border-primary-foreground/20 border-t-primary-foreground rounded-full animate-spin"}):s.jsx(fl,{size:16}),o(F?"dash.writing":"book.writeNext")]}),s.jsxs("button",{onClick:v,disabled:F||he,className:"flex items-center gap-2 px-5 py-2.5 text-sm font-bold bg-secondary text-foreground rounded-xl hover:bg-secondary/80 transition-all border border-border/50 disabled:opacity-50",children:[he?s.jsx("div",{className:"w-4 h-4 border-2 border-muted-foreground/20 border-t-muted-foreground rounded-full animate-spin"}):s.jsx(uo,{size:16}),o(he?"book.drafting":"book.draftOnly")]}),s.jsxs("button",{onClick:()=>L(!0),disabled:D,className:"flex items-center gap-2 px-5 py-2.5 text-sm font-bold bg-destructive/10 text-destructive rounded-xl hover:bg-destructive hover:text-white transition-all border border-destructive/20 disabled:opacity-50",children:[D?s.jsx("div",{className:"w-4 h-4 border-2 border-destructive/20 border-t-destructive rounded-full animate-spin"}):s.jsx(Ei,{size:16}),o(D?"common.loading":"book.deleteBook")]})]})]}),(F||he||Y.lastError)&&s.jsx("div",{className:`rounded-2xl border px-4 py-3 text-sm ${Y.lastError?"border-destructive/30 bg-destructive/5 text-destructive":"border-primary/20 bg-primary/[0.04] text-foreground"}`,children:Y.lastError?s.jsxs("span",{children:[o("book.pipelineFailed"),": ",Y.lastError]}):F?s.jsx("span",{children:o("book.pipelineWriting")}):s.jsx("span",{children:o("book.pipelineDrafting")})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 py-1",children:[qt>0&&s.jsxs("button",{onClick:le,className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-emerald-500/10 text-emerald-600 rounded-lg hover:bg-emerald-500/20 transition-all border border-emerald-500/20",children:[s.jsx(Ax,{size:14}),o("book.approveAll")," (",qt,")"]}),s.jsxs("button",{onClick:()=>{var G;return(G=f.toTruth)==null?void 0:G.call(f,c)},className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-secondary/50 text-muted-foreground rounded-lg hover:text-foreground hover:bg-secondary transition-all border border-border/50",children:[s.jsx(qx,{size:14}),o("book.truthFiles")]}),s.jsxs("button",{onClick:()=>f.toAnalytics(c),className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-secondary/50 text-muted-foreground rounded-lg hover:text-foreground hover:bg-secondary transition-all border border-border/50",children:[s.jsx(Zm,{size:14}),o("book.analytics")]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{value:ie,onChange:G=>Ge(G.target.value),className:"px-2 py-2 text-xs font-bold bg-secondary/50 text-muted-foreground rounded-lg border border-border/50 outline-none",children:[s.jsx("option",{value:"txt",children:"TXT"}),s.jsx("option",{value:"md",children:"MD"}),s.jsx("option",{value:"epub",children:"EPUB"})]}),s.jsxs("label",{className:"flex items-center gap-1.5 text-xs font-bold text-muted-foreground cursor-pointer select-none",children:[s.jsx("input",{type:"checkbox",checked:Le,onChange:G=>w(G.target.checked),className:"rounded border-border/50"}),o("book.approvedOnly")]}),s.jsxs("button",{onClick:async()=>{try{const G=await Fe(`/books/${c}/export-save`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({format:ie,approvedOnly:Le})});alert(`${o("common.exportSuccess")}
|
|
392
|
-
${G.path}
|
|
393
|
-
(${G.chapters} ${o("dash.chapters")})`)}catch(G){alert(G instanceof Error?G.message:"Export failed")}},className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-secondary/50 text-muted-foreground rounded-lg hover:text-foreground hover:bg-secondary transition-all border border-border/50",children:[s.jsx(no,{size:14}),o("book.export")]})]})]}),s.jsxs("div",{className:"paper-sheet rounded-2xl border border-border/40 shadow-sm p-6",children:[s.jsx("h2",{className:"text-sm font-bold uppercase tracking-widest text-muted-foreground mb-4",children:o("book.settings")}),s.jsxs("div",{className:"flex flex-wrap items-end gap-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("label",{className:"text-[11px] font-bold uppercase tracking-widest text-muted-foreground",children:o("create.wordsPerChapter")}),s.jsx("input",{type:"number",value:Lt,onChange:G=>C(Number(G.target.value)),className:"px-3 py-2 text-sm rounded-lg border border-border/50 bg-secondary/30 outline-none focus:border-primary/50 w-32"})]}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("label",{className:"text-[11px] font-bold uppercase tracking-widest text-muted-foreground",children:o("create.targetChapters")}),s.jsx("input",{type:"number",value:Xt,onChange:G=>Ne(Number(G.target.value)),className:"px-3 py-2 text-sm rounded-lg border border-border/50 bg-secondary/30 outline-none focus:border-primary/50 w-32"})]}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("label",{className:"text-[11px] font-bold uppercase tracking-widest text-muted-foreground",children:o("book.status")}),s.jsxs("select",{value:pa,onChange:G=>Oe(G.target.value),className:"px-3 py-2 text-sm rounded-lg border border-border/50 bg-secondary/30 outline-none focus:border-primary/50",children:[s.jsx("option",{value:"active",children:o("book.statusActive")}),s.jsx("option",{value:"paused",children:o("book.statusPaused")}),s.jsx("option",{value:"outlining",children:o("book.statusOutlining")}),s.jsx("option",{value:"completed",children:o("book.statusCompleted")}),s.jsx("option",{value:"dropped",children:o("book.statusDropped")})]})]}),s.jsxs("button",{onClick:te,disabled:be,className:"flex items-center gap-2 px-4 py-2 text-sm font-bold bg-primary text-primary-foreground rounded-lg hover:scale-105 active:scale-95 transition-all disabled:opacity-50",children:[be?s.jsx("div",{className:"w-4 h-4 border-2 border-primary-foreground/20 border-t-primary-foreground rounded-full animate-spin"}):s.jsx(ro,{size:14}),o(be?"book.saving":"book.save")]})]})]}),s.jsxs("div",{className:"paper-sheet rounded-2xl overflow-hidden border border-border/40 shadow-xl shadow-primary/5",children:[s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-muted/30 border-b border-border/50",children:[s.jsx("th",{className:"text-left px-6 py-4 font-bold text-[11px] uppercase tracking-widest text-muted-foreground w-16",children:"#"}),s.jsx("th",{className:"text-left px-6 py-4 font-bold text-[11px] uppercase tracking-widest text-muted-foreground",children:o("book.manuscriptTitle")}),s.jsx("th",{className:"text-left px-6 py-4 font-bold text-[11px] uppercase tracking-widest text-muted-foreground w-28",children:o("book.words")}),s.jsx("th",{className:"text-left px-6 py-4 font-bold text-[11px] uppercase tracking-widest text-muted-foreground w-36",children:o("book.status")}),s.jsx("th",{className:"text-right px-6 py-4 font-bold text-[11px] uppercase tracking-widest text-muted-foreground",children:o("book.curate")})]})}),s.jsx("tbody",{className:"divide-y divide-border/30",children:He.map((G,De)=>{var hl,Pl;const ut=`stagger-${Math.min(De+1,5)}`;return s.jsxs("tr",{className:`group hover:bg-primary/[0.02] transition-colors fade-in ${ut}`,children:[s.jsx("td",{className:"px-6 py-4 text-muted-foreground/60 font-mono text-xs",children:G.number.toString().padStart(2,"0")}),s.jsx("td",{className:"px-6 py-4",children:s.jsx("button",{onClick:()=>f.toChapter(c,G.number),className:"font-serif text-lg font-medium hover:text-primary transition-colors text-left",children:G.title||o("chapter.label").replace("{n}",String(G.number))})}),s.jsx("td",{className:"px-6 py-4 text-muted-foreground font-medium tabular-nums text-xs",children:(G.wordCount??0).toLocaleString()}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[10px] font-bold uppercase tracking-tight ${((hl=Om[G.status])==null?void 0:hl.color)??"bg-muted text-muted-foreground"}`,children:[(Pl=Om[G.status])==null?void 0:Pl.icon,Zy(G.status,o)]})}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsxs("div",{className:"flex gap-1.5 justify-end opacity-0 group-hover:opacity-100 transition-opacity",children:[G.status==="ready-for-review"&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:async()=>{await at(`/books/${c}/chapters/${G.number}/approve`),g()},className:"p-2 rounded-lg bg-emerald-500/10 text-emerald-600 hover:bg-emerald-500 hover:text-white transition-all shadow-sm",title:o("book.approve"),children:s.jsx(Km,{size:14})}),s.jsx("button",{onClick:async()=>{await at(`/books/${c}/chapters/${G.number}/reject`),g()},className:"p-2 rounded-lg bg-destructive/10 text-destructive hover:bg-destructive hover:text-white transition-all shadow-sm",title:o("book.reject"),children:s.jsx(fo,{size:14})})]}),s.jsx("button",{onClick:async()=>{var $t;const ga=await Fe(`/books/${c}/audit/${G.number}`,{method:"POST"});alert(ga.passed?"Audit passed":`Audit failed: ${(($t=ga.issues)==null?void 0:$t.length)??0} issues`),g()},className:"p-2 rounded-lg bg-secondary text-muted-foreground hover:text-primary hover:bg-primary/10 transition-all shadow-sm",title:o("book.audit"),children:s.jsx(S0,{size:14})}),s.jsx("button",{onClick:()=>Q(G.number),disabled:ue.includes(G.number),className:"p-2 rounded-lg bg-secondary text-muted-foreground hover:text-primary hover:bg-primary/10 transition-all shadow-sm disabled:opacity-50",title:o("book.rewrite"),children:ue.includes(G.number)?s.jsx("div",{className:"w-3.5 h-3.5 border-2 border-muted-foreground/20 border-t-muted-foreground rounded-full animate-spin"}):s.jsx(io,{size:14})}),s.jsxs("select",{disabled:P.includes(G.number),value:"",onChange:ga=>{const $t=ga.target.value;$t&&Z(G.number,$t)},className:"px-2 py-1.5 text-[11px] font-bold rounded-lg bg-secondary text-muted-foreground border border-border/50 outline-none hover:text-primary hover:bg-primary/10 transition-all disabled:opacity-50 cursor-pointer",title:"Revise with AI",children:[s.jsx("option",{value:"",disabled:!0,children:P.includes(G.number)?o("common.loading"):o("book.curate")}),s.jsx("option",{value:"spot-fix",children:o("book.spotFix")}),s.jsx("option",{value:"polish",children:o("book.polish")}),s.jsx("option",{value:"rewrite",children:o("book.rewrite")}),s.jsx("option",{value:"rework",children:o("book.rework")}),s.jsx("option",{value:"anti-detect",children:o("book.antiDetect")})]})]})})]},G.number)})})]})}),He.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-muted/20 flex items-center justify-center mb-4",children:s.jsx(Pc,{size:20,className:"text-muted-foreground/40"})}),s.jsx("p",{className:"text-sm italic font-serif text-muted-foreground",children:o("book.noChapters")})]})]}),s.jsx(ph,{open:X,title:o("book.deleteBook"),message:o("book.confirmDelete"),confirmLabel:o("common.delete"),cancelLabel:o("common.cancel"),variant:"danger",onConfirm:R,onCancel:()=>L(!1)})]})}const Jy=[{value:"tomato",label:"番茄小说"},{value:"qidian",label:"起点中文网"},{value:"feilu",label:"飞卢"},{value:"other",label:"其他"}],$y=[{value:"royal-road",label:"Royal Road"},{value:"kindle-unlimited",label:"Kindle Unlimited"},{value:"scribble-hub",label:"Scribble Hub"},{value:"other",label:"Other"}];function Dm(c,f){return c&&f.includes(c)?c:f[0]??""}function Rm(c){return c==="en"?"2000":"3000"}function Wy(c){return c==="en"?$y:Jy}const Fy=120,Iy=250;async function Py(c,f={}){const u=f.fetchBook??(h=>Fe(`/books/${h}`)),o=f.fetchStatus??(h=>Fe(`/books/${h}/create-status`)),m=f.maxAttempts??Fy,x=f.delayMs??Iy,y=f.waitImpl??(h=>new Promise(M=>{setTimeout(M,h)}));let E,g;for(let h=0;h<m;h+=1)try{await u(c);return}catch(M){E=M;try{const S=await o(c);if(g=S.status,S.status==="error")throw new Error(S.error??`Book "${c}" failed to create`)}catch(S){if(S instanceof Error&&S.message!=="404 Not Found")throw S}if(h===m-1){if(g==="creating")break;throw M}await y(x)}throw g==="creating"?new Error(`Book "${c}" is still being created. Wait a moment and refresh.`):E instanceof Error?E:new Error(`Book "${c}" was not ready`)}function eb({nav:c,theme:f,t:u}){const o=Ht(),{data:m}=Ze("/genres"),{data:x}=Ze("/project"),y=(x==null?void 0:x.language)??"zh",[E,g]=B.useState(""),[h,M]=B.useState(""),[S,q]=B.useState(""),[D,V]=B.useState(Rm(y)),[X,L]=B.useState(!1),[ue,re]=B.useState("200"),[P,pe]=B.useState(!1),[be,H]=B.useState(null),C=((m==null?void 0:m.genres)??[]).filter(ie=>ie.language===y||ie.source==="project"),ee=Wy(y),Ne=C.map(ie=>ie.id).join("|"),Re=ee.map(ie=>`${ie.value}:${ie.label}`).join("|");B.useEffect(()=>{M(ie=>Dm(ie,C.map(Ge=>Ge.id)))},[Ne]),B.useEffect(()=>{q(ie=>Dm(ie,ee.map(Ge=>Ge.value)))},[Re]),B.useEffect(()=>{X||V(Rm(y))},[y,X]);const Oe=async()=>{if(!E.trim()){H(u("create.titleRequired"));return}if(!h){H(u("create.genreRequired"));return}pe(!0),H(null);try{const ie=await at("/books/create",{title:E.trim(),genre:h,language:y,platform:S,chapterWordCount:parseInt(D,10),targetChapters:parseInt(ue,10)});await Py(ie.bookId),c.toBook(ie.bookId)}catch(ie){H(ie instanceof Error?ie.message:"Failed to create book")}finally{pe(!1)}};return s.jsxs("div",{className:"max-w-lg mx-auto space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:o.link,children:u("bread.books")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{children:u("bread.newBook")})]}),s.jsx("h1",{className:"font-serif text-3xl",children:u("create.title")}),be&&s.jsx("div",{className:`border ${o.error} rounded-md px-4 py-3`,children:be}),s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-muted-foreground mb-2",children:u("create.bookTitle")}),s.jsx("input",{type:"text",value:E,onChange:ie=>g(ie.target.value),className:`w-full ${o.input} rounded-md px-4 py-3 focus:outline-none text-base`,placeholder:u("create.placeholder")})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-muted-foreground mb-2",children:u("create.genre")}),s.jsx("div",{className:"grid grid-cols-3 gap-2",children:C.map(ie=>s.jsxs("button",{onClick:()=>M(ie.id),className:`px-3 py-2.5 rounded-md text-sm text-left transition-all ${h===ie.id?"bg-primary/15 text-primary border border-primary/30 font-medium":"bg-secondary text-secondary-foreground border border-transparent hover:border-border"}`,children:[ie.name,ie.source==="project"&&s.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"✦"})]},ie.id))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-muted-foreground mb-2",children:u("create.platform")}),s.jsx("div",{className:"flex gap-2",children:ee.map(ie=>s.jsx("button",{onClick:()=>q(ie.value),className:`px-3 py-2 rounded-md text-sm transition-all ${S===ie.value?"bg-primary/15 text-primary border border-primary/30":"bg-secondary text-secondary-foreground border border-transparent hover:border-border"}`,children:ie.label},ie.value))})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-muted-foreground mb-2",children:u("create.wordsPerChapter")}),s.jsx("input",{type:"number",value:D,onChange:ie=>{L(!0),V(ie.target.value)},className:`w-full ${o.input} rounded-md px-4 py-3 focus:outline-none`})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-muted-foreground mb-2",children:u("create.targetChapters")}),s.jsx("input",{type:"number",value:ue,onChange:ie=>re(ie.target.value),className:`w-full ${o.input} rounded-md px-4 py-3 focus:outline-none`})]})]})]}),s.jsx("button",{onClick:Oe,disabled:P||!E.trim(),className:`w-full px-4 py-3 ${o.btnPrimary} rounded-md disabled:opacity-50 font-medium text-base`,children:u(P?"create.creating":"create.submit")})]})}function tb({bookId:c,chapterNumber:f,nav:u,theme:o,t:m}){const{data:x,loading:y,error:E,refetch:g}=Ze(`/books/${c}/chapters/${f}`),[h,M]=B.useState(!1),[S,q]=B.useState(""),[D,V]=B.useState(!1),X=()=>{x&&(q(x.content),M(!0))},L=()=>{M(!1),q("")},ue=async()=>{V(!0);try{await Fe(`/books/${c}/chapters/${f}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),M(!1),g()}catch(ee){alert(ee instanceof Error?ee.message:"Save failed")}finally{V(!1)}};if(y)return s.jsxs("div",{className:"flex flex-col items-center justify-center py-32 space-y-4",children:[s.jsx("div",{className:"w-8 h-8 border-2 border-primary/20 border-t-primary rounded-full animate-spin"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:m("reader.openingManuscript")})]});if(E)return s.jsxs("div",{className:"text-destructive p-8 bg-destructive/5 rounded-xl border border-destructive/20",children:["Error: ",E]});if(!x)return null;const re=x.content.split(`
|
|
394
|
-
`),P=re.find(ee=>ee.startsWith("# ")),pe=(P==null?void 0:P.replace(/^#\s*/,""))??`Chapter ${f}`,be=re.filter(ee=>ee!==P).join(`
|
|
395
|
-
`).trim(),H=async()=>{await at(`/books/${c}/chapters/${f}/approve`),u.toBook(c)},K=async()=>{await at(`/books/${c}/chapters/${f}/reject`),u.toBook(c)},C=be.split(/\n\n+/).filter(Boolean);return s.jsxs("div",{className:"max-w-4xl mx-auto space-y-10 fade-in",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-6",children:[s.jsxs("nav",{className:"flex items-center gap-2 text-[13px] font-medium text-muted-foreground",children:[s.jsx("button",{onClick:u.toDashboard,className:"hover:text-primary transition-colors flex items-center gap-1",children:m("bread.books")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("button",{onClick:()=>u.toBook(c),className:"hover:text-primary transition-colors truncate max-w-[120px]",children:c}),s.jsx("span",{className:"text-border",children:"/"}),s.jsxs("span",{className:"text-foreground flex items-center gap-1",children:[s.jsx(Px,{size:12}),f]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:()=>u.toBook(c),className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-secondary text-muted-foreground rounded-xl hover:text-foreground hover:bg-secondary/80 transition-all border border-border/50",children:[s.jsx(l0,{size:14}),m("reader.backToList")]}),h?s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:ue,disabled:D,className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-primary text-primary-foreground rounded-xl hover:scale-105 active:scale-95 transition-all shadow-sm disabled:opacity-50",children:[D?s.jsx("div",{className:"w-3.5 h-3.5 border-2 border-primary-foreground/20 border-t-primary-foreground rounded-full animate-spin"}):s.jsx(ro,{size:14}),m(D?"book.saving":"book.save")]}),s.jsxs("button",{onClick:L,className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-secondary text-muted-foreground rounded-xl hover:text-foreground transition-all border border-border/50",children:[s.jsx($m,{size:14}),m("reader.preview")]})]}):s.jsxs("button",{onClick:X,className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-secondary text-muted-foreground rounded-xl hover:text-primary hover:bg-primary/10 transition-all border border-border/50",children:[s.jsx(so,{size:14}),m("reader.edit")]}),s.jsxs("button",{onClick:H,className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-emerald-500/10 text-emerald-600 rounded-xl hover:bg-emerald-500 hover:text-white transition-all border border-emerald-500/20 shadow-sm",children:[s.jsx(ki,{size:14}),m("reader.approve")]}),s.jsxs("button",{onClick:K,className:"flex items-center gap-2 px-4 py-2 text-xs font-bold bg-destructive/10 text-destructive rounded-xl hover:bg-destructive hover:text-white transition-all border border-destructive/20 shadow-sm",children:[s.jsx(lo,{size:14}),m("reader.reject")]})]})]}),s.jsxs("div",{className:"paper-sheet rounded-2xl p-8 md:p-16 lg:p-24 shadow-2xl shadow-primary/5 min-h-[80vh] relative overflow-hidden",children:[s.jsx("div",{className:"absolute top-0 left-8 w-px h-full bg-primary/5 hidden md:block"}),s.jsx("div",{className:"absolute top-0 right-8 w-px h-full bg-primary/5 hidden md:block"}),s.jsxs("header",{className:"mb-16 text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 text-muted-foreground/30 mb-8 select-none",children:[s.jsx("div",{className:"h-px w-12 bg-border/40"}),s.jsx(Wc,{size:20}),s.jsx("div",{className:"h-px w-12 bg-border/40"})]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-serif font-medium italic text-foreground tracking-tight leading-tight",children:pe}),s.jsxs("div",{className:"mt-8 flex items-center justify-center gap-4 text-[10px] font-bold uppercase tracking-[0.2em] text-muted-foreground/60",children:[s.jsx("span",{children:m("reader.manuscriptPage")}),s.jsx("span",{className:"text-border",children:"·"}),s.jsx("span",{children:f.toString().padStart(2,"0")})]})]}),h?s.jsx("textarea",{value:S,onChange:ee=>q(ee.target.value),className:"w-full min-h-[60vh] bg-transparent font-serif text-lg leading-[1.8] text-foreground/90 focus:outline-none resize-none border border-border/30 rounded-lg p-6 focus:border-primary/40 focus:ring-2 focus:ring-primary/10 transition-all",autoFocus:!0}):s.jsx("article",{className:"prose prose-zinc dark:prose-invert max-w-none",children:C.map((ee,Ne)=>s.jsx("p",{className:"font-serif text-lg md:text-xl leading-[1.8] text-foreground/90 mb-8 first-letter:text-2xl first-letter:font-bold first-letter:text-primary/40",children:ee},Ne))}),s.jsxs("footer",{className:"mt-24 pt-12 border-t border-border/20 flex flex-col items-center gap-6 text-center",children:[s.jsxs("div",{className:"flex items-center gap-4 text-xs font-medium text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-secondary/50",children:[s.jsx(B0,{size:14,className:"text-primary/60"}),s.jsxs("span",{children:[be.length.toLocaleString()," ",m("reader.characters")]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-secondary/50",children:[s.jsx(Fc,{size:14,className:"text-primary/60"}),s.jsxs("span",{children:[Math.ceil(be.length/500)," ",m("reader.minRead")]})]})]}),s.jsx("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground/40 font-bold",children:m("reader.endOfChapter")})]})]}),s.jsx("div",{className:"flex justify-between items-center py-8",children:f>1?s.jsxs("button",{onClick:()=>u.toBook(c),className:"flex items-center gap-2 text-sm font-bold text-muted-foreground hover:text-primary transition-all group",children:[s.jsx(io,{size:16,className:"group-hover:-rotate-45 transition-transform"}),m("reader.chapterList")]}):s.jsx("div",{})})]})}function ab({bookId:c,nav:f,theme:u,t:o}){const m=Ht(),{data:x,loading:y,error:E}=Ze(`/books/${c}/analytics`);if(y)return s.jsx("div",{className:m.muted,children:o("common.loading")});if(E)return s.jsxs("div",{className:"text-red-400",children:[o("common.error"),": ",E]});if(!x)return null;const g=Object.entries(x.statusDistribution),h=g.reduce((M,[,S])=>M+S,0);return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:`flex items-center gap-2 text-sm ${m.muted}`,children:[s.jsx("button",{onClick:f.toDashboard,className:m.link,children:o("bread.books")}),s.jsx("span",{children:"/"}),s.jsx("button",{onClick:()=>f.toBook(c),className:m.link,children:c}),s.jsx("span",{children:"/"}),s.jsx("span",{className:m.subtle,children:o("analytics.title")})]}),s.jsx("h1",{className:"text-2xl font-semibold",children:o("analytics.title")}),s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsx(Kc,{label:o("analytics.totalChapters"),value:x.totalChapters.toString(),c:m}),s.jsx(Kc,{label:o("analytics.totalWords"),value:x.totalWords.toLocaleString(),c:m}),s.jsx(Kc,{label:o("analytics.avgWords"),value:x.avgWordsPerChapter.toLocaleString(),c:m})]}),g.length>0&&s.jsxs("div",{className:`border ${m.cardStatic} rounded-lg p-5`,children:[s.jsx("h2",{className:`text-sm font-medium ${m.subtle} mb-4`,children:o("analytics.statusDist")}),s.jsx("div",{className:"space-y-3",children:g.map(([M,S])=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{className:m.subtle,children:M}),s.jsx("span",{className:m.muted,children:S})]}),s.jsx("div",{className:`h-2 ${m.btnSecondary} rounded-full overflow-hidden`,children:s.jsx("div",{className:"h-full bg-zinc-500 rounded-full transition-all",style:{width:`${h>0?S/h*100:0}%`}})})]},M))})]})]})}function Kc({label:c,value:f,c:u}){return s.jsxs("div",{className:`border ${u.cardStatic} rounded-lg p-5`,children:[s.jsx("div",{className:`text-sm ${u.muted} mb-1`,children:c}),s.jsx("div",{className:"text-2xl font-semibold tabular-nums",children:f})]})}const lb=["writer","auditor","reviser","architect","radar","chapter-analyzer"];async function nb(c,f={}){await(f.putApiImpl??Wg)("/project",c)}function sb(c){return Object.fromEntries(Object.entries((c==null?void 0:c.overrides)??{}).map(([f,u])=>[f,{...u}]))}function ib({nav:c,theme:f,t:u}){const o=Ht(),{data:m,loading:x,error:y,refetch:E}=Ze("/project"),[g,h]=B.useState(!1),[M,S]=B.useState(!1),[q,D]=B.useState({});if(x)return s.jsx("div",{className:"text-muted-foreground py-20 text-center text-sm",children:"Loading..."});if(y)return s.jsxs("div",{className:"text-destructive py-20 text-center",children:["Error: ",y]});if(!m)return null;const V=()=>{D({temperature:m.temperature,maxTokens:m.maxTokens,stream:m.stream,language:m.language}),h(!0)},X=async()=>{S(!0);try{await nb(q),h(!1),E()}catch(L){alert(L instanceof Error?L.message:"Failed")}finally{S(!1)}};return s.jsxs("div",{className:"max-w-xl mx-auto space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:o.link,children:u("bread.home")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{className:"text-foreground",children:u("bread.config")})]}),s.jsxs("div",{className:"flex items-baseline justify-between",children:[s.jsx("h1",{className:"font-serif text-3xl",children:u("config.title")}),!g&&s.jsx("button",{onClick:V,className:`px-3 py-2 text-xs rounded-md ${o.btnSecondary}`,children:"Edit"})]}),s.jsxs("div",{className:`border ${o.cardStatic} rounded-lg divide-y divide-border/40`,children:[s.jsx(Qa,{label:u("config.project"),value:m.name}),s.jsx(Qa,{label:u("config.provider"),value:m.provider}),s.jsx(Qa,{label:u("config.model"),value:m.model}),s.jsx(Qa,{label:u("config.baseUrl"),value:m.baseUrl,mono:!0}),g?s.jsxs(s.Fragment,{children:[s.jsx(vi,{label:u("config.language"),value:q.language,onChange:L=>D({...q,language:L}),type:"select",options:[{value:"zh",label:u("config.chinese")},{value:"en",label:u("config.english")}],c:o}),s.jsx(vi,{label:u("config.temperature"),value:String(q.temperature),onChange:L=>D({...q,temperature:parseFloat(L)}),type:"number",c:o}),s.jsx(vi,{label:u("config.maxTokens"),value:String(q.maxTokens),onChange:L=>D({...q,maxTokens:parseInt(L,10)}),type:"number",c:o}),s.jsx(vi,{label:u("config.stream"),value:String(q.stream),onChange:L=>D({...q,stream:L==="true"}),type:"select",options:[{value:"true",label:u("config.enabled")},{value:"false",label:u("config.disabled")}],c:o})]}):s.jsxs(s.Fragment,{children:[s.jsx(Qa,{label:u("config.language"),value:m.language==="en"?u("config.english"):u("config.chinese")}),s.jsx(Qa,{label:u("config.temperature"),value:String(m.temperature),mono:!0}),s.jsx(Qa,{label:u("config.maxTokens"),value:String(m.maxTokens),mono:!0}),s.jsx(Qa,{label:u("config.stream"),value:m.stream?u("config.enabled"):u("config.disabled")})]})]}),g&&s.jsxs("div",{className:"flex gap-2 justify-end",children:[s.jsx("button",{onClick:()=>h(!1),className:`px-4 py-2.5 text-sm rounded-md ${o.btnSecondary}`,children:u("config.cancel")}),s.jsx("button",{onClick:X,disabled:M,className:`px-4 py-2.5 text-sm rounded-md ${o.btnPrimary} disabled:opacity-50`,children:u(M?"config.saving":"config.save")})]}),s.jsx(rb,{theme:f,t:u})]})}function Um(){return{model:"",provider:"",baseUrl:""}}function rb({theme:c,t:f}){const u=Ht(),{data:o,loading:m,error:x,refetch:y}=Ze("/project/model-overrides"),[E,g]=B.useState({}),[h,M]=B.useState(!1);if(B.useEffect(()=>{g(sb(o))},[o]),m)return s.jsx("div",{className:"text-muted-foreground py-8 text-center text-sm",children:"Loading model overrides..."});if(x)return s.jsxs("div",{className:"text-destructive py-8 text-center text-sm",children:["Error: ",x]});const S=(D,V,X)=>{const L=E[D]??Um();g({...E,[D]:{...L,[V]:X}})},q=async()=>{M(!0);try{await Fe("/project/model-overrides",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({overrides:E})}),y()}catch(D){alert(D instanceof Error?D.message:"Failed to save model overrides")}finally{M(!1)}};return s.jsxs(s.Fragment,{children:[s.jsx("h2",{className:"font-serif text-xl mt-4",children:f("config.modelRouting")}),s.jsx("div",{className:`border ${u.cardStatic} rounded-lg overflow-hidden`,children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-border/40 text-muted-foreground text-left",children:[s.jsx("th",{className:"px-4 py-2.5 font-medium",children:f("config.agent")}),s.jsx("th",{className:"px-4 py-2.5 font-medium",children:f("config.model")}),s.jsx("th",{className:"px-4 py-2.5 font-medium",children:f("config.provider")}),s.jsx("th",{className:"px-4 py-2.5 font-medium",children:f("config.baseUrl")})]})}),s.jsx("tbody",{children:lb.map(D=>{const V=E[D]??Um();return s.jsxs("tr",{className:"border-b border-border/40 last:border-b-0",children:[s.jsx("td",{className:"px-4 py-2 font-mono text-foreground/80",children:D}),s.jsx("td",{className:"px-4 py-2",children:s.jsx("input",{type:"text",value:V.model,onChange:X=>S(D,"model",X.target.value),placeholder:f("config.default"),className:`${u.input} rounded px-2 py-1 text-sm w-full`})}),s.jsx("td",{className:"px-4 py-2",children:s.jsx("input",{type:"text",value:V.provider,onChange:X=>S(D,"provider",X.target.value),placeholder:f("config.optional"),className:`${u.input} rounded px-2 py-1 text-sm w-full`})}),s.jsx("td",{className:"px-4 py-2",children:s.jsx("input",{type:"text",value:V.baseUrl,onChange:X=>S(D,"baseUrl",X.target.value),placeholder:f("config.optional"),className:`${u.input} rounded px-2 py-1 text-sm w-full`})})]},D)})})]})}),s.jsx("div",{className:"flex justify-end",children:s.jsx("button",{onClick:q,disabled:h,className:`px-4 py-2.5 text-sm rounded-md ${u.btnPrimary} disabled:opacity-50`,children:f(h?"config.saving":"config.saveOverrides")})})]})}function Qa({label:c,value:f,mono:u}){return s.jsxs("div",{className:"flex justify-between px-4 py-3",children:[s.jsx("span",{className:"text-muted-foreground text-sm",children:c}),s.jsx("span",{className:u?"font-mono text-sm":"text-sm",children:f})]})}function vi({label:c,value:f,onChange:u,type:o,options:m,c:x}){return s.jsxs("div",{className:"flex justify-between items-center px-4 py-2.5",children:[s.jsx("span",{className:"text-muted-foreground text-sm",children:c}),o==="select"&&m?s.jsx("select",{value:f,onChange:y=>u(y.target.value),className:`${x.input} rounded px-2 py-1 text-sm w-32`,children:m.map(y=>s.jsx("option",{value:y.value,children:y.label},y.value))}):s.jsx("input",{type:"number",value:f,onChange:y=>u(y.target.value),className:`${x.input} rounded px-2 py-1 text-sm w-32 text-right`})]})}function cb({bookId:c,nav:f,theme:u,t:o}){const m=Ht(),{data:x}=Ze(`/books/${c}/truth`),[y,E]=B.useState(null),[g,h]=B.useState(!1),[M,S]=B.useState(""),[q,D]=B.useState(!1),{data:V,refetch:X}=Ze(y?`/books/${c}/truth/${y}`:""),L=()=>{S((V==null?void 0:V.content)??""),h(!0)},ue=()=>{h(!1)},re=async()=>{if(y){D(!0);try{await Fe(`/books/${c}/truth/${y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:M})}),h(!1),X()}catch(P){alert(P instanceof Error?P.message:"Failed to save")}finally{D(!1)}}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:f.toDashboard,className:m.link,children:o("bread.books")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("button",{onClick:()=>f.toBook(c),className:m.link,children:c}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{className:"text-foreground",children:o("truth.title")})]}),s.jsx("h1",{className:"font-serif text-3xl",children:o("truth.title")}),s.jsxs("div",{className:"grid grid-cols-[240px_1fr] gap-6",children:[s.jsxs("div",{className:`border ${m.cardStatic} rounded-lg overflow-hidden`,children:[x==null?void 0:x.files.map(P=>s.jsxs("button",{onClick:()=>{E(P.name),h(!1)},className:`w-full text-left px-3 py-2.5 text-sm border-b border-border/40 transition-colors ${y===P.name?"bg-primary/10 text-primary":"hover:bg-muted/30 text-muted-foreground"}`,children:[s.jsx("div",{className:"font-mono text-sm truncate",children:P.name}),s.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5",children:[P.size.toLocaleString()," ",o("truth.chars")]})]},P.name)),(!(x!=null&&x.files)||x.files.length===0)&&s.jsx("div",{className:"px-3 py-4 text-sm text-muted-foreground text-center",children:o("truth.empty")})]}),s.jsx("div",{className:`border ${m.cardStatic} rounded-lg p-5 min-h-[400px] flex flex-col`,children:y&&(V==null?void 0:V.content)!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end gap-2 mb-3",children:g?s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:ue,className:`inline-flex items-center gap-1 px-3 py-1.5 text-xs rounded-md ${m.btnSecondary}`,children:[s.jsx(fo,{size:14}),"Cancel"]}),s.jsxs("button",{onClick:re,disabled:q,className:`inline-flex items-center gap-1 px-3 py-1.5 text-xs rounded-md ${m.btnPrimary} disabled:opacity-50`,children:[s.jsx(ro,{size:14}),o(q?"truth.saving":"truth.save")]})]}):s.jsxs("button",{onClick:L,className:`inline-flex items-center gap-1 px-3 py-1.5 text-xs rounded-md ${m.btnSecondary}`,children:[s.jsx(so,{size:14}),"Edit"]})}),g?s.jsx("textarea",{value:M,onChange:P=>S(P.target.value),className:`${m.input} flex-1 rounded-md p-3 text-sm font-mono leading-relaxed resize-none min-h-[360px]`}):s.jsx("pre",{className:"text-sm leading-relaxed whitespace-pre-wrap font-mono text-foreground/80",children:V.content})]}):y&&(V==null?void 0:V.content)===null?s.jsx("div",{className:"text-muted-foreground text-sm",children:o("truth.notFound")}):s.jsx("div",{className:"text-muted-foreground/50 text-sm italic",children:o("truth.selectFile")})})]})]})}function ob({nav:c,theme:f,t:u,sse:o}){const m=Ht(),{data:x,refetch:y}=Ze("/daemon"),[E,g]=B.useState(!1);B.useEffect(()=>{const D=o.messages.at(-1);Vm(D)&&y()},[y,o.messages]);const h=o.messages.filter(D=>D.event.startsWith("daemon:")||D.event==="log").slice(-20),M=async()=>{g(!0);try{await at("/daemon/start"),y()}catch(D){alert(D instanceof Error?D.message:"Failed")}finally{g(!1)}},S=async()=>{g(!0);try{await at("/daemon/stop"),y()}catch(D){alert(D instanceof Error?D.message:"Failed")}finally{g(!1)}},q=(x==null?void 0:x.running)??!1;return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:m.link,children:u("bread.home")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{className:"text-foreground",children:u("nav.daemon")})]}),s.jsxs("div",{className:"flex items-baseline justify-between",children:[s.jsx("h1",{className:"font-serif text-3xl",children:u("daemon.title")}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:`text-sm uppercase tracking-wide font-medium ${q?"text-emerald-500":"text-muted-foreground"}`,children:u(q?"daemon.running":"daemon.stopped")}),q?s.jsx("button",{onClick:S,disabled:E,className:`px-4 py-2.5 text-sm rounded-md ${m.btnDanger} disabled:opacity-50`,children:u(E?"daemon.stopping":"daemon.stop")}):s.jsx("button",{onClick:M,disabled:E,className:`px-4 py-2.5 text-sm rounded-md ${m.btnPrimary} disabled:opacity-50`,children:u(E?"daemon.starting":"daemon.start")})]})]}),s.jsxs("div",{className:`border ${m.cardStatic} rounded-lg`,children:[s.jsx("div",{className:"px-5 py-3.5 border-b border-border",children:s.jsx("span",{className:"text-sm uppercase tracking-wide text-muted-foreground font-medium",children:u("daemon.eventLog")})}),s.jsx("div",{className:"p-4 max-h-[500px] overflow-y-auto",children:h.length>0?s.jsx("div",{className:"space-y-1.5 font-mono text-sm",children:h.map((D,V)=>{const X=D.data;return s.jsxs("div",{className:"leading-relaxed text-muted-foreground",children:[s.jsx("span",{className:"text-primary/50",children:D.event}),s.jsx("span",{className:"text-border mx-1.5",children:"›"}),s.jsx("span",{children:String(X.message??X.bookId??JSON.stringify(X))})]},V)})}):s.jsx("div",{className:"text-muted-foreground text-sm italic py-8 text-center",children:u(q?"daemon.waitingEvents":"daemon.startHint")})})]})]})}const ub={error:"text-destructive",warn:"text-amber-500",info:"text-primary/70",debug:"text-muted-foreground/50"};function db({nav:c,theme:f,t:u}){const o=Ht(),{data:m,refetch:x}=Ze("/logs");return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:o.link,children:u("bread.home")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{className:"text-foreground",children:u("logs.title")})]}),s.jsxs("div",{className:"flex items-baseline justify-between",children:[s.jsx("h1",{className:"font-serif text-3xl",children:u("logs.title")}),s.jsx("button",{onClick:()=>x(),className:`px-4 py-2.5 text-sm rounded-md ${o.btnSecondary}`,children:u("common.refresh")})]}),s.jsx("div",{className:`border ${o.cardStatic} rounded-lg overflow-hidden`,children:s.jsx("div",{className:"p-4 max-h-[600px] overflow-y-auto",children:m!=null&&m.entries&&m.entries.length>0?s.jsx("div",{className:"space-y-1 font-mono text-sm leading-relaxed",children:m.entries.map((y,E)=>s.jsxs("div",{className:"flex gap-2",children:[y.timestamp&&s.jsx("span",{className:"text-muted-foreground shrink-0 w-20 tabular-nums",children:new Date(y.timestamp).toLocaleTimeString()}),y.level&&s.jsx("span",{className:`shrink-0 w-12 uppercase ${ub[y.level]??"text-muted-foreground"}`,children:y.level}),y.tag&&s.jsxs("span",{className:"text-primary/70 shrink-0",children:["[",y.tag,"]"]}),s.jsx("span",{className:"text-foreground/80",children:y.message})]},E))}):s.jsx("div",{className:"text-muted-foreground text-sm italic py-12 text-center",children:u("logs.empty")})})}),s.jsx("p",{className:"text-sm text-muted-foreground",children:u("logs.showingRecent")})]})}const fb={"nav.books":{zh:"书籍",en:"Books"},"nav.newBook":{zh:"新建书籍",en:"New Book"},"nav.config":{zh:"配置",en:"Config"},"nav.connected":{zh:"已连接",en:"Connected"},"nav.disconnected":{zh:"未连接",en:"Disconnected"},"dash.title":{zh:"书籍列表",en:"Books"},"dash.noBooks":{zh:"还没有书",en:"No books yet"},"dash.createFirst":{zh:"创建第一本书开始写作",en:"Create your first book to get started"},"dash.writeNext":{zh:"写下一章",en:"Write Next"},"dash.writing":{zh:"写作中...",en:"Writing..."},"dash.stats":{zh:"统计",en:"Stats"},"dash.chapters":{zh:"章",en:"chapters"},"dash.recentEvents":{zh:"最近事件",en:"Recent Events"},"dash.writingProgress":{zh:"写作进度",en:"Writing Progress"},"book.writeNext":{zh:"写下一章",en:"Write Next"},"book.draftOnly":{zh:"仅草稿",en:"Draft Only"},"book.approveAll":{zh:"全部通过",en:"Approve All"},"book.analytics":{zh:"数据分析",en:"Analytics"},"book.noChapters":{zh:"暂无章节,点击「写下一章」开始",en:'No chapters yet. Click "Write Next" to start.'},"book.approve":{zh:"通过",en:"Approve"},"book.reject":{zh:"驳回",en:"Reject"},"book.words":{zh:"字",en:"words"},"reader.backToList":{zh:"返回列表",en:"Back to List"},"reader.approve":{zh:"通过",en:"Approve"},"reader.reject":{zh:"驳回",en:"Reject"},"reader.chapterList":{zh:"章节列表",en:"Chapter List"},"reader.characters":{zh:"字符",en:"characters"},"reader.edit":{zh:"编辑",en:"Edit"},"reader.preview":{zh:"预览",en:"Preview"},"create.title":{zh:"创建书籍",en:"Create Book"},"create.bookTitle":{zh:"书名",en:"Title"},"create.language":{zh:"语言",en:"Language"},"create.genre":{zh:"题材",en:"Genre"},"create.wordsPerChapter":{zh:"每章字数",en:"Words / Chapter"},"create.targetChapters":{zh:"目标章数",en:"Target Chapters"},"create.creating":{zh:"创建中...",en:"Creating..."},"create.submit":{zh:"创建书籍",en:"Create Book"},"create.titleRequired":{zh:"请输入书名",en:"Title is required"},"create.genreRequired":{zh:"请选择题材",en:"Genre is required"},"create.placeholder":{zh:"请输入书名...",en:"Book title..."},"analytics.title":{zh:"数据分析",en:"Analytics"},"analytics.totalChapters":{zh:"总章数",en:"Total Chapters"},"analytics.totalWords":{zh:"总字数",en:"Total Words"},"analytics.avgWords":{zh:"平均字数/章",en:"Avg Words/Chapter"},"analytics.statusDist":{zh:"状态分布",en:"Status Distribution"},"bread.books":{zh:"书籍",en:"Books"},"bread.newBook":{zh:"新建书籍",en:"New Book"},"bread.config":{zh:"配置",en:"Config"},"bread.home":{zh:"首页",en:"Home"},"bread.chapter":{zh:"第{n}章",en:"Chapter {n}"},"config.title":{zh:"项目配置",en:"Project Config"},"config.project":{zh:"项目名",en:"Project"},"config.language":{zh:"语言",en:"Language"},"config.provider":{zh:"提供方",en:"Provider"},"config.model":{zh:"模型",en:"Model"},"config.editHint":{zh:"通过 CLI 编辑配置:",en:"Edit via CLI:"},"nav.system":{zh:"系统",en:"System"},"nav.daemon":{zh:"守护进程",en:"Daemon"},"nav.logs":{zh:"日志",en:"Logs"},"nav.running":{zh:"运行中",en:"Running"},"nav.agentOnline":{zh:"代理在线",en:"Agent Online"},"nav.agentOffline":{zh:"代理离线",en:"Agent Offline"},"nav.tools":{zh:"工具",en:"Tools"},"nav.style":{zh:"文风",en:"Style"},"nav.import":{zh:"导入",en:"Import"},"nav.radar":{zh:"市场雷达",en:"Radar"},"nav.doctor":{zh:"环境诊断",en:"Doctor"},"book.deleteBook":{zh:"删除书籍",en:"Delete Book"},"book.confirmDelete":{zh:"确认删除此书及所有章节?",en:"Delete this book and all chapters?"},"book.settings":{zh:"书籍设置",en:"Book Settings"},"book.status":{zh:"状态",en:"Status"},"book.drafting":{zh:"草稿中...",en:"Drafting..."},"book.pipelineWriting":{zh:"后台正在写作,本页会在完成后自动刷新。",en:"Background writing is running. This page will refresh automatically when it finishes."},"book.pipelineDrafting":{zh:"后台正在生成草稿,本页会在完成后自动刷新。",en:"Background drafting is running. This page will refresh automatically when it finishes."},"book.pipelineFailed":{zh:"后台任务失败",en:"Background job failed"},"book.save":{zh:"保存",en:"Save"},"book.saving":{zh:"保存中...",en:"Saving..."},"book.rewrite":{zh:"重写",en:"Rewrite"},"book.audit":{zh:"审计",en:"Audit"},"book.export":{zh:"导出",en:"Export"},"book.approvedOnly":{zh:"仅已通过",en:"Approved Only"},"book.manuscriptTitle":{zh:"章节标题",en:"Manuscript Title"},"book.curate":{zh:"操作",en:"Actions"},"book.spotFix":{zh:"精修",en:"Spot Fix"},"book.polish":{zh:"打磨",en:"Polish"},"book.rework":{zh:"重作",en:"Rework"},"book.antiDetect":{zh:"反检测",en:"Anti-Detect"},"book.statusActive":{zh:"进行中",en:"Active"},"book.statusPaused":{zh:"已暂停",en:"Paused"},"book.statusOutlining":{zh:"大纲中",en:"Outlining"},"book.statusCompleted":{zh:"已完成",en:"Completed"},"book.statusDropped":{zh:"已放弃",en:"Dropped"},"book.truthFiles":{zh:"真相文件",en:"Truth Files"},"style.title":{zh:"文风分析",en:"Style Analyzer"},"style.sourceName":{zh:"来源名称",en:"Source Name"},"style.sourceExample":{zh:"如:参考小说",en:"e.g. Reference Novel"},"style.textSample":{zh:"文本样本",en:"Text Sample"},"style.pasteHint":{zh:"粘贴参考文本进行文风分析...",en:"Paste reference text for style analysis..."},"style.analyze":{zh:"分析",en:"Analyze"},"style.analyzing":{zh:"分析中...",en:"Analyzing..."},"style.results":{zh:"分析结果",en:"Analysis Results"},"style.avgSentence":{zh:"平均句长",en:"Avg Sentence Length"},"style.vocabDiversity":{zh:"词汇多样性",en:"Vocabulary Diversity"},"style.avgParagraph":{zh:"平均段落长度",en:"Avg Paragraph Length"},"style.sentenceStdDev":{zh:"句长标准差",en:"Sentence StdDev"},"style.topPatterns":{zh:"主要模式",en:"Top Patterns"},"style.rhetoricalFeatures":{zh:"修辞特征",en:"Rhetorical Features"},"style.importToBook":{zh:"导入到书籍",en:"Import to Book"},"style.selectBook":{zh:"选择书籍...",en:"Select book..."},"style.importGuide":{zh:"导入文风指南",en:"Import Style Guide"},"style.emptyHint":{zh:"粘贴文本并点击分析查看文风档案",en:"Paste text and click Analyze to see style profile"},"import.title":{zh:"导入工具",en:"Import Tools"},"import.chapters":{zh:"导入章节",en:"Import Chapters"},"import.canon":{zh:"导入母本",en:"Import Canon"},"import.fanfic":{zh:"同人创作",en:"Fanfic"},"import.selectTarget":{zh:"选择目标书籍...",en:"Select target book..."},"import.splitRegex":{zh:"分割正则(可选)",en:"Split regex (optional)"},"import.pasteChapters":{zh:"粘贴章节文本...",en:"Paste chapter text..."},"import.selectSource":{zh:"选择源(母本)...",en:"Select source (parent)..."},"import.selectDerivative":{zh:"选择目标(衍生)...",en:"Select target (derivative)..."},"import.fanficTitle":{zh:"同人小说标题",en:"Fanfic title"},"import.pasteMaterial":{zh:"粘贴原作文本/设定/角色资料...",en:"Paste source material..."},"import.importing":{zh:"导入中...",en:"Importing..."},"import.creating":{zh:"创建中...",en:"Creating..."},"radar.title":{zh:"市场雷达",en:"Market Radar"},"radar.scan":{zh:"扫描市场",en:"Scan Market"},"radar.scanning":{zh:"扫描中...",en:"Scanning..."},"radar.summary":{zh:"市场概要",en:"Market Summary"},"radar.emptyHint":{zh:"点击「扫描市场」分析当前趋势和机会",en:'Click "Scan Market" to analyze trends and opportunities'},"doctor.title":{zh:"环境诊断",en:"Environment Check"},"doctor.recheck":{zh:"重新检查",en:"Re-check"},"doctor.inkosJson":{zh:"inkos.json 配置",en:"inkos.json configuration"},"doctor.projectEnv":{zh:"项目 .env 文件",en:"Project .env file"},"doctor.globalEnv":{zh:"全局 ~/.inkos/.env",en:"Global ~/.inkos/.env"},"doctor.booksDir":{zh:"书籍目录",en:"Books directory"},"doctor.llmApi":{zh:"LLM API 连接",en:"LLM API connectivity"},"doctor.connected":{zh:"已连接",en:"Connected"},"doctor.failed":{zh:"失败",en:"Failed"},"doctor.allPassed":{zh:"所有检查通过 — 环境健康",en:"All checks passed — environment is healthy"},"doctor.someFailed":{zh:"部分检查失败 — 请查看配置",en:"Some checks failed — review configuration"},"genre.createNew":{zh:"创建新题材",en:"Create New Genre"},"genre.editGenre":{zh:"编辑",en:"Edit"},"genre.deleteGenre":{zh:"删除",en:"Delete"},"genre.confirmDelete":{zh:"确认删除此题材?",en:"Delete this genre?"},"genre.chapterTypes":{zh:"章节类型",en:"Chapter Types"},"genre.fatigueWords":{zh:"疲劳词",en:"Fatigue Words"},"genre.numericalSystem":{zh:"数值系统",en:"Numerical System"},"genre.powerScaling":{zh:"力量等级",en:"Power Scaling"},"genre.eraResearch":{zh:"时代研究",en:"Era Research"},"genre.pacingRule":{zh:"节奏规则",en:"Pacing Rule"},"genre.rules":{zh:"规则",en:"Rules"},"genre.saveChanges":{zh:"保存更改",en:"Save Changes"},"genre.cancel":{zh:"取消",en:"Cancel"},"genre.copyToProject":{zh:"复制到项目",en:"Copy to Project"},"genre.selectHint":{zh:"选择题材查看详情",en:"Select a genre to view details"},"genre.commaSeparated":{zh:"逗号分隔",en:"comma-separated"},"genre.rulesMd":{zh:"规则(Markdown)",en:"Rules (Markdown)"},"config.modelRouting":{zh:"模型路由",en:"Model Routing"},"config.agent":{zh:"代理",en:"Agent"},"config.baseUrl":{zh:"基础 URL",en:"Base URL"},"config.default":{zh:"默认",en:"default"},"config.optional":{zh:"可选",en:"optional"},"config.saveOverrides":{zh:"保存路由",en:"Save Overrides"},"config.save":{zh:"保存",en:"Save"},"config.saving":{zh:"保存中...",en:"Saving..."},"config.cancel":{zh:"取消",en:"Cancel"},"config.edit":{zh:"编辑",en:"Edit"},"config.enabled":{zh:"启用",en:"Enabled"},"config.disabled":{zh:"禁用",en:"Disabled"},"truth.title":{zh:"真相文件",en:"Truth Files"},"truth.edit":{zh:"编辑",en:"Edit"},"truth.chars":{zh:"字",en:"chars"},"truth.save":{zh:"保存",en:"Save"},"truth.saving":{zh:"保存中...",en:"Saving..."},"truth.cancel":{zh:"取消",en:"Cancel"},"truth.empty":{zh:"暂无文件",en:"No truth files"},"truth.noFiles":{zh:"暂无文件",en:"No truth files"},"truth.notFound":{zh:"文件未找到",en:"File not found"},"truth.selectFile":{zh:"选择文件查看内容",en:"Select a file to view"},"truth.selectHint":{zh:"选择文件查看内容",en:"Select a file to view"},"dash.subtitle":{zh:"管理你的文学宇宙和 AI 辅助草稿。",en:"Manage your literary universe and AI-assisted drafts."},"reader.openingManuscript":{zh:"打开书稿中...",en:"Opening manuscript..."},"reader.manuscriptPage":{zh:"书稿页",en:"Manuscript Page"},"reader.minRead":{zh:"分钟阅读",en:"min read"},"reader.endOfChapter":{zh:"本章完",en:"End of Chapter"},"daemon.title":{zh:"守护进程控制",en:"Daemon Control"},"daemon.running":{zh:"运行中",en:"Running"},"daemon.stopped":{zh:"已停止",en:"Stopped"},"daemon.start":{zh:"启动",en:"Start"},"daemon.stop":{zh:"停止",en:"Stop"},"daemon.starting":{zh:"启动中...",en:"Starting..."},"daemon.stopping":{zh:"停止中...",en:"Stopping..."},"daemon.waitingEvents":{zh:"等待事件...",en:"Waiting for events..."},"daemon.startHint":{zh:"启动守护进程查看事件",en:"Start the daemon to see events"},"daemon.eventLog":{zh:"事件日志",en:"Event Log"},"config.temperature":{zh:"温度",en:"Temperature"},"config.maxTokens":{zh:"最大令牌数",en:"Max Tokens"},"config.stream":{zh:"流式输出",en:"Stream"},"config.chinese":{zh:"中文",en:"Chinese"},"config.english":{zh:"英文",en:"English"},"create.platform":{zh:"平台",en:"Platform"},"common.save":{zh:"保存",en:"Save"},"common.cancel":{zh:"取消",en:"Cancel"},"common.delete":{zh:"删除",en:"Delete"},"common.edit":{zh:"编辑",en:"Edit"},"common.error":{zh:"错误",en:"Error"},"common.loading":{zh:"加载中...",en:"Loading..."},"common.refresh":{zh:"刷新",en:"Refresh"},"common.enterCommand":{zh:"输入指令...",en:"Enter command..."},"chapter.readyForReview":{zh:"待审核",en:"Ready for Review"},"chapter.approved":{zh:"已通过",en:"Approved"},"chapter.drafted":{zh:"草稿",en:"Drafted"},"chapter.needsRevision":{zh:"需修订",en:"Needs Revision"},"chapter.imported":{zh:"已导入",en:"Imported"},"chapter.auditFailed":{zh:"审计失败",en:"Audit Failed"},"chapter.label":{zh:"第{n}章",en:"Chapter {n}"},"common.exportSuccess":{zh:"已导出到项目目录",en:"Exported to project directory"},"common.exportFormat":{zh:"导出格式",en:"Export format"},"logs.title":{zh:"日志",en:"Logs"},"logs.empty":{zh:"暂无日志",en:"No log entries yet"},"logs.showingRecent":{zh:"当前展示最近日志记录。",en:"Showing recent log entries."}};function po(){const{data:c}=Ze("/project"),f=(c==null?void 0:c.language)==="en"?"en":"zh";function u(o){return fb[o][f]}return{t:u,lang:f}}const Bm={id:"",name:"",language:"zh",chapterTypes:"",fatigueWords:"",numericalSystem:!1,powerScaling:!1,eraResearch:!1,pacingRule:"",body:""};function ji(c){return c.split(",").map(f=>f.trim()).filter(Boolean)}function mb({form:c,onChange:f,onSubmit:u,onCancel:o,isEdit:m,c:x,t:y}){const E=(g,h)=>f({...c,[g]:h});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"ID"}),s.jsx("input",{type:"text",value:c.id,onChange:g=>E("id",g.target.value),disabled:m,className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm disabled:opacity-50"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Name"}),s.jsx("input",{type:"text",value:c.name,onChange:g=>E("name",g.target.value),className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Language"}),s.jsxs("select",{value:c.language,onChange:g=>E("language",g.target.value),className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm",children:[s.jsx("option",{value:"zh",children:"zh"}),s.jsx("option",{value:"en",children:"en"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Chapter Types (comma-separated)"}),s.jsx("input",{type:"text",value:c.chapterTypes,onChange:g=>E("chapterTypes",g.target.value),className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Fatigue Words (comma-separated)"}),s.jsx("input",{type:"text",value:c.fatigueWords,onChange:g=>E("fatigueWords",g.target.value),className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm"})]}),s.jsxs("div",{className:"flex gap-6",children:[s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx("input",{type:"checkbox",checked:c.numericalSystem,onChange:g=>E("numericalSystem",g.target.checked)}),"Numerical System"]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx("input",{type:"checkbox",checked:c.powerScaling,onChange:g=>E("powerScaling",g.target.checked)}),"Power Scaling"]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx("input",{type:"checkbox",checked:c.eraResearch,onChange:g=>E("eraResearch",g.target.checked)}),"Era Research"]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Pacing Rule"}),s.jsx("input",{type:"text",value:c.pacingRule,onChange:g=>E("pacingRule",g.target.value),className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-muted-foreground uppercase tracking-wide",children:"Rules (Markdown)"}),s.jsx("textarea",{value:c.body,onChange:g=>E("body",g.target.value),rows:6,className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm font-mono"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:u,className:`px-4 py-2 text-sm rounded-md ${x.btnPrimary}`,children:y(m?"genre.saveChanges":"genre.createNew")}),s.jsx("button",{onClick:o,className:`px-4 py-2 text-sm rounded-md ${x.btnSecondary}`,children:y("genre.cancel")})]})]})}function hb({nav:c,theme:f,t:u}){const o=Ht(),{lang:m}=po(),{data:x,refetch:y}=Ze("/genres"),[E,g]=B.useState(null),[h,M]=B.useState("hidden"),[S,q]=B.useState(Bm),D=(x==null?void 0:x.genres.filter(C=>C.language===m||C.source==="project"))??[],V=E&&D.some(C=>C.id===E)?E:null,X=D.find(C=>C.id===V)??null,{data:L}=Ze(V?`/genres/${V}`:""),ue=async C=>{await at(`/genres/${C}/copy`),alert(`Copied ${C} to project genres/`),y()},re=()=>{q(Bm),M("create")},P=()=>{L&&(q({id:L.profile.id,name:L.profile.name,language:L.profile.language,chapterTypes:L.profile.chapterTypes.join(", "),fatigueWords:L.profile.fatigueWords.join(", "),numericalSystem:L.profile.numericalSystem,powerScaling:L.profile.powerScaling,eraResearch:L.profile.eraResearch??!1,pacingRule:L.profile.pacingRule,body:L.body}),M("edit"))},pe=()=>{M("hidden")},be=async()=>{try{await at("/genres/create",{id:S.id,name:S.name,language:S.language,chapterTypes:ji(S.chapterTypes),fatigueWords:ji(S.fatigueWords),numericalSystem:S.numericalSystem,powerScaling:S.powerScaling,eraResearch:S.eraResearch,pacingRule:S.pacingRule,body:S.body}),M("hidden"),y()}catch(C){alert(C instanceof Error?C.message:"Failed to create genre")}},H=async()=>{if(V)try{await Fe(`/genres/${V}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({profile:{id:S.id,name:S.name,language:S.language,chapterTypes:ji(S.chapterTypes),fatigueWords:ji(S.fatigueWords),numericalSystem:S.numericalSystem,powerScaling:S.powerScaling,eraResearch:S.eraResearch,pacingRule:S.pacingRule},body:S.body})}),M("hidden"),y()}catch(C){alert(C instanceof Error?C.message:"Failed to update genre")}},K=async()=>{if(V&&window.confirm(`Delete genre "${V}"?`))try{const C=await fetch(`/api/genres/${V}`,{method:"DELETE"});if(!C.ok){const ee=await C.json();throw new Error(ee.error??`${C.status}`)}g(null),y()}catch(C){alert(C instanceof Error?C.message:"Failed to delete genre")}};return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:o.link,children:u("bread.home")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{children:u("create.genre")})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"font-serif text-3xl",children:u("create.genre")}),s.jsxs("button",{onClick:re,className:`flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-md ${o.btnPrimary}`,children:[s.jsx(Ni,{size:16}),"Create Genre"]})]}),h!=="hidden"&&s.jsxs("div",{className:`border ${o.cardStatic} rounded-lg p-6`,children:[s.jsx("h2",{className:"text-lg font-medium mb-4",children:h==="create"?"Create New Genre":`Edit: ${S.id}`}),s.jsx(mb,{form:S,onChange:q,onSubmit:h==="create"?be:H,onCancel:pe,isEdit:h==="edit",c:o,t:u})]}),s.jsxs("div",{className:"grid grid-cols-[250px_1fr] gap-6",children:[s.jsx("div",{className:`border ${o.cardStatic} rounded-lg overflow-hidden`,children:D.map(C=>s.jsxs("button",{onClick:()=>g(C.id),className:`w-full text-left px-4 py-3 border-b border-border/40 transition-colors ${V===C.id?"bg-primary/10 text-primary":"hover:bg-muted/30"}`,children:[s.jsx("div",{className:"text-sm font-medium",children:C.name}),s.jsxs("div",{className:"text-xs text-muted-foreground mt-0.5",children:[C.id," · ",C.language," · ",C.source]})]},C.id))}),s.jsx("div",{className:`border ${o.cardStatic} rounded-lg p-6 min-h-[400px]`,children:V&&L?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-medium",children:L.profile.name}),s.jsxs("div",{className:"text-sm text-muted-foreground mt-1",children:[L.profile.id," · ",L.profile.language," ·",L.profile.numericalSystem?" Numerical":"",L.profile.powerScaling?" Power":"",L.profile.eraResearch?" Era":""]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs("button",{onClick:P,className:`flex items-center gap-1.5 px-3 py-1.5 text-sm ${o.btnSecondary} rounded-md`,children:[s.jsx(so,{size:14}),"Edit"]}),(X==null?void 0:X.source)==="project"&&s.jsxs("button",{onClick:K,className:`flex items-center gap-1.5 px-3 py-1.5 text-sm ${o.btnDanger} rounded-md`,children:[s.jsx(Ei,{size:14}),"Delete"]}),s.jsx("button",{onClick:()=>V&&ue(V),className:`px-3 py-1.5 text-sm ${o.btnSecondary} rounded-md`,children:"Copy to Project"})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wide mb-2",children:"Chapter Types"}),s.jsx("div",{className:"flex gap-2 flex-wrap",children:L.profile.chapterTypes.map(C=>s.jsx("span",{className:"px-2 py-1 text-xs bg-secondary rounded",children:C},C))})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wide mb-2",children:"Fatigue Words"}),s.jsxs("div",{className:"flex gap-2 flex-wrap",children:[L.profile.fatigueWords.slice(0,15).map(C=>s.jsx("span",{className:"px-2 py-1 text-xs bg-secondary rounded",children:C},C)),L.profile.fatigueWords.length>15&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",L.profile.fatigueWords.length-15]})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wide mb-2",children:"Pacing"}),s.jsx("div",{className:"text-sm",children:L.profile.pacingRule||"—"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wide mb-2",children:"Rules"}),s.jsx("pre",{className:"text-sm leading-relaxed whitespace-pre-wrap font-mono text-foreground/80 bg-muted/30 p-4 rounded-md max-h-[300px] overflow-y-auto",children:L.body||"—"})]})]}):s.jsx("div",{className:"text-muted-foreground text-sm italic flex items-center justify-center h-full",children:"Select a genre to view details"})})]})]})}function pb(c,f){const u=c.trim()||f.trim();return u?u.startsWith("Error:")?{tone:"error",message:u}:u.endsWith("...")?{tone:"info",message:u}:{tone:"success",message:u}:null}function gb({nav:c,theme:f,t:u}){const o=Ht(),[m,x]=B.useState(""),[y,E]=B.useState(""),[g,h]=B.useState(null),[M,S]=B.useState(!1),[q,D]=B.useState(""),[V,X]=B.useState(""),[L,ue]=B.useState(""),{data:re}=Ze("/books"),P=pb(q,L),pe=async()=>{if(m.trim()){S(!0),h(null),D("");try{const H=await Fe("/style/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:m,sourceName:y||"sample"})});h(H)}catch(H){D(`Error: ${H instanceof Error?H.message:String(H)}`)}S(!1)}},be=async()=>{if(!(!V||!m.trim())){ue("Importing...");try{await at(`/books/${V}/style/import`,{text:m,sourceName:y||"sample"}),ue("Style guide imported successfully!")}catch(H){ue(`Error: ${H instanceof Error?H.message:String(H)}`)}}};return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:o.link,children:u("bread.home")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{children:u("nav.style")})]}),s.jsxs("h1",{className:"font-serif text-3xl flex items-center gap-3",children:[s.jsx(uo,{size:28,className:"text-primary"}),u("style.title")]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground block mb-2",children:u("style.sourceName")}),s.jsx("input",{type:"text",value:y,onChange:H=>E(H.target.value),placeholder:u("style.sourceExample"),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm focus:outline-none focus:border-primary"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground block mb-2",children:u("style.textSample")}),s.jsx("textarea",{value:m,onChange:H=>x(H.target.value),rows:12,placeholder:u("style.pasteHint"),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm focus:outline-none focus:border-primary resize-none font-mono"})]}),s.jsx("div",{className:"flex gap-3",children:s.jsxs("button",{onClick:pe,disabled:!m.trim()||M,className:`px-4 py-2 text-sm rounded-lg ${o.btnPrimary} disabled:opacity-30 flex items-center gap-2`,children:[s.jsx(Tx,{size:14}),u(M?"style.analyzing":"style.analyze")]})})]}),s.jsxs("div",{className:"space-y-4",children:[g&&s.jsxs("div",{className:`border ${o.cardStatic} rounded-lg p-5 space-y-4`,children:[s.jsx("h3",{className:"font-semibold text-sm uppercase tracking-wider text-muted-foreground",children:u("style.results")}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[s.jsxs("div",{className:"bg-secondary/30 rounded-lg p-3",children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:u("style.avgSentence")}),s.jsx("div",{className:"text-xl font-bold",children:g.avgSentenceLength.toFixed(1)})]}),s.jsxs("div",{className:"bg-secondary/30 rounded-lg p-3",children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:u("style.vocabDiversity")}),s.jsxs("div",{className:"text-xl font-bold",children:[(g.vocabularyDiversity*100).toFixed(0),"%"]})]}),s.jsxs("div",{className:"bg-secondary/30 rounded-lg p-3",children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:u("style.avgParagraph")}),s.jsx("div",{className:"text-xl font-bold",children:g.avgParagraphLength.toFixed(0)})]}),s.jsxs("div",{className:"bg-secondary/30 rounded-lg p-3",children:[s.jsx("div",{className:"text-muted-foreground text-xs",children:u("style.sentenceStdDev")}),s.jsx("div",{className:"text-xl font-bold",children:g.sentenceLengthStdDev.toFixed(1)})]})]}),g.topPatterns.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wide mb-2",children:u("style.topPatterns")}),s.jsx("div",{className:"flex gap-2 flex-wrap",children:g.topPatterns.map(H=>s.jsx("span",{className:"px-2 py-1 text-xs bg-secondary rounded",children:H},H))})]}),g.rhetoricalFeatures.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-muted-foreground uppercase tracking-wide mb-2",children:u("style.rhetoricalFeatures")}),s.jsx("div",{className:"flex gap-2 flex-wrap",children:g.rhetoricalFeatures.map(H=>s.jsx("span",{className:"px-2 py-1 text-xs bg-primary/10 text-primary rounded",children:H},H))})]}),s.jsxs("div",{className:"border-t border-border pt-4 mt-4 space-y-3",children:[s.jsxs("h4",{className:"font-semibold text-sm flex items-center gap-2",children:[s.jsx(q0,{size:14}),u("style.importToBook")]}),s.jsxs("select",{value:V,onChange:H=>X(H.target.value),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm",children:[s.jsx("option",{value:"",children:u("style.selectBook")}),re==null?void 0:re.books.map(H=>s.jsx("option",{value:H.id,children:H.title},H.id))]}),s.jsx("button",{onClick:be,disabled:!V,className:`px-4 py-2 text-sm rounded-lg ${o.btnSecondary} disabled:opacity-30`,children:u("style.importGuide")}),L&&s.jsx("div",{className:"text-xs text-muted-foreground",children:L})]})]}),!g&&!M&&s.jsx("div",{className:`border border-dashed ${o.cardStatic} rounded-lg p-8 text-center text-muted-foreground text-sm italic`,children:u("style.emptyHint")})]})]}),P&&s.jsx("div",{className:`px-4 py-3 rounded-lg text-sm ${P.tone==="error"?"bg-destructive/10 text-destructive":P.tone==="info"?"bg-secondary text-muted-foreground":"bg-emerald-500/10 text-emerald-600"}`,children:P.message})]})}function xb({nav:c,theme:f,t:u}){const o=Ht(),{lang:m}=po(),{data:x}=Ze("/books"),[y,E]=B.useState("chapters"),[g,h]=B.useState(""),[M,S]=B.useState(!1),[q,D]=B.useState(""),[V,X]=B.useState(""),[L,ue]=B.useState(""),[re,P]=B.useState(""),[pe,be]=B.useState(""),[H,K]=B.useState(""),[C,ee]=B.useState(""),[Ne,Re]=B.useState("canon"),[Oe,ie]=B.useState("other"),[Ge,Le]=B.useState(m),w=async()=>{if(!(!q.trim()||!V)){S(!0),h("");try{const A=await Fe(`/books/${V}/import/chapters`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:q,splitRegex:L||void 0})});h(`Imported ${A.importedCount} chapters`)}catch(A){h(`Error: ${A instanceof Error?A.message:String(A)}`)}S(!1)}},Y=async()=>{if(!(!re||!pe)){S(!0),h("");try{await at(`/books/${re}/import/canon`,{fromBookId:pe}),h("Canon imported successfully!")}catch(A){h(`Error: ${A instanceof Error?A.message:String(A)}`)}S(!1)}},F=async()=>{if(!(!H.trim()||!C.trim())){S(!0),h("");try{const A=await Fe("/fanfic/init",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:H,sourceText:C,mode:Ne,genre:Oe,language:Ge})});h(`Fanfic created: ${A.bookId}`)}catch(A){h(`Error: ${A instanceof Error?A.message:String(A)}`)}S(!1)}},he=[{id:"chapters",label:u("import.chapters"),icon:s.jsx(Ic,{size:14})},{id:"canon",label:u("import.canon"),icon:s.jsx(xx,{size:14})},{id:"fanfic",label:u("import.fanfic"),icon:s.jsx(Qx,{size:14})}];return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:o.link,children:u("bread.home")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{children:u("nav.import")})]}),s.jsxs("h1",{className:"font-serif text-3xl flex items-center gap-3",children:[s.jsx(Ic,{size:28,className:"text-primary"}),u("import.title")]}),s.jsx("div",{className:"flex gap-1 bg-secondary/30 rounded-lg p-1 w-fit",children:he.map(A=>s.jsxs("button",{onClick:()=>{E(A.id),h("")},className:`px-4 py-2 rounded-md text-sm font-medium flex items-center gap-2 transition-all ${y===A.id?"bg-card shadow-sm text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[A.icon," ",A.label]},A.id))}),s.jsxs("div",{className:`border ${o.cardStatic} rounded-lg p-6 space-y-4`,children:[y==="chapters"&&s.jsxs(s.Fragment,{children:[s.jsxs("select",{value:V,onChange:A=>X(A.target.value),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm",children:[s.jsx("option",{value:"",children:u("import.selectTarget")}),x==null?void 0:x.books.map(A=>s.jsx("option",{value:A.id,children:A.title},A.id))]}),s.jsx("input",{type:"text",value:L,onChange:A=>ue(A.target.value),placeholder:u("import.splitRegex"),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm font-mono"}),s.jsx("textarea",{value:q,onChange:A=>D(A.target.value),rows:10,placeholder:u("import.pasteChapters"),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm resize-none font-mono"}),s.jsx("button",{onClick:w,disabled:M||!V||!q.trim(),className:`px-4 py-2 text-sm rounded-lg ${o.btnPrimary} disabled:opacity-30`,children:u(M?"import.importing":"import.chapters")})]}),y==="canon"&&s.jsxs(s.Fragment,{children:[s.jsxs("select",{value:pe,onChange:A=>be(A.target.value),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm",children:[s.jsx("option",{value:"",children:u("import.selectSource")}),x==null?void 0:x.books.map(A=>s.jsx("option",{value:A.id,children:A.title},A.id))]}),s.jsxs("select",{value:re,onChange:A=>P(A.target.value),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm",children:[s.jsx("option",{value:"",children:u("import.selectDerivative")}),x==null?void 0:x.books.map(A=>s.jsx("option",{value:A.id,children:A.title},A.id))]}),s.jsx("button",{onClick:Y,disabled:M||!re||!pe,className:`px-4 py-2 text-sm rounded-lg ${o.btnPrimary} disabled:opacity-30`,children:u(M?"import.importing":"import.canon")})]}),y==="fanfic"&&s.jsxs(s.Fragment,{children:[s.jsx("input",{type:"text",value:H,onChange:A=>K(A.target.value),placeholder:u("import.fanficTitle"),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm"}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsxs("select",{value:Ne,onChange:A=>Re(A.target.value),className:"px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm",children:[s.jsx("option",{value:"canon",children:"Canon"}),s.jsx("option",{value:"au",children:"AU"}),s.jsx("option",{value:"ooc",children:"OOC"}),s.jsx("option",{value:"cp",children:"CP"})]}),s.jsxs("select",{value:Oe,onChange:A=>ie(A.target.value),className:"px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm",children:[s.jsx("option",{value:"other",children:"Other"}),s.jsx("option",{value:"xuanhuan",children:"玄幻"}),s.jsx("option",{value:"urban",children:"都市"}),s.jsx("option",{value:"xianxia",children:"仙侠"})]}),s.jsxs("select",{value:Ge,onChange:A=>Le(A.target.value),className:"px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm",children:[s.jsx("option",{value:"zh",children:"中文"}),s.jsx("option",{value:"en",children:"English"})]})]}),s.jsx("textarea",{value:C,onChange:A=>ee(A.target.value),rows:10,placeholder:u("import.pasteMaterial"),className:"w-full px-3 py-2 rounded-lg bg-secondary/30 border border-border text-sm resize-none font-mono"}),s.jsx("button",{onClick:F,disabled:M||!H.trim()||!C.trim(),className:`px-4 py-2 text-sm rounded-lg ${o.btnPrimary} disabled:opacity-30`,children:u(M?"import.creating":"import.fanfic")})]}),g&&s.jsx("div",{className:`text-sm px-3 py-2 rounded-lg ${g.startsWith("Error")?"bg-destructive/10 text-destructive":"bg-emerald-500/10 text-emerald-600"}`,children:g})]})]})}function yb({nav:c,theme:f,t:u}){const o=Ht(),[m,x]=B.useState(null),[y,E]=B.useState(!1),[g,h]=B.useState(""),M=async()=>{E(!0),h(""),x(null);try{const S=await Fe("/radar/scan",{method:"POST"});x(S)}catch(S){h(S instanceof Error?S.message:String(S))}E(!1)};return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:o.link,children:u("bread.home")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{children:u("nav.radar")})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h1",{className:"font-serif text-3xl flex items-center gap-3",children:[s.jsx(oo,{size:28,className:"text-primary"}),u("radar.title")]}),s.jsxs("button",{onClick:M,disabled:y,className:`px-5 py-2.5 text-sm rounded-lg ${o.btnPrimary} disabled:opacity-30 flex items-center gap-2`,children:[y?s.jsx(In,{size:14,className:"animate-spin"}):s.jsx(A0,{size:14}),u(y?"radar.scanning":"radar.scan")]})]}),g&&s.jsx("div",{className:"bg-destructive/10 text-destructive px-4 py-3 rounded-lg text-sm",children:g}),m&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:`border ${o.cardStatic} rounded-lg p-5`,children:[s.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground mb-3",children:u("radar.summary")}),s.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:m.marketSummary})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:m.recommendations.map((S,q)=>s.jsxs("div",{className:`border ${o.cardStatic} rounded-lg p-5 space-y-3`,children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground",children:[S.platform," · ",S.genre]}),s.jsxs("span",{className:`text-xs font-bold px-2 py-0.5 rounded-full ${S.confidence>=.7?"bg-emerald-500/10 text-emerald-600":S.confidence>=.4?"bg-amber-500/10 text-amber-600":"bg-muted text-muted-foreground"}`,children:[(S.confidence*100).toFixed(0),"%"]})]}),s.jsx("p",{className:"text-sm font-semibold",children:S.concept}),s.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:S.reasoning}),S.benchmarkTitles.length>0&&s.jsx("div",{className:"flex gap-2 flex-wrap",children:S.benchmarkTitles.map(D=>s.jsx("span",{className:"px-2 py-0.5 text-[10px] bg-secondary rounded",children:D},D))})]},q))})]}),!m&&!y&&!g&&s.jsx("div",{className:`border border-dashed ${o.cardStatic} rounded-lg p-12 text-center text-muted-foreground text-sm italic`,children:u("radar.emptyHint")})]})}function Wn({label:c,ok:f,detail:u}){return s.jsxs("div",{className:"flex items-center gap-3 py-3 border-b border-border/30 last:border-0",children:[f?s.jsx(ki,{size:18,className:"text-emerald-500 shrink-0"}):s.jsx(lo,{size:18,className:"text-destructive shrink-0"}),s.jsx("span",{className:"text-sm font-medium flex-1",children:c}),u&&s.jsx("span",{className:"text-xs text-muted-foreground",children:u})]})}function bb({nav:c,theme:f,t:u}){const o=Ht(),{data:m,refetch:x}=Ze("/doctor");return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx("button",{onClick:c.toDashboard,className:o.link,children:u("bread.home")}),s.jsx("span",{className:"text-border",children:"/"}),s.jsx("span",{children:u("nav.doctor")})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h1",{className:"font-serif text-3xl flex items-center gap-3",children:[s.jsx(Im,{size:28,className:"text-primary"}),u("doctor.title")]}),s.jsx("button",{onClick:()=>x(),className:`px-4 py-2 text-sm rounded-lg ${o.btnSecondary}`,children:u("doctor.recheck")})]}),m?s.jsxs("div",{className:`border ${o.cardStatic} rounded-lg p-5`,children:[s.jsx(Wn,{label:u("doctor.inkosJson"),ok:m.inkosJson}),s.jsx(Wn,{label:u("doctor.projectEnv"),ok:m.projectEnv}),s.jsx(Wn,{label:u("doctor.globalEnv"),ok:m.globalEnv}),s.jsx(Wn,{label:u("doctor.booksDir"),ok:m.booksDir,detail:`${m.bookCount} book(s)`}),s.jsx(Wn,{label:u("doctor.llmApi"),ok:m.llmConnected,detail:m.llmConnected?u("doctor.connected"):u("doctor.failed")})]}):s.jsx("div",{className:"flex items-center justify-center py-12",children:s.jsx(In,{size:24,className:"animate-spin text-primary"})}),m&&s.jsx("div",{className:`px-4 py-3 rounded-lg text-sm font-medium ${m.inkosJson&&(m.projectEnv||m.globalEnv)&&m.llmConnected?"bg-emerald-500/10 text-emerald-600":"bg-amber-500/10 text-amber-600"}`,children:m.inkosJson&&(m.projectEnv||m.globalEnv)&&m.llmConnected?u("doctor.allPassed"):u("doctor.someFailed")})]})}function vb({onSelect:c}){const[f,u]=B.useState(null),[o,m]=B.useState(null),x=y=>{m(y),setTimeout(()=>c(y),400)};return s.jsxs("div",{className:"min-h-screen bg-background flex flex-col items-center justify-center px-8",children:[s.jsxs("div",{className:"mb-16 text-center",children:[s.jsxs("div",{className:"flex items-baseline justify-center gap-1.5 mb-4",children:[s.jsx("span",{className:"font-serif text-6xl italic text-primary",children:"Ink"}),s.jsx("span",{className:"text-5xl font-semibold tracking-tight text-foreground",children:"OS"})]}),s.jsx("div",{className:"text-base text-muted-foreground tracking-widest uppercase",children:"Studio"})]}),s.jsxs("div",{className:"flex gap-8 mb-16",children:[s.jsxs("button",{onClick:()=>x("zh"),onMouseEnter:()=>u("zh"),onMouseLeave:()=>u(null),className:`group w-80 border rounded-lg p-10 text-left transition-all duration-300 ${o==="zh"?"border-primary bg-primary/10 scale-[1.02]":f==="zh"?"border-primary/50 bg-card":"border-border bg-card/50"}`,children:[s.jsx("div",{className:"font-serif text-3xl mb-4 text-foreground",children:"中文创作"}),s.jsx("div",{className:"text-base text-foreground/70 leading-relaxed mb-6",children:"玄幻 · 仙侠 · 都市 · 恐怖 · 通用"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"番茄小说 · 起点中文网 · 飞卢"})]}),s.jsxs("button",{onClick:()=>x("en"),onMouseEnter:()=>u("en"),onMouseLeave:()=>u(null),className:`group w-80 border rounded-lg p-10 text-left transition-all duration-300 ${o==="en"?"border-primary bg-primary/10 scale-[1.02]":f==="en"?"border-primary/50 bg-card":"border-border bg-card/50"}`,children:[s.jsx("div",{className:"font-serif text-3xl italic mb-4 text-foreground",children:"English Writing"}),s.jsx("div",{className:"text-base text-foreground/70 leading-relaxed mb-6",children:"LitRPG · Progression · Romantasy · Sci-Fi · Isekai"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Royal Road · Kindle Unlimited · Scribble Hub"})]})]}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"可在设置中更改 · Can be changed in Settings"})]})}const jb=["book:creating","book:created","book:deleted","book:error","write:start","write:complete","write:error","draft:start","draft:complete","draft:error","daemon:chapter","daemon:started","daemon:stopped","daemon:error","agent:start","agent:complete","agent:error","audit:start","audit:complete","audit:error","revise:start","revise:complete","revise:error","rewrite:start","rewrite:complete","rewrite:error","style:start","style:complete","style:error","import:start","import:complete","import:error","fanfic:start","fanfic:complete","fanfic:error","fanfic:refresh:start","fanfic:refresh:complete","fanfic:refresh:error","radar:start","radar:complete","radar:error","log","llm:progress","ping"];function Sb(c="/api/events"){const[f,u]=B.useState([]),[o,m]=B.useState(!1),x=B.useRef(null);B.useEffect(()=>{const E=new EventSource(c);x.current=E,E.onopen=()=>m(!0),E.onerror=()=>m(!1);const g=h=>{try{const M=h.data?JSON.parse(h.data):null;u(S=>[...S.slice(-99),{event:h.type,data:M,timestamp:Date.now()}])}catch{}};for(const h of jb)E.addEventListener(h,g);return()=>{E.close(),x.current=null}},[c]);const y=B.useCallback(()=>u([]),[]);return{messages:f,connected:o,clear:y}}const gh="inkos:studio:theme";function Nb(c){return c>=6&&c<18?"light":"dark"}function Jc(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function Hm(c){const f=c==null?void 0:c.getItem(gh);return f==="light"||f==="dark"?f:null}function qm(c){return c.storedTheme??Nb(c.hour)}function zb(){const[c,f]=B.useState(()=>qm({hour:new Date().getHours(),storedTheme:Hm(Jc())}));return B.useEffect(()=>{const o=setInterval(()=>{const m=Hm(Jc());f(qm({hour:new Date().getHours(),storedTheme:m}))},6e4);return()=>clearInterval(o)},[]),{theme:c,setTheme:o=>{const m=Jc();try{m==null||m.setItem(gh,o)}catch{}f(o)}}}function kb(c){return c.page==="book"||c.page==="chapter"||c.page==="truth"||c.page==="analytics"?c.bookId:void 0}function Eb(){const[c,f]=B.useState({page:"dashboard"}),u=Sb(),{theme:o,setTheme:m}=zb(),{t:x}=po(),{data:y,refetch:E}=Ze("/project"),[g,h]=B.useState(!1),[M,S]=B.useState(!1),[q,D]=B.useState(!1),V=o==="dark";B.useEffect(()=>{document.documentElement.classList.toggle("dark",V)},[V]),B.useEffect(()=>{y&&(y.languageExplicit||h(!0),S(!0))},[y]);const X={toDashboard:()=>f({page:"dashboard"}),toBook:re=>f({page:"book",bookId:re}),toBookCreate:()=>f({page:"book-create"}),toChapter:(re,P)=>f({page:"chapter",bookId:re,chapterNumber:P}),toAnalytics:re=>f({page:"analytics",bookId:re}),toConfig:()=>f({page:"config"}),toTruth:re=>f({page:"truth",bookId:re}),toDaemon:()=>f({page:"daemon"}),toLogs:()=>f({page:"logs"}),toGenres:()=>f({page:"genres"}),toStyle:()=>f({page:"style"}),toImport:()=>f({page:"import"}),toRadar:()=>f({page:"radar"}),toDoctor:()=>f({page:"doctor"})},L=kb(c),ue=L?`book:${L}`:c.page;return M?g?s.jsx(vb,{onSelect:async re=>{await at("/project/language",{language:re}),h(!1),E()}}):s.jsxs("div",{className:"h-screen bg-background text-foreground flex overflow-hidden font-sans",children:[s.jsx(K0,{nav:X,activePage:ue,sse:u,t:x}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background/30 backdrop-blur-sm",children:[s.jsxs("header",{className:"h-14 shrink-0 flex items-center justify-between px-8 border-b border-border/40",children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] text-muted-foreground font-bold",children:"InkOS Studio"})}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:()=>m(V?"light":"dark"),className:"w-8 h-8 flex items-center justify-center rounded-lg bg-secondary text-muted-foreground hover:text-primary hover:bg-primary/10 transition-all shadow-sm",title:V?"Switch to Light Mode":"Switch to Dark Mode",children:V?s.jsx(w0,{size:16}):s.jsx(r0,{size:16})}),s.jsxs("button",{className:"w-8 h-8 flex items-center justify-center rounded-lg bg-secondary text-muted-foreground hover:text-foreground transition-all relative",children:[s.jsx(px,{size:16}),s.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 bg-primary rounded-full border-2 border-background"})]}),s.jsx("button",{onClick:()=>D(re=>!re),className:`w-8 h-8 flex items-center justify-center rounded-lg transition-all shadow-sm ${q?"bg-primary text-primary-foreground shadow-primary/20":"bg-secondary text-muted-foreground hover:text-primary hover:bg-primary/10"}`,title:"Toggle AI Assistant",children:s.jsx(Wm,{size:16})})]})]}),s.jsx("main",{className:"flex-1 overflow-y-auto scroll-smooth",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-12 md:px-12 lg:py-16 fade-in",children:[c.page==="dashboard"&&s.jsx(Qy,{nav:X,sse:u,theme:o,t:x}),c.page==="book"&&s.jsx(Ky,{bookId:c.bookId,nav:X,theme:o,t:x,sse:u}),c.page==="book-create"&&s.jsx(eb,{nav:X,theme:o,t:x}),c.page==="chapter"&&s.jsx(tb,{bookId:c.bookId,chapterNumber:c.chapterNumber,nav:X,theme:o,t:x}),c.page==="analytics"&&s.jsx(ab,{bookId:c.bookId,nav:X,theme:o,t:x}),c.page==="config"&&s.jsx(ib,{nav:X,theme:o,t:x}),c.page==="truth"&&s.jsx(cb,{bookId:c.bookId,nav:X,theme:o,t:x}),c.page==="daemon"&&s.jsx(ob,{nav:X,theme:o,t:x,sse:u}),c.page==="logs"&&s.jsx(db,{nav:X,theme:o,t:x}),c.page==="genres"&&s.jsx(hb,{nav:X,theme:o,t:x}),c.page==="style"&&s.jsx(gb,{nav:X,theme:o,t:x}),c.page==="import"&&s.jsx(xb,{nav:X,theme:o,t:x}),c.page==="radar"&&s.jsx(yb,{nav:X,theme:o,t:x}),c.page==="doctor"&&s.jsx(bb,{nav:X,theme:o,t:x})]})})]}),s.jsx(Vy,{open:q,onClose:()=>D(!1),t:x,sse:u,activeBookId:L})]}):s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsx("div",{className:"w-12 h-12 border-4 border-primary/20 border-t-primary rounded-full animate-spin"})})}Jg.createRoot(document.getElementById("root")).render(s.jsx(B.StrictMode,{children:s.jsx(Eb,{})}));
|