llonebot-dist 7.12.2 → 7.12.4
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/llbot.js +1101 -271
- package/llbot.js.map +1 -1
- package/package.json +1 -1
- package/webui/assets/{index-CW4srXaj.css → index-BvJQpqZQ.css} +1 -1
- package/webui/assets/{index-B0ADks6f.js → index-YP3cbf9d.js} +4 -4
- package/webui/index.html +2 -2
- package//346/233/264/346/226/260/346/227/245/345/277/227.txt +19 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=ie(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function oe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var k=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&&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)},A={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=A,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:oe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,k)}catch(e){k(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(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 y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,k=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ce=[],le=-1;function ue(e){return{current:e}}function j(e){0>le||(e.current=ce[le],ce[le]=null,le--)}function M(e,t){le++,ce[le]=e.current,e.current=t}var de=ue(null),fe=ue(null),pe=ue(null),me=ue(null);function he(e,t){switch(M(pe,t),M(fe,e),M(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}j(de),M(de,e)}function ge(){j(de),j(fe),j(pe)}function _e(e){e.memoizedState!==null&&M(me,e);var t=de.current,n=Hd(t,e.type);t!==n&&(M(fe,e),M(de,n))}function ve(e){fe.current===e&&(j(de),j(fe)),me.current===e&&(j(me),Qf._currentValue=se)}var ye,be;function xe(e){if(ye===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ye=t&&t[1]||``,be=-1<e.stack.indexOf(`
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=ie(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function oe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var k=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&&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)},A={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=A,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:oe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,k)}catch(e){k(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(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 y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,k=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ce=[],le=-1;function ue(e){return{current:e}}function j(e){0>le||(e.current=ce[le],ce[le]=null,le--)}function M(e,t){le++,ce[le]=e.current,e.current=t}var de=ue(null),fe=ue(null),pe=ue(null),me=ue(null);function he(e,t){switch(M(pe,t),M(fe,e),M(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}j(de),M(de,e)}function ge(){j(de),j(fe),j(pe)}function _e(e){e.memoizedState!==null&&M(me,e);var t=de.current,n=Hd(t,e.type);t!==n&&(M(fe,e),M(de,n))}function ve(e){fe.current===e&&(j(de),j(fe)),me.current===e&&(j(me),Qf._currentValue=se)}var ye,be;function xe(e){if(ye===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ye=t&&t[1]||``,be=-1<e.stack.indexOf(`
|
|
2
2
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
3
|
`+ye+e+be}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
4
|
`),l=s.split(`
|
|
@@ -6,7 +6,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
6
6
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
7
|
Error generating stack: `+e.message+`
|
|
8
8
|
`+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,Oe=t.unstable_cancelCallback,N=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var P=Math.clz32?Math.clz32:We,He=Math.log,Ue=Math.LN2;function We(e){return e>>>=0,e===0?32:31-(He(e)/Ue|0)|0}var Ge=256,Ke=262144,qe=4194304;function Je(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 Ye(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Je(n))):i=Je(o):i=Je(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Je(n))):i=Je(o)):i=Je(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Xe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ze(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 Qe(){var e=qe;return qe<<=1,!(qe&62914560)&&(qe=4194304),e}function $e(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function et(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-P(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&nt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function nt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-P(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function rt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-P(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function it(e,t){var n=t&-t;return n=n&42?1:at(n),(n&(e.suspendedLanes|t))===0?n:0}function at(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 ot(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function st(){var e=A.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ct(e,t){var n=A.p;try{return A.p=e,t()}finally{A.p=n}}var lt=Math.random().toString(36).slice(2),F=`__reactFiber$`+lt,ut=`__reactProps$`+lt,dt=`__reactContainer$`+lt,ft=`__reactEvents$`+lt,pt=`__reactListeners$`+lt,mt=`__reactHandles$`+lt,ht=`__reactResources$`+lt,gt=`__reactMarker$`+lt;function _t(e){delete e[F],delete e[ut],delete e[ft],delete e[pt],delete e[mt]}function vt(e){var t=e[F];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[F]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[F])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function yt(e){if(e=e[F]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function xt(e){var t=e[ht];return t||=e[ht]={hoistableStyles:new Map,hoistableScripts:new Map},t}function St(e){e[gt]=!0}var Ct=new Set,I={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(I[e]=t,e=0;e<t.length;e++)Ct.add(t[e])}var Et=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]*$`),Dt={},Ot={};function L(e){return Ee.call(Ot,e)?!0:Ee.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function kt(e,t,n){if(L(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(oe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=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 Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(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 Zt=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`]]),Qt=/^[\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 $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function R(e){var t=yt(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ut]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(rn!==null||an!==null)&&(bu(),rn&&(t=rn,e=an,an=rn=null,R(t),e)))for(t=0;t<e.length;t++)R(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ut]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,`passive`,{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return mn=i.slice(e,1<r?1-r:void 0)}function gn(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 _n(){return!0}function vn(){return!1}function yn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?_n:vn,this.isPropagationStopped=vn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=h({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=h({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,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!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(h({},Dn,{dataTransfer:0})),An=yn(h({},Sn,{relatedTarget:0})),jn=yn(h({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(h({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(h({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={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`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(h({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(h({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(h({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(h({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(h({},Dn,{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})),Wn=yn(h({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var z=!1;function er(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function tr(e,t){if(z)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,z=!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 Yn&&t.locale!==`ko`?null:t.data;default:return null}}var nr={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 rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!nr[e.type]:t===`textarea`}function ir(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Ed(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ar=null,or=null;function sr(e){yd(e,0)}function cr(e){if(It(bt(e)))return e}function lr(e,t){if(e===`change`)return t}var ur=!1;if(ln){var dr;if(ln){var fr=`oninput`in document;if(!fr){var pr=document.createElement(`div`);pr.setAttribute(`oninput`,`return;`),fr=typeof pr.oninput==`function`}dr=fr}else dr=!1;ur=dr&&(!document.documentMode||9<document.documentMode)}function mr(){ar&&(ar.detachEvent(`onpropertychange`,hr),or=ar=null)}function hr(e){if(e.propertyName===`value`&&cr(or)){var t=[];ir(t,or,e,nn(e)),sn(sr,t)}}function gr(e,t,n){e===`focusin`?(mr(),ar=t,or=n,ar.attachEvent(`onpropertychange`,hr)):e===`focusout`&&mr()}function _r(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return cr(or)}function vr(e,t){if(e===`click`)return cr(t)}function yr(e,t){if(e===`input`||e===`change`)return cr(t)}function br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var xr=typeof Object.is==`function`?Object.is:br;function Sr(e,t){if(xr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ee.call(t,i)||!xr(e[i],t[i]))return!1}return!0}function Cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wr(e,t){var n=Cr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Cr(n)}}function Tr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Er(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function Dr(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 Or=ln&&`documentMode`in document&&11>=document.documentMode,kr=null,Ar=null,jr=null,Mr=!1;function Nr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mr||kr==null||kr!==Lt(r)||(r=kr,`selectionStart`in r&&Dr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),jr&&Sr(jr,r)||(jr=r,r=Ed(Ar,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Fr={animationend:Pr(`Animation`,`AnimationEnd`),animationiteration:Pr(`Animation`,`AnimationIteration`),animationstart:Pr(`Animation`,`AnimationStart`),transitionrun:Pr(`Transition`,`TransitionRun`),transitionstart:Pr(`Transition`,`TransitionStart`),transitioncancel:Pr(`Transition`,`TransitionCancel`),transitionend:Pr(`Transition`,`TransitionEnd`)},Ir={},Lr={};ln&&(Lr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Fr.animationend.animation,delete Fr.animationiteration.animation,delete Fr.animationstart.animation),`TransitionEvent`in window||delete Fr.transitionend.transition);function B(e){if(Ir[e])return Ir[e];if(!Fr[e])return e;var t=Fr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lr)return Ir[e]=t[n];return e}var Rr=B(`animationend`),zr=B(`animationiteration`),Br=B(`animationstart`),Vr=B(`transitionrun`),Hr=B(`transitionstart`),Ur=B(`transitioncancel`),Wr=B(`transitionend`),Gr=new Map,Kr=`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(` `);Kr.push(`scrollEnd`);function qr(e,t){Gr.set(e,t),wt(t,[e])}var Jr=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&&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)},Yr=[],Xr=0,Zr=0;function Qr(){for(var e=Xr,t=Zr=Xr=0;t<e;){var n=Yr[t];Yr[t++]=null;var r=Yr[t];Yr[t++]=null;var i=Yr[t];Yr[t++]=null;var a=Yr[t];if(Yr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ni(n,i,a)}}function $r(e,t,n,r){Yr[Xr++]=e,Yr[Xr++]=t,Yr[Xr++]=n,Yr[Xr++]=r,Zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ei(e,t,n,r){return $r(e,t,n,r),ri(e)}function ti(e,t){return $r(e,null,null,t),ri(e)}function ni(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-P(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ri(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ii={};function ai(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oi(e,t,n,r){return new ai(e,t,n,r)}function si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ci(e,t){var n=e.alternate;return n===null?(n=oi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function li(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ui(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)si(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,de.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=oi(31,n,t,a),e.elementType=ee,e.lanes=o,e;case y:return di(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=oi(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=oi(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=oi(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function di(e,t,n,r){return e=oi(7,e,r,t),e.lanes=n,e}function fi(e,t,n){return e=oi(6,e,null,t),e.lanes=n,e}function pi(e){var t=oi(18,null,null,0);return t.stateNode=e,t}function mi(e,t,n){return t=oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hi=new WeakMap;function gi(e,t){if(typeof e==`object`&&e){var n=hi.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},hi.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var _i=[],vi=0,yi=null,bi=0,xi=[],Si=0,Ci=null,wi=1,Ti=``;function Ei(e,t){_i[vi++]=bi,_i[vi++]=yi,yi=e,bi=t}function Di(e,t,n){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,Ci=e;var r=wi;e=Ti;var i=32-P(r)-1;r&=~(1<<i),n+=1;var a=32-P(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,wi=1<<32-P(t)+i|n<<i|r,Ti=a+e}else wi=1<<a|n<<i|r,Ti=e}function Oi(e){e.return!==null&&(Ei(e,1),Di(e,1,0))}function ki(e){for(;e===yi;)yi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null;for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,Ti=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null}function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ti,xi[Si++]=Ci,wi=t.id,Ti=t.overflow,Ci=e}var ji=null,V=null,H=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(gi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[F]=e,t[ut]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ji=e.return;ji;)switch(ji.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ji=ji.return}}function Ri(e){if(e!==ji)return!1;if(!H)return Li(e),H=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&V&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));V=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));V=uf(e)}else t===27?(t=V,Zd(e.type)?(e=lf,lf=null,V=e):V=t):V=ji?cf(e.stateNode.nextSibling):null;return!0}function zi(){V=ji=null,H=!1}function Bi(){var e=Mi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=ue(null),Ui=null,Wi=null;function Gi(e,t,n){M(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,j(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;xr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===me.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!xr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=dd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=k.S;k.S=function(e,t){eu=Ae(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=ue(null);function ga(){var e=ha.current;return e===null?q.pooledCache:e}function _a(e,t){t===null?M(ha,ha.current):M(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ui(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=di(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ui(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case v:return t=mi(t,e.mode,n),t.return=e,t;case O:return t=Ta(t),f(e,t,n)}if(oe(t)||re(t))return t=di(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===C)return f(e,$i(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Ta(n),p(e,t,n,r)}if(oe(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===C)return p(e,t,$i(e,n),r);Na(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Ta(r),m(e,t,n,r,i)}if(oe(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===C)return m(e,t,n,$i(t,r),i);Na(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),H&&Ei(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return H&&Ei(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),H&&Ei(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),H&&Ei(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return H&&Ei(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),H&&Ei(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=di(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ui(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=mi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Ta(o),b(e,r,o,c)}if(oe(o))return h(e,r,o,c);if(re(o)){if(l=re(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===C)return b(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ri(e),ni(e,null,n),t}return $r(e,r,t,n),ri(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rt(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=ue(null),Xa=ue(0);function Za(e,t){e=Ul,M(Xa,e),M(Ya,t),Ul=e|t.baseLanes}function Qa(){M(Xa,Ul),M(Ya,Ya.current)}function $a(){Ul=Xa.current,j(Ya),j(Xa)}var eo=ue(null),to=null;function no(e){var t=e.alternate;M(so,so.current&1),M(eo,e),to===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(to=e)}function ro(e){M(so,so.current),M(eo,e),to===null&&(to=e)}function io(e){e.tag===22?(M(so,so.current),M(eo,e),to===null&&(to=e)):ao(e)}function ao(){M(so,so.current),M(eo,eo.current)}function oo(e){j(eo),to===e&&(to=null),j(so)}var so=ue(0);function co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))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)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 lo=0,U=null,W=null,uo=null,fo=!1,po=!1,mo=!1,ho=0,go=0,_o=null,vo=0;function yo(){throw Error(i(321))}function bo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}function xo(e,t,n,r,i,a){return lo=a,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Rs:zs,mo=!1,a=n(r,i),mo=!1,po&&(a=Co(t,n,r,i)),So(e),a}function So(e){k.H=Ls;var t=W!==null&&W.next!==null;if(lo=0,uo=W=U=null,fo=!1,go=0,_o=null,t)throw Error(i(300));e===null||nc||(e=e.dependencies,e!==null&&Xi(e)&&(nc=!0))}function Co(e,t,n,r){U=e;var a=0;do{if(po&&(_o=null),go=0,po=!1,25<=a)throw Error(i(301));if(a+=1,uo=W=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}k.H=Bs,o=t(n,r)}while(po);return o}function wo(){var e=k.H,t=e.useState()[0];return t=typeof t.then==`function`?jo(t):t,e=e.useState()[0],(W===null?null:W.memoizedState)!==e&&(U.flags|=1024),t}function To(){var e=ho!==0;return ho=0,e}function Eo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Do(e){if(fo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fo=!1}lo=0,uo=W=U=null,po=!1,go=ho=0,_o=null}function Oo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return uo===null?U.memoizedState=uo=e:uo=uo.next=e,uo}function ko(){if(W===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=W.next;var t=uo===null?U.memoizedState:uo.next;if(t!==null)uo=t,W=e;else{if(e===null)throw U.alternate===null?Error(i(467)):Error(i(310));W=e,e={memoizedState:W.memoizedState,baseState:W.baseState,baseQueue:W.baseQueue,queue:W.queue,next:null},uo===null?U.memoizedState=uo=e:uo=uo.next=e}return uo}function Ao(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function jo(e){var t=go;return go+=1,_o===null&&(_o=[]),e=wa(_o,e,t),t=U,(uo===null?t.memoizedState:uo.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Rs:zs),e}function Mo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return jo(e);if(e.$$typeof===C)return Qi(e)}throw Error(i(438,String(e)))}function No(e){var t=null,n=U.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=U.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Ao(),U.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=te;return t.index++,n}function Po(e,t){return typeof t==`function`?t(e):t}function Fo(e){return Io(ko(),W,e)}function Io(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(lo&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===la&&(d=!0);else if((lo&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,U.lanes|=p,Gl|=p;f=u.action,mo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,U.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!xr(o,e.memoizedState)&&(nc=!0,d&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Lo(e){var t=ko(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);xr(o,t.memoizedState)||(nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ro(e,t,n){var r=U,a=ko(),o=H;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!xr((W||a).memoizedState,n);if(s&&(a.memoizedState=n,nc=!0),a=a.queue,ls(Vo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||uo!==null&&uo.memoizedState.tag&1){if(r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||lo&127||zo(r,t,n)}return n}function zo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t=Ao(),U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Bo(e,t,n,r){t.value=n,t.getSnapshot=r,Ho(t)&&Uo(e)}function Vo(e,t,n){return n(function(){Ho(t)&&Uo(e)})}function Ho(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xr(e,n)}catch{return!0}}function Uo(e){var t=ti(e,2);t!==null&&hu(t,e,2)}function Wo(e){var t=Oo();if(typeof e==`function`){var n=e;if(e=n(),mo){Ve(!0);try{n()}finally{Ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:e},t}function Go(e,t,n,r){return e.baseState=n,Io(e,W,typeof r==`function`?r:Po)}function Ko(e,t,n,r,a){if(Ps(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};k.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=k.T,o={};k.T=o;try{var s=n(i,r),c=k.S;c!==null&&c(o,s),Jo(e,t,s)}catch(n){Xo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),k.T=a}}else try{a=n(i,r),Jo(e,t,a)}catch(n){Xo(e,t,n)}}function Jo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Yo(e,t,n)},function(n){return Xo(e,t,n)}):Yo(e,t,n)}function Yo(e,t,n){t.status=`fulfilled`,t.value=n,Zo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,qo(e,n)))}function Xo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Zo(t),t=t.next;while(t!==r)}e.action=null}function Zo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qo(e,t){return t}function $o(e,t){if(H){var n=q.formState;if(n!==null){a:{var r=U;if(H){if(V){b:{for(var i=V,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){V=cf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Oo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:t},n.queue=r,n=js.bind(null,U,r),r.dispatch=n,r=Wo(!1),a=Ns.bind(null,U,!1,r.queue),r=Oo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ko.bind(null,U,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function es(e){return ts(ko(),W,e)}function ts(e,t,n){if(t=Io(e,t,Qo)[0],e=Fo(Po)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=jo(t)}catch(e){throw e===ya?xa:e}else r=t;t=ko();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(U.flags|=2048,is(9,{destroy:void 0},ns.bind(null,i,n),null)),[r,a,e]}function ns(e,t){e.action=t}function rs(e){var t=ko(),n=W;if(n!==null)return ts(t,n,e);ko(),t=t.memoizedState,n=ko();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function is(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=U.updateQueue,t===null&&(t=Ao(),U.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function as(){return ko().memoizedState}function os(e,t,n,r){var i=Oo();U.flags|=e,i.memoizedState=is(1|t,{destroy:void 0},n,r===void 0?null:r)}function ss(e,t,n,r){var i=ko();r=r===void 0?null:r;var a=i.memoizedState.inst;W!==null&&r!==null&&bo(r,W.memoizedState.deps)?i.memoizedState=is(t,a,n,r):(U.flags|=e,i.memoizedState=is(1|t,a,n,r))}function cs(e,t){os(8390656,8,e,t)}function ls(e,t){ss(2048,8,e,t)}function us(e){U.flags|=4;var t=U.updateQueue;if(t===null)t=Ao(),U.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ds(e){var t=ko().memoizedState;return us({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function fs(e,t){return ss(4,2,e,t)}function ps(e,t){return ss(4,4,e,t)}function ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function hs(e,t,n){n=n==null?null:n.concat([e]),ss(4,4,ms.bind(null,t,e),n)}function gs(){}function _s(e,t){var n=ko();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&bo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vs(e,t){var n=ko();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&bo(t,r[1]))return r[0];if(r=e(),mo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r}function ys(e,t,n){return n===void 0||lo&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),U.lanes|=e,Gl|=e,n)}function bs(e,t,n,r){return xr(n,t)?n:Ya.current===null?!(lo&42)||lo&1073741824&&!(Y&261930)?(nc=!0,e.memoizedState=n):(e=mu(),U.lanes|=e,Gl|=e,t):(e=ys(e,n,r),xr(e,t)||(nc=!0),e)}function xs(e,t,n,r,i){var a=A.p;A.p=a!==0&&8>a?a:8;var o=k.T,s={};k.T=s,Ns(e,!1,t,n);try{var c=i(),l=k.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,pa(c,r),pu(e)):Ms(e,t,r,pu(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{A.p=a,o!==null&&s.types!==null&&(o.types=s.types),k.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ws(e).queue;xs(e,a,t,se,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},pu())}function Es(){return Qi(Qf)}function Ds(){return ko().memoizedState}function Os(){return ko().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ba(n);var r=Va(t,e,n);r!==null&&(hu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=ei(e,t,n,r),n!==null&&(hu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,pu())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,xr(s,o))return $r(e,t,i,0),q===null&&Qr(),!1}catch{}if(n=ei(e,t,i,r),n!==null)return hu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=ei(e,n,r,2),t!==null&&hu(t,e,2)}function Ps(e){var t=e.alternate;return e===U||t!==null&&t===U}function Fs(e,t){po=fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,rt(e,n)}}var Ls={readContext:Qi,use:Mo,useCallback:yo,useContext:yo,useEffect:yo,useImperativeHandle:yo,useLayoutEffect:yo,useInsertionEffect:yo,useMemo:yo,useReducer:yo,useRef:yo,useState:yo,useDebugValue:yo,useDeferredValue:yo,useTransition:yo,useSyncExternalStore:yo,useId:yo,useHostTransitionStatus:yo,useFormState:yo,useActionState:yo,useOptimistic:yo,useMemoCache:yo,useCacheRefresh:yo};Ls.useEffectEvent=yo;var Rs={readContext:Qi,use:Mo,useCallback:function(e,t){return Oo().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=Oo();t=t===void 0?null:t;var r=e();if(mo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Oo();if(n!==void 0){var i=n(t);if(mo){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=Oo();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,n=js.bind(null,U,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(Oo(),e,t)},useTransition:function(){var e=Wo(!1);return e=xs.bind(null,U,e.queue,!0,!1),Oo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=U,a=Oo();if(H){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||zo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs(Vo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,o,n,t),null),n},useId:function(){var e=Oo(),t=q.identifierPrefix;if(H){var n=Ti,r=wi;n=(r&~(1<<32-P(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ho++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=vo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Es,useFormState:$o,useActionState:$o,useOptimistic:function(e){var t=Oo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ns.bind(null,U,!0,n),n.dispatch=t,[e,t]},useMemoCache:No,useCacheRefresh:function(){return Oo().memoizedState=ks.bind(null,U)},useEffectEvent:function(e){var t=Oo(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},zs={readContext:Qi,use:Mo,useCallback:_s,useContext:Qi,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Fo,useRef:as,useState:function(){return Fo(Po)},useDebugValue:gs,useDeferredValue:function(e,t){return bs(ko(),W.memoizedState,e,t)},useTransition:function(){var e=Fo(Po)[0],t=ko().memoizedState;return[typeof e==`boolean`?e:jo(e),t]},useSyncExternalStore:Ro,useId:Ds,useHostTransitionStatus:Es,useFormState:es,useActionState:es,useOptimistic:function(e,t){return Go(ko(),W,e,t)},useMemoCache:No,useCacheRefresh:Os};zs.useEffectEvent=ds;var Bs={readContext:Qi,use:Mo,useCallback:_s,useContext:Qi,useEffect:ls,useImperativeHandle:hs,useInsertionEffect:fs,useLayoutEffect:ps,useMemo:vs,useReducer:Lo,useRef:as,useState:function(){return Lo(Po)},useDebugValue:gs,useDeferredValue:function(e,t){var n=ko();return W===null?ys(n,e,t):bs(n,W.memoizedState,e,t)},useTransition:function(){var e=Lo(Po)[0],t=ko().memoizedState;return[typeof e==`boolean`?e:jo(e),t]},useSyncExternalStore:Ro,useId:Ds,useHostTransitionStatus:Es,useFormState:rs,useActionState:rs,useOptimistic:function(e,t){var n=ko();return W===null?(n.baseState=e,[e,n.queue.dispatch]):Go(n,W,e,t)},useMemoCache:No,useCacheRefresh:Os};Bs.useEffectEvent=ds;function Vs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(hu(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(hu(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(hu(t,e,n),Ha(t,e,n))}};function Us(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Sr(n,r)||!Sr(i,a):!0}function Ws(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hs.enqueueReplaceState(t,t.state,null)}function Gs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Ks(e){Jr(e)}function qs(e){console.error(e)}function Js(e){Jr(e)}function Ys(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Qs(e){return e=Ba(e),e.tag=3,e}function $s(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Xs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Xs(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ec(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=eo.current,n!==null){switch(n.tag){case 31:case 13:return to===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(H)return t=eo.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(gi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=gi(r,n),a=Zs(e.stateNode,r,a),Ua(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(gi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=gi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=gi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Zs(n.stateNode,r,e),Ua(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Qs(a),$s(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var tc=Error(i(461)),nc=!1;function rc(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function ic(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=xo(e,t,n,o,a,i),s=To(),e!==null&&!nc?(Eo(e,t,i),Oc(e,t,i)):(H&&s&&Oi(t),t.flags|=1,rc(e,t,r,i),t.child)}function ac(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,oc(e,t,a,r,i)):(e=ui(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!kc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Sr:n,n(o,r)&&e.ref===t.ref)return Oc(e,t,i)}return t.flags|=1,e=ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function oc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Sr(a,r)&&e.ref===t.ref)if(nc=!1,t.pendingProps=r=a,kc(e,i))e.flags&131072&&(nc=!0);else return t.lanes=e.lanes,Oc(e,t,i)}return mc(e,t,n,r,i)}function sc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return lc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),io(t);else return r=t.lanes=536870912,lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ao(t)):(_a(t,a.cachePool),Za(t,a),ao(t),t.memoizedState=null);return rc(e,t,i,n),t.child}function cc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),io(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function uc(e,t){return t=Cc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dc(e,t,n){return Fa(t,e.child,null,n),e=uc(t,t.pendingProps),e.flags|=2,oo(t),t.memoizedState=null,e}function fc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(H){if(r.mode===`hidden`)return e=uc(t,r),t.lanes=536870912,cc(null,e);if(ro(t),(e=V)?(e=rf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,V=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return uc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ro(t),a)if(t.flags&256)t.flags&=-257,t=dc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(nc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,nc||a){if(r=q,r!==null&&(s=it(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ti(e,s),hu(r,e,s),tc;Du(),t=dc(e,t,n)}else e=o.treeContext,V=cf(s.nextSibling),ji=t,H=!0,Mi=null,Ni=!1,e!==null&&Ai(t,e),t=uc(t,r),t.flags|=4096;return t}return e=ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function pc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function mc(e,t,n,r,i){return Zi(t),n=xo(e,t,n,r,void 0,i),r=To(),e!==null&&!nc?(Eo(e,t,i),Oc(e,t,i)):(H&&r&&Oi(t),t.flags|=1,rc(e,t,n,i),t.child)}function hc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=Co(t,r,n,i),So(e),r=To(),e!==null&&!nc?(Eo(e,t,a),Oc(e,t,a)):(H&&r&&Oi(t),t.flags|=1,rc(e,t,n,a),t.child)}function gc(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ii,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Hs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ii,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Vs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Hs.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Gs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ii,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ws(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Vs(t,n,d,r),l=t.memoizedState),(c=La||Us(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=Gs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ii,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ws(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Vs(t,n,s,r),p=t.memoizedState),(u=La||Us(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,pc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):rc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Oc(e,t,i),e}function _c(e,t,n,r){return zi(),t.flags|=256,rc(e,t,n,r),t.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yc(e){return{baseLanes:e,cachePool:va()}}function bc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function xc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(so.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(H){if(a?no(t):ao(t),(e=V)?(e=rf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ci===null?null:{id:wi,overflow:Ti},retryLane:536870912,hydrationErrors:null},n=pi(e),n.return=t,t.child=n,ji=t,V=null)):e=null,e===null)throw Fi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(ao(t),a=t.mode,c=Cc({mode:`hidden`,children:c},a),r=di(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(null,r)):(no(t),Sc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(no(t),t.flags&=-257,t=wc(e,t,n)):t.memoizedState===null?(ao(t),c=r.fallback,a=t.mode,r=Cc({mode:`visible`,children:r.children},a),c=di(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=yc(n),r.childLanes=bc(e,s,n),t.memoizedState=vc,t=cc(null,r)):(ao(t),t.child=e.child,t.flags|=128,t=null);else if(no(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=wc(e,t,n)}else if(nc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,nc||s){if(s=q,s!==null&&(r=it(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ti(e,r),hu(s,e,r),tc;af(c)||Du(),t=wc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,V=cf(c.nextSibling),ji=t,H=!0,Mi=null,Ni=!1,e!==null&&Ai(t,e),t=Sc(t,r.children),t.flags|=4096);return t}return a?(ao(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=di(c,a,n,null),c.flags|=2):c=ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,cc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=yc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=bc(e,s,n),t.memoizedState=vc,cc(e.child,r)):(no(t),n=e.child,e=n.sibling,n=ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Sc(e,t){return t=Cc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Cc(e,t){return e=oi(22,e,null,t),e.lanes=0,e}function wc(e,t,n){return Fa(t,e.child,null,n),e=Sc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Ec(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=so.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,M(so,o),rc(e,t,r,n),r=H?bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Tc(e,n,t);else if(e.tag===19)Tc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ec(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ec(t,!0,n,null,a,r);break;case`together`:Ec(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Oc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function kc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Xi(e))):!0}function Ac(e,t,n){switch(t.tag){case 3:he(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:_e(t);break;case 4:he(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ro(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(no(t),e=Oc(e,t,n),e===null?null:e.sibling):xc(e,t,n):(no(t),t.flags|=128,null);no(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),M(so,so.current),r)break;return null;case 22:return t.lanes=0,sc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return Oc(e,t,n)}function jc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)nc=!0;else{if(!kc(e,n)&&!(t.flags&128))return nc=!1,Ac(e,t,n);nc=!!(e.flags&131072)}else nc=!1,H&&t.flags&1048576&&Di(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)si(e)?(r=Gs(e,r),t.tag=1,t=gc(null,t,e,r,n)):(t.tag=0,t=mc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=ic(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=ac(null,t,e,r,n);break a}}throw t=ae(e)||e,Error(i(306,t,``))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Gs(r,t.pendingProps),gc(e,t,r,a,n);case 3:a:{if(he(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=_c(e,t,r,n);break a}else if(r!==a){a=gi(Error(i(424)),t),Vi(a),t=_c(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(V=cf(e.firstChild),ji=t,H=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=Oc(e,t,n);break a}rc(e,t,r,n)}t=t.child}return t;case 26:return pc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:H||(n=t.type,e=t.pendingProps,r=Bd(pe.current).createElement(n),r[F]=t,r[ut]=e,Pd(r,n,e),St(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&H&&(r=t.stateNode=ff(t.type,t.pendingProps,pe.current),ji=t,Ni=!0,a=V,Zd(t.type)?(lf=a,V=cf(r.firstChild)):V=a),rc(e,t,t.pendingProps.children,n),pc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&H&&((a=r=V)&&(r=tf(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ji=t,V=cf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),_e(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=xo(e,t,wo,null,null,n),Qf._currentValue=a),pc(e,t),rc(e,t,r,n),t.child;case 6:return e===null&&H&&((e=n=V)&&(n=nf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ji=t,V=null,e=!0)),e||Fi(t)),null;case 13:return xc(e,t,n);case 4:return he(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):rc(e,t,r,n),t.child;case 11:return ic(e,t,t.type,t.pendingProps,n);case 7:return rc(e,t,t.pendingProps,n),t.child;case 8:return rc(e,t,t.pendingProps.children,n),t.child;case 12:return rc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),rc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,rc(e,t,r,n),t.child;case 14:return ac(e,t,t.type,t.pendingProps,n);case 15:return oc(e,t,t.type,t.pendingProps,n);case 19:return Dc(e,t,n);case 31:return fc(e,t,n);case 22:return sc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=q,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),rc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Mc(e){e.flags|=4}function Nc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Ea=Sa,ba}else e.flags&=-16777217}function Pc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Ea=Sa,ba}function Fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Qe(),e.lanes|=t,Yl|=t)}function Ic(e,t){if(!H)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function G(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lc(e,t,n){var r=t.pendingProps;switch(ki(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return G(t),null;case 1:return G(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Mc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),G(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Mc(t),o===null?(G(t),Nc(t,a,null,r,n)):(G(t),Pc(t,o))):o?o===e.memoizedState?(G(t),t.flags&=-16777217):(Mc(t),G(t),Pc(t,o)):(e=e.memoizedProps,e!==r&&Mc(t),G(t),Nc(t,a,e,r,n)),null;case 27:if(ve(t),n=pe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return G(t),null}e=de.current,Ri(t)?Ii(t,e):(e=ff(a,r,n),t.stateNode=e,Mc(t))}return G(t),null;case 5:if(ve(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return G(t),null}if(o=de.current,Ri(t))Ii(t,o);else{var s=Bd(pe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[F]=t,o[ut]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Mc(t)}}return G(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=pe.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ji,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[F]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Fi(t,!0)}else e=Bd(e).createTextNode(r),e[F]=t,t.stateNode=e}return G(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[F]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;G(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(oo(t),t):(oo(t),null);if(t.flags&128)throw Error(i(558))}return G(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[F]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;G(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(oo(t),t):(oo(t),null)}return oo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fc(t,t.updateQueue),G(t),null);case 4:return ge(),e===null&&Sd(t.stateNode.containerInfo),G(t),null;case 10:return Ki(t.type),G(t),null;case 19:if(j(so),r=t.memoizedState,r===null)return G(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ic(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=co(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)li(n,e),n=n.sibling;return M(so,so.current&1|2),H&&Ei(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>tu&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}else{if(!a)if(e=co(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!H)return G(t),null}else 2*Ae()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(G(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=so.current,M(so,a?n&1|2:n&1),H&&Ei(t,r.treeForkCount),e);case 22:case 23:return oo(t),$a(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(G(t),t.subtreeFlags&6&&(t.flags|=8192)):G(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&j(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),G(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Rc(e,t){switch(ki(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ge(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(oo(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(oo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(so),null;case 4:return ge(),null;case 10:return Ki(t.type),null;case 22:case 23:return oo(t),$a(),e!==null&&j(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function zc(e,t){switch(ki(t),t.tag){case 3:Ki(ia),ge();break;case 26:case 27:case 5:ve(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&oo(t);break;case 13:oo(t);break;case 19:j(so);break;case 10:Ki(t.type);break;case 22:case 23:oo(t),$a(),e!==null&&j(ha);break;case 24:Ki(ia)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ut]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(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&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[F]=e,t[ut]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=Er(e),Dr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Gs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Gs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ja(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_t(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 sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Be&&typeof Be.onCommitFiberUnmount==`function`)try{Be.onCommitFiberUnmount(ze,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;Zd(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(i(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(i(160));ul(o,s,a),sl=null,cl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[gt]||o[F]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[F]=e,St(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[F]=e,St(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=gl,gl=gf(t.containerInfo),hl(t,e),gl=a,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ae()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||a,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||$c||el||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Zc(e,Yc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)qa(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Ll={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:k.T===null?st():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||H){var e=Ke;Ke<<=1,!(Ke&3932160)&&(Ke=262144),Jl=e}else Jl=536870912;return e=eo.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),et(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Xe(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Ae(),10<a)){if(yu(r,t,Jl,!Bl),Ye(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},jl(t,a,d);var m=(a&62914560)===a?$l-Ae():(a&4194048)===a?eu-Ae():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!xr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-P(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&nt(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Wi=Ui=null,Do(e),ka=null,Aa=0,e=J;for(;e!==null;)zc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=ci(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Xe(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-P(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Qr(),n}function Cu(e,t){U=null,k.H=Ls,t===ya||t===xa?(t=Da(),X=3):t===ba?(t=Da(),X=4):X=t===tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Ys(e,gi(t,e.current)))}function wu(){var e=eo.current;return e===null?!0:(Y&4194048)===Y?to===null:(Y&62914560)===Y||Y&536870912?e===to:!1}function Tu(){var e=k.H;return k.H=Ls,e===null?Ls:e}function Eu(){var e=k.A;return k.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&eo.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:eo.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,K=r,k.H=i,k.A=a,J===null&&(q=null,Y=0,Qr()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=Ae()+500,Su(e,t)):Vl=Xe(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(Ca(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Ca(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Wi=Ui=null,k.H=r,k.A=a,K=n,J===null?(q=null,Y=0,Qr(),Wl):0}function ju(){for(;J!==null&&!N();)Mu(J)}function Mu(e){var t=jc(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=hc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=hc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Do(t);default:zc(n,t),t=J=li(t,Ul),t=jc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Wi=Ui=null,Do(t),ka=null,Aa=0;var i=t.return;try{if(ec(e,i,t,n,Y)){Wl=1,Ys(e,gi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Ys(e,gi(n,e.current)),J=null;return}t.flags&32768?(H||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Lc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Zr,tt(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Pe,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=k.T,k.T=null,a=A.p,A.p=2,s=K,K|=4;try{il(e,t,n)}finally{K=s,A.p=a,k.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=Er(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Tr(s.ownerDocument.documentElement,s)){if(c!==null&&Dr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=wr(s,h),v=wr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{K=i,A.p=r,k.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=k.T,k.T=null;var r=A.p;A.p=2;var i=K;K|=4;try{al(e,t.alternate,t)}finally{K=i,A.p=r,k.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,ke();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ot(n),t=t.stateNode,Be&&typeof Be.onCommitFiberRoot==`function`)try{Be.onCommitFiberRoot(ze,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=k.T,i=A.p,A.p=2,k.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{k.T=t,A.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ot(su),r=k.T,a=A.p;try{A.p=32>n?32:n,k.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{A.p=a,k.T=r,Vu(e,t)}}function Wu(e,t,n){t=gi(n,t),t=Zs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(et(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=gi(n,e),n=Qs(2),r=Va(t,n,2),r!==null&&($s(n,r,t,e),et(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ae()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Qe()),e=ti(e,t),e!==null&&(et(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return De(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-P(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Ye(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Xe(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ae(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-P(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ze(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=Ye(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Oe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Xe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Oe(r),ot(n)){case 2:case 8:n=Ne;break;case 32:n=Pe;break;case 268435456:n=Ie;break;default:n=Pe}return r=cd.bind(null,e),n=De(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Oe(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Ye(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ae()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?De(Me,ad):od()})}function dd(){if(nd===0){var e=la;e===0&&(e=Ge,Ge<<=1,!(Ge&261888)&&(Ge=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ut]||null).action),o=r.submitter;o&&(t=(t=o[ut]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Cs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Cs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Kr.length;hd++){var gd=Kr[hd];qr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}qr(Rr,`onAnimationEnd`),qr(zr,`onAnimationIteration`),qr(Br,`onAnimationStart`),qr(`dblclick`,`onDoubleClick`),qr(`focusin`,`onFocus`),qr(`focusout`,`onBlur`),qr(Vr,`onTransitionRun`),qr(Hr,`onTransitionStart`),qr(Ur,`onTransitionCancel`),qr(Wr,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Jr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[ft];n===void 0&&(n=t[ft]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Ct.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!un||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=vt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}sn(function(){var r=a,i=nn(n),s=[];a:{var c=Gr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Rr:case zr:case Br:l=jn;break;case Wr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=cn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(vt(u)||u[dt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?vt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:bt(l),h=u==null?c:bt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,vt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=lr;else if(rr(c))if(ur)v=yr;else{v=_r;var y=gr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=lr):v=vr;if(v&&=v(e,r)){ir(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?bt(r):window,e){case`focusin`:(rr(y)||y.contentEditable===`true`)&&(kr=y,Ar=r,jr=null);break;case`focusout`:jr=Ar=kr=null;break;case`mousedown`:Mr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Mr=!1,Nr(s,n,i);break;case`selectionchange`:if(Or)break;case`keydown`:case`keyup`:Nr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else z?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(z||x!==`onCompositionStart`?x===`onCompositionEnd`&&z&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,z=!0)),y=Ed(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?er(e,n):tr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=cn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=cn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=cn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
9
|
-
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,kt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!I.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[gt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=A.d;A.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?Ts(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),St(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=xt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);St(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=xt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),St(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=xt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),St(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=pe.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=xt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=xt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=xt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+zt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),St(t),e.head.appendChild(t))}function Pf(e){return`[src="`+zt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,St(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),St(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[gt]||a[F]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){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=$e(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$e(0),this.hiddenUpdates=$e(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function tp(e){return e?(e=ii,e):ii}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(hu(n,e,t),Ha(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=at(t);var n=ti(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=2,up(e,t,n,r)}finally{A.p=a,k.T=i}}function lp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=8,up(e,t,n,r)}finally{A.p=a,k.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Je(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-P(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Ae()+500,id(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=nn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=vt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(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(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=yt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=vt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ct(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ct(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=yt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,Cs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ut]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[dt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=st();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));A.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:k,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ze=zp.inject(Rp),Be=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ks,s=qs,c=Js;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[dt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),v=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),y=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),b=e=>{let t=y(e);return t.charAt(0).toUpperCase()+t.slice(1)},x={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`},S=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},C=c(u()),w=(0,C.createContext)({}),T=()=>(0,C.useContext)(w),E=(0,C.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=T()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,C.createElement)(`svg`,{ref:c,...x,width:t??l??x.width,height:t??l??x.height,stroke:e??f,strokeWidth:m,className:_(`lucide`,p,i),...!a&&!S(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,C.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),D=(e,t)=>{let n=(0,C.forwardRef)(({className:n,...r},i)=>(0,C.createElement)(E,{ref:i,iconNode:t,className:_(`lucide-${v(b(e))}`,`lucide-${e}`,n),...r}));return n.displayName=b(e),n},O=D(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),ee=D(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),te=D(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),ne=D(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),re=D(`award`,[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`,key:`1yiouv`}],[`circle`,{cx:`12`,cy:`8`,r:`6`,key:`1vp47v`}]]),ie=D(`ban`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]),ae=D(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),oe=D(`bell`,[[`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`}]]),k=D(`book-open`,[[`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`}]]),A=D(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),se=D(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),ce=D(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),le=D(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ue=D(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),j=D(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),M=D(`circle-alert`,[[`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`}]]),de=D(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),fe=D(`circle-x`,[[`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`}]]),pe=D(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),me=D(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),he=D(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),ge=D(`crown`,[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),_e=D(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ve=D(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ye=D(`eye`,[[`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`}]]),be=D(`file-text`,[[`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`}]]),xe=D(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Se=D(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ce=D(`hand`,[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]),we=D(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Te=D(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Ee=D(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),De=D(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Oe=D(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),N=D(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ke=D(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),Ae=D(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),je=D(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Me=D(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Ne=D(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Pe=D(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),Fe=D(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Ie=D(`message-square`,[[`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`}]]),Le=D(`milk`,[[`path`,{d:`M8 2h8`,key:`1ssgc1`}],[`path`,{d:`M9 2v2.789a4 4 0 0 1-.672 2.219l-.656.984A4 4 0 0 0 7 10.212V20a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-9.789a4 4 0 0 0-.672-2.219l-.656-.984A4 4 0 0 1 15 4.788V2`,key:`qtp12x`}],[`path`,{d:`M7 15a6.472 6.472 0 0 1 5 0 6.47 6.47 0 0 0 5 0`,key:`ygeh44`}]]),Re=D(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),ze=D(`moon`,[[`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`}]]),Be=D(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]),Ve=D(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),P=D(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),He=D(`pen`,[[`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`}]]),Ue=D(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),We=D(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Ge=D(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ke=D(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),qe=D(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Je=D(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),Ye=D(`save`,[[`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`}]]),Xe=D(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ze=D(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Qe=D(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),$e=D(`settings`,[[`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`}]]),et=D(`shield-alert`,[[`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:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),tt=D(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),nt=D(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),rt=D(`sliders-vertical`,[[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M12 21v-9`,key:`17s77i`}],[`path`,{d:`M12 8V3`,key:`13r4qs`}],[`path`,{d:`M17 16h4`,key:`h1uq16`}],[`path`,{d:`M19 12V3`,key:`o1uvq1`}],[`path`,{d:`M19 21v-5`,key:`qua636`}],[`path`,{d:`M3 14h4`,key:`bcjad9`}],[`path`,{d:`M5 10V3`,key:`cb8scm`}],[`path`,{d:`M5 21v-7`,key:`1w1uti`}]]),it=D(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),at=D(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ot=D(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),st=D(`sticker`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M10 16s.8 1 2 1c1.3 0 2-1 2-1`,key:`1vvgv3`}]]),ct=D(`sun`,[[`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`}]]),lt=D(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),F=D(`trash-2`,[[`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`}]]),ut=D(`triangle-alert`,[[`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`}]]),dt=D(`user-minus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),ft=D(`user-plus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),pt=D(`user`,[[`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`}]]),mt=D(`users-round`,[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]]),ht=D(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),gt=D(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),_t=D(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),vt=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),yt=D(`zap`,[[`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`}]]),bt=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),xt=o(((e,t)=>{t.exports=bt()})),St=c(g(),1),Ct=m(),I=xt(),wt=({message:e,type:t=`success`,duration:n=3e3,onClose:r})=>{let[i,a]=(0,C.useState)(!0);(0,C.useEffect)(()=>{let e=setTimeout(()=>{a(!1),setTimeout(r,300)},n);return()=>clearTimeout(e)},[n,r]);let o={success:(0,I.jsx)(de,{className:`w-5 h-5`}),error:(0,I.jsx)(fe,{className:`w-5 h-5`}),warning:(0,I.jsx)(M,{className:`w-5 h-5`})};return(0,I.jsxs)(`div`,{className:`fixed top-4 right-4 flex items-center gap-3 px-4 py-3 rounded-2xl border shadow-lg transition-all duration-300 ${{success:`bg-green-50/90 backdrop-blur-md border-green-200/50 text-green-800`,error:`bg-red-50/90 backdrop-blur-md border-red-200/50 text-red-800`,warning:`bg-yellow-50/90 backdrop-blur-md border-yellow-200/50 text-yellow-800`}[t]} ${i?`translate-x-0 opacity-100`:`translate-x-full opacity-0`}`,style:{minWidth:`300px`,maxWidth:`500px`,zIndex:99999},children:[(0,I.jsx)(`div`,{className:`flex-shrink-0`,children:o[t]}),(0,I.jsx)(`p`,{className:`flex-1 text-sm font-medium`,children:e}),(0,I.jsx)(`button`,{onClick:()=>{a(!1),setTimeout(r,300)},className:`flex-shrink-0 hover:opacity-70 transition-opacity`,children:(0,I.jsx)(vt,{size:18})})]})},Tt=0,Et=[],Dt=[],Ot=()=>{Et.forEach(e=>e([...Dt]))},L=(e,t=`success`,n=3e3)=>{let r=Tt++;Dt.push({id:r,message:e,type:t,duration:n}),Ot()},kt=()=>{let[e,t]=(0,C.useState)([]);(0,C.useEffect)(()=>{let e=e=>t(e);return Et.push(e),()=>{let t=Et.indexOf(e);t>-1&&Et.splice(t,1)}},[]);let n=e=>{Dt=Dt.filter(t=>t.id!==e),Ot()};return(0,Ct.createPortal)((0,I.jsx)(I.Fragment,{children:e.map((e,t)=>(0,I.jsx)(`div`,{style:{top:`${1+t*4.5}rem`,zIndex:99999},className:`fixed right-4`,children:(0,I.jsx)(wt,{message:e.message,type:e.type,duration:e.duration,onClose:()=>n(e.id)})},e.id))}),document.body)},At=({children:e})=>{let t=(0,C.useRef)(null);return t.current||=document.createElement(`div`),(0,C.useEffect)(()=>{let e=document.body,n=t.current;return e.appendChild(n),()=>{e.removeChild(n)}},[]),(0,Ct.createPortal)(e,t.current)},jt=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Mt=(e=>e?jt(e):jt),Nt=e=>e;function Pt(e,t=Nt){let n=C.useSyncExternalStore(e.subscribe,C.useCallback(()=>t(e.getState()),[e,t]),C.useCallback(()=>t(e.getInitialState()),[e,t]));return C.useDebugValue(n),n}var Ft=e=>{let t=Mt(e),n=e=>Pt(t,e);return Object.assign(n,t),n},It=(e=>e?Ft(e):Ft);function Lt(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var Rt=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return Rt(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return Rt(t)(e)}}}},zt=(e,t)=>(n,r,i)=>{let a={storage:Lt(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return Rt(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},Bt=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches,Vt=e=>e===`auto`?Bt():e===`dark`,Ht=e=>{e?document.documentElement.classList.add(`dark`):document.documentElement.classList.remove(`dark`)},Ut=It()(zt((e,t)=>({mode:`auto`,isDark:Bt(),setMode:t=>{let n=Vt(t);Ht(n),e({mode:t,isDark:n})},cycleMode:()=>{let n=t().mode,r=n===`light`?`dark`:n===`dark`?`auto`:`light`,i=Vt(r);Ht(i),e({mode:r,isDark:i})}}),{name:`llbot-theme`,partialize:e=>({mode:e.mode}),onRehydrateStorage:()=>e=>{if(e){let t=Vt(e.mode);Ht(t),e.isDark=t}}}));typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).addEventListener(`change`,e=>{Ut.getState().mode===`auto`&&(Ht(e.matches),Ut.setState({isDark:e.matches}))});var Wt=1.2,Gt=()=>{let e=(0,C.useRef)(null),t=(0,C.useRef)([]),n=(0,C.useRef)(),r=(0,C.useRef)(0),i=(0,C.useRef)(null);return(0,C.useEffect)(()=>{let a=e.current;if(!a)return;let o=a.getContext(`2d`,{alpha:!0});if(!o)return;let s=1e3/30,c=()=>i.current?i.current:{width:Math.max(window.innerWidth,document.documentElement.clientWidth),height:Math.max(window.innerHeight,document.documentElement.clientHeight)},l=()=>{let e=c();(!i.current||e.width>a.width||e.height>a.height)&&(a.width=e.width,a.height=e.height,i.current||=e,t.current.forEach(e=>{e.offscreenCanvas=d(e)}))},u=[`rgba(139, 92, 246, 0.6)`,`rgba(59, 130, 246, 0.6)`,`rgba(236, 72, 153, 0.6)`,`rgba(16, 185, 129, 0.6)`,`rgba(245, 158, 11, 0.6)`,`rgba(168, 85, 247, 0.6)`,`rgba(14, 165, 233, 0.6)`,`rgba(251, 113, 133, 0.6)`],d=e=>{let t=Math.ceil(e.baseRadius*2.5),n=document.createElement(`canvas`);n.width=t,n.height=t;let r=n.getContext(`2d`);if(!r)return n;let i=t/2,a=t/2,o=e.baseRadius,s=r.createRadialGradient(i,a,0,i,a,o);return s.addColorStop(0,e.color.replace(`0.6`,`0.8`)),s.addColorStop(.5,e.color),s.addColorStop(1,e.color.replace(`0.6`,`0`)),r.fillStyle=s,r.beginPath(),r.arc(i,a,o,0,Math.PI*2),r.fill(),n},f=()=>{let e=[];for(let t=0;t<8;t++){let t=Math.random()*80+60,n=Math.random()*a.width,r=Math.random()*a.height,i=0;for(;i<30&&e.some(e=>{let i=n-e.x,a=r-e.y,o=t+e.baseRadius;return i*i+a*a<o*o});)n=Math.random()*a.width,r=Math.random()*a.height,i++;let o={x:n,y:r,vx:(Math.random()-.5)*.8,vy:(Math.random()-.5)*.8,radius:t,baseRadius:t,scale:1,scaleSpeed:Math.random()*.002+.001,color:u[Math.floor(Math.random()*u.length)]};o.offscreenCanvas=d(o),e.push(o)}t.current=e},p=(e,t)=>{let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),a=e.radius+t.radius;if(i>=a)return;if(i<1e-4){let e=Math.random()*Math.PI*2;n=Math.cos(e)*1e-4,r=Math.sin(e)*1e-4,i=1e-4}let o=n/i,s=r/i,c=(a-i)*.5;e.x-=o*c,e.y-=s*c,t.x+=o*c,t.y+=s*c;let l=t.vx-e.vx,u=t.vy-e.vy,d=l*o+u*s;if(d>0)return;let f=-1.9*d/2,p=f*o,m=f*s;e.vx-=p,e.vy-=m,t.vx+=p,t.vy+=m},m=e=>{n.current=requestAnimationFrame(m);let i=e-r.current;i<s||(r.current=e-i%s,o.clearRect(0,0,a.width,a.height),t.current.forEach((e,n)=>{e.x+=e.vx,e.y+=e.vy;let r=Math.sqrt(e.vx*e.vx+e.vy*e.vy);if(r>Wt){let t=Wt/r;e.vx*=t,e.vy*=t}e.scale+=e.scaleSpeed,(e.scale>1.2||e.scale<.8)&&(e.scaleSpeed=-e.scaleSpeed),e.radius=e.baseRadius*e.scale,(e.x-e.radius<0||e.x+e.radius>a.width)&&(e.vx=-e.vx,e.x=Math.max(e.radius,Math.min(a.width-e.radius,e.x))),(e.y-e.radius<0||e.y+e.radius>a.height)&&(e.vy=-e.vy,e.y=Math.max(e.radius,Math.min(a.height-e.radius,e.y)));for(let r=n+1;r<t.current.length;r++)p(e,t.current[r]);if(e.offscreenCanvas){let t=e.offscreenCanvas.width*e.scale;o.drawImage(e.offscreenCanvas,e.x-t/2,e.y-t/2,t,t)}}))},h=null,g=()=>{h&&clearTimeout(h),h=setTimeout(l,200)};return l(),window.addEventListener(`resize`,g),f(),n.current=requestAnimationFrame(m),()=>{window.removeEventListener(`resize`,g),h&&clearTimeout(h),n.current&&cancelAnimationFrame(n.current)}},[]),(0,I.jsx)(`canvas`,{ref:e,className:`fixed inset-0 w-full h-full pointer-events-none`,style:{zIndex:0}})},Kt=It()(zt(e=>({autoHideSidebarInWebQQ:!1,showWebQQFullscreenButton:!0,setAutoHideSidebarInWebQQ:t=>e({autoHideSidebarInWebQQ:t}),setShowWebQQFullscreenButton:t=>e({showWebQQFullscreenButton:t})}),{name:`llbot-settings`})),qt=({visible:e,onClose:t})=>{let{mode:n,setMode:r}=Ut(),{autoHideSidebarInWebQQ:i,setAutoHideSidebarInWebQQ:a,showWebQQFullscreenButton:o,setShowWebQQFullscreenButton:s}=Kt();return e?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-[9999] flex items-center justify-center`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:t}),(0,I.jsxs)(`div`,{className:`relative bg-theme-card rounded-2xl shadow-2xl w-full max-w-md mx-4 overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-6 border-b border-theme-divider`,children:[(0,I.jsx)(`h2`,{className:`text-xl font-semibold text-theme`,children:`设置`}),(0,I.jsx)(`button`,{onClick:t,className:`p-2 text-theme-muted hover:text-theme hover:bg-theme-item rounded-lg transition-colors`,children:(0,I.jsx)(vt,{size:20})})]}),(0,I.jsxs)(`div`,{className:`p-6 space-y-6`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-3`,children:`主题模式`}),(0,I.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:[{value:`light`,label:`亮色`,icon:ct},{value:`dark`,label:`暗色`,icon:ze},{value:`auto`,label:`跟随系统`,icon:Re}].map(e=>{let t=e.icon,i=n===e.value;return(0,I.jsxs)(`button`,{onClick:()=>r(e.value),className:`
|
|
9
|
+
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,kt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!I.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[gt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=A.d;A.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?Ts(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),St(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=xt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);St(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=xt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),St(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=xt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),St(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=pe.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=xt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=xt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=xt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+zt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),St(t),e.head.appendChild(t))}function Pf(e){return`[src="`+zt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,St(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),St(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[gt]||a[F]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){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=$e(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$e(0),this.hiddenUpdates=$e(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=oi(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function tp(e){return e?(e=ii,e):ii}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(hu(n,e,t),Ha(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ti(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=at(t);var n=ti(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=2,up(e,t,n,r)}finally{A.p=a,k.T=i}}function lp(e,t,n,r){var i=k.T;k.T=null;var a=A.p;try{A.p=8,up(e,t,n,r)}finally{A.p=a,k.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Je(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-P(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Ae()+500,id(0,!1))}}break;case 31:case 13:s=ti(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=nn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=vt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(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(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=yt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=vt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ct(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ct(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=yt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,Cs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ut]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[dt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=st();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));A.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:k,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ze=zp.inject(Rp),Be=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Ks,s=qs,c=Js;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[dt]=t.current,Sd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),v=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),y=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),b=e=>{let t=y(e);return t.charAt(0).toUpperCase()+t.slice(1)},x={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`},S=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},C=c(u(),1),w=(0,C.createContext)({}),T=()=>(0,C.useContext)(w),E=(0,C.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=T()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,C.createElement)(`svg`,{ref:c,...x,width:t??l??x.width,height:t??l??x.height,stroke:e??f,strokeWidth:m,className:_(`lucide`,p,i),...!a&&!S(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,C.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),D=(e,t)=>{let n=(0,C.forwardRef)(({className:n,...r},i)=>(0,C.createElement)(E,{ref:i,iconNode:t,className:_(`lucide-${v(b(e))}`,`lucide-${e}`,n),...r}));return n.displayName=b(e),n},O=D(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),ee=D(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),te=D(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),ne=D(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),re=D(`award`,[[`path`,{d:`m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526`,key:`1yiouv`}],[`circle`,{cx:`12`,cy:`8`,r:`6`,key:`1vp47v`}]]),ie=D(`ban`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]),ae=D(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),oe=D(`bell`,[[`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`}]]),k=D(`book-open`,[[`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`}]]),A=D(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),se=D(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),ce=D(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),le=D(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ue=D(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),j=D(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),M=D(`circle-alert`,[[`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`}]]),de=D(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),fe=D(`circle-x`,[[`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`}]]),pe=D(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),me=D(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),he=D(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),ge=D(`crown`,[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),_e=D(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ve=D(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ye=D(`eye`,[[`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`}]]),be=D(`file-text`,[[`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`}]]),xe=D(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Se=D(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ce=D(`hand`,[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]),we=D(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Te=D(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Ee=D(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),De=D(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Oe=D(`layout-list`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}],[`path`,{d:`M14 4h7`,key:`3xa0d5`}],[`path`,{d:`M14 9h7`,key:`1icrd9`}],[`path`,{d:`M14 15h7`,key:`1mj8o2`}],[`path`,{d:`M14 20h7`,key:`11slyb`}]]),N=D(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ke=D(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),Ae=D(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),je=D(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Me=D(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Ne=D(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),Pe=D(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),Fe=D(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),Ie=D(`message-square`,[[`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`}]]),Le=D(`milk`,[[`path`,{d:`M8 2h8`,key:`1ssgc1`}],[`path`,{d:`M9 2v2.789a4 4 0 0 1-.672 2.219l-.656.984A4 4 0 0 0 7 10.212V20a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-9.789a4 4 0 0 0-.672-2.219l-.656-.984A4 4 0 0 1 15 4.788V2`,key:`qtp12x`}],[`path`,{d:`M7 15a6.472 6.472 0 0 1 5 0 6.47 6.47 0 0 0 5 0`,key:`ygeh44`}]]),Re=D(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),ze=D(`moon`,[[`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`}]]),Be=D(`music`,[[`path`,{d:`M9 18V5l12-2v13`,key:`1jmyc2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}]]),Ve=D(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),P=D(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),He=D(`pen`,[[`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`}]]),Ue=D(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),We=D(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Ge=D(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ke=D(`radio`,[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),qe=D(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Je=D(`reply`,[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]),Ye=D(`save`,[[`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`}]]),Xe=D(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ze=D(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Qe=D(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),$e=D(`settings`,[[`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`}]]),et=D(`shield-alert`,[[`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:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),tt=D(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),nt=D(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),rt=D(`sliders-vertical`,[[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M12 21v-9`,key:`17s77i`}],[`path`,{d:`M12 8V3`,key:`13r4qs`}],[`path`,{d:`M17 16h4`,key:`h1uq16`}],[`path`,{d:`M19 12V3`,key:`o1uvq1`}],[`path`,{d:`M19 21v-5`,key:`qua636`}],[`path`,{d:`M3 14h4`,key:`bcjad9`}],[`path`,{d:`M5 10V3`,key:`cb8scm`}],[`path`,{d:`M5 21v-7`,key:`1w1uti`}]]),it=D(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),at=D(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ot=D(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),st=D(`sticker`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M10 16s.8 1 2 1c1.3 0 2-1 2-1`,key:`1vvgv3`}]]),ct=D(`sun`,[[`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`}]]),lt=D(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),F=D(`trash-2`,[[`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`}]]),ut=D(`triangle-alert`,[[`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`}]]),dt=D(`user-minus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),ft=D(`user-plus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),pt=D(`user`,[[`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`}]]),mt=D(`users-round`,[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]]),ht=D(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),gt=D(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),_t=D(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),vt=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),yt=D(`zap`,[[`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`}]]),bt=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),xt=o(((e,t)=>{t.exports=bt()})),St=c(g(),1),Ct=m(),I=xt(),wt=({message:e,type:t=`success`,duration:n=3e3,onClose:r})=>{let[i,a]=(0,C.useState)(!0);(0,C.useEffect)(()=>{let e=setTimeout(()=>{a(!1),setTimeout(r,300)},n);return()=>clearTimeout(e)},[n,r]);let o={success:(0,I.jsx)(de,{className:`w-5 h-5`}),error:(0,I.jsx)(fe,{className:`w-5 h-5`}),warning:(0,I.jsx)(M,{className:`w-5 h-5`})};return(0,I.jsxs)(`div`,{className:`fixed top-4 right-4 flex items-center gap-3 px-4 py-3 rounded-2xl border shadow-lg transition-all duration-300 ${{success:`bg-green-50/90 backdrop-blur-md border-green-200/50 text-green-800`,error:`bg-red-50/90 backdrop-blur-md border-red-200/50 text-red-800`,warning:`bg-yellow-50/90 backdrop-blur-md border-yellow-200/50 text-yellow-800`}[t]} ${i?`translate-x-0 opacity-100`:`translate-x-full opacity-0`}`,style:{minWidth:`300px`,maxWidth:`500px`,zIndex:99999},children:[(0,I.jsx)(`div`,{className:`flex-shrink-0`,children:o[t]}),(0,I.jsx)(`p`,{className:`flex-1 text-sm font-medium`,children:e}),(0,I.jsx)(`button`,{onClick:()=>{a(!1),setTimeout(r,300)},className:`flex-shrink-0 hover:opacity-70 transition-opacity`,children:(0,I.jsx)(vt,{size:18})})]})},Tt=0,Et=[],Dt=[],Ot=()=>{Et.forEach(e=>e([...Dt]))},L=(e,t=`success`,n=3e3)=>{let r=Tt++;Dt.push({id:r,message:e,type:t,duration:n}),Ot()},kt=()=>{let[e,t]=(0,C.useState)([]);(0,C.useEffect)(()=>{let e=e=>t(e);return Et.push(e),()=>{let t=Et.indexOf(e);t>-1&&Et.splice(t,1)}},[]);let n=e=>{Dt=Dt.filter(t=>t.id!==e),Ot()};return(0,Ct.createPortal)((0,I.jsx)(I.Fragment,{children:e.map((e,t)=>(0,I.jsx)(`div`,{style:{top:`${1+t*4.5}rem`,zIndex:99999},className:`fixed right-4`,children:(0,I.jsx)(wt,{message:e.message,type:e.type,duration:e.duration,onClose:()=>n(e.id)})},e.id))}),document.body)},At=({children:e})=>{let t=(0,C.useRef)(null);return t.current||=document.createElement(`div`),(0,C.useEffect)(()=>{let e=document.body,n=t.current;return e.appendChild(n),()=>{e.removeChild(n)}},[]),(0,Ct.createPortal)(e,t.current)},jt=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Mt=(e=>e?jt(e):jt),Nt=e=>e;function Pt(e,t=Nt){let n=C.useSyncExternalStore(e.subscribe,C.useCallback(()=>t(e.getState()),[e,t]),C.useCallback(()=>t(e.getInitialState()),[e,t]));return C.useDebugValue(n),n}var Ft=e=>{let t=Mt(e),n=e=>Pt(t,e);return Object.assign(n,t),n},It=(e=>e?Ft(e):Ft);function Lt(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var Rt=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return Rt(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return Rt(t)(e)}}}},zt=(e,t)=>(n,r,i)=>{let a={storage:Lt(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return Rt(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},Bt=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches,Vt=e=>e===`auto`?Bt():e===`dark`,Ht=e=>{e?document.documentElement.classList.add(`dark`):document.documentElement.classList.remove(`dark`)},Ut=It()(zt((e,t)=>({mode:`auto`,isDark:Bt(),setMode:t=>{let n=Vt(t);Ht(n),e({mode:t,isDark:n})},cycleMode:()=>{let n=t().mode,r=n===`light`?`dark`:n===`dark`?`auto`:`light`,i=Vt(r);Ht(i),e({mode:r,isDark:i})}}),{name:`llbot-theme`,partialize:e=>({mode:e.mode}),onRehydrateStorage:()=>e=>{if(e){let t=Vt(e.mode);Ht(t),e.isDark=t}}}));typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).addEventListener(`change`,e=>{Ut.getState().mode===`auto`&&(Ht(e.matches),Ut.setState({isDark:e.matches}))});var Wt=1.2,Gt=()=>{let e=(0,C.useRef)(null),t=(0,C.useRef)([]),n=(0,C.useRef)(),r=(0,C.useRef)(0),i=(0,C.useRef)(null);return(0,C.useEffect)(()=>{let a=e.current;if(!a)return;let o=a.getContext(`2d`,{alpha:!0});if(!o)return;let s=1e3/30,c=()=>i.current?i.current:{width:Math.max(window.innerWidth,document.documentElement.clientWidth),height:Math.max(window.innerHeight,document.documentElement.clientHeight)},l=()=>{let e=c();(!i.current||e.width>a.width||e.height>a.height)&&(a.width=e.width,a.height=e.height,i.current||=e,t.current.forEach(e=>{e.offscreenCanvas=d(e)}))},u=[`rgba(139, 92, 246, 0.6)`,`rgba(59, 130, 246, 0.6)`,`rgba(236, 72, 153, 0.6)`,`rgba(16, 185, 129, 0.6)`,`rgba(245, 158, 11, 0.6)`,`rgba(168, 85, 247, 0.6)`,`rgba(14, 165, 233, 0.6)`,`rgba(251, 113, 133, 0.6)`],d=e=>{let t=Math.ceil(e.baseRadius*2.5),n=document.createElement(`canvas`);n.width=t,n.height=t;let r=n.getContext(`2d`);if(!r)return n;let i=t/2,a=t/2,o=e.baseRadius,s=r.createRadialGradient(i,a,0,i,a,o);return s.addColorStop(0,e.color.replace(`0.6`,`0.8`)),s.addColorStop(.5,e.color),s.addColorStop(1,e.color.replace(`0.6`,`0`)),r.fillStyle=s,r.beginPath(),r.arc(i,a,o,0,Math.PI*2),r.fill(),n},f=()=>{let e=[];for(let t=0;t<8;t++){let t=Math.random()*80+60,n=Math.random()*a.width,r=Math.random()*a.height,i=0;for(;i<30&&e.some(e=>{let i=n-e.x,a=r-e.y,o=t+e.baseRadius;return i*i+a*a<o*o});)n=Math.random()*a.width,r=Math.random()*a.height,i++;let o={x:n,y:r,vx:(Math.random()-.5)*.8,vy:(Math.random()-.5)*.8,radius:t,baseRadius:t,scale:1,scaleSpeed:Math.random()*.002+.001,color:u[Math.floor(Math.random()*u.length)]};o.offscreenCanvas=d(o),e.push(o)}t.current=e},p=(e,t)=>{let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),a=e.radius+t.radius;if(i>=a)return;if(i<1e-4){let e=Math.random()*Math.PI*2;n=Math.cos(e)*1e-4,r=Math.sin(e)*1e-4,i=1e-4}let o=n/i,s=r/i,c=(a-i)*.5;e.x-=o*c,e.y-=s*c,t.x+=o*c,t.y+=s*c;let l=t.vx-e.vx,u=t.vy-e.vy,d=l*o+u*s;if(d>0)return;let f=-1.9*d/2,p=f*o,m=f*s;e.vx-=p,e.vy-=m,t.vx+=p,t.vy+=m},m=e=>{n.current=requestAnimationFrame(m);let i=e-r.current;i<s||(r.current=e-i%s,o.clearRect(0,0,a.width,a.height),t.current.forEach((e,n)=>{e.x+=e.vx,e.y+=e.vy;let r=Math.sqrt(e.vx*e.vx+e.vy*e.vy);if(r>Wt){let t=Wt/r;e.vx*=t,e.vy*=t}e.scale+=e.scaleSpeed,(e.scale>1.2||e.scale<.8)&&(e.scaleSpeed=-e.scaleSpeed),e.radius=e.baseRadius*e.scale,(e.x-e.radius<0||e.x+e.radius>a.width)&&(e.vx=-e.vx,e.x=Math.max(e.radius,Math.min(a.width-e.radius,e.x))),(e.y-e.radius<0||e.y+e.radius>a.height)&&(e.vy=-e.vy,e.y=Math.max(e.radius,Math.min(a.height-e.radius,e.y)));for(let r=n+1;r<t.current.length;r++)p(e,t.current[r]);if(e.offscreenCanvas){let t=e.offscreenCanvas.width*e.scale;o.drawImage(e.offscreenCanvas,e.x-t/2,e.y-t/2,t,t)}}))},h=null,g=()=>{h&&clearTimeout(h),h=setTimeout(l,200)};return l(),window.addEventListener(`resize`,g),f(),n.current=requestAnimationFrame(m),()=>{window.removeEventListener(`resize`,g),h&&clearTimeout(h),n.current&&cancelAnimationFrame(n.current)}},[]),(0,I.jsx)(`canvas`,{ref:e,className:`fixed inset-0 w-full h-full pointer-events-none`,style:{zIndex:0}})},Kt=It()(zt(e=>({autoHideSidebarInWebQQ:!1,showWebQQFullscreenButton:!0,setAutoHideSidebarInWebQQ:t=>e({autoHideSidebarInWebQQ:t}),setShowWebQQFullscreenButton:t=>e({showWebQQFullscreenButton:t})}),{name:`llbot-settings`})),qt=({visible:e,onClose:t})=>{let{mode:n,setMode:r}=Ut(),{autoHideSidebarInWebQQ:i,setAutoHideSidebarInWebQQ:a,showWebQQFullscreenButton:o,setShowWebQQFullscreenButton:s}=Kt();return e?(0,I.jsxs)(`div`,{className:`fixed inset-0 z-[9999] flex items-center justify-center`,children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:t}),(0,I.jsxs)(`div`,{className:`relative bg-theme-card rounded-2xl shadow-2xl w-full max-w-md mx-4 overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-6 border-b border-theme-divider`,children:[(0,I.jsx)(`h2`,{className:`text-xl font-semibold text-theme`,children:`设置`}),(0,I.jsx)(`button`,{onClick:t,className:`p-2 text-theme-muted hover:text-theme hover:bg-theme-item rounded-lg transition-colors`,children:(0,I.jsx)(vt,{size:20})})]}),(0,I.jsxs)(`div`,{className:`p-6 space-y-6`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-3`,children:`主题模式`}),(0,I.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:[{value:`light`,label:`亮色`,icon:ct},{value:`dark`,label:`暗色`,icon:ze},{value:`auto`,label:`跟随系统`,icon:Re}].map(e=>{let t=e.icon,i=n===e.value;return(0,I.jsxs)(`button`,{onClick:()=>r(e.value),className:`
|
|
10
10
|
flex flex-col items-center gap-2 p-4 rounded-xl border-2 transition-all
|
|
11
11
|
${i?`border-pink-500 bg-pink-50 dark:bg-pink-900/20`:`border-theme-divider hover:border-theme-muted hover:bg-theme-item`}
|
|
12
12
|
`,children:[(0,I.jsx)(t,{size:24,className:i?`text-pink-500`:`text-theme-muted`}),(0,I.jsx)(`span`,{className:`text-sm font-medium ${i?`text-pink-500`:`text-theme`}`,children:e.label})]},e.value)})})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-3`,children:`WebQQ 设置`}),(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[i?(0,I.jsx)(ve,{size:20,className:`text-theme-muted`}):(0,I.jsx)(ye,{size:20,className:`text-theme-muted`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`进入 WebQQ 自动隐藏侧边栏`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`启用后进入 WebQQ 页面时自动收起侧边栏`})]})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked),className:`switch-toggle`})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(ye,{size:20,className:`text-theme-muted`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`显示全屏按钮`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`在 WebQQ 页面显示全屏按钮`})]})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked),className:`switch-toggle`})]})]})]})]}),(0,I.jsx)(`div`,{className:`flex justify-end gap-3 p-6 border-t border-theme-divider`,children:(0,I.jsx)(`button`,{onClick:t,className:`px-6 py-2.5 bg-theme-item hover:bg-theme-item-hover text-theme rounded-xl transition-colors font-medium`,children:`关闭`})})]})]}):null};function Jt(e){let t=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],n=new TextEncoder().encode(e),r=n.length*8,i=Math.ceil((r+65)/512)*64,a=new Uint8Array(i);a.set(n),a[n.length]=128;let o=new DataView(a.buffer);o.setUint32(i-4,r&4294967295,!1);let s=1779033703,c=3144134277,l=1013904242,u=2773480762,d=1359893119,f=2600822924,p=528734635,m=1541459225;for(let e=0;e<i;e+=64){let n=new Uint32Array(64);for(let t=0;t<16;t++)n[t]=o.getUint32(e+t*4,!1);for(let e=16;e<64;e++){let t=(n[e-15]>>>7|n[e-15]<<25)^(n[e-15]>>>18|n[e-15]<<14)^n[e-15]>>>3,r=(n[e-2]>>>17|n[e-2]<<15)^(n[e-2]>>>19|n[e-2]<<13)^n[e-2]>>>10;n[e]=n[e-16]+t+n[e-7]+r>>>0}let r=s,i=c,a=l,h=u,g=d,_=f,v=p,y=m;for(let e=0;e<64;e++){let o=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7),s=g&_^~g&v,c=y+o+s+t[e]+n[e]>>>0,l=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&a^i&a)>>>0;y=v,v=_,_=g,g=h+c>>>0,h=a,a=i,i=r,r=c+l>>>0}s=s+r>>>0,c=c+i>>>0,l=l+a>>>0,u=u+h>>>0,d=d+g>>>0,f=f+_>>>0,p=p+v>>>0,m=m+y>>>0}return[s.toString(16).padStart(8,`0`),c.toString(16).padStart(8,`0`),l.toString(16).padStart(8,`0`),u.toString(16).padStart(8,`0`),d.toString(16).padStart(8,`0`),f.toString(16).padStart(8,`0`),p.toString(16).padStart(8,`0`),m.toString(16).padStart(8,`0`)].join(``)}async function Yt(e){try{return Jt(e)}catch(t){if(console.error(`[PasswordHash] 纯JS SHA-256实现失败:`,t),typeof crypto<`u`&&crypto.subtle)try{let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}catch(e){console.error(`[PasswordHash] Web Crypto API失败:`,e)}throw Error(`无法计算SHA-256哈希`)}}async function Xt(e){return await Yt(e)}function Zt(e,t,n=30){let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let i=`expires=${r.toUTCString()}`,a=window.location.protocol===`https:`?`; Secure`:``,o=window.location.hostname,s=`${e}=${t}; ${i}; path=/${/^\d+\.\d+\.\d+\.\d+$/.test(o)?``:`; SameSite=Lax`}${a}`;document.cookie=s}function Qt(e){let t=e+`=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return console.log(`[Cookie] 未找到Cookie:`,{name:e,allCookies:document.cookie}),null}var $t=`webui_token`,en=30,tn=null;function nn(e){tn=e}function rn(){return Qt($t)}function an(e){Zt($t,e,en)}async function R(e,t={}){let n=async n=>{let r={...t.headers};return n&&(r[`x-webui-token`]=n),fetch(e,{...t,headers:r})};try{let e=await n(rn());if(e.status===401&&tn){console.log(`401 - Password not set, prompting to set password...`);let t=await tn(`请设置密码`);if(!t||!t.trim())throw Error(`密码不能为空`);if(!(await fetch(`/api/set-token`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:t.trim()})})).ok)throw Error(`设置密码失败`);let r=await Xt(t.trim());an(r),e=await n(r)}if(e.status===403&&tn){console.log(`403 - Token verification failed, prompting for password...`);let t=null;try{t=await e.clone().json()}catch{}t?.locked&&L(t.message||`账户已被锁定`,`error`);let r=0;for(;e.status===403&&r<5;)try{let i=await tn(r>0?`密码错误,请重新输入`:`请输入密码`);if(!i||!i.trim())throw Error(`密码不能为空`);let a=await Xt(i.trim());if(an(a),e=await n(a),e.status===200){console.log(`Authentication successful!`);break}try{if(t=await e.clone().json(),t?.locked)throw Error(t.message||`账户已被锁定`)}catch{}r++}catch(e){throw console.error(`Password prompt error:`,e),e}if(e.status===403)throw Error(t?.message||`认证失败`)}if(!e.ok){let t=`HTTP error! status: ${e.status}`;try{t=(await e.json()).message||t}catch{}throw Error(t)}return await e.json()}catch(e){throw console.error(`API fetch error:`,e),e}}var on=null,sn=!1,cn=({value:e,onChange:t})=>{let[n,r]=(0,C.useState)(on||[]),[i,a]=(0,C.useState)(sn),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(``),f=(0,C.useRef)(null);(0,C.useEffect)(()=>{on?i&&e!==``&&t(``):R(`/api/network-interfaces`).then(n=>{n.success&&(on=n.data,sn=!!n.isDocker,r(n.data),a(sn),sn&&e!==``&&t(``))})},[]),(0,C.useEffect)(()=>{let e=e=>{f.current&&!f.current.contains(e.target)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,C.useEffect)(()=>{e===``||e===`127.0.0.1`||n.includes(e)?(l(!1),d(``)):e&&(l(!0),d(e))},[e,n]);let p=[{value:``,label:`全部 (0.0.0.0 和 ::)`},{value:`127.0.0.1`,label:`仅本地 (127.0.0.1)`},...n.map(e=>({value:e,label:e}))],m=()=>c?`自定义: ${u}`:p.find(t=>t.value===e)?.label||`仅本地 (127.0.0.1)`,h=e=>{l(!1),d(``),s(!1),t(e.value)},g=()=>{l(!0),s(!1),u||d(e||``)},_=e=>{d(e),t(e)};return i?(0,I.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,I.jsx)(`div`,{className:`input-field w-full text-left opacity-70 cursor-not-allowed`,children:`全部 (0.0.0.0 和 ::)`})}):(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(`div`,{className:`relative flex-1 z-[9999]`,ref:f,children:[(0,I.jsxs)(`button`,{type:`button`,onClick:()=>s(!o),className:`input-field w-full pr-8 text-left flex items-center justify-between cursor-pointer`,children:[(0,I.jsx)(`span`,{className:`truncate`,children:m()}),(0,I.jsx)(le,{size:16,className:`text-theme-hint transition-transform ${o?`rotate-180`:``}`})]}),o&&(0,I.jsx)(`div`,{className:`absolute z-[9999] mt-1 w-full bg-white dark:bg-neutral-800 border border-theme-divider rounded-xl shadow-lg overflow-hidden`,children:(0,I.jsxs)(`div`,{className:`max-h-60 overflow-y-auto`,children:[p.map((t,n)=>(0,I.jsxs)(`div`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),h(t)},className:`px-3 py-2.5 cursor-pointer flex items-center justify-between hover:bg-pink-50 dark:hover:bg-pink-900/30 transition-colors ${!c&&e===t.value?`bg-pink-50 dark:bg-pink-900/30 text-pink-600`:`text-theme`}`,children:[(0,I.jsx)(`span`,{children:t.label}),!c&&e===t.value&&(0,I.jsx)(ce,{size:16,className:`text-pink-500`})]},`${t.value}-${n}`)),(0,I.jsxs)(`div`,{onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),g()},className:`px-3 py-2.5 cursor-pointer flex items-center justify-between hover:bg-pink-50 dark:hover:bg-pink-900/30 transition-colors border-t border-theme-divider ${c?`bg-pink-50 dark:bg-pink-900/30 text-pink-600`:`text-theme`}`,children:[(0,I.jsx)(`span`,{children:`自定义`}),c&&(0,I.jsx)(ce,{size:16,className:`text-pink-500`})]})]})})]}),c&&(0,I.jsx)(`input`,{type:`text`,value:u,onChange:e=>_(e.target.value),placeholder:`输入地址`,className:`input-field flex-1`,autoFocus:!0})]})},ln=({value:e,onChange:t,maxDays:n=1,showSeconds:r=!0})=>{let[i,a]=(0,C.useState)(0),[o,s]=(0,C.useState)(0),[c,l]=(0,C.useState)(0),[u,d]=(0,C.useState)(0);(0,C.useEffect)(()=>{let t=e||0,n=Math.floor(t/86400);t%=86400;let r=Math.floor(t/3600);t%=3600;let i=Math.floor(t/60),o=t%60;d(n),l(r),s(i),a(o)},[e]);let f=(e,n,r,i)=>{t(i+r*60+n*3600+e*86400)},p=e=>{let t=Math.min(n,Math.max(0,e));d(t),f(t,c,o,i)},m=e=>{let t=Math.min(23,Math.max(0,e));l(t),f(u,t,o,i)},h=e=>{let t=Math.min(59,Math.max(0,e));s(t),f(u,c,t,i)},g=e=>{let t=Math.min(59,Math.max(0,e));a(t),f(u,c,o,t)},_=r?4:3,v=`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none`;return(0,I.jsxs)(`div`,{className:`grid gap-2`,style:{gridTemplateColumns:`repeat(${_}, 1fr)`},children:[n>0&&(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:n,value:u,onChange:e=>p(parseInt(e.target.value)||0),className:v}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`天`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:23,value:c,onChange:e=>m(parseInt(e.target.value)||0),className:v}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`小时`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:59,value:o,onChange:e=>h(parseInt(e.target.value)||0),className:v}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`分钟`})]}),r&&(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:59,value:i,onChange:e=>g(parseInt(e.target.value)||0),className:v}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`秒`})]})]})},un=({activeTab:e,onTabChange:t,accountInfo:n,isOpen:r=!0,onClose:i,collapsed:a=!1,onToggleCollapse:o,onOpenSettings:s})=>{let c=[{id:`dashboard`,icon:De,label:`Dashboard`},{id:`onebot`,icon:Ke,label:`OneBot 11`},{id:`satori`,icon:he,label:`Satori`},{id:`milky`,icon:Le,label:`Milky`},{id:`logs`,icon:lt,label:`日志`},{id:`other`,icon:rt,label:`其他配置`},{id:`webqq`,icon:Ie,label:`WebQQ`},{id:`about`,icon:Ee,label:`关于`}],l=e=>{t(e),i&&window.innerWidth<768&&i()};return(0,I.jsxs)(I.Fragment,{children:[r&&(0,I.jsx)(`div`,{className:`fixed inset-0 bg-black/50 z-40 md:hidden`,onClick:i}),(0,I.jsxs)(`div`,{className:`
|
|
@@ -20,7 +20,7 @@ Error generating stack: `+e.message+`
|
|
|
20
20
|
disabled:opacity-50 disabled:cursor-not-allowed`,children:r?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(ke,{className:`animate-spin`,size:16}),`发送中...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ze,{size:16}),`发送测试邮件`]})})})]})]})},jn=({config:e,emailConfig:t,onChange:n,onEmailChange:r,onOpenChangePassword:i})=>{let a=(t,r)=>{n({...e,[t]:r})};return(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`card p-6 relative z-[100]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 aspect-square flex-shrink-0 rounded-xl bg-gradient-to-br from-blue-500 to-indigo-600 flex items-center justify-center`,children:(0,I.jsx)(Qe,{size:20,className:`text-white`})}),(0,I.jsxs)(`div`,{className:`min-w-0`,children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`WebUI 服务`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`WebUI 访问地址和端口配置,如果是 Docker 不建议更改此项,否则可能无法访问`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`label`,{className:`block`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(Se,{size:16,className:`text-blue-600`}),(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme-secondary`,children:`监听地址`})]}),(0,I.jsx)(cn,{value:e.webui?.host??`127.0.0.1`,onChange:t=>{n({...e,webui:{enable:e.webui?.enable??!0,port:e.webui?.port||6099,host:t}})}}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-2`,children:`选择 WebUI 监听的网络地址`})]}),(0,I.jsxs)(`label`,{className:`block`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(Qe,{size:16,className:`text-blue-600`}),(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme-secondary`,children:`端口`})]}),(0,I.jsx)(`input`,{type:`number`,value:e.webui?.port||6099,onChange:t=>n({...e,webui:{enable:e.webui?.enable??!0,host:e.webui?.host||`127.0.0.1`,port:parseInt(t.target.value)}}),min:`1`,max:`65535`,className:`input-field`,placeholder:`6099`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`WebUI 服务端口(1-65535)`})]})]})]}),(0,I.jsx)(An,{value:t||{enabled:!1,smtp:{host:``,port:587,secure:!1,auth:{user:``,pass:``}},from:``,to:``},onChange:e=>{r({...e,smtp:{...e.smtp,port:e.smtp.port||587}})}}),(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-xl gradient-primary-br flex items-center justify-center`,children:(0,I.jsx)(Se,{size:20,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`系统功能`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`基础功能开关配置`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl bg-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(be,{size:20,className:`text-green-600`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`日志记录`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`启用后记录详细的运行日志`})]})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:e.log,onChange:e=>a(`log`,e.target.checked),className:`switch-toggle`})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl bg-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(Ve,{size:20,className:`text-pink-500`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`本地文件转URL`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`启用后可将本地文件转换为URL链接`})]})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:e.enableLocalFile2Url,onChange:e=>a(`enableLocalFile2Url`,e.target.checked),className:`switch-toggle`})]})]})]}),(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-gradient-to-br from-orange-500 to-red-600 flex items-center justify-center`,children:(0,I.jsx)(F,{size:20,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`文件管理`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`自动清理文件相关配置`})]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl bg-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(F,{size:20,className:`text-red-600`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`自动删除收到的文件`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`启用后将自动清理接收的临时文件`})]})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:e.autoDeleteFile,onChange:e=>a(`autoDeleteFile`,e.target.checked),className:`switch-toggle`})]}),e.autoDeleteFile&&(0,I.jsx)(`div`,{className:`pl-4`,children:(0,I.jsxs)(`label`,{className:`block`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(pe,{size:16,className:`text-theme-secondary`}),(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme-secondary`,children:`自动删除时间(秒)`})]}),(0,I.jsx)(`input`,{type:`number`,value:e.autoDeleteFileSecond,onChange:e=>a(`autoDeleteFileSecond`,parseInt(e.target.value)),min:`1`,max:`3600`,className:`input-field`,placeholder:`60`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`文件接收后多少秒自动删除(1-3600秒)`})]})})]})]}),(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-gradient-to-br from-pink-400 to-rose-500 flex items-center justify-center`,children:(0,I.jsx)(pe,{size:20,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`缓存设置`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`消息缓存相关配置`})]})]}),(0,I.jsxs)(`label`,{className:`block`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(pe,{size:16,className:`text-pink-500`}),(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme-secondary`,children:`消息缓存过期时间`})]}),(0,I.jsx)(ln,{value:e.msgCacheExpire||120,onChange:e=>a(`msgCacheExpire`,e),maxDays:1,showSeconds:!1}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-2`,children:`消息在缓存中保留的时间,最长1天`})]})]}),(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-gradient-to-br from-green-500 to-teal-600 flex items-center justify-center`,children:(0,I.jsx)(Be,{size:20,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`扩展功能`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`第三方服务配置`})]})]}),(0,I.jsxs)(`label`,{className:`block`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(Be,{size:16,className:`text-green-600`}),(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme-secondary`,children:`音乐签名地址`})]}),(0,I.jsx)(`input`,{type:`text`,value:e.musicSignUrl,onChange:e=>a(`musicSignUrl`,e.target.value),placeholder:`https://example.com/sign`,className:`input-field`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`用于音乐卡片签名的服务地址`})]})]}),(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-gradient-to-br from-red-500 to-pink-600 flex items-center justify-center`,children:(0,I.jsx)(nt,{size:20,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`安全设置`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`WebUI 访问控制`})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl bg-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(Ae,{size:20,className:`text-red-600`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`WebUI 访问密码`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`用于保护 WebUI 访问的密码`})]})]}),(0,I.jsxs)(`button`,{onClick:i,className:`px-3 py-1.5 md:px-4 md:py-2 gradient-primary text-white rounded-lg text-xs md:text-sm font-medium hover:shadow-lg transition-all flex items-center gap-1.5 md:gap-2`,children:[(0,I.jsx)(at,{size:14,className:`md:w-4 md:h-4`}),`修改密码`]})]})]})]})};function Mn(e,t){let n=e.trim();return n?t!==void 0&&n.length<t?{isValid:!1,error:`密码长度不能少于${t}位`}:/[\r\n]/.test(n)?{isValid:!1,error:`密码不能包含换行符!`}:/[^\x20-\x7E\t]/.test(n)?{isValid:!1,error:`密码不能包含中文等特殊字符!`}:/[\x00-\x08\x0A-\x1F\x7F]/.test(n)?{isValid:!1,error:`密码包含不可见的控制字符!`}:{isValid:!0}:{isValid:!1,error:`密码不能为空`}}var Nn=({visible:e,onClose:t,onSuccess:n})=>{let[r,i]=(0,C.useState)(``),[a,o]=(0,C.useState)(``),[s,c]=(0,C.useState)(!1),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1),[p,m]=(0,C.useState)(``),h=(0,C.useRef)(null);(0,C.useEffect)(()=>{e&&h.current&&setTimeout(()=>h.current?.focus(),100)},[e]),(0,C.useEffect)(()=>{e&&(i(``),o(``),c(!1),u(!1),m(``))},[e]);let g=async()=>{let e=Mn(r,6);if(!e.isValid){m(e.error||`密码验证失败`);return}if(r!==a){m(`两次输入的密码不一致`);return}f(!0),m(``);try{let e=await R(`/api/set-token`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:r})});e.success?(L(`密码修改成功`,`success`),n(),t()):m(e.message||`密码修改失败`)}catch(e){m(e.message||`密码修改失败`)}finally{f(!1)}},_=e=>{e.key===`Enter`&&g()};return e?(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(`div`,{className:`fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center p-4`,style:{zIndex:9e3},onClick:e=>e.target===e.currentTarget&&t(),children:(0,I.jsxs)(`div`,{className:`bg-white/90 dark:bg-neutral-800/90 backdrop-blur-xl rounded-3xl shadow-2xl w-full max-w-md transform transition-all`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 p-6 border-b border-white/20 dark:border-neutral-700/50`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-gradient-to-br from-red-500 to-pink-600 flex items-center justify-center`,children:(0,I.jsx)(Ae,{size:20,className:`text-white`})}),(0,I.jsxs)(`div`,{className:`flex-1`,children:[(0,I.jsx)(`h3`,{className:`text-xl font-semibold text-theme`,children:`修改 WebUI 密码`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary mt-0.5`,children:`请输入新密码`})]}),(0,I.jsx)(`button`,{onClick:t,className:`text-theme-hint hover:text-theme transition-colors`,children:(0,I.jsx)(vt,{size:24})})]}),(0,I.jsxs)(`div`,{className:`p-6 space-y-4`,children:[p&&(0,I.jsx)(`div`,{className:`p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-xl text-red-600 dark:text-red-400 text-sm`,children:p}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`新密码`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{ref:h,type:s?`text`:`password`,value:r,onChange:e=>{i(e.target.value),m(``)},onKeyPress:_,placeholder:`请输入新密码(支持数字、字母、符号)`,className:`input-field pr-12`,autoComplete:`new-password`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>c(!s),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors`,children:s?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`密码长度至少6位`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`确认密码`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{type:l?`text`:`password`,value:a,onChange:e=>{o(e.target.value),m(``)},onKeyPress:_,placeholder:`请再次输入新密码`,className:`input-field pr-12`,autoComplete:`new-password`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>u(!l),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors`,children:l?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-end gap-3 p-6 border-t border-white/20 dark:border-neutral-700/50`,children:[(0,I.jsx)(`button`,{onClick:t,disabled:d,className:`px-6 py-2.5 text-theme-secondary hover:bg-theme-item rounded-lg font-medium transition-colors disabled:opacity-50`,children:`取消`}),(0,I.jsx)(`button`,{onClick:g,disabled:d||!r.trim()||!a.trim(),className:`px-6 py-2.5 gradient-primary text-white rounded-lg font-medium hover:shadow-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none`,children:d?`修改中...`:`确定修改`})]})]})})}):null},Pn=({visible:e,onConfirm:t,onClose:n,error:r})=>{let[i,a]=(0,C.useState)(``),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(``),u=(0,C.useRef)(null);(0,C.useEffect)(()=>{e&&u.current&&setTimeout(()=>u.current?.focus(),100)},[e]),(0,C.useEffect)(()=>{e&&(a(``),s(!1),l(``))},[e]);let d=()=>{let e=Mn(i);if(!e.isValid){l(e.error||`密码验证失败`);return}l(``),t(i.trim())};return(0,C.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation())};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e]),e?(0,I.jsx)(I.Fragment,{children:(0,I.jsx)(`div`,{className:`fixed inset-0 bg-black/30 dark:bg-black/50 backdrop-blur-sm flex items-center justify-center p-4`,style:{zIndex:9e3},onClick:e=>e.target===e.currentTarget&&n?.(),children:(0,I.jsxs)(`div`,{className:`bg-white/90 dark:bg-neutral-800/90 backdrop-blur-xl rounded-3xl shadow-2xl w-full max-w-md transform transition-all`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-6 border-b border-white/20 dark:border-neutral-700/50`,children:[(0,I.jsx)(`h3`,{className:`text-xl font-semibold text-theme`,children:r||`WebUI 密码`}),n&&(0,I.jsx)(`button`,{onClick:n,className:`text-theme-hint hover:text-theme transition-colors`,children:(0,I.jsx)(vt,{size:24})})]}),(0,I.jsx)(`div`,{className:`p-6`,children:(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{ref:u,type:o?`text`:`password`,value:i,onChange:e=>{a(e.target.value),c&&l(``)},onKeyPress:e=>{e.key===`Enter`&&d()},placeholder:`请输入密码(支持数字、字母、符号)`,className:`w-full px-4 py-3 pr-12 border rounded-xl focus:outline-none focus:ring-2 transition-all bg-theme-input backdrop-blur-sm text-theme placeholder:text-theme-hint ${c?`border-red-300 focus:ring-red-500 focus:border-red-500`:`border-theme-input focus:ring-pink-500 focus:border-transparent`}`,autoComplete:`off`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>s(!o),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors`,children:o?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]}),c&&(0,I.jsx)(`p`,{className:`text-sm text-red-500 px-1`,children:c})]})}),(0,I.jsxs)(`div`,{className:`flex items-center justify-end gap-3 p-6 border-t border-white/20 dark:border-neutral-700/50`,children:[n&&(0,I.jsx)(`button`,{onClick:n,className:`px-6 py-2.5 text-theme-secondary hover:bg-theme-item rounded-lg font-medium transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:d,disabled:!i.trim(),className:`px-6 py-2.5 gradient-primary text-white rounded-lg font-medium hover:shadow-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none`,children:`确定`})]})]})})}):null},Fn=({onLoginSuccess:e})=>{let[t,n]=(0,C.useState)(`quick`),[r,i]=(0,C.useState)(!1),[a,o]=(0,C.useState)(!1),[s,c]=(0,C.useState)(!1),[l,u]=(0,C.useState)(``),[d,f]=(0,C.useState)([]),[p,m]=(0,C.useState)(null),h=(0,C.useRef)(null),g=(0,C.useRef)(null),_=(0,C.useRef)(null),v=(0,C.useRef)(!1),y=(0,C.useRef)(!1),b={scanning:`扫描成功,请在手机上确认`,success:`登录成功`,expired:`二维码已过期,请刷新`,error:`登录失败,请重试`,"":``},x=(0,C.useCallback)(()=>{v.current=!1,_.current&&=(clearTimeout(_.current),null)},[]),S=(0,C.useCallback)(async()=>{if(v.current)return;v.current=!0;let n=0,r=async()=>{if(n>=60){x(),L(`登录超时,请重试`,`error`),t===`qr`&&u(`error`);return}n++;try{let n=await R(`/api/login-info`);if(n.success&&n.data.online===!0){x(),L(`登录成功!正在跳转到主页面...`,`success`),t===`qr`&&u(`success`),setTimeout(()=>e(),1e3);return}_.current=setTimeout(r,3e3)}catch{_.current=setTimeout(r,3e3)}};await r()},[t,e,x]),w=(0,C.useCallback)(e=>{if(!h.current)return;let t=h.current.getContext(`2d`);if(!t)return;let n=new Image;n.onload=()=>{t.clearRect(0,0,200,200),t.drawImage(n,0,0,200,200)},n.src=e},[]),T=(0,C.useCallback)(async()=>{if(h.current)try{let e=await R(`/api/login-qrcode`);if(e.success&&e.data){w(e.data.pngBase64QrcodeData);let t=e.data.expireTime*1e3;g.current&&clearInterval(g.current),g.current=setTimeout(()=>{c(!0),u(`expired`),x()},t),c(!1),u(``),L(`请使用手机QQ扫码登录`,`warning`),await S()}else throw Error(e.message||`获取二维码失败`)}catch(e){L(e.message||`获取二维码失败`,`error`)}},[w,S,x]),E=(0,C.useCallback)(async()=>{await T(),L(`二维码已刷新`,`success`)},[T]),D=(0,C.useCallback)(async()=>{if(!y.current){y.current=!0;try{let e=await R(`/api/quick-login-list`);if(e.success&&e.data&&e.data.LocalLoginInfoList){let t=e.data.LocalLoginInfoList.filter(e=>e.isQuickLogin&&!e.isUserLogin);f(t),t.length>0?m(e=>e??t[0]):n(`qr`)}else f([])}catch{L(`获取快速登录列表失败`,`error`),f([])}}},[]),O=(0,C.useCallback)(async()=>{if(p){o(!0);try{let e=(await R(`/api/quick-login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({uin:p.uin})})).data;if(e.result===`0`)L(`正在登录 ${p.nickName}...`,`success`),await S();else throw Error(e.loginErrorInfo.errMsg||`登录失败`)}catch(e){L(e.message,`error`),n(`qr`)}finally{o(!1)}}},[p,S]),ee=()=>i(!r),te=e=>{m(e),i(!1)};return(0,C.useEffect)(()=>(y.current||D(),()=>{g.current&&clearInterval(g.current),x()}),[]),(0,C.useEffect)(()=>{t===`qr`?setTimeout(()=>T(),100):g.current&&clearInterval(g.current),t===`quick`&&d.length===0&&!y.current&&D()},[t,d.length,T]),(0,I.jsx)(`div`,{className:`relative min-h-screen flex flex-col items-center justify-center p-5`,children:(0,I.jsxs)(`div`,{className:`bg-white/50 dark:bg-neutral-800/70 backdrop-blur-2xl rounded-3xl p-10 shadow-xl border border-white/30 dark:border-neutral-700/50 min-w-[320px] text-center relative z-10`,children:[t===`quick`&&(0,I.jsxs)(`div`,{className:`flex flex-col items-center gap-6`,children:[!r&&p&&(0,I.jsxs)(`div`,{className:`flex flex-col items-center cursor-pointer p-4 rounded-2xl transition-colors hover:bg-pink-50 dark:hover:bg-pink-900/30`,onClick:ee,children:[(0,I.jsx)(`div`,{className:`w-20 h-20 rounded-full overflow-hidden mb-3 shadow-lg`,children:(0,I.jsx)(`img`,{src:p.faceUrl,alt:p.nickName,className:`w-full h-full object-cover`})}),(0,I.jsx)(`div`,{className:`text-base text-theme mb-2`,children:p.nickName})]}),r&&(0,I.jsx)(`div`,{className:`grid grid-cols-2 gap-4 my-5 w-full max-w-md`,children:d.map(e=>(0,I.jsxs)(`div`,{className:`flex flex-col items-center p-4 rounded-2xl cursor-pointer transition-all border-2 border-transparent hover:bg-pink-50 dark:hover:bg-pink-900/30 hover:border-pink-500`,onClick:()=>te(e),children:[(0,I.jsx)(`div`,{className:`w-[60px] h-[60px] rounded-full overflow-hidden mb-2 shadow-md`,children:(0,I.jsx)(`img`,{src:e.faceUrl,alt:e.nickName,className:`w-full h-full object-cover`})}),(0,I.jsx)(`div`,{className:`text-sm text-theme text-center truncate w-full px-1`,children:e.nickName})]},e.uin))}),!r&&(0,I.jsx)(`button`,{onClick:O,disabled:!p||a,className:`w-[280px] h-11 gradient-primary text-white rounded-full font-medium text-base disabled:opacity-50 disabled:cursor-not-allowed hover:shadow-lg transition-all flex items-center justify-center gap-2`,children:a?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(N,{size:20,className:`animate-spin`}),`登录中...`]}):`登录`}),(0,I.jsxs)(`div`,{className:`flex gap-6 justify-center`,children:[!r&&(0,I.jsx)(`button`,{onClick:ee,className:`text-pink-500 text-sm hover:underline`,children:`切换账号`}),(0,I.jsx)(`button`,{onClick:()=>n(`qr`),className:`text-pink-500 text-sm hover:underline`,children:`扫码登录`})]})]}),t===`qr`&&(0,I.jsxs)(`div`,{className:`flex flex-col items-center gap-5`,children:[(0,I.jsx)(`div`,{className:`relative inline-block`,children:(0,I.jsxs)(`div`,{className:`relative p-5 bg-white rounded-2xl shadow-lg`,children:[(0,I.jsx)(`canvas`,{ref:h,width:`200`,height:`200`,className:`block rounded-lg`}),s&&(0,I.jsxs)(`div`,{className:`absolute inset-0 bg-black/70 flex flex-col items-center justify-center text-white cursor-pointer rounded-2xl transition-opacity hover:opacity-90`,onClick:E,children:[(0,I.jsx)(qe,{size:32,className:`mb-2`}),(0,I.jsx)(`div`,{children:`点击刷新`})]})]})}),(0,I.jsx)(`div`,{className:`text-theme-secondary`,children:`请使用手机QQ扫码登录`}),l&&(0,I.jsx)(`div`,{className:`text-sm px-4 py-2 rounded-lg ${l===`success`?`bg-green-100 text-green-800`:l===`error`||l===`expired`?`bg-red-100 text-red-800`:`bg-blue-100 text-blue-800`}`,children:b[l]})]}),(0,I.jsx)(`div`,{className:`mt-6`,children:t===`qr`&&d.length>0&&(0,I.jsx)(`button`,{onClick:()=>n(`quick`),className:`text-pink-500 text-sm hover:underline`,children:`快速登录`})})]})})},In=null,Ln=null;function Rn(e,t){In=e,Ln=t}function zn(){return In}function Bn(){return Ln}function Vn(e){return`https://q1.qlogo.cn/g?b=qq&nk=${e}&s=640`}function Hn(e){return`https://p.qlogo.cn/gh/${e}/${e}/640/`}async function Un(){let e=await R(`/api/login-info`);if(!e.success)throw Error(e.message||`获取登录信息失败`);let t=e.data;return Rn(t.uid,t.uin),t}async function Wn(){let e=await z(`ntFriendApi`,`getBuddyV2`,[!0]),t=await z(`ntFriendApi`,`getBuddyList`,[]),n=new Map;for(let e of t)n.set(e.uid,e);let r=(e.data||[]).map(e=>{let t=(e.buddyUids||[]).map(e=>n.get(e)).filter(e=>e).map(e=>({uid:e.uid,uin:e.uin,nickname:e.coreInfo?.nick||``,remark:e.coreInfo?.remark||``,avatar:Vn(e.uin),online:e.status?.status===10||!1,topTime:e.relationFlags?.topTime||`0`}));return{categoryId:e.categoryId,categoryName:e.categroyName||`我的好友`,categorySort:e.categorySortId,onlineCount:e.onlineCount||0,memberCount:e.categroyMbCount||t.length,friends:t}});return r.sort((e,t)=>e.categorySort-t.categorySort),r}async function Gn(){return(await z(`ntGroupApi`,`getGroups`,[!1])).map(e=>({groupCode:e.groupCode,groupName:e.groupName,remarkName:e.remarkName||``,avatar:Hn(e.groupCode),memberCount:e.memberCount,isTop:e.isTop||!1,msgMask:e.cmdUinMsgMask||1}))}async function Kn(){let e=await z(`ntUserApi`,`getRecentContactListSnapShot`,[50]),[t,n]=await Promise.all([Gn(),Wn()]),r=new Map,i=[];t.forEach(e=>{e.msgMask!==2&&(r.set(`2_${e.groupCode}`,e.isTop),e.isTop&&i.push(e))});let a=[];n.forEach(e=>{e.friends.forEach(e=>{let t=!!e.topTime&&e.topTime!==`0`;r.set(`1_${e.uin}`,t),t&&a.push(e)})});let o=new Set,s=e.info.changedList.filter(e=>{let t=e.peerUin||e.peerUid;return t&&t!==`0`&&t!==``}).map(e=>{let t=e.chatType,n=t===2,i=n?e.peerUin||e.peerUid:e.peerUin;o.add(`${t}_${i}`);let a=`${t}_${i}`,s=r.get(a)||!1;return{chatType:t,peerId:i,peerName:e.peerName||e.remark||e.peerUin,peerAvatar:n?Hn(i):Vn(e.peerUin),lastMessage:qn(e.abstractContent),lastTime:parseInt(e.msgTime)*1e3,unreadCount:parseInt(e.unreadCnt)||0,pinned:s}});return i.forEach(e=>{let t=`2_${e.groupCode}`;o.has(t)||s.push({chatType:2,peerId:e.groupCode,peerName:e.groupName,peerAvatar:Hn(e.groupCode),lastMessage:``,lastTime:Date.now(),unreadCount:0,pinned:!0})}),a.forEach(e=>{let t=`1_${e.uin}`;o.has(t)||s.push({chatType:1,peerId:e.uin,peerName:e.remark||e.nickname,peerAvatar:Vn(e.uin),lastMessage:``,lastTime:Date.now(),unreadCount:0,pinned:!0})}),s.sort((e,t)=>e.pinned&&!t.pinned?-1:!e.pinned&&t.pinned?1:t.lastTime-e.lastTime),s}function qn(e){let t=e=>{if(!e)return``;if(typeof e==`string`)return e;let t=e.content||e.text||e.recentAbstract||e.textElement?.content||e.grayTipElement?.jsonGrayTipElement?.recentAbstract;if(typeof t==`string`&&t.trim())return t;if(e.picElement||e.imageElement||e.type===2||e.elementType===2)return`[图片]`;if(e.faceElement||e.marketFaceElement||e.type===3||e.elementType===6)return`[表情]`;if(e.fileElement||e.type===6||e.elementType===3)return`[文件]`;if(e.pttElement||e.voiceElement||e.elementType===4)return`[语音]`;if(e.videoElement||e.elementType===5)return`[视频]`;if(e.multiForwardMsgElement||e.elementType===16)return`[聊天记录]`;if(e.arkElement||e.elementType===10)try{if(JSON.parse(e.arkElement?.bytesData||`{}`).app===`com.tencent.multimsg`)return`[聊天记录]`}catch{}return``};return e?Array.isArray(e)?e.map(t).filter(Boolean).join(``)||`[消息]`:t(e)||`[消息]`:`[消息]`}async function Jn(e,t,n,r=20,i){let a=new URLSearchParams({chatType:String(e),peerId:t,limit:r.toString()});n&&a.append(`beforeMsgSeq`,n),i&&a.append(`afterMsgSeq`,i);let o=await R(`/api/webqq/messages?${a}`);if(!o.success)throw Error(o.message||`获取消息历史失败`);return o.data||{messages:[],hasMore:!1}}async function Yn(e){let t=await R(`/api/webqq/messages`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.success)throw Error(t.message||`发送消息失败`);return t.data||{msgId:``}}async function Xn(e){let t=new FormData;t.append(`image`,e);let n=await R(`/api/webqq/upload`,{method:`POST`,body:t});if(!n.success)throw Error(n.message||`上传图片失败`);return n.data}async function Zn(e){let t=await R(`/api/webqq/upload`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({imageUrl:e})});if(!t.success)throw Error(t.message||`上传图片失败`);return t.data}async function Qn(e){let t=new FormData;t.append(`file`,e);let n=await R(`/api/webqq/upload-file`,{method:`POST`,body:t});if(!n.success)throw Error(n.message||`上传文件失败`);return n.data}async function $n(e){let t=await R(`/api/webqq/members?groupCode=${e}`);if(!t.success)throw Error(t.message||`获取群成员失败`);return t.data||[]}async function z(e,t,n=[]){let r=await R(`/api/ntcall/${e}/${t}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({args:n})});if(!r.success)throw Error(r.message||`NT API 调用失败`);return r.data}async function er(e,t,n,r){return await z(`ntFileApi`,`getVideoUrl`,[{chatType:e,peerUid:t,guildId:``},n,r])}async function tr(e,t,n){await z(`ntMsgApi`,`recallMsg`,[{chatType:e,peerUid:t,guildId:``},[n]])}async function nr(e,t){try{if(t){let n=await z(`ntGroupApi`,`getGroupMember`,[t,e,!1]);if(n)return n.cardName||n.nick||`未知用户`}let n=await z(`ntUserApi`,`getUserSimpleInfo`,[e,!1]);return n?.coreInfo?.remark||n?.coreInfo?.nick||`未知用户`}catch{return`未知用户`}}async function rr(e,t,n){e===2&&n?await z(`pmhq`,`sendGroupPoke`,[Number(n),Number(t)]):await z(`pmhq`,`sendFriendPoke`,[Number(t)])}async function ir(e,t,n,r){return await z(`ntMsgApi`,`translatePtt2Text`,[e,{chatType:t,peerUid:n,guildId:``},r])||``}async function ar(e,t,n=!1){let r=await z(`ntGroupApi`,`kickMember`,[e,[t],n,``]);if(r?.errCode!==0)throw Error(r?.errMsg||`踢出失败`)}async function or(e,t,n){await z(`ntGroupApi`,`banMember`,[e,[{uid:t,timeStamp:n}]])}async function sr(e,t,n){await z(`pmhq`,`setSpecialTitle`,[parseInt(e),t,n])}function cr(e,t,n){let r=rn(),i=`/api/webqq/audio-proxy?fileUuid=${encodeURIComponent(e)}&isGroup=${t}&token=${encodeURIComponent(r||``)}`;return n&&(i+=`&filePath=${encodeURIComponent(n)}`),i}async function lr(e){let t=await z(`ntGroupApi`,`quitGroup`,[e]);if(t?.result!==0)throw Error(t?.errMsg||`退群失败`)}async function ur(e,t,n){let r=e;if(!r&&t&&(r=await z(`ntUserApi`,`getUidByUin`,[t])),!r)throw Error(`无法获取用户信息`);let i=(await z(`ntUserApi`,`fetchUserDetailInfo`,[r])).detail[r];if(!i)throw Error(`用户不存在`);let a=t||i.uin;a||=await z(`ntUserApi`,`getUinByUid`,[r]);let o=i.simpleInfo,s=o?.coreInfo,c=o?.baseInfo,l=i.commonExt,u=l?.qqLevel?.level||0;if(u===0&&a)try{u=await z(`pmhq`,`fetchUserLevel`,[parseInt(a)])}catch{}let d={uid:r,uin:a||``,nickname:s?.nick||``,remark:s?.remark||``,signature:c?.longNick||``,sex:c?.sex??0,birthday:c?.birthday_year?`${c.birthday_year}-${c.birthday_month}-${c.birthday_day}`:``,location:``,qid:c?.qid||``,level:u,regTime:l?.regTime||void 0,avatar:`https://q1.qlogo.cn/g?b=qq&nk=${a}&s=640`};if(n)try{let e=await z(`ntGroupApi`,`getGroupMember`,[n,r,!1]);e&&(d.groupCard=e.cardName||``,d.groupRole=e.role===4?`owner`:e.role===3?`admin`:`member`,d.groupTitle=e.memberSpecialTitle||``,d.groupLevel=e.memberRealLevel||e.memberLevel||0,d.joinTime=e.joinTime,d.lastSpeakTime=e.lastSpeakTime)}catch{}return d}function dr(e,t,n){let r=rn(),i=r?`/api/webqq/events?token=${encodeURIComponent(r)}`:`/api/webqq/events`,a,o=0,s=null,c=!1,l=()=>(a=new EventSource(i),a.addEventListener(`message`,t=>{try{e(JSON.parse(t.data))}catch(e){console.error(`解析 SSE 消息失败:`,e)}}),a.addEventListener(`connected`,()=>{console.log(`[SSE] 连接已建立`),o=0}),a.onopen=()=>{console.log(`[SSE] 连接打开`),o>0&&(console.log(`[SSE] 重连成功`),n?.()),o=0},a.onerror=e=>{if(console.error(`[SSE] 连接错误:`,e),c)return;a.close();let n=Math.min(1e3*2**o,3e4);o++,console.log(`[SSE] 将在 ${n}ms 后尝试第 ${o} 次重连...`),s=setTimeout(()=>{c||(console.log(`[SSE] 正在重连...`),l())},n),t?.(e)},a);return a=l(),{close:()=>{c=!0,s&&=(clearTimeout(s),null),a.close(),console.log(`[SSE] 连接已关闭`)},get readyState(){return a.readyState},get url(){return a.url},addEventListener:a.addEventListener.bind(a),removeEventListener:a.removeEventListener.bind(a),dispatchEvent:a.dispatchEvent.bind(a),onerror:a.onerror,onmessage:a.onmessage,onopen:a.onopen,CONNECTING:EventSource.CONNECTING,OPEN:EventSource.OPEN,CLOSED:EventSource.CLOSED,withCredentials:a.withCredentials}}async function fr(e){let t=await R(`/api/webqq/forward-msg?resId=${encodeURIComponent(e)}`);if(!t.success)throw Error(t.message||`获取合并转发消息失败`);return t.data||[]}function pr(e,t){if(!t.trim())return e;let n=t.toLowerCase();return e.filter(e=>e.groupName.toLowerCase().includes(n)||e.groupCode.includes(t))}function mr(e,t){if(!t.trim())return e;let n=t.toLowerCase();return e.filter(e=>e.nickname.toLowerCase().includes(n)||e.card.toLowerCase().includes(n)||e.uin.includes(t))}function hr(e){let t=e.toLowerCase().split(`.`).pop()||``;return[`jpg`,`jpeg`,`png`,`gif`].includes(t)}async function gr(e){let t=await z(`ntGroupApi`,`getGroupAllInfo`,[e]);console.log(`[WebQQ] 群资料:`,{groupCode:t.groupCode,groupName:t.groupName,fingerMemo:t.fingerMemo,fingerMemoLength:t.fingerMemo?.length,groupMemo:t.groupMemo,groupMemoLength:t.groupMemo?.length,richFingerMemo:t.richFingerMemo});let n=``;if(t.ownerUid)try{let e=await z(`ntUserApi`,`getUinByUid`,[t.ownerUid]);n=(await z(`ntUserApi`,`getUserSimpleInfo`,[t.ownerUid,!1]))?.coreInfo?.nick||e||``}catch{}return{groupCode:t.groupCode,groupName:t.groupName,remarkName:t.remarkName||``,avatar:Hn(t.groupCode),memberCount:t.memberNum,maxMemberCount:t.maxMemberNum,ownerUin:t.ownerUid?await z(`ntUserApi`,`getUinByUid`,[t.ownerUid]).catch(()=>``):``,ownerName:n,createTime:t.cmdUinJoinTime||void 0,description:t.richFingerMemo||t.fingerMemo||``,announcement:t.groupMemo||``}}function _r(e){let t=new Date(e),n=new Date;if(t.toDateString()===n.toDateString())return t.toLocaleTimeString(`zh-CN`,{hour:`2-digit`,minute:`2-digit`});let r=new Date(n);return r.setDate(r.getDate()-1),t.toDateString()===r.toDateString()?`昨天 ${t.toLocaleTimeString(`zh-CN`,{hour:`2-digit`,minute:`2-digit`})}`:t.toLocaleDateString(`zh-CN`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`})}async function vr(e){let t=await z(`ntFriendApi`,`delBuddy`,[e]);if(t?.result!==0)throw Error(t?.errMsg||`删除好友失败`)}async function yr(e,t,n){if(e===2){let e=await z(`ntGroupApi`,`setTop`,[t,n]);if(e?.result!==0)throw Error(e?.errMsg||`设置置顶失败`)}else{let e=await z(`ntFriendApi`,`setTop`,[t,n]);if(e?.result!==0)throw Error(e?.errMsg||`设置置顶失败`)}}var br=function(e){return e[e.AllowNotify=1]=`AllowNotify`,e[e.BoxNotNotify=2]=`BoxNotNotify`,e[e.NotAllow=3]=`NotAllow`,e[e.AllowNotNotify=4]=`AllowNotNotify`,e}({});async function xr(e,t){let n=await z(`ntGroupApi`,`setGroupMsgMask`,[e,t]);if(n?.result!==0)throw Error(n?.errMsg||`设置消息接收方式失败`)}async function Sr(){let e=await R(`/api/webqq/notifications/group`);if(!e.success)throw Error(e.message||`获取群通知失败`);return e.data||[]}async function Cr(e,t,n){let r=await R(`/api/webqq/notifications/group/handle`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({flag:e,action:t,reason:n})});if(!r.success)throw Error(r.message||`处理群通知失败`)}async function wr(e,t){let n=await R(`/api/webqq/notifications/friend/handle`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({flag:e,action:t})});if(!n.success)throw Error(n.message||`处理好友申请失败`)}async function Tr(){let e=await R(`/api/webqq/notifications/friend`);if(!e.success)throw Error(e.message||`获取好友申请失败`);return e.data||[]}async function Er(){let e=await R(`/api/webqq/notifications/friend/doubt`);if(!e.success)throw Error(e.message||`获取被过滤好友申请失败`);return e.data||[]}async function Dr(e){let t=await R(`/api/webqq/notifications/friend/doubt/approve`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({uid:e})});if(!t.success)throw Error(t.message||`处理被过滤好友申请失败`)}var Or=3600*1e3,kr=1800*1e3,Ar=new Map,jr=new Set,Mr=new Set,Nr=()=>{jr=new Set,Mr=new Set},Pr=(e,t)=>jr.has(`${e}_${t}`),Fr=(e,t)=>{jr.add(`${e}_${t}`)},Ir=e=>Mr.has(e),Lr=e=>{Mr.add(e)},B=It()(zt((e,t)=>({friendCategories:[],groups:[],recentChats:[],groupLastTimeMap:{},groupLastMessageMap:{},contactsLoading:!1,contactsError:null,currentChat:null,activeTab:`recent`,groupAssistantMode:`normal`,unreadCounts:{},expandedCategories:[],membersCache:{},showMemberPanel:!1,notifications:[],notificationUnreadCount:0,scrollPositions:{},contactsCacheTimestamp:0,setFriendCategories:t=>e({friendCategories:t}),setGroups:t=>e({groups:t}),setRecentChats:t=>e({recentChats:t}),setContactsLoading:t=>e({contactsLoading:t}),setContactsError:t=>e({contactsError:t}),setCurrentChat:t=>e({currentChat:t}),setActiveTab:t=>e({activeTab:t}),setGroupAssistantMode:t=>e({groupAssistantMode:t}),enterGroupAssistant:()=>e({groupAssistantMode:`assistant`}),exitGroupAssistant:()=>e({groupAssistantMode:`normal`}),setUnreadCount:(t,n)=>e(e=>({unreadCounts:{...e.unreadCounts,[t]:n}})),incrementUnreadCount:t=>e(e=>({unreadCounts:{...e.unreadCounts,[t]:(e.unreadCounts[t]||0)+1}})),clearUnreadCount:t=>e(e=>{let{[t]:n,...r}=e.unreadCounts;return{unreadCounts:r}}),initUnreadCounts:t=>{let n={};t.forEach(e=>{e.unreadCount>0&&(n[`${e.chatType}_${e.peerId}`]=e.unreadCount)}),e({unreadCounts:n})},toggleCategory:t=>e(e=>{let n=new Set(e.expandedCategories);return n.has(t)?n.delete(t):n.add(t),{expandedCategories:Array.from(n)}}),setExpandedCategories:t=>e({expandedCategories:t}),getCachedMembers:e=>{let n=t().membersCache[e];return n&&Date.now()-n.timestamp<kr?n.members:null},setCachedMembers:(t,n)=>e(e=>{let r=Date.now(),i={};for(let[t,n]of Object.entries(e.membersCache))r-n.timestamp<kr&&(i[t]=n);return{membersCache:{...i,[t]:{members:n,timestamp:r}}}}),fetchGroupMembers:async(e,n=!1)=>{let r=t();if(console.log(`[Store] fetchGroupMembers called:`,e,`forceRefresh:`,n),!n){let t=r.getCachedMembers(e);if(t)return console.log(`[Store] Cache hit, returning cached members`),t}let i=Ar.get(e);if(i)return console.log(`[Store] Already loading, returning existing promise`),i;console.log(`[Store] Fetching from API`);let a=(async()=>{let n=await $n(e);return console.log(`[Store] API success, caching members`),t().setCachedMembers(e,n),Ar.delete(e),n})().catch(t=>{throw console.log(`[Store] API error:`,t.message),Ar.delete(e),t});return Ar.set(e,a),a},setShowMemberPanel:t=>e({showMemberPanel:t}),addNotification:t=>e(e=>e.notifications.some(e=>e.type===`group-notify`&&t.type===`group-notify`||e.type===`friend-request`&&t.type===`friend-request`?e.data.flag===t.data.flag:!1)?{notifications:e.notifications.map(e=>e.type===t.type&&(e.type===`group-notify`&&t.type===`group-notify`&&e.data.flag===t.data.flag||e.type===`friend-request`&&t.type===`friend-request`&&e.data.flag===t.data.flag)?t:e)}:{notifications:[t,...e.notifications].slice(0,200),notificationUnreadCount:e.notificationUnreadCount+1}),setNotifications:t=>e({notifications:t}),clearNotificationUnread:()=>e({notificationUnreadCount:0}),updateNotificationStatus:(t,n,r)=>e(e=>({notifications:e.notifications.map(e=>{if(e.type===t){if(e.type===`group-notify`&&e.data.flag===n)return{...e,data:{...e.data,status:r}};if(e.type===`friend-request`&&e.data.flag===n)return{...e,data:{...e.data,isDecide:!0}}}return e})})),loadGroupNotifications:async()=>{try{let[n,r,i]=await Promise.all([Sr().catch(()=>[]),Tr().catch(()=>[]),Er().catch(()=>[])]),a=n.map(e=>({type:`group-notify`,data:e,time:e.actionTime?parseInt(e.actionTime)*1e3:parseInt(e.seq)/1e3})),o=r.map(e=>({type:`friend-request`,data:e,time:e.reqTime?parseInt(e.reqTime)*1e3:Date.now()})),s=i.map(e=>({type:`doubt-buddy`,data:e,time:e.reqTime?parseInt(e.reqTime)*1e3:Date.now()})),c=t().notifications.filter(e=>e.type!==`group-notify`&&e.type!==`friend-request`&&e.type!==`doubt-buddy`);e({notifications:[...a,...o,...s,...c].sort((e,t)=>t.time-e.time).slice(0,200)})}catch(e){console.error(`加载通知失败:`,e)}},getScrollPosition:(e,n)=>{let r=t(),i=`${e}_${n}`;return r.scrollPositions[i]||null},setScrollPosition:(t,n,r)=>e(e=>({scrollPositions:{...e.scrollPositions,[`${t}_${n}`]:r}})),clearScrollPosition:(t,n)=>e(e=>{let{[`${t}_${n}`]:r,...i}=e.scrollPositions;return{scrollPositions:i}}),isContactsCacheValid:()=>{let e=t();return e.contactsCacheTimestamp>0&&Date.now()-e.contactsCacheTimestamp<Or&&(e.friendCategories.length>0||e.groups.length>0)},loadContacts:async()=>{let n=t();if(n.isContactsCacheValid()){n.refreshContacts();return}e({contactsLoading:!0,contactsError:null});try{let[r,i,a]=await Promise.all([Wn(),Gn(),Kn()]),o=a.filter(e=>e.peerId&&e.peerId!==`0`&&e.peerId!==``),s=new Map;n.recentChats.forEach(e=>{e.peerId&&e.peerId!==`0`&&e.peerId!==``&&s.set(`${e.chatType}_${e.peerId}`,e)}),o.forEach(e=>{let t=`${e.chatType}_${e.peerId}`,n=s.get(t);n?(e.lastTime>n.lastTime||e.lastTime===n.lastTime&&!n.lastMessage&&e.lastMessage)&&s.set(t,e):s.set(t,e)});let c=Array.from(s.values()).sort((e,t)=>t.lastTime-e.lastTime),l={},u={};o.forEach(e=>{e.chatType===2&&(l[e.peerId]=e.lastTime,e.lastMessage&&(u[e.peerId]=e.lastMessage))}),e({friendCategories:r,groups:i,recentChats:c,groupLastTimeMap:l,groupLastMessageMap:u,contactsCacheTimestamp:Date.now(),contactsLoading:!1});let d={...t().unreadCounts};o.forEach(e=>{let t=`${e.chatType}_${e.peerId}`;!(t in d)&&e.unreadCount>0&&(d[t]=e.unreadCount)}),e({unreadCounts:d})}catch(t){e({contactsError:t.message||`加载联系人失败`,contactsLoading:!1})}},refreshContacts:async()=>{try{let[n,r,i]=await Promise.all([Wn(),Gn(),Kn()]),a=i.filter(e=>e.peerId&&e.peerId!==`0`&&e.peerId!==``),o=t(),s=new Map;o.recentChats.forEach(e=>{e.peerId&&e.peerId!==`0`&&e.peerId!==``&&s.set(`${e.chatType}_${e.peerId}`,e)}),a.forEach(e=>{let t=`${e.chatType}_${e.peerId}`,n=s.get(t);n?(e.lastTime>n.lastTime||e.lastTime===n.lastTime&&!n.lastMessage&&e.lastMessage)&&s.set(t,e):s.set(t,e)});let c=Array.from(s.values()).sort((e,t)=>t.lastTime-e.lastTime),l={...o.groupLastTimeMap},u={...o.groupLastMessageMap};a.forEach(e=>{e.chatType===2&&(l[e.peerId]=e.lastTime,e.lastMessage&&(u[e.peerId]=e.lastMessage))}),e({friendCategories:n,groups:r,recentChats:c,groupLastTimeMap:l,groupLastMessageMap:u,contactsCacheTimestamp:Date.now()});let d={...t().unreadCounts};a.forEach(e=>{let t=`${e.chatType}_${e.peerId}`;!(t in d)&&e.unreadCount>0&&(d[t]=e.unreadCount)}),e({unreadCounts:d})}catch(e){console.error(`Failed to refresh contacts:`,e)}},updateRecentChat:(t,n,r,i,a,o)=>e(e=>{let s=e.recentChats.filter((e,t,n)=>n.findIndex(t=>t.chatType===e.chatType&&t.peerId===e.peerId)===t),c=s.find(e=>e.chatType===t&&e.peerId===n),l=e.currentChat,u=l?.chatType===t&&l?.peerId===n,d=t===2?{...e.groupLastTimeMap,[n]:i}:e.groupLastTimeMap,f=t===2?{...e.groupLastMessageMap,[n]:r||`[消息]`}:e.groupLastMessageMap;if(c){let e=s.filter(e=>!(e.chatType===t&&e.peerId===n)),a={...c,lastMessage:r,lastTime:i,unreadCount:u?0:c.unreadCount+1};if(c.pinned){let t=e.filter(e=>e.pinned),n=e.filter(e=>!e.pinned);return{recentChats:[a,...t,...n],groupLastTimeMap:d,groupLastMessageMap:f}}let o=e.filter(e=>e.pinned),l=e.filter(e=>!e.pinned);return{recentChats:[...o,a,...l],groupLastTimeMap:d,groupLastMessageMap:f}}else{let c=a||n,l=o||``;if(t===1||t===100){for(let t of e.friendCategories){let e=t.friends.find(e=>e.uin===n);if(e){c=e.remark||e.nickname,l=e.avatar;break}}l||=`https://q1.qlogo.cn/g?b=qq&nk=${n}&s=640`}else if(t===2){let t=e.groups.find(e=>e.groupCode===n);if(t){if(t.msgMask===2)return{groupLastTimeMap:d,groupLastMessageMap:f};c=t.groupName,l=t.avatar}l||=`https://p.qlogo.cn/gh/${n}/${n}/640/`}return{recentChats:[{chatType:t,peerId:n,peerName:c,peerAvatar:l,lastMessage:r,lastTime:i,unreadCount:+!u},...s],groupLastTimeMap:d,groupLastMessageMap:f}}}),togglePinChat:async(n,r)=>{let i=t().recentChats.find(e=>e.chatType===n&&e.peerId===r);if(!i)return;let a=!i.pinned;try{await yr(n,r,a),e(e=>{let t=e.recentChats.map(e=>e.chatType===n&&e.peerId===r?{...e,pinned:a}:e);return t.sort((e,t)=>e.pinned&&!t.pinned?-1:!e.pinned&&t.pinned?1:t.lastTime-e.lastTime),{recentChats:t}})}catch(e){throw console.error(`设置置顶失败:`,e),e}},removeRecentChat:(t,n)=>e(e=>({recentChats:e.recentChats.filter(e=>!(e.chatType===t&&e.peerId===n))})),removeFriend:t=>e(e=>({friendCategories:e.friendCategories.map(e=>({...e,friends:e.friends.filter(e=>e.uid!==t),memberCount:e.friends.filter(e=>e.uid!==t).length}))}))}),{name:`webqq-storage`,partialize:e=>({friendCategories:e.friendCategories,groups:e.groups,recentChats:e.recentChats,groupLastTimeMap:e.groupLastTimeMap,groupLastMessageMap:e.groupLastMessageMap,expandedCategories:e.expandedCategories,membersCache:e.membersCache,showMemberPanel:e.showMemberPanel,scrollPositions:e.scrollPositions,contactsCacheTimestamp:e.contactsCacheTimestamp,unreadCounts:e.unreadCounts,activeTab:e.activeTab,currentChat:e.currentChat}),onRehydrateStorage:()=>e=>{if(e&&e.recentChats){let t=new Set;e.recentChats=e.recentChats.filter(e=>{if(!e.peerId||e.peerId===`0`||e.peerId===``)return!1;let n=`${e.chatType}_${e.peerId}`;return t.has(n)?!1:(t.add(n),!0)})}}}));function Rr(e,t,n){let[r,i]=(0,C.useState)({left:-9999,top:-9999,ready:!1});return(0,C.useEffect)(()=>{i({left:-9999,top:-9999,ready:!1});let r=requestAnimationFrame(()=>{if(!n.current){i({left:e,top:t,ready:!0});return}let r=n.current.getBoundingClientRect(),a=e,o=t;e+r.width>window.innerWidth-10&&(a=e-r.width),a<10&&(a=10),t+r.height>window.innerHeight-10&&(o=t-r.height),o<10&&(o=10),i({left:a,top:o,ready:!0})});return()=>cancelAnimationFrame(r)},[e,t]),r}var zr=({groupCode:e,onClose:t})=>{let{groups:n,setGroups:r}=B(),[i,a]=(0,C.useState)(!1),o=(0,C.useRef)(null),s=async i=>{try{await xr(e,i),r(n.map(t=>t.groupCode===e?{...t,msgMask:i}:t))}catch(e){console.error(`设置消息接收方式失败:`,e),alert(`设置失败: ${e.message||`未知错误`}`)}t()},c=n.find(t=>t.groupCode===e)?.msgMask;return(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsxs)(`button`,{onMouseEnter:()=>a(!0),className:`w-full px-3 py-2 text-left text-sm hover:bg-theme-item-hover flex items-center gap-2 text-theme`,children:[(0,I.jsx)(oe,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:`消息接收方式`}),(0,I.jsx)(j,{size:14,className:`flex-shrink-0`})]}),i&&(0,I.jsxs)(`div`,{ref:o,className:`absolute left-full top-0 ml-1 bg-popup backdrop-blur-sm border border-theme-divider rounded-lg shadow-lg py-1 min-w-[140px] z-[10000]`,onMouseLeave:()=>a(!1),children:[(0,I.jsxs)(`button`,{onClick:()=>s(br.AllowNotify),className:`w-full px-3 py-2 text-left text-sm hover:bg-theme-item-hover flex items-center gap-2 text-theme`,children:[(0,I.jsx)(oe,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:`接收并提醒`}),c===br.AllowNotify&&(0,I.jsx)(`span`,{className:`flex-shrink-0 text-pink-500`,children:`✓`})]}),(0,I.jsxs)(`button`,{onClick:()=>s(br.AllowNotNotify),className:`w-full px-3 py-2 text-left text-sm hover:bg-theme-item-hover flex items-center gap-2 text-theme`,children:[(0,I.jsx)(ae,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:`接收但不提醒`}),c===br.AllowNotNotify&&(0,I.jsx)(`span`,{className:`flex-shrink-0 text-pink-500`,children:`✓`})]}),(0,I.jsxs)(`button`,{onClick:()=>s(br.BoxNotNotify),className:`w-full px-3 py-2 text-left text-sm hover:bg-theme-item-hover flex items-center gap-2 text-theme`,children:[(0,I.jsx)(O,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:`收进群助手`}),c===br.BoxNotNotify&&(0,I.jsx)(`span`,{className:`flex-shrink-0 text-pink-500`,children:`✓`})]}),(0,I.jsxs)(`button`,{onClick:()=>s(br.NotAllow),className:`w-full px-3 py-2 text-left text-sm hover:bg-theme-item-hover flex items-center gap-2 text-theme`,children:[(0,I.jsx)(ie,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:`屏蔽群消息`}),c===br.NotAllow&&(0,I.jsx)(`span`,{className:`flex-shrink-0 text-pink-500`,children:`✓`})]})]})]})},Br=({friend:e,isSelected:t,onClick:n})=>{let{togglePinChat:r}=B(),[i,a]=(0,C.useState)(null),o=(0,C.useRef)(null),s=Rr(i?.x||0,i?.y||0,o),c=e=>{e.preventDefault(),e.stopPropagation(),a({x:e.clientX,y:e.clientY})},l=()=>a(null);return(0,C.useEffect)(()=>{if(!i)return;let e=()=>l();return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[i]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{onClick:n,onContextMenu:c,className:`flex items-center gap-3 px-3 py-2.5 cursor-pointer transition-colors ${t?`bg-pink-500/20`:`hover:bg-theme-item-hover`}`,children:[(0,I.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,I.jsx)(`img`,{src:e.avatar,alt:e.nickname,className:`w-10 h-10 rounded-full object-cover`,onError:t=>{t.currentTarget.src=`https://q1.qlogo.cn/g?b=qq&nk=${e.uin}&s=640`}}),e.online&&(0,I.jsx)(`div`,{className:`absolute bottom-0 right-0 w-3 h-3 bg-green-500 rounded-full border-2 border-white dark:border-neutral-800`})]}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme truncate`,children:e.remark||e.nickname}),e.remark&&(0,I.jsx)(`div`,{className:`text-xs text-theme-hint truncate`,children:e.nickname})]})]}),i&&(0,Ct.createPortal)((0,I.jsx)(`div`,{ref:o,className:`fixed bg-white dark:bg-neutral-800 rounded-lg shadow-lg border border-neutral-200 dark:border-neutral-700 py-1 min-w-[120px] z-[9999]`,style:{left:`${s.left}px`,top:`${s.top}px`,opacity:+!!s.ready,pointerEvents:s.ready?`auto`:`none`},onClick:e=>e.stopPropagation(),children:(0,I.jsxs)(`button`,{onClick:async()=>{try{await r(1,e.uin)}catch(e){console.error(`置顶失败:`,e),alert(`置顶失败: ${e.message||`未知错误`}`)}l()},className:`w-full px-3 py-2 text-left text-sm hover:bg-neutral-100 dark:hover:bg-neutral-700 flex items-center gap-2 text-theme`,children:[(0,I.jsx)(Ue,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:e.topTime&&e.topTime!==`0`?`取消置顶`:`置顶`})]})}),document.body)]})},Vr=({group:e,isSelected:t,onClick:n,showPinnedStyle:r=!1,unreadCount:i=0,subtitle:a})=>{let{togglePinChat:o}=B(),[s,c]=(0,C.useState)(null),l=(0,C.useRef)(null),u=Rr(s?.x||0,s?.y||0,l),d=e=>{e.preventDefault(),e.stopPropagation(),c({x:e.clientX,y:e.clientY})},f=()=>{c(null)};return(0,C.useEffect)(()=>{if(!s)return;let e=()=>f();return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[s]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{onClick:n,onContextMenu:d,className:`flex items-center gap-3 px-3 py-2.5 cursor-pointer transition-colors ${t?`bg-pink-500/20`:r&&e.isTop?`bg-theme-item-hover`:`hover:bg-theme-item-hover`}`,children:[(0,I.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,I.jsx)(`img`,{src:e.avatar,alt:e.groupName,className:`w-10 h-10 rounded-full object-cover`,onError:t=>{t.currentTarget.src=`https://p.qlogo.cn/gh/${e.groupCode}/${e.groupCode}/640/`}}),i>0&&(0,I.jsx)(`div`,{className:`absolute -top-1 -right-1 min-w-[18px] h-[18px] bg-red-500 text-white text-xs font-medium rounded-full flex items-center justify-center px-1`,children:i})]}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme truncate`,children:e.groupName}),(0,I.jsx)(`div`,{className:`text-xs text-theme-hint truncate`,children:a||`${e.memberCount} 人`})]})]}),s&&(0,Ct.createPortal)((0,I.jsxs)(`div`,{ref:l,className:`fixed bg-white dark:bg-neutral-800 rounded-lg shadow-lg border border-neutral-200 dark:border-neutral-700 py-1 min-w-[160px] z-[9999]`,style:{left:`${u.left}px`,top:`${u.top}px`,opacity:+!!u.ready,pointerEvents:u.ready?`auto`:`none`},onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`button`,{onClick:async()=>{try{await o(2,e.groupCode)}catch(e){console.error(`置顶失败:`,e),alert(`置顶失败: ${e.message||`未知错误`}`)}f()},className:`w-full px-3 py-2 text-left text-sm hover:bg-neutral-100 dark:hover:bg-neutral-700 flex items-center gap-2 text-theme`,children:[(0,I.jsx)(Ue,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:e.isTop?`取消置顶`:`置顶`})]}),(0,I.jsx)(zr,{groupCode:e.groupCode,onClose:f})]}),document.body)]})},Hr=function(e){return e[e.InvitedByMember=1]=`InvitedByMember`,e[e.RefuseInvited=2]=`RefuseInvited`,e[e.RefusedByAdminiStrator=3]=`RefusedByAdminiStrator`,e[e.AgreedTojoinDirect=4]=`AgreedTojoinDirect`,e[e.InvitedNeedAdminiStratorPass=5]=`InvitedNeedAdminiStratorPass`,e[e.AgreedToJoinByAdminiStrator=6]=`AgreedToJoinByAdminiStrator`,e[e.RequestJoinNeedAdminiStratorPass=7]=`RequestJoinNeedAdminiStratorPass`,e[e.SetAdmin=8]=`SetAdmin`,e[e.KickMemberNotifyAdmin=9]=`KickMemberNotifyAdmin`,e[e.KickMemberNotifyKicked=10]=`KickMemberNotifyKicked`,e[e.MemberLeaveNotifyAdmin=11]=`MemberLeaveNotifyAdmin`,e[e.CancelAdminNotifyCanceled=12]=`CancelAdminNotifyCanceled`,e[e.CancelAdminNotifyAdmin=13]=`CancelAdminNotifyAdmin`,e[e.TransferGroupNotifyOldowner=14]=`TransferGroupNotifyOldowner`,e[e.TransferGroupNotifyAdmin=15]=`TransferGroupNotifyAdmin`,e}({}),Ur=function(e){return e[e.Init=0]=`Init`,e[e.Unhandle=1]=`Unhandle`,e[e.Agreed=2]=`Agreed`,e[e.Refused=3]=`Refused`,e[e.Ignored=4]=`Ignored`,e}({});function Wr(e){if(!e||e<=0)return``;let t=new Date(e),n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString(`zh-CN`,{hour:`2-digit`,minute:`2-digit`}):t.toLocaleDateString(`zh-CN`,{month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`})}function Gr(e){let t=e.user1.nickName||e.user1.uin||`未知用户`,n=e.user2.nickName||e.user2.uin||``;switch(e.notifyType){case Hr.RequestJoinNeedAdminiStratorPass:return`${t} 申请加入群`;case Hr.InvitedByMember:return`${n} 邀请你加入群`;case Hr.InvitedNeedAdminiStratorPass:return`${n} 邀请 ${t} 加入群`;case Hr.AgreedTojoinDirect:return`${t} 已加入群`;case Hr.AgreedToJoinByAdminiStrator:return`管理员已同意 ${t} 加入群`;case Hr.RefuseInvited:return`${t} 拒绝了邀请`;case Hr.RefusedByAdminiStrator:return`管理员拒绝了 ${t} 的加群请求`;case Hr.SetAdmin:return`${t} 被设为管理员`;case Hr.KickMemberNotifyAdmin:return`${t} 被 ${n} 移出群`;case Hr.KickMemberNotifyKicked:return`你被 ${n} 移出群`;case Hr.MemberLeaveNotifyAdmin:return`${t} 退出了群`;case Hr.CancelAdminNotifyCanceled:return`你被取消了管理员`;case Hr.CancelAdminNotifyAdmin:return`${t} 被取消了管理员`;case Hr.TransferGroupNotifyOldowner:return`群主已转让给 ${n}`;case Hr.TransferGroupNotifyAdmin:return`${t} 将群主转让给 ${n}`;default:return`群通知`}}function Kr(e){return e.status===Ur.Unhandle&&(e.notifyType===Hr.RequestJoinNeedAdminiStratorPass||e.notifyType===Hr.InvitedByMember||e.notifyType===Hr.InvitedNeedAdminiStratorPass)}function qr(e){switch(e.status){case Ur.Agreed:return`已同意`;case Ur.Refused:return`已拒绝`;case Ur.Ignored:return`已忽略`;default:return null}}var Jr=`flex items-center gap-1 px-3 py-1 text-xs text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-md transition-colors disabled:opacity-50`,Yr=`flex items-center gap-1 px-3 py-1 text-xs text-theme-secondary hover:bg-neutral-100 dark:hover:bg-neutral-700/50 rounded-md transition-colors disabled:opacity-50`,Xr=`flex items-center gap-1 px-3 py-1 text-xs text-red-500 hover:bg-red-50 dark:hover:bg-red-900/30 rounded-md transition-colors disabled:opacity-50`,Zr=`px-3 py-1 text-xs text-theme-muted hover:text-theme hover:bg-theme-item rounded-md transition-colors`,Qr=({item:e,time:t})=>{let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(``),c=B(e=>e.updateNotificationStatus),l=async(t,n)=>{r(t);try{await Cr(e.flag,t,n),c(`group-notify`,e.flag,t===`approve`?Ur.Agreed:Ur.Refused),L(t===`approve`?`已同意`:`已拒绝`,`success`),a(!1)}catch(e){L(e.message||`操作失败`,`error`)}finally{r(null)}},u=qr(e),d=Kr(e);return(0,I.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-3 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(`img`,{src:Hn(e.group.groupCode),alt:``,className:`w-10 h-10 rounded-full flex-shrink-0 object-cover`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme truncate`,children:e.group.groupName}),e.doubt&&(0,I.jsx)(`span`,{className:`text-xs text-amber-500 flex-shrink-0`,children:`被过滤`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint flex-shrink-0`,children:Wr(t)})]}),(0,I.jsx)(`div`,{className:`text-xs text-theme-secondary mt-0.5`,children:Gr(e)}),e.postscript&&(0,I.jsxs)(`div`,{className:`text-xs text-theme-hint mt-1 bg-theme-input rounded px-2 py-1 break-words whitespace-pre-wrap`,children:[`验证信息:`,e.postscript]}),d&&!i&&(0,I.jsxs)(`div`,{className:`flex gap-2 mt-2`,children:[(0,I.jsxs)(`button`,{onClick:()=>l(`approve`),disabled:n!==null,className:Jr,children:[n===`approve`?(0,I.jsx)(N,{size:12,className:`animate-spin`}):(0,I.jsx)(ce,{size:12}),`同意`]}),(0,I.jsxs)(`button`,{onClick:()=>a(!0),disabled:n!==null,className:Yr,children:[(0,I.jsx)(vt,{size:12}),`拒绝`]})]}),d&&i&&(0,I.jsxs)(`div`,{className:`mt-2 space-y-1.5`,children:[(0,I.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`拒绝理由(可选)`,className:`w-full px-2 py-1 text-xs bg-theme-input text-theme rounded border border-theme-divider focus:outline-none focus:border-pink-400`,onKeyDown:e=>{e.key===`Enter`&&l(`reject`,o)},autoFocus:!0}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsxs)(`button`,{onClick:()=>l(`reject`,o),disabled:n!==null,className:Xr,children:[n===`reject`?(0,I.jsx)(N,{size:12,className:`animate-spin`}):(0,I.jsx)(vt,{size:12}),`确认拒绝`]}),(0,I.jsx)(`button`,{onClick:()=>{a(!1),s(``)},disabled:n!==null,className:Zr,children:`取消`})]})]}),u&&(0,I.jsx)(`div`,{className:`text-xs mt-1 ${e.status===Ur.Agreed?`text-pink-500`:e.status===Ur.Refused?`text-theme-secondary`:`text-theme-hint`}`,children:u})]})]})},$r=({item:e,time:t})=>{let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(e.isDecide),[o,s]=(0,C.useState)(null),c=B(e=>e.updateNotificationStatus),l=async t=>{r(t);try{await wr(e.flag,t),c(`friend-request`,e.flag,0),a(!0),s(t),L(t===`approve`?`已同意`:`已拒绝`,`success`)}catch(e){L(e.message||`操作失败`,`error`)}finally{r(null)}};return(0,I.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-3 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(`img`,{src:e.friendAvatarUrl||Vn(e.friendUin),alt:``,className:`w-10 h-10 rounded-full flex-shrink-0 object-cover`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme truncate`,children:e.friendNick||e.friendUin}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint flex-shrink-0`,children:Wr(t)})]}),(0,I.jsx)(`div`,{className:`text-xs text-theme-secondary mt-0.5`,children:`请求添加你为好友`}),e.extWords&&(0,I.jsxs)(`div`,{className:`text-xs text-theme-hint mt-1 bg-theme-input rounded px-2 py-1 break-words whitespace-pre-wrap`,children:[`验证信息:`,e.extWords]}),e.addSource&&(0,I.jsxs)(`div`,{className:`text-xs text-theme-hint mt-0.5`,children:[`来源:`,e.addSource]}),!i&&(0,I.jsxs)(`div`,{className:`flex gap-2 mt-2`,children:[(0,I.jsxs)(`button`,{onClick:()=>l(`approve`),disabled:n!==null,className:Jr,children:[n===`approve`?(0,I.jsx)(N,{size:12,className:`animate-spin`}):(0,I.jsx)(ce,{size:12}),`同意`]}),(0,I.jsxs)(`button`,{onClick:()=>l(`reject`),disabled:n!==null,className:Yr,children:[n===`reject`?(0,I.jsx)(N,{size:12,className:`animate-spin`}):(0,I.jsx)(vt,{size:12}),`拒绝`]})]}),i&&(0,I.jsx)(`div`,{className:`text-xs mt-1 ${o===`approve`?`text-pink-500`:o===`reject`?`text-theme-secondary`:`text-theme-hint`}`,children:o===`approve`?`已同意`:o===`reject`?`已拒绝`:`已处理`})]})]})},ei=({item:e,time:t})=>{let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(null),c=B(e=>e.updateNotificationStatus),l=async t=>{r(t);try{t===`approve`?await Dr(e.uid):await wr(`${e.uid}|${e.reqTime}`,`reject`),c(`doubt-buddy`,e.flag,0),a(!0),s(t),L(t===`approve`?`已同意`:`已拒绝`,`success`)}catch(e){L(e.message||`操作失败`,`error`)}finally{r(null)}};return(0,I.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-3 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,I.jsx)(`img`,{src:Vn(e.uid),alt:``,className:`w-10 h-10 rounded-full object-cover`}),(0,I.jsx)(`div`,{className:`absolute -bottom-0.5 -right-0.5 bg-amber-500 rounded-full p-0.5`,children:(0,I.jsx)(et,{size:10,className:`text-white`})})]}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme truncate`,children:e.nick||e.uid}),(0,I.jsx)(`span`,{className:`text-xs text-amber-500 flex-shrink-0`,children:`被过滤`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint flex-shrink-0`,children:Wr(t)})]}),(0,I.jsx)(`div`,{className:`text-xs text-theme-secondary mt-0.5`,children:`请求添加你为好友`}),e.msg&&(0,I.jsxs)(`div`,{className:`text-xs text-theme-hint mt-1 bg-theme-input rounded px-2 py-1 break-words whitespace-pre-wrap`,children:[`验证信息:`,e.msg]}),e.source&&(0,I.jsxs)(`div`,{className:`text-xs text-theme-hint mt-0.5`,children:[`来源:`,e.source]}),e.reason&&(0,I.jsxs)(`div`,{className:`text-xs text-amber-500/80 mt-0.5`,children:[`过滤原因:`,e.reason]}),!i&&(0,I.jsxs)(`div`,{className:`flex gap-2 mt-2`,children:[(0,I.jsxs)(`button`,{onClick:()=>l(`approve`),disabled:n!==null,className:Jr,children:[n===`approve`?(0,I.jsx)(N,{size:12,className:`animate-spin`}):(0,I.jsx)(ce,{size:12}),`同意`]}),(0,I.jsxs)(`button`,{onClick:()=>l(`reject`),disabled:n!==null,className:Yr,children:[n===`reject`?(0,I.jsx)(N,{size:12,className:`animate-spin`}):(0,I.jsx)(vt,{size:12}),`拒绝`]})]}),i&&(0,I.jsx)(`div`,{className:`text-xs mt-1 ${o===`approve`?`text-pink-500`:`text-theme-secondary`}`,children:o===`approve`?`已同意`:`已拒绝`})]})]})},ti=({type:e,data:t,time:n})=>{let r=Hn(t.groupCode),i=e===`group-dismiss`?ut:je,a=e===`group-dismiss`?`群已解散`:`已退出群聊`;return(0,I.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-3 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,I.jsx)(`img`,{src:r,alt:``,className:`w-10 h-10 rounded-full object-cover`}),(0,I.jsx)(`div`,{className:`absolute -bottom-0.5 -right-0.5 bg-orange-500 rounded-full p-0.5`,children:(0,I.jsx)(i,{size:10,className:`text-white`})})]}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme truncate`,children:t.groupName||t.groupCode}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint flex-shrink-0`,children:Wr(n)})]}),(0,I.jsx)(`div`,{className:`text-xs text-orange-500 mt-0.5`,children:a})]})]})},ni=()=>{let e=B(e=>e.notifications),t=B(e=>e.clearNotificationUnread),n=B(e=>e.loadGroupNotifications),[r,i]=(0,C.useState)(!1),[a,o]=(0,C.useState)(`friend`);(0,C.useEffect)(()=>{t()},[t]);let s=async()=>{i(!0);try{await n()}finally{i(!1)}},c=e.filter(e=>e.type===`friend-request`||e.type===`doubt-buddy`),l=e.filter(e=>e.type===`group-notify`||e.type===`group-dismiss`||e.type===`group-quit`),u=c.filter(e=>e.type===`friend-request`&&!e.data.isDecide||e.type===`doubt-buddy`).length,d=l.filter(e=>e.type===`group-notify`&&Kr(e.data)).length;return(0,I.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-b border-theme-divider`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,I.jsxs)(`button`,{onClick:()=>o(`friend`),className:`flex items-center gap-1 px-2.5 py-1.5 text-xs font-medium rounded-md transition-colors ${a===`friend`?`text-pink-600 dark:text-pink-400 bg-pink-50 dark:bg-pink-900/30`:`text-theme-muted hover:text-theme hover:bg-theme-item`}`,children:[(0,I.jsx)(ft,{size:13}),`好友申请`,u>0&&(0,I.jsx)(`span`,{className:`ml-0.5 min-w-[16px] h-[16px] bg-red-500 text-white text-[10px] font-medium rounded-full flex items-center justify-center px-1`,children:u})]}),(0,I.jsxs)(`button`,{onClick:()=>o(`group`),className:`flex items-center gap-1 px-2.5 py-1.5 text-xs font-medium rounded-md transition-colors ${a===`group`?`text-pink-600 dark:text-pink-400 bg-pink-50 dark:bg-pink-900/30`:`text-theme-muted hover:text-theme hover:bg-theme-item`}`,children:[(0,I.jsx)(ht,{size:13}),`群通知`,d>0&&(0,I.jsx)(`span`,{className:`ml-0.5 min-w-[16px] h-[16px] bg-red-500 text-white text-[10px] font-medium rounded-full flex items-center justify-center px-1`,children:d})]})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-1.5`,children:(0,I.jsx)(`button`,{onClick:s,disabled:r,className:`text-xs text-pink-500 hover:text-pink-600 disabled:opacity-50`,children:r?(0,I.jsx)(N,{size:14,className:`animate-spin`}):`刷新`})})]}),(0,I.jsx)(`div`,{className:`flex-1 min-h-0 overflow-y-auto`,children:(a===`friend`?c:l).length===0?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-32 text-theme-hint text-sm`,children:a===`friend`?`暂无好友申请`:`暂无群通知`}):(0,I.jsx)(`div`,{className:`divide-y divide-theme-divider`,children:a===`friend`?c.map((e,t)=>e.type===`friend-request`?(0,I.jsx)($r,{item:e.data,time:e.time},`fr-${e.data.flag}-${t}`):e.type===`doubt-buddy`?(0,I.jsx)(ei,{item:e.data,time:e.time},`db-${e.data.flag}-${t}`):null):l.map((e,t)=>e.type===`group-notify`?(0,I.jsx)(Qr,{item:e.data,time:e.time},`gn-${e.data.flag}-${t}`):e.type===`group-dismiss`||e.type===`group-quit`?(0,I.jsx)(ti,{type:e.type,data:e.data,time:e.time},`info-${e.type}-${t}`):null)})})]})},ri=({activeTab:e,onTabChange:t,friendCategories:n,groups:r,recentChats:i,unreadCounts:a,selectedPeerId:o,onSelectFriend:s,onSelectGroup:c,onSelectRecent:l})=>{let[u,d]=(0,C.useState)(``),{groupAssistantMode:f,enterGroupAssistant:p,exitGroupAssistant:m}=B(),h=B(e=>e.groupLastTimeMap),g=B(e=>e.groupLastMessageMap),_=(0,C.useMemo)(()=>{if(!u.trim())return n;let e=u.toLowerCase();return n.map(t=>({...t,friends:t.friends.filter(t=>t.nickname.toLowerCase().includes(e)||t.remark.toLowerCase().includes(e)||t.uin.includes(u))})).filter(e=>e.friends.length>0)},[n,u]),v=(0,C.useMemo)(()=>pr(r,u),[r,u]),y=[{id:`recent`,icon:pe,label:`最近`},{id:`friends`,icon:ht,label:`好友`},{id:`groups`,icon:Fe,label:`群组`}],b=B(e=>e.notificationUnreadCount),[x,S]=(0,C.useState)(!1);return(0,I.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,I.jsxs)(`div`,{className:`flex items-center border-b border-theme-divider px-2 pt-2`,children:[(0,I.jsx)(`div`,{className:`flex flex-1`,children:y.map(n=>{let r=n.icon;return(0,I.jsxs)(`button`,{onClick:()=>{S(!1),t(n.id)},className:`flex-1 flex items-center justify-center gap-1.5 py-2.5 text-sm font-medium transition-colors rounded-t-lg ${!x&&e===n.id?`text-pink-600 dark:text-pink-400 bg-pink-50/50 dark:bg-pink-900/30`:`text-theme-muted hover:text-theme hover:bg-theme-item`}`,children:[(0,I.jsx)(r,{size:16}),n.label]},n.id)})}),(0,I.jsxs)(`button`,{onClick:()=>S(!x),className:`relative flex items-center justify-center w-9 h-9 rounded-lg transition-colors flex-shrink-0 ${x?`text-pink-600 dark:text-pink-400 bg-pink-50/50 dark:bg-pink-900/30`:`text-theme-muted hover:text-theme hover:bg-theme-item`}`,children:[(0,I.jsx)(oe,{size:16}),b>0&&(0,I.jsx)(`div`,{className:`absolute top-1 right-1 min-w-[14px] h-[14px] bg-red-500 text-white text-[10px] font-medium rounded-full flex items-center justify-center px-0.5`,children:b>99?`99+`:b})]})]}),x?(0,I.jsx)(`div`,{className:`flex-1 min-h-0`,children:(0,I.jsx)(ni,{onClose:()=>S(!1)})}):(0,I.jsxs)(I.Fragment,{children:[(e===`friends`||e===`groups`)&&(0,I.jsx)(`div`,{className:`p-3`,children:(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(Xe,{size:16,className:`absolute left-3 top-1/2 -translate-y-1/2 text-theme-hint`}),(0,I.jsx)(`input`,{type:`text`,value:u,onChange:e=>d(e.target.value),placeholder:e===`friends`?`搜索好友...`:`搜索群组...`,className:`w-full pl-9 pr-3 py-2 text-sm bg-theme-input border border-theme-input rounded-lg focus:outline-none focus:ring-2 focus:ring-pink-500/20 focus:border-pink-500/50 text-theme placeholder:text-theme-hint`})]})}),(0,I.jsxs)(`div`,{className:`flex-1 overflow-y-auto`,children:[e===`recent`&&f===`normal`&&(0,I.jsx)(oi,{items:i,unreadCounts:a,selectedPeerId:o,onSelect:l,onEnterGroupAssistant:p}),e===`recent`&&f===`assistant`&&(0,I.jsx)(ci,{groups:r,recentChats:i,groupLastTimeMap:h,groupLastMessageMap:g,unreadCounts:a,selectedPeerId:o,onSelect:c,onBack:m}),e===`friends`&&(0,I.jsx)(ii,{categories:_,selectedPeerId:o,onSelect:s}),e===`groups`&&(0,I.jsx)(ai,{items:v,unreadCounts:a,groupLastTimeMap:h,selectedPeerId:o,onSelect:c})]})]})]})},ii=({categories:e,selectedPeerId:t,onSelect:n})=>{let{expandedCategories:r,toggleCategory:i}=B(),a=(0,C.useMemo)(()=>new Set(r),[r]),o=(0,C.useMemo)(()=>e.map(e=>({...e,friends:[...e.friends].sort((e,t)=>{let n=!!(e.topTime&&e.topTime!==`0`),r=!!(t.topTime&&t.topTime!==`0`);return n&&!r?-1:!n&&r?1:0})})),[e]);return o.length===0?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-32 text-theme-hint text-sm`,children:`暂无好友`}):(0,I.jsx)(`div`,{className:`py-1`,children:o.map(e=>{let r=a.has(e.categoryId);return(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{onClick:()=>i(e.categoryId),className:`flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-theme-item-hover text-theme-secondary`,children:[r?(0,I.jsx)(le,{size:14}):(0,I.jsx)(j,{size:14}),(0,I.jsx)(`span`,{className:`text-xs font-medium`,children:e.categoryName}),(0,I.jsxs)(`span`,{className:`text-xs text-theme-hint`,children:[e.onlineCount,`/`,e.memberCount]})]}),r&&e.friends.map(e=>(0,I.jsx)(Br,{friend:e,isSelected:t===e.uin,onClick:()=>n(e)},e.uid))]},e.categoryId)})})},ai=({items:e,unreadCounts:t,selectedPeerId:n,onSelect:r,groupLastTimeMap:i,subtitleMap:a,showPinnedStyle:o=!1})=>{let s=(0,C.useMemo)(()=>[...e].sort((e,t)=>{if(e.isTop&&!t.isTop)return-1;if(!e.isTop&&t.isTop)return 1;if(i){let n=i[e.groupCode]||0,r=i[t.groupCode]||0;if(n!==r)return r-n}return 0}),[e,i]);return s.length===0?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-32 text-theme-hint text-sm`,children:`暂无群组`}):(0,I.jsx)(`div`,{className:`py-1`,children:s.map(e=>{let i=t.get(`2_${e.groupCode}`)||0;return(0,I.jsx)(Vr,{group:e,isSelected:n===e.groupCode,onClick:()=>r(e),showPinnedStyle:o,unreadCount:i,subtitle:a?.[e.groupCode]},e.groupCode)})})},oi=({items:e,unreadCounts:t,selectedPeerId:n,onSelect:r,onEnterGroupAssistant:i})=>{let{togglePinChat:a,removeRecentChat:o,friendCategories:s,groups:c}=B(),[l,u]=(0,C.useState)(null),d=(0,C.useRef)(null),f=Rr(l?.x||0,l?.y||0,d),p=(0,C.useMemo)(()=>{let e=c.filter(e=>e.msgMask===2),n=0;return e.forEach(e=>{let r=t.get(`2_${e.groupCode}`)||0;n+=r}),n},[c,t]),m=(0,C.useMemo)(()=>c.filter(e=>e.msgMask===2).length,[c]),h=(0,C.useMemo)(()=>e.filter(e=>e.chatType===2?c.find(t=>t.groupCode===e.peerId)?.msgMask!==2:!0),[e,c]),g=e=>{if(e.chatType===2){let t=c.find(t=>t.groupCode===e.peerId);if(t?.remarkName&&t.remarkName!==t.groupName)return t.remarkName}else if(e.chatType===1||e.chatType===100)for(let t of s){let n=t.friends.find(t=>t.uin===e.peerId);if(n?.remark&&n.remark!==n.nickname)return n.remark}return e.peerName},_=(e,t)=>{e.preventDefault(),u({x:e.clientX,y:e.clientY,item:t})},v=()=>{u(null)};return h.length===0&&m===0?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-32 text-theme-hint text-sm`,children:`暂无最近会话`}):(0,I.jsxs)(`div`,{className:`py-1`,onClick:v,children:[m>0&&(0,I.jsxs)(`div`,{onClick:i,className:`flex items-center gap-3 px-3 py-2.5 cursor-pointer transition-colors hover:bg-theme-item-hover`,children:[(0,I.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-full bg-gradient-to-br from-blue-400 to-blue-600 flex items-center justify-center`,children:(0,I.jsx)(Fe,{size:20,className:`text-white`})}),p>0&&(0,I.jsx)(`div`,{className:`absolute -top-1 -right-1 min-w-[18px] h-[18px] bg-red-500 text-white text-xs font-medium rounded-full flex items-center justify-center px-1`,children:p})]}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme`,children:`群助手`})}),(0,I.jsxs)(`div`,{className:`text-xs text-theme-hint truncate mt-0.5`,children:[m,` 个群聊`]})]})]}),h.map(e=>(0,I.jsx)(si,{item:e,displayName:g(e),unreadCount:t.get(`${e.chatType}_${e.peerId}`)||e.unreadCount,isSelected:n===e.peerId,onClick:()=>r(e),onContextMenu:t=>_(t,e)},`${e.chatType}_${e.peerId}`)),l&&(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:v,onContextMenu:e=>{e.preventDefault(),v()}}),(0,I.jsxs)(`div`,{ref:d,className:`fixed z-50 bg-popup backdrop-blur-sm border border-theme-divider rounded-lg shadow-lg py-1 min-w-[160px]`,style:{left:f.left,top:f.top,visibility:f.ready?`visible`:`hidden`},onContextMenu:e=>e.preventDefault(),children:[(0,I.jsxs)(`button`,{onClick:async()=>{if(l){try{await a(l.item.chatType,l.item.peerId)}catch(e){console.error(`置顶失败:`,e),alert(`置顶失败: ${e.message||`未知错误`}`)}v()}},className:`w-full px-3 py-2 text-left text-sm hover:bg-theme-item-hover flex items-center gap-2 text-theme`,children:[(0,I.jsx)(Ue,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:l.item.pinned?`取消置顶`:`置顶`})]}),l.item.chatType===2&&(0,I.jsx)(zr,{groupCode:l.item.peerId,onClose:v}),(0,I.jsxs)(`button`,{onClick:()=>{l&&(o(l.item.chatType,l.item.peerId),v())},className:`w-full px-3 py-2 text-left text-sm hover:bg-theme-item-hover flex items-center gap-2 text-red-500`,children:[(0,I.jsx)(F,{size:14,className:`flex-shrink-0`}),(0,I.jsx)(`span`,{className:`flex-1`,children:`删除`})]})]})]}),document.body)]})},si=({item:e,displayName:t,unreadCount:n,isSelected:r,onClick:i,onContextMenu:a})=>(0,I.jsxs)(`div`,{onClick:i,onContextMenu:a,className:`flex items-center gap-3 px-3 py-2.5 cursor-pointer transition-colors ${r?`bg-pink-500/20`:e.pinned?`bg-theme-item-hover`:`hover:bg-theme-item-hover`}`,children:[(0,I.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,I.jsx)(`img`,{src:e.peerAvatar,alt:t,className:`w-10 h-10 rounded-full object-cover`}),n>0&&(0,I.jsx)(`div`,{className:`absolute -top-1 -right-1 min-w-[18px] h-[18px] bg-red-500 text-white text-xs font-medium rounded-full flex items-center justify-center px-1`,children:n})]}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme truncate`,children:t}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint flex-shrink-0 ml-2`,children:_r(e.lastTime)})]}),(0,I.jsx)(`div`,{className:`text-xs text-theme-hint truncate mt-0.5`,children:e.lastMessage})]})]}),ci=({groups:e,recentChats:t,groupLastTimeMap:n,groupLastMessageMap:r,unreadCounts:i,selectedPeerId:a,onSelect:o,onBack:s})=>{let c=(0,C.useMemo)(()=>e.filter(e=>e.msgMask===2),[e]),l=(0,C.useMemo)(()=>{let e={...r};return t.forEach(t=>{t.chatType===2&&t.lastMessage&&(e[t.peerId]=t.lastMessage)}),e},[r,t]);return(0,I.jsxs)(`div`,{className:`py-1`,children:[(0,I.jsxs)(`div`,{onClick:s,className:`flex items-center gap-3 px-3 py-2.5 cursor-pointer transition-colors hover:bg-theme-item-hover border-b border-theme-divider`,children:[(0,I.jsx)(j,{size:16,className:`transform rotate-180 text-theme-secondary`}),(0,I.jsx)(`span`,{className:`text-sm font-medium text-theme`,children:`返回最近会话`})]}),(0,I.jsxs)(`div`,{className:`px-3 py-2 text-xs text-theme-hint`,children:[`群助手 (`,c.length,`)`]}),c.length===0?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-32 text-theme-hint text-sm`,children:`暂无群聊`}):(0,I.jsx)(ai,{items:c,unreadCounts:i,groupLastTimeMap:n,subtitleMap:l,selectedPeerId:a,onSelect:o,showPinnedStyle:!0})]})};function li(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o;n.key&&n.debug?.call(n)&&(o=Date.now());let s=e();if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug?.call(n)&&(c=Date.now()),i=t(...s),n.key&&n.debug?.call(n)){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
|
|
21
21
|
font-size: .6rem;
|
|
22
22
|
font-weight: bold;
|
|
23
|
-
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function ui(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var di=(e,t)=>Math.abs(e-t)<1.01,fi=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},pi=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},mi=e=>e,hi=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},gi=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(pi(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(pi(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},_i={passive:!0},vi=typeof window>`u`?!0:`onscrollend`in window,yi=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&vi?()=>void 0:fi(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,_i);let l=e.options.useScrollendEvent&&vi;return l&&n.addEventListener(`scrollend`,c,_i),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},bi=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},xi=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},Si=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:mi,rangeExtractor:hi,onChange:()=>{},measureElement:bi,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=li(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=li(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=li(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let l=this.measurementsCache.slice(0,c),u=Array(a).fill(void 0);for(let e=0;e<c;e++){let t=l[e];t&&(u[t.lane]=e)}for(let i=c;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),c,d,f=o===`estimate`||s.has(e);if(a!==void 0&&this.options.lanes>1){c=a;let e=u[c],r=e===void 0?void 0:l[e];d=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?l[i-1]:this.getFurthestMeasurement(l,i);d=e?e.end+this.options.gap:t+n,c=e?e.lane:i%this.options.lanes,this.options.lanes>1&&f&&this.laneAssignments.set(i,c)}let p=s.get(e),m=typeof p==`number`?p:this.options.estimateSize(i),h=d+m;l[i]={index:i,start:d,size:m,end:h,key:e,lane:c},u[c]=i}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=li(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?wi({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=li(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&(this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.getVirtualItems=li(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return ui(t[Ci(0,t.length-1,e=>ui(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t);this.scrollState={index:null,align:t,behavior:n,startedAt:this.now(),lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e;this.scrollState={index:null,align:`start`,behavior:t,startedAt:this.now(),lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&di(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior=`auto`,this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}));this.scheduleScrollReconcile()}},Ci=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function wi({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=Ci(0,i,a,n),s=o;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let a=Array(r).fill(0);for(;s<i&&a.some(e=>e<n+t);){let t=e[s];a[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var Ti=typeof document<`u`?C.useLayoutEffect:C.useEffect;function Ei({useFlushSync:e=!0,...t}){let n=C.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,Ct.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=C.useState(()=>new Si(r));return i.setOptions(r),Ti(()=>i._didMount(),[]),Ti(()=>i._willUpdate()),i}function Di(e){return Ei({observeElementRect:gi,observeElementOffset:yi,scrollToFn:xi,...e})}var Oi=`webqq-messages`,ki=1,Ai=`messages`,ji=100,V=null;function H(){return V?Promise.resolve(V):new Promise((e,t)=>{let n=indexedDB.open(Oi,ki);n.onerror=()=>t(n.error),n.onsuccess=()=>{V=n.result,e(V)},n.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(Ai)||t.createObjectStore(Ai,{keyPath:`chatKey`})}})}async function Mi(e,t){try{let n=await H(),r=`${e}_${t}`;return new Promise(e=>{let t=n.transaction(Ai,`readonly`).objectStore(Ai).get(r);t.onsuccess=()=>{let n=t.result;n&&n.messages?e(n.messages):e(null)},t.onerror=()=>e(null)})}catch{return null}}async function Ni(e,t,n){try{let r=await H(),i=`${e}_${t}`,a=n.slice(-ji);return new Promise((e,t)=>{let n=r.transaction(Ai,`readwrite`).objectStore(Ai).put({chatKey:i,messages:a,timestamp:Date.now()});n.onsuccess=()=>e(),n.onerror=()=>t(n.error)})}catch(e){console.error(`Failed to cache messages:`,e)}}async function Pi(e,t,n){try{let r=await Mi(e,t);r&&await Ni(e,t,[...r.slice(-(ji-1)),n])}catch(e){console.error(`Failed to append message:`,e)}}async function Fi(e,t,n){try{let r=await Mi(e,t);r&&await Ni(e,t,r.filter(e=>e.msgId!==n))}catch(e){console.error(`Failed to remove message:`,e)}}async function Ii(e,t,n,r,i){try{let a=await Mi(e,t);if(!a)return;await Ni(e,t,a.map(e=>{if(e.msgSeq!==n)return e;let t=e.emojiLikesList||[];if(i){let n=t.findIndex(e=>e.emojiId===r);if(n>=0){let r=[...t];return r[n]={...r[n],likesCnt:String(parseInt(r[n].likesCnt)+1)},{...e,emojiLikesList:r}}else return{...e,emojiLikesList:[...t,{emojiId:r,emojiType:parseInt(r)>999?`2`:`1`,likesCnt:`1`,isClicked:!1}]}}else{let n=t.findIndex(e=>e.emojiId===r);if(n>=0){let r=[...t],i=parseInt(r[n].likesCnt)-1;return i<=0?r.splice(n,1):r[n]={...r[n],likesCnt:String(i)},{...e,emojiLikesList:r}}}return e}))}catch(e){console.error(`Failed to update emoji reaction:`,e)}}async function Li(e,t,n,r){try{let i=await Mi(e,t);if(!i)return!1;let a=!1,o=i.map(e=>e.msgId===n||r&&e.msgSeq===r?(a=!0,{...e,recallTime:String(Math.floor(Date.now()/1e3))}):e);return a&&await Ni(e,t,o),a}catch(e){return console.error(`Failed to mark message as recalled:`,e),!1}}var Ri=({level:e})=>{let t=e%4,n=Math.floor(e/4)%4,r=Math.floor(e/16)%4,i=Math.floor(e/64)%4,a=Math.floor(e/256),o=[];for(let e=0;e<a;e++)o.push((0,I.jsx)(`span`,{className:`text-amber-400 text-xs font-bold`,title:`金企鹅`,children:`🐧`},`penguin-${e}`));for(let e=0;e<i;e++)o.push((0,I.jsx)(ge,{size:14,className:`text-amber-500`},`crown-${e}`));for(let e=0;e<r;e++)o.push((0,I.jsx)(ct,{size:14,className:`text-orange-400`},`sun-${e}`));for(let e=0;e<n;e++)o.push((0,I.jsx)(ze,{size:14,className:`text-blue-400`},`moon-${e}`));for(let e=0;e<t;e++)o.push((0,I.jsx)(ot,{size:14,className:`text-yellow-400 fill-yellow-400`},`star-${e}`));return(0,I.jsx)(`div`,{className:`flex items-center gap-0.5 flex-wrap`,children:o})},zi=({profile:e,loading:t,position:n,onClose:r,isFriend:i,onFriendDeleted:a})=>{let o=(0,C.useRef)(null),[s,c]=(0,C.useState)({left:n.x,top:n.y}),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1);if((0,C.useEffect)(()=>{if(!o.current)return;let e=o.current.offsetHeight||400,t=n.x,r=n.y;t+320>window.innerWidth-20&&(t=window.innerWidth-320-20),t<20&&(t=20),r+e>window.innerHeight-20&&(r=window.innerHeight-e-20),r<20&&(r=20),c({left:t,top:r})},[n,e,t]),!e&&!t)return null;let p=e=>e===1?`男`:e===2?`女`:``,m=e=>{if(!e)return``;let t=new Date(e*1e3),n=new Date,r=n.getFullYear()-t.getFullYear(),i=n.getMonth()-t.getMonth(),a=r+(i<0?-1:0);if(a<1){let e=r*12+i;return e>0?`${e}个月`:`不足1个月`}return`${a}年`},h=e=>e===`owner`?`群主`:e===`admin`?`管理员`:``,g=e=>e===`owner`?`bg-amber-500 text-white`:e===`admin`?`bg-green-500 text-white`:``,_=async()=>{if(e){f(!0);try{await vr(e.uid),L(`已删除好友`,`success`),a?.(e.uid),r()}catch(e){L(e.message||`删除好友失败`,`error`)}finally{f(!1),u(!1)}}},v=e=>e?new Date(e*1e3).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`}):``;return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:r}),(0,I.jsxs)(`div`,{ref:o,className:`fixed z-50 border border-theme-divider rounded-xl shadow-xl overflow-hidden bg-popup backdrop-blur-sm`,style:{left:s.left,top:s.top,width:320,maxHeight:`calc(100vh - 40px)`},onClick:e=>e.stopPropagation(),children:[t?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-40`,children:(0,I.jsx)(N,{size:24,className:`animate-spin text-pink-500`})}):e&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`bg-gradient-to-r from-pink-400 to-amber-300 p-4 relative`,children:[i&&!e.groupRole&&(0,I.jsx)(`button`,{onClick:()=>u(!0),className:`absolute top-2 right-2 p-1.5 rounded-full bg-white/20 hover:bg-white/40 text-white transition-colors`,title:`删除好友`,children:(0,I.jsx)(F,{size:16})}),(0,I.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,I.jsx)(`img`,{src:e.avatar,alt:e.nickname,className:`w-16 h-16 rounded-full border-3 border-white/80 object-cover flex-shrink-0`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0 text-white pt-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,I.jsx)(`span`,{className:`font-bold text-lg truncate`,children:e.nickname}),e.groupRole&&h(e.groupRole)&&(0,I.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${g(e.groupRole)}`,children:h(e.groupRole)})]}),e.remark&&e.remark!==e.nickname&&(0,I.jsxs)(`div`,{className:`text-white/80 text-sm truncate mb-1`,children:[`备注: `,e.remark]}),(0,I.jsx)(`div`,{className:`text-white/90 text-sm`,children:e.uin}),e.qid&&(0,I.jsxs)(`div`,{className:`text-white/70 text-xs mt-0.5`,children:[`QID: `,e.qid]})]})]})]}),(0,I.jsxs)(`div`,{className:`p-4 overflow-y-auto`,style:{maxHeight:`calc(100vh - 40px - 120px)`},children:[e.signature&&(0,I.jsx)(`div`,{className:`text-theme-secondary text-sm mb-3 bg-theme-item/50 rounded-lg px-3 py-2 max-h-24 overflow-y-auto break-words`,children:e.signature}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-2 text-sm`,children:[p(e.sex)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`性别`}),(0,I.jsx)(`span`,{className:`text-theme`,children:p(e.sex)})]}),e.birthday&&e.birthday!==`0-0-0`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`生日`}),(0,I.jsx)(`span`,{className:`text-theme`,children:e.birthday})]}),m(e.regTime)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`Q龄`}),(0,I.jsx)(`span`,{className:`text-theme`,children:m(e.regTime)})]}),e.level>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`等级`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(`span`,{className:`text-theme`,children:[`Lv.`,e.level]}),(0,I.jsx)(Ri,{level:e.level})]})]})]}),(e.groupCard||e.groupTitle||e.groupLevel)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`border-t border-theme-divider my-3`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-hint mb-2`,children:`群信息`}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-2 text-sm`,children:[e.groupCard&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`群名片`}),(0,I.jsx)(`span`,{className:`text-theme truncate`,children:e.groupCard})]}),e.groupTitle&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`群头衔`}),(0,I.jsx)(`span`,{className:`text-pink-500`,children:e.groupTitle})]}),e.groupLevel!==void 0&&e.groupLevel>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`群等级`}),(0,I.jsxs)(`span`,{className:`text-theme`,children:[`Lv.`,e.groupLevel]})]}),e.joinTime&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`入群时间`}),(0,I.jsx)(`span`,{className:`text-theme`,children:v(e.joinTime)})]}),e.lastSpeakTime&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`最后发言`}),(0,I.jsx)(`span`,{className:`text-theme`,children:v(e.lastSpeakTime)})]})]})]})]})]}),l&&e&&(0,I.jsx)(`div`,{className:`absolute inset-0 bg-black/50 flex items-center justify-center rounded-xl`,children:(0,I.jsxs)(`div`,{className:`bg-popup m-4 p-4 rounded-lg shadow-lg max-w-[280px]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:`删除好友`}),(0,I.jsx)(`button`,{onClick:()=>u(!1),className:`text-theme-muted hover:text-theme`,children:(0,I.jsx)(vt,{size:18})})]}),(0,I.jsxs)(`p`,{className:`text-sm text-theme-secondary mb-4`,children:[`确定要删除好友 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:e.remark||e.nickname}),` 吗?删除后将无法恢复。`]}),(0,I.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,I.jsx)(`button`,{onClick:()=>u(!1),className:`px-3 py-1.5 text-sm rounded-lg bg-theme-item hover:bg-theme-hover text-theme transition-colors`,disabled:d,children:`取消`}),(0,I.jsxs)(`button`,{onClick:_,className:`px-3 py-1.5 text-sm rounded-lg bg-red-500 hover:bg-red-600 text-white transition-colors flex items-center gap-1`,disabled:d,children:[d&&(0,I.jsx)(N,{size:14,className:`animate-spin`}),`删除`]})]})]})})]})]}),document.body)},Bi=({profile:e,loading:t,position:n,onClose:r,onQuitGroup:i})=>{let a=(0,C.useRef)(null),[o,s]=(0,C.useState)({left:n.x,top:n.y}),[c,l]=(0,C.useState)(!1),u=Bn(),d=e?.ownerUin===u;return(0,C.useEffect)(()=>{if(!a.current)return;let e=a.current.offsetHeight||300,t=n.x,r=n.y;t+320>window.innerWidth-20&&(t=window.innerWidth-320-20),t<20&&(t=20),r+e>window.innerHeight-20&&(r=window.innerHeight-e-20),r<20&&(r=20),s({left:t,top:r})},[n,e,t]),!e&&!t?null:(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:r}),(0,I.jsx)(`div`,{ref:a,className:`fixed z-50 border border-theme-divider rounded-xl shadow-xl overflow-hidden bg-popup backdrop-blur-sm`,style:{left:o.left,top:o.top,width:320,maxHeight:`calc(100vh - 40px)`},onClick:e=>e.stopPropagation(),children:t?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-40`,children:(0,I.jsx)(N,{size:24,className:`animate-spin text-pink-500`})}):e&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`bg-gradient-to-r from-blue-400 to-cyan-300 p-4 relative`,children:[i&&(0,I.jsx)(`button`,{onClick:()=>{l(!0)},className:`absolute top-3 right-3 p-1.5 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors`,title:d?`解散该群`:`退出该群`,children:(0,I.jsx)(je,{size:16})}),(0,I.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,I.jsx)(`img`,{src:e.avatar,alt:e.groupName,className:`w-16 h-16 rounded-lg border-3 border-white/80 object-cover flex-shrink-0`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0 text-white pt-1 pr-6`,children:[(0,I.jsx)(`div`,{className:`font-bold text-lg truncate mb-1`,children:e.groupName}),e.remarkName&&e.remarkName!==e.groupName&&(0,I.jsxs)(`div`,{className:`text-white/80 text-sm truncate mb-1`,children:[`备注: `,e.remarkName]}),(0,I.jsx)(`div`,{className:`text-white/90 text-sm`,children:e.groupCode})]})]})]}),(0,I.jsxs)(`div`,{className:`p-4 overflow-y-auto`,style:{maxHeight:`calc(100vh - 40px - 140px)`},children:[(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-2 text-sm`,children:[(0,I.jsxs)(`span`,{className:`text-theme-hint flex items-center gap-1`,children:[(0,I.jsx)(ht,{size:14}),`成员`]}),(0,I.jsxs)(`span`,{className:`text-theme`,children:[e.memberCount,e.maxMemberCount?` / ${e.maxMemberCount}`:``]}),e.ownerName&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`text-theme-hint flex items-center gap-1`,children:[(0,I.jsx)(ge,{size:14}),`群主`]}),(0,I.jsx)(`span`,{className:`text-theme truncate`,children:e.ownerName})]}),e.createTime&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`text-theme-hint flex items-center gap-1`,children:[(0,I.jsx)(se,{size:14}),`创建`]}),(0,I.jsx)(`span`,{className:`text-theme`,children:(e=>e?new Date(e*1e3).toLocaleDateString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`}):``)(e.createTime)})]})]}),e.description&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`border-t border-theme-divider my-3`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-hint mb-2`,children:`群简介`}),(0,I.jsx)(`div`,{className:`text-theme-secondary text-sm bg-theme-item/50 rounded-lg px-3 py-2 break-words whitespace-pre-wrap`,style:{maxHeight:`120px`,overflowY:`auto`},children:e.description})]}),e.announcement&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`border-t border-theme-divider my-3`}),(0,I.jsxs)(`div`,{className:`text-xs text-theme-hint mb-2 flex items-center gap-1`,children:[(0,I.jsx)(nt,{size:12}),`群公告`]}),(0,I.jsx)(`div`,{className:`text-theme-secondary text-sm bg-theme-item/50 rounded-lg px-3 py-2 break-words whitespace-pre-wrap`,style:{maxHeight:`120px`,overflowY:`auto`},children:e.announcement})]})]})]})}),c&&e&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-black/50`,onClick:()=>l(!1)}),(0,I.jsxs)(`div`,{className:`fixed z-[70] top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-theme-card border border-theme-divider rounded-xl shadow-xl p-6 min-w-[320px]`,children:[(0,I.jsx)(`h3`,{className:`text-lg font-medium text-theme mb-4`,children:d?`确认解散群聊`:`确认退出群聊`}),(0,I.jsx)(`p`,{className:`text-theme-secondary mb-6`,children:d?(0,I.jsxs)(I.Fragment,{children:[`确定要解散群 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:e.groupName}),` 吗?此操作不可撤销,所有群成员将被移出。`]}):(0,I.jsxs)(I.Fragment,{children:[`确定要退出群 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:e.groupName}),` 吗?`]})}),(0,I.jsxs)(`div`,{className:`flex justify-end gap-3`,children:[(0,I.jsx)(`button`,{onClick:()=>l(!1),className:`px-4 py-2 text-sm text-theme-secondary hover:bg-theme-item rounded-lg transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:()=>{e&&i&&i(e.groupCode,d),l(!1),r()},className:`px-4 py-2 text-sm bg-red-500 hover:bg-red-600 text-white rounded-lg transition-colors`,children:d?`确认解散`:`确认退出`})]})]})]})]}),document.body)},Vi=({url:e,onClose:t})=>e?(0,Ct.createPortal)((0,I.jsxs)(`div`,{className:`fixed inset-0 z-[10000] flex items-center justify-center bg-black/80`,onClick:t,children:[(0,I.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-2 text-white/80 hover:text-white bg-black/50 rounded-full`,children:(0,I.jsx)(vt,{size:24})}),(0,I.jsx)(`img`,{src:e,alt:`预览`,className:`max-w-[90vw] max-h-[90vh] object-contain`,onClick:e=>e.stopPropagation()})]}),document.body):null,Hi=({videoInfo:e,onClose:t})=>{let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(null);return(0,C.useEffect)(()=>{if(!e){r(null),s(null);return}a(!0),s(null),er(e.chatType,e.peerUid,e.msgId,e.elementId).then(r).catch(e=>s(e.message||`获取视频失败`)).finally(()=>a(!1))},[e]),e?(0,Ct.createPortal)((0,I.jsxs)(`div`,{className:`fixed inset-0 z-[10000] flex items-center justify-center bg-black/80`,onClick:t,children:[(0,I.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-2 text-white/80 hover:text-white bg-black/50 rounded-full z-10`,children:(0,I.jsx)(vt,{size:24})}),i&&(0,I.jsxs)(`div`,{className:`text-white flex items-center gap-2`,children:[(0,I.jsx)(N,{size:24,className:`animate-spin`}),`加载中...`]}),o&&(0,I.jsx)(`div`,{className:`text-red-400`,children:o}),n&&!i&&(0,I.jsx)(`video`,{src:n,controls:!0,autoPlay:!0,className:`max-w-[90vw] max-h-[90vh]`,onClick:e=>e.stopPropagation()})]}),document.body):null},Ui=C.createContext(null),Wi=C.createContext(null),Gi=C.createContext(null),Ki=e=>e?e.startsWith(`blob:`)?e:e.includes(`qpic.cn`)||e.includes(`multimedia.nt.qq.com.cn`)?`/api/webqq/image-proxy?url=${encodeURIComponent(e)}&token=${encodeURIComponent(rn()||``)}`:e:``,qi=(0,C.memo)(({element:e,message:t})=>{let[n,r]=(0,C.useState)(!1),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),u=C.useContext(Ui),d=C.useContext(Wi),f=C.useContext(Gi);if(e.textElement)return(0,I.jsx)(`span`,{className:`whitespace-pre-wrap break-all`,style:{overflowWrap:`anywhere`,wordBreak:`break-all`},children:e.textElement.content});if(e.picElement){let o=e.picElement,s=Ki(o.originImageUrl?o.originImageUrl.startsWith(`http`)?o.originImageUrl:`https://gchat.qpic.cn${o.originImageUrl}`:``),c=o.picWidth||200,l=o.picHeight||200;return l>200&&(c=c*200/l,l=200),c>300&&(l=l*300/c,c=300),(0,I.jsxs)(`div`,{className:`relative rounded-lg overflow-hidden bg-theme-item cursor-pointer`,style:{width:c,height:l},onClick:()=>u?.showPreview(s),onContextMenu:n=>{t&&(n.preventDefault(),n.stopPropagation(),f?.showMenu(n,t,e.elementId))},children:[!n&&!i&&(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-theme-hint`,children:(0,I.jsx)(N,{size:24,className:`animate-spin`})}),i&&(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-theme-hint text-xs`,children:`图片加载失败`}),(0,I.jsx)(`img`,{src:s,alt:`图片`,loading:`lazy`,className:`w-full h-full object-cover transition-opacity ${n?`opacity-100`:`opacity-0`}`,onLoad:()=>r(!0),onError:()=>a(!0)})]})}if(e.faceElement){let t=e.faceElement.faceIndex,n=e.faceElement.faceText;return(0,I.jsx)(`img`,{src:`/face/${t}.png`,alt:n||`[表情${t}]`,title:n||`表情${t}`,className:`inline-block align-text-bottom`,style:{width:24,height:24},onError:e=>{let r=e.target;r.style.display=`none`;let i=document.createElement(`span`);i.textContent=n||`[表情${t}]`,r.parentNode?.insertBefore(i,r)}})}if(e.fileElement)return(0,I.jsxs)(`span`,{children:[`[文件: `,e.fileElement.fileName,`]`]});if(e.pttElement)return(0,I.jsx)(Xi,{element:e,message:t});if(e.videoElement){let n=e.videoElement,r=n.thumbWidth||200,i=n.thumbHeight||150;i>200&&(r=r*200/i,i=200),r>300&&(i=i*300/r,r=300);let a=``;if(n.thumbPath){let e;n.thumbPath instanceof Map?e=n.thumbPath.values().next().value:typeof n.thumbPath==`object`&&(e=Object.values(n.thumbPath)[0]),e&&(a=`/api/webqq/file-proxy?path=${encodeURIComponent(e)}&token=${encodeURIComponent(rn()||``)}`)}let u=n.fileTime||0,f=`${Math.floor(u/60)}:${(u%60).toString().padStart(2,`0`)}`;return(0,I.jsxs)(`div`,{className:`relative rounded-lg overflow-hidden bg-theme-item cursor-pointer group`,style:{width:r,height:i},onClick:()=>{t&&e.elementId&&d?.showPreview(t.chatType,t.peerUid,t.msgId,e.elementId)},children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-gray-200 dark:bg-gray-700`}),a?(0,I.jsxs)(I.Fragment,{children:[!o&&!c&&(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-theme-hint`,children:(0,I.jsx)(N,{size:24,className:`animate-spin`})}),(0,I.jsx)(`img`,{src:a,alt:`视频缩略图`,loading:`lazy`,className:`absolute inset-0 w-full h-full object-cover transition-opacity ${o?`opacity-100`:`opacity-0`}`,onLoad:()=>s(!0),onError:()=>l(!0)})]}):(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-theme-hint text-xs`,children:`视频`}),(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-full bg-black/50 flex items-center justify-center group-hover:bg-black/70 transition-colors`,children:(0,I.jsx)(`div`,{className:`w-0 h-0 border-t-8 border-t-transparent border-l-12 border-l-white border-b-8 border-b-transparent ml-1`,style:{borderLeftWidth:`14px`}})})}),(0,I.jsx)(`div`,{className:`absolute bottom-1 right-1 px-1.5 py-0.5 bg-black/60 rounded text-white text-xs`,children:f})]})}if(e.grayTipElement){let t=e.grayTipElement;if(t.jsonGrayTipElement?.jsonStr)try{let e=JSON.parse(t.jsonGrayTipElement.jsonStr);if(e.items)return(0,I.jsx)(`span`,{className:`text-theme-hint text-xs`,children:e.items.map(e=>e.txt||``).join(``)||`[戳一戳]`})}catch{}return(0,I.jsx)(`span`,{className:`text-theme-hint text-xs`,children:`[系统提示]`})}if(e.multiForwardMsgElement)return(0,I.jsx)(ea,{element:e});if(e.arkElement){try{let t=JSON.parse(e.arkElement.bytesData);if(t.app===`com.tencent.multimsg`&&t.meta?.detail?.resid)return(0,I.jsx)(ta,{arkData:t})}catch{}return(0,I.jsx)(`span`,{children:`[卡片消息]`})}if(e.marketFaceElement){let{emojiId:t,faceName:n,supportSize:r}=e.marketFaceElement,{width:i=200,height:a=200}=r?.[0]??{};return(0,I.jsx)(`img`,{src:`https://gxh.vip.qq.com/club/item/parcel/item/${t.substring(0,2)}/${t}/raw${Math.min(i,300)}.gif`,alt:n||`[表情包]`,title:n,className:`inline-block align-text-bottom rounded`,style:{maxWidth:Math.min(i,200),maxHeight:Math.min(a,200)},onError:e=>{let t=e.target;t.style.display=`none`;let r=document.createElement(`span`);r.textContent=`[${n||`表情包`}]`,t.parentNode?.insertBefore(r,t)}})}return null}),Ji=e=>!!(e.textElement||e.picElement||e.fileElement||e.pttElement||e.videoElement||e.faceElement||e.grayTipElement||e.arkElement||e.marketFaceElement||e.multiForwardMsgElement),Yi=e=>!e.elements||e.elements.length===0?!1:e.elements.every(e=>e.grayTipElement||e.replyElement),Xi=({element:e,message:t})=>{let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(!1),f=(0,C.useRef)(null),p=e.pttElement,m=p.duration||0,h=Math.floor(m/60),g=m%60,_=h>0?`${h}:${g.toString().padStart(2,`0`)}`:`${g}"`,v=p.text,y=Math.min(200,Math.max(80,80+m*3));return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-green-100 dark:bg-green-900/40 rounded-full cursor-pointer hover:bg-green-200 dark:hover:bg-green-900/60 transition-colors`,style:{width:y},onClick:async()=>{if(!(!t||!p.fileUuid||u)){if(c&&f.current){f.current.pause(),l(!1);return}if(f.current&&f.current.readyState>=2){f.current.play(),l(!0);return}d(!0);try{let e=t.chatType===2;console.log(`pttElement:`,p);let n=cr(p.fileUuid,e,p.filePath);console.log(`音频代理URL:`,n);let r=new Audio;f.current=r,r.onended=()=>l(!1),r.onerror=e=>{fetch(n).then(e=>e.text()).then(e=>{console.error(`音频加载错误,响应内容:`,e.substring(0,200))}).catch(()=>{}),console.error(`音频加载错误:`,e,r.error,`URL:`,n),l(!1),d(!1)},r.onloadeddata=async()=>{d(!1);try{await r.play(),l(!0)}catch(e){console.error(`播放失败:`,e)}},r.src=n}catch(e){console.error(`获取语音URL失败:`,e),d(!1)}}},title:`点击播放`,children:[u?(0,I.jsx)(N,{size:16,className:`text-green-600 dark:text-green-400 flex-shrink-0 animate-spin`}):c?(0,I.jsx)(P,{size:16,className:`text-green-600 dark:text-green-400 flex-shrink-0`}):(0,I.jsx)(We,{size:16,className:`text-green-600 dark:text-green-400 flex-shrink-0`}),(0,I.jsx)(`div`,{className:`flex-1 flex items-center gap-0.5`,children:[1,2,3,4,5].map(e=>(0,I.jsx)(`div`,{className:`w-0.5 bg-green-400 dark:bg-green-500 rounded-full transition-all ${c?`animate-pulse`:``}`,style:{height:`${8+Math.random()*8}px`}},e))}),(0,I.jsx)(`span`,{className:`text-xs text-green-700 dark:text-green-300 flex-shrink-0`,children:_})]}),!v&&n===null&&(0,I.jsx)(`button`,{onClick:async()=>{if(!(!t||i||n!==null)){a(!0),s(!1);try{r(await ir(t.msgId,t.chatType,t.peerUid,e)||`(无法识别)`)}catch(e){console.error(`语音转文字失败:`,e),s(!0),r(`转换失败`)}finally{a(!1)}}},disabled:i,className:`w-6 h-6 flex items-center justify-center rounded-full bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-500 dark:text-gray-300 hover:text-gray-700 dark:hover:text-white text-xs font-medium transition-colors disabled:opacity-50`,title:`语音转文字`,children:i?(0,I.jsx)(N,{size:12,className:`animate-spin`}):`文`})]}),(v||n)&&(0,I.jsx)(`div`,{className:`text-sm px-3 py-1.5 bg-gray-100 dark:bg-gray-800 rounded-lg max-w-[250px] ${o?`text-red-500`:`text-theme-secondary`}`,children:v||n})]})},Zi=({segment:e})=>{let t=C.useContext(Ui);if(e.type===`text`&&e.data.text)return(0,I.jsx)(`span`,{className:`whitespace-pre-wrap break-all`,style:{overflowWrap:`anywhere`},children:e.data.text});if(e.type===`image`&&e.data.url){let n=Ki(e.data.url);return(0,I.jsx)(`img`,{src:n,alt:`图片`,loading:`lazy`,className:`max-w-[200px] max-h-[150px] rounded-lg cursor-pointer object-cover`,onClick:()=>t?.showPreview(n)})}return e.type===`face`&&e.data.faceId!==void 0?(0,I.jsx)(`img`,{src:`/face/${e.data.faceId}.png`,alt:`[表情${e.data.faceId}]`,className:`inline-block align-text-bottom`,style:{width:24,height:24},onError:t=>{let n=t.target;n.style.display=`none`;let r=document.createElement(`span`);r.textContent=`[表情${e.data.faceId}]`,n.parentNode?.insertBefore(r,n)}}):e.type===`forward`&&e.data.resId?(0,I.jsx)(Qi,{resId:e.data.resId,title:e.data.title||`[聊天记录]`}):null},Qi=({resId:e,title:t})=>{let[n,r]=(0,C.useState)(!1);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-800 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors`,onClick:()=>r(!0),children:[(0,I.jsx)(`span`,{className:`text-sm text-theme-secondary`,children:t}),(0,I.jsx)(j,{size:14,className:`text-theme-hint flex-shrink-0`})]}),n&&(0,I.jsx)(na,{resId:e,title:t,onClose:()=>r(!1)})]})};function $i(e){return{title:e.match(/<title[^>]*color="#000000"[^>]*>(.*?)<\/title>/)?.[1]||`[聊天记录]`,previews:e.match(/<title[^>]*color="#777777"[^>]*>(.*?)<\/title>/g)?.map(e=>e.replace(/<[^>]+>/g,``))||[],summary:e.match(/<summary[^>]*>(.*?)<\/summary>/)?.[1]||``}}var ea=({element:e})=>{let[t,n]=(0,C.useState)(!1),r=e.multiForwardMsgElement,{title:i,previews:a,summary:o}=$i(r.xmlContent);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`w-[240px] bg-gray-50 dark:bg-gray-800/80 rounded-lg overflow-hidden cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700/80 transition-colors border border-theme-divider`,onClick:()=>n(!0),children:[(0,I.jsxs)(`div`,{className:`px-3 pt-2.5 pb-1`,children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme mb-1.5`,children:i}),a.map((e,t)=>(0,I.jsx)(`div`,{className:`text-xs text-theme-secondary truncate leading-5`,children:e},t))]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-t border-theme-divider`,children:[(0,I.jsx)(`span`,{className:`text-xs text-theme-hint`,children:o}),(0,I.jsx)(j,{size:12,className:`text-theme-hint`})]})]}),t&&(0,I.jsx)(na,{resId:r.resId,title:i,onClose:()=>n(!1)})]})},ta=({arkData:e})=>{let[t,n]=(0,C.useState)(!1),r=e.meta?.detail||{},i=r.source||`[聊天记录]`,a=(r.news||[]).map(e=>e.text||``),o=r.summary||``,s=r.resid||``;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`w-[240px] bg-gray-50 dark:bg-gray-800/80 rounded-lg overflow-hidden cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700/80 transition-colors border border-theme-divider`,onClick:()=>n(!0),children:[(0,I.jsxs)(`div`,{className:`px-3 pt-2.5 pb-1`,children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme mb-1.5`,children:i}),a.map((e,t)=>(0,I.jsx)(`div`,{className:`text-xs text-theme-secondary truncate leading-5`,children:e},t))]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-t border-theme-divider`,children:[(0,I.jsx)(`span`,{className:`text-xs text-theme-hint`,children:o}),(0,I.jsx)(j,{size:12,className:`text-theme-hint`})]})]}),t&&(0,I.jsx)(na,{resId:s,title:i,onClose:()=>n(!1)})]})},na=({resId:e,title:t,onClose:n})=>{let[r,i]=(0,C.useState)([]),[a,o]=(0,C.useState)(!0),[s,c]=(0,C.useState)(null);C.useEffect(()=>{let t=!1;return(async()=>{try{o(!0),c(null);let n=await fr(e);t||i(n)}catch(e){t||c(e.message||`加载失败`)}finally{t||o(!1)}})(),()=>{t=!0}},[e]);let l=e=>e?new Date(e*1e3).toLocaleTimeString(`zh-CN`,{hour:`2-digit`,minute:`2-digit`}):``;return(0,Ct.createPortal)((0,I.jsx)(`div`,{className:`fixed inset-0 z-[9999] flex items-center justify-center bg-black/50 backdrop-blur-sm`,onClick:n,children:(0,I.jsxs)(`div`,{className:`bg-white dark:bg-neutral-900 rounded-2xl shadow-2xl w-[90vw] max-w-[480px] max-h-[80vh] flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-theme-divider flex-shrink-0`,children:[(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:t}),(0,I.jsx)(`button`,{onClick:n,className:`p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors`,children:(0,I.jsx)(vt,{size:18,className:`text-theme-hint`})})]}),(0,I.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-4 py-3 space-y-3`,children:[a&&(0,I.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,I.jsx)(N,{size:24,className:`animate-spin text-pink-500`})}),s&&(0,I.jsx)(`div`,{className:`text-center py-8 text-red-500 text-sm`,children:s}),!a&&!s&&r.length===0&&(0,I.jsx)(`div`,{className:`text-center py-8 text-theme-hint text-sm`,children:`暂无消息`}),!a&&!s&&r.map((e,t)=>(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`img`,{src:`https://q1.qlogo.cn/g?b=qq&nk=${e.senderUin}&s=640`,alt:e.senderName,className:`w-7 h-7 rounded-full object-cover flex-shrink-0 mt-0.5`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-0.5`,children:[(0,I.jsx)(`span`,{className:`text-xs font-medium text-theme-secondary`,children:e.senderName}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint`,children:l(e.time)})]}),(0,I.jsxs)(`div`,{className:`text-sm text-theme break-words`,children:[e.segments.map((e,t)=>(0,I.jsx)(Zi,{segment:e},t)),e.segments.length===0&&(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`[不支持的消息类型]`})]})]})]},t))]})]})}),document.body)},ra=C.createContext(null),ia=C.createContext(null),aa=C.createContext(null),oa=C.createContext(null),sa=C.createContext(null),ca=e=>{for(let t of e.elements)if(t.grayTipElement?.jsonGrayTipElement?.jsonStr)try{let e=JSON.parse(t.grayTipElement.jsonGrayTipElement.jsonStr);if(e.items){let t=e.items.some(e=>e.type===`qq`&&e.uid);return{items:e.items,hasUid:t}}}catch{}return null},la=new Map,ua=(0,C.memo)(({message:e,groupCode:t})=>{let[n,r]=(0,C.useState)(la.get(e.msgId)??`[系统提示]`),i=zn();return(0,C.useEffect)(()=>{if(la.has(e.msgId)){r(la.get(e.msgId));return}let n=ca(e);if(!n){for(let t of e.elements)if(t.grayTipElement?.xmlElement?.content){let n=t.grayTipElement.xmlElement.content.replace(/<[^>]+>/g,``);la.set(e.msgId,n),r(n);return}la.set(e.msgId,`[系统提示]`),r(`[系统提示]`);return}let{items:a,hasUid:o}=n;if(!o){let t=a.map(e=>e.txt||``).join(``)||`[系统提示]`;la.set(e.msgId,t),r(t);return}(async()=>{let n=[],o=0;for(let e of a)if(e.type===`qq`&&e.uid)if(e.uid===i)n.push((0,I.jsx)(`span`,{className:`text-blue-500`,children:`你`},o++));else{let r=await nr(e.uid,t);n.push((0,I.jsx)(`span`,{className:`text-blue-500`,children:r},o++))}else e.type===`nor`&&e.txt&&n.push((0,I.jsx)(`span`,{children:e.txt},o++));let s=n.length>0?n:`[系统提示]`;la.set(e.msgId,s),r(s)})()},[e.msgId,i,t]),(0,I.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,I.jsx)(`span`,{className:`text-xs text-theme-hint bg-theme-item/50 px-3 py-1 rounded-full`,children:n})})}),da=(0,C.memo)(({message:e,allMessages:t,isHighlighted:n})=>{if(Yi(e))return(0,I.jsx)(ua,{message:e,groupCode:e.chatType===2?e.peerUin:void 0});let r=zn(),i=r?e.senderUid===r:!1,a=C.useContext(ra),o=C.useContext(ia),s=C.useContext(aa),c=C.useContext(oa),l=C.useContext(sa),u=e.sendMemberName||e.sendNickName||e.senderUin;if(e.chatType===1&&!i&&l){let t=l.getFriend(e.senderUin);t&&(u=t.remark||t.nickname||u)}let d=`https://q1.qlogo.cn/g?b=qq&nk=${e.senderUin}&s=640`,f=parseInt(e.msgTime)*1e3,p,m,h;if(e.chatType===2){let t=e.msgAttrs;if(t){let e=(e=>{if(t instanceof Map)return t.get(e);if(typeof t==`object`)return t[e.toString()]})(2);e?.groupHonor&&(p=e.groupHonor.level,m=e.groupHonor.uniqueTitle||void 0)}if(c){let t=c.getMembers(e.peerUin)?.find(t=>t.uid===e.senderUid||t.uin===e.senderUin);t&&(h=t.role,p===void 0&&t.level&&(p=t.level),!m&&t.specialTitle&&(m=t.specialTitle))}}if(!e.elements||!Array.isArray(e.elements))return null;let g=e.recallTime&&e.recallTime!==`0`,_=e.elements.find(e=>e.replyElement)?.replyElement,v=e.elements.filter(e=>!e.replyElement);if(!(v.some(Ji)||_))return null;let y=v.length===1&&v[0].pttElement&&!_,b=_?t.find(e=>e.msgId===_.replayMsgId||e.msgSeq===_.replayMsgSeq):null,x=t=>{t.preventDefault(),t.stopPropagation(),a?.showMenu(t,e)};return(0,I.jsxs)(`div`,{className:`flex gap-2 w-full ${i?`flex-row-reverse`:``} ${n?`animate-pulse bg-pink-100 dark:bg-pink-900/30 rounded-lg -mx-2 px-2`:``}`,children:[(0,I.jsx)(`img`,{src:d,alt:u,loading:`lazy`,className:`w-8 h-8 rounded-full object-cover flex-shrink-0 cursor-pointer hover:opacity-80 transition-opacity`,onClick:t=>{(`ontouchstart`in window||navigator.maxTouchPoints>0)&&(t.preventDefault(),t.stopPropagation(),o?.showMenu(t,{senderUid:e.senderUid,senderUin:e.senderUin,senderName:u,chatType:e.chatType,groupCode:e.chatType===2?e.peerUin:void 0}))},onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),o?.showMenu(t,{senderUid:e.senderUid,senderUin:e.senderUin,senderName:u,chatType:e.chatType,groupCode:e.chatType===2?e.peerUin:void 0})}}),(0,I.jsxs)(`div`,{className:`flex flex-col ${i?`items-end`:`items-start`} max-w-[calc(100%-48px)] md:max-w-[70%] min-w-0 overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-1 ${i?`flex-row-reverse`:``}`,children:[(0,I.jsx)(`span`,{className:`text-xs text-theme-hint`,children:u}),p!==void 0&&p>0&&(0,I.jsxs)(`span`,{className:`text-xs px-1 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-300 rounded`,children:[`Lv.`,p]}),h===`owner`&&(0,I.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 bg-amber-100 dark:bg-amber-900/50 text-amber-600 dark:text-amber-300 rounded`,children:m||`群主`}),h===`admin`&&(0,I.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 bg-blue-100 dark:bg-blue-900/50 text-blue-600 dark:text-blue-300 rounded`,children:m||`管理员`}),h===`member`&&m&&(0,I.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 bg-pink-100 dark:bg-pink-900/50 text-pink-600 dark:text-pink-300 rounded`,children:m})]}),y?(0,I.jsxs)(`div`,{onContextMenu:x,className:g?`opacity-50`:``,children:[v.map((t,n)=>(0,I.jsx)(qi,{element:t,message:e},n)),g&&(0,I.jsx)(`div`,{className:`text-xs text-theme-muted italic mt-1`,children:`已撤回`})]}):(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsxs)(`div`,{className:`rounded-2xl px-4 py-2 min-w-[80px] max-w-full break-words overflow-hidden bg-theme-item text-theme shadow-sm ${i?`rounded-tr-sm`:`rounded-tl-sm`} ${g?`opacity-50`:``}`,onContextMenu:x,children:[_&&(0,I.jsx)(`div`,{className:`text-xs mb-2 pb-2 border-b border-theme-divider cursor-pointer hover:opacity-80 transition-opacity`,onClick:()=>{_&&s?.scrollToMessage(_.replayMsgId,_.replayMsgSeq)},children:(0,I.jsx)(`div`,{className:`bg-theme-input rounded px-2 py-1`,children:b?(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`font-medium text-theme-secondary`,children:[b.sendMemberName||b.sendNickName||b.senderUin,`:`]}),(0,I.jsx)(`div`,{className:`text-theme-muted`,children:b.elements?.filter(e=>!e.replyElement).map((e,t)=>(0,I.jsx)(qi,{element:e},t))})]}):(0,I.jsx)(`span`,{className:`text-theme-muted`,children:_.sourceMsgText||`[消息]`})})}),v.map((t,n)=>(0,I.jsx)(qi,{element:t,message:e},n))]}),g&&(0,I.jsx)(`div`,{className:`text-xs text-theme-muted italic mt-1`,children:`已撤回`})]}),(0,I.jsx)(pa,{message:e,isSelf:i}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint mt-1`,children:_r(f)})]})]})});function fa(e,t){return t===`2`?`/face/emoji-${parseInt(e).toString(16)}.png`:`/face/${e}.png`}var pa=(0,C.memo)(({message:e,isSelf:t})=>{let[n,r]=(0,C.useState)(null);if(!e.emojiLikesList||e.emojiLikesList.length===0)return null;let i=async(t,i)=>{if(!n){r(t);try{await z(`ntMsgApi`,`setEmojiLike`,[{chatType:e.chatType,peerUid:e.peerUin,guildId:``},e.msgSeq,t,!i])}catch(e){L(e.message||`操作失败`,`error`)}finally{r(null)}}};return(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1 ${t?`justify-end`:`justify-start`}`,children:e.emojiLikesList.map((e,t)=>{let r=fa(e.emojiId,e.emojiType);return(0,I.jsxs)(`button`,{onClick:()=>i(e.emojiId,e.isClicked),disabled:n===e.emojiId,className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded-full text-xs transition-all cursor-pointer hover:scale-105 active:scale-95 ${e.isClicked?`bg-pink-100 dark:bg-pink-900/40 border border-pink-300 dark:border-pink-700`:`bg-theme-item border border-theme-divider hover:border-pink-300 dark:hover:border-pink-700`} ${n===e.emojiId?`opacity-50`:``}`,title:e.isClicked?`点击取消`:`点击跟贴`,children:[(0,I.jsx)(`img`,{src:r,alt:`表情${e.emojiId}`,className:`w-4 h-4`,onError:t=>{if(e.emojiType===`2`){let n=t.target,r=String.fromCodePoint(parseInt(e.emojiId));n.style.display=`none`,n.insertAdjacentHTML(`afterend`,`<span class="text-sm">${r}</span>`)}}}),(0,I.jsx)(`span`,{className:`text-theme-secondary`,children:e.likesCnt})]},`${e.emojiId}-${t}`)})})}),ma=(0,C.memo)(({message:e,onRetry:t})=>{let n=Bn(),r=n?`https://q1.qlogo.cn/g?b=qq&nk=${n}&s=640`:``;return(0,I.jsxs)(`div`,{className:`flex gap-2 flex-row-reverse w-full`,children:[r&&(0,I.jsx)(`img`,{src:r,alt:`我`,loading:`lazy`,className:`w-8 h-8 rounded-full object-cover flex-shrink-0`}),(0,I.jsxs)(`div`,{className:`flex flex-col items-end max-w-[calc(100%-48px)] md:max-w-[70%] min-w-0 overflow-hidden`,children:[(0,I.jsx)(`span`,{className:`text-xs text-theme-hint mb-1`,children:`我`}),(0,I.jsxs)(`div`,{className:`flex items-end gap-1`,children:[e.status===`failed`&&(0,I.jsx)(`button`,{onClick:t,className:`p-1 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/30 rounded`,title:`重新发送`,children:(0,I.jsx)(qe,{size:14})}),(0,I.jsx)(`div`,{className:`rounded-2xl px-4 py-2 bg-theme-item text-theme rounded-tr-sm min-w-[80px] max-w-full break-words overflow-hidden shadow-sm`,children:e.items.map((e,t)=>e.type===`text`&&e.content?(0,I.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:e.content},t):e.type===`face`&&e.faceId!==void 0?(0,I.jsx)(`img`,{src:`/face/${e.faceId}.png`,alt:`[表情${e.faceId}]`,className:`inline-block align-text-bottom`,style:{width:24,height:24}},t):e.type===`image`&&e.imageUrl?(0,I.jsx)(`img`,{src:e.imageUrl,alt:`图片`,loading:`lazy`,className:`max-w-full rounded-lg`,style:{maxHeight:`200px`}},t):e.type===`at`&&e.atName?(0,I.jsxs)(`span`,{className:`text-blue-500`,children:[`@`,e.atName]},t):null)}),e.status===`sending`&&(0,I.jsx)(N,{size:14,className:`animate-spin text-theme-hint`}),e.status===`failed`&&(0,I.jsx)(M,{size:14,className:`text-red-500`})]}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint mt-1`,children:_r(e.timestamp)})]})]})}),ha=({name:e,onMute:t,onClose:n})=>{let[r,i]=(0,C.useState)(0),[a,o]=(0,C.useState)(0),[s,c]=(0,C.useState)(0),[l,u]=(0,C.useState)(0),d=()=>{let e=r+a*60+s*3600+l*86400;e>0&&t(e)},f=r+a*60+s*3600+l*86400;return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/30`,onClick:n}),(0,I.jsxs)(`div`,{className:`fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-theme-card backdrop-blur-xl border border-theme-divider rounded-xl shadow-xl p-6 min-w-[340px]`,children:[(0,I.jsxs)(`h3`,{className:`text-lg font-medium text-theme mb-4`,children:[`禁言 `,e]}),(0,I.jsxs)(`div`,{className:`mb-4`,children:[(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary mb-3`,children:`设置禁言时长:`}),(0,I.jsxs)(`div`,{className:`grid grid-cols-4 gap-2`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:59,value:r,onChange:e=>i(Math.min(59,Math.max(0,parseInt(e.target.value)||0))),className:`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`秒`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:59,value:a,onChange:e=>o(Math.min(59,Math.max(0,parseInt(e.target.value)||0))),className:`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`分钟`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:23,value:s,onChange:e=>c(Math.min(23,Math.max(0,parseInt(e.target.value)||0))),className:`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`小时`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:29,value:l,onChange:e=>u(Math.min(29,Math.max(0,parseInt(e.target.value)||0))),className:`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`天`})]})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-secondary mt-2 text-center`,children:`最长29天23小时59分59秒`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`button`,{onClick:()=>t(0),className:`px-4 py-2 text-sm text-green-500 hover:bg-green-50 dark:hover:bg-green-900/30 rounded-lg transition-colors`,children:`解除禁言`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`button`,{onClick:n,className:`px-4 py-2 text-sm text-theme-secondary hover:bg-theme-item rounded-lg transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:d,disabled:f===0,className:`px-4 py-2 text-sm bg-orange-500 text-white hover:bg-orange-600 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:`确认禁言`})]})]})]})]}),document.body)},ga=({name:e,groupName:t,onConfirm:n,onClose:r})=>(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/50`,onClick:r}),(0,I.jsxs)(`div`,{className:`fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-theme-card border border-theme-divider rounded-xl shadow-xl p-6 min-w-[320px]`,children:[(0,I.jsx)(`h3`,{className:`text-lg font-medium text-theme mb-4`,children:`确认踢出`}),(0,I.jsxs)(`p`,{className:`text-theme-secondary mb-6`,children:[`确定要将 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:e}),` 移出群 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:t}),` 吗?`]}),(0,I.jsxs)(`div`,{className:`flex justify-end gap-3`,children:[(0,I.jsx)(`button`,{onClick:r,className:`px-4 py-2 text-sm text-theme-secondary hover:bg-theme-item rounded-lg transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:n,className:`px-4 py-2 text-sm bg-red-500 text-white hover:bg-red-600 rounded-lg transition-colors`,children:`确认踢出`})]})]})]}),document.body),_a=({name:e,onConfirm:t,onClose:n})=>{let[r,i]=(0,C.useState)(``);return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/30`,onClick:n}),(0,I.jsxs)(`div`,{className:`fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-theme-card backdrop-blur-xl border border-theme-divider rounded-xl shadow-xl p-6 min-w-[320px]`,children:[(0,I.jsx)(`h3`,{className:`text-lg font-medium text-theme mb-4`,children:`设置头衔`}),(0,I.jsxs)(`p`,{className:`text-sm text-theme-secondary mb-3`,children:[`为 `,e,` 设置专属头衔:`]}),(0,I.jsx)(`input`,{type:`text`,maxLength:12,value:r,onChange:e=>i(e.target.value),placeholder:`留空清除头衔`,className:`w-full px-3 py-2 bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20 placeholder:text-theme-hint`,autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&t(r.trim())}}),(0,I.jsx)(`p`,{className:`text-xs text-theme-secondary mt-2`,children:`中文最多6字,英文最多12字,按回车确认`}),(0,I.jsxs)(`div`,{className:`flex justify-end gap-2 mt-4`,children:[(0,I.jsx)(`button`,{onClick:n,className:`px-4 py-2 text-sm text-theme-secondary hover:bg-theme-item rounded-lg transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:()=>t(r.trim()),className:`px-4 py-2 text-sm bg-pink-500 text-white hover:bg-pink-600 rounded-lg transition-colors`,children:`确认`})]})]})]}),document.body)};function va(e,t,n){let[r,i]=(0,C.useState)({left:-9999,top:-9999,ready:!1});return(0,C.useEffect)(()=>{i({left:-9999,top:-9999,ready:!1});let r=requestAnimationFrame(()=>{if(!n.current){i({left:e,top:t,ready:!0});return}let r=n.current.getBoundingClientRect(),a=e,o=t;e+r.width>window.innerWidth-10&&(a=e-r.width),a<10&&(a=10),t+r.height>window.innerHeight-10&&(o=t-r.height),o<10&&(o=10),i({left:a,top:o,ready:!0})});return()=>cancelAnimationFrame(r)},[e,t]),r}var ya=({contextMenu:e,session:t,getCachedMembers:n,onClose:r,onReply:i,onEmojiReaction:a,onRecall:o})=>{let s=e.message,c=zn(),l=c&&s.senderUid===c,u=s.chatType===2,d=u&&t?n(t.peerId):null,f=(d&&c?d.find(e=>e.uid===c):null)?.role,p=f===`owner`,m=f===`admin`||f===`owner`,h=(d?d.find(e=>e.uid===s.senderUid):null)?.role,g=l||u&&(p||m&&!(h===`admin`||h===`owner`)),_=!!e.elementId,v=(0,C.useRef)(null),y=va(e.x,e.y,v);return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:r,onContextMenu:e=>{e.preventDefault(),r()}}),(0,I.jsxs)(`div`,{ref:v,className:`fixed z-50 bg-popup backdrop-blur-sm border border-theme-divider rounded-lg shadow-lg py-1 min-w-[100px]`,style:{left:y.left,top:y.top,visibility:y.ready?`visible`:`hidden`},onContextMenu:e=>e.preventDefault(),children:[(0,I.jsxs)(`button`,{onClick:()=>{i(s),r()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(Je,{size:14}),` 回复`]}),t.chatType===2&&(0,I.jsxs)(`button`,{onClick:()=>{a(s,e.x,e.y),r()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(it,{size:14}),` 贴表情`]}),_&&(0,I.jsxs)(`button`,{onClick:async()=>{if(e.elementId){r();try{let t=await z(`ntFileApi`,`downloadMedia`,[s.msgId,s.chatType,s.peerUid,e.elementId,``,``]);if(!t){L(`图片下载失败`,`error`);return}let n=await z(`ntMsgApi`,`addFavEmoji`,[t]);n.result===0?L(n.isExist?`表情已存在`:`已添加到表情`,`success`):L(n.errMsg||`添加失败`,`error`)}catch(e){L(e.message||`添加失败`,`error`)}}},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(ot,{size:14}),` 添加到表情`]}),g&&(0,I.jsxs)(`button`,{onClick:async()=>{r();try{await tr(s.chatType,s.peerUid,s.msgId),o(s.msgId),L(`消息已撤回`,`success`)}catch(e){L(e.message||`撤回失败`,`error`)}},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-red-500 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(F,{size:14}),` 撤回`]})]})]}),document.body)},ba=({avatarContextMenu:e,getCachedMembers:t,onClose:n,onInsertAt:r,onShowProfile:i,onSetTitle:a,onMute:o,onKick:s,onAdminChanged:c,groupName:l})=>{let u=zn(),d=e.groupCode?t(e.groupCode):null,f=(d&&u?d.find(e=>e.uid===u):null)?.role,p=f===`owner`,m=f===`admin`,h=(d?d.find(t=>t.uid===e.senderUid):null)?.role,g=h===`admin`,_=p||m&&h===`member`,v=p||m&&h===`member`,y=e.senderUid===u,b=p&&!y,x=(0,C.useRef)(null),S=va(e.x,e.y,x);return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:n,onContextMenu:e=>{e.preventDefault(),n()}}),(0,I.jsxs)(`div`,{ref:x,className:`fixed z-50 bg-popup backdrop-blur-sm border border-theme-divider rounded-lg shadow-lg py-1 min-w-[120px]`,style:{left:S.left,top:S.top,visibility:S.ready?`visible`:`hidden`},onContextMenu:e=>e.preventDefault(),children:[e.chatType===2&&(0,I.jsxs)(`button`,{onClick:()=>{r(e.senderUid,e.senderUin,e.senderName),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(ne,{size:14}),` 召唤ta`]}),(0,I.jsxs)(`button`,{onClick:async()=>{let t=e;n();try{t.chatType===2&&t.groupCode?await rr(t.chatType,parseInt(t.senderUin),parseInt(t.groupCode)):await rr(t.chatType,parseInt(t.senderUin))}catch(e){L(e.message||`戳一戳失败`,`error`)}},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(Ce,{size:14}),` 戳一戳`]}),(0,I.jsxs)(`button`,{onClick:()=>{i(e.senderUid,e.senderUin,e.x,e.y,e.groupCode),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(pt,{size:14}),` 查看资料`]}),e.chatType===2&&e.groupCode&&p&&(0,I.jsxs)(`button`,{onClick:()=>{a(e.senderUid,e.senderName,e.groupCode),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(re,{size:14}),` 设置头衔`]}),e.chatType===2&&e.groupCode&&b&&(0,I.jsxs)(`button`,{onClick:async()=>{let t=e;n();try{let e=g?2:3;await z(`ntGroupApi`,`setMemberRole`,[t.groupCode,t.senderUid,e]),L(g?`已取消管理员`:`已设为管理员`,`success`),c?.()}catch(e){L(e.message||`操作失败`,`error`)}},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[g?(0,I.jsx)(tt,{size:14}):(0,I.jsx)(nt,{size:14}),g?`取消管理员`:`设为管理员`]}),e.chatType===2&&e.groupCode&&!y&&_&&(0,I.jsxs)(`button`,{onClick:()=>{o(e.senderUid,e.senderName,e.groupCode),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-orange-500 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(gt,{size:14}),` 禁言`]}),e.chatType===2&&e.groupCode&&!y&&v&&(0,I.jsxs)(`button`,{onClick:()=>{s(e.senderUid,e.senderName,e.groupCode,l||e.groupCode),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-red-500 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(dt,{size:14}),` 踢出群`]})]})]}),document.body)},xa=(0,C.forwardRef)(({placeholder:e=`输入消息...`,disabled:t=!1,onEnter:n,onPaste:r,onChange:i,onMentionChange:a},o)=>{let s=(0,C.useRef)(null),c=(0,C.useRef)(!1),l=(0,C.useRef)(null),[u,d]=(0,C.useState)(!1),f=(0,C.useCallback)(()=>{let e=s.current;if(!e)return[];let t=[],n=e.childNodes;for(let e=0;e<n.length;e++){let r=n[e];if(r.nodeType===Node.TEXT_NODE){let e=(r.textContent||``).replace(/\u200B/g,``);e&&t.push({type:`text`,content:e})}else if(r.nodeType===Node.ELEMENT_NODE){let e=r;if(e.dataset.type===`face`)t.push({type:`face`,faceId:parseInt(e.dataset.faceId||`0`)});else if(e.dataset.type===`image`)t.push({type:`image`,imageUrl:e.dataset.imageUrl,imageFile:e.__file});else if(e.dataset.type===`at`)t.push({type:`at`,atUid:e.dataset.atUid,atUin:e.dataset.atUin,atName:e.dataset.atName});else if(e.tagName===`BR`)t.push({type:`text`,content:`
|
|
23
|
+
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i}return o.updateDeps=e=>{r=e},o}function ui(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var di=(e,t)=>Math.abs(e-t)<1.01,fi=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},pi=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},mi=e=>e,hi=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},gi=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(pi(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(pi(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},_i={passive:!0},vi=typeof window>`u`?!0:`onscrollend`in window,yi=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&vi?()=>void 0:fi(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),c=o(!1);n.addEventListener(`scroll`,s,_i);let l=e.options.useScrollendEvent&&vi;return l&&n.addEventListener(`scrollend`,c,_i),()=>{n.removeEventListener(`scroll`,s),l&&n.removeEventListener(`scrollend`,c)}},bi=(e,t,n)=>{if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},xi=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;let o=e+t;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:o,behavior:n})},Si=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{n===void 0&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:mi,rangeExtractor:hi,onChange:()=>{},measureElement:bi,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,...e}},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=li(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=li(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=li(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let l=this.measurementsCache.slice(0,c),u=Array(a).fill(void 0);for(let e=0;e<c;e++){let t=l[e];t&&(u[t.lane]=e)}for(let i=c;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),c,d,f=o===`estimate`||s.has(e);if(a!==void 0&&this.options.lanes>1){c=a;let e=u[c],r=e===void 0?void 0:l[e];d=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?l[i-1]:this.getFurthestMeasurement(l,i);d=e?e.end+this.options.gap:t+n,c=e?e.lane:i%this.options.lanes,this.options.lanes>1&&f&&this.laneAssignments.set(i,c)}let p=s.get(e),m=typeof p==`number`?p:this.options.estimateSize(i),h=d+m;l[i]={index:i,start:d,size:m,end:h,key:e,lane:c},u[c]=i}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=li(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?wi({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=li(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let r=t-(this.itemSizeCache.get(n.key)??n.size);r!==0&&(this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?n.start<this.getScrollOffset()+this.scrollAdjustments:this.shouldAdjustScrollPositionOnItemSizeChange(n,r,this))&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.getVirtualItems=li(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length!==0)return ui(t[Ci(0,t.length-1,e=>ui(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=e[e.length-1]?.end??0;else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&di(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior=`auto`,this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}));this.scheduleScrollReconcile()}},Ci=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function wi({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,a=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=Ci(0,i,a,n),s=o;if(r===1)for(;s<i&&e[s].end<n+t;)s++;else if(r>1){let a=Array(r).fill(0);for(;s<i&&a.some(e=>e<n+t);){let t=e[s];a[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(i,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var Ti=typeof document<`u`?C.useLayoutEffect:C.useEffect;function Ei({useFlushSync:e=!0,...t}){let n=C.useReducer(()=>({}),{})[1],r={...t,onChange:(r,i)=>{var a;e&&i?(0,Ct.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,r,i)}},[i]=C.useState(()=>new Si(r));return i.setOptions(r),Ti(()=>i._didMount(),[]),Ti(()=>i._willUpdate()),i}function Di(e){return Ei({observeElementRect:gi,observeElementOffset:yi,scrollToFn:xi,...e})}var Oi=`webqq-messages`,ki=1,Ai=`messages`,ji=100,V=null;function H(){return V?Promise.resolve(V):new Promise((e,t)=>{let n=indexedDB.open(Oi,ki);n.onerror=()=>t(n.error),n.onsuccess=()=>{V=n.result,e(V)},n.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(Ai)||t.createObjectStore(Ai,{keyPath:`chatKey`})}})}async function Mi(e,t){try{let n=await H(),r=`${e}_${t}`;return new Promise(e=>{let t=n.transaction(Ai,`readonly`).objectStore(Ai).get(r);t.onsuccess=()=>{let n=t.result;n&&n.messages?e(n.messages):e(null)},t.onerror=()=>e(null)})}catch{return null}}async function Ni(e,t,n){try{let r=await H(),i=`${e}_${t}`,a=n.slice(-ji);return new Promise((e,t)=>{let n=r.transaction(Ai,`readwrite`).objectStore(Ai).put({chatKey:i,messages:a,timestamp:Date.now()});n.onsuccess=()=>e(),n.onerror=()=>t(n.error)})}catch(e){console.error(`Failed to cache messages:`,e)}}async function Pi(e,t,n){try{let r=await Mi(e,t);r&&await Ni(e,t,[...r.slice(-(ji-1)),n])}catch(e){console.error(`Failed to append message:`,e)}}async function Fi(e,t,n){try{let r=await Mi(e,t);r&&await Ni(e,t,r.filter(e=>e.msgId!==n))}catch(e){console.error(`Failed to remove message:`,e)}}async function Ii(e,t,n,r,i){try{let a=await Mi(e,t);if(!a)return;await Ni(e,t,a.map(e=>{if(e.msgSeq!==n)return e;let t=e.emojiLikesList||[];if(i){let n=t.findIndex(e=>e.emojiId===r);if(n>=0){let r=[...t];return r[n]={...r[n],likesCnt:String(parseInt(r[n].likesCnt)+1)},{...e,emojiLikesList:r}}else return{...e,emojiLikesList:[...t,{emojiId:r,emojiType:parseInt(r)>999?`2`:`1`,likesCnt:`1`,isClicked:!1}]}}else{let n=t.findIndex(e=>e.emojiId===r);if(n>=0){let r=[...t],i=parseInt(r[n].likesCnt)-1;return i<=0?r.splice(n,1):r[n]={...r[n],likesCnt:String(i)},{...e,emojiLikesList:r}}}return e}))}catch(e){console.error(`Failed to update emoji reaction:`,e)}}async function Li(e,t,n,r){try{let i=await Mi(e,t);if(!i)return!1;let a=!1,o=i.map(e=>e.msgId===n||r&&e.msgSeq===r?(a=!0,{...e,recallTime:String(Math.floor(Date.now()/1e3))}):e);return a&&await Ni(e,t,o),a}catch(e){return console.error(`Failed to mark message as recalled:`,e),!1}}var Ri=({level:e})=>{let t=e%4,n=Math.floor(e/4)%4,r=Math.floor(e/16)%4,i=Math.floor(e/64)%4,a=Math.floor(e/256),o=[];for(let e=0;e<a;e++)o.push((0,I.jsx)(`span`,{className:`text-amber-400 text-xs font-bold`,title:`金企鹅`,children:`🐧`},`penguin-${e}`));for(let e=0;e<i;e++)o.push((0,I.jsx)(ge,{size:14,className:`text-amber-500`},`crown-${e}`));for(let e=0;e<r;e++)o.push((0,I.jsx)(ct,{size:14,className:`text-orange-400`},`sun-${e}`));for(let e=0;e<n;e++)o.push((0,I.jsx)(ze,{size:14,className:`text-blue-400`},`moon-${e}`));for(let e=0;e<t;e++)o.push((0,I.jsx)(ot,{size:14,className:`text-yellow-400 fill-yellow-400`},`star-${e}`));return(0,I.jsx)(`div`,{className:`flex items-center gap-0.5 flex-wrap`,children:o})},zi=({profile:e,loading:t,position:n,onClose:r,isFriend:i,onFriendDeleted:a})=>{let o=(0,C.useRef)(null),[s,c]=(0,C.useState)({left:n.x,top:n.y}),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1);if((0,C.useEffect)(()=>{if(!o.current)return;let e=o.current.offsetHeight||400,t=n.x,r=n.y;t+320>window.innerWidth-20&&(t=window.innerWidth-320-20),t<20&&(t=20),r+e>window.innerHeight-20&&(r=window.innerHeight-e-20),r<20&&(r=20),c({left:t,top:r})},[n,e,t]),!e&&!t)return null;let p=e=>e===1?`男`:e===2?`女`:``,m=e=>{if(!e)return``;let t=new Date(e*1e3),n=new Date,r=n.getFullYear()-t.getFullYear(),i=n.getMonth()-t.getMonth(),a=r+(i<0?-1:0);if(a<1){let e=r*12+i;return e>0?`${e}个月`:`不足1个月`}return`${a}年`},h=e=>e===`owner`?`群主`:e===`admin`?`管理员`:``,g=e=>e===`owner`?`bg-amber-500 text-white`:e===`admin`?`bg-green-500 text-white`:``,_=async()=>{if(e){f(!0);try{await vr(e.uid),L(`已删除好友`,`success`),a?.(e.uid),r()}catch(e){L(e.message||`删除好友失败`,`error`)}finally{f(!1),u(!1)}}},v=e=>e?new Date(e*1e3).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`}):``;return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:r}),(0,I.jsxs)(`div`,{ref:o,className:`fixed z-50 border border-theme-divider rounded-xl shadow-xl overflow-hidden bg-popup backdrop-blur-sm`,style:{left:s.left,top:s.top,width:320,maxHeight:`calc(100vh - 40px)`},onClick:e=>e.stopPropagation(),children:[t?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-40`,children:(0,I.jsx)(N,{size:24,className:`animate-spin text-pink-500`})}):e&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`bg-gradient-to-r from-pink-400 to-amber-300 p-4 relative`,children:[i&&!e.groupRole&&(0,I.jsx)(`button`,{onClick:()=>u(!0),className:`absolute top-2 right-2 p-1.5 rounded-full bg-white/20 hover:bg-white/40 text-white transition-colors`,title:`删除好友`,children:(0,I.jsx)(F,{size:16})}),(0,I.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,I.jsx)(`img`,{src:e.avatar,alt:e.nickname,className:`w-16 h-16 rounded-full border-3 border-white/80 object-cover flex-shrink-0`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0 text-white pt-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,I.jsx)(`span`,{className:`font-bold text-lg truncate`,children:e.nickname}),e.groupRole&&h(e.groupRole)&&(0,I.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded flex-shrink-0 ${g(e.groupRole)}`,children:h(e.groupRole)})]}),e.remark&&e.remark!==e.nickname&&(0,I.jsxs)(`div`,{className:`text-white/80 text-sm truncate mb-1`,children:[`备注: `,e.remark]}),(0,I.jsx)(`div`,{className:`text-white/90 text-sm`,children:e.uin}),e.qid&&(0,I.jsxs)(`div`,{className:`text-white/70 text-xs mt-0.5`,children:[`QID: `,e.qid]})]})]})]}),(0,I.jsxs)(`div`,{className:`p-4 overflow-y-auto`,style:{maxHeight:`calc(100vh - 40px - 120px)`},children:[e.signature&&(0,I.jsx)(`div`,{className:`text-theme-secondary text-sm mb-3 bg-theme-item/50 rounded-lg px-3 py-2 max-h-24 overflow-y-auto break-words`,children:e.signature}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-2 text-sm`,children:[p(e.sex)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`性别`}),(0,I.jsx)(`span`,{className:`text-theme`,children:p(e.sex)})]}),e.birthday&&e.birthday!==`0-0-0`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`生日`}),(0,I.jsx)(`span`,{className:`text-theme`,children:e.birthday})]}),m(e.regTime)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`Q龄`}),(0,I.jsx)(`span`,{className:`text-theme`,children:m(e.regTime)})]}),e.level>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`等级`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(`span`,{className:`text-theme`,children:[`Lv.`,e.level]}),(0,I.jsx)(Ri,{level:e.level})]})]})]}),(e.groupCard||e.groupTitle||e.groupLevel)&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`border-t border-theme-divider my-3`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-hint mb-2`,children:`群信息`}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-2 text-sm`,children:[e.groupCard&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`群名片`}),(0,I.jsx)(`span`,{className:`text-theme truncate`,children:e.groupCard})]}),e.groupTitle&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`群头衔`}),(0,I.jsx)(`span`,{className:`text-pink-500`,children:e.groupTitle})]}),e.groupLevel!==void 0&&e.groupLevel>0&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`群等级`}),(0,I.jsxs)(`span`,{className:`text-theme`,children:[`Lv.`,e.groupLevel]})]}),e.joinTime&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`入群时间`}),(0,I.jsx)(`span`,{className:`text-theme`,children:v(e.joinTime)})]}),e.lastSpeakTime&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`最后发言`}),(0,I.jsx)(`span`,{className:`text-theme`,children:v(e.lastSpeakTime)})]})]})]})]})]}),l&&e&&(0,I.jsx)(`div`,{className:`absolute inset-0 bg-black/50 flex items-center justify-center rounded-xl`,children:(0,I.jsxs)(`div`,{className:`bg-popup m-4 p-4 rounded-lg shadow-lg max-w-[280px]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between mb-3`,children:[(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:`删除好友`}),(0,I.jsx)(`button`,{onClick:()=>u(!1),className:`text-theme-muted hover:text-theme`,children:(0,I.jsx)(vt,{size:18})})]}),(0,I.jsxs)(`p`,{className:`text-sm text-theme-secondary mb-4`,children:[`确定要删除好友 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:e.remark||e.nickname}),` 吗?删除后将无法恢复。`]}),(0,I.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,I.jsx)(`button`,{onClick:()=>u(!1),className:`px-3 py-1.5 text-sm rounded-lg bg-theme-item hover:bg-theme-hover text-theme transition-colors`,disabled:d,children:`取消`}),(0,I.jsxs)(`button`,{onClick:_,className:`px-3 py-1.5 text-sm rounded-lg bg-red-500 hover:bg-red-600 text-white transition-colors flex items-center gap-1`,disabled:d,children:[d&&(0,I.jsx)(N,{size:14,className:`animate-spin`}),`删除`]})]})]})})]})]}),document.body)},Bi=({profile:e,loading:t,position:n,onClose:r,onQuitGroup:i})=>{let a=(0,C.useRef)(null),[o,s]=(0,C.useState)({left:n.x,top:n.y}),[c,l]=(0,C.useState)(!1),u=Bn(),d=e?.ownerUin===u;return(0,C.useEffect)(()=>{if(!a.current)return;let e=a.current.offsetHeight||300,t=n.x,r=n.y;t+320>window.innerWidth-20&&(t=window.innerWidth-320-20),t<20&&(t=20),r+e>window.innerHeight-20&&(r=window.innerHeight-e-20),r<20&&(r=20),s({left:t,top:r})},[n,e,t]),!e&&!t?null:(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:r}),(0,I.jsx)(`div`,{ref:a,className:`fixed z-50 border border-theme-divider rounded-xl shadow-xl overflow-hidden bg-popup backdrop-blur-sm`,style:{left:o.left,top:o.top,width:320,maxHeight:`calc(100vh - 40px)`},onClick:e=>e.stopPropagation(),children:t?(0,I.jsx)(`div`,{className:`flex items-center justify-center h-40`,children:(0,I.jsx)(N,{size:24,className:`animate-spin text-pink-500`})}):e&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`bg-gradient-to-r from-blue-400 to-cyan-300 p-4 relative`,children:[i&&(0,I.jsx)(`button`,{onClick:()=>{l(!0)},className:`absolute top-3 right-3 p-1.5 rounded-full bg-white/20 hover:bg-white/30 text-white transition-colors`,title:d?`解散该群`:`退出该群`,children:(0,I.jsx)(je,{size:16})}),(0,I.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,I.jsx)(`img`,{src:e.avatar,alt:e.groupName,className:`w-16 h-16 rounded-lg border-3 border-white/80 object-cover flex-shrink-0`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0 text-white pt-1 pr-6`,children:[(0,I.jsx)(`div`,{className:`font-bold text-lg truncate mb-1`,children:e.groupName}),e.remarkName&&e.remarkName!==e.groupName&&(0,I.jsxs)(`div`,{className:`text-white/80 text-sm truncate mb-1`,children:[`备注: `,e.remarkName]}),(0,I.jsx)(`div`,{className:`text-white/90 text-sm`,children:e.groupCode})]})]})]}),(0,I.jsxs)(`div`,{className:`p-4 overflow-y-auto`,style:{maxHeight:`calc(100vh - 40px - 140px)`},children:[(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-4 gap-y-2 text-sm`,children:[(0,I.jsxs)(`span`,{className:`text-theme-hint flex items-center gap-1`,children:[(0,I.jsx)(ht,{size:14}),`成员`]}),(0,I.jsxs)(`span`,{className:`text-theme`,children:[e.memberCount,e.maxMemberCount?` / ${e.maxMemberCount}`:``]}),e.ownerName&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`text-theme-hint flex items-center gap-1`,children:[(0,I.jsx)(ge,{size:14}),`群主`]}),(0,I.jsx)(`span`,{className:`text-theme truncate`,children:e.ownerName})]}),e.createTime&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`text-theme-hint flex items-center gap-1`,children:[(0,I.jsx)(se,{size:14}),`创建`]}),(0,I.jsx)(`span`,{className:`text-theme`,children:(e=>e?new Date(e*1e3).toLocaleDateString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`}):``)(e.createTime)})]})]}),e.description&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`border-t border-theme-divider my-3`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-hint mb-2`,children:`群简介`}),(0,I.jsx)(`div`,{className:`text-theme-secondary text-sm bg-theme-item/50 rounded-lg px-3 py-2 break-words whitespace-pre-wrap`,style:{maxHeight:`120px`,overflowY:`auto`},children:e.description})]}),e.announcement&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`border-t border-theme-divider my-3`}),(0,I.jsxs)(`div`,{className:`text-xs text-theme-hint mb-2 flex items-center gap-1`,children:[(0,I.jsx)(nt,{size:12}),`群公告`]}),(0,I.jsx)(`div`,{className:`text-theme-secondary text-sm bg-theme-item/50 rounded-lg px-3 py-2 break-words whitespace-pre-wrap`,style:{maxHeight:`120px`,overflowY:`auto`},children:e.announcement})]})]})]})}),c&&e&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-[60] bg-black/50`,onClick:()=>l(!1)}),(0,I.jsxs)(`div`,{className:`fixed z-[70] top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-theme-card border border-theme-divider rounded-xl shadow-xl p-6 min-w-[320px]`,children:[(0,I.jsx)(`h3`,{className:`text-lg font-medium text-theme mb-4`,children:d?`确认解散群聊`:`确认退出群聊`}),(0,I.jsx)(`p`,{className:`text-theme-secondary mb-6`,children:d?(0,I.jsxs)(I.Fragment,{children:[`确定要解散群 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:e.groupName}),` 吗?此操作不可撤销,所有群成员将被移出。`]}):(0,I.jsxs)(I.Fragment,{children:[`确定要退出群 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:e.groupName}),` 吗?`]})}),(0,I.jsxs)(`div`,{className:`flex justify-end gap-3`,children:[(0,I.jsx)(`button`,{onClick:()=>l(!1),className:`px-4 py-2 text-sm text-theme-secondary hover:bg-theme-item rounded-lg transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:()=>{e&&i&&i(e.groupCode,d),l(!1),r()},className:`px-4 py-2 text-sm bg-red-500 hover:bg-red-600 text-white rounded-lg transition-colors`,children:d?`确认解散`:`确认退出`})]})]})]})]}),document.body)},Vi=({url:e,onClose:t})=>e?(0,Ct.createPortal)((0,I.jsxs)(`div`,{className:`fixed inset-0 z-[10000] flex items-center justify-center bg-black/80`,onClick:t,children:[(0,I.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-2 text-white/80 hover:text-white bg-black/50 rounded-full`,children:(0,I.jsx)(vt,{size:24})}),(0,I.jsx)(`img`,{src:e,alt:`预览`,className:`max-w-[90vw] max-h-[90vh] object-contain`,onClick:e=>e.stopPropagation()})]}),document.body):null,Hi=({videoInfo:e,onClose:t})=>{let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(null);return(0,C.useEffect)(()=>{if(!e){r(null),s(null);return}a(!0),s(null),er(e.chatType,e.peerUid,e.msgId,e.elementId).then(r).catch(e=>s(e.message||`获取视频失败`)).finally(()=>a(!1))},[e]),e?(0,Ct.createPortal)((0,I.jsxs)(`div`,{className:`fixed inset-0 z-[10000] flex items-center justify-center bg-black/80`,onClick:t,children:[(0,I.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-2 text-white/80 hover:text-white bg-black/50 rounded-full z-10`,children:(0,I.jsx)(vt,{size:24})}),i&&(0,I.jsxs)(`div`,{className:`text-white flex items-center gap-2`,children:[(0,I.jsx)(N,{size:24,className:`animate-spin`}),`加载中...`]}),o&&(0,I.jsx)(`div`,{className:`text-red-400`,children:o}),n&&!i&&(0,I.jsx)(`video`,{src:n,controls:!0,autoPlay:!0,className:`max-w-[90vw] max-h-[90vh]`,onClick:e=>e.stopPropagation()})]}),document.body):null},Ui=C.createContext(null),Wi=C.createContext(null),Gi=C.createContext(null),Ki=e=>e?e.startsWith(`blob:`)?e:e.includes(`qpic.cn`)||e.includes(`multimedia.nt.qq.com.cn`)?`/api/webqq/image-proxy?url=${encodeURIComponent(e)}&token=${encodeURIComponent(rn()||``)}`:e:``,qi=(0,C.memo)(({element:e,message:t})=>{let[n,r]=(0,C.useState)(!1),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),u=C.useContext(Ui),d=C.useContext(Wi),f=C.useContext(Gi);if(e.textElement)return(0,I.jsx)(`span`,{className:`whitespace-pre-wrap break-all`,style:{overflowWrap:`anywhere`,wordBreak:`break-all`},children:e.textElement.content});if(e.picElement){let o=e.picElement,s=Ki(o.originImageUrl?o.originImageUrl.startsWith(`http`)?o.originImageUrl:`https://gchat.qpic.cn${o.originImageUrl}`:``),c=o.picWidth||200,l=o.picHeight||200;return l>200&&(c=c*200/l,l=200),c>300&&(l=l*300/c,c=300),(0,I.jsxs)(`div`,{className:`relative rounded-lg overflow-hidden bg-theme-item cursor-pointer`,style:{width:c,height:l},onClick:()=>u?.showPreview(s),onContextMenu:n=>{t&&(n.preventDefault(),n.stopPropagation(),f?.showMenu(n,t,e.elementId))},children:[!n&&!i&&(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-theme-hint`,children:(0,I.jsx)(N,{size:24,className:`animate-spin`})}),i&&(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-theme-hint text-xs`,children:`图片加载失败`}),(0,I.jsx)(`img`,{src:s,alt:`图片`,loading:`lazy`,className:`w-full h-full object-cover transition-opacity ${n?`opacity-100`:`opacity-0`}`,onLoad:()=>r(!0),onError:()=>a(!0)})]})}if(e.faceElement){let t=e.faceElement.faceIndex,n=e.faceElement.faceText;return(0,I.jsx)(`img`,{src:`/face/${t}.png`,alt:n||`[表情${t}]`,title:n||`表情${t}`,className:`inline-block align-text-bottom`,style:{width:24,height:24},onError:e=>{let r=e.target;r.style.display=`none`;let i=document.createElement(`span`);i.textContent=n||`[表情${t}]`,r.parentNode?.insertBefore(i,r)}})}if(e.fileElement)return(0,I.jsxs)(`span`,{children:[`[文件: `,e.fileElement.fileName,`]`]});if(e.pttElement)return(0,I.jsx)(Xi,{element:e,message:t});if(e.videoElement){let n=e.videoElement,r=n.thumbWidth||200,i=n.thumbHeight||150;i>200&&(r=r*200/i,i=200),r>300&&(i=i*300/r,r=300);let a=``;if(n.thumbPath){let e;n.thumbPath instanceof Map?e=n.thumbPath.values().next().value:typeof n.thumbPath==`object`&&(e=Object.values(n.thumbPath)[0]),e&&(a=`/api/webqq/file-proxy?path=${encodeURIComponent(e)}&token=${encodeURIComponent(rn()||``)}`)}let u=n.fileTime||0,f=`${Math.floor(u/60)}:${(u%60).toString().padStart(2,`0`)}`;return(0,I.jsxs)(`div`,{className:`relative rounded-lg overflow-hidden bg-theme-item cursor-pointer group`,style:{width:r,height:i},onClick:()=>{t&&e.elementId&&d?.showPreview(t.chatType,t.peerUid,t.msgId,e.elementId)},children:[(0,I.jsx)(`div`,{className:`absolute inset-0 bg-gray-200 dark:bg-gray-700`}),a?(0,I.jsxs)(I.Fragment,{children:[!o&&!c&&(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-theme-hint`,children:(0,I.jsx)(N,{size:24,className:`animate-spin`})}),(0,I.jsx)(`img`,{src:a,alt:`视频缩略图`,loading:`lazy`,className:`absolute inset-0 w-full h-full object-cover transition-opacity ${o?`opacity-100`:`opacity-0`}`,onLoad:()=>s(!0),onError:()=>l(!0)})]}):(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-theme-hint text-xs`,children:`视频`}),(0,I.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-full bg-black/50 flex items-center justify-center group-hover:bg-black/70 transition-colors`,children:(0,I.jsx)(`div`,{className:`w-0 h-0 border-t-8 border-t-transparent border-l-12 border-l-white border-b-8 border-b-transparent ml-1`,style:{borderLeftWidth:`14px`}})})}),(0,I.jsx)(`div`,{className:`absolute bottom-1 right-1 px-1.5 py-0.5 bg-black/60 rounded text-white text-xs`,children:f})]})}if(e.grayTipElement){let t=e.grayTipElement;if(t.jsonGrayTipElement?.jsonStr)try{let e=JSON.parse(t.jsonGrayTipElement.jsonStr);if(e.items)return(0,I.jsx)(`span`,{className:`text-theme-hint text-xs`,children:e.items.map(e=>e.txt||``).join(``)||`[戳一戳]`})}catch{}return(0,I.jsx)(`span`,{className:`text-theme-hint text-xs`,children:`[系统提示]`})}if(e.multiForwardMsgElement)return(0,I.jsx)(ea,{element:e});if(e.arkElement){try{let t=JSON.parse(e.arkElement.bytesData);if(t.app===`com.tencent.multimsg`&&t.meta?.detail?.resid)return(0,I.jsx)(ta,{arkData:t})}catch{}return(0,I.jsx)(`span`,{children:`[卡片消息]`})}if(e.marketFaceElement){let{emojiId:t,faceName:n,supportSize:r}=e.marketFaceElement,{width:i=200,height:a=200}=r?.[0]??{};return(0,I.jsx)(`img`,{src:`https://gxh.vip.qq.com/club/item/parcel/item/${t.substring(0,2)}/${t}/raw${Math.min(i,300)}.gif`,alt:n||`[表情包]`,title:n,className:`inline-block align-text-bottom rounded`,style:{maxWidth:Math.min(i,200),maxHeight:Math.min(a,200)},onError:e=>{let t=e.target;t.style.display=`none`;let r=document.createElement(`span`);r.textContent=`[${n||`表情包`}]`,t.parentNode?.insertBefore(r,t)}})}return null}),Ji=e=>!!(e.textElement||e.picElement||e.fileElement||e.pttElement||e.videoElement||e.faceElement||e.grayTipElement||e.arkElement||e.marketFaceElement||e.multiForwardMsgElement),Yi=e=>!e.elements||e.elements.length===0?!1:e.elements.every(e=>e.grayTipElement||e.replyElement),Xi=({element:e,message:t})=>{let[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(!1),f=(0,C.useRef)(null),p=e.pttElement,m=p.duration||0,h=Math.floor(m/60),g=m%60,_=h>0?`${h}:${g.toString().padStart(2,`0`)}`:`${g}"`,v=p.text,y=Math.min(200,Math.max(80,80+m*3));return(0,I.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-green-100 dark:bg-green-900/40 rounded-full cursor-pointer hover:bg-green-200 dark:hover:bg-green-900/60 transition-colors`,style:{width:y},onClick:async()=>{if(!(!t||!p.fileUuid||u)){if(c&&f.current){f.current.pause(),l(!1);return}if(f.current&&f.current.readyState>=2){f.current.play(),l(!0);return}d(!0);try{let e=t.chatType===2;console.log(`pttElement:`,p);let n=cr(p.fileUuid,e,p.filePath);console.log(`音频代理URL:`,n);let r=new Audio;f.current=r,r.onended=()=>l(!1),r.onerror=e=>{fetch(n).then(e=>e.text()).then(e=>{console.error(`音频加载错误,响应内容:`,e.substring(0,200))}).catch(()=>{}),console.error(`音频加载错误:`,e,r.error,`URL:`,n),l(!1),d(!1)},r.onloadeddata=async()=>{d(!1);try{await r.play(),l(!0)}catch(e){console.error(`播放失败:`,e)}},r.src=n}catch(e){console.error(`获取语音URL失败:`,e),d(!1)}}},title:`点击播放`,children:[u?(0,I.jsx)(N,{size:16,className:`text-green-600 dark:text-green-400 flex-shrink-0 animate-spin`}):c?(0,I.jsx)(P,{size:16,className:`text-green-600 dark:text-green-400 flex-shrink-0`}):(0,I.jsx)(We,{size:16,className:`text-green-600 dark:text-green-400 flex-shrink-0`}),(0,I.jsx)(`div`,{className:`flex-1 flex items-center gap-0.5`,children:[1,2,3,4,5].map(e=>(0,I.jsx)(`div`,{className:`w-0.5 bg-green-400 dark:bg-green-500 rounded-full transition-all ${c?`animate-pulse`:``}`,style:{height:`${8+Math.random()*8}px`}},e))}),(0,I.jsx)(`span`,{className:`text-xs text-green-700 dark:text-green-300 flex-shrink-0`,children:_})]}),!v&&n===null&&(0,I.jsx)(`button`,{onClick:async()=>{if(!(!t||i||n!==null)){a(!0),s(!1);try{r(await ir(t.msgId,t.chatType,t.peerUid,e)||`(无法识别)`)}catch(e){console.error(`语音转文字失败:`,e),s(!0),r(`转换失败`)}finally{a(!1)}}},disabled:i,className:`w-6 h-6 flex items-center justify-center rounded-full bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-500 dark:text-gray-300 hover:text-gray-700 dark:hover:text-white text-xs font-medium transition-colors disabled:opacity-50`,title:`语音转文字`,children:i?(0,I.jsx)(N,{size:12,className:`animate-spin`}):`文`})]}),(v||n)&&(0,I.jsx)(`div`,{className:`text-sm px-3 py-1.5 bg-gray-100 dark:bg-gray-800 rounded-lg max-w-[250px] ${o?`text-red-500`:`text-theme-secondary`}`,children:v||n})]})},Zi=({segment:e})=>{let t=C.useContext(Ui);if(e.type===`text`&&e.data.text)return(0,I.jsx)(`span`,{className:`whitespace-pre-wrap break-all`,style:{overflowWrap:`anywhere`},children:e.data.text});if(e.type===`image`&&e.data.url){let n=Ki(e.data.url);return(0,I.jsx)(`img`,{src:n,alt:`图片`,loading:`lazy`,className:`max-w-[200px] max-h-[150px] rounded-lg cursor-pointer object-cover`,onClick:()=>t?.showPreview(n)})}return e.type===`face`&&e.data.faceId!==void 0?(0,I.jsx)(`img`,{src:`/face/${e.data.faceId}.png`,alt:`[表情${e.data.faceId}]`,className:`inline-block align-text-bottom`,style:{width:24,height:24},onError:t=>{let n=t.target;n.style.display=`none`;let r=document.createElement(`span`);r.textContent=`[表情${e.data.faceId}]`,n.parentNode?.insertBefore(r,n)}}):e.type===`forward`&&e.data.resId?(0,I.jsx)(Qi,{resId:e.data.resId,title:e.data.title||`[聊天记录]`}):null},Qi=({resId:e,title:t})=>{let[n,r]=(0,C.useState)(!1);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-800 rounded-lg cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors`,onClick:()=>r(!0),children:[(0,I.jsx)(`span`,{className:`text-sm text-theme-secondary`,children:t}),(0,I.jsx)(j,{size:14,className:`text-theme-hint flex-shrink-0`})]}),n&&(0,I.jsx)(na,{resId:e,title:t,onClose:()=>r(!1)})]})};function $i(e){return{title:e.match(/<title[^>]*color="#000000"[^>]*>(.*?)<\/title>/)?.[1]||`[聊天记录]`,previews:e.match(/<title[^>]*color="#777777"[^>]*>(.*?)<\/title>/g)?.map(e=>e.replace(/<[^>]+>/g,``))||[],summary:e.match(/<summary[^>]*>(.*?)<\/summary>/)?.[1]||``}}var ea=({element:e})=>{let[t,n]=(0,C.useState)(!1),r=e.multiForwardMsgElement,{title:i,previews:a,summary:o}=$i(r.xmlContent);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`w-[240px] bg-gray-50 dark:bg-gray-800/80 rounded-lg overflow-hidden cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700/80 transition-colors border border-theme-divider`,onClick:()=>n(!0),children:[(0,I.jsxs)(`div`,{className:`px-3 pt-2.5 pb-1`,children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme mb-1.5`,children:i}),a.map((e,t)=>(0,I.jsx)(`div`,{className:`text-xs text-theme-secondary truncate leading-5`,children:e},t))]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-t border-theme-divider`,children:[(0,I.jsx)(`span`,{className:`text-xs text-theme-hint`,children:o}),(0,I.jsx)(j,{size:12,className:`text-theme-hint`})]})]}),t&&(0,I.jsx)(na,{resId:r.resId,title:i,onClose:()=>n(!1)})]})},ta=({arkData:e})=>{let[t,n]=(0,C.useState)(!1),r=e.meta?.detail||{},i=r.source||`[聊天记录]`,a=(r.news||[]).map(e=>e.text||``),o=r.summary||``,s=r.resid||``;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`w-[240px] bg-gray-50 dark:bg-gray-800/80 rounded-lg overflow-hidden cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700/80 transition-colors border border-theme-divider`,onClick:()=>n(!0),children:[(0,I.jsxs)(`div`,{className:`px-3 pt-2.5 pb-1`,children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme mb-1.5`,children:i}),a.map((e,t)=>(0,I.jsx)(`div`,{className:`text-xs text-theme-secondary truncate leading-5`,children:e},t))]}),(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-t border-theme-divider`,children:[(0,I.jsx)(`span`,{className:`text-xs text-theme-hint`,children:o}),(0,I.jsx)(j,{size:12,className:`text-theme-hint`})]})]}),t&&(0,I.jsx)(na,{resId:s,title:i,onClose:()=>n(!1)})]})},na=({resId:e,title:t,onClose:n})=>{let[r,i]=(0,C.useState)([]),[a,o]=(0,C.useState)(!0),[s,c]=(0,C.useState)(null);C.useEffect(()=>{let t=!1;return(async()=>{try{o(!0),c(null);let n=await fr(e);t||i(n)}catch(e){t||c(e.message||`加载失败`)}finally{t||o(!1)}})(),()=>{t=!0}},[e]);let l=e=>e?new Date(e*1e3).toLocaleTimeString(`zh-CN`,{hour:`2-digit`,minute:`2-digit`}):``;return(0,Ct.createPortal)((0,I.jsx)(`div`,{className:`fixed inset-0 z-[9999] flex items-center justify-center bg-black/50 backdrop-blur-sm`,onClick:n,children:(0,I.jsxs)(`div`,{className:`bg-white dark:bg-neutral-900 rounded-2xl shadow-2xl w-[90vw] max-w-[480px] max-h-[80vh] flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-theme-divider flex-shrink-0`,children:[(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:t}),(0,I.jsx)(`button`,{onClick:n,className:`p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors`,children:(0,I.jsx)(vt,{size:18,className:`text-theme-hint`})})]}),(0,I.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-4 py-3 space-y-3`,children:[a&&(0,I.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,I.jsx)(N,{size:24,className:`animate-spin text-pink-500`})}),s&&(0,I.jsx)(`div`,{className:`text-center py-8 text-red-500 text-sm`,children:s}),!a&&!s&&r.length===0&&(0,I.jsx)(`div`,{className:`text-center py-8 text-theme-hint text-sm`,children:`暂无消息`}),!a&&!s&&r.map((e,t)=>(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`img`,{src:`https://q1.qlogo.cn/g?b=qq&nk=${e.senderUin}&s=640`,alt:e.senderName,className:`w-7 h-7 rounded-full object-cover flex-shrink-0 mt-0.5`}),(0,I.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-0.5`,children:[(0,I.jsx)(`span`,{className:`text-xs font-medium text-theme-secondary`,children:e.senderName}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint`,children:l(e.time)})]}),(0,I.jsxs)(`div`,{className:`text-sm text-theme break-words`,children:[e.segments.map((e,t)=>(0,I.jsx)(Zi,{segment:e},t)),e.segments.length===0&&(0,I.jsx)(`span`,{className:`text-theme-hint`,children:`[不支持的消息类型]`})]})]})]},t))]})]})}),document.body)},ra=C.createContext(null),ia=C.createContext(null),aa=C.createContext(null),oa=C.createContext(null),sa=C.createContext(null),ca=e=>{for(let t of e.elements)if(t.grayTipElement?.jsonGrayTipElement?.jsonStr)try{let e=JSON.parse(t.grayTipElement.jsonGrayTipElement.jsonStr);if(e.items){let t=e.items.some(e=>e.type===`qq`&&e.uid);return{items:e.items,hasUid:t}}}catch{}return null},la=new Map,ua=(0,C.memo)(({message:e,groupCode:t})=>{let[n,r]=(0,C.useState)(la.get(e.msgId)??`[系统提示]`),i=zn();return(0,C.useEffect)(()=>{if(la.has(e.msgId)){r(la.get(e.msgId));return}let n=ca(e);if(!n){for(let t of e.elements)if(t.grayTipElement?.xmlElement?.content){let n=t.grayTipElement.xmlElement.content.replace(/<[^>]+>/g,``);la.set(e.msgId,n),r(n);return}la.set(e.msgId,`[系统提示]`),r(`[系统提示]`);return}let{items:a,hasUid:o}=n;if(!o){let t=a.map(e=>e.txt||``).join(``)||`[系统提示]`;la.set(e.msgId,t),r(t);return}(async()=>{let n=[],o=0;for(let e of a)if(e.type===`qq`&&e.uid)if(e.uid===i)n.push((0,I.jsx)(`span`,{className:`text-blue-500`,children:`你`},o++));else{let r=await nr(e.uid,t);n.push((0,I.jsx)(`span`,{className:`text-blue-500`,children:r},o++))}else e.type===`nor`&&e.txt&&n.push((0,I.jsx)(`span`,{children:e.txt},o++));let s=n.length>0?n:`[系统提示]`;la.set(e.msgId,s),r(s)})()},[e.msgId,i,t]),(0,I.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,I.jsx)(`span`,{className:`text-xs text-theme-hint bg-theme-item/50 px-3 py-1 rounded-full`,children:n})})}),da=(0,C.memo)(({message:e,allMessages:t,isHighlighted:n})=>{if(Yi(e))return(0,I.jsx)(ua,{message:e,groupCode:e.chatType===2?e.peerUin:void 0});let r=zn(),i=r?e.senderUid===r:!1,a=C.useContext(ra),o=C.useContext(ia),s=C.useContext(aa),c=C.useContext(oa),l=C.useContext(sa),u=e.sendMemberName||e.sendNickName||e.senderUin;if(e.chatType===1&&!i&&l){let t=l.getFriend(e.senderUin);t&&(u=t.remark||t.nickname||u)}let d=`https://q1.qlogo.cn/g?b=qq&nk=${e.senderUin}&s=640`,f=parseInt(e.msgTime)*1e3,p,m,h;if(e.chatType===2){let t=e.msgAttrs;if(t){let e=(e=>{if(t instanceof Map)return t.get(e);if(typeof t==`object`)return t[e.toString()]})(2);e?.groupHonor&&(p=e.groupHonor.level,m=e.groupHonor.uniqueTitle||void 0)}if(c){let t=c.getMembers(e.peerUin)?.find(t=>t.uid===e.senderUid||t.uin===e.senderUin);t&&(h=t.role,p===void 0&&t.level&&(p=t.level),!m&&t.specialTitle&&(m=t.specialTitle))}}if(!e.elements||!Array.isArray(e.elements))return null;let g=e.recallTime&&e.recallTime!==`0`,_=e.elements.find(e=>e.replyElement)?.replyElement,v=e.elements.filter(e=>!e.replyElement);if(!(v.some(Ji)||_))return null;let y=v.length===1&&v[0].pttElement&&!_,b=_?t.find(e=>e.msgId===_.replayMsgId||e.msgSeq===_.replayMsgSeq):null,x=t=>{t.preventDefault(),t.stopPropagation(),a?.showMenu(t,e)};return(0,I.jsxs)(`div`,{className:`flex gap-2 w-full ${i?`flex-row-reverse`:``} ${n?`animate-pulse bg-pink-100 dark:bg-pink-900/30 rounded-lg -mx-2 px-2`:``}`,children:[(0,I.jsx)(`img`,{src:d,alt:u,loading:`lazy`,className:`w-8 h-8 rounded-full object-cover flex-shrink-0 cursor-pointer hover:opacity-80 transition-opacity`,onClick:t=>{(`ontouchstart`in window||navigator.maxTouchPoints>0)&&(t.preventDefault(),t.stopPropagation(),o?.showMenu(t,{senderUid:e.senderUid,senderUin:e.senderUin,senderName:u,chatType:e.chatType,groupCode:e.chatType===2?e.peerUin:void 0}))},onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),o?.showMenu(t,{senderUid:e.senderUid,senderUin:e.senderUin,senderName:u,chatType:e.chatType,groupCode:e.chatType===2?e.peerUin:void 0})}}),(0,I.jsxs)(`div`,{className:`flex flex-col ${i?`items-end`:`items-start`} max-w-[calc(100%-48px)] md:max-w-[70%] min-w-0 overflow-hidden`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-1 ${i?`flex-row-reverse`:``}`,children:[(0,I.jsx)(`span`,{className:`text-xs text-theme-hint`,children:u}),p!==void 0&&p>0&&(0,I.jsxs)(`span`,{className:`text-xs px-1 py-0.5 bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-300 rounded`,children:[`Lv.`,p]}),h===`owner`&&(0,I.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 bg-amber-100 dark:bg-amber-900/50 text-amber-600 dark:text-amber-300 rounded`,children:m||`群主`}),h===`admin`&&(0,I.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 bg-blue-100 dark:bg-blue-900/50 text-blue-600 dark:text-blue-300 rounded`,children:m||`管理员`}),h===`member`&&m&&(0,I.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 bg-pink-100 dark:bg-pink-900/50 text-pink-600 dark:text-pink-300 rounded`,children:m})]}),y?(0,I.jsxs)(`div`,{onContextMenu:x,className:g?`opacity-50`:``,children:[v.map((t,n)=>(0,I.jsx)(qi,{element:t,message:e},n)),g&&(0,I.jsx)(`div`,{className:`text-xs text-theme-muted italic mt-1`,children:`已撤回`})]}):(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsxs)(`div`,{className:`rounded-2xl px-4 py-2 min-w-[80px] max-w-full break-words overflow-hidden bg-theme-item text-theme shadow-sm ${i?`rounded-tr-sm`:`rounded-tl-sm`} ${g?`opacity-50`:``}`,onContextMenu:x,children:[_&&(0,I.jsx)(`div`,{className:`text-xs mb-2 pb-2 border-b border-theme-divider cursor-pointer hover:opacity-80 transition-opacity`,onClick:()=>{_&&s?.scrollToMessage(_.replayMsgId,_.replayMsgSeq)},children:(0,I.jsx)(`div`,{className:`bg-theme-input rounded px-2 py-1`,children:b?(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`font-medium text-theme-secondary`,children:[b.sendMemberName||b.sendNickName||b.senderUin,`:`]}),(0,I.jsx)(`div`,{className:`text-theme-muted`,children:b.elements?.filter(e=>!e.replyElement).map((e,t)=>(0,I.jsx)(qi,{element:e},t))})]}):(0,I.jsx)(`span`,{className:`text-theme-muted`,children:_.sourceMsgText||`[消息]`})})}),v.map((t,n)=>(0,I.jsx)(qi,{element:t,message:e},n))]}),g&&(0,I.jsx)(`div`,{className:`text-xs text-theme-muted italic mt-1`,children:`已撤回`})]}),(0,I.jsx)(pa,{message:e,isSelf:i}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint mt-1`,children:_r(f)})]})]})});function fa(e,t){return t===`2`?`/face/emoji-${parseInt(e).toString(16)}.png`:`/face/${e}.png`}var pa=(0,C.memo)(({message:e,isSelf:t})=>{let[n,r]=(0,C.useState)(null);if(!e.emojiLikesList||e.emojiLikesList.length===0)return null;let i=async(t,i)=>{if(!n){r(t);try{await z(`ntMsgApi`,`setEmojiLike`,[{chatType:e.chatType,peerUid:e.peerUin,guildId:``},e.msgSeq,t,!i])}catch(e){L(e.message||`操作失败`,`error`)}finally{r(null)}}};return(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-1 ${t?`justify-end`:`justify-start`}`,children:e.emojiLikesList.map((e,t)=>{let r=fa(e.emojiId,e.emojiType);return(0,I.jsxs)(`button`,{onClick:()=>i(e.emojiId,e.isClicked),disabled:n===e.emojiId,className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded-full text-xs transition-all cursor-pointer hover:scale-105 active:scale-95 ${e.isClicked?`bg-pink-100 dark:bg-pink-900/40 border border-pink-300 dark:border-pink-700`:`bg-theme-item border border-theme-divider hover:border-pink-300 dark:hover:border-pink-700`} ${n===e.emojiId?`opacity-50`:``}`,title:e.isClicked?`点击取消`:`点击跟贴`,children:[(0,I.jsx)(`img`,{src:r,alt:`表情${e.emojiId}`,className:`w-4 h-4`,onError:t=>{if(e.emojiType===`2`){let n=t.target,r=String.fromCodePoint(parseInt(e.emojiId));n.style.display=`none`,n.insertAdjacentHTML(`afterend`,`<span class="text-sm">${r}</span>`)}}}),(0,I.jsx)(`span`,{className:`text-theme-secondary`,children:e.likesCnt})]},`${e.emojiId}-${t}`)})})}),ma=(0,C.memo)(({message:e,onRetry:t})=>{let n=Bn(),r=n?`https://q1.qlogo.cn/g?b=qq&nk=${n}&s=640`:``;return(0,I.jsxs)(`div`,{className:`flex gap-2 flex-row-reverse w-full`,children:[r&&(0,I.jsx)(`img`,{src:r,alt:`我`,loading:`lazy`,className:`w-8 h-8 rounded-full object-cover flex-shrink-0`}),(0,I.jsxs)(`div`,{className:`flex flex-col items-end max-w-[calc(100%-48px)] md:max-w-[70%] min-w-0 overflow-hidden`,children:[(0,I.jsx)(`span`,{className:`text-xs text-theme-hint mb-1`,children:`我`}),(0,I.jsxs)(`div`,{className:`flex items-end gap-1`,children:[e.status===`failed`&&(0,I.jsx)(`button`,{onClick:t,className:`p-1 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/30 rounded`,title:`重新发送`,children:(0,I.jsx)(qe,{size:14})}),(0,I.jsx)(`div`,{className:`rounded-2xl px-4 py-2 bg-theme-item text-theme rounded-tr-sm min-w-[80px] max-w-full break-words overflow-hidden shadow-sm`,children:e.items.map((e,t)=>e.type===`text`&&e.content?(0,I.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:e.content},t):e.type===`face`&&e.faceId!==void 0?(0,I.jsx)(`img`,{src:`/face/${e.faceId}.png`,alt:`[表情${e.faceId}]`,className:`inline-block align-text-bottom`,style:{width:24,height:24}},t):e.type===`image`&&e.imageUrl?(0,I.jsx)(`img`,{src:e.imageUrl,alt:`图片`,loading:`lazy`,className:`max-w-full rounded-lg`,style:{maxHeight:`200px`}},t):e.type===`at`&&e.atName?(0,I.jsxs)(`span`,{className:`text-blue-500`,children:[`@`,e.atName]},t):null)}),e.status===`sending`&&(0,I.jsx)(N,{size:14,className:`animate-spin text-theme-hint`}),e.status===`failed`&&(0,I.jsx)(M,{size:14,className:`text-red-500`})]}),(0,I.jsx)(`span`,{className:`text-xs text-theme-hint mt-1`,children:_r(e.timestamp)})]})]})}),ha=({name:e,onMute:t,onClose:n})=>{let[r,i]=(0,C.useState)(0),[a,o]=(0,C.useState)(0),[s,c]=(0,C.useState)(0),[l,u]=(0,C.useState)(0),d=()=>{let e=r+a*60+s*3600+l*86400;e>0&&t(e)},f=r+a*60+s*3600+l*86400;return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/30`,onClick:n}),(0,I.jsxs)(`div`,{className:`fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-theme-card backdrop-blur-xl border border-theme-divider rounded-xl shadow-xl p-6 min-w-[340px]`,children:[(0,I.jsxs)(`h3`,{className:`text-lg font-medium text-theme mb-4`,children:[`禁言 `,e]}),(0,I.jsxs)(`div`,{className:`mb-4`,children:[(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary mb-3`,children:`设置禁言时长:`}),(0,I.jsxs)(`div`,{className:`grid grid-cols-4 gap-2`,children:[(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:59,value:r,onChange:e=>i(Math.min(59,Math.max(0,parseInt(e.target.value)||0))),className:`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`秒`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:59,value:a,onChange:e=>o(Math.min(59,Math.max(0,parseInt(e.target.value)||0))),className:`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`分钟`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:23,value:s,onChange:e=>c(Math.min(23,Math.max(0,parseInt(e.target.value)||0))),className:`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`小时`})]}),(0,I.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,I.jsx)(`input`,{type:`number`,min:0,max:29,value:l,onChange:e=>u(Math.min(29,Math.max(0,parseInt(e.target.value)||0))),className:`w-full px-2 py-2 text-center bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20`}),(0,I.jsx)(`span`,{className:`text-xs text-theme-secondary mt-1`,children:`天`})]})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-secondary mt-2 text-center`,children:`最长29天23小时59分59秒`})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`button`,{onClick:()=>t(0),className:`px-4 py-2 text-sm text-green-500 hover:bg-green-50 dark:hover:bg-green-900/30 rounded-lg transition-colors`,children:`解除禁言`}),(0,I.jsxs)(`div`,{className:`flex gap-2`,children:[(0,I.jsx)(`button`,{onClick:n,className:`px-4 py-2 text-sm text-theme-secondary hover:bg-theme-item rounded-lg transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:d,disabled:f===0,className:`px-4 py-2 text-sm bg-orange-500 text-white hover:bg-orange-600 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:`确认禁言`})]})]})]})]}),document.body)},ga=({name:e,groupName:t,onConfirm:n,onClose:r})=>(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/50`,onClick:r}),(0,I.jsxs)(`div`,{className:`fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-theme-card border border-theme-divider rounded-xl shadow-xl p-6 min-w-[320px]`,children:[(0,I.jsx)(`h3`,{className:`text-lg font-medium text-theme mb-4`,children:`确认踢出`}),(0,I.jsxs)(`p`,{className:`text-theme-secondary mb-6`,children:[`确定要将 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:e}),` 移出群 `,(0,I.jsx)(`span`,{className:`font-medium text-theme`,children:t}),` 吗?`]}),(0,I.jsxs)(`div`,{className:`flex justify-end gap-3`,children:[(0,I.jsx)(`button`,{onClick:r,className:`px-4 py-2 text-sm text-theme-secondary hover:bg-theme-item rounded-lg transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:n,className:`px-4 py-2 text-sm bg-red-500 text-white hover:bg-red-600 rounded-lg transition-colors`,children:`确认踢出`})]})]})]}),document.body),_a=({name:e,onConfirm:t,onClose:n})=>{let[r,i]=(0,C.useState)(``);return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-50 bg-black/30`,onClick:n}),(0,I.jsxs)(`div`,{className:`fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-theme-card backdrop-blur-xl border border-theme-divider rounded-xl shadow-xl p-6 min-w-[320px]`,children:[(0,I.jsx)(`h3`,{className:`text-lg font-medium text-theme mb-4`,children:`设置头衔`}),(0,I.jsxs)(`p`,{className:`text-sm text-theme-secondary mb-3`,children:[`为 `,e,` 设置专属头衔:`]}),(0,I.jsx)(`input`,{type:`text`,maxLength:12,value:r,onChange:e=>i(e.target.value),placeholder:`留空清除头衔`,className:`w-full px-3 py-2 bg-theme-input border border-theme-input rounded-lg text-theme focus:outline-none focus:ring-2 focus:ring-pink-500/20 placeholder:text-theme-hint`,autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&t(r.trim())}}),(0,I.jsx)(`p`,{className:`text-xs text-theme-secondary mt-2`,children:`中文最多6字,英文最多12字,按回车确认`}),(0,I.jsxs)(`div`,{className:`flex justify-end gap-2 mt-4`,children:[(0,I.jsx)(`button`,{onClick:n,className:`px-4 py-2 text-sm text-theme-secondary hover:bg-theme-item rounded-lg transition-colors`,children:`取消`}),(0,I.jsx)(`button`,{onClick:()=>t(r.trim()),className:`px-4 py-2 text-sm bg-pink-500 text-white hover:bg-pink-600 rounded-lg transition-colors`,children:`确认`})]})]})]}),document.body)};function va(e,t,n){let[r,i]=(0,C.useState)({left:-9999,top:-9999,ready:!1});return(0,C.useEffect)(()=>{i({left:-9999,top:-9999,ready:!1});let r=requestAnimationFrame(()=>{if(!n.current){i({left:e,top:t,ready:!0});return}let r=n.current.getBoundingClientRect(),a=e,o=t;e+r.width>window.innerWidth-10&&(a=e-r.width),a<10&&(a=10),t+r.height>window.innerHeight-10&&(o=t-r.height),o<10&&(o=10),i({left:a,top:o,ready:!0})});return()=>cancelAnimationFrame(r)},[e,t]),r}var ya=({contextMenu:e,session:t,getCachedMembers:n,onClose:r,onReply:i,onEmojiReaction:a,onRecall:o})=>{let s=e.message,c=zn(),l=c&&s.senderUid===c,u=s.chatType===2,d=u&&t?n(t.peerId):null,f=(d&&c?d.find(e=>e.uid===c):null)?.role,p=f===`owner`,m=f===`admin`||f===`owner`,h=(d?d.find(e=>e.uid===s.senderUid):null)?.role,g=l||u&&(p||m&&!(h===`admin`||h===`owner`)),_=!!e.elementId,v=(0,C.useRef)(null),y=va(e.x,e.y,v);return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:r,onContextMenu:e=>{e.preventDefault(),r()}}),(0,I.jsxs)(`div`,{ref:v,className:`fixed z-50 bg-popup backdrop-blur-sm border border-theme-divider rounded-lg shadow-lg py-1 min-w-[100px]`,style:{left:y.left,top:y.top,visibility:y.ready?`visible`:`hidden`},onContextMenu:e=>e.preventDefault(),children:[(0,I.jsxs)(`button`,{onClick:()=>{i(s),r()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(Je,{size:14}),` 回复`]}),t.chatType===2&&(0,I.jsxs)(`button`,{onClick:()=>{a(s,e.x,e.y),r()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(it,{size:14}),` 贴表情`]}),_&&(0,I.jsxs)(`button`,{onClick:async()=>{if(e.elementId){r();try{let t=await z(`ntFileApi`,`downloadMedia`,[s.msgId,s.chatType,s.peerUid,e.elementId,``,``]);if(!t){L(`图片下载失败`,`error`);return}let n=await z(`ntMsgApi`,`addFavEmoji`,[t]);n.result===0?L(n.isExist?`表情已存在`:`已添加到表情`,`success`):L(n.errMsg||`添加失败`,`error`)}catch(e){L(e.message||`添加失败`,`error`)}}},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(ot,{size:14}),` 添加到表情`]}),g&&(0,I.jsxs)(`button`,{onClick:async()=>{r();try{await tr(s.chatType,s.peerUid,s.msgId),o(s.msgId),L(`消息已撤回`,`success`)}catch(e){L(e.message||`撤回失败`,`error`)}},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-red-500 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(F,{size:14}),` 撤回`]})]})]}),document.body)},ba=({avatarContextMenu:e,getCachedMembers:t,onClose:n,onInsertAt:r,onShowProfile:i,onSetTitle:a,onMute:o,onKick:s,onAdminChanged:c,groupName:l})=>{let u=zn(),d=e.groupCode?t(e.groupCode):null,f=(d&&u?d.find(e=>e.uid===u):null)?.role,p=f===`owner`,m=f===`admin`,h=(d?d.find(t=>t.uid===e.senderUid):null)?.role,g=h===`admin`,_=p||m&&h===`member`,v=p||m&&h===`member`,y=e.senderUid===u,b=p&&!y,x=(0,C.useRef)(null),S=va(e.x,e.y,x);return(0,Ct.createPortal)((0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:n,onContextMenu:e=>{e.preventDefault(),n()}}),(0,I.jsxs)(`div`,{ref:x,className:`fixed z-50 bg-popup backdrop-blur-sm border border-theme-divider rounded-lg shadow-lg py-1 min-w-[120px]`,style:{left:S.left,top:S.top,visibility:S.ready?`visible`:`hidden`},onContextMenu:e=>e.preventDefault(),children:[e.chatType===2&&(0,I.jsxs)(`button`,{onClick:()=>{r(e.senderUid,e.senderUin,e.senderName),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(ne,{size:14}),` 召唤ta`]}),(0,I.jsxs)(`button`,{onClick:async()=>{let t=e;n();try{t.chatType===2&&t.groupCode?await rr(t.chatType,parseInt(t.senderUin),parseInt(t.groupCode)):await rr(t.chatType,parseInt(t.senderUin))}catch(e){L(e.message||`戳一戳失败`,`error`)}},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(Ce,{size:14}),` 戳一戳`]}),(0,I.jsxs)(`button`,{onClick:()=>{i(e.senderUid,e.senderUin,e.x,e.y,e.groupCode),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(pt,{size:14}),` 查看资料`]}),e.chatType===2&&e.groupCode&&p&&(0,I.jsxs)(`button`,{onClick:()=>{a(e.senderUid,e.senderName,e.groupCode),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(re,{size:14}),` 设置头衔`]}),e.chatType===2&&e.groupCode&&b&&(0,I.jsxs)(`button`,{onClick:async()=>{let t=e;n();try{let e=g?2:3;await z(`ntGroupApi`,`setMemberRole`,[t.groupCode,t.senderUid,e]),L(g?`已取消管理员`:`已设为管理员`,`success`),c?.()}catch(e){L(e.message||`操作失败`,`error`)}},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-theme hover:bg-theme-item-hover transition-colors`,children:[g?(0,I.jsx)(tt,{size:14}):(0,I.jsx)(nt,{size:14}),g?`取消管理员`:`设为管理员`]}),e.chatType===2&&e.groupCode&&!y&&_&&(0,I.jsxs)(`button`,{onClick:()=>{o(e.senderUid,e.senderName,e.groupCode),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-orange-500 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(gt,{size:14}),` 禁言`]}),e.chatType===2&&e.groupCode&&!y&&v&&(0,I.jsxs)(`button`,{onClick:()=>{s(e.senderUid,e.senderName,e.groupCode,l||e.groupCode),n()},className:`w-full flex items-center gap-2 px-3 py-2 text-sm text-red-500 hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsx)(dt,{size:14}),` 踢出群`]})]})]}),document.body)},xa=(0,C.forwardRef)(({placeholder:e=`输入消息...`,disabled:t=!1,onEnter:n,onPaste:r,onChange:i,onMentionChange:a},o)=>{let s=(0,C.useRef)(null),c=(0,C.useRef)(!1),l=(0,C.useRef)(null),[u,d]=(0,C.useState)(!1),f=(0,C.useCallback)(()=>{let e=s.current;if(!e)return[];let t=[],n=e.childNodes;for(let e=0;e<n.length;e++){let r=n[e];if(r.nodeType===Node.TEXT_NODE){let e=(r.textContent||``).replace(/\u200B/g,``);e&&t.push({type:`text`,content:e})}else if(r.nodeType===Node.ELEMENT_NODE){let e=r;if(e.dataset.type===`face`)t.push({type:`face`,faceId:parseInt(e.dataset.faceId||`0`)});else if(e.dataset.type===`image`)t.push({type:`image`,imageUrl:e.dataset.imageUrl,imageFile:e.__file});else if(e.dataset.type===`at`)t.push({type:`at`,atUid:e.dataset.atUid,atUin:e.dataset.atUin,atName:e.dataset.atName});else if(e.tagName===`BR`)t.push({type:`text`,content:`
|
|
24
24
|
`});else{let n=(e.textContent||``).replace(/\u200B/g,``);n&&t.push({type:`text`,content:n})}}}return t},[]),p=(0,C.useCallback)(()=>{let e=f();return e.length===0||e.length===1&&e[0].type===`text`&&!e[0].content?.trim()},[f]),m=(0,C.useCallback)(()=>{let e=window.getSelection();if(!e||e.rangeCount===0)return{top:0,left:0};let t=e.getRangeAt(0).getBoundingClientRect(),n=s.current?.getBoundingClientRect();return n?{top:n.bottom-t.top+8,left:t.left-n.left}:{top:0,left:0}},[]),h=(0,C.useCallback)(()=>{if(!l.current)return``;let e=window.getSelection();if(!e||e.rangeCount===0)return``;let t=e.getRangeAt(0),{node:n,offset:r}=l.current;return t.startContainer===n?(n.textContent||``).slice(r,t.startOffset):``},[]),g=(0,C.useCallback)(()=>{l.current=null,d(!1),a?.({active:!1,query:``,position:{top:0,left:0}})},[a]),_=(0,C.useCallback)(()=>{let e=window.getSelection();if(!e||e.rangeCount===0)return;let t=e.getRangeAt(0),n=t.startContainer;if(n.nodeType!==Node.TEXT_NODE){u&&g();return}let r=n.textContent||``,i=t.startOffset;if(u&&l.current){if(l.current.node===n&&i>=l.current.offset){let e=h();e.includes(` `)?g():a?.({active:!0,query:e,position:m()})}else g();return}let o=r.slice(0,i),s=o.lastIndexOf(`@`);if(s!==-1){let e=s>0?o[s-1]:` `;if(e===` `||e===`
|
|
25
25
|
`||s===0){let e=o.slice(s+1);e.includes(` `)||(l.current={node:n,offset:s+1},d(!0),a?.({active:!0,query:e,position:m()}))}}},[u,h,m,g,a]),v=(0,C.useCallback)(e=>{let t=s.current;if(!t)return;g();let n=document.createTextNode(e),r=window.getSelection();if(r&&r.rangeCount>0){let e=r.getRangeAt(0);t.contains(e.commonAncestorContainer)?(e.deleteContents(),e.insertNode(n),e.setStartAfter(n),e.setEndAfter(n),r.removeAllRanges(),r.addRange(e)):t.appendChild(n)}else t.appendChild(n);t.focus(),i?.(f())},[i,f,g]),y=(0,C.useCallback)(e=>{let t=s.current;if(!t)return;g();let n=document.createElement(`span`);n.contentEditable=`false`,n.dataset.type=`face`,n.dataset.faceId=String(e),n.className=`inline-block align-middle mx-0.5 select-all`,n.innerHTML=`<img src="/face/${e}.png" alt="[表情]" class="w-6 h-6 inline-block" draggable="false" />`;let r=window.getSelection();if(r&&r.rangeCount>0){let e=r.getRangeAt(0);if(t.contains(e.commonAncestorContainer)){e.deleteContents(),e.insertNode(n);let t=document.createTextNode(``);n.after(t),e.setStartAfter(t),e.setEndAfter(t),r.removeAllRanges(),r.addRange(e)}else{t.appendChild(n);let e=document.createTextNode(``);t.appendChild(e)}}else{t.appendChild(n);let e=document.createTextNode(``);t.appendChild(e)}t.focus(),i?.(f())},[i,f,g]),b=(0,C.useCallback)((e,t)=>{let n=s.current;if(!n)return;g();let r=document.createElement(`span`);r.contentEditable=`false`,r.dataset.type=`image`,r.dataset.imageUrl=t,e&&(r.__file=e),r.className=`inline-block align-middle mx-0.5 select-all`,r.innerHTML=`<img src="${t}" alt="[图片]" class="h-16 max-w-[200px] rounded inline-block object-cover" draggable="false" />`;let a=window.getSelection();if(a&&a.rangeCount>0){let e=a.getRangeAt(0);if(n.contains(e.commonAncestorContainer)){e.deleteContents(),e.insertNode(r);let t=document.createTextNode(``);r.after(t),e.setStartAfter(t),e.setEndAfter(t),a.removeAllRanges(),a.addRange(e)}else{n.appendChild(r);let e=document.createTextNode(``);n.appendChild(e)}}else{n.appendChild(r);let e=document.createTextNode(``);n.appendChild(e)}n.focus(),i?.(f())},[i,f,g]),x=(0,C.useCallback)((e,t,n)=>{let r=s.current;if(!r)return;if(u&&l.current){let{node:e,offset:t}=l.current,n=window.getSelection();if(n&&n.rangeCount>0){let r=n.getRangeAt(0),i=document.createRange();i.setStart(e,t-1),i.setEnd(r.startContainer,r.startOffset),i.deleteContents()}}g();let a=document.createElement(`span`);a.contentEditable=`false`,a.dataset.type=`at`,a.dataset.atUid=e,a.dataset.atUin=t,a.dataset.atName=n,a.className=`inline-block align-middle mx-0.5 px-1 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-300 text-sm rounded select-all`,a.textContent=`@${n}`;let o=window.getSelection();if(o&&o.rangeCount>0){let e=o.getRangeAt(0);r.contains(e.commonAncestorContainer)?(e.deleteContents(),e.insertNode(a),e.setStartAfter(a),e.setEndAfter(a),o.removeAllRanges(),o.addRange(e)):r.appendChild(a)}else r.appendChild(a);let c=document.createTextNode(` `);a.after(c);let d=document.createRange();d.setStartAfter(c),d.setEndAfter(c),o?.removeAllRanges(),o?.addRange(d),r.focus(),i?.(f())},[u,i,f,g]),S=(0,C.useCallback)(()=>{let e=s.current;e&&(e.innerHTML=``,g(),i?.([]))},[i,g]),w=(0,C.useCallback)(()=>{let e=s.current;if(!e)return;e.focus();let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n)}},[]);(0,C.useImperativeHandle)(o,()=>({focus:w,clear:S,insertFace:y,insertText:v,insertImage:b,insertAt:x,getContent:f,isEmpty:p,cancelMention:g}),[w,S,y,v,b,x,f,p,g]);let T=(0,C.useCallback)(e=>{if(u){if([`ArrowUp`,`ArrowDown`,`Enter`,`Tab`].includes(e.key))return;if(e.key===`Escape`){e.preventDefault(),g();return}}e.key===`Enter`&&!e.shiftKey&&!c.current&&!u&&(e.preventDefault(),n?.())},[n,u,g]),E=(0,C.useCallback)(()=>{_(),i?.(f())},[i,f,_]),D=(0,C.useCallback)(e=>{let t=e.clipboardData?.items;if(t){for(let n=0;n<t.length;n++)if(t[n].type.startsWith(`image/`)){e.preventDefault(),r?.(e);return}}e.preventDefault();let n=e.clipboardData?.getData(`text/plain`);n&&document.execCommand(`insertText`,!1,n)},[r]),O=(0,C.useCallback)(()=>{setTimeout(_,0)},[_]),ee=(0,C.useCallback)(()=>{setTimeout(()=>{u&&g()},200)},[u,g]);return(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`div`,{ref:s,contentEditable:!t,onKeyDown:T,onInput:E,onPaste:D,onClick:O,onBlur:ee,onCompositionStart:()=>{c.current=!0},onCompositionEnd:()=>{c.current=!1,E()},className:`min-h-[36px] max-h-[120px] overflow-y-auto px-3 py-2 outline-none text-theme whitespace-pre-wrap break-words ${t?`opacity-50 cursor-not-allowed`:``}`,style:{wordBreak:`break-word`},"data-placeholder":e,suppressContentEditableWarning:!0}),(0,I.jsx)(`style`,{children:`
|
|
26
26
|
[data-placeholder]:empty:before {
|
|
@@ -34,4 +34,4 @@ Error generating stack: `+e.message+`
|
|
|
34
34
|
`,children:(0,I.jsx)(ri,{activeTab:f,onTabChange:g,friendCategories:s,groups:c,recentChats:w,unreadCounts:M,selectedPeerId:d?.peerId,onSelectFriend:le,onSelectGroup:ue,onSelectRecent:j})}),(0,I.jsx)(`div`,{className:`
|
|
35
35
|
flex-1 flex flex-col min-w-0
|
|
36
36
|
${k?`block`:`hidden md:flex`}
|
|
37
|
-
`,children:(0,I.jsx)(Ha,{session:d,onShowMembers:()=>_(!m),onNewMessageCallback:re,onEmojiReactionCallback:ie,onMessageRecalledCallback:ae,appendInputMention:D,onAppendInputMentionConsumed:te,onBack:ce,showBackButton:k})}),m&&d?.chatType===2&&(0,I.jsx)(`div`,{className:`fixed inset-0 z-50 bg-white/85 dark:bg-neutral-900/85 backdrop-blur-xl md:static md:inset-auto md:z-auto md:bg-transparent md:backdrop-blur-none md:w-64 md:border-l md:border-theme-divider md:flex-shrink-0`,children:(0,I.jsx)(Wa,{groupCode:d.peerId,onClose:()=>_(!1),onAtMember:ee})})]}),!e&&o&&(0,I.jsx)(`button`,{onClick:()=>window.open(`#webqq-fullscreen`,`_blank`),className:`fixed top-4 right-4 md:top-auto md:bottom-6 md:right-6 z-50 p-3 bg-pink-500/70 hover:bg-pink-500/90 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-200 group backdrop-blur-sm`,title:`在新窗口中全屏打开`,children:(0,I.jsx)(Ne,{size:20,className:`group-hover:scale-110 transition-transform`})})]})},qa=()=>(0,I.jsx)(`div`,{className:`h-screen bg-theme p-4 md:p-8`,children:(0,I.jsx)(Ka,{isFullscreen:!0})}),Ja={webui:{enable:!0,host:`127.0.0.1`,port:3080},milky:{enable:!1,reportSelfMessage:!1,http:{host:`127.0.0.1`,port:3010,prefix:``,accessToken:``},webhook:{urls:[],accessToken:``}},satori:{enable:!1,host:`127.0.0.1`,port:5600,token:``},ob11:{enable:!0,connect:[]},enableLocalFile2Url:!1,log:!0,autoDeleteFile:!1,autoDeleteFileSecond:60,musicSignUrl:`https://ss.xingzhige.com/music_card/card`,msgCacheExpire:120,ffmpeg:``,rawMsgPB:!1};function Ya(){let[e,t]=(0,C.useState)(()=>{let e=window.location.hash.slice(1);return[`dashboard`,`onebot`,`satori`,`milky`,`logs`,`other`,`webqq`,`webqq-fullscreen`,`about`].includes(e)?e:`dashboard`}),[n,r]=(0,C.useState)(Ja),[i,a]=(0,C.useState)(null),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(!0),[f,p]=(0,C.useState)(null),[m,h]=(0,C.useState)(!1),[g,_]=(0,C.useState)(``),[v,y]=(0,C.useState)(null),[b,x]=(0,C.useState)(!1),[S,w]=(0,C.useState)(!1),[T,E]=(0,C.useState)(!1),[D,O]=(0,C.useState)(!1),[ee,te]=(0,C.useState)(``),[ne,re]=(0,C.useState)(!1),[ie,ae]=(0,C.useState)(!1),[oe,k]=(0,C.useState)(!1),{autoHideSidebarInWebQQ:A}=Kt();(0,C.useEffect)(()=>{nn(async e=>new Promise(t=>{_(e||``),h(!0),y(()=>t)}))},[]),(0,C.useEffect)(()=>{window.location.hash=e},[e]),(0,C.useEffect)(()=>{A&&e===`webqq`&&ae(!0)},[e,A]),(0,C.useEffect)(()=>{let e=()=>{let e=window.location.hash.slice(1);[`dashboard`,`onebot`,`satori`,`milky`,`logs`,`other`,`webqq`,`webqq-fullscreen`,`about`].includes(e)&&t(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let se=(0,C.useCallback)(e=>{e.trim()?(h(!1),_(``),v&&(v(e),y(null))):_(`密码不能为空`)},[v]);(0,C.useEffect)(()=>{(async()=>{try{let e=await R(`/api/config`);if(e.success&&e.data.selfInfo.online){l(!0),p({nick:e.data.selfInfo.nick||``,uin:e.data.selfInfo.uin}),r(e.data.config);try{let e=await R(`/api/email/config`);e.success&&e.data&&a(e.data)}catch(e){console.error(`Failed to fetch email config:`,e)}try{let e=await R(`/api/device-info`);e.success&&e.data?.buildVer&&te(e.data.buildVer)}catch(e){console.error(`Failed to fetch device info:`,e)}}else l(!1)}catch(e){console.error(`Failed to check login status:`,e),l(!1)}finally{d(!1)}})()},[]);let ce=(0,C.useCallback)(async(e,t)=>{try{s(!0);let r=e||n,a=t===void 0?i:t,o=await R(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({config:r})});if(!o.success){L(o.message||`保存失败`,`error`);return}if(a)try{let e=await R(`/api/email/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)});if(!e.success){L(`主配置已保存,但邮件配置保存失败:${e.message}`,`warning`);return}}catch(e){L(`主配置已保存,但邮件配置保存失败:${String(e)}`,`warning`);return}L(`配置保存成功`,`success`)}catch(e){L(e instanceof Error?e.message:`保存失败`,`error`)}finally{s(!1)}},[n,i]),le=(0,C.useCallback)(()=>{window.location.reload()},[]);return u?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Gt,{}),(0,I.jsx)(`div`,{className:`relative flex items-center justify-center min-h-screen z-10`,children:(0,I.jsx)(N,{size:48,className:`animate-spin text-pink-500`})}),(0,I.jsx)(Pn,{visible:m,onConfirm:se,error:g})]}):c?e===`webqq-fullscreen`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Gt,{}),(0,I.jsx)(qa,{}),(0,I.jsx)(Pn,{visible:m,onConfirm:se,error:g}),(0,I.jsx)(kt,{})]}):(0,I.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,I.jsx)(Gt,{}),(0,I.jsx)(un,{activeTab:e,onTabChange:t,accountInfo:f||void 0,isOpen:ne,onClose:()=>re(!1),collapsed:ie,onToggleCollapse:()=>ae(!ie),onOpenSettings:()=>k(!0)}),(0,I.jsxs)(`main`,{className:`flex-1 overflow-auto z-10 transition-all duration-300 ${ie?``:`md:ml-64`}`,children:[(0,I.jsxs)(`div`,{className:`md:hidden sticky top-0 z-30 bg-theme-card/95 backdrop-blur-xl border-b border-theme-divider px-4 py-3 flex items-center gap-3`,children:[(0,I.jsx)(`button`,{onClick:()=>re(!0),className:`p-2 text-theme-muted hover:text-theme hover:bg-theme-item rounded-lg transition-colors`,children:(0,I.jsx)(Pe,{size:24})}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`img`,{src:`/logo.jpg`,alt:`Logo`,className:`w-8 h-8 rounded-lg`}),(0,I.jsx)(`span`,{className:`font-semibold text-theme`,children:`LLBot`})]})]}),(0,I.jsxs)(`div`,{className:`p-4 md:p-8 max-w-6xl mx-auto`,children:[(0,I.jsxs)(`div`,{className:`mb-8 hidden md:block`,children:[(0,I.jsx)(`h2`,{className:`text-3xl font-bold text-white mb-2`,children:e===`dashboard`&&`Dashboard`}),(0,I.jsx)(`p`,{className:`text-white/80`,children:e===`dashboard`&&`欢迎使用 Lucky Lillia Bot`})]}),e===`dashboard`&&(0,I.jsx)(_n,{llbotVersion:`7.12.2`,qqVersion:ee}),e===`webqq`&&(0,I.jsx)(Ka,{}),e===`logs`&&(0,I.jsx)(xn,{}),e===`onebot`&&(0,I.jsx)(On,{config:n.ob11,onChange:e=>{r({...n,ob11:e})},onSave:e=>{e?ce({...n,ob11:e}):ce()}}),e===`satori`&&(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-xl gradient-primary-br flex items-center justify-center`,children:(0,I.jsx)(he,{size:24,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`Satori 协议`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`配置 Satori 协议相关设置`})]}),(0,I.jsx)(`div`,{className:`flex-1`}),(0,I.jsxs)(`a`,{href:`https://www.luckylillia.com/guide/develop#satori-%E5%8D%8F%E8%AE%AE`,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 px-3 py-1.5 text-sm text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-lg transition-colors`,children:[(0,I.jsx)(_e,{size:16}),`文档`]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`启用 Satori 协议`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`开启后将支持 Satori 协议连接`})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:n.satori.enable,onChange:e=>r({...n,satori:{...n.satori,enable:e.target.checked}}),className:`switch-toggle`})]}),n.satori.enable&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`监听地址`}),(0,I.jsx)(cn,{value:n.satori.host,onChange:e=>r({...n,satori:{...n.satori,host:e}})}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`选择服务监听的网络地址`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Satori 端口`}),(0,I.jsx)(`input`,{type:`number`,value:n.satori.port,onChange:e=>r({...n,satori:{...n.satori,port:parseInt(e.target.value)}}),min:`1`,max:`65535`,placeholder:`5500`,className:`input-field`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`Satori 服务监听端口(1-65535)`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Satori Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{type:b?`text`:`password`,value:n.satori.token,onChange:e=>r({...n,satori:{...n.satori,token:e.target.value}}),placeholder:`请输入 Satori Token`,className:`input-field pr-12`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>x(!b),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1`,children:b?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`用于 Satori 连接验证的 Token`})]})]})]}),(0,I.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,I.jsx)(`button`,{onClick:()=>{if(n.satori.host===``&&n.satori.enable&&!n.satori.token?.trim()){L(`当监听所有地址时,必须设置 Satori Token!`,`error`);return}ce()},disabled:o,className:`btn-primary flex items-center gap-2`,children:o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(N,{size:20,className:`animate-spin`}),`保存中...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ye,{size:20}),`保存配置`]})})})]}),e===`milky`&&(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-xl bg-gradient-to-br from-pink-500 to-rose-600 flex items-center justify-center`,children:(0,I.jsx)(Le,{size:24,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`Milky 协议`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`配置 Milky 协议相关设置`})]}),(0,I.jsx)(`div`,{className:`flex-1`}),(0,I.jsxs)(`a`,{href:`https://www.luckylillia.com/guide/develop#milky-%E5%8D%8F%E8%AE%AE`,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 px-3 py-1.5 text-sm text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-lg transition-colors`,children:[(0,I.jsx)(_e,{size:16}),`文档`]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`启用 Milky 协议`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`开启后将支持 Milky 协议连接`})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:n.milky.enable,onChange:e=>r({...n,milky:{...n.milky,enable:e.target.checked}}),className:`switch-toggle`})]}),n.milky.enable&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`上报自己发送的消息`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`启用后将上报自己发送的消息`})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:n.milky.reportSelfMessage,onChange:e=>r({...n,milky:{...n.milky,reportSelfMessage:e.target.checked}}),className:`switch-toggle`})]}),(0,I.jsxs)(`div`,{className:`border-t border-theme-divider pt-4 mt-4`,children:[(0,I.jsx)(`h4`,{className:`text-md font-semibold text-theme mb-4`,children:`HTTP 配置`}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`监听地址`}),(0,I.jsx)(cn,{value:n.milky.http.host,onChange:e=>r({...n,milky:{...n.milky,http:{...n.milky.http,host:e}}})}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`选择服务监听的网络地址`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`HTTP 端口`}),(0,I.jsx)(`input`,{type:`number`,value:n.milky.http.port,onChange:e=>r({...n,milky:{...n.milky,http:{...n.milky.http,port:parseInt(e.target.value)}}}),min:`1`,max:`65535`,placeholder:`3010`,className:`input-field`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`Milky HTTP 服务监听端口(1-65535)`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`路径前缀`}),(0,I.jsx)(`input`,{type:`text`,value:n.milky.http.prefix,onChange:e=>r({...n,milky:{...n.milky,http:{...n.milky.http,prefix:e.target.value}}}),placeholder:`/api`,className:`input-field`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`HTTP API 路径前缀(可选)`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Access Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{type:S?`text`:`password`,value:n.milky.http.accessToken,onChange:e=>r({...n,milky:{...n.milky,http:{...n.milky.http,accessToken:e.target.value}}}),placeholder:`请输入 Access Token`,className:`input-field pr-12`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>w(!S),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1`,children:S?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`用于 Milky HTTP 连接验证的 Token`})]})]})]}),(0,I.jsxs)(`div`,{className:`border-t border-theme-divider pt-4 mt-4`,children:[(0,I.jsx)(`h4`,{className:`text-md font-semibold text-theme mb-4`,children:`Webhook 配置`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Webhook URLs`}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[n.milky.webhook.urls.map((e,t)=>(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`input`,{type:`text`,value:e,onChange:e=>{let i=[...n.milky.webhook.urls];i[t]=e.target.value,r({...n,milky:{...n.milky,webhook:{...n.milky.webhook,urls:i}}})},placeholder:`http:// 或 https://`,className:`input-field flex-1 ${e&&!e.match(/^https?:\/\//)?`border-red-300 focus:ring-red-500`:``}`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>{let e=n.milky.webhook.urls.filter((e,n)=>n!==t);r({...n,milky:{...n.milky,webhook:{...n.milky.webhook,urls:e}}})},className:`p-2 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/30 rounded-lg transition-colors`,title:`删除`,children:(0,I.jsx)(F,{size:18})})]},t)),n.milky.webhook.urls.some(e=>e&&!e.match(/^https?:\/\//))&&(0,I.jsx)(`p`,{className:`text-xs text-red-500`,children:`URL 必须以 http:// 或 https:// 开头`}),(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{r({...n,milky:{...n.milky,webhook:{...n.milky.webhook,urls:[...n.milky.webhook.urls,``]}}})},className:`flex items-center gap-2 px-4 py-2 text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-lg transition-colors text-sm font-medium`,children:[(0,I.jsx)(Ge,{size:18}),`添加 Webhook URL`]})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-2`,children:`事件上报的 Webhook 地址`})]}),(0,I.jsxs)(`div`,{className:`mt-4`,children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Access Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{type:T?`text`:`password`,value:n.milky.webhook.accessToken,onChange:e=>r({...n,milky:{...n.milky,webhook:{...n.milky.webhook,accessToken:e.target.value}}}),placeholder:`请输入 Access Token`,className:`input-field pr-12`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>E(!T),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1`,children:T?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`用于 Webhook 请求验证的 Token`})]})]})]})]}),(0,I.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,I.jsx)(`button`,{onClick:()=>{if(n.milky.http.host===``&&n.milky.enable&&!n.milky.http.accessToken?.trim()){L(`当监听所有地址时,必须设置 Milky Access Token!`,`error`);return}if(n.milky.webhook.urls.filter(e=>e.trim()&&!e.match(/^https?:\/\//)).length>0){L(`Webhook URL 必须以 http:// 或 https:// 开头`,`error`);return}let e={...n,milky:{...n.milky,webhook:{...n.milky.webhook,urls:n.milky.webhook.urls.filter(e=>e.trim())}}};r(e),ce(e)},disabled:o,className:`btn-primary flex items-center gap-2`,children:o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(N,{size:20,className:`animate-spin`}),`保存中...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ye,{size:20}),`保存配置`]})})})]}),e===`other`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`pb-24`,children:(0,I.jsx)(jn,{config:n,emailConfig:i,onChange:r,onEmailChange:a,onOpenChangePassword:()=>O(!0)})}),(0,I.jsx)(`div`,{className:`fixed bottom-8 right-8 z-40`,children:(0,I.jsx)(`button`,{onClick:()=>ce(),disabled:o,className:`btn-primary flex items-center gap-2 shadow-2xl hover:shadow-3xl`,children:o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(N,{size:20,className:`animate-spin`}),`保存中...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ye,{size:20}),`保存配置`]})})})]}),e===`about`&&(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`card p-8 text-center`,children:[(0,I.jsx)(`div`,{className:`w-20 h-20 rounded-3xl overflow-hidden mx-auto mb-6 shadow-lg`,children:(0,I.jsx)(`img`,{src:`/logo.jpg`,alt:`Logo`,className:`w-full h-full object-cover`})}),(0,I.jsx)(`h1`,{className:`text-3xl font-bold text-theme mb-2`,children:`Lucky Lillia Bot`}),(0,I.jsx)(`p`,{className:`text-theme-secondary mb-6`,children:`使你的 QQNT 支持 OneBot 11 协议、Satori 协议、Milky 协议进行 QQ 机器人开发`}),(0,I.jsxs)(`div`,{className:`flex items-center justify-center gap-4`,children:[(0,I.jsxs)(`a`,{href:`https://github.com/LLOneBot/LuckyLilliaBot`,target:`_blank`,rel:`noopener noreferrer`,className:`px-6 py-2.5 bg-gray-800 dark:bg-neutral-700 text-white rounded-xl hover:bg-gray-900 dark:hover:bg-neutral-600 transition-colors flex items-center gap-2`,children:[(0,I.jsx)(`svg`,{className:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{fillRule:`evenodd`,d:`M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z`,clipRule:`evenodd`})}),`GitHub`]}),(0,I.jsxs)(`a`,{href:`https://luckylillia.com`,target:`_blank`,rel:`noopener noreferrer`,className:`px-6 py-2.5 gradient-primary text-white rounded-xl hover:shadow-lg transition-all flex items-center gap-2`,children:[(0,I.jsx)(`svg`,{className:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253`})}),`文档`]})]})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-xl gradient-primary-br flex items-center justify-center`,children:(0,I.jsx)(`svg`,{className:`w-6 h-6 text-white`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 4.171 4.912 8.213 6.281 9.49a2.94 2.94 0 0 0 2.438.94 2.94 2.94 0 0 0 2.438-.94C14.588 16.713 19.5 12.671 19.5 8.5 19.5 5.462 17.038 3 16.5 3z`})})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`Telegram 群`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`})]})]}),(0,I.jsx)(`a`,{href:`https://t.me/+nLZEnpne-pQ1OWFl`,target:`_blank`,rel:`noopener noreferrer`,className:`text-pink-500 hover:text-pink-600 hover:underline text-sm break-all`,children:`https://t.me/+nLZEnpne-pQ1OWFl`})]}),(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-xl bg-gradient-to-br from-green-500 to-emerald-600 flex items-center justify-center`,children:(0,I.jsx)(`svg`,{className:`w-6 h-6 text-white`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 4.171 4.912 8.213 6.281 9.49a2.94 2.94 0 0 0 2.438.94 2.94 2.94 0 0 0 2.438-.94C14.588 16.713 19.5 12.671 19.5 8.5 19.5 5.462 17.038 3 16.5 3z`})})}),(0,I.jsx)(`div`,{children:(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`QQ 群`})})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,I.jsx)(`a`,{href:`https://qm.qq.com/q/EZndy3xntQ`,target:`_blank`,rel:`noopener noreferrer`,className:` text-pink-500 hover:text-pink-600 hover:underline`,children:`545402644`})})]})]}),(0,I.jsx)(`div`,{className:`card p-6`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-xl gradient-primary-br flex items-center justify-center`,children:(0,I.jsx)(`svg`,{className:`w-5 h-5 text-white`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`版本信息`}),(0,I.jsxs)(`div`,{className:`text-xs text-theme-muted`,children:[`Lucky Lillia Bot `,`7.12.2`]}),ee&&(0,I.jsxs)(`div`,{className:`text-xs text-theme-muted`,children:[`QQ `,ee]})]})]}),(0,I.jsxs)(`div`,{className:`text-sm text-theme-secondary`,children:[`WebUI Powered by `,(0,I.jsx)(`span`,{className:`font-semibold text-pink-500`,children:`React + Tailwind`})]})]})})]})]})]}),o&&(0,I.jsx)(`div`,{className:`fixed inset-0 bg-black/20 dark:bg-black/40 flex items-center justify-center`,style:{zIndex:9e3},children:(0,I.jsxs)(`div`,{className:`bg-theme-card backdrop-blur-xl rounded-2xl p-6 shadow-2xl`,children:[(0,I.jsx)(N,{size:48,className:`animate-spin text-pink-500 mx-auto`}),(0,I.jsx)(`p`,{className:`mt-4 text-theme`,children:`加载中...`})]})}),(0,I.jsx)(Pn,{visible:m,onConfirm:se,error:g}),(0,I.jsx)(Nn,{visible:D,onClose:()=>O(!1),onSuccess:()=>{window.location.reload()}}),(0,I.jsx)(kt,{}),(0,I.jsx)(qt,{visible:oe,onClose:()=>k(!1)})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Gt,{}),(0,I.jsx)(Fn,{onLoginSuccess:le}),(0,I.jsx)(Pn,{visible:m,onConfirm:se,error:g}),(0,I.jsx)(kt,{})]})}var Xa=localStorage.getItem(`llbot-theme`);if(Xa)try{let{state:e}=JSON.parse(Xa);e?.isDark&&document.documentElement.classList.add(`dark`)}catch{}St.createRoot(document.getElementById(`root`)).render((0,I.jsx)(C.StrictMode,{children:(0,I.jsx)(Ya,{})}));
|
|
37
|
+
`,children:(0,I.jsx)(Ha,{session:d,onShowMembers:()=>_(!m),onNewMessageCallback:re,onEmojiReactionCallback:ie,onMessageRecalledCallback:ae,appendInputMention:D,onAppendInputMentionConsumed:te,onBack:ce,showBackButton:k})}),m&&d?.chatType===2&&(0,I.jsx)(`div`,{className:`fixed inset-0 z-50 bg-white/85 dark:bg-neutral-900/85 backdrop-blur-xl md:static md:inset-auto md:z-auto md:bg-transparent md:backdrop-blur-none md:w-64 md:border-l md:border-theme-divider md:flex-shrink-0`,children:(0,I.jsx)(Wa,{groupCode:d.peerId,onClose:()=>_(!1),onAtMember:ee})})]}),!e&&o&&(0,I.jsx)(`button`,{onClick:()=>window.open(`#webqq-fullscreen`,`_blank`),className:`fixed top-4 right-4 md:top-auto md:bottom-6 md:right-6 z-50 p-3 bg-pink-500/70 hover:bg-pink-500/90 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-200 group backdrop-blur-sm`,title:`在新窗口中全屏打开`,children:(0,I.jsx)(Ne,{size:20,className:`group-hover:scale-110 transition-transform`})})]})},qa=()=>(0,I.jsx)(`div`,{className:`h-screen bg-theme p-4 md:p-8`,children:(0,I.jsx)(Ka,{isFullscreen:!0})}),Ja={webui:{enable:!0,host:`127.0.0.1`,port:3080},milky:{enable:!1,reportSelfMessage:!1,http:{host:`127.0.0.1`,port:3010,prefix:``,accessToken:``},webhook:{urls:[],accessToken:``}},satori:{enable:!1,host:`127.0.0.1`,port:5600,token:``},ob11:{enable:!0,connect:[]},enableLocalFile2Url:!1,log:!0,autoDeleteFile:!1,autoDeleteFileSecond:60,musicSignUrl:`https://ss.xingzhige.com/music_card/card`,msgCacheExpire:120,ffmpeg:``,rawMsgPB:!1};function Ya(){let[e,t]=(0,C.useState)(()=>{let e=window.location.hash.slice(1);return[`dashboard`,`onebot`,`satori`,`milky`,`logs`,`other`,`webqq`,`webqq-fullscreen`,`about`].includes(e)?e:`dashboard`}),[n,r]=(0,C.useState)(Ja),[i,a]=(0,C.useState)(null),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(!0),[f,p]=(0,C.useState)(null),[m,h]=(0,C.useState)(!1),[g,_]=(0,C.useState)(``),[v,y]=(0,C.useState)(null),[b,x]=(0,C.useState)(!1),[S,w]=(0,C.useState)(!1),[T,E]=(0,C.useState)(!1),[D,O]=(0,C.useState)(!1),[ee,te]=(0,C.useState)(``),[ne,re]=(0,C.useState)(!1),[ie,ae]=(0,C.useState)(!1),[oe,k]=(0,C.useState)(!1),{autoHideSidebarInWebQQ:A}=Kt();(0,C.useEffect)(()=>{nn(async e=>new Promise(t=>{_(e||``),h(!0),y(()=>t)}))},[]),(0,C.useEffect)(()=>{window.location.hash=e},[e]),(0,C.useEffect)(()=>{A&&e===`webqq`&&ae(!0)},[e,A]),(0,C.useEffect)(()=>{let e=()=>{let e=window.location.hash.slice(1);[`dashboard`,`onebot`,`satori`,`milky`,`logs`,`other`,`webqq`,`webqq-fullscreen`,`about`].includes(e)&&t(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let se=(0,C.useCallback)(e=>{e.trim()?(h(!1),_(``),v&&(v(e),y(null))):_(`密码不能为空`)},[v]);(0,C.useEffect)(()=>{(async()=>{try{let e=await R(`/api/config`);if(e.success&&e.data.selfInfo.online){l(!0),p({nick:e.data.selfInfo.nick||``,uin:e.data.selfInfo.uin}),r(e.data.config);try{let e=await R(`/api/email/config`);e.success&&e.data&&a(e.data)}catch(e){console.error(`Failed to fetch email config:`,e)}try{let e=await R(`/api/device-info`);e.success&&e.data?.buildVer&&te(e.data.buildVer)}catch(e){console.error(`Failed to fetch device info:`,e)}}else l(!1)}catch(e){console.error(`Failed to check login status:`,e),l(!1)}finally{d(!1)}})()},[]);let ce=(0,C.useCallback)(async(e,t)=>{try{s(!0);let r=e||n,a=t===void 0?i:t,o=await R(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({config:r})});if(!o.success){L(o.message||`保存失败`,`error`);return}if(a)try{let e=await R(`/api/email/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)});if(!e.success){L(`主配置已保存,但邮件配置保存失败:${e.message}`,`warning`);return}}catch(e){L(`主配置已保存,但邮件配置保存失败:${String(e)}`,`warning`);return}L(`配置保存成功`,`success`)}catch(e){L(e instanceof Error?e.message:`保存失败`,`error`)}finally{s(!1)}},[n,i]),le=(0,C.useCallback)(()=>{window.location.reload()},[]);return u?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Gt,{}),(0,I.jsx)(`div`,{className:`relative flex items-center justify-center min-h-screen z-10`,children:(0,I.jsx)(N,{size:48,className:`animate-spin text-pink-500`})}),(0,I.jsx)(Pn,{visible:m,onConfirm:se,error:g})]}):c?e===`webqq-fullscreen`?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Gt,{}),(0,I.jsx)(qa,{}),(0,I.jsx)(Pn,{visible:m,onConfirm:se,error:g}),(0,I.jsx)(kt,{})]}):(0,I.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,I.jsx)(Gt,{}),(0,I.jsx)(un,{activeTab:e,onTabChange:t,accountInfo:f||void 0,isOpen:ne,onClose:()=>re(!1),collapsed:ie,onToggleCollapse:()=>ae(!ie),onOpenSettings:()=>k(!0)}),(0,I.jsxs)(`main`,{className:`flex-1 overflow-auto z-10 transition-all duration-300 ${ie?``:`md:ml-64`}`,children:[(0,I.jsxs)(`div`,{className:`md:hidden sticky top-0 z-30 bg-theme-card/95 backdrop-blur-xl border-b border-theme-divider px-4 py-3 flex items-center gap-3`,children:[(0,I.jsx)(`button`,{onClick:()=>re(!0),className:`p-2 text-theme-muted hover:text-theme hover:bg-theme-item rounded-lg transition-colors`,children:(0,I.jsx)(Pe,{size:24})}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`img`,{src:`/logo.jpg`,alt:`Logo`,className:`w-8 h-8 rounded-lg`}),(0,I.jsx)(`span`,{className:`font-semibold text-theme`,children:`LLBot`})]})]}),(0,I.jsxs)(`div`,{className:`p-4 md:p-8 max-w-6xl mx-auto`,children:[(0,I.jsxs)(`div`,{className:`mb-8 hidden md:block`,children:[(0,I.jsx)(`h2`,{className:`text-3xl font-bold text-white mb-2`,children:e===`dashboard`&&`Dashboard`}),(0,I.jsx)(`p`,{className:`text-white/80`,children:e===`dashboard`&&`欢迎使用 Lucky Lillia Bot`})]}),e===`dashboard`&&(0,I.jsx)(_n,{llbotVersion:`7.12.4`,qqVersion:ee}),e===`webqq`&&(0,I.jsx)(Ka,{}),e===`logs`&&(0,I.jsx)(xn,{}),e===`onebot`&&(0,I.jsx)(On,{config:n.ob11,onChange:e=>{r({...n,ob11:e})},onSave:e=>{e?ce({...n,ob11:e}):ce()}}),e===`satori`&&(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-xl gradient-primary-br flex items-center justify-center`,children:(0,I.jsx)(he,{size:24,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`Satori 协议`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`配置 Satori 协议相关设置`})]}),(0,I.jsx)(`div`,{className:`flex-1`}),(0,I.jsxs)(`a`,{href:`https://www.luckylillia.com/guide/develop#satori-%E5%8D%8F%E8%AE%AE`,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 px-3 py-1.5 text-sm text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-lg transition-colors`,children:[(0,I.jsx)(_e,{size:16}),`文档`]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`启用 Satori 协议`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`开启后将支持 Satori 协议连接`})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:n.satori.enable,onChange:e=>r({...n,satori:{...n.satori,enable:e.target.checked}}),className:`switch-toggle`})]}),n.satori.enable&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`监听地址`}),(0,I.jsx)(cn,{value:n.satori.host,onChange:e=>r({...n,satori:{...n.satori,host:e}})}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`选择服务监听的网络地址`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Satori 端口`}),(0,I.jsx)(`input`,{type:`number`,value:n.satori.port,onChange:e=>r({...n,satori:{...n.satori,port:parseInt(e.target.value)}}),min:`1`,max:`65535`,placeholder:`5500`,className:`input-field`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`Satori 服务监听端口(1-65535)`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Satori Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{type:b?`text`:`password`,value:n.satori.token,onChange:e=>r({...n,satori:{...n.satori,token:e.target.value}}),placeholder:`请输入 Satori Token`,className:`input-field pr-12`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>x(!b),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1`,children:b?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`用于 Satori 连接验证的 Token`})]})]})]}),(0,I.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,I.jsx)(`button`,{onClick:()=>{if(n.satori.host===``&&n.satori.enable&&!n.satori.token?.trim()){L(`当监听所有地址时,必须设置 Satori Token!`,`error`);return}ce()},disabled:o,className:`btn-primary flex items-center gap-2`,children:o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(N,{size:20,className:`animate-spin`}),`保存中...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ye,{size:20}),`保存配置`]})})})]}),e===`milky`&&(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-xl bg-gradient-to-br from-pink-500 to-rose-600 flex items-center justify-center`,children:(0,I.jsx)(Le,{size:24,className:`text-white`})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`Milky 协议`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`,children:`配置 Milky 协议相关设置`})]}),(0,I.jsx)(`div`,{className:`flex-1`}),(0,I.jsxs)(`a`,{href:`https://www.luckylillia.com/guide/develop#milky-%E5%8D%8F%E8%AE%AE`,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 px-3 py-1.5 text-sm text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-lg transition-colors`,children:[(0,I.jsx)(_e,{size:16}),`文档`]})]}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`启用 Milky 协议`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`开启后将支持 Milky 协议连接`})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:n.milky.enable,onChange:e=>r({...n,milky:{...n.milky,enable:e.target.checked}}),className:`switch-toggle`})]}),n.milky.enable&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`上报自己发送的消息`}),(0,I.jsx)(`div`,{className:`text-xs text-theme-muted mt-0.5`,children:`启用后将上报自己发送的消息`})]}),(0,I.jsx)(`input`,{type:`checkbox`,checked:n.milky.reportSelfMessage,onChange:e=>r({...n,milky:{...n.milky,reportSelfMessage:e.target.checked}}),className:`switch-toggle`})]}),(0,I.jsxs)(`div`,{className:`border-t border-theme-divider pt-4 mt-4`,children:[(0,I.jsx)(`h4`,{className:`text-md font-semibold text-theme mb-4`,children:`HTTP 配置`}),(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`监听地址`}),(0,I.jsx)(cn,{value:n.milky.http.host,onChange:e=>r({...n,milky:{...n.milky,http:{...n.milky.http,host:e}}})}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`选择服务监听的网络地址`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`HTTP 端口`}),(0,I.jsx)(`input`,{type:`number`,value:n.milky.http.port,onChange:e=>r({...n,milky:{...n.milky,http:{...n.milky.http,port:parseInt(e.target.value)}}}),min:`1`,max:`65535`,placeholder:`3010`,className:`input-field`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`Milky HTTP 服务监听端口(1-65535)`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`路径前缀`}),(0,I.jsx)(`input`,{type:`text`,value:n.milky.http.prefix,onChange:e=>r({...n,milky:{...n.milky,http:{...n.milky.http,prefix:e.target.value}}}),placeholder:`/api`,className:`input-field`}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`HTTP API 路径前缀(可选)`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Access Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{type:S?`text`:`password`,value:n.milky.http.accessToken,onChange:e=>r({...n,milky:{...n.milky,http:{...n.milky.http,accessToken:e.target.value}}}),placeholder:`请输入 Access Token`,className:`input-field pr-12`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>w(!S),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1`,children:S?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`用于 Milky HTTP 连接验证的 Token`})]})]})]}),(0,I.jsxs)(`div`,{className:`border-t border-theme-divider pt-4 mt-4`,children:[(0,I.jsx)(`h4`,{className:`text-md font-semibold text-theme mb-4`,children:`Webhook 配置`}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Webhook URLs`}),(0,I.jsxs)(`div`,{className:`space-y-2`,children:[n.milky.webhook.urls.map((e,t)=>(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`input`,{type:`text`,value:e,onChange:e=>{let i=[...n.milky.webhook.urls];i[t]=e.target.value,r({...n,milky:{...n.milky,webhook:{...n.milky.webhook,urls:i}}})},placeholder:`http:// 或 https://`,className:`input-field flex-1 ${e&&!e.match(/^https?:\/\//)?`border-red-300 focus:ring-red-500`:``}`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>{let e=n.milky.webhook.urls.filter((e,n)=>n!==t);r({...n,milky:{...n.milky,webhook:{...n.milky.webhook,urls:e}}})},className:`p-2 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/30 rounded-lg transition-colors`,title:`删除`,children:(0,I.jsx)(F,{size:18})})]},t)),n.milky.webhook.urls.some(e=>e&&!e.match(/^https?:\/\//))&&(0,I.jsx)(`p`,{className:`text-xs text-red-500`,children:`URL 必须以 http:// 或 https:// 开头`}),(0,I.jsxs)(`button`,{type:`button`,onClick:()=>{r({...n,milky:{...n.milky,webhook:{...n.milky.webhook,urls:[...n.milky.webhook.urls,``]}}})},className:`flex items-center gap-2 px-4 py-2 text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-lg transition-colors text-sm font-medium`,children:[(0,I.jsx)(Ge,{size:18}),`添加 Webhook URL`]})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-2`,children:`事件上报的 Webhook 地址`})]}),(0,I.jsxs)(`div`,{className:`mt-4`,children:[(0,I.jsx)(`label`,{className:`block text-sm font-medium text-theme-secondary mb-2`,children:`Access Token`}),(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsx)(`input`,{type:T?`text`:`password`,value:n.milky.webhook.accessToken,onChange:e=>r({...n,milky:{...n.milky,webhook:{...n.milky.webhook,accessToken:e.target.value}}}),placeholder:`请输入 Access Token`,className:`input-field pr-12`}),(0,I.jsx)(`button`,{type:`button`,onClick:()=>E(!T),className:`absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1`,children:T?(0,I.jsx)(ve,{size:20}):(0,I.jsx)(ye,{size:20})})]}),(0,I.jsx)(`p`,{className:`text-xs text-theme-muted mt-1`,children:`用于 Webhook 请求验证的 Token`})]})]})]})]}),(0,I.jsx)(`div`,{className:`mt-6 flex justify-end`,children:(0,I.jsx)(`button`,{onClick:()=>{if(n.milky.http.host===``&&n.milky.enable&&!n.milky.http.accessToken?.trim()){L(`当监听所有地址时,必须设置 Milky Access Token!`,`error`);return}if(n.milky.webhook.urls.filter(e=>e.trim()&&!e.match(/^https?:\/\//)).length>0){L(`Webhook URL 必须以 http:// 或 https:// 开头`,`error`);return}let e={...n,milky:{...n.milky,webhook:{...n.milky.webhook,urls:n.milky.webhook.urls.filter(e=>e.trim())}}};r(e),ce(e)},disabled:o,className:`btn-primary flex items-center gap-2`,children:o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(N,{size:20,className:`animate-spin`}),`保存中...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ye,{size:20}),`保存配置`]})})})]}),e===`other`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`pb-24`,children:(0,I.jsx)(jn,{config:n,emailConfig:i,onChange:r,onEmailChange:a,onOpenChangePassword:()=>O(!0)})}),(0,I.jsx)(`div`,{className:`fixed bottom-8 right-8 z-40`,children:(0,I.jsx)(`button`,{onClick:()=>ce(),disabled:o,className:`btn-primary flex items-center gap-2 shadow-2xl hover:shadow-3xl`,children:o?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(N,{size:20,className:`animate-spin`}),`保存中...`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ye,{size:20}),`保存配置`]})})})]}),e===`about`&&(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`card p-8 text-center`,children:[(0,I.jsx)(`div`,{className:`w-20 h-20 rounded-3xl overflow-hidden mx-auto mb-6 shadow-lg`,children:(0,I.jsx)(`img`,{src:`/logo.jpg`,alt:`Logo`,className:`w-full h-full object-cover`})}),(0,I.jsx)(`h1`,{className:`text-3xl font-bold text-theme mb-2`,children:`Lucky Lillia Bot`}),(0,I.jsx)(`p`,{className:`text-theme-secondary mb-6`,children:`使你的 QQNT 支持 OneBot 11 协议、Satori 协议、Milky 协议进行 QQ 机器人开发`}),(0,I.jsxs)(`div`,{className:`flex items-center justify-center gap-4`,children:[(0,I.jsxs)(`a`,{href:`https://github.com/LLOneBot/LuckyLilliaBot`,target:`_blank`,rel:`noopener noreferrer`,className:`px-6 py-2.5 bg-gray-800 dark:bg-neutral-700 text-white rounded-xl hover:bg-gray-900 dark:hover:bg-neutral-600 transition-colors flex items-center gap-2`,children:[(0,I.jsx)(`svg`,{className:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{fillRule:`evenodd`,d:`M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z`,clipRule:`evenodd`})}),`GitHub`]}),(0,I.jsxs)(`a`,{href:`https://luckylillia.com`,target:`_blank`,rel:`noopener noreferrer`,className:`px-6 py-2.5 gradient-primary text-white rounded-xl hover:shadow-lg transition-all flex items-center gap-2`,children:[(0,I.jsx)(`svg`,{className:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253`})}),`文档`]})]})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-6`,children:[(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-xl gradient-primary-br flex items-center justify-center`,children:(0,I.jsx)(`svg`,{className:`w-6 h-6 text-white`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 4.171 4.912 8.213 6.281 9.49a2.94 2.94 0 0 0 2.438.94 2.94 2.94 0 0 0 2.438-.94C14.588 16.713 19.5 12.671 19.5 8.5 19.5 5.462 17.038 3 16.5 3z`})})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`Telegram 群`}),(0,I.jsx)(`p`,{className:`text-sm text-theme-secondary`})]})]}),(0,I.jsx)(`a`,{href:`https://t.me/+nLZEnpne-pQ1OWFl`,target:`_blank`,rel:`noopener noreferrer`,className:`text-pink-500 hover:text-pink-600 hover:underline text-sm break-all`,children:`https://t.me/+nLZEnpne-pQ1OWFl`})]}),(0,I.jsxs)(`div`,{className:`card p-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,I.jsx)(`div`,{className:`w-12 h-12 rounded-xl bg-gradient-to-br from-green-500 to-emerald-600 flex items-center justify-center`,children:(0,I.jsx)(`svg`,{className:`w-6 h-6 text-white`,fill:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{d:`M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 4.171 4.912 8.213 6.281 9.49a2.94 2.94 0 0 0 2.438.94 2.94 2.94 0 0 0 2.438-.94C14.588 16.713 19.5 12.671 19.5 8.5 19.5 5.462 17.038 3 16.5 3z`})})}),(0,I.jsx)(`div`,{children:(0,I.jsx)(`h3`,{className:`text-lg font-semibold text-theme`,children:`QQ 群`})})]}),(0,I.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,I.jsx)(`a`,{href:`https://qm.qq.com/q/EZndy3xntQ`,target:`_blank`,rel:`noopener noreferrer`,className:` text-pink-500 hover:text-pink-600 hover:underline`,children:`545402644`})})]})]}),(0,I.jsx)(`div`,{className:`card p-6`,children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsx)(`div`,{className:`w-10 h-10 rounded-xl gradient-primary-br flex items-center justify-center`,children:(0,I.jsx)(`svg`,{className:`w-5 h-5 text-white`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,I.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-sm font-medium text-theme`,children:`版本信息`}),(0,I.jsxs)(`div`,{className:`text-xs text-theme-muted`,children:[`Lucky Lillia Bot `,`7.12.4`]}),ee&&(0,I.jsxs)(`div`,{className:`text-xs text-theme-muted`,children:[`QQ `,ee]})]})]}),(0,I.jsxs)(`div`,{className:`text-sm text-theme-secondary`,children:[`WebUI Powered by `,(0,I.jsx)(`span`,{className:`font-semibold text-pink-500`,children:`React + Tailwind`})]})]})})]})]})]}),o&&(0,I.jsx)(`div`,{className:`fixed inset-0 bg-black/20 dark:bg-black/40 flex items-center justify-center`,style:{zIndex:9e3},children:(0,I.jsxs)(`div`,{className:`bg-theme-card backdrop-blur-xl rounded-2xl p-6 shadow-2xl`,children:[(0,I.jsx)(N,{size:48,className:`animate-spin text-pink-500 mx-auto`}),(0,I.jsx)(`p`,{className:`mt-4 text-theme`,children:`加载中...`})]})}),(0,I.jsx)(Pn,{visible:m,onConfirm:se,error:g}),(0,I.jsx)(Nn,{visible:D,onClose:()=>O(!1),onSuccess:()=>{window.location.reload()}}),(0,I.jsx)(kt,{}),(0,I.jsx)(qt,{visible:oe,onClose:()=>k(!1)})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Gt,{}),(0,I.jsx)(Fn,{onLoginSuccess:le}),(0,I.jsx)(Pn,{visible:m,onConfirm:se,error:g}),(0,I.jsx)(kt,{})]})}var Xa=localStorage.getItem(`llbot-theme`);if(Xa)try{let{state:e}=JSON.parse(Xa);e?.isDark&&document.documentElement.classList.add(`dark`)}catch{}St.createRoot(document.getElementById(`root`)).render((0,I.jsx)(C.StrictMode,{children:(0,I.jsx)(Ya,{})}));
|