nyxora 26.6.21 → 26.6.23
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/README.md +3 -4
- package/bin/nyxora.mjs +14 -2
- package/dist/packages/core/src/agent/cronManager.js +107 -0
- package/dist/packages/core/src/agent/reasoning.js +85 -22
- package/dist/packages/core/src/agent/transactionManager.js +2 -2
- package/dist/packages/core/src/agent/updateIdentity.js +71 -0
- package/dist/packages/core/src/config/paths.js +5 -20
- package/dist/packages/core/src/gateway/WebSocketManager.js +98 -0
- package/dist/packages/core/src/gateway/chat.js +38 -0
- package/dist/packages/core/src/gateway/cli.js +20 -20
- package/dist/packages/core/src/gateway/server.js +63 -8
- package/dist/packages/core/src/gateway/setup.js +9 -6
- package/dist/packages/core/src/gateway/telegram.js +43 -0
- package/dist/packages/core/src/gateway/tracker.js +63 -0
- package/dist/packages/core/src/memory/logger.js +1 -1
- package/dist/packages/core/src/system/skills/cancelTask.js +40 -0
- package/dist/packages/core/src/system/skills/editFile.js +5 -0
- package/dist/packages/core/src/system/skills/scheduleTask.js +39 -0
- package/dist/packages/core/src/system/skills/searchWeb.js +61 -8
- package/dist/packages/core/src/system/skills/writeFile.js +5 -0
- package/dist/packages/core/src/web3/skills/getPrice.js +1 -1
- package/dist/packages/core/src/web3/utils/vaultClient.js +79 -29
- package/dist/packages/policy/src/server.js +29 -1
- package/package.json +7 -1
- package/packages/core/package.json +8 -1
- package/packages/core/src/agent/cronManager.ts +87 -0
- package/packages/core/src/agent/reasoning.ts +91 -21
- package/packages/core/src/agent/transactionManager.ts +2 -1
- package/packages/core/src/agent/updateIdentity.ts +68 -0
- package/packages/core/src/config/parser.ts +1 -1
- package/packages/core/src/config/paths.ts +5 -23
- package/packages/core/src/gateway/WebSocketManager.ts +114 -0
- package/packages/core/src/gateway/chat.ts +40 -1
- package/packages/core/src/gateway/cli.ts +10 -10
- package/packages/core/src/gateway/server.ts +66 -7
- package/packages/core/src/gateway/setup.ts +8 -5
- package/packages/core/src/gateway/telegram.ts +49 -0
- package/packages/core/src/gateway/tracker.ts +61 -0
- package/packages/core/src/memory/logger.ts +1 -1
- package/packages/core/src/system/skills/cancelTask.ts +38 -0
- package/packages/core/src/system/skills/editFile.ts +7 -0
- package/packages/core/src/system/skills/scheduleTask.ts +38 -0
- package/packages/core/src/system/skills/searchWeb.ts +56 -8
- package/packages/core/src/system/skills/writeFile.ts +7 -0
- package/packages/core/src/web3/skills/getPrice.ts +1 -1
- package/packages/core/src/web3/utils/vaultClient.ts +86 -26
- package/packages/dashboard/dist/assets/index-CjZWf1Ei.css +1 -0
- package/packages/dashboard/dist/assets/index-CmWZofn_.js +16 -0
- package/packages/dashboard/dist/index.html +2 -2
- package/packages/dashboard/dist/routers/0x.png +0 -0
- package/packages/dashboard/dist/routers/1inch.png +0 -0
- package/packages/dashboard/dist/routers/cmc.png +0 -0
- package/packages/dashboard/dist/routers/kyberswap.png +0 -0
- package/packages/dashboard/dist/routers/lifi.png +0 -0
- package/packages/dashboard/dist/routers/openocean.png +0 -0
- package/packages/dashboard/dist/routers/relay.png +0 -0
- package/packages/dashboard/dist/routers/zerion.png +0 -0
- package/packages/dashboard/package.json +1 -1
- package/packages/mcp-server/package.json +1 -1
- package/packages/policy/package.json +4 -3
- package/packages/policy/src/server.ts +29 -1
- package/packages/signer/package.json +1 -1
- package/packages/dashboard/dist/assets/index-CQNHWZtN.css +0 -1
- package/packages/dashboard/dist/assets/index-Di9x08yk.js +0 -16
|
@@ -0,0 +1,16 @@
|
|
|
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.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.provider`),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.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function ee(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function E(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?E(``+e.key):t.toString(36)}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`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+re(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(ne,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=ee(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+re(s,l);c+=ie(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+re(s,l++),c+=ie(s,r,i,u,o);else if(s===`object`)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 D={current:null},O={transition:null},k={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:O,ReactCurrentOwner:C};function se(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={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(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,e.act=se,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,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=O.transition;O.transition={};try{e()}finally{O.transition=t}},e.unstable_act=se,e.useCallback=function(e,t){return D.current.useCallback(e,t)},e.useContext=function(e){return D.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return D.current.useDeferredValue(e)},e.useEffect=function(e,t){return D.current.useEffect(e,t)},e.useId=function(){return D.current.useId()},e.useImperativeHandle=function(e,t,n){return D.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return D.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return D.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return D.current.useMemo(e,t)},e.useReducer=function(e,t,n){return D.current.useReducer(e,t,n)},e.useRef=function(e){return D.current.useRef(e)},e.useState=function(e){return D.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return D.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return D.current.useTransition()},e.version=`18.3.1`})),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(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=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(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 b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,ae(x);else{var t=n(l);t!==null&&oe(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!te());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&oe(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,ee=-1;function te(){return!(e.unstable_now()-ee<T)}function E(){if(C!==null){var t=e.unstable_now();ee=t;var n=!0;try{n=C(!0,t)}finally{n?ne():(S=!1,C=null)}}else S=!1}var ne;if(typeof v==`function`)ne=function(){v(E)};else if(typeof MessageChannel<`u`){var re=new MessageChannel,ie=re.port2;re.port1.onmessage=E,ne=function(){ie.postMessage(null)}}else ne=function(){g(E,0)};function ae(e){C=e,S||(S=!0,ne())}function oe(t,n){w=g(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_continueExecution=function(){m||p||(m=!0,ae(x))},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`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},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_pauseExecution=function(){},e.unstable_requestPaint=function(){},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?(_(w),w=-1):h=!0,oe(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ae(x))),r},e.unstable_shouldYield=te,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(),n=f();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,d=/^[: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]*$/,p={},m={};function h(e){return l.call(m,e)?!0:l.call(p,e)?!1:d.test(e)?m[e]=!0:(p[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),T=Symbol.for(`react.portal`),ee=Symbol.for(`react.fragment`),te=Symbol.for(`react.strict_mode`),E=Symbol.for(`react.profiler`),ne=Symbol.for(`react.provider`),re=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),ae=Symbol.for(`react.suspense`),oe=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.offscreen`),se=Symbol.iterator;function ce(e){return typeof e!=`object`||!e?null:(e=se&&e[se]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Object.assign,le;function ue(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``}return`
|
|
2
|
+
`+le+e}var de=!1;function fe(e,t){if(!e||de)return``;de=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
3
|
+
`),a=r.stack.split(`
|
|
4
|
+
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
5
|
+
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{de=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?ue(e):``}function pe(e){switch(e.tag){case 5:return ue(e.type);case 16:return ue(`Lazy`);case 13:return ue(`Suspense`);case 19:return ue(`SuspenseList`);case 0:case 2:case 15:return e=fe(e.type,!1),e;case 11:return e=fe(e.type.render,!1),e;case 1:return e=fe(e.type,!0),e;default:return``}}function me(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ee:return`Fragment`;case T:return`Portal`;case E:return`Profiler`;case te:return`StrictMode`;case ae:return`Suspense`;case oe:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case re:return(e.displayName||`Context`)+`.Consumer`;case ne:return(e._context.displayName||`Context`)+`.Provider`;case ie: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?me(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}function he(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return me(t);case 8:return t===te?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function ge(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function j(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function _e(e){var t=j(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ve(e){e._valueTracker||=_e(e)}function ye(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=j(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function be(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function xe(e,t){var n=t.checked;return A({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Se(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=ge(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function Ce(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function we(e,t){Ce(e,t);var n=ge(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Ee(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Ee(e,t.type,ge(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Te(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Ee(e,t,n){(t!==`number`||be(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var De=Array.isArray;function Oe(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=``+ge(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 ke(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return A({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ae(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(De(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:ge(n)}}function je(e,t){var n=ge(t.value),r=ge(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ne(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Pe(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ne(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Fe,Ie=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Fe||=document.createElement(`div`),Fe.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Fe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Re={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ze=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Re).forEach(function(e){ze.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Re[t]=Re[e]})});function Be(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Re.hasOwnProperty(e)&&Re[e]?(``+t).trim():t+`px`}function Ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Be(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var He=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ue(e,t){if(t){if(He[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function We(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ge=null;function Ke(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qe=null,Je=null,Ye=null;function Xe(e){if(e=qi(e)){if(typeof qe!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Yi(t),qe(e.stateNode,e.type,t))}}function Ze(e){Je?Ye?Ye.push(e):Ye=[e]:Je=e}function Qe(){if(Je){var e=Je,t=Ye;if(Ye=Je=null,Xe(e),t)for(e=0;e<t.length;e++)Xe(t[e])}}function $e(e,t){return e(t)}function et(){}var tt=!1;function nt(e,t,n){if(tt)return e(t,n);tt=!0;try{return $e(e,t,n)}finally{tt=!1,(Je!==null||Ye!==null)&&(et(),Qe())}}function rt(e,t){var n=e.stateNode;if(n===null)return null;var i=Yi(n);if(i===null)return null;n=i[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`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var it=!1;if(c)try{var at={};Object.defineProperty(at,"passive",{get:function(){it=!0}}),window.addEventListener(`test`,at,at),window.removeEventListener(`test`,at,at)}catch{it=!1}function ot(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var st=!1,ct=null,M=!1,lt=null,ut={onError:function(e){st=!0,ct=e}};function dt(e,t,n,r,i,a,o,s,c){st=!1,ct=null,ot.apply(ut,arguments)}function ft(e,t,n,i,a,o,s,c,l){if(dt.apply(this,arguments),st){if(st){var u=ct;st=!1,ct=null}else throw Error(r(198));M||(M=!0,lt=u)}}function pt(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 mt(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 ht(e){if(pt(e)!==e)throw Error(r(188))}function gt(e){var t=e.alternate;if(!t){if(t=pt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return ht(a),e;if(o===i)return ht(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function _t(e){return e=gt(e),e===null?null:vt(e)}function vt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vt(e);if(t!==null)return t;e=e.sibling}return null}var yt=n.unstable_scheduleCallback,bt=n.unstable_cancelCallback,xt=n.unstable_shouldYield,St=n.unstable_requestPaint,N=n.unstable_now,Ct=n.unstable_getCurrentPriorityLevel,wt=n.unstable_ImmediatePriority,Tt=n.unstable_UserBlockingPriority,Et=n.unstable_NormalPriority,Dt=n.unstable_LowPriority,Ot=n.unstable_IdlePriority,kt=null,At=null;function jt(e){if(At&&typeof At.onCommitFiberRoot==`function`)try{At.onCommitFiberRoot(kt,e,void 0,(e.current.flags&128)==128)}catch{}}var Mt=Math.clz32?Math.clz32:Ft,Nt=Math.log,Pt=Math.LN2;function Ft(e){return e>>>=0,e===0?32:31-(Nt(e)/Pt|0)|0}var It=64,Lt=4194304;function Rt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Rt(a))):r=Rt(s)}else o=n&~i,o===0?a!==0&&(r=Rt(a)):r=Rt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mt(t),i=1<<n,r|=e[n],t&=~i;return r}function Bt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Mt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Bt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ht(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ut(){var e=It;return It<<=1,!(It&4194240)&&(It=64),e}function Wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mt(t),e[t]=n}function Kt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Mt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function qt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var P=0;function Jt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Yt,Xt,Zt,Qt,$t,en=!1,tn=[],nn=null,rn=null,an=null,on=new Map,sn=new Map,cn=[],ln=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function un(e,t){switch(e){case`focusin`:case`focusout`:nn=null;break;case`dragenter`:case`dragleave`:rn=null;break;case`mouseover`:case`mouseout`:an=null;break;case`pointerover`:case`pointerout`:on.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:sn.delete(t.pointerId)}}function dn(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=qi(t),t!==null&&Xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function fn(e,t,n,r,i){switch(t){case`focusin`:return nn=dn(nn,e,t,n,r,i),!0;case`dragenter`:return rn=dn(rn,e,t,n,r,i),!0;case`mouseover`:return an=dn(an,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return on.set(a,dn(on.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,sn.set(a,dn(sn.get(a)||null,e,t,n,r,i)),!0}return!1}function pn(e){var t=Ki(e.target);if(t!==null){var n=pt(t);if(n!==null){if(t=n.tag,t===13){if(t=mt(n),t!==null){e.blockedOn=t,$t(e.priority,function(){Zt(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 mn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ge=r,n.target.dispatchEvent(r),Ge=null}else return t=qi(n),t!==null&&Xt(t),e.blockedOn=n,!1;t.shift()}return!0}function hn(e,t,n){mn(e)&&n.delete(t)}function gn(){en=!1,nn!==null&&mn(nn)&&(nn=null),rn!==null&&mn(rn)&&(rn=null),an!==null&&mn(an)&&(an=null),on.forEach(hn),sn.forEach(hn)}function _n(e,t){e.blockedOn===t&&(e.blockedOn=null,en||(en=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,gn)))}function vn(e){function t(t){return _n(t,e)}if(0<tn.length){_n(tn[0],e);for(var n=1;n<tn.length;n++){var r=tn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nn!==null&&_n(nn,e),rn!==null&&_n(rn,e),an!==null&&_n(an,e),on.forEach(t),sn.forEach(t),n=0;n<cn.length;n++)r=cn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<cn.length&&(n=cn[0],n.blockedOn===null);)pn(n),n.blockedOn===null&&cn.shift()}var yn=C.ReactCurrentBatchConfig,bn=!0;function xn(e,t,n,r){var i=P,a=yn.transition;yn.transition=null;try{P=1,Cn(e,t,n,r)}finally{P=i,yn.transition=a}}function Sn(e,t,n,r){var i=P,a=yn.transition;yn.transition=null;try{P=4,Cn(e,t,n,r)}finally{P=i,yn.transition=a}}function Cn(e,t,n,r){if(bn){var i=Tn(e,t,n,r);if(i===null)vi(e,t,r,wn,n),un(e,r);else if(fn(i,e,t,n,r))r.stopPropagation();else if(un(e,r),t&4&&-1<ln.indexOf(e)){for(;i!==null;){var a=qi(i);if(a!==null&&Yt(a),a=Tn(e,t,n,r),a===null&&vi(e,t,r,wn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vi(e,t,r,null,n)}}var wn=null;function Tn(e,t,n,r){if(wn=null,e=Ke(r),e=Ki(e),e!==null)if(t=pt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=mt(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 wn=e,null}function En(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(Ct()){case wt:return 1;case Tt:return 4;case Et:case Dt:return 16;case Ot:return 536870912;default:return 16}default:return 16}}var Dn=null,On=null,kn=null;function An(){if(kn)return kn;var e,t=On,n=t.length,r,i=`value`in Dn?Dn.value:Dn.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 kn=i.slice(e,1<r?1-r:void 0)}function jn(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 Mn(){return!0}function Nn(){return!1}function Pn(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)?Mn:Nn,this.isPropagationStopped=Nn,this}return A(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=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=A({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,Vn,Hn=A({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$n,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!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Pn(Hn),Wn=Pn(A({},Hn,{dataTransfer:0})),Gn=Pn(A({},Ln,{relatedTarget:0})),Kn=Pn(A({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),qn=Pn(A({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Jn=Pn(A({},Fn,{data:0})),Yn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Xn={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`},Zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zn[e])?!!t[e]:!1}function $n(){return Qn}var er=Pn(A({},Ln,{key:function(e){if(e.key){var t=Yn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=jn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$n,charCode:function(e){return e.type===`keypress`?jn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?jn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),tr=Pn(A({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nr=Pn(A({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$n})),rr=Pn(A({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ir=Pn(A({},Hn,{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})),ar=[9,13,27,32],or=c&&`CompositionEvent`in window,sr=null;c&&`documentMode`in document&&(sr=document.documentMode);var cr=c&&`TextEvent`in window&&!sr,lr=c&&(!or||sr&&8<sr&&11>=sr),ur=` `,dr=!1;function fr(e,t){switch(e){case`keyup`:return ar.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function pr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var mr=!1;function hr(e,t){switch(e){case`compositionend`:return pr(t);case`keypress`:return t.which===32?(dr=!0,ur):null;case`textInput`:return e=t.data,e===ur&&dr?null:e;default:return null}}function gr(e,t){if(mr)return e===`compositionend`||!or&&fr(e,t)?(e=An(),kn=On=Dn=null,mr=!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 lr&&t.locale!==`ko`?null:t.data;default:return null}}var _r={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 vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!_r[e.type]:t===`textarea`}function yr(e,t,n,r){Ze(r),t=bi(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var br=null,xr=null;function Sr(e){pi(e,0)}function Cr(e){if(ye(Ji(e)))return e}function wr(e,t){if(e===`change`)return t}var Tr=!1;if(c){var Er;if(c){var Dr=`oninput`in document;if(!Dr){var Or=document.createElement(`div`);Or.setAttribute(`oninput`,`return;`),Dr=typeof Or.oninput==`function`}Er=Dr}else Er=!1;Tr=Er&&(!document.documentMode||9<document.documentMode)}function kr(){br&&(br.detachEvent(`onpropertychange`,Ar),xr=br=null)}function Ar(e){if(e.propertyName===`value`&&Cr(xr)){var t=[];yr(t,xr,e,Ke(e)),nt(Sr,t)}}function jr(e,t,n){e===`focusin`?(kr(),br=t,xr=n,br.attachEvent(`onpropertychange`,Ar)):e===`focusout`&&kr()}function Mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Cr(xr)}function Nr(e,t){if(e===`click`)return Cr(t)}function Pr(e,t){if(e===`input`||e===`change`)return Cr(t)}function Fr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ir=typeof Object.is==`function`?Object.is:Fr;function Lr(e,t){if(Ir(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(!l.call(t,i)||!Ir(e[i],t[i]))return!1}return!0}function Rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,t){var n=Rr(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=Rr(n)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vr(){for(var e=window,t=be();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=be(e.document)}return t}function Hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Ur(e){var t=Vr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Br(n.ownerDocument.documentElement,n)){if(r!==null&&Hr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=zr(n,a);var o=zr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Wr=c&&`documentMode`in document&&11>=document.documentMode,Gr=null,Kr=null,qr=null,Jr=!1;function Yr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Gr==null||Gr!==be(r)||(r=Gr,`selectionStart`in r&&Hr(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}),qr&&Lr(qr,r)||(qr=r,r=bi(Kr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Gr)))}function Xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Zr={animationend:Xr(`Animation`,`AnimationEnd`),animationiteration:Xr(`Animation`,`AnimationIteration`),animationstart:Xr(`Animation`,`AnimationStart`),transitionend:Xr(`Transition`,`TransitionEnd`)},Qr={},$r={};c&&($r=document.createElement(`div`).style,`AnimationEvent`in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),`TransitionEvent`in window||delete Zr.transitionend.transition);function ei(e){if(Qr[e])return Qr[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $r)return Qr[e]=t[n];return e}var ti=ei(`animationend`),ni=ei(`animationiteration`),ri=ei(`animationstart`),ii=ei(`transitionend`),ai=new Map,oi=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function si(e,t){ai.set(e,t),o(t,[e])}for(var ci=0;ci<oi.length;ci++){var li=oi[ci];si(li.toLowerCase(),`on`+(li[0].toUpperCase()+li.slice(1)))}si(ti,`onAnimationEnd`),si(ni,`onAnimationIteration`),si(ri,`onAnimationStart`),si(`dblclick`,`onDoubleClick`),si(`focusin`,`onFocus`),si(`focusout`,`onBlur`),si(ii,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ui=`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(` `),di=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ui));function fi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,ft(r,t,void 0,e),e.currentTarget=null}function pi(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;fi(i,s,l),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;fi(i,s,l),a=c}}}if(M)throw e=lt,M=!1,lt=null,e}function F(e,t){var n=t[Ui];n===void 0&&(n=t[Ui]=new Set);var r=e+`__bubble`;n.has(r)||(_i(t,e,2,!1),n.add(r))}function mi(e,t,n){var r=0;t&&(r|=4),_i(n,e,r,t)}var hi=`_reactListening`+Math.random().toString(36).slice(2);function gi(e){if(!e[hi]){e[hi]=!0,i.forEach(function(t){t!==`selectionchange`&&(di.has(t)||mi(t,!1,e),mi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,mi(`selectionchange`,!1,t))}}function _i(e,t,n,r){switch(En(t)){case 1:var i=xn;break;case 4:i=Sn;break;default:i=Cn}n=i.bind(null,t,n,e),i=void 0,!it||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 vi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ki(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}nt(function(){var r=a,i=Ke(n),o=[];a:{var s=ai.get(e);if(s!==void 0){var c=In,l=e;switch(e){case`keypress`:if(jn(n)===0)break a;case`keydown`:case`keyup`:c=er;break;case`focusin`:l=`focus`,c=Gn;break;case`focusout`:l=`blur`,c=Gn;break;case`beforeblur`:case`afterblur`:c=Gn;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`:c=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=nr;break;case ti:case ni:case ri:c=Kn;break;case ii:c=rr;break;case`scroll`:c=Rn;break;case`wheel`:c=ir;break;case`copy`:case`cut`:case`paste`:c=qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=tr}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=rt(p,f),h!=null&&u.push(yi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ge&&(l=n.relatedTarget||n.fromElement)&&(Ki(l)||l[Hi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ki(l):null,l!==null&&(d=pt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Un,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=tr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ji(c),m=l==null?s:Ji(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ki(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=xi(m))p++;for(m=0,h=f;h;h=xi(h))m++;for(;0<p-m;)u=xi(u),p--;for(;0<m-p;)f=xi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=xi(u),f=xi(f)}u=null}else u=null;c!==null&&Si(o,s,c,u,!1),l!==null&&d!==null&&Si(o,d,l,u,!0)}}a:{if(s=r?Ji(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=wr;else if(vr(s))if(Tr)g=Pr;else{g=Mr;var _=jr}else (c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Nr);if(g&&=g(e,r)){yr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Ee(s,`number`,s.value)}switch(_=r?Ji(r):window,e){case`focusin`:(vr(_)||_.contentEditable===`true`)&&(Gr=_,Kr=r,qr=null);break;case`focusout`:qr=Kr=Gr=null;break;case`mousedown`:Jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Jr=!1,Yr(o,n,i);break;case`selectionchange`:if(Wr)break;case`keydown`:case`keyup`:Yr(o,n,i)}var v;if(or)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else mr?fr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(lr&&n.locale!==`ko`&&(mr||y!==`onCompositionStart`?y===`onCompositionEnd`&&mr&&(v=An()):(Dn=i,On=`value`in Dn?Dn.value:Dn.textContent,mr=!0)),_=bi(r,y),0<_.length&&(y=new Jn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=pr(n),v!==null&&(y.data=v)))),(v=cr?hr(e,n):gr(e,n))&&(r=bi(r,`onBeforeInput`),0<r.length&&(i=new Jn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}pi(o,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=rt(e,n),a!=null&&r.unshift(yi(e,a,i)),a=rt(e,t),a!=null&&r.push(yi(e,a,i))),e=e.return}return r}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(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(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=rt(n,a),c!=null&&o.unshift(yi(n,c,s))):i||(c=rt(n,a),c!=null&&o.push(yi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ci=/\r\n?/g,wi=/\u0000|\uFFFD/g;function Ti(e){return(typeof e==`string`?e:``+e).replace(Ci,`
|
|
6
|
+
`).replace(wi,``)}function Ei(e,t,n){if(t=Ti(t),Ti(e)!==t&&n)throw Error(r(425))}function Di(){}var Oi=null,ki=null;function Ai(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ji=typeof setTimeout==`function`?setTimeout:void 0,Mi=typeof clearTimeout==`function`?clearTimeout:void 0,Ni=typeof Promise==`function`?Promise:void 0,Pi=typeof queueMicrotask==`function`?queueMicrotask:Ni===void 0?ji:function(e){return Ni.resolve(null).then(e).catch(Fi)};function Fi(e){setTimeout(function(){throw e})}function Ii(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===`/$`){if(r===0){e.removeChild(i),vn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);vn(t)}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ri(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),Bi=`__reactFiber$`+zi,Vi=`__reactProps$`+zi,Hi=`__reactContainer$`+zi,Ui=`__reactEvents$`+zi,Wi=`__reactListeners$`+zi,Gi=`__reactHandles$`+zi;function Ki(e){var t=e[Bi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Hi]||n[Bi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ri(e);e!==null;){if(n=e[Bi])return n;e=Ri(e)}return t}e=n,n=e.parentNode}return null}function qi(e){return e=e[Bi]||e[Hi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Yi(e){return e[Vi]||null}var Xi=[],Zi=-1;function Qi(e){return{current:e}}function I(e){0>Zi||(e.current=Xi[Zi],Xi[Zi]=null,Zi--)}function L(e,t){Zi++,Xi[Zi]=e.current,e.current=t}var $i={},ea=Qi($i),ta=Qi(!1),na=$i;function ra(e,t){var n=e.type.contextTypes;if(!n)return $i;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ia(e){return e=e.childContextTypes,e!=null}function aa(){I(ta),I(ea)}function oa(e,t,n){if(ea.current!==$i)throw Error(r(168));L(ea,t),L(ta,n)}function sa(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,he(e)||`Unknown`,a));return A({},n,i)}function ca(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$i,na=ea.current,L(ea,e),L(ta,ta.current),!0}function la(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=sa(e,t,na),i.__reactInternalMemoizedMergedChildContext=e,I(ta),I(ea),L(ea,e)):I(ta),L(ta,n)}var ua=null,da=!1,fa=!1;function pa(e){ua===null?ua=[e]:ua.push(e)}function ma(e){da=!0,pa(e)}function ha(){if(!fa&&ua!==null){fa=!0;var e=0,t=P;try{var n=ua;for(P=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ua=null,da=!1}catch(t){throw ua!==null&&(ua=ua.slice(e+1)),yt(wt,ha),t}finally{P=t,fa=!1}}return null}var ga=[],_a=0,va=null,ya=0,ba=[],xa=0,Sa=null,Ca=1,wa=``;function Ta(e,t){ga[_a++]=ya,ga[_a++]=va,va=e,ya=t}function Ea(e,t,n){ba[xa++]=Ca,ba[xa++]=wa,ba[xa++]=Sa,Sa=e;var r=Ca;e=wa;var i=32-Mt(r)-1;r&=~(1<<i),n+=1;var a=32-Mt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ca=1<<32-Mt(t)+i|n<<i|r,wa=a+e}else Ca=1<<a|n<<i|r,wa=e}function Da(e){e.return!==null&&(Ta(e,1),Ea(e,1,0))}function Oa(e){for(;e===va;)va=ga[--_a],ga[_a]=null,ya=ga[--_a],ga[_a]=null;for(;e===Sa;)Sa=ba[--xa],ba[xa]=null,wa=ba[--xa],ba[xa]=null,Ca=ba[--xa],ba[xa]=null}var ka=null,Aa=null,R=!1,ja=null;function Ma(e,t){var n=Kl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Na(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,ka=e,Aa=Li(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,ka=e,Aa=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=Sa===null?null:{id:Ca,overflow:wa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Kl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ka=e,Aa=null,!0);default:return!1}}function Pa(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Fa(e){if(R){var t=Aa;if(t){var n=t;if(!Na(e,t)){if(Pa(e))throw Error(r(418));t=Li(n.nextSibling);var i=ka;t&&Na(e,t)?Ma(i,n):(e.flags=e.flags&-4097|2,R=!1,ka=e)}}else{if(Pa(e))throw Error(r(418));e.flags=e.flags&-4097|2,R=!1,ka=e}}}function Ia(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ka=e}function La(e){if(e!==ka)return!1;if(!R)return Ia(e),R=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ai(e.type,e.memoizedProps)),t&&=Aa){if(Pa(e))throw Ra(),Error(r(418));for(;t;)Ma(e,t),t=Li(t.nextSibling)}if(Ia(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Aa=Li(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Aa=null}}else Aa=ka?Li(e.stateNode.nextSibling):null;return!0}function Ra(){for(var e=Aa;e;)e=Li(e.nextSibling)}function za(){Aa=ka=null,R=!1}function Ba(e){ja===null?ja=[e]:ja.push(e)}var Va=C.ReactCurrentBatchConfig;function Ha(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ua(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Wa(e){var t=e._init;return t(e._payload)}function Ga(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 i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=Yl(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|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=$l(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===ee?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Wa(i)===t.type)?(r=a(t,n.props),r.ref=Ha(e,t,n),r.return=e,r):(r=Xl(n.type,n.key,n.props,null,e.mode,r),r.ref=Ha(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=eu(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=Zl(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`)return t=$l(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=Xl(t.type,t.key,t.props,null,e.mode,n),n.ref=Ha(e,null,t),n.return=e,n;case T:return t=eu(t,e.mode,n),t.return=e,t;case O:var r=t._init;return f(e,r(t._payload),n)}if(De(t)||ce(t))return t=Zl(t,e.mode,n,null),t.return=e,t;Ua(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`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case O:return i=n._init,p(e,t,i(n._payload),r)}if(De(n)||ce(n))return i===null?d(e,t,n,r,null):null;Ua(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:var a=r._init;return m(e,t,n,a(r._payload),i)}if(De(r)||ce(r))return e=e.get(n)||null,d(t,e,r,i,null);Ua(t,r)}return null}function h(r,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(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),R&&Ta(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&Ta(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,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(r,e)}),R&&Ta(r,h),l}function g(a,s,c,l){var u=ce(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=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),R&&Ta(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 R&&Ta(a,g),u}for(h=i(a,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)}),R&&Ta(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===ee&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===ee){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===O&&Wa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ha(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===ee?(r=Zl(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=Xl(i.type,i.key,i.props,null,e.mode,o),o.ref=Ha(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=eu(i,e.mode,o),r.return=e,e=r}return s(e);case O:return l=i._init,_(e,r,l(i._payload),o)}if(De(i))return h(e,r,i,o);if(ce(i))return g(e,r,i,o);Ua(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=$l(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ka=Ga(!0),qa=Ga(!1),Ja=Qi(null),Ya=null,Xa=null,Za=null;function Qa(){Za=Xa=Ya=null}function $a(e){var t=Ja.current;I(Ja),e._currentValue=t}function eo(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 to(e,t){Ya=e,Za=Xa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Bs=!0),e.firstContext=null)}function no(e){var t=e._currentValue;if(Za!==e)if(e={context:e,memoizedValue:t,next:null},Xa===null){if(Ya===null)throw Error(r(308));Xa=e,Ya.dependencies={lanes:0,firstContext:e}}else Xa=Xa.next=e;return t}var ro=null;function io(e){ro===null?ro=[e]:ro.push(e)}function ao(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,io(t)):(n.next=i.next,i.next=n),t.interleaved=n,oo(e,r)}function oo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var so=!1;function co(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,oo(e,n)}return i=r.interleaved,i===null?(t.next=t,io(r)):(t.next=i.next,i.next=t),r.interleaved=t,oo(e,n)}function po(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}function mo(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={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,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,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ho(e,t,n,r){var i=e.updateQueue;so=!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,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=A({},d,f);break a;case 2:so=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime: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;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Yc|=o,e.lanes=o,e.memoizedState=d}}function go(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var _o={},vo=Qi(_o),yo=Qi(_o),bo=Qi(_o);function xo(e){if(e===_o)throw Error(r(174));return e}function So(e,t){switch(L(bo,t),L(yo,e),L(vo,_o),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pe(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pe(t,e)}I(vo),L(vo,t)}function Co(){I(vo),I(yo),I(bo)}function wo(e){xo(bo.current);var t=xo(vo.current),n=Pe(t,e.type);t!==n&&(L(yo,e),L(vo,n))}function To(e){yo.current===e&&(I(vo),I(yo))}var z=Qi(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=[];function Oo(){for(var e=0;e<Do.length;e++)Do[e]._workInProgressVersionPrimary=null;Do.length=0}var ko=C.ReactCurrentDispatcher,Ao=C.ReactCurrentBatchConfig,jo=0,B=null,V=null,H=null,Mo=!1,No=!1,Po=0,Fo=0;function U(){throw Error(r(321))}function Io(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ir(e[n],t[n]))return!1;return!0}function Lo(e,t,n,i,a,o){if(jo=o,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ko.current=e===null||e.memoizedState===null?bs:xs,e=n(i,a),No){o=0;do{if(No=!1,Po=0,25<=o)throw Error(r(301));o+=1,H=V=null,t.updateQueue=null,ko.current=Ss,e=n(i,a)}while(No)}if(ko.current=ys,t=V!==null&&V.next!==null,jo=0,H=V=B=null,Mo=!1,t)throw Error(r(300));return e}function Ro(){var e=Po!==0;return Po=0,e}function zo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return H===null?B.memoizedState=H=e:H=H.next=e,H}function Bo(){if(V===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=V.next;var t=H===null?B.memoizedState:H.next;if(t!==null)H=t,V=e;else{if(e===null)throw Error(r(310));V=e,e={memoizedState:V.memoizedState,baseState:V.baseState,baseQueue:V.baseQueue,queue:V.queue,next:null},H===null?B.memoizedState=H=e:H=H.next=e}return H}function Vo(e,t){return typeof t==`function`?t(e):t}function Ho(e){var t=Bo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=V,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((jo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,B.lanes|=d,Yc|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Ir(i,t.memoizedState)||(Bs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,B.lanes|=o,Yc|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Uo(e){var t=Bo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=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);Ir(o,t.memoizedState)||(Bs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Wo(){}function Go(e,t){var n=B,i=Bo(),a=t(),o=!Ir(i.memoizedState,a);if(o&&(i.memoizedState=a,Bs=!0),i=i.queue,rs(Jo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||H!==null&&H.memoizedState.tag&1){if(n.flags|=2048,Qo(9,qo.bind(null,n,i,a,t),void 0,null),Y===null)throw Error(r(349));jo&30||Ko(n,t,a)}return a}function Ko(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t={lastEffect:null,stores:null},B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function qo(e,t,n,r){t.value=n,t.getSnapshot=r,Yo(t)&&Xo(e)}function Jo(e,t,n){return n(function(){Yo(t)&&Xo(e)})}function Yo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ir(e,n)}catch{return!0}}function Xo(e){var t=oo(e,1);t!==null&&hl(t,e,1,-1)}function Zo(e){var t=zo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:e},t.queue=e,e=e.dispatch=hs.bind(null,B,e),[t.memoizedState,e]}function Qo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=B.updateQueue,t===null?(t={lastEffect:null,stores:null},B.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function $o(){return Bo().memoizedState}function es(e,t,n,r){var i=zo();B.flags|=e,i.memoizedState=Qo(1|t,n,void 0,r===void 0?null:r)}function ts(e,t,n,r){var i=Bo();r=r===void 0?null:r;var a=void 0;if(V!==null){var o=V.memoizedState;if(a=o.destroy,r!==null&&Io(r,o.deps)){i.memoizedState=Qo(t,n,a,r);return}}B.flags|=e,i.memoizedState=Qo(1|t,n,a,r)}function ns(e,t){return es(8390656,8,e,t)}function rs(e,t){return ts(2048,8,e,t)}function is(e,t){return ts(4,2,e,t)}function as(e,t){return ts(4,4,e,t)}function os(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ss(e,t,n){return n=n==null?null:n.concat([e]),ts(4,4,os.bind(null,t,e),n)}function cs(){}function ls(e,t){var n=Bo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Io(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function us(e,t){var n=Bo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Io(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ds(e,t,n){return jo&21?(Ir(n,t)||(n=Ut(),B.lanes|=n,Yc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Bs=!0),e.memoizedState=n)}function fs(e,t){var n=P;P=n!==0&&4>n?n:4,e(!0);var r=Ao.transition;Ao.transition={};try{e(!1),t()}finally{P=n,Ao.transition=r}}function ps(){return Bo().memoizedState}function ms(e,t,n){var r=ml(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},gs(e))_s(t,n);else if(n=ao(e,t,n,r),n!==null){var i=pl();hl(n,e,r,i),vs(n,t,r)}}function hs(e,t,n){var r=ml(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(gs(e))_s(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,Ir(s,o)){var c=t.interleaved;c===null?(i.next=i,io(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=ao(e,t,i,r),n!==null&&(i=pl(),hl(n,e,r,i),vs(n,t,r))}}function gs(e){var t=e.alternate;return e===B||t!==null&&t===B}function _s(e,t){No=Mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}var ys={readContext:no,useCallback:U,useContext:U,useEffect:U,useImperativeHandle:U,useInsertionEffect:U,useLayoutEffect:U,useMemo:U,useReducer:U,useRef:U,useState:U,useDebugValue:U,useDeferredValue:U,useTransition:U,useMutableSource:U,useSyncExternalStore:U,useId:U,unstable_isNewReconciler:!1},bs={readContext:no,useCallback:function(e,t){return zo().memoizedState=[e,t===void 0?null:t],e},useContext:no,useEffect:ns,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),es(4194308,4,os.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){return es(4,2,e,t)},useMemo:function(e,t){var n=zo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=zo();return e={current:e},t.memoizedState=e},useState:Zo,useDebugValue:cs,useDeferredValue:function(e){return zo().memoizedState=e},useTransition:function(){var e=Zo(!1),t=e[0];return e=fs.bind(null,e[1]),zo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=B,a=zo();if(R){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Y===null)throw Error(r(349));jo&30||Ko(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ns(Jo.bind(null,i,o,e),[e]),i.flags|=2048,Qo(9,qo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=zo(),t=Y.identifierPrefix;if(R){var n=wa,r=Ca;n=(r&~(1<<32-Mt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Po++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Fo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},xs={readContext:no,useCallback:ls,useContext:no,useEffect:rs,useImperativeHandle:ss,useInsertionEffect:is,useLayoutEffect:as,useMemo:us,useReducer:Ho,useRef:$o,useState:function(){return Ho(Vo)},useDebugValue:cs,useDeferredValue:function(e){return ds(Bo(),V.memoizedState,e)},useTransition:function(){return[Ho(Vo)[0],Bo().memoizedState]},useMutableSource:Wo,useSyncExternalStore:Go,useId:ps,unstable_isNewReconciler:!1},Ss={readContext:no,useCallback:ls,useContext:no,useEffect:rs,useImperativeHandle:ss,useInsertionEffect:is,useLayoutEffect:as,useMemo:us,useReducer:Uo,useRef:$o,useState:function(){return Uo(Vo)},useDebugValue:cs,useDeferredValue:function(e){var t=Bo();return V===null?t.memoizedState=e:ds(t,V.memoizedState,e)},useTransition:function(){return[Uo(Vo)[0],Bo().memoizedState]},useMutableSource:Wo,useSyncExternalStore:Go,useId:ps,unstable_isNewReconciler:!1};function Cs(e,t){if(e&&e.defaultProps){for(var n in t=A({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ws(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:A({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ts={isMounted:function(e){return(e=e._reactInternals)?pt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pl(),i=ml(e),a=uo(r,i);a.payload=t,n!=null&&(a.callback=n),t=fo(e,a,i),t!==null&&(hl(t,e,i,r),po(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pl(),i=ml(e),a=uo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=fo(e,a,i),t!==null&&(hl(t,e,i,r),po(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pl(),r=ml(e),i=uo(n,r);i.tag=2,t!=null&&(i.callback=t),t=fo(e,i,r),t!==null&&(hl(t,e,r,n),po(t,e,r))}};function Es(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?!Lr(n,r)||!Lr(i,a):!0}function Ds(e,t,n){var r=!1,i=$i,a=t.contextType;return typeof a==`object`&&a?a=no(a):(i=ia(t)?na:ea.current,r=t.contextTypes,a=(r=r!=null)?ra(e,i):$i),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ts,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Os(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&&Ts.enqueueReplaceState(t,t.state,null)}function ks(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},co(e);var a=t.contextType;typeof a==`object`&&a?i.context=no(a):(a=ia(t)?na:ea.current,i.context=ra(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(ws(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Ts.enqueueReplaceState(i,i.state,null),ho(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function As(e,t){try{var n=``,r=t;do n+=pe(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function js(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ms(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ns=typeof WeakMap==`function`?WeakMap:Map;function Ps(e,t,n){n=uo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rl||(rl=!0,il=r),Ms(e,t)},n}function Fs(e,t,n){n=uo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ms(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ms(e,t),typeof r!=`function`&&(al===null?al=new Set([this]):al.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Is(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ns;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)||(i.add(n),e=zl.bind(null,e,t,n),t.then(e,e))}function Ls(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Rs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=uo(-1,1),t.tag=2,fo(n,t,1))),n.lanes|=1),e)}var zs=C.ReactCurrentOwner,Bs=!1;function Vs(e,t,n,r){t.child=e===null?qa(t,null,n,r):Ka(t,e.child,n,r)}function Hs(e,t,n,r,i){n=n.render;var a=t.ref;return to(t,i),r=Lo(e,t,n,r,a,i),n=Ro(),e!==null&&!Bs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cc(e,t,i)):(R&&n&&Da(t),t.flags|=1,Vs(e,t,r,i),t.child)}function Us(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ql(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ws(e,t,a,r,i)):(e=Xl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Lr:n,n(o,r)&&e.ref===t.ref)return cc(e,t,i)}return t.flags|=1,e=Yl(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ws(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Lr(a,r)&&e.ref===t.ref)if(Bs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Bs=!0);else return t.lanes=e.lanes,cc(e,t,i)}return qs(e,t,n,r,i)}function Gs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},L(qc,Kc),Kc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,L(qc,Kc),Kc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,L(qc,Kc),Kc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),L(qc,Kc),Kc|=r;return Vs(e,t,i,n),t.child}function Ks(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function qs(e,t,n,r,i){var a=ia(n)?na:ea.current;return a=ra(t,a),to(t,i),n=Lo(e,t,n,r,a,i),r=Ro(),e!==null&&!Bs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,cc(e,t,i)):(R&&r&&Da(t),t.flags|=1,Vs(e,t,n,i),t.child)}function Js(e,t,n,r,i){if(ia(n)){var a=!0;ca(t)}else a=!1;if(to(t,i),t.stateNode===null)sc(e,t),Ds(t,n,r),ks(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=no(l):(l=ia(n)?na:ea.current,l=ra(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Os(t,o,r,l),so=!1;var f=t.memoizedState;o.state=f,ho(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ta.current||so?(typeof u==`function`&&(ws(t,n,u,r),c=t.memoizedState),(s=so||Es(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,lo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Cs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=no(c):(c=ia(n)?na:ea.current,c=ra(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Os(t,o,r,c),so=!1,f=t.memoizedState,o.state=f,ho(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||ta.current||so?(typeof p==`function`&&(ws(t,n,p,r),m=t.memoizedState),(l=so||Es(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ys(e,t,n,r,a,i)}function Ys(e,t,n,r,i,a){Ks(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&la(t,n,!1),cc(e,t,a);r=t.stateNode,zs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ka(t,e.child,null,a),t.child=Ka(t,null,s,a)):Vs(e,t,s,a),t.memoizedState=r.state,i&&la(t,n,!0),t.child}function Xs(e){var t=e.stateNode;t.pendingContext?oa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&oa(e,t.context,!1),So(e,t.containerInfo)}function Zs(e,t,n,r,i){return za(),Ba(i),t.flags|=256,Vs(e,t,n,r),t.child}var Qs={dehydrated:null,treeContext:null,retryLane:0};function $s(e){return{baseLanes:e,cachePool:null,transitions:null}}function ec(e,t,n){var r=t.pendingProps,i=z.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),L(z,i&1),e===null)return Fa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ql(o,r,0,null),e=Zl(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=$s(n),t.memoizedState=Qs,e):tc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return rc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Yl(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=Zl(a,o,n,null),a.flags|=2):a=Yl(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?$s(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Qs,r}return a=e.child,e=a.sibling,r=Yl(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function tc(e,t){return t=Ql({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function nc(e,t,n,r){return r!==null&&Ba(r),Ka(t,e.child,null,n),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=js(Error(r(422))),nc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=Ql({mode:`visible`,children:i.children},a,0,null),o=Zl(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ka(t,e.child,null,s),t.child.memoizedState=$s(s),t.memoizedState=Qs,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return nc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=js(o,i,void 0),nc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Bs||c){if(i=Y,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,oo(e,a),hl(i,e,a,-1))}return kl(),i=js(Error(r(421))),nc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Vl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Aa=Li(a.nextSibling),ka=t,R=!0,ja=null,e!==null&&(ba[xa++]=Ca,ba[xa++]=wa,ba[xa++]=Sa,Ca=e.id,wa=e.overflow,Sa=t),t=tc(t,i.children),t.flags|=4096,t)}function ic(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),eo(e.return,t,n)}function ac(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Vs(e,t,r.children,n),r=z.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ic(e,n,t);else if(e.tag===19)ic(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}r&=1}if(L(z,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ac(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ac(t,!0,n,null,a);break;case`together`:ac(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function cc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Yl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lc(e,t,n){switch(t.tag){case 3:Xs(t),za();break;case 5:wo(t);break;case 1:ia(t.type)&&ca(t);break;case 4:So(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;L(Ja,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(L(z,z.current&1),e=cc(e,t,n),e===null?null:e.sibling):ec(e,t,n):(L(z,z.current&1),t.flags|=128,null);L(z,z.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(z,z.current),r)break;return null;case 22:case 23:return t.lanes=0,Gs(e,t,n)}return cc(e,t,n)}var uc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},dc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,xo(vo.current);var o=null;switch(n){case`input`:i=xe(e,i),r=xe(e,r),o=[];break;case`select`:i=A({},i,{value:void 0}),r=A({},r,{value:void 0}),o=[];break;case`textarea`:i=ke(e,i),r=ke(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Di)}Ue(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&F(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},fc=function(e,t,n,r){n!==r&&(t.flags|=4)};function pc(e,t){if(!R)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 W(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&14680064,r|=i.flags&14680064,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 mc(e,t,n){var i=t.pendingProps;switch(Oa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(t),null;case 1:return ia(t.type)&&aa(),W(t),null;case 3:return i=t.stateNode,Co(),I(ta),I(ea),Oo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(La(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ja!==null&&(yl(ja),ja=null))),W(t),null;case 5:To(t);var o=xo(bo.current);if(n=t.type,e!==null&&t.stateNode!=null)dc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return W(t),null}if(e=xo(vo.current),La(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Bi]=t,i[Vi]=s,e=(t.mode&1)!=0,n){case`dialog`:F(`cancel`,i),F(`close`,i);break;case`iframe`:case`object`:case`embed`:F(`load`,i);break;case`video`:case`audio`:for(o=0;o<ui.length;o++)F(ui[o],i);break;case`source`:F(`error`,i);break;case`img`:case`image`:case`link`:F(`error`,i),F(`load`,i);break;case`details`:F(`toggle`,i);break;case`input`:Se(i,s),F(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},F(`invalid`,i);break;case`textarea`:Ae(i,s),F(`invalid`,i)}for(var c in Ue(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&F(`scroll`,i)}switch(n){case`input`:ve(i),Te(i,s,!0);break;case`textarea`:ve(i),Me(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Di)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ne(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Bi]=t,e[Vi]=i,uc(e,t,!1,!1),t.stateNode=e;a:{switch(c=We(n,i),n){case`dialog`:F(`cancel`,e),F(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:F(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ui.length;o++)F(ui[o],e);o=i;break;case`source`:F(`error`,e),o=i;break;case`img`:case`image`:case`link`:F(`error`,e),F(`load`,e),o=i;break;case`details`:F(`toggle`,e),o=i;break;case`input`:Se(e,i),o=xe(e,i),F(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=A({},i,{value:void 0}),F(`invalid`,e);break;case`textarea`:Ae(e,i),o=ke(e,i),F(`invalid`,e);break;default:o=i}for(s in Ue(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Ve(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ie(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Le(e,u):typeof u==`number`&&Le(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&F(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:ve(e),Te(e,i,!1);break;case`textarea`:ve(e),Me(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+ge(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Oe(e,!!i.multiple,i.defaultValue,!0):Oe(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Di)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return W(t),null;case 6:if(e&&t.stateNode!=null)fc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=xo(bo.current),xo(vo.current),La(t)){if(i=t.stateNode,n=t.memoizedProps,i[Bi]=t,(s=i.nodeValue!==n)&&(e=ka,e!==null))switch(e.tag){case 3:Ei(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ei(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Bi]=t,t.stateNode=i}return W(t),null;case 13:if(I(z),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(R&&Aa!==null&&t.mode&1&&!(t.flags&128))Ra(),za(),t.flags|=98560,s=!1;else if(s=La(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Bi]=t}else za(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),s=!1}else ja!==null&&(yl(ja),ja=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||z.current&1?Q===0&&(Q=3):kl())),t.updateQueue!==null&&(t.flags|=4),W(t),null);case 4:return Co(),e===null&&gi(t.stateNode.containerInfo),W(t),null;case 10:return $a(t.type._context),W(t),null;case 17:return ia(t.type)&&aa(),W(t),null;case 19:if(I(z),s=t.memoizedState,s===null)return W(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)pc(s,!1);else{if(Q!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Eo(e),c!==null){for(t.flags|=128,pc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return L(z,z.current&1|2),t.child}e=e.sibling}s.tail!==null&&N()>tl&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Eo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),pc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!R)return W(t),null}else 2*N()-s.renderingStartTime>tl&&n!==1073741824&&(t.flags|=128,i=!0,pc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(W(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=N(),t.sibling=null,n=z.current,L(z,i?n&1|2:n&1),t);case 22:case 23:return Tl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Kc&1073741824&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function hc(e,t){switch(Oa(t),t.tag){case 1:return ia(t.type)&&aa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Co(),I(ta),I(ea),Oo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return To(t),null;case 13:if(I(z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(z),null;case 4:return Co(),null;case 10:return $a(t.type._context),null;case 22:case 23:return Tl(),null;case 24:return null;default:return null}}var gc=!1,G=!1,_c=typeof WeakSet==`function`?WeakSet:Set,K=null;function vc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){$(e,t,n)}else n.current=null}function yc(e,t,n){try{n()}catch(n){$(e,t,n)}}var bc=!1;function xc(e,t){if(Oi=bn,e=Vr(),Hr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.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||i!==0&&f.nodeType!==3||(l=s+i),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===i&&(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(ki={focusedElem:e,selectionRange:n},bn=!1,K=t;K!==null;)if(t=K,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Cs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){$(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return h=bc,bc=!1,h}function Sc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&yc(t,n,a)}i=i.next}while(i!==r)}}function Cc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Tc(e){var t=e.alternate;t!==null&&(e.alternate=null,Tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bi],delete t[Vi],delete t[Ui],delete t[Wi],delete t[Gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ec(e){return e.tag===5||e.tag===3||e.tag===4}function Dc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Oc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(Oc(e,t,n),e=e.sibling;e!==null;)Oc(e,t,n),e=e.sibling}function kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(kc(e,t,n),e=e.sibling;e!==null;)kc(e,t,n),e=e.sibling}var q=null,Ac=!1;function jc(e,t,n){for(n=n.child;n!==null;)Mc(e,t,n),n=n.sibling}function Mc(e,t,n){if(At&&typeof At.onCommitFiberUnmount==`function`)try{At.onCommitFiberUnmount(kt,n)}catch{}switch(n.tag){case 5:G||vc(n,t);case 6:var r=q,i=Ac;q=null,jc(e,t,n),q=r,Ac=i,q!==null&&(Ac?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(Ac?(e=q,n=n.stateNode,e.nodeType===8?Ii(e.parentNode,n):e.nodeType===1&&Ii(e,n),vn(e)):Ii(q,n.stateNode));break;case 4:r=q,i=Ac,q=n.stateNode.containerInfo,Ac=!0,jc(e,t,n),q=r,Ac=i;break;case 0:case 11:case 14:case 15:if(!G&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&yc(n,t,o),i=i.next}while(i!==r)}jc(e,t,n);break;case 1:if(!G&&(vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){$(n,t,e)}jc(e,t,n);break;case 21:jc(e,t,n);break;case 22:n.mode&1?(G=(r=G)||n.memoizedState!==null,jc(e,t,n),G=r):jc(e,t,n);break;default:jc(e,t,n)}}function Nc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new _c),t.forEach(function(t){var r=Hl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Pc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:q=c.stateNode,Ac=!1;break a;case 3:q=c.stateNode.containerInfo,Ac=!0;break a;case 4:q=c.stateNode.containerInfo,Ac=!0;break a}c=c.return}if(q===null)throw Error(r(160));Mc(o,s,a),q=null,Ac=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){$(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Fc(t,e),t=t.sibling}function Fc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Pc(t,e),Ic(e),i&4){try{Sc(3,e,e.return),Cc(3,e)}catch(t){$(e,e.return,t)}try{Sc(5,e,e.return)}catch(t){$(e,e.return,t)}}break;case 1:Pc(t,e),Ic(e),i&512&&n!==null&&vc(n,n.return);break;case 5:if(Pc(t,e),Ic(e),i&512&&n!==null&&vc(n,n.return),e.flags&32){var a=e.stateNode;try{Le(a,``)}catch(t){$(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Ce(a,o),We(c,s);var u=We(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Ve(a,f):d===`dangerouslySetInnerHTML`?Ie(a,f):d===`children`?Le(a,f):S(a,d,f,u)}switch(c){case`input`:we(a,o);break;case`textarea`:je(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Oe(a,!!o.multiple,o.multiple?[]:``,!1):Oe(a,!!o.multiple,o.defaultValue,!0)):Oe(a,!!o.multiple,m,!1)}a[Vi]=o}catch(t){$(e,e.return,t)}}break;case 6:if(Pc(t,e),Ic(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){$(e,e.return,t)}}break;case 3:if(Pc(t,e),Ic(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{vn(t.containerInfo)}catch(t){$(e,e.return,t)}break;case 4:Pc(t,e),Ic(e);break;case 13:Pc(t,e),Ic(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(el=N())),i&4&&Nc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(G=(u=G)||d,Pc(t,e),G=u):Pc(t,e),Ic(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(K=e,d=e.child;d!==null;){for(f=K=d;K!==null;){switch(p=K,m=p.child,p.tag){case 0:case 11:case 14:case 15:Sc(4,p,p.return);break;case 1:vc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){$(i,n,e)}}break;case 5:vc(p,p.return);break;case 22:if(p.memoizedState!==null){Bc(f);continue}}m===null?Bc(f):(m.return=p,K=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Be(`display`,s))}catch(t){$(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){$(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Pc(t,e),Ic(e),i&4&&Nc(e);break;case 21:break;default:Pc(t,e),Ic(e)}}function Ic(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Ec(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Le(a,``),i.flags&=-33),kc(e,Dc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Oc(e,Dc(e),o);break;default:throw Error(r(161))}}catch(t){$(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lc(e,t,n){K=e,Rc(e,t,n)}function Rc(e,t,n){for(var r=(e.mode&1)!=0;K!==null;){var i=K,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||gc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||G;s=gc;var l=G;if(gc=o,(G=c)&&!l)for(K=i;K!==null;)o=K,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Vc(i):(c.return=o,K=c);for(;a!==null;)K=a,Rc(a,t,n),a=a.sibling;K=i,gc=s,G=l}zc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,K=a):zc(e,t,n)}}function zc(e){for(;K!==null;){var t=K;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:G||Cc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!G)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Cs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&go(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}go(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&vn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}G||t.flags&512&&wc(t)}catch(e){$(t,t.return,e)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function Bc(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function Vc(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Cc(4,t)}catch(e){$(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){$(t,i,e)}}var a=t.return;try{wc(t)}catch(e){$(t,a,e)}break;case 5:var o=t.return;try{wc(t)}catch(e){$(t,o,e)}}}catch(e){$(t,t.return,e)}if(t===e){K=null;break}var s=t.sibling;if(s!==null){s.return=t.return,K=s;break}K=t.return}}var Hc=Math.ceil,Uc=C.ReactCurrentDispatcher,Wc=C.ReactCurrentOwner,Gc=C.ReactCurrentBatchConfig,J=0,Y=null,X=null,Z=0,Kc=0,qc=Qi(0),Q=0,Jc=null,Yc=0,Xc=0,Zc=0,Qc=null,$c=null,el=0,tl=1/0,nl=null,rl=!1,il=null,al=null,ol=!1,sl=null,cl=0,ll=0,ul=null,dl=-1,fl=0;function pl(){return J&6?N():dl===-1?dl=N():dl}function ml(e){return e.mode&1?J&2&&Z!==0?Z&-Z:Va.transition===null?(e=P,e===0?(e=window.event,e=e===void 0?16:En(e.type),e):e):(fl===0&&(fl=Ut()),fl):1}function hl(e,t,n,i){if(50<ll)throw ll=0,ul=null,Error(r(185));Gt(e,n,i),(!(J&2)||e!==Y)&&(e===Y&&(!(J&2)&&(Xc|=n),Q===4&&xl(e,Z)),gl(e,i),n===1&&J===0&&!(t.mode&1)&&(tl=N()+500,da&&ha()))}function gl(e,t){var n=e.callbackNode;Vt(e,t);var r=zt(e,e===Y?Z:0);if(r===0)n!==null&&bt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&bt(n),t===1)e.tag===0?ma(Sl.bind(null,e)):pa(Sl.bind(null,e)),Pi(function(){!(J&6)&&ha()}),n=null;else{switch(Jt(r)){case 1:n=wt;break;case 4:n=Tt;break;case 16:n=Et;break;case 536870912:n=Ot;break;default:n=Et}n=Wl(n,_l.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function _l(e,t){if(dl=-1,fl=0,J&6)throw Error(r(327));var n=e.callbackNode;if(Ll()&&e.callbackNode!==n)return null;var i=zt(e,e===Y?Z:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Al(e,i);else{t=i;var a=J;J|=2;var o=Ol();(Y!==e||Z!==t)&&(nl=null,tl=N()+500,El(e,t));do try{Ml();break}catch(t){Dl(e,t)}while(1);Qa(),Uc.current=o,J=a,X===null?(Y=null,Z=0,t=Q):t=0}if(t!==0){if(t===2&&(a=Ht(e),a!==0&&(i=a,t=vl(e,a))),t===1)throw n=Jc,El(e,0),xl(e,i),gl(e,N()),n;if(t===6)xl(e,i);else{if(a=e.current.alternate,!(i&30)&&!bl(a)&&(t=Al(e,i),t===2&&(o=Ht(e),o!==0&&(i=o,t=vl(e,o))),t===1))throw n=Jc,El(e,0),xl(e,i),gl(e,N()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Fl(e,$c,nl);break;case 3:if(xl(e,i),(i&130023424)===i&&(t=el+500-N(),10<t)){if(zt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){pl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ji(Fl.bind(null,e,$c,nl),t);break}Fl(e,$c,nl);break;case 4:if(xl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Mt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=N()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Hc(i/1960))-i,10<i){e.timeoutHandle=ji(Fl.bind(null,e,$c,nl),i);break}Fl(e,$c,nl);break;case 5:Fl(e,$c,nl);break;default:throw Error(r(329))}}}return gl(e,N()),e.callbackNode===n?_l.bind(null,e):null}function vl(e,t){var n=Qc;return e.current.memoizedState.isDehydrated&&(El(e,t).flags|=256),e=Al(e,t),e!==2&&(t=$c,$c=n,t!==null&&yl(t)),e}function yl(e){$c===null?$c=e:$c.push.apply($c,e)}function bl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ir(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 xl(e,t){for(t&=~Zc,t&=~Xc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mt(t),r=1<<n;e[n]=-1,t&=~r}}function Sl(e){if(J&6)throw Error(r(327));Ll();var t=zt(e,0);if(!(t&1))return gl(e,N()),null;var n=Al(e,t);if(e.tag!==0&&n===2){var i=Ht(e);i!==0&&(t=i,n=vl(e,i))}if(n===1)throw n=Jc,El(e,0),xl(e,t),gl(e,N()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fl(e,$c,nl),gl(e,N()),null}function Cl(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(tl=N()+500,da&&ha())}}function wl(e){sl!==null&&sl.tag===0&&!(J&6)&&Ll();var t=J;J|=1;var n=Gc.transition,r=P;try{if(Gc.transition=null,P=1,e)return e()}finally{P=r,Gc.transition=n,J=t,!(J&6)&&ha()}}function Tl(){Kc=qc.current,I(qc)}function El(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mi(n)),X!==null)for(n=X.return;n!==null;){var r=n;switch(Oa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&aa();break;case 3:Co(),I(ta),I(ea),Oo();break;case 5:To(r);break;case 4:Co();break;case 13:I(z);break;case 19:I(z);break;case 10:$a(r.type._context);break;case 22:case 23:Tl()}n=n.return}if(Y=e,X=e=Yl(e.current,null),Z=Kc=t,Q=0,Jc=null,Zc=Xc=Yc=0,$c=Qc=null,ro!==null){for(t=0;t<ro.length;t++)if(n=ro[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}ro=null}return e}function Dl(e,t){do{var n=X;try{if(Qa(),ko.current=ys,Mo){for(var i=B.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Mo=!1}if(jo=0,H=V=B=null,No=!1,Po=0,Wc.current=null,n===null||n.return===null){Q=1,Jc=t,X=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Z,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Ls(s);if(m!==null){m.flags&=-257,Rs(m,s,c,o,t),m.mode&1&&Is(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Is(o,u,t),kl();break a}l=Error(r(426))}}else if(R&&c.mode&1){var _=Ls(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Rs(_,s,c,o,t),Ba(As(l,c));break a}}o=l=As(l,c),Q!==4&&(Q=2),Qc===null?Qc=[o]:Qc.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Ps(o,l,t);mo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(al===null||!al.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Fs(o,c,t);mo(o,x);break a}}o=o.return}while(o!==null)}Pl(n)}catch(e){t=e,X===n&&n!==null&&(X=n=n.return);continue}break}while(1)}function Ol(){var e=Uc.current;return Uc.current=ys,e===null?ys:e}function kl(){(Q===0||Q===3||Q===2)&&(Q=4),Y===null||!(Yc&268435455)&&!(Xc&268435455)||xl(Y,Z)}function Al(e,t){var n=J;J|=2;var i=Ol();(Y!==e||Z!==t)&&(nl=null,El(e,t));do try{jl();break}catch(t){Dl(e,t)}while(1);if(Qa(),J=n,Uc.current=i,X!==null)throw Error(r(261));return Y=null,Z=0,Q}function jl(){for(;X!==null;)Nl(X)}function Ml(){for(;X!==null&&!xt();)Nl(X)}function Nl(e){var t=Ul(e.alternate,e,Kc);e.memoizedProps=e.pendingProps,t===null?Pl(e):X=t,Wc.current=null}function Pl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=hc(n,t),n!==null){n.flags&=32767,X=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Q=6,X=null;return}}else if(n=mc(n,t,Kc),n!==null){X=n;return}if(t=t.sibling,t!==null){X=t;return}X=t=e}while(t!==null);Q===0&&(Q=5)}function Fl(e,t,n){var r=P,i=Gc.transition;try{Gc.transition=null,P=1,Il(e,t,n,r)}finally{Gc.transition=i,P=r}return null}function Il(e,t,n,i){do Ll();while(sl!==null);if(J&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Kt(e,o),e===Y&&(X=Y=null,Z=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ol||(ol=!0,Wl(Et,function(){return Ll(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Gc.transition,Gc.transition=null;var s=P;P=1;var c=J;J|=4,Wc.current=null,xc(e,n),Fc(n,e),Ur(ki),bn=!!Oi,ki=Oi=null,e.current=n,Lc(n,e,a),St(),J=c,P=s,Gc.transition=o}else e.current=n;if(ol&&(ol=!1,sl=e,cl=a),o=e.pendingLanes,o===0&&(al=null),jt(n.stateNode,i),gl(e,N()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(rl)throw rl=!1,e=il,il=null,e;return cl&1&&e.tag!==0&&Ll(),o=e.pendingLanes,o&1?e===ul?ll++:(ll=0,ul=e):ll=0,ha(),null}function Ll(){if(sl!==null){var e=Jt(cl),t=Gc.transition,n=P;try{if(Gc.transition=null,P=16>e?16:e,sl===null)var i=!1;else{if(e=sl,sl=null,cl=0,J&6)throw Error(r(331));var a=J;for(J|=4,K=e.current;K!==null;){var o=K,s=o.child;if(K.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(K=u;K!==null;){var d=K;switch(d.tag){case 0:case 11:case 15:Sc(8,d,o)}var f=d.child;if(f!==null)f.return=d,K=f;else for(;K!==null;){d=K;var p=d.sibling,m=d.return;if(Tc(d),d===u){K=null;break}if(p!==null){p.return=m,K=p;break}K=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}K=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,K=s;else b:for(;K!==null;){if(o=K,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Sc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,K=v;break b}K=o.return}}var y=e.current;for(K=y;K!==null;){s=K;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,K=b;else b:for(s=y;K!==null;){if(c=K,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Cc(9,c)}}catch(e){$(c,c.return,e)}if(c===s){K=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,K=x;break b}K=c.return}}if(J=a,ha(),At&&typeof At.onPostCommitFiberRoot==`function`)try{At.onPostCommitFiberRoot(kt,e)}catch{}i=!0}return i}finally{P=n,Gc.transition=t}}return!1}function Rl(e,t,n){t=As(n,t),t=Ps(e,t,1),e=fo(e,t,1),t=pl(),e!==null&&(Gt(e,1,t),gl(e,t))}function $(e,t,n){if(e.tag===3)Rl(e,e,n);else for(;t!==null;){if(t.tag===3){Rl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(al===null||!al.has(r))){e=As(n,e),e=Fs(t,e,1),t=fo(t,e,1),e=pl(),t!==null&&(Gt(t,1,e),gl(t,e));break}}t=t.return}}function zl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=pl(),e.pingedLanes|=e.suspendedLanes&n,Y===e&&(Z&n)===n&&(Q===4||Q===3&&(Z&130023424)===Z&&500>N()-el?El(e,0):Zc|=n),gl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Lt,Lt<<=1,!(Lt&130023424)&&(Lt=4194304)):t=1);var n=pl();e=oo(e,t),e!==null&&(Gt(e,t,n),gl(e,n))}function Vl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bl(e,n)}function Hl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Bl(e,n)}var Ul=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ta.current)Bs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Bs=!1,lc(e,t,n);Bs=!!(e.flags&131072)}else Bs=!1,R&&t.flags&1048576&&Ea(t,ya,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;sc(e,t),e=t.pendingProps;var a=ra(t,ea.current);to(t,n),a=Lo(null,t,i,e,a,n);var o=Ro();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ia(i)?(o=!0,ca(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,co(t),a.updater=Ts,t.stateNode=a,a._reactInternals=t,ks(t,i,e,n),t=Ys(null,t,i,!0,o,n)):(t.tag=0,R&&o&&Da(t),Vs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(sc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=Cs(i,e),a){case 0:t=qs(null,t,i,e,n);break a;case 1:t=Js(null,t,i,e,n);break a;case 11:t=Hs(null,t,i,e,n);break a;case 14:t=Us(null,t,i,Cs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),qs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Js(e,t,i,a,n);case 3:a:{if(Xs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,lo(e,t),ho(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=As(Error(r(423)),t),t=Zs(e,t,i,n,a);break a}else if(i!==a){a=As(Error(r(424)),t),t=Zs(e,t,i,n,a);break a}else for(Aa=Li(t.stateNode.containerInfo.firstChild),ka=t,R=!0,ja=null,n=qa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(za(),i===a){t=cc(e,t,n);break a}Vs(e,t,i,n)}t=t.child}return t;case 5:return wo(t),e===null&&Fa(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ai(i,a)?s=null:o!==null&&Ai(i,o)&&(t.flags|=32),Ks(e,t),Vs(e,t,s,n),t.child;case 6:return e===null&&Fa(t),null;case 13:return ec(e,t,n);case 4:return So(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ka(t,null,i,n):Vs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),Hs(e,t,i,a,n);case 7:return Vs(e,t,t.pendingProps,n),t.child;case 8:return Vs(e,t,t.pendingProps.children,n),t.child;case 12:return Vs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,L(Ja,i._currentValue),i._currentValue=s,o!==null)if(Ir(o.value,s)){if(o.children===a.children&&!ta.current){t=cc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=uo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),eo(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),eo(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Vs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,to(t,n),a=no(a),i=i(a),t.flags|=1,Vs(e,t,i,n),t.child;case 14:return i=t.type,a=Cs(i,t.pendingProps),a=Cs(i.type,a),Us(e,t,i,a,n);case 15:return Ws(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Cs(i,a),sc(e,t),t.tag=1,ia(i)?(e=!0,ca(t)):e=!1,to(t,n),Ds(t,i,a),ks(t,i,a,n),Ys(null,t,i,!0,e,n);case 19:return oc(e,t,n);case 22:return Gs(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return yt(e,t)}function Gl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kl(e,t,n,r){return new Gl(e,t,n,r)}function ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jl(e){if(typeof e==`function`)return+!!ql(e);if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===D)return 14}return 2}function Yl(e,t){var n=e.alternate;return n===null?(n=Kl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xl(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ql(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case ee:return Zl(n.children,a,o,t);case te:s=8,a|=8;break;case E:return e=Kl(12,n,t,a|2),e.elementType=E,e.lanes=o,e;case ae:return e=Kl(13,n,t,a),e.elementType=ae,e.lanes=o,e;case oe:return e=Kl(19,n,t,a),e.elementType=oe,e.lanes=o,e;case k:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case ne:s=10;break a;case re:s=9;break a;case ie:s=11;break a;case D:s=14;break a;case O:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Kl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Zl(e,t,n,r){return e=Kl(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=Kl(22,e,r,t),e.elementType=k,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=Kl(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Kl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wt(0),this.expirationTimes=Wt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,i,a,o,s,c){return e=new tu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Kl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},co(a),e}function ru(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function iu(e){if(!e)return $i;e=e._reactInternals;a:{if(pt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(ia(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(ia(n))return sa(e,n,t)}return t}function au(e,t,n,r,i,a,o,s,c){return e=nu(n,r,!0,e,i,a,o,s,c),e.context=iu(null),n=e.current,r=pl(),i=ml(n),a=uo(r,i),a.callback=t??null,fo(n,a,i),e.current.lanes=i,Gt(e,i,r),gl(e,r),e}function ou(e,t,n,r){var i=t.current,a=pl(),o=ml(i);return n=iu(n),t.context===null?t.context=n:t.pendingContext=n,t=uo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=fo(i,t,o),e!==null&&(hl(e,i,o,a),po(e,i,o)),o}function su(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lu(e,t){cu(e,t),(e=e.alternate)&&cu(e,t)}function uu(){return null}var du=typeof reportError==`function`?reportError:function(e){console.error(e)};function fu(e){this._internalRoot=e}pu.prototype.render=fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));ou(e,t,null,null)},pu.prototype.unmount=fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wl(function(){ou(null,e,null,null)}),t[Hi]=null}};function pu(e){this._internalRoot=e}pu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<cn.length&&t!==0&&t<cn[n].priority;n++);cn.splice(n,0,e),n===0&&pn(e)}};function mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function gu(){}function _u(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=su(o);a.call(e)}}var o=au(t,r,e,0,null,!1,!1,``,gu);return e._reactRootContainer=o,e[Hi]=o.current,gi(e.nodeType===8?e.parentNode:e),wl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=su(c);s.call(e)}}var c=nu(e,0,!1,null,null,!1,!1,``,gu);return e._reactRootContainer=c,e[Hi]=c.current,gi(e.nodeType===8?e.parentNode:e),wl(function(){ou(t,c,n,r)}),c}function vu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=su(o);s.call(e)}}ou(t,o,e,i)}else o=_u(n,t,e,i,r);return su(o)}Yt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Rt(t.pendingLanes);n!==0&&(qt(t,n|1),gl(t,N()),!(J&6)&&(tl=N()+500,ha()))}break;case 13:wl(function(){var t=oo(e,1);t!==null&&hl(t,e,1,pl())}),lu(e,1)}},Xt=function(e){if(e.tag===13){var t=oo(e,134217728);t!==null&&hl(t,e,134217728,pl()),lu(e,134217728)}},Zt=function(e){if(e.tag===13){var t=ml(e),n=oo(e,t);n!==null&&hl(n,e,t,pl()),lu(e,t)}},Qt=function(){return P},$t=function(e,t){var n=P;try{return P=e,t()}finally{P=n}},qe=function(e,t,n){switch(t){case`input`:if(we(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Yi(i);if(!a)throw Error(r(90));ye(i),we(i,a)}}}break;case`textarea`:je(e,n);break;case`select`:t=n.value,t!=null&&Oe(e,!!n.multiple,t,!1)}},$e=Cl,et=wl;var yu={usingClientEntryPoint:!1,Events:[qi,Ji,Yi,Ze,Qe,Cl]},bu={findFiberByHostInstance:Ki,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},xu={bundleType:bu.bundleType,version:bu.version,rendererPackageName:bu.rendererPackageName,rendererConfig:bu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_t(e),e===null?null:e.stateNode},findFiberByHostInstance:bu.findFiberByHostInstance||uu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{kt=Su.inject(xu),At=Su}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mu(t))throw Error(r(200));return ru(e,t,null,n)},e.createRoot=function(e,t){if(!mu(e))throw Error(r(299));var n=!1,i=``,a=du;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=nu(e,1,!1,null,null,n,!1,i,a),e[Hi]=t.current,gi(e.nodeType===8?e.parentNode:e),new fu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=_t(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return wl(e)},e.hydrate=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!mu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=du;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=au(t,null,e,1,n??null,a,!1,o,s),e[Hi]=t.current,gi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new pu(t)},e.render=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!hu(e))throw Error(r(40));return e._reactRootContainer?(wl(function(){vu(null,null,e,!1,function(){e._reactRootContainer=null,e[Hi]=null})}),!0):!1},e.unstable_batchedUpdates=Cl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!hu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return vu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),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=m();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),g=c(u(),1),_=h(),v=new URLSearchParams(window.location.search).get(`token`);v&&(localStorage.setItem(`nyxora_token`,v),window.history.replaceState({},document.title,window.location.pathname));var y=()=>localStorage.getItem(`nyxora_token`)||``;async function b(e,t){let n=y(),r=new Headers(t?.headers);n&&r.set(`x-nyxora-token`,n);let i=typeof e==`string`&&e.startsWith(`/`)?`${e}`:e;try{let e=await fetch(i,{...t,headers:r});return window.dispatchEvent(new CustomEvent(`nyxora-network-restored`)),e}catch(e){throw window.dispatchEvent(new CustomEvent(`nyxora-network-error`)),e}}var x=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),C={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`},w=(0,g.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,g.createElement)(`svg`,{ref:c,...C,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:S(`lucide`,i),...s},[...o.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(a)?a:[a]])),T=(e,t)=>{let n=(0,g.forwardRef)(({className:n,...r},i)=>(0,g.createElement)(w,{ref:i,iconNode:t,className:S(`lucide-${x(e)}`,n),...r}));return n.displayName=`${e}`,n},ee=T(`Activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),te=T(`AlignLeft`,[[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 18H3`,key:`1amg6g`}],[`path`,{d:`M21 6H3`,key:`1jwq7v`}]]),E=T(`ArrowDownUp`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`m21 8-4-4-4 4`,key:`1c9v7m`}],[`path`,{d:`M17 4v16`,key:`7dpous`}]]),ne=T(`ArrowRightLeft`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),re=T(`BookOpen`,[[`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`}]]),ie=T(`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`}]]),ae=T(`ChartLine`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),oe=T(`ChartPie`,[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]]),D=T(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),O=T(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),k=T(`CircleCheckBig`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),se=T(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ce=T(`ClipboardList`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),A=T(`Compass`,[[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),le=T(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),ue=T(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]),de=T(`Droplet`,[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]]),fe=T(`EyeOff`,[[`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`}]]),pe=T(`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`}]]),me=T(`FilePen`,[[`path`,{d:`M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5`,key:`1couwa`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`1y4qbx`}]]),he=T(`FileSearch`,[[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3`,key:`ms7g94`}],[`path`,{d:`m9 18-1.5-1.5`,key:`1j6qii`}],[`circle`,{cx:`5`,cy:`14`,r:`3`,key:`ufru5t`}]]),ge=T(`FileSpreadsheet`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),j=T(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),_e=T(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),ve=T(`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`}]]),ye=T(`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`}]]),be=T(`KeyRound`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),xe=T(`Key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Se=T(`Landmark`,[[`line`,{x1:`3`,x2:`21`,y1:`22`,y2:`22`,key:`j8o0r`}],[`line`,{x1:`6`,x2:`6`,y1:`18`,y2:`11`,key:`10tf0k`}],[`line`,{x1:`10`,x2:`10`,y1:`18`,y2:`11`,key:`54lgf6`}],[`line`,{x1:`14`,x2:`14`,y1:`18`,y2:`11`,key:`380y`}],[`line`,{x1:`18`,x2:`18`,y1:`18`,y2:`11`,key:`1kevvc`}],[`polygon`,{points:`12 2 20 7 4 7`,key:`jkujk7`}]]),Ce=T(`LayoutDashboard`,[[`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`}]]),we=T(`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`}]]),Te=T(`Mail`,[[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}],[`path`,{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`,key:`1ocrg3`}]]),Ee=T(`MessageSquare`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}]]),De=T(`Mic`,[[`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`,key:`131961`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}]]),Oe=T(`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`}]]),ke=T(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),Ae=T(`Network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),je=T(`PanelLeftClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),Me=T(`PanelsTopLeft`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 21V9`,key:`1oto5p`}]]),Ne=T(`Paperclip`,[[`path`,{d:`M13.234 20.252 21 12.3`,key:`1cbrk9`}],[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486`,key:`1pkts6`}]]),Pe=T(`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`}]]),Fe=T(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ie=T(`RefreshCcw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),Le=T(`RefreshCw`,[[`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`}]]),Re=T(`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`}]]),ze=T(`Scissors`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M8.12 8.12 12 12`,key:`1alkpv`}],[`path`,{d:`M20 4 8.12 15.88`,key:`xgtan2`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M14.8 14.8 20 20`,key:`ptml3r`}]]),Be=T(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Ve=T(`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`}]]),He=T(`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`}]]),Ue=T(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),We=T(`ShieldAlert`,[[`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`}]]),Ge=T(`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`}]]),Ke=T(`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`}]]),qe=T(`Target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Je=T(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),Ye=T(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),Xe=T(`TrendingDown`,[[`polyline`,{points:`22 17 13.5 8.5 8.5 13.5 2 7`,key:`1r2t7k`}],[`polyline`,{points:`16 17 22 17 22 11`,key:`11uiuu`}]]),Ze=T(`TrendingUp`,[[`polyline`,{points:`22 7 13.5 15.5 8.5 10.5 2 17`,key:`126l90`}],[`polyline`,{points:`16 7 22 7 22 13`,key:`kwv8wd`}]]),Qe=T(`TriangleAlert`,[[`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`}]]),$e=T(`Twitter`,[[`path`,{d:`M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z`,key:`pff0z6`}]]),et=T(`Upload`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`17 8 12 3 7 8`,key:`t8dd8p`}],[`line`,{x1:`12`,x2:`12`,y1:`3`,y2:`15`,key:`widbto`}]]),tt=T(`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`}]]),nt=T(`Vault`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}],[`path`,{d:`m7.9 7.9 2.7 2.7`,key:`hpeyl3`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}],[`path`,{d:`m13.4 10.6 2.7-2.7`,key:`264c1n`}],[`circle`,{cx:`7.5`,cy:`16.5`,r:`.5`,fill:`currentColor`,key:`nkw3mc`}],[`path`,{d:`m7.9 16.1 2.7-2.7`,key:`p81g5e`}],[`circle`,{cx:`16.5`,cy:`16.5`,r:`.5`,fill:`currentColor`,key:`fubopw`}],[`path`,{d:`m13.4 13.4 2.7 2.7`,key:`abhel3`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),rt=T(`WalletCards`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2`,key:`4125el`}],[`path`,{d:`M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21`,key:`1dpki6`}]]),it=T(`Wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]),at=T(`WifiOff`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),ot=T(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),st=T(`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`}]]),ct=o((e=>{var t=u(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),M=o(((e,t)=>{t.exports=ct()}))(),lt=({config:e,sessionsCount:t})=>{let[n,r]=(0,g.useState)({cost:0,tokens:0,messages:0}),[i,a]=(0,g.useState)([]),[o,s]=(0,g.useState)([]),[c,l]=(0,g.useState)([]),[u,d]=(0,g.useState)(0),f=(0,g.useRef)(null),p=(0,g.useRef)(null);(0,g.useEffect)(()=>{let e=async()=>{try{let e=await b(`/api/stats`);e.ok&&r(await e.json());let t=await b(`/api/logs`);if(t.ok){let e=await t.json();a(e.events),s(e.gateway)}let n=await b(`/api/cron`);n.ok&&d((await n.json()).activeJobs);let i=await b(`/api/memory`);i.ok&&l(await i.json())}catch{console.error(`Failed to fetch analytics`)}};e();let t=setInterval(e,2e3);return()=>clearInterval(t)},[]);let m=async e=>{try{await b(`/api/memory/${e}`,{method:`DELETE`}),l(c.filter(t=>t.id!==e))}catch{console.error(`Failed to delete memory`)}};return e?(0,M.jsxs)(`div`,{className:`overview-container`,children:[(0,M.jsxs)(`div`,{className:`overview-header`,children:[(0,M.jsx)(`h1`,{children:`Nyxora Status`}),(0,M.jsx)(`p`,{children:`System health, active configuration, and loaded Web3 skills.`})]}),(0,M.jsxs)(`div`,{className:`panel gateway-access`,children:[(0,M.jsxs)(`div`,{className:`panel-header`,children:[(0,M.jsx)(`h3`,{children:`System Configuration`}),(0,M.jsx)(`p`,{children:`Current runtime parameters for your Web3 Agent.`})]}),(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{children:`API Endpoint`}),(0,M.jsx)(`input`,{type:`text`,value:`/api/chat`,readOnly:!0})]}),(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{children:`Agent Name`}),(0,M.jsx)(`input`,{type:`text`,value:e.agent.name,readOnly:!0})]}),(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{children:`Memory Storage`}),(0,M.jsx)(`input`,{type:`text`,value:n.memoryPath||`./memory.json`,readOnly:!0})]})]})]}),(0,M.jsxs)(`div`,{className:`metrics-grid`,children:[(0,M.jsxs)(`div`,{className:`metric-card`,children:[(0,M.jsx)(`label`,{children:`COST`}),(0,M.jsxs)(`div`,{className:`metric-val`,children:[`$`,n.cost.toFixed(4)]}),(0,M.jsxs)(`div`,{className:`metric-sub`,children:[n.tokens,` tokens - `,n.messages,` msgs`]})]}),(0,M.jsxs)(`div`,{className:`metric-card`,children:[(0,M.jsx)(`label`,{children:`SESSIONS`}),(0,M.jsx)(`div`,{className:`metric-val`,children:t}),(0,M.jsxs)(`div`,{className:`metric-sub`,children:[t,` Local chat session`,t===1?``:`s`,` active`]})]}),(0,M.jsxs)(`div`,{className:`metric-card`,children:[(0,M.jsx)(`label`,{children:`SKILLS`}),(0,M.jsxs)(`div`,{className:`metric-val`,children:[n.activeSkills===void 0?2:n.activeSkills,`/`,n.totalSkills===void 0?2:n.totalSkills]}),(0,M.jsxs)(`div`,{className:`metric-sub`,children:[n.totalSkills===void 0?2:n.totalSkills,` Web3 & OS skills loaded`]})]}),(0,M.jsxs)(`div`,{className:`metric-card`,children:[(0,M.jsx)(`label`,{children:`CRON`}),(0,M.jsxs)(`div`,{className:`metric-val`,children:[u,` jobs`]}),(0,M.jsx)(`div`,{className:`metric-sub`,children:u===0?`No scheduled tasks`:`${u} active schedule(s)`})]}),(0,M.jsxs)(`div`,{className:`metric-card`,children:[(0,M.jsx)(`label`,{children:`MODEL AUTH`}),(0,M.jsx)(`div`,{className:`metric-val text-green`,children:`1 ok`}),(0,M.jsxs)(`div`,{className:`metric-sub`,children:[e.llm.provider.toUpperCase(),` provider connected`]})]})]}),(0,M.jsxs)(`div`,{className:`logs-grid`,children:[(0,M.jsxs)(`div`,{className:`log-panel`,children:[(0,M.jsx)(`div`,{className:`log-header`,children:(0,M.jsxs)(`span`,{children:[`Event Log `,(0,M.jsx)(`span`,{className:`badge`,children:i.length})]})}),(0,M.jsxs)(`div`,{className:`log-content`,children:[i.map((e,t)=>(0,M.jsxs)(`div`,{className:`log-row`,style:{fontFamily:`monospace`},children:[(0,M.jsxs)(`span`,{className:`log-time`,style:{color:`var(--accent)`},children:[`[`,e.timestamp,`]`]}),(0,M.jsxs)(`span`,{className:`log-msg`,style:{color:`var(--text-secondary)`,marginLeft:`8px`},children:[e.event,` `,e.meta&&Object.keys(e.meta).length>0?(0,M.jsx)(`span`,{className:`log-meta`,style:{color:`var(--text-secondary)`},children:JSON.stringify(e.meta)}):null]})]},t)),(0,M.jsx)(`div`,{ref:f})]})]}),(0,M.jsxs)(`div`,{className:`log-panel`,children:[(0,M.jsx)(`div`,{className:`log-header`,children:(0,M.jsxs)(`span`,{children:[`Gateway Logs `,(0,M.jsx)(`span`,{className:`badge`,children:o.length})]})}),(0,M.jsxs)(`div`,{className:`log-content`,children:[o.map((e,t)=>{let n=e.message.replace(/\x1b\[[0-9;]*m/g,``);return n=n.replace(/token=[a-fA-F0-9]+/g,`token=••••••••[REDACTED]••••••••`),(0,M.jsxs)(`div`,{className:`log-row gateway-row`,style:{fontFamily:`monospace`},children:[(0,M.jsxs)(`span`,{className:`log-time`,style:{color:`var(--accent)`},children:[`[`,e.timestamp,`]`]}),(0,M.jsxs)(`span`,{className:`log-msg`,style:{color:`var(--text-secondary)`,marginLeft:`8px`},children:[n,` `,e.meta?JSON.stringify(e.meta):``]})]},t)}),(0,M.jsx)(`div`,{ref:p})]})]})]}),(0,M.jsxs)(`div`,{className:`panel gateway-access`,style:{marginTop:`24px`},children:[(0,M.jsxs)(`div`,{className:`panel-header`,children:[(0,M.jsx)(`h3`,{children:`Memory Log`}),(0,M.jsx)(`p`,{children:`AI's episodic memory and extracted habits. You can delete incorrect observations.`})]}),(0,M.jsx)(`div`,{className:`form-row memory-log-container`,style:{flexDirection:`column`,gap:`10px`,maxHeight:`300px`,overflowY:`auto`,paddingRight:`8px`},children:c.length===0?(0,M.jsx)(`div`,{style:{color:`var(--accent)`,fontStyle:`italic`,padding:`10px`},children:`No episodic memories recorded yet. Start chatting to teach the AI your habits!`}):c.map(e=>(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,background:`var(--bg-sidebar)`,padding:`10px 15px`,borderRadius:`6px`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[(0,M.jsx)(`div`,{style:{color:`var(--text-primary)`,fontWeight:`500`},children:e.fact}),(0,M.jsxs)(`div`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`,marginTop:`4px`},children:[`Category: `,e.category,` | Type: `,e.rule_type,` | Confidence: `,(e.confidence*100).toFixed(0),`% | Occurrences: `,e.occurrences]})]}),(0,M.jsx)(`button`,{onClick:()=>m(e.id),style:{background:`var(--danger)`,color:`#eceff4`,border:`none`,padding:`6px 12px`,borderRadius:`4px`,cursor:`pointer`,fontSize:`0.85rem`},children:`Delete`})]},e.id))})]})]}):(0,M.jsx)(`div`,{className:`overview-container`,children:`Loading...`})},ut=({value:e,options:t,onChange:n,pillColor:r=`var(--accent)`,textColor:i=`#000000`})=>{let[a,o]=(0,g.useState)(!1),s=(0,g.useRef)(null);(0,g.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let c=t.find(t=>t.id===e)||t[0];return(0,M.jsxs)(`div`,{className:`custom-network-selector`,ref:s,style:{width:`100%`},children:[(0,M.jsxs)(`button`,{className:`network-selector-pill`,style:{background:r,color:i,padding:`10px 20px`,fontSize:`0.9rem`,width:`100%`,justifyContent:`space-between`},onClick:()=>o(!a),type:`button`,children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[c?.icon&&(0,M.jsx)(`div`,{children:c.icon}),(0,M.jsx)(`span`,{className:`network-label`,style:{fontWeight:600},children:c?.label})]}),(0,M.jsx)(O,{size:14,className:`network-chevron`})]}),a&&(0,M.jsx)(`ul`,{className:`network-dropdown-menu`,style:{width:`100%`,top:`calc(100% + 8px)`,padding:`8px`,zIndex:1e3},children:t.map(t=>(0,M.jsxs)(`li`,{className:`network-dropdown-item ${t.id===e?`active`:``}`,onClick:()=>{n(t.id),o(!1)},style:{display:`flex`,alignItems:`center`,gap:`12px`,padding:`10px 16px`,borderRadius:`8px`,cursor:`pointer`,transition:`background 0.2s`,fontWeight:500},onMouseEnter:e=>e.currentTarget.style.background=`rgba(255,255,255,0.05)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[t.icon&&(0,M.jsx)(`div`,{children:t.icon}),t.label]},t.id))})]})},dt=({provider:e,size:t=14,className:n,color:r=`currentColor`})=>{let i={width:t,height:t,viewBox:`0 0 24 24`,fill:r,className:n,xmlns:`http://www.w3.org/2000/svg`};switch(e.toLowerCase()){case`gemini`:return(0,M.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{d:`M12.031 0C12.455 7.031 17.032 11.608 24 12.032C16.969 12.456 12.392 17.033 11.968 24C11.544 17.033 6.967 12.456 0 12.032C6.967 11.608 11.544 7.031 12.031 0Z`})});case`openai`:return(0,M.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{d:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2057 5.9847 5.9847 0 0 0 3.989-2.9 6.051 6.051 0 0 0-.7388-7.0732zM13.2599 22.5A4.4776 4.4776 0 0 1 9.421 20.354l7.1557-4.133v-1.1441l4.4764-2.5847a4.5613 4.5613 0 0 1 .4583 4.4447A4.4776 4.4776 0 0 1 13.2599 22.5zm-5.0645-1.9213l-7.1534-4.1317V8.1818l2.9734 1.7169 4.18 2.4131v8.267zm2.5034-4.3298V7.9818L6.5188 5.5687a4.4776 4.4776 0 0 1 1.9566-3.3855A4.4776 4.4776 0 0 1 13.2599 1.5c1.666 0 3.2206.9189 4.0205 2.4042l-2.091 1.2064-4.4906 2.593v8.545zM3.4687 14.887a4.4776 4.4776 0 0 1-.4583-4.4447 4.5613 4.5613 0 0 1 3.5188-2.454v8.2662l4.4764 2.5847v1.144l-7.1534 4.1318-.3835-.6268zM5.5687 6.5188l4.18-2.4132V1.5a4.4776 4.4776 0 0 1 4.7838-1.0494A4.4776 4.4776 0 0 1 17.4812 5.5687l-7.1534 4.1317zM20.5313 9.113a4.4776 4.4776 0 0 1 .4583 4.4447 4.5613 4.5613 0 0 1-3.5188 2.454v-8.2662l-4.4764-2.5847v-1.144l7.1534-4.1318.3835.6268z`})});case`openrouter`:return(0,M.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{d:`M12 2L2 7l10 5 10-5-10-5zm0 7.5l-6-3v6.5l6 3 6-3V6.5l-6 3zM12 22l-10-5v-6l10 5 10-5v6z`})});case`ollama`:return(0,M.jsxs)(`svg`,{...i,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`path`,{d:`M18 10h-2V6a4 4 0 0 0-8 0v4H6a4 4 0 0 0-4 4v4h12V14h6v-2a2 2 0 0 0-2-2z`}),(0,M.jsx)(`circle`,{cx:`8`,cy:`14`,r:`1`,fill:r,stroke:`none`}),(0,M.jsx)(`circle`,{cx:`12`,cy:`14`,r:`1`,fill:r,stroke:`none`})]});case`groq`:return(0,M.jsxs)(`svg`,{...i,viewBox:`0 0 24 24`,stroke:r,fill:`none`,strokeWidth:`2.5`,strokeLinecap:`square`,children:[(0,M.jsx)(`path`,{d:`M21 12A9 9 0 1112 3a9 9 0 010 18z`}),(0,M.jsx)(`path`,{d:`M15 12h-3v3`})]});case`mistral`:return(0,M.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{d:`M3 21V3h4l5 8 5-8h4v18h-3V8l-6 9-6-9v13H3z`})});case`xai`:case`grok`:return(0,M.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{d:`M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z`})});case`deepseek`:return(0,M.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,M.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14h-2v-4H7V8h4v8zm4-2h-2v-2h2v2zm0-4h-2V8h2v2z`})});default:return(0,M.jsxs)(`svg`,{...i,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,M.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,ry:`2`}),(0,M.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`}),(0,M.jsx)(`line`,{x1:`9`,y1:`1`,x2:`9`,y2:`4`}),(0,M.jsx)(`line`,{x1:`15`,y1:`1`,x2:`15`,y2:`4`}),(0,M.jsx)(`line`,{x1:`9`,y1:`20`,x2:`9`,y2:`23`}),(0,M.jsx)(`line`,{x1:`15`,y1:`20`,x2:`15`,y2:`23`}),(0,M.jsx)(`line`,{x1:`20`,y1:`9`,x2:`23`,y2:`9`}),(0,M.jsx)(`line`,{x1:`20`,y1:`14`,x2:`23`,y2:`14`}),(0,M.jsx)(`line`,{x1:`1`,y1:`9`,x2:`4`,y2:`9`}),(0,M.jsx)(`line`,{x1:`1`,y1:`14`,x2:`4`,y2:`14`})]})}},ft=e=>`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/${{ethereum:`ethereum`,base:`base`,arbitrum:`arbitrum`,optimism:`optimism`,bsc:`smartchain`,polygon:`polygon`,sepolia:`ethereum`,base_sepolia:`base`,arbitrum_sepolia:`arbitrum`,optimism_sepolia:`optimism`}[e.toLowerCase()]||`ethereum`}/info/logo.png`,pt=e=>{switch(e.toLowerCase()){case`ethereum`:return 1;case`base`:return 8453;case`arbitrum`:return 42161;case`optimism`:return 10;case`bsc`:return 56;case`polygon`:return 137;case`sepolia`:return 11155111;case`base_sepolia`:return 84532;case`arbitrum_sepolia`:return 421614;case`optimism_sepolia`:return 11155420;default:return 1}},mt=(e,t,n)=>n?e===`polygon`?`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/polygon/info/logo.png`:e===`bsc`?`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/smartchain/info/logo.png`:`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png`:`https://logos.covalenthq.com/tokens/${pt(e)}/${t.toLowerCase()}.png`,ht=e=>{switch(e.toLowerCase()){case`1inch`:case`inch_key`:return`/routers/1inch.png`;case`0x`:case`zero_x_key`:return`/routers/0x.png`;case`kyberswap`:return`/routers/kyberswap.png`;case`openocean`:case`openocean_key`:return`/routers/openocean.png`;case`lifi`:case`lifi_key`:return`/routers/lifi.png`;case`relay`:case`relay_key`:return`/routers/relay.png`;case`cmc_key`:return`/routers/cmc.png`;case`zerion_key`:return`/routers/zerion.png`;case`auto`:return``;default:return``}},gt=({onClose:e})=>{let[t,n]=(0,g.useState)(1),[r,i]=(0,g.useState)(!1),[a,o]=(0,g.useState)(!1),[s,c]=(0,g.useState)(null);return(0,M.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(46, 52, 64, 0.85)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3,backdropFilter:`blur(4px)`},children:(0,M.jsxs)(`div`,{className:`panel`,style:{width:`600px`,maxWidth:`90%`,position:`relative`,overflow:`hidden`},children:[(0,M.jsx)(`button`,{onClick:e,style:{position:`absolute`,top:`16px`,right:`16px`,background:`none`,border:`none`,color:`var(--text-secondary)`,cursor:`pointer`},children:(0,M.jsx)(ot,{size:20})}),(0,M.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:`32px`},children:[(0,M.jsx)(`div`,{style:{width:`48px`,height:`48px`,borderRadius:`50%`,backgroundColor:`rgba(163, 190, 140, 0.1)`,display:`flex`,alignItems:`center`,justifyContent:`center`,margin:`0 auto 16px auto`,color:`#a3be8c`},children:(0,M.jsx)(Ge,{size:24})}),(0,M.jsx)(`h2`,{style:{color:`var(--text-primary)`,margin:0},children:`Google Workspace Setup`}),(0,M.jsx)(`p`,{style:{color:`var(--text-secondary)`,fontSize:`0.9rem`,marginTop:`8px`},children:`Configure Nyxora to access your personal Gmail and Google Drive locally.`})]}),(0,M.jsx)(`div`,{style:{display:`flex`,marginBottom:`24px`},children:[1,2,3].map(e=>(0,M.jsx)(`div`,{style:{flex:1,height:`4px`,margin:`0 4px`,borderRadius:`2px`,backgroundColor:e<=t?`var(--accent)`:`var(--tool-bg)`,transition:`background-color 0.3s`}},e))}),t===1&&(0,M.jsxs)(`div`,{className:`wizard-step`,children:[(0,M.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 1: Create a Google Cloud Project`}),(0,M.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:[(0,M.jsxs)(`li`,{children:[`Go to the `,(0,M.jsx)(`a`,{href:`https://console.cloud.google.com/`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`Google Cloud Console`}),`.`]}),(0,M.jsx)(`li`,{children:`Create a new project (e.g., "Nyxora Local Agent").`}),(0,M.jsxs)(`li`,{children:[`Navigate to `,(0,M.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` Library`]}),`.`]}),(0,M.jsxs)(`li`,{children:[`Search for and enable the following APIs:`,(0,M.jsxs)(`ul`,{style:{marginTop:`8px`,marginBottom:`8px`,color:`#a3be8c`},children:[(0,M.jsx)(`li`,{children:`Gmail API`}),(0,M.jsx)(`li`,{children:`Google Drive API`}),(0,M.jsx)(`li`,{children:`Google Sheets API`})]})]})]}),(0,M.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:`32px`},children:(0,M.jsx)(`button`,{className:`nord-btn-primary`,onClick:()=>n(2),children:`Next Step`})})]}),t===2&&(0,M.jsxs)(`div`,{className:`wizard-step`,children:[(0,M.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 2: Configure OAuth Consent`}),(0,M.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:[(0,M.jsxs)(`li`,{children:[`Go to `,(0,M.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` OAuth consent screen`]}),`.`]}),(0,M.jsxs)(`li`,{children:[`Choose `,(0,M.jsx)(`strong`,{children:`External`}),` User Type.`]}),(0,M.jsx)(`li`,{children:`Fill in the App Information. Use the URLs provided below for the App Domain:`})]}),(0,M.jsxs)(`div`,{style:{background:`var(--bg-secondary)`,padding:`16px`,borderRadius:`8px`,marginTop:`16px`,marginBottom:`16px`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:`8px`},children:[(0,M.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`},children:`Privacy Policy URL:`}),(0,M.jsx)(`span`,{style:{color:`var(--text-primary)`,fontFamily:`monospace`,fontSize:`0.85rem`},children:`http://localhost:3001/privacy`})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,M.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`},children:`Terms of Service URL:`}),(0,M.jsx)(`span`,{style:{color:`var(--text-primary)`,fontFamily:`monospace`,fontSize:`0.85rem`},children:`http://localhost:3001/tos`})]})]}),(0,M.jsx)(`ol`,{start:4,style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:(0,M.jsxs)(`li`,{children:[`Add your personal email to the `,(0,M.jsx)(`strong`,{children:`Test Users`}),` list so you can bypass app verification.`]})}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginTop:`32px`},children:[(0,M.jsx)(`button`,{className:`nord-btn`,style:{background:`transparent`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`},onClick:()=>n(1),children:`Back`}),(0,M.jsx)(`button`,{className:`nord-btn-primary`,onClick:()=>n(3),children:`Next Step`})]})]}),t===3&&(0,M.jsxs)(`div`,{className:`wizard-step`,children:[(0,M.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 3: Upload Credentials`}),(0,M.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`,marginBottom:`24px`},children:[(0,M.jsxs)(`li`,{children:[`Go to `,(0,M.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` Credentials`]}),`.`]}),(0,M.jsxs)(`li`,{children:[`Click `,(0,M.jsxs)(`strong`,{children:[`Create Credentials `,`>`,` OAuth client ID`]}),`.`]}),(0,M.jsxs)(`li`,{children:[`Choose `,(0,M.jsx)(`strong`,{children:`Web application`}),` as the application type.`]}),(0,M.jsxs)(`li`,{children:[`Under `,(0,M.jsx)(`strong`,{children:`Authorized redirect URIs`}),`, add: `,(0,M.jsx)(`code`,{style:{color:`var(--accent)`,padding:`2px 4px`,background:`var(--bg-sidebar)`,borderRadius:`4px`},children:`http://localhost:3000/api/auth/google/callback`})]}),(0,M.jsx)(`li`,{children:`Click Download JSON and upload the file here:`})]}),a?(0,M.jsxs)(`div`,{style:{textAlign:`center`,padding:`32px`,border:`1px dashed #a3be8c`,borderRadius:`8px`,backgroundColor:`rgba(163, 190, 140, 0.05)`},children:[(0,M.jsx)(k,{size:32,color:`#a3be8c`,style:{marginBottom:`16px`}}),(0,M.jsx)(`h4`,{style:{color:`#a3be8c`,margin:0},children:`Credentials Saved!`}),(0,M.jsx)(`p`,{style:{color:`var(--text-secondary)`,fontSize:`0.9rem`,marginTop:`8px`},children:`You can now use Google Workspace skills.`})]}):(0,M.jsxs)(`div`,{style:{position:`relative`},children:[(0,M.jsx)(`input`,{type:`file`,accept:`.json`,onChange:async t=>{let n=t.target.files?.[0];if(n){i(!0),c(null);try{let t=await n.text(),r=JSON.parse(t);if(!r.web&&!r.installed)throw Error(`Invalid credentials format. Expected "web" or "installed" key.`);if(!(await b(`/api/upload-google-credentials`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({credentials:r})})).ok)throw Error(`Failed to upload credentials to server.`);o(!0),setTimeout(()=>{e()},2e3)}catch(e){c(e.message||`Failed to parse JSON file.`)}finally{i(!1)}}},disabled:r,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,opacity:0,cursor:`pointer`}}),(0,M.jsxs)(`div`,{style:{textAlign:`center`,padding:`32px`,border:`1px dashed var(--glass-border)`,borderRadius:`8px`,backgroundColor:`rgba(46, 52, 64, 0.5)`,transition:`border-color 0.3s`},children:[(0,M.jsx)(et,{size:24,color:`var(--text-secondary)`,style:{marginBottom:`16px`}}),(0,M.jsx)(`h4`,{style:{color:`var(--text-primary)`,margin:0},children:r?`Uploading...`:`Click or Drag JSON File`}),(0,M.jsxs)(`p`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`,marginTop:`8px`},children:[`Requires `,(0,M.jsx)(`code`,{children:`client_id`}),` and `,(0,M.jsx)(`code`,{children:`client_secret`})]})]})]}),s&&(0,M.jsx)(`div`,{style:{color:`#bf616a`,fontSize:`0.85rem`,marginTop:`16px`,textAlign:`center`},children:s}),(0,M.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginTop:`32px`},children:(0,M.jsx)(`button`,{className:`nord-btn`,style:{background:`transparent`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`},onClick:()=>n(2),children:`Back`})})]})]})})},_t=({id:e})=>(0,M.jsx)(`div`,{style:{width:`14px`,height:`14px`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,M.jsx)(`img`,{src:ft(e),alt:e,style:{width:`14px`,height:`14px`,objectFit:`cover`,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}})}),vt=({config:e,onConfigChange:t,autoLockTime:n,setAutoLockTime:r})=>{let[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)({risk_level:`Moderate`,max_slippage:1,avoid_memecoins:!1}),[c,l]=(0,g.useState)({max_usd_per_tx:999999999,whitelist_only:!1,require_approval:!0,custom_llm_rules:[]}),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(!1);if((0,g.useEffect)(()=>{b(`/api/profile`).then(e=>e.json()).then(e=>{e&&!e.error&&s({risk_level:e.risk_level||`Moderate`,max_slippage:e.max_slippage||1,avoid_memecoins:!!e.avoid_memecoins})}).catch(e=>console.error(`Failed to load profile`,e)),b(`/api/policy`).then(e=>e.json()).then(e=>{e&&!e.error&&l({max_usd_per_tx:e.max_usd_per_tx??999999999,whitelist_only:e.whitelist_only??!1,require_approval:e.require_approval??!0,custom_llm_rules:e.custom_llm_rules||[]})}).catch(e=>console.error(`Failed to load policy`,e)),e&&a({agent:{name:e.agent?.name||`Nyxora`,default_chain:e.agent?.default_chain||`base`,default_slippage:e.agent?.default_slippage||.5},llm:{provider:e.llm?.provider||`openai`,model:e.llm?.model||`gpt-4`,temperature:e.llm?.temperature||.7},web3:{rpc_urls:e.web3?.rpc_urls||{},explorer_api_key:e.web3?.explorer_api_key||``}})},[e]),!i)return(0,M.jsx)(`div`,{className:`overview-container`,children:`Loading settings...`});let m=(e,t,n)=>{a(r=>r&&{...r,[e]:{...r[e],[t]:t===`temperature`?Number(n):n}})};return(0,M.jsxs)(`div`,{className:`overview-container`,children:[(0,M.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`32px`},children:[(0,M.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`Configuration`}),(0,M.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`Modify the core behaviors and parameters of the Nyxora Agent.`})]}),(0,M.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(tt,{size:18,color:`var(--text-secondary)`}),(0,M.jsx)(`h3`,{children:`Agent Profile`})]}),(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Agent Name`}),(0,M.jsx)(`input`,{className:`nord-pill-input`,type:`text`,value:i.agent.name,onChange:e=>m(`agent`,`name`,e.target.value)})]}),(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Default Web3 Chain`}),(0,M.jsx)(ut,{value:i.agent.default_chain,onChange:e=>m(`agent`,`default_chain`,e),pillColor:`var(--accent)`,textColor:`#000000`,options:[{id:`ethereum`,label:`Ethereum Mainnet`,icon:(0,M.jsx)(_t,{id:`ethereum`})},{id:`bsc`,label:`BNB Chain`,icon:(0,M.jsx)(_t,{id:`bsc`})},{id:`base`,label:`Base`,icon:(0,M.jsx)(_t,{id:`base`})},{id:`arbitrum`,label:`Arbitrum One`,icon:(0,M.jsx)(_t,{id:`arbitrum`})},{id:`optimism`,label:`OP Mainnet`,icon:(0,M.jsx)(_t,{id:`optimism`})},{id:`polygon`,label:`Polygon (Matic)`,icon:(0,M.jsx)(_t,{id:`polygon`})},{id:`sepolia`,label:`Sepolia Testnet`,icon:(0,M.jsx)(_t,{id:`sepolia`})},{id:`base_sepolia`,label:`Base Sepolia Testnet`,icon:(0,M.jsx)(_t,{id:`base_sepolia`})},{id:`arbitrum_sepolia`,label:`Arbitrum Sepolia`,icon:(0,M.jsx)(_t,{id:`arbitrum_sepolia`})},{id:`optimism_sepolia`,label:`OP Sepolia`,icon:(0,M.jsx)(_t,{id:`optimism_sepolia`})}]})]})]}),(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Default Slippage (%)`}),(0,M.jsx)(`input`,{className:`nord-pill-input`,type:`text`,placeholder:`e.g. 0.5 or auto`,value:i.agent.default_slippage??`auto`,onChange:e=>{let t=e.target.value;t.toLowerCase()===`auto`||t===``?m(`agent`,`default_slippage`,`auto`):m(`agent`,`default_slippage`,t)},onBlur:e=>{let t=String(e.target.value);if(t.toLowerCase()!==`auto`){let e=parseFloat(t);m(`agent`,`default_slippage`,isNaN(e)?`auto`:e)}}})]}),(0,M.jsx)(`div`,{className:`form-group flex-1`})]})]}),(0,M.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`32px`},children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(ue,{size:18,color:`var(--text-secondary)`}),(0,M.jsx)(`h3`,{children:`LLM Engine`})]}),(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Provider`}),(0,M.jsx)(ut,{value:i.llm.provider,onChange:e=>m(`llm`,`provider`,e),pillColor:`var(--text-secondary)`,textColor:`#000000`,options:[{id:`gemini`,label:`Google Gemini`,icon:(0,M.jsx)(dt,{provider:`gemini`,size:14})},{id:`openai`,label:`OpenAI`,icon:(0,M.jsx)(dt,{provider:`openai`,size:14})},{id:`openrouter`,label:`OpenRouter`,icon:(0,M.jsx)(dt,{provider:`openrouter`,size:14})},{id:`ollama`,label:`Ollama (Local)`,icon:(0,M.jsx)(dt,{provider:`ollama`,size:14})},{id:`groq`,label:`Groq`,icon:(0,M.jsx)(dt,{provider:`groq`,size:14})},{id:`mistral`,label:`Mistral AI`,icon:(0,M.jsx)(dt,{provider:`mistral`,size:14})},{id:`xai`,label:`xAI (Grok)`,icon:(0,M.jsx)(dt,{provider:`xai`,size:14})},{id:`deepseek`,label:`DeepSeek`,icon:(0,M.jsx)(dt,{provider:`deepseek`,size:14})}]})]}),(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Model Name`}),(0,M.jsx)(`input`,{className:`nord-pill-input`,style:{color:`var(--text-secondary)`},type:`text`,value:i.llm.model,onChange:e=>m(`llm`,`model`,e.target.value)})]}),(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsxs)(`label`,{className:`nord-label`,children:[`Temperature (`,i.llm.temperature,`)`]}),(0,M.jsx)(`input`,{className:`nord-slider`,type:`range`,min:`0`,max:`1`,step:`0.1`,value:i.llm.temperature,onChange:e=>m(`llm`,`temperature`,e.target.value)})]})]})]}),(0,M.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`40px`},children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(Ge,{size:18,color:`var(--danger)`}),(0,M.jsx)(`h3`,{children:`Personalized Risk Profile`})]}),(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Risk Tolerance Level`}),(0,M.jsx)(ut,{value:o.risk_level,onChange:e=>s({...o,risk_level:e}),pillColor:`var(--danger)`,textColor:`var(--text-primary)`,options:[{id:`Conservative`,label:`Conservative (Safe)`},{id:`Moderate`,label:`Moderate`},{id:`Aggressive`,label:`Aggressive (Degen)`}]})]}),(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Max Allowed Slippage (%)`}),(0,M.jsx)(`input`,{className:`nord-pill-input`,type:`number`,step:`0.1`,value:o.max_slippage,onChange:e=>s({...o,max_slippage:parseFloat(e.target.value)||1})})]})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`,marginTop:`15px`,marginBottom:`5px`},children:[(0,M.jsx)(`input`,{type:`checkbox`,id:`avoid_memecoins`,checked:o.avoid_memecoins,onChange:e=>s({...o,avoid_memecoins:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--danger)`,width:`16px`,height:`16px`,margin:0,flexShrink:0}}),(0,M.jsx)(`label`,{htmlFor:`avoid_memecoins`,className:`nord-label`,style:{margin:0,cursor:`pointer`,textTransform:`none`,fontSize:`0.85rem`},children:`Strictly Avoid Memecoins / Unknown Contracts`})]})]}),(0,M.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`40px`},children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(Ge,{size:18,color:`var(--accent)`}),(0,M.jsx)(`h3`,{children:`Policy Engine (Hard-coded Firewall)`})]}),(0,M.jsx)(`p`,{style:{fontSize:`0.85rem`,color:`var(--text-secondary)`,marginBottom:`20px`},children:`Critical limits enforced at the signer level. The LLM cannot override these boundaries.`}),(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Max USD per Transaction`}),(0,M.jsx)(`input`,{className:`nord-pill-input`,type:`number`,step:`1`,value:c.max_usd_per_tx,onChange:e=>l({...c,max_usd_per_tx:parseFloat(e.target.value)||0})})]}),(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,style:{marginBottom:`12px`,display:`block`},children:`Approval & Restrictions`}),(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,M.jsx)(`input`,{type:`checkbox`,id:`require_approval`,checked:c.require_approval,onChange:e=>l({...c,require_approval:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--accent)`,width:`16px`,height:`16px`,margin:0}}),(0,M.jsx)(`label`,{htmlFor:`require_approval`,className:`nord-label`,style:{margin:0,cursor:`pointer`,textTransform:`none`,fontSize:`0.85rem`},children:`Require Manual Approval for every transaction`})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,M.jsx)(`input`,{type:`checkbox`,id:`whitelist_only`,checked:c.whitelist_only,onChange:e=>l({...c,whitelist_only:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--accent)`,width:`16px`,height:`16px`,margin:0}}),(0,M.jsx)(`label`,{htmlFor:`whitelist_only`,className:`nord-label`,style:{margin:0,cursor:`pointer`,textTransform:`none`,fontSize:`0.85rem`},children:`Strict Whitelist Only (Block unknown addresses)`})]})]})]})]}),(0,M.jsxs)(`div`,{className:`form-group`,style:{marginTop:`15px`},children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Custom LLM Rules (Natural Language)`}),(0,M.jsx)(`textarea`,{className:`nord-input`,rows:3,style:{width:`100%`,resize:`vertical`},placeholder:`e.g. Never buy a token if liquidity is below $10,000
|
|
9
|
+
Do not touch drive E`,value:c.custom_llm_rules.join(`
|
|
10
|
+
`),onChange:e=>l({...c,custom_llm_rules:e.target.value.split(`
|
|
11
|
+
`)})})]})]}),(0,M.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`40px`},children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(Ge,{size:18,color:`var(--accent)`}),(0,M.jsx)(`h3`,{children:`Security & Privacy`})]}),(0,M.jsxs)(`div`,{className:`form-row`,children:[(0,M.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Auto-Lock Session (Idle Timeout)`}),(0,M.jsx)(ut,{value:n.toString(),onChange:e=>r(parseInt(e)),pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`0`,label:`Off`},{id:`15`,label:`15 Minutes`},{id:`30`,label:`30 Minutes`},{id:`60`,label:`1 Hour`}]})]}),(0,M.jsx)(`div`,{className:`form-group flex-1`})]})]}),(0,M.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`40px`},children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(xe,{size:18,color:`var(--success)`}),(0,M.jsx)(`h3`,{children:`Integrations`})]}),(0,M.jsx)(`p`,{style:{fontSize:`0.85rem`,color:`var(--text-secondary)`,marginBottom:`20px`},children:`Connect Nyxora to external services to expand its capabilities.`}),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`rgba(163, 190, 140, 0.05)`,padding:`16px`,borderRadius:`8px`,border:`1px solid rgba(163, 190, 140, 0.2)`},children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h4`,{style:{color:`var(--text-primary)`,margin:`0 0 4px 0`},children:`Google Workspace`}),(0,M.jsx)(`p`,{style:{margin:0,fontSize:`0.85rem`,color:`var(--text-secondary)`},children:`Allow Nyxora to securely read emails and write to Google Drive locally.`})]}),(0,M.jsx)(`button`,{className:`nord-btn-primary`,style:{background:`var(--success)`,color:`var(--bg-secondary)`,fontWeight:600},onClick:()=>p(!0),children:`Setup OAuth`})]})]}),(0,M.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`40px`},children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(Ae,{size:18,color:`var(--text-secondary)`}),(0,M.jsx)(`h3`,{children:`Web3 Explorer Settings`})]}),(0,M.jsxs)(`p`,{style:{fontSize:`0.85rem`,color:`var(--text-secondary)`,marginBottom:`20px`},children:[`Configure blockchain explorer API keys to enable agent verification of smart contracts.`,(0,M.jsx)(`br`,{}),(0,M.jsx)(`span`,{style:{color:`var(--accent)`,fontWeight:`bold`},children:`Note: RPC Endpoint configurations have been moved to the dedicated "RPC Configuration" tab in the sidebar.`})]}),(0,M.jsxs)(`div`,{style:{marginBottom:`24px`},className:`form-group`,children:[(0,M.jsx)(`label`,{className:`nord-label`,children:`Etherscan API V2 Key (Unified - All Networks)`}),(0,M.jsx)(`input`,{className:`nord-input`,type:`password`,placeholder:`Leaves empty to use free public endpoints`,value:i.web3?.explorer_api_key||``,onChange:e=>m(`web3`,`explorer_api_key`,e.target.value)})]})]}),(0,M.jsx)(`div`,{className:`form-actions`,style:{justifyContent:`flex-end`,marginTop:`48px`,paddingTop:`24px`,borderTop:`1px solid rgba(216, 222, 233, 0.05)`},children:(0,M.jsxs)(`button`,{className:`nord-btn-primary`,onClick:async()=>{d(!0);try{let e=await b(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)});o&&await b(`/api/profile`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(o)}),c&&await b(`/api/policy`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(c)}),e.ok&&(t(i),alert(`Settings saved successfully!`))}catch(e){console.error(e),alert(`Failed to save settings`)}finally{d(!1)}},disabled:u,children:[(0,M.jsx)(Re,{size:16,style:{marginRight:`8px`}}),u?`Saving...`:`Save Configuration`]})}),f&&(0,M.jsx)(gt,{onClose:()=>p(!1)})]})},yt=e=>e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),bt=(e,t)=>{let n=t===!1?`var(--tool-bg)`:`var(--accent)`;switch(yt(e).toLowerCase()){case`get balance`:return(0,M.jsx)(it,{size:20,color:n});case`transfer token`:return(0,M.jsx)(Ve,{size:20,color:n});case`get price`:return(0,M.jsx)(st,{size:20,color:n});case`swap token`:return(0,M.jsx)(ne,{size:20,color:n});case`bridge token`:return(0,M.jsx)(Le,{size:20,color:n});case`mint nft`:return(0,M.jsx)(ye,{size:20,color:n});case`custom tx`:return(0,M.jsx)(Je,{size:20,color:n});case`check address`:return(0,M.jsx)(Be,{size:20,color:n});case`get my address`:return(0,M.jsx)(tt,{size:20,color:n});case`check token security`:return(0,M.jsx)(Ge,{size:20,color:n});case`check portfolio`:return(0,M.jsx)(oe,{size:20,color:n});case`analyze market`:return(0,M.jsx)(ae,{size:20,color:n});case`create wallet`:return(0,M.jsx)(rt,{size:20,color:n});case`supply aave`:return(0,M.jsx)(Se,{size:20,color:n});case`revoke approval`:return(0,M.jsx)(we,{size:20,color:n});case`deposit yield vault`:return(0,M.jsx)(nt,{size:20,color:n});case`provide liquidity v3`:return(0,M.jsx)(de,{size:20,color:n});case`create limit order`:return(0,M.jsx)(qe,{size:20,color:n});default:return(0,M.jsx)(A,{size:20,color:n})}},xt=()=>{let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(!0);(0,g.useEffect)(()=>{(async()=>{try{let e=await b(`/api/skills`);e.ok&&t(await e.json())}catch(e){console.error(e)}finally{a(!1)}})()},[]);let o=async(e,n)=>{let r=!n;t(t=>t.map(t=>t.function.name===e?{...t,isActive:r}:t));try{await b(`/api/skills/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({skillName:e,active:r})})}catch(r){t(t=>t.map(t=>t.function.name===e?{...t,isActive:n}:t)),console.error(`Failed to toggle skill`,r)}};if(i)return(0,M.jsx)(`div`,{className:`overview-container`,children:`Loading skills...`});let s=e.filter(e=>e.function.name.toLowerCase().includes(n.toLowerCase())||e.function.description.toLowerCase().includes(n.toLowerCase()));return(0,M.jsxs)(`div`,{className:`overview-container`,children:[(0,M.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`24px`},children:[(0,M.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`Skills`}),(0,M.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`Installed skills and their status.`})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,background:`rgba(46, 52, 64, 0.4)`,border:`1px solid rgba(216, 222, 233, 0.1)`,borderRadius:`8px`,padding:`0 16px`,marginBottom:`24px`},children:[(0,M.jsx)(Be,{size:18,color:`#9ca3af`}),(0,M.jsx)(`input`,{type:`text`,placeholder:`Filter installed skills...`,value:n,onChange:e=>r(e.target.value),style:{background:`transparent`,border:`none`,outline:`none`,color:`var(--text-primary)`,padding:`16px`,width:`100%`,fontSize:`0.95rem`}}),(0,M.jsxs)(`span`,{style:{color:`#6b7280`,fontSize:`0.85rem`},children:[s.length,` shown`]})]}),(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:s.map((e,t)=>(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`var(--bg-sidebar)`,padding:`20px 24px`,borderRadius:`8px`,border:`1px solid rgba(216, 222, 233, 0.05)`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`16px`,flex:1},children:[(0,M.jsx)(`div`,{style:{marginTop:`2px`},children:bt(e.function.name,e.isActive!==!1)}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{style:{margin:`0 0 6px 0`,fontSize:`1rem`,color:e.isActive===!1?`var(--text-secondary)`:`var(--text-primary)`,fontWeight:600},children:yt(e.function.name)}),(0,M.jsx)(`p`,{style:{margin:0,color:`#9ca3af`,fontSize:`0.85rem`,lineHeight:`1.5`,maxWidth:`800px`},children:e.function.description})]})]}),(0,M.jsx)(`div`,{style:{marginLeft:`24px`},children:(0,M.jsx)(`button`,{onClick:()=>o(e.function.name,e.isActive!==!1),style:{position:`relative`,width:`40px`,height:`22px`,borderRadius:`11px`,background:e.isActive===!1?`var(--tool-bg)`:`var(--accent)`,border:`none`,cursor:`pointer`,transition:`background 0.3s ease`,padding:0},children:(0,M.jsx)(`div`,{style:{position:`absolute`,top:`2px`,left:e.isActive===!1?`2px`:`20px`,width:`18px`,height:`18px`,borderRadius:`50%`,background:`#fff`,transition:`left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1)`,boxShadow:`0 1px 3px rgba(0,0,0,0.3)`}})})})]},t))})]})},St=e=>{let t=e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `);return e===`run_terminal_command`&&(t+=` (UNSAFE)`),t},N=(e,t)=>{let n=t===!1?`var(--tool-bg)`:`var(--accent)`;switch(St(e).toLowerCase()){case`run terminal command (unsafe)`:return(0,M.jsx)(Je,{size:20,color:n});case`read local file`:return(0,M.jsx)(j,{size:20,color:n});case`write local file`:return(0,M.jsx)(me,{size:20,color:n});case`browse website`:return(0,M.jsx)(ve,{size:20,color:n});case`update security policy`:return(0,M.jsx)(We,{size:20,color:n});case`analyze document`:return(0,M.jsx)(he,{size:20,color:n});case`search web`:return(0,M.jsx)(Be,{size:20,color:n});case`read gmail inbox`:return(0,M.jsx)(Te,{size:20,color:n});case`list calendar events`:return(0,M.jsx)(ie,{size:20,color:n});case`append row to sheets`:return(0,M.jsx)(ge,{size:20,color:n});case`read google docs`:return(0,M.jsx)(re,{size:20,color:n});case`read google form responses`:return(0,M.jsx)(ce,{size:20,color:n});case`edit local file`:return(0,M.jsx)(ze,{size:20,color:n});case`execute git command`:return(0,M.jsx)(_e,{size:20,color:n});case`manage twitter`:return(0,M.jsx)($e,{size:20,color:n});case`manage notion`:return(0,M.jsx)(Me,{size:20,color:n});case`transcribe audio`:return(0,M.jsx)(De,{size:20,color:n});case`summarize text`:return(0,M.jsx)(te,{size:20,color:n});default:return(0,M.jsx)(A,{size:20,color:n})}},Ct=()=>{let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(!0),[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)(!1);(0,g.useEffect)(()=>{(async()=>{try{let e=await b(`/api/skills/system`);e.ok&&t(await e.json())}catch(e){console.error(e)}finally{a(!1)}})(),(async()=>{try{let e=await b(`/api/auth/google/status`);e.ok&&l((await e.json()).connected)}catch(e){console.error(`Failed to fetch Google Auth status`,e)}})()},[]);let u=async(e,t)=>{if(e===`run_terminal_command`&&!t){s({skillName:e,currentStatus:t});return}await d(e,t)},d=async(e,n)=>{let r=!n;t(t=>t.map(t=>t.function.name===e?{...t,isActive:r}:t));try{await b(`/api/skills/toggle`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({skillName:e,active:r})})}catch(r){t(t=>t.map(t=>t.function.name===e?{...t,isActive:n}:t)),console.error(`Failed to toggle OS skill`,r)}};if(i)return(0,M.jsx)(`div`,{className:`overview-container`,children:`Loading OS skills...`});let f=e.filter(e=>e.function.name.toLowerCase().includes(n.toLowerCase())||e.function.description.toLowerCase().includes(n.toLowerCase()));return(0,M.jsxs)(`div`,{className:`overview-container`,children:[(0,M.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`24px`},children:[(0,M.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`OS Skills`}),(0,M.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`System-level capabilities for the agent OS.`})]}),(0,M.jsxs)(`div`,{style:{background:`var(--bg-sidebar)`,border:`1px solid rgba(216, 222, 233, 0.1)`,borderRadius:`8px`,padding:`24px`,marginBottom:`24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{style:{margin:`0 0 8px 0`,color:`var(--text-primary)`,fontSize:`1.1rem`},children:`Account Linking`}),(0,M.jsx)(`p`,{style:{margin:0,color:`var(--text-secondary)`,fontSize:`0.9rem`},children:`Connect your Google Workspace to unlock Gmail and Calendar skills.`})]}),(0,M.jsx)(`div`,{children:c?(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,background:`rgba(163, 190, 140, 0.1)`,color:`#a3be8c`,padding:`8px 16px`,borderRadius:`6px`,fontWeight:600},children:[(0,M.jsx)(`span`,{style:{width:`8px`,height:`8px`,background:`#a3be8c`,borderRadius:`50%`,display:`inline-block`}}),`Connected to Google`]}),(0,M.jsx)(`button`,{onClick:async()=>{try{(await b(`/api/auth/google`,{method:`DELETE`})).ok&&l(!1)}catch{alert(`Failed to disconnect.`)}},style:{background:`transparent`,color:`#bf616a`,border:`1px solid rgba(191, 97, 106, 0.4)`,padding:`8px 16px`,borderRadius:`6px`,fontWeight:600,cursor:`pointer`,transition:`background 0.2s`},onMouseOver:e=>e.currentTarget.style.background=`rgba(191, 97, 106, 0.1)`,onMouseOut:e=>e.currentTarget.style.background=`transparent`,children:`Disconnect`})]}):(0,M.jsxs)(`button`,{onClick:async()=>{try{let e=await b(`/api/auth/google/url`),t=await e.json();e.ok?window.open(t.url,`_blank`,`width=600,height=700`):alert(`Setup Required: `+(t.error||`Please add google-credentials.json to ~/.nyxora/`))}catch{alert(`Failed to initiate Google Auth. Is the backend running?`)}},style:{background:`var(--text-primary)`,color:`var(--bg-secondary)`,border:`none`,padding:`10px 20px`,borderRadius:`6px`,fontWeight:600,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,M.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,M.jsx)(`path`,{d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z`,fill:`#4285F4`}),(0,M.jsx)(`path`,{d:`M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z`,fill:`#34A853`}),(0,M.jsx)(`path`,{d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z`,fill:`#FBBC05`}),(0,M.jsx)(`path`,{d:`M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z`,fill:`#EA4335`})]}),`Sign in with Google`]})})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,background:`rgba(46, 52, 64, 0.4)`,border:`1px solid rgba(216, 222, 233, 0.1)`,borderRadius:`8px`,padding:`0 16px`,marginBottom:`24px`},children:[(0,M.jsx)(Be,{size:18,color:`#9ca3af`}),(0,M.jsx)(`input`,{type:`text`,placeholder:`Filter OS skills...`,value:n,onChange:e=>r(e.target.value),style:{background:`transparent`,border:`none`,outline:`none`,color:`var(--text-primary)`,padding:`16px`,width:`100%`,fontSize:`0.95rem`}}),(0,M.jsxs)(`span`,{style:{color:`#6b7280`,fontSize:`0.85rem`},children:[f.length,` shown`]})]}),(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:f.map((e,t)=>(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,background:`var(--bg-sidebar)`,padding:`20px 24px`,borderRadius:`8px`,border:`1px solid rgba(216, 222, 233, 0.05)`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`16px`,flex:1},children:[(0,M.jsx)(`div`,{style:{marginTop:`2px`},children:N(e.function.name,e.isActive!==!1)}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{style:{margin:`0 0 6px 0`,fontSize:`1rem`,color:e.isActive===!1?`var(--text-secondary)`:`var(--text-primary)`,fontWeight:600},children:St(e.function.name)}),(0,M.jsx)(`p`,{style:{margin:0,color:`#9ca3af`,fontSize:`0.85rem`,lineHeight:`1.5`,maxWidth:`800px`},children:e.function.description})]})]}),(0,M.jsx)(`div`,{style:{marginLeft:`24px`},children:(0,M.jsx)(`button`,{onClick:()=>u(e.function.name,e.isActive!==!1),style:{position:`relative`,width:`40px`,height:`22px`,borderRadius:`11px`,background:e.isActive===!1?`var(--tool-bg)`:`var(--accent)`,border:`none`,cursor:`pointer`,transition:`background 0.3s ease`,padding:0},children:(0,M.jsx)(`div`,{style:{position:`absolute`,top:`2px`,left:e.isActive===!1?`2px`:`20px`,width:`18px`,height:`18px`,borderRadius:`50%`,background:`#fff`,transition:`left 0.3s cubic-bezier(0.4, 0.0, 0.2, 1)`,boxShadow:`0 1px 3px rgba(0,0,0,0.3)`}})})})]},t))}),o&&(0,M.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0, 0, 0, 0.6)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3},children:(0,M.jsxs)(`div`,{style:{background:`var(--bg-secondary)`,border:`1px solid rgba(191, 97, 106, 0.4)`,borderRadius:`12px`,padding:`32px`,maxWidth:`500px`,width:`100%`,boxShadow:`0 20px 40px rgba(0,0,0,0.4)`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`16px`,marginBottom:`16px`},children:[(0,M.jsx)(`div`,{style:{background:`rgba(191, 97, 106, 0.1)`,padding:`12px`,borderRadius:`50%`},children:(0,M.jsx)(Qe,{size:32,color:`#bf616a`})}),(0,M.jsx)(`h2`,{style:{margin:0,color:`var(--text-primary)`,fontSize:`1.25rem`},children:`DANGER ZONE: System Access`})]}),(0,M.jsxs)(`p`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,marginBottom:`24px`},children:[`You are about to enable `,(0,M.jsx)(`strong`,{children:`Terminal Execution`}),`. This grants the AI agent`,(0,M.jsx)(`strong`,{children:` full, unrestrained access`}),` to execute arbitrary shell scripts on your host operating system.`]}),(0,M.jsx)(`p`,{style:{color:`#bf616a`,fontWeight:`bold`,fontSize:`0.9rem`,marginBottom:`32px`},children:`⚠️ The agent could read sensitive files, modify your system, or execute harmful commands if prompted maliciously.`}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:`12px`},children:[(0,M.jsx)(`button`,{onClick:()=>s(null),style:{background:`transparent`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`,padding:`10px 20px`,borderRadius:`6px`,cursor:`pointer`,fontWeight:600},children:`Cancel`}),(0,M.jsx)(`button`,{onClick:()=>{d(o.skillName,o.currentStatus),s(null)},style:{background:`#bf616a`,border:`none`,color:`var(--text-primary)`,padding:`10px 20px`,borderRadius:`6px`,cursor:`pointer`,fontWeight:600},children:`I Understand the Risks, Enable`})]})]})})]})},wt=[{id:`cmc_key`,name:`CoinMarketCap`,desc:`Used for Global Market Analysis & Prices`},{id:`zerion_key`,name:`Zerion`,desc:`Used for Deep Portfolio & Asset Tracking`},{id:`inch_key`,name:`1inch`,desc:`Used for Mainnet Meta-Aggregator Routing`},{id:`zero_x_key`,name:`0x`,desc:`Used for MEV-Protected Swaps`},{id:`lifi_key`,name:`LI.FI`,desc:`Used for Cross-Chain Bridging`},{id:`relay_key`,name:`Relay`,desc:`Used for Testnet & Mainnet Instant Routing`},{id:`openocean_key`,name:`OpenOcean`,desc:`Used for High-Liquidity Deep Swaps`}],Tt=()=>{let[e,t]=(0,g.useState)({}),[n,r]=(0,g.useState)({}),[i,a]=(0,g.useState)(null);(0,g.useEffect)(()=>{(async()=>{try{t(await(await b(`/api/defi-keys`)).json()||{})}catch{console.error(`Failed to fetch defi keys`)}})()},[]);let o=async n=>{try{let r=e[n];if(!r||r===`IS_SET`)return;(await b(`/api/defi-keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({[n]:r})})).ok&&(a(`Saved ${n} successfully!`),t({...e,[n]:`IS_SET`}),setTimeout(()=>a(null),3e3))}catch{a(`Failed to save ${n}`)}};return(0,M.jsxs)(`div`,{className:`overview-container`,children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(be,{size:28,color:`var(--accent)`}),(0,M.jsx)(`h2`,{className:`settings-title`,style:{margin:0,color:`var(--text-primary)`},children:`DeFi Configuration`})]}),(0,M.jsxs)(`div`,{style:{background:`rgba(235, 203, 139, 0.1)`,border:`1px solid rgba(235, 203, 139, 0.3)`,padding:`16px`,borderRadius:`8px`,marginBottom:`32px`,display:`flex`,gap:`16px`,alignItems:`flex-start`},children:[(0,M.jsx)(We,{size:24,color:`#ebcb8b`,style:{flexShrink:0,marginTop:`2px`}}),(0,M.jsxs)(`div`,{style:{fontSize:`0.9rem`,color:`var(--text-secondary)`,lineHeight:1.6},children:[(0,M.jsx)(`strong`,{style:{color:`#ebcb8b`},children:`Security Notice:`}),` Your keys are encrypted locally by the Nyxora backend. To protect against browser extensions and screen-sharing, stored keys are NEVER sent back to this dashboard. They will simply appear as `,(0,M.jsx)(`code`,{style:{background:`var(--bg-secondary)`,padding:`2px 6px`,borderRadius:`4px`,color:`var(--accent)`},children:`IS_SET`}),`.`]})]}),i&&(0,M.jsxs)(`div`,{style:{background:`rgba(163, 190, 140, 0.1)`,border:`1px solid rgba(163, 190, 140, 0.3)`,color:`#a3be8c`,padding:`14px 16px`,borderRadius:`8px`,marginBottom:`24px`,display:`flex`,alignItems:`center`,gap:`12px`,fontSize:`0.9rem`},children:[(0,M.jsx)(se,{size:20}),` `,(0,M.jsx)(`strong`,{children:i})]}),(0,M.jsxs)(`div`,{className:`settings-section`,children:[(0,M.jsx)(`h3`,{className:`section-title`,style:{color:`var(--accent)`,marginBottom:`8px`,fontSize:`1.2rem`},children:`Protocol Integrations`}),(0,M.jsx)(`p`,{className:`section-description`,style:{marginBottom:`32px`,color:`var(--text-secondary)`,fontSize:`0.95rem`},children:`Provide your own API keys to bypass public rate limits and unlock full Meta-Aggregator speed.`}),(0,M.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`,gap:`16px`},children:wt.map(i=>{let a=e[i.id]===`IS_SET`;return(0,M.jsxs)(`div`,{style:{background:`var(--bg-secondary)`,padding:`20px`,borderRadius:`12px`,border:`1px solid var(--glass-border)`,display:`flex`,gap:`24px`,alignItems:`center`},children:[(0,M.jsxs)(`div`,{style:{width:`280px`,flexShrink:0,display:`flex`,gap:`12px`,alignItems:`flex-start`},children:[(0,M.jsx)(`img`,{src:ht(i.id),alt:i.id,style:{width:32,height:32,borderRadius:`50%`,marginTop:`2px`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,M.jsxs)(`div`,{style:{flex:1},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`4px`},children:[(0,M.jsx)(`strong`,{style:{color:`var(--text-primary)`,fontSize:`1rem`,display:`block`},children:i.name}),a&&(0,M.jsxs)(`span`,{style:{color:`#a3be8c`,fontSize:`0.75rem`,display:`flex`,alignItems:`center`,gap:`4px`,fontWeight:600,background:`rgba(163, 190, 140, 0.1)`,padding:`2px 8px`,borderRadius:`9999px`},children:[(0,M.jsx)(se,{size:12}),` ACTIVE`]})]}),(0,M.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.8rem`,lineHeight:1.4,display:`block`},children:i.desc})]})]}),(0,M.jsxs)(`div`,{style:{flex:1,display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,M.jsxs)(`div`,{style:{position:`relative`,flex:1},children:[(0,M.jsx)(`input`,{type:n[i.id]?`text`:`password`,className:`nord-input`,style:{paddingRight:`40px`,borderColor:a?`#a3be8c`:`var(--glass-border)`,width:`100%`},placeholder:a?`••••••••••••••••`:`Paste API Key here...`,value:e[i.id]===`IS_SET`?``:e[i.id]||``,onChange:n=>t({...e,[i.id]:n.target.value}),disabled:a&&e[i.id]===`IS_SET`}),!a&&(0,M.jsx)(`button`,{style:{position:`absolute`,right:`12px`,top:`50%`,transform:`translateY(-50%)`,background:`none`,border:`none`,color:`var(--tool-bg)`,cursor:`pointer`},onClick:()=>r({...n,[i.id]:!n[i.id]}),children:n[i.id]?(0,M.jsx)(fe,{size:18}):(0,M.jsx)(pe,{size:18})})]}),(0,M.jsxs)(`button`,{className:`nord-btn-primary`,onClick:()=>o(i.id),disabled:!e[i.id]||e[i.id]===`IS_SET`,style:{padding:`0 20px`,height:`40px`,gap:`8px`,flexShrink:0},children:[(0,M.jsx)(Re,{size:16}),` Save`]})]})]},i.id)})})]})]})},Et=({chatSessions:e,onSelectSession:t})=>{let[n,r]=(0,g.useState)(``),i=(0,g.useMemo)(()=>{if(!n.trim())return e;let t=n.toLowerCase();return e.filter(e=>e.title&&e.title.toLowerCase().includes(t))},[e,n]);return(0,M.jsxs)(`div`,{className:`search-chat-container`,children:[(0,M.jsx)(`div`,{className:`search-chat-header`,children:(0,M.jsxs)(`div`,{className:`search-input-wrapper`,children:[(0,M.jsx)(Be,{size:18,className:`search-icon`}),(0,M.jsx)(`input`,{type:`text`,className:`search-input`,placeholder:`Telusuri percakapan`,value:n,onChange:e=>r(e.target.value),autoFocus:!0})]})}),(0,M.jsx)(`div`,{className:`search-results-area`,children:i.length>0?(0,M.jsxs)(`div`,{className:`search-results-list`,children:[(0,M.jsx)(`h3`,{className:`search-results-title`,children:`Terbaru`}),i.map(e=>(0,M.jsx)(`div`,{className:`search-result-item`,onClick:()=>t(e.id),children:(0,M.jsxs)(`div`,{className:`result-title`,children:[(0,M.jsx)(Ee,{size:16,className:`result-icon`}),(0,M.jsx)(`span`,{children:e.title})]})},e.id))]}):(0,M.jsxs)(`div`,{className:`search-no-results`,children:[`Tidak ada percakapan yang cocok dengan "`,n,`"`]})})]})},Dt=[{id:`ethereum`,name:`Ethereum Mainnet`},{id:`base`,name:`Base Mainnet`},{id:`optimism`,name:`Optimism Mainnet`},{id:`arbitrum`,name:`Arbitrum One`},{id:`bsc`,name:`Binance Smart Chain`},{id:`polygon`,name:`Polygon Mainnet`},{id:`sepolia`,name:`Sepolia (Testnet)`},{id:`base_sepolia`,name:`Base Sepolia (Testnet)`},{id:`optimism_sepolia`,name:`OP Sepolia (Testnet)`},{id:`arbitrum_sepolia`,name:`Arbitrum Sepolia (Testnet)`}],Ot=()=>{let[e,t]=(0,g.useState)({}),[n,r]=(0,g.useState)(null);(0,g.useEffect)(()=>{(async()=>{try{t(await(await b(`/api/rpc`)).json()||{})}catch{console.error(`Failed to fetch rpc config`)}})()},[]);let i=async(n,i)=>{try{(await b(`/api/rpc`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({[n]:i})})).ok&&(r(`Saved RPC for ${n} successfully!`),t({...e,[n]:i}),setTimeout(()=>r(null),3e3))}catch{r(`Failed to save RPC for ${n}`)}},a=e=>e?Array.isArray(e)?e[0]||``:e:``;return(0,M.jsxs)(`div`,{className:`overview-container`,children:[(0,M.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,M.jsx)(He,{size:28,color:`var(--accent)`}),(0,M.jsx)(`h2`,{className:`settings-title`,style:{margin:0,color:`var(--text-primary)`},children:`RPC Configuration`})]}),(0,M.jsxs)(`div`,{style:{background:`rgba(235, 203, 139, 0.1)`,border:`1px solid rgba(235, 203, 139, 0.3)`,padding:`16px`,borderRadius:`8px`,marginBottom:`32px`,display:`flex`,gap:`16px`,alignItems:`flex-start`},children:[(0,M.jsx)(We,{size:24,color:`#ebcb8b`,style:{flexShrink:0,marginTop:`2px`}}),(0,M.jsxs)(`div`,{style:{fontSize:`0.9rem`,color:`var(--text-secondary)`,lineHeight:1.6},children:[(0,M.jsx)(`strong`,{style:{color:`#ebcb8b`},children:`Privacy & Security:`}),` Your RPC keys are saved in a highly isolated `,(0,M.jsx)(`code`,{style:{background:`var(--bg-secondary)`,padding:`2px 6px`,borderRadius:`4px`,color:`var(--accent)`},children:`~/.nyxora/config/rpc_key.yaml`}),` file. This guarantees that sharing your agent's config or prompts won't accidentally leak your premium node endpoints.`]})]}),n&&(0,M.jsxs)(`div`,{style:{background:`rgba(163, 190, 140, 0.1)`,border:`1px solid rgba(163, 190, 140, 0.3)`,color:`#a3be8c`,padding:`14px 16px`,borderRadius:`8px`,marginBottom:`24px`,display:`flex`,alignItems:`center`,gap:`12px`,fontSize:`0.9rem`},children:[(0,M.jsx)(se,{size:20}),` `,(0,M.jsx)(`strong`,{children:n})]}),(0,M.jsxs)(`div`,{className:`settings-section`,children:[(0,M.jsx)(`h3`,{className:`section-title`,style:{color:`var(--accent)`,marginBottom:`8px`,fontSize:`1.2rem`},children:`Network Endpoints`}),(0,M.jsx)(`p`,{className:`section-description`,style:{marginBottom:`16px`,color:`var(--text-secondary)`,fontSize:`0.95rem`},children:`Configure your private RPC URLs (Alchemy, Infura, etc.) for High-Frequency execution.`}),(0,M.jsxs)(`div`,{style:{background:`rgba(191, 97, 106, 0.1)`,color:`#bf616a`,padding:`10px 14px`,borderRadius:`6px`,marginBottom:`32px`,display:`inline-flex`,alignItems:`center`,gap:`8px`,fontSize:`0.85rem`},children:[(0,M.jsx)(Qe,{size:16}),` Leaving a field empty will trigger the Agent's automatic `,(0,M.jsx)(`strong`,{children:`Public Fallback Mechanism`}),`.`]}),(0,M.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`,gap:`16px`},children:Dt.map(n=>{let r=a(e[n.id]);return(0,M.jsxs)(`div`,{style:{background:`var(--bg-secondary)`,padding:`20px`,borderRadius:`12px`,border:`1px solid var(--glass-border)`,display:`flex`,gap:`24px`,alignItems:`center`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,alignItems:`center`,width:`240px`,flexShrink:0},children:[(0,M.jsx)(`img`,{src:ft(n.id),alt:n.id,style:{width:32,height:32,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{style:{color:`var(--text-primary)`,fontSize:`1rem`,display:`block`},children:n.name}),(0,M.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.8rem`,fontFamily:`monospace`},children:n.id})]})]}),(0,M.jsxs)(`div`,{style:{flex:1,display:`flex`,gap:`12px`},children:[(0,M.jsx)(`input`,{type:`password`,className:`nord-input`,style:{flex:1},placeholder:`e.g. https://base-mainnet.g.alchemy.com/v2/...`,value:r,onChange:r=>t({...e,[n.id]:r.target.value})}),(0,M.jsxs)(`button`,{className:`nord-btn-primary`,onClick:()=>i(n.id,r),style:{padding:`0 20px`,height:`40px`,gap:`8px`},children:[(0,M.jsx)(Re,{size:16}),` Save`]})]})]},n.id)})})]})]})};function kt(e,t){let n=e.toString(),r=n.startsWith(`-`);r&&(n=n.slice(1)),n=n.padStart(t,`0`);let[i,a]=[n.slice(0,n.length-t),n.slice(n.length-t)];return a=a.replace(/(0+)$/,``),`${r?`-`:``}${i||`0`}${a?`.${a}`:``}`}var At=[{id:`ethereum`,label:`Ethereum`},{id:`bsc`,label:`BNB Smart Chain`},{id:`base`,label:`Base`},{id:`arbitrum`,label:`Arbitrum One`},{id:`optimism`,label:`OP Mainnet`},{id:`polygon`,label:`Polygon (Matic)`},{id:`sepolia`,label:`Sepolia (Testnet)`},{id:`base_sepolia`,label:`Base Sepolia (Testnet)`},{id:`arbitrum_sepolia`,label:`Arbitrum Sepolia`},{id:`optimism_sepolia`,label:`OP Sepolia`}],jt=({value:e,onChange:t,showAllOption:n})=>{let[r,i]=(0,g.useState)(!1),a=(0,g.useRef)(null);(0,g.useEffect)(()=>{let e=e=>{a.current&&!a.current.contains(e.target)&&i(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let o=n?[{id:`all`,label:`All Chains`},...At]:At,s=o.find(t=>t.id===e)||o[0];return(0,M.jsxs)(`div`,{className:`custom-network-selector`,ref:a,children:[(0,M.jsxs)(`button`,{className:`network-selector-pill`,onClick:()=>i(!r),"aria-expanded":r,children:[(0,M.jsx)(`div`,{style:{width:`16px`,height:`16px`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:s.id===`all`?(0,M.jsx)(Ae,{size:16}):(0,M.jsx)(`img`,{src:ft(s.id),alt:s.id,style:{width:`16px`,height:`16px`,objectFit:`cover`,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}})}),(0,M.jsx)(`span`,{className:`network-label`,children:s.label}),(0,M.jsx)(O,{size:14,className:`network-chevron`})]}),r&&(0,M.jsx)(`ul`,{className:`network-dropdown-menu`,children:o.map(n=>(0,M.jsxs)(`li`,{className:`network-dropdown-item ${n.id===e?`active`:``}`,onClick:()=>{t(n.id),i(!1)},style:{display:`flex`,alignItems:`center`},children:[(0,M.jsx)(`div`,{style:{width:`14px`,height:`14px`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginRight:`8px`,flexShrink:0},children:n.id===`all`?(0,M.jsx)(Ae,{size:14}):(0,M.jsx)(`img`,{src:ft(n.id),alt:n.id,style:{width:`14px`,height:`14px`,objectFit:`cover`,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}})}),n.label]},n.id))})]})},Mt=()=>{let[e,t]=(0,g.useState)(null),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(`all`),[o,s]=(0,g.useState)(!0),[c,l]=(0,g.useState)(``),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)([]),[m,h]=(0,g.useState)(!1),[_,v]=(0,g.useState)(``),[y,x]=(0,g.useState)(`ethereum`),[S,C]=(0,g.useState)(``),[w,T]=(0,g.useState)(``),[ee,te]=(0,g.useState)(!1),[E,ne]=(0,g.useState)(!1),re=async()=>{s(!0),l(``);try{let[e,n,i]=await Promise.all([b(`/api/portfolio`),b(`/api/wallet`),b(`/api/portfolio/whitelist`)]);e.ok?t(await e.json()):l(`Failed to fetch portfolio data from gateway.`);let a=``;if(n.ok&&(a=(await n.json()).address,r(a)),i.ok&&a){let e=await i.json();e[a.toLowerCase()]&&p(e[a.toLowerCase()])}}catch(e){l(e.message)}finally{s(!1)}};(0,g.useEffect)(()=>{re()},[]);let ie=async e=>{let t=e.target.value;if(v(t),C(``),T(``),t.startsWith(`0x`)&&t.length===42){te(!0);try{let e=await b(`/api/portfolio/token-metadata?chain=${y}&address=${t}`);if(e.ok){let t=await e.json();C(t.symbol),T(t.decimals.toString())}}catch(e){console.error(`Failed to fetch metadata`,e)}finally{te(!1)}}},ae=async()=>{if(!(!_||!S)){ne(!0);try{await b(`/api/portfolio/whitelist`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({walletAddress:n,chainName:y,tokenAddress:_,symbol:S,decimals:parseInt(w)||18})}),h(!1),v(``),C(``),T(``),re()}catch(e){console.error(e)}finally{ne(!1)}}},oe=async(e,t)=>{try{await b(`/api/portfolio/whitelist`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify({walletAddress:n,chainName:e,tokenAddress:t})}),re()}catch(e){console.error(e)}},O=e=>({ethereum:`#627EEA`,base:`#0052FF`,arbitrum:`#28A0F0`,optimism:`#FF0420`,bsc:`#F0B90B`,polygon:`#8247E5`})[e.toLowerCase()]||`var(--accent)`,k=(e,t)=>{t===-1&&(t=18);try{return parseFloat(kt(BigInt(e),t))}catch{return 0}},se=(e,t)=>k(e,t).toLocaleString(void 0,{maximumFractionDigits:4}),ce=()=>{n&&(navigator.clipboard.writeText(n),d(!0),setTimeout(()=>d(!1),2e3))},A=(0,g.useMemo)(()=>{if(!e)return[];let t=[];return Object.entries(e).forEach(([e,n])=>{n.forEach(n=>{t.push({...n,chain:e})})}),i!==`all`&&(t=t.filter(e=>e.chain.toLowerCase()===i.toLowerCase())),t.sort((e,t)=>{let n=(e.priceUsd||0)*k(e.balanceRaw,e.decimals);return(t.priceUsd||0)*k(t.balanceRaw,t.decimals)-n}),t},[e,i]),{totalUsd:ue,totalChange:de}=(0,g.useMemo)(()=>{let e=0,t=0;return A.forEach(n=>{let r=(n.priceUsd||0)*k(n.balanceRaw,n.decimals);e+=r,t+=r*(n.priceChange24h||0)}),{totalUsd:e,totalChange:e>0?t/e:0}},[A]);return(0,M.jsxs)(`div`,{className:`overview-container`,style:{paddingBottom:`40px`},children:[(0,M.jsxs)(`div`,{className:`overview-header`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:`32px`,flexWrap:`wrap`,gap:`24px`},children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`h1`,{style:{display:`flex`,alignItems:`center`,gap:`10px`,marginBottom:`8px`},children:[(0,M.jsx)(it,{color:`var(--accent)`}),` Portfolio Scanner`]}),n&&(0,M.jsxs)(`div`,{onClick:ce,style:{color:`var(--text-secondary)`,display:`inline-flex`,alignItems:`center`,gap:`8px`,background:`rgba(76, 86, 106, 0.5)`,padding:`4px 12px`,borderRadius:`12px`,cursor:`pointer`,fontSize:`0.85rem`,fontFamily:`monospace`,transition:`all 0.2s`},onMouseEnter:e=>e.currentTarget.style.background=`rgba(76, 86, 106, 0.2)`,onMouseLeave:e=>e.currentTarget.style.background=`rgba(76, 86, 106, 0.1)`,children:[n.substring(0,6),`...`,n.substring(38),u?(0,M.jsx)(D,{size:14,color:`#A3BE8C`}):(0,M.jsx)(le,{size:14})]}),(0,M.jsxs)(`div`,{style:{fontSize:`2.5rem`,fontWeight:`bold`,color:`var(--text-primary)`,marginTop:`24px`,display:`flex`,alignItems:`baseline`,gap:`12px`},children:[`$ `,ue.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),(0,M.jsxs)(`span`,{style:{fontSize:`1rem`,color:de>=0?`#A3BE8C`:`#BF616A`,fontWeight:`500`},children:[de>=0?`+`:``,de.toFixed(2),`%`]})]})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,M.jsxs)(`button`,{onClick:()=>h(!0),style:{background:`transparent`,color:`var(--text-primary)`,border:`1px solid var(--glass-border)`,padding:`10px 16px`,borderRadius:`8px`,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`8px`,fontWeight:`bold`,transition:`all 0.2s`},onMouseEnter:e=>e.currentTarget.style.background=`var(--bg-sidebar)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,M.jsx)(Fe,{size:16}),` Add Custom Crypto`]}),(0,M.jsx)(jt,{value:i,onChange:e=>a(e),showAllOption:!0}),(0,M.jsxs)(`button`,{onClick:re,disabled:o,style:{background:`var(--accent)`,color:`var(--bg-secondary)`,border:`none`,padding:`10px 16px`,borderRadius:`8px`,cursor:o?`not-allowed`:`pointer`,display:`flex`,alignItems:`center`,gap:`8px`,fontWeight:`bold`,transition:`all 0.2s`},onMouseEnter:e=>!o&&(e.currentTarget.style.background=`#8FBCBB`),onMouseLeave:e=>!o&&(e.currentTarget.style.background=`var(--accent)`),children:[(0,M.jsx)(Le,{size:16,className:o?`spin`:``}),` `,o?`Scanning...`:`Refresh`]})]})]}),c&&(0,M.jsxs)(`div`,{style:{background:`rgba(191, 97, 106, 0.1)`,border:`1px solid #BF616A`,padding:`16px`,borderRadius:`8px`,color:`#BF616A`,display:`flex`,alignItems:`center`,gap:`8px`,marginBottom:`24px`},children:[(0,M.jsx)(Qe,{size:20}),` `,c]}),!e&&o&&(0,M.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px`,color:`var(--accent)`},children:[(0,M.jsx)(`div`,{className:`dot`,style:{background:`var(--accent)`,animation:`pulse 1s infinite`,display:`inline-block`,width:`12px`,height:`12px`,borderRadius:`50%`,marginRight:`8px`}}),`Scanning blockchains...`]}),e&&A.length>0&&(0,M.jsxs)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`12px`,border:`1px solid var(--glass-border)`,overflow:`hidden`,boxShadow:`0 8px 16px rgba(0,0,0,0.1)`,marginBottom:`32px`},children:[(0,M.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`2fr 1fr 1fr 1fr`,gap:`16px`,padding:`16px 24px`,background:`var(--bg-sidebar)`,borderBottom:`1px solid var(--glass-border)`,color:`var(--text-secondary)`,fontWeight:`600`,fontSize:`0.85rem`,letterSpacing:`1px`},children:[(0,M.jsx)(`div`,{children:`TOKEN`}),(0,M.jsx)(`div`,{style:{textAlign:`right`},children:`PRICE`}),(0,M.jsx)(`div`,{style:{textAlign:`right`},children:`AMOUNT`}),(0,M.jsx)(`div`,{style:{textAlign:`right`},children:`USD VALUE`})]}),(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`},children:A.map((e,t)=>{let n=(e.priceUsd||0)*k(e.balanceRaw,e.decimals);return(0,M.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`2fr 1fr 1fr 1fr`,gap:`16px`,padding:`16px 24px`,borderBottom:t===A.length-1?`none`:`1px solid var(--glass-border)`,alignItems:`center`,transition:`background 0.2s`},onMouseEnter:e=>e.currentTarget.style.background=`rgba(59, 66, 82, 0.5)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,M.jsxs)(`div`,{style:{position:`relative`,width:`40px`,height:`40px`},children:[(0,M.jsxs)(`div`,{style:{width:`100%`,height:`100%`,borderRadius:`50%`,background:e.isNative?`rgba(136, 192, 208, 0.1)`:`rgba(163, 190, 140, 0.1)`,color:e.isNative?`var(--accent)`:`#A3BE8C`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:`bold`,fontSize:`0.9rem`,overflow:`hidden`},children:[(0,M.jsx)(`span`,{style:{position:`absolute`,zIndex:1},children:e.symbol.substring(0,3)}),(0,M.jsx)(`img`,{src:mt(e.chain,e.address,e.isNative),alt:e.symbol,style:{width:`100%`,height:`100%`,objectFit:`cover`,position:`relative`,zIndex:2,background:`var(--bg-secondary)`},onError:e=>{e.currentTarget.style.display=`none`}})]}),(0,M.jsx)(`div`,{style:{position:`absolute`,bottom:`-2px`,right:`-2px`,width:`18px`,height:`18px`,borderRadius:`50%`,background:`var(--bg-secondary)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:3,padding:`2px`},children:(0,M.jsx)(`div`,{style:{width:`100%`,height:`100%`,borderRadius:`50%`,background:O(e.chain),overflow:`hidden`},children:(0,M.jsx)(`img`,{src:ft(e.chain),alt:e.chain,style:{width:`100%`,height:`100%`,objectFit:`cover`},onError:e=>{e.currentTarget.style.display=`none`}})})})]}),(0,M.jsx)(`span`,{style:{color:`var(--text-primary)`,fontWeight:`600`,fontSize:`1.1rem`},children:e.symbol})]}),(0,M.jsx)(`div`,{style:{textAlign:`right`,color:`var(--text-secondary)`,fontWeight:`500`},children:e.priceUsd?`$${e.priceUsd.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:6})}`:`-`}),(0,M.jsxs)(`div`,{style:{textAlign:`right`,color:`var(--text-primary)`,fontWeight:`600`},children:[se(e.balanceRaw,e.decimals),` `,(0,M.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`var(--text-secondary)`,fontWeight:`normal`},children:e.symbol})]}),(0,M.jsx)(`div`,{style:{textAlign:`right`,color:`#A3BE8C`,fontWeight:`600`,fontSize:`1.1rem`},children:n>0?`$${n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:`$0.00`})]},`${e.chain}-${e.address}-${t}`)})})]}),f.length>0&&(0,M.jsxs)(`div`,{style:{marginTop:`24px`},children:[(0,M.jsx)(`h2`,{style:{color:`var(--text-primary)`,fontSize:`1.2rem`,marginBottom:`16px`},children:`Whitelisted Tokens`}),(0,M.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`12px`,border:`1px solid var(--glass-border)`,overflow:`hidden`},children:f.map((e,t)=>(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,borderBottom:t===f.length-1?`none`:`1px solid var(--glass-border)`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`16px`},children:[(0,M.jsx)(`div`,{style:{width:`24px`,height:`24px`,borderRadius:`50%`,background:O(e.chainName),overflow:`hidden`},children:(0,M.jsx)(`img`,{src:ft(e.chainName),style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{style:{color:`var(--text-primary)`,fontWeight:`bold`},children:e.symbol||`Unknown`}),(0,M.jsx)(`div`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`,fontFamily:`monospace`},children:e.address})]})]}),(0,M.jsx)(`button`,{onClick:()=>oe(e.chainName,e.address),style:{background:`rgba(191, 97, 106, 0.1)`,color:`#BF616A`,border:`1px solid rgba(191, 97, 106, 0.2)`,padding:`8px`,borderRadius:`8px`,cursor:`pointer`},children:(0,M.jsx)(Ye,{size:16})})]},`${e.chainName}-${e.address}`))})]}),m&&(0,M.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(0,0,0,0.7)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:1e3},children:(0,M.jsxs)(`div`,{style:{background:`var(--bg-secondary)`,width:`100%`,maxWidth:`400px`,borderRadius:`16px`,padding:`24px`,border:`1px solid var(--glass-border)`,boxShadow:`0 24px 48px rgba(0,0,0,0.4)`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`24px`},children:[(0,M.jsx)(`button`,{onClick:()=>h(!1),style:{background:`transparent`,border:`none`,color:`var(--text-secondary)`,cursor:`pointer`},children:(0,M.jsx)(ot,{size:20})}),(0,M.jsx)(`h2`,{style:{color:`var(--text-primary)`,margin:0,fontSize:`1.2rem`,fontWeight:`bold`},children:`Custom crypto`}),(0,M.jsx)(`div`,{style:{width:`20px`}})]}),(0,M.jsxs)(`div`,{style:{marginBottom:`16px`},children:[(0,M.jsx)(`label`,{style:{display:`block`,color:`var(--text-primary)`,marginBottom:`8px`,fontSize:`0.9rem`,fontWeight:`bold`},children:`Network`}),(0,M.jsx)(jt,{value:y,onChange:x,showAllOption:!1})]}),(0,M.jsxs)(`div`,{style:{marginBottom:`16px`},children:[(0,M.jsx)(`label`,{style:{display:`block`,color:`var(--text-primary)`,marginBottom:`8px`,fontSize:`0.9rem`,fontWeight:`bold`},children:`Contract address`}),(0,M.jsx)(`input`,{type:`text`,value:_,onChange:ie,placeholder:`Enter contract information`,style:{width:`100%`,background:`var(--bg-sidebar)`,border:`1px solid var(--glass-border)`,color:`var(--text-primary)`,padding:`12px 16px`,borderRadius:`8px`,outline:`none`}})]}),(0,M.jsxs)(`div`,{style:{marginBottom:`16px`},children:[(0,M.jsx)(`label`,{style:{display:`block`,color:`var(--text-primary)`,marginBottom:`8px`,fontSize:`0.9rem`,fontWeight:`bold`},children:`Symbol`}),(0,M.jsxs)(`div`,{style:{position:`relative`},children:[(0,M.jsx)(`input`,{type:`text`,value:S,readOnly:!0,placeholder:ee?`Fetching...`:``,style:{width:`100%`,background:`var(--bg-secondary)`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`,padding:`12px 16px`,borderRadius:`8px`,outline:`none`,opacity:.7}}),ee&&(0,M.jsx)(`div`,{className:`dot spin`,style:{position:`absolute`,right:`16px`,top:`16px`,width:`12px`,height:`12px`,border:`2px solid #88C0D0`,borderTopColor:`transparent`,borderRadius:`50%`}})]})]}),(0,M.jsxs)(`div`,{style:{marginBottom:`24px`},children:[(0,M.jsx)(`label`,{style:{display:`block`,color:`var(--text-primary)`,marginBottom:`8px`,fontSize:`0.9rem`,fontWeight:`bold`},children:`Decimal`}),(0,M.jsx)(`input`,{type:`text`,value:w,readOnly:!0,placeholder:ee?`Fetching...`:``,style:{width:`100%`,background:`var(--bg-secondary)`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`,padding:`12px 16px`,borderRadius:`8px`,outline:`none`,opacity:.7}})]}),(0,M.jsx)(`button`,{onClick:ae,disabled:!S||E,style:{width:`100%`,background:!S||E?`var(--tool-bg)`:`var(--text-primary)`,color:!S||E?`var(--text-secondary)`:`var(--bg-secondary)`,border:`none`,padding:`14px`,borderRadius:`24px`,fontWeight:`bold`,fontSize:`1rem`,cursor:!S||E?`not-allowed`:`pointer`,transition:`all 0.2s`},children:E?`Confirming...`:`Confirm`})]})})]})},Nt=({size:e=28,className:t=``,color:n=`var(--accent)`})=>(0,M.jsxs)(`svg`,{version:`1.1`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`210 210 835 835`,width:e,height:e,className:t,children:[(0,M.jsx)(`path`,{fill:n,opacity:`1.0`,stroke:`none`,d:`M391.558502,864.562012 C414.770752,831.424988 437.898010,798.228088 461.224091,765.171326 C477.741455,741.763550 494.530212,718.547302 511.188538,695.238953 C512.325684,693.647888 513.384827,692.001099 514.827759,689.865967 C416.111115,669.324341 317.944061,648.897095 219.777023,628.469910 C219.745956,628.100342 219.714890,627.730774 219.683807,627.361206 C317.965973,607.048096 416.248169,586.734985 515.386597,566.244934 C489.683167,530.326538 464.441345,495.053223 438.641846,459.000580 C437.294037,462.427734 436.131836,465.046661 435.221252,467.750305 C426.203400,494.526520 419.706848,521.833374 418.307770,550.164917 C418.161621,553.124207 417.398041,554.463074 414.247314,555.063660 C403.349243,557.141052 392.525635,559.609436 380.672791,562.142944 C381.955139,549.287842 382.795654,537.188110 384.428314,525.196289 C389.018463,491.482178 398.703979,459.225067 412.769470,428.242523 C413.487701,426.660400 412.872864,423.774323 411.822296,422.200531 C404.613678,411.401794 397.123077,400.791260 389.753174,389.651367 C389.905334,389.067993 390.027649,388.953430 390.149933,388.838837 C400.609253,396.183838 411.068604,403.528839 421.732483,411.017487 C448.953796,360.083954 488.595703,321.332672 537.556702,291.163635 C536.430664,291.357513 535.276550,291.451691 534.182617,291.759583 C473.404877,308.867706 421.375061,340.392334 377.824371,386.130768 C332.064423,434.189392 302.581238,490.723297 288.788391,555.519043 C287.160980,563.164368 286.307709,570.972107 284.888123,578.666321 C284.643646,579.991333 283.544373,581.987549 282.517700,582.214172 C268.590088,585.289429 254.605560,588.106750 239.666290,591.187622 C249.186905,504.342407 281.266876,428.187378 339.867310,364.210388 C407.528534,290.341309 491.608215,248.142334 592.349182,237.331238 C590.731506,245.370377 589.307007,252.614029 587.812500,259.843231 C584.407288,276.314758 580.834412,292.753448 577.645447,309.266479 C576.937866,312.930328 574.568787,313.922150 571.855469,315.234436 C518.939209,340.827637 479.413025,380.264313 451.142212,432.059692 C489.395081,459.635254 527.531799,487.127106 566.385315,515.135681 C586.988159,416.540558 607.394653,318.885071 627.801086,221.229568 C628.032654,221.259720 628.264160,221.289856 628.495667,221.320007 C648.896179,318.988525 669.296631,416.657074 689.808777,514.860291 C749.231628,472.484833 808.059265,430.533875 867.341919,388.626953 C867.900818,388.812653 868.004700,388.954315 868.108582,389.096008 C849.003479,415.756317 829.905701,442.421814 810.791443,469.075500 C788.267273,500.484131 765.727478,531.881470 743.204163,563.290710 C742.647949,564.066345 742.205200,564.923340 741.467285,566.142639 C840.231323,586.608215 938.625000,606.997070 1037.018677,627.385925 C1037.040283,627.731873 1037.062012,628.077881 1037.083618,628.423828 C938.778198,648.880981 840.472778,669.338074 741.484985,689.937195 C780.034912,744.140015 818.287720,797.925110 856.739441,851.989746 C857.870544,851.388916 859.027100,850.855286 860.102966,850.191101 C891.392395,830.875427 918.577148,806.818420 939.357849,776.533569 C947.590210,764.536194 953.158813,750.218750 957.569092,736.211121 C963.550171,717.214111 967.202209,697.487122 972.020630,678.114868 C972.446899,676.400879 973.864685,673.918213 975.231079,673.610779 C988.701538,670.579590 1002.258545,667.933167 1015.850098,665.165710 C1006.960327,831.437073 859.668823,998.586304 665.964600,1014.599609 C666.161560,1012.942749 666.229980,1011.378174 666.546021,1009.865417 C669.031982,997.967957 671.659729,986.098999 674.013733,974.175842 C674.563416,971.391418 675.734192,970.367493 678.503540,969.994568 C730.376587,963.009094 778.243225,945.312073 821.729614,916.054871 C827.915039,911.893494 833.889709,907.418823 839.719055,902.229187 C789.737976,922.594238 738.281250,931.719971 684.053101,924.868225 C686.495605,912.886902 688.875671,901.211975 691.358215,889.034485 C719.122437,891.573181 746.474426,890.263916 773.529236,884.649719 C800.425781,879.068298 825.987671,869.833374 850.707886,855.726074 C796.893921,817.308716 743.624573,779.280273 689.712219,740.792725 C669.298584,840.439758 649.062561,939.219666 628.826538,1037.999634 C628.337769,1038.062988 627.848999,1038.126343 627.360229,1038.189697 C607.031616,939.372681 586.703064,840.555603 566.225220,741.013123 C508.181274,782.548218 450.532928,823.800232 392.387512,864.971436 C391.890411,864.890564 391.558502,864.562012 391.558502,864.562012 M671.054382,685.592590 C683.651733,669.250977 700.426758,659.979492 720.473022,655.958557 C760.160095,647.997925 799.813110,639.867310 839.477173,631.792114 C844.905396,630.686890 850.316223,629.496033 856.934082,628.090088 C855.240906,627.423645 854.855042,627.202271 854.441284,627.118713 C809.391235,618.015625 764.324524,608.994141 719.292053,599.805237 C687.129700,593.242493 666.357849,573.794189 658.085388,542.310303 C652.000183,519.150879 647.862915,495.475311 642.997131,472.000824 C638.094788,448.350525 633.364502,424.664551 628.366150,400.044769 C627.805237,401.719086 627.470642,402.460938 627.308472,403.238739 C618.164917,447.087311 609.088989,490.950134 599.887695,534.786621 C592.838074,568.371887 574.333862,591.798584 539.707825,599.260986 C497.549194,608.346741 455.186249,616.484192 412.913910,625.042847 C409.059052,625.823303 405.220459,626.683960 400.609985,627.671082 C401.828217,628.367615 402.088959,628.612732 402.387390,628.673767 C446.942963,637.790649 491.531921,646.747131 536.049377,656.046265 C569.849854,663.106689 591.605042,683.306885 598.985901,717.262268 C608.430969,760.713928 616.988403,804.358521 625.937500,847.918152 C626.558655,850.941589 627.255554,853.949463 628.215210,858.322327 C637.018921,814.944580 645.550049,773.068237 654.003601,731.176331 C657.208618,715.293640 660.428406,699.446167 671.054382,685.592590 z`}),(0,M.jsx)(`path`,{fill:n,opacity:`1.0`,stroke:`none`,d:`M386.726410,932.261108 C301.744720,862.964966 252.860352,774.276062 239.571213,664.782349 C243.640167,665.623230 246.658188,666.259705 249.681610,666.869385 C260.132385,668.976929 270.570435,671.152649 281.047028,673.123108 C283.713837,673.624695 284.803009,674.577637 285.264160,677.483826 C299.943695,769.993530 344.846649,844.861694 418.412781,902.306030 C465.297638,938.916199 518.736572,961.112610 577.599609,970.152466 C579.135315,970.388245 581.405090,971.909729 581.702209,973.205444 C584.604919,985.865601 587.168518,998.603699 589.797119,1011.326111 C589.988586,1012.252930 589.933960,1013.230591 590.033508,1014.819641 C514.202637,1006.650635 446.673218,979.319702 386.726410,932.261108 z`}),(0,M.jsx)(`path`,{fill:n,opacity:`1.0`,stroke:`none`,d:`M717.095459,286.762451 C702.518005,285.946136 688.403137,285.164001 673.635620,284.345703 C670.496094,269.397308 667.259644,253.987091 663.812012,237.571594 C699.948914,240.829361 734.403198,248.649704 767.807129,261.272522 C801.262024,273.914642 832.392090,290.666199 860.278870,313.266907 C813.130981,301.801331 765.908508,291.274475 717.095459,286.762451 z`}),(0,M.jsx)(`path`,{fill:n,opacity:`1.0`,stroke:`none`,d:`M508.385742,845.601562 C503.292084,841.116760 498.462646,836.867615 493.256165,832.286682 C503.293274,824.734863 512.820435,817.566772 522.083801,810.597107 C532.372131,818.453186 542.291443,825.997009 552.154602,833.613647 C552.996399,834.263733 553.846802,835.322083 554.047241,836.320496 C557.123535,851.643250 560.092407,866.987488 563.338562,883.619385 C542.903259,872.819641 525.360107,859.943787 508.385742,845.601562 z`}),(0,M.jsx)(`path`,{fill:n,opacity:`1.0`,stroke:`none`,d:`M443.739258,707.133484 C445.894348,709.609070 447.759094,711.954102 449.403809,714.444519 C453.212250,720.211304 452.803345,725.074036 447.955048,730.693237 C441.574707,738.088135 436.480682,746.592834 429.788666,756.105713 C420.586670,736.813904 411.856506,718.511169 403.126312,700.208496 C403.546173,699.856079 403.966003,699.503662 404.385864,699.151184 C417.373566,701.790466 430.361298,704.429749 443.739258,707.133484 z`}),(0,M.jsx)(`path`,{fill:n,opacity:`1.0`,stroke:`none`,d:`M389.592651,389.346680 C389.291229,389.122070 389.180267,388.733337 389.069275,388.344666 C389.338684,388.340118 389.608063,388.335571 390.013702,388.584961 C390.027649,388.953430 389.905334,389.067993 389.592651,389.346680 z`}),(0,M.jsx)(`path`,{fill:n,opacity:`1.0`,stroke:`none`,d:`M867.646118,388.454865 C867.856812,388.036652 868.218323,387.834564 868.579834,387.632507 C868.601868,388.016388 868.623962,388.400299 868.377319,388.940094 C868.004700,388.954315 867.900818,388.812653 867.646118,388.454865 z`}),(0,M.jsx)(`path`,{fill:n,opacity:`1.0`,stroke:`none`,d:`M392.055237,865.056030 C391.863586,865.412903 391.507172,865.604370 391.150757,865.795837 C391.133575,865.521484 391.116425,865.247192 391.328857,864.767456 C391.558502,864.562012 391.890411,864.890564 392.055237,865.056030 z`})]}),Pt=[{id:`auto`,label:`Meta-Aggregator (Auto)`},{id:`1inch`,label:`1inch`},{id:`0x`,label:`0x API`},{id:`lifi`,label:`LI.FI`},{id:`relay`,label:`Relay`},{id:`openocean`,label:`OpenOcean`},{id:`kyberswap`,label:`KyberSwap`}],Ft=({id:e,size:t=16,color:n})=>{if(e===`auto`)return(0,M.jsx)(Nt,{size:t,className:`network-icon`,color:n});let r=ht(e);return r?(0,M.jsx)(`img`,{src:r,alt:e,style:{width:t,height:t,objectFit:`cover`,borderRadius:`50%`,flexShrink:0},onError:e=>{e.currentTarget.style.display=`none`},className:`network-icon`}):(0,M.jsx)(Nt,{size:t,className:`network-icon`,color:n})},It=({value:e,onChange:t})=>{let[n,r]=(0,g.useState)(!1),i=(0,g.useRef)(null);(0,g.useEffect)(()=>{let e=e=>{i.current&&!i.current.contains(e.target)&&r(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let a=Pt.find(t=>t.id===e)||Pt[0];return(0,M.jsxs)(`div`,{className:`custom-network-selector`,ref:i,style:{marginLeft:`10px`},children:[(0,M.jsxs)(`button`,{className:`network-selector-pill`,onClick:()=>r(!n),"aria-expanded":n,children:[(0,M.jsx)(Ft,{id:a.id,size:16,color:`#000000`}),(0,M.jsx)(`span`,{className:`network-label`,children:a.label}),(0,M.jsx)(O,{size:14,className:`network-chevron`})]}),n&&(0,M.jsx)(`ul`,{className:`network-dropdown-menu`,children:Pt.map(e=>(0,M.jsx)(`li`,{className:`network-dropdown-item ${e.id===a.id?`active`:``}`,onClick:()=>{t(e.id),r(!1)},children:(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,M.jsx)(Ft,{id:e.id,size:14}),(0,M.jsx)(`span`,{children:e.label})]})},e.id))})]})};function Lt({sessionId:e}){let[t,n]=(0,g.useState)([]),[r,i]=(0,g.useState)(null);(0,g.useEffect)(()=>{let e=async()=>{try{let e=await b(`/api/transactions`);e.ok&&n(await e.json())}catch(e){console.error(e)}};e();let t=setInterval(e,2e3);return()=>clearInterval(t)},[]);let a=async(t,r)=>{let a=t.id;i(a);try{let i=await b(`/api/transactions/${a}/${r}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:e,nonce:t.nonce})});if(i.ok)n(e=>e.filter(e=>e.id!==a)),window.dispatchEvent(new CustomEvent(`nyxora-refresh-chat`));else{let e=await i.json();alert(`Error: ${e.error}`)}}catch(e){alert(`Failed to ${r}: ${e.message}`)}finally{i(null)}};return t.length===0?null:(0,M.jsxs)(`div`,{style:{position:`fixed`,bottom:20,right:20,width:350,zIndex:1e3,display:`flex`,flexDirection:`column`,gap:10},children:[t.length>1&&(0,M.jsxs)(`button`,{onClick:async()=>{let e=t.map(e=>a(e,`approve`));await Promise.all(e)},style:{padding:`12px`,background:`#eab308`,color:`#1e293b`,border:`none`,borderRadius:12,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,gap:5,fontWeight:`bold`},children:[(0,M.jsx)(D,{size:18}),` Approve All Transactions (`,t.length,`)`]}),t.map(e=>(0,M.jsxs)(`div`,{style:{background:`#1e293b`,padding:20,borderRadius:16,border:`1px solid #eab308`,boxShadow:`0 10px 25px -5px rgba(0,0,0,0.5)`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:15},children:[(0,M.jsx)(We,{color:`#eab308`}),(0,M.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:`Action Required`})]}),(0,M.jsxs)(`p`,{style:{color:`#cbd5e1`,fontSize:`0.9rem`,marginBottom:15},children:[`Type: `,e.type.toUpperCase(),(0,M.jsx)(`br`,{}),`Chain: `,e.chainName.toUpperCase(),(0,M.jsx)(`br`,{}),e.type===`transfer`?`To: ${e.details.toAddress}\nAmount: ${e.details.amountEth}`:e.type===`limit_order`?`Trigger: ${e.details.trigger_condition} $${e.details.trigger_price_usd}\nAction: ${e.details.action} $${e.details.amount_usd} of ${e.details.token_symbol}`:e.type===`swap`?`Swap: ${e.details.amount} ${e.details.fromToken} to ${e.details.toToken}`:`Execute Action`]}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:10},children:[(0,M.jsxs)(`button`,{onClick:()=>a(e,`approve`),disabled:r===e.id,style:{flex:1,padding:`10px`,background:r===e.id?`#15803d`:`#22c55e`,color:`var(--text-primary)`,border:`none`,borderRadius:8,cursor:r===e.id?`not-allowed`:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,gap:5},children:[(0,M.jsx)(D,{size:16}),` `,r===e.id?`Processing...`:`Approve`]}),(0,M.jsxs)(`button`,{onClick:()=>a(e,`reject`),disabled:r===e.id,style:{flex:1,padding:`10px`,background:r===e.id?`#b91c1c`:`#ef4444`,color:`var(--text-primary)`,border:`none`,borderRadius:8,cursor:r===e.id?`not-allowed`:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,gap:5},children:[(0,M.jsx)(ot,{size:16}),` Reject`]})]})]},e.id))]})}var Rt=({data:e})=>{let t=`0.00`,n=`Unknown`;if(e.includes(` on `)){let r=e.split(` on `),i=r[0];n=r[1].toUpperCase();let a=parseFloat(i);t=isNaN(a)?i:a.toLocaleString(`en-US`,{maximumFractionDigits:6})}return(0,M.jsxs)(`div`,{style:{background:`linear-gradient(135deg, rgba(30,41,59,0.8) 0%, rgba(15,23,42,0.9) 100%)`,borderRadius:`24px`,padding:`32px`,border:`1px solid rgba(255,255,255,0.1)`,boxShadow:`0 20px 40px -10px rgba(0,0,0,0.5)`,width:`100%`,maxWidth:`400px`,margin:`0 auto`,animation:`fadeIn 0.5s ease-out forwards`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`32px`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,M.jsx)(`div`,{style:{background:`rgba(59,130,246,0.2)`,padding:`10px`,borderRadius:`12px`},children:(0,M.jsx)(it,{size:24,color:`#3b82f6`})}),(0,M.jsx)(`span`,{style:{color:`#94a3b8`,fontWeight:500,fontSize:`0.9rem`,letterSpacing:`1px`},children:`WALLET BALANCE`})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,background:`rgba(34,197,94,0.1)`,padding:`6px 12px`,borderRadius:`20px`},children:[(0,M.jsx)(se,{size:14,color:`#4ade80`}),(0,M.jsx)(`span`,{style:{color:`#4ade80`,fontSize:`0.75rem`,fontWeight:600},children:`LIVE`})]})]}),(0,M.jsxs)(`div`,{style:{marginBottom:`12px`,display:`flex`,alignItems:`baseline`,flexWrap:`wrap`,overflow:`hidden`},children:[(0,M.jsx)(`span`,{style:{fontSize:`2.5rem`,fontWeight:800,color:`var(--text-primary)`,letterSpacing:`-1px`,wordBreak:`break-all`},children:t}),(0,M.jsx)(`span`,{style:{fontSize:`1.2rem`,color:`#94a3b8`,marginLeft:`8px`,fontWeight:500},children:`ETH`})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginTop:`32px`,paddingTop:`20px`,borderTop:`1px solid rgba(255,255,255,0.05)`},children:[(0,M.jsx)(`span`,{style:{color:`#64748b`,fontSize:`0.85rem`},children:`Network`}),(0,M.jsx)(`span`,{style:{color:`#e2e8f0`,fontSize:`0.9rem`,fontWeight:600,fontFamily:`monospace`},children:n})]})]})},zt=({data:e})=>{let t=null;try{t=JSON.parse(e)}catch{return null}if(t.error)return(0,M.jsx)(`div`,{style:{background:`rgba(239, 68, 68, 0.1)`,border:`1px solid rgba(239, 68, 68, 0.3)`,padding:`16px`,borderRadius:`16px`},children:(0,M.jsx)(`p`,{style:{color:`#ef4444`},children:t.error})});let{coin:n,priceUsd:r,change24h:i}=t,a=i>=0;return(0,M.jsxs)(`div`,{style:{background:`linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%)`,border:`1px solid rgba(255, 255, 255, 0.1)`,borderRadius:`24px`,padding:`24px`,boxShadow:`0 10px 40px -10px rgba(0,0,0,0.5)`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:`24px`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,M.jsx)(`div`,{style:{background:`rgba(59, 130, 246, 0.2)`,padding:`12px`,borderRadius:`16px`,border:`1px solid rgba(59, 130, 246, 0.3)`},children:(0,M.jsx)(ee,{size:24,color:`#3b82f6`})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h3`,{style:{margin:0,fontSize:`1.2rem`,color:`var(--text-primary)`,textTransform:`capitalize`},children:n}),(0,M.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`#94a3b8`},children:`Live Price (USD)`})]})]}),(0,M.jsxs)(`div`,{style:{background:a?`rgba(74, 222, 128, 0.1)`:`rgba(239, 68, 68, 0.1)`,color:a?`#4ade80`:`#ef4444`,padding:`6px 12px`,borderRadius:`12px`,display:`flex`,alignItems:`center`,gap:`6px`,fontWeight:600,fontSize:`0.9rem`},children:[(0,M.jsx)(a?Ze:Xe,{size:16}),a?`+`:``,i.toFixed(2),`%`]})]}),(0,M.jsx)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:`8px`,overflow:`hidden`},children:(0,M.jsxs)(`span`,{style:{fontSize:`3rem`,fontWeight:800,color:`var(--text-primary)`,letterSpacing:`-1px`,wordBreak:`break-all`},children:[`$`,r.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:6})]})})]})},Bt=({data:e})=>{if(e.startsWith(`TRANSACTION_PENDING`))return null;let t=null;try{t=JSON.parse(e)}catch{return(0,M.jsxs)(`div`,{className:`widget-card error`,children:[(0,M.jsx)(`h3`,{className:`widget-title`,children:`Swap Error`}),(0,M.jsx)(`p`,{children:`Failed to parse swap data.`})]})}return t.error?(0,M.jsxs)(`div`,{className:`widget-card error`,children:[(0,M.jsx)(`h3`,{className:`widget-title`,children:`Transaction Failed`}),(0,M.jsx)(`p`,{children:t.error})]}):(0,M.jsxs)(`div`,{className:`widget-card swap-widget`,style:{background:`rgba(30, 41, 59, 0.7)`,backdropFilter:`blur(20px)`,border:`1px solid rgba(255, 255, 255, 0.1)`,borderRadius:`24px`,padding:`28px`,color:`var(--text-primary)`,boxShadow:`0 25px 50px -12px rgba(0, 0, 0, 0.5)`,width:`100%`,maxWidth:`420px`,margin:`0 auto`,animation:`fadeIn 0.5s ease-out`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`24px`},children:[(0,M.jsxs)(`h3`,{style:{margin:0,fontSize:`1.1rem`,fontWeight:600,display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,M.jsx)(Ie,{size:18,color:`#a855f7`}),`DeFi Swap Execution`]}),(0,M.jsxs)(`span`,{style:{background:`rgba(34, 197, 94, 0.2)`,color:`#4ade80`,padding:`4px 10px`,borderRadius:`12px`,fontSize:`0.75rem`,fontWeight:600,display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,M.jsx)(se,{size:14}),` `,t.status]})]}),(0,M.jsxs)(`div`,{style:{background:`rgba(15, 23, 42, 0.5)`,borderRadius:`16px`,padding:`20px`,marginBottom:`12px`,border:`1px solid rgba(255,255,255,0.03)`},children:[(0,M.jsx)(`div`,{style:{fontSize:`0.8rem`,color:`#94a3b8`,marginBottom:`8px`},children:`Pay`}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,M.jsx)(`span`,{style:{fontSize:`1.8rem`,fontWeight:700},children:t.fromAmount}),(0,M.jsx)(`span`,{style:{background:`rgba(255,255,255,0.1)`,padding:`6px 12px`,borderRadius:`12px`,fontWeight:600},children:t.fromToken})]})]}),(0,M.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,margin:`-20px 0`,position:`relative`,zIndex:10},children:(0,M.jsx)(`div`,{style:{background:`#1e293b`,border:`1px solid rgba(255,255,255,0.1)`,padding:`8px`,borderRadius:`50%`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 4px 12px rgba(0,0,0,0.5)`},children:(0,M.jsx)(E,{size:20,color:`#a855f7`})})}),(0,M.jsxs)(`div`,{style:{background:`rgba(168, 85, 247, 0.1)`,borderRadius:`16px`,padding:`20px`,marginBottom:`24px`,border:`1px solid rgba(168, 85, 247, 0.2)`},children:[(0,M.jsx)(`div`,{style:{fontSize:`0.8rem`,color:`#c084fc`,marginBottom:`8px`},children:`Receive`}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,M.jsx)(`span`,{style:{fontSize:`1.8rem`,fontWeight:700,color:`#e9d5ff`},children:t.toAmount}),(0,M.jsx)(`span`,{style:{background:`rgba(168, 85, 247, 0.2)`,color:`#e9d5ff`,padding:`6px 12px`,borderRadius:`12px`,fontWeight:600},children:t.toToken})]})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`,fontSize:`0.85rem`,color:`#94a3b8`},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,M.jsx)(`span`,{children:`Exchange Rate`}),(0,M.jsxs)(`span`,{style:{color:`var(--text-primary)`},children:[`1 `,t.fromToken,` = `,t.exchangeRate,` `,t.toToken]})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,M.jsx)(`span`,{children:`Network`}),(0,M.jsx)(`span`,{style:{color:`var(--text-primary)`,textTransform:`capitalize`},children:t.chain})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,M.jsx)(`span`,{children:`Network Fee (Gas)`}),(0,M.jsx)(`span`,{style:{color:`#f59e0b`},children:t.gasFee})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginTop:`8px`,paddingTop:`12px`,borderTop:`1px dashed rgba(255,255,255,0.1)`},children:[(0,M.jsx)(`span`,{children:`Transaction Hash`}),(0,M.jsxs)(`a`,{href:`#`,style:{color:`#3b82f6`,textDecoration:`none`,display:`flex`,alignItems:`center`,gap:`4px`},children:[t.txHash.substring(0,8),`...`,t.txHash.substring(60)]})]})]}),(0,M.jsx)(`div`,{style:{marginTop:`24px`,width:`100%`,height:`4px`,background:`rgba(255,255,255,0.1)`,borderRadius:`2px`,overflow:`hidden`},children:(0,M.jsx)(`div`,{style:{height:`100%`,width:`100%`,background:`linear-gradient(90deg, #3b82f6, #a855f7)`,animation:`progress 2s ease-in-out`}})})]})};function Vt(){let[e,t]=(0,g.useState)(!1);return(0,g.useEffect)(()=>{let e=()=>t(!0),n=()=>t(!1);return window.addEventListener(`nyxora-network-error`,e),window.addEventListener(`nyxora-network-restored`,n),()=>{window.removeEventListener(`nyxora-network-error`,e),window.removeEventListener(`nyxora-network-restored`,n)}},[]),(0,g.useEffect)(()=>{let t;return e&&(t=setInterval(async()=>{try{await b(`/api/auth/google/status`)}catch{}},3e3)),()=>clearInterval(t)},[e]),e?(0,M.jsxs)(`div`,{style:{position:`fixed`,inset:0,backgroundColor:`rgba(0, 0, 0, 0.8)`,backdropFilter:`blur(10px)`,zIndex:9999,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`var(--text-primary)`,fontFamily:`sans-serif`},children:[(0,M.jsx)(at,{size:64,color:`#ef4444`,style:{marginBottom:`20px`,animation:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`}}),(0,M.jsx)(`h1`,{style:{fontSize:`2rem`,marginBottom:`10px`},children:`Nyxora Daemon Offline`}),(0,M.jsx)(`p`,{style:{color:`#9ca3af`,fontSize:`1.2rem`},children:`Trying to reconnect...`}),(0,M.jsx)(`style`,{children:`
|
|
12
|
+
@keyframes pulse {
|
|
13
|
+
0%, 100% { opacity: 1; }
|
|
14
|
+
50% { opacity: .5; }
|
|
15
|
+
}
|
|
16
|
+
`})]}):null}function Ht(){let[e,t]=(0,g.useState)(()=>localStorage.getItem(`nyxora_current_view`)||`chat`),[n,r]=(0,g.useState)([`$BTC`,`$ETH`,`$SOL`,`$SUI`]),[i,a]=(0,g.useState)([]),[o,s]=(0,g.useState)([]),[c,l]=(0,g.useState)(()=>localStorage.getItem(`nyxora_active_session_id`)||null),[u,d]=(0,g.useState)(null),[f,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(``),[_,v]=(0,g.useState)(!1),[y,x]=(0,g.useState)(!1),[S,C]=(0,g.useState)(!1),w=(0,g.useRef)(!1),[T,te]=(0,g.useState)(!1),[E,ne]=(0,g.useState)(null),[re,ie]=(0,g.useState)(70),[ae,oe]=(0,g.useState)(null),O=(0,g.useRef)(null),k=(0,g.useRef)(null),se=(0,g.useRef)(null),[ce,A]=(0,g.useState)(!1),[ue,de]=(0,g.useState)(0),fe=(0,g.useRef)(0),[pe,me]=(0,g.useState)(()=>parseInt(localStorage.getItem(`nyxora_auto_lock`)||`0`)),[he,ge]=(0,g.useState)(()=>localStorage.getItem(`nyxora_theme`)||`auto`),[j,_e]=(0,g.useState)(()=>localStorage.getItem(`nyxora_sidebar_collapsed`)===`true`);(0,g.useEffect)(()=>{localStorage.setItem(`nyxora_current_view`,e)},[e]),(0,g.useEffect)(()=>{c?localStorage.setItem(`nyxora_active_session_id`,c):localStorage.removeItem(`nyxora_active_session_id`)},[c]),(0,g.useEffect)(()=>{let e=e=>{e===`auto`?window.matchMedia(`(prefers-color-scheme: light)`).matches?document.body.classList.add(`light-theme`):document.body.classList.remove(`light-theme`):e===`light`?document.body.classList.add(`light-theme`):document.body.classList.remove(`light-theme`)};if(e(he),localStorage.setItem(`nyxora_theme`,he),he===`auto`){let t=window.matchMedia(`(prefers-color-scheme: light)`),n=()=>e(`auto`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}},[he]),(0,g.useEffect)(()=>{localStorage.setItem(`nyxora_sidebar_collapsed`,j.toString())},[j]),(0,g.useEffect)(()=>{fe.current=Date.now();let e=()=>{fe.current=Date.now()};return window.addEventListener(`mousemove`,e),window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`keydown`,e)}},[]),(0,g.useEffect)(()=>{let e=setInterval(()=>{pe>0&&!ce&&Date.now()-fe.current>pe*60*1e3&&(A(!0),de(Date.now()))},1e3);return()=>clearInterval(e)},[pe,ce]),(0,g.useEffect)(()=>{let e;return ce&&(e=setInterval(async()=>{try{let e=await(await b(`/api/status/lock`)).json();e.lastUnlockRequest&&e.lastUnlockRequest>ue&&(A(!1),fe.current=Date.now())}catch{}},1e3)),()=>clearInterval(e)},[ce,ue]),(0,g.useEffect)(()=>{let e=window.SpeechRecognition||window.webkitSpeechRecognition;e&&(k.current=new e,k.current.continuous=!1,k.current.interimResults=!1,k.current.lang=`en-US`,k.current.onresult=e=>{let t=e.results[0][0].transcript;h(t),x(!1)},k.current.onerror=e=>{console.error(`Speech recognition error`,e.error),x(!1)},k.current.onend=()=>{x(!1)})},[]);let ve=()=>{try{k.current?.start(),x(!0)}catch{}},ye=e=>{if(!(`speechSynthesis`in window))return;window.speechSynthesis.cancel();let t=e.replace(/[*#_`]/g,``),n=new SpeechSynthesisUtterance(t);n.lang=`id-ID`,n.onstart=()=>te(!0),n.onend=()=>{te(!1),w.current&&ve()},window.speechSynthesis.speak(n)},be=()=>{let e=!S;C(e),w.current=e,e?ve():(k.current?.stop(),x(!1),window.speechSynthesis.cancel(),te(!1))},Se=async e=>{let t=e.target.files?.[0];if(!t)return;v(!0);let n=new FormData;n.append(`file`,t);try{let e=await b(`/api/upload`,{method:`POST`,body:n});e.ok?We(null,`Tolong analisis dokumen ini: ${(await e.json()).filePath}`):(console.error(`File upload failed`),v(!1))}catch(e){console.error(`Error uploading file`,e),v(!1)}se.current&&(se.current.value=``)},we=async()=>{if(!c){a([]);return}try{let e=await b(`/api/history?session_id=${c}`);e.ok&&a(await e.json())}catch{console.warn(`Backend not ready, retrying history fetch in 2s...`)}},Te=async()=>{try{let e=await b(`/api/sessions`);if(e.ok){let t=await e.json();s(t),t.length>0&&!c&&l(t[0].id)}}catch{}},Ae=async()=>{try{let e=await b(`/api/trending`);e.ok&&r(await e.json())}catch{}},Me=async()=>{try{let e=await b(`/api/sessions`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:`New Chat`})});if(e.ok){let{id:n}=await e.json();l(n),a([]),await Te(),t(`chat`)}}catch{}},Ie=async(e,t)=>{try{await b(`/api/sessions/${e}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:t})}),d(null),await Te()}catch{}},Le=async(e,t)=>{t.stopPropagation();try{await b(`/api/sessions/${e}`,{method:`DELETE`}),c===e&&(l(null),a([])),await Te()}catch{}},Re=async()=>{try{let e=await b(`/api/config`);e.ok?ne(await e.json()):setTimeout(Re,2e3)}catch{console.warn(`Backend not ready, retrying config fetch in 2s...`),setTimeout(Re,2e3)}},ze=async e=>{ne(e);try{await b(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){console.error(`Failed to save config`,e)}};(0,g.useEffect)(()=>{we(),Re(),Te(),Ae();let e=setInterval(()=>{we(),Te(),Ae()},2e3);return()=>clearInterval(e)},[c]),(0,g.useEffect)(()=>{setTimeout(()=>{O.current?.scrollIntoView({behavior:`smooth`})},10)},[i.length,_,e]);let We=async(e,t)=>{e?.preventDefault();let n=t||m;if(!n.trim()||_)return;h(``),v(!0);let r=c;if(!r)try{let e=n.length>25?n.substring(0,25)+`...`:n,t=await b(`/api/sessions`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:e})});if(t.ok){let{id:e}=await t.json();r=e,l(e),await Te()}}catch(e){console.error(`Failed to auto-create session`,e)}a(e=>[...e,{role:`user`,content:n}]);try{let e=await(await b(`/api/chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({message:n,session_id:r})})).json();if(await we(),i.length===0&&r){let e=n.length>25?n.substring(0,25)+`...`:n;Ie(r,e)}w.current&&e.response&&ye(e.response)}catch(e){console.error(`Error sending message:`,e)}finally{v(!1)}},qe=null,Xe=[...i].reverse().find(e=>e.role===`tool`);Xe&&Xe.name&&(Xe.name===`get_balance`?qe=(0,M.jsx)(Rt,{data:Xe.content}):[`analyze_market`].includes(Xe.name)?qe=(0,M.jsx)(zt,{data:Xe.content}):Xe.name===`swap_token`&&!Xe.content.startsWith(`Failed`)&&!Xe.content.startsWith(`Error`)&&(qe=(0,M.jsx)(Bt,{data:Xe.content})));let Ze=e=>{let t=e.replace(/(?:```(?:xml|html)?\s*)?<think>[\s\S]*?<\/think>(?:\s*```)?|```think[\s\S]*?```/gi,``).trim();return(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:t&&(0,M.jsx)(`div`,{style:{whiteSpace:`pre-wrap`},children:(e=>e.split(/(\*\*.*?\*\*)/g).map((e,t)=>e.startsWith(`**`)&&e.endsWith(`**`)?(0,M.jsx)(`strong`,{style:{color:`var(--text-primary)`},children:e.slice(2,-2)},t):e))(t)})})};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Vt,{}),ce&&(0,M.jsxs)(`div`,{style:{position:`fixed`,inset:0,backgroundColor:`rgba(255, 255, 255, 0.05)`,backdropFilter:`blur(20px)`,WebkitBackdropFilter:`blur(20px)`,zIndex:99999,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`var(--text-primary)`,fontFamily:`sans-serif`},children:[(0,M.jsx)(Ge,{size:64,color:`var(--accent)`,style:{marginBottom:`20px`}}),(0,M.jsx)(`h1`,{style:{fontSize:`2rem`,marginBottom:`10px`,textShadow:`0 2px 10px rgba(0,0,0,0.5)`},children:`Session Locked`}),(0,M.jsxs)(`p`,{style:{color:`#e2e8f0`,fontSize:`1.2rem`,textShadow:`0 1px 5px rgba(0,0,0,0.5)`},children:[`Please open your terminal and run `,(0,M.jsx)(`code`,{children:`nyxora unlock`}),` to authorize unlock.`]})]}),(0,M.jsxs)(`aside`,{className:`sidebar ${j?`collapsed`:``}`,children:[(0,M.jsxs)(`div`,{className:`agent-identity-card`,style:{position:`relative`},children:[(0,M.jsx)(`div`,{className:`agent-avatar`,children:(0,M.jsx)(Nt,{size:48})}),(0,M.jsxs)(`div`,{className:`agent-info`,children:[(0,M.jsx)(`div`,{className:`agent-name`,children:`Nyxora AI`}),(0,M.jsxs)(`div`,{className:`agent-status`,children:[(0,M.jsx)(`span`,{className:`status-dot`}),` ONLINE`]})]}),(0,M.jsx)(`button`,{className:`sidebar-toggle-btn`,onClick:()=>_e(!j),style:j?{position:`relative`,width:`100%`,display:`flex`,justifyContent:`center`,background:`transparent`,border:`none`,cursor:`pointer`,padding:0,marginTop:`8px`}:{position:`absolute`,top:`24px`,right:`12px`,background:`transparent`,border:`none`,color:`var(--text-secondary)`,cursor:`pointer`,padding:`4px`},children:j?(0,M.jsx)(Nt,{size:32}):(0,M.jsx)(je,{size:18})})]}),(0,M.jsxs)(`div`,{className:`sidebar-scroll-area`,children:[(0,M.jsxs)(`nav`,{className:`sidebar-nav`,style:{paddingTop:`16px`},children:[(0,M.jsxs)(`div`,{className:`nav-item`,onClick:Me,title:j?`New Chat`:void 0,children:[(0,M.jsx)(Fe,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`New Chat`})]}),(0,M.jsxs)(`div`,{className:`nav-item ${e===`search`?`active`:``}`,onClick:()=>t(`search`),title:j?`Search Chat`:void 0,children:[(0,M.jsx)(Be,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`Search Chat`})]}),(0,M.jsxs)(`div`,{className:`nav-item ${e===`overview`?`active`:``}`,onClick:()=>t(`overview`),title:j?`Overview`:void 0,children:[(0,M.jsx)(Ce,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`Overview`})]}),(0,M.jsxs)(`div`,{className:`nav-item ${e===`portfolio`?`active`:``}`,onClick:()=>t(`portfolio`),title:j?`Portfolio`:void 0,children:[(0,M.jsx)(it,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`Portfolio`})]}),(0,M.jsxs)(`div`,{className:`nav-item ${e===`skills`?`active`:``}`,onClick:()=>t(`skills`),title:j?`Web3 Skills`:void 0,children:[(0,M.jsx)(st,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`Web3 Skills`})]}),(0,M.jsxs)(`div`,{className:`nav-item ${e===`osskills`?`active`:``}`,onClick:()=>t(`osskills`),title:j?`OS Skills`:void 0,children:[(0,M.jsx)(Je,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`OS Skills`})]}),(0,M.jsxs)(`div`,{className:`nav-item ${e===`rpcconfig`?`active`:``}`,onClick:()=>t(`rpcconfig`),title:j?`RPC Configuration`:void 0,children:[(0,M.jsx)(He,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`RPC Configuration`})]}),(0,M.jsxs)(`div`,{className:`nav-item ${e===`defikeys`?`active`:``}`,onClick:()=>t(`defikeys`),title:j?`DeFi Configuration`:void 0,children:[(0,M.jsx)(xe,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`DeFi Configuration`})]}),(0,M.jsxs)(`div`,{className:`nav-item ${e===`settings`?`active`:``}`,onClick:()=>t(`settings`),title:j?`Settings`:void 0,children:[(0,M.jsx)(Ue,{size:15,className:`nav-icon`}),` `,(0,M.jsx)(`span`,{className:`nav-label`,children:`Settings`})]})]}),(0,M.jsx)(`div`,{className:`sidebar-section`,children:(0,M.jsx)(`span`,{children:`Recent`})}),(0,M.jsx)(`nav`,{className:`sidebar-nav sessions-list`,children:o.map(n=>(0,M.jsxs)(`div`,{className:`nav-item session-item ${c===n.id&&e===`chat`?`active`:``}`,onClick:()=>{l(n.id),t(`chat`)},children:[(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,overflow:`hidden`,flex:1},children:[(0,M.jsx)(Ee,{size:14,className:`nav-icon`}),(0,M.jsx)(`span`,{className:`nav-label`,style:{whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,fontSize:`0.85rem`},children:n.title})]}),(0,M.jsxs)(`div`,{style:{display:`flex`,gap:`4px`},children:[(0,M.jsx)(`button`,{className:`delete-session-btn`,onClick:e=>{e.stopPropagation(),d(n.id),p(n.title)},title:`Rename Session`,children:(0,M.jsx)(Pe,{size:12})}),(0,M.jsx)(`button`,{className:`delete-session-btn`,onClick:e=>Le(n.id,e),title:`Delete Session`,children:(0,M.jsx)(Ye,{size:14})})]})]},n.id))})]})]}),(0,M.jsxs)(`main`,{className:`main-content`,children:[(0,M.jsxs)(`header`,{className:`topbar`,children:[(0,M.jsxs)(`div`,{className:`topbar-left`,children:[(0,M.jsx)(`span`,{children:`Nyxora`}),(0,M.jsx)(`span`,{style:{color:`#3b82f6`},children:`•`}),(0,M.jsx)(`span`,{style:{color:`var(--text-primary)`,textTransform:`capitalize`},children:e===`search`?`Search Chat`:e===`osskills`?`OS Skills`:e===`defikeys`?`DeFi Configuration`:e===`rpcconfig`?`RPC Configuration`:e===`skills`?`Web3 Skills`:e})]}),(0,M.jsxs)(`div`,{className:`topbar-right`,children:[(0,M.jsxs)(`button`,{className:`network-selector-pill`,style:{padding:`8px`,borderRadius:`50%`,background:`transparent`,border:`1px solid var(--glass-border)`,color:`var(--text-primary)`,width:`38px`,height:`38px`,display:`flex`,justifyContent:`center`,alignItems:`center`},onClick:()=>{ge(he===`dark`?`light`:he===`light`?`auto`:`dark`)},title:`Toggle Theme (Current: ${he})`,children:[he===`dark`&&(0,M.jsx)(ke,{size:18}),he===`light`&&(0,M.jsx)(Ke,{size:18}),he===`auto`&&(0,M.jsx)(Oe,{size:18})]}),E?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(jt,{value:E.agent.default_chain,onChange:e=>ze({...E,agent:{...E.agent,default_chain:e}}),showAllOption:!0}),(0,M.jsx)(It,{value:E.agent.default_router||`auto`,onChange:e=>ze({...E,agent:{...E.agent,default_router:e}})})]}):(0,M.jsxs)(`span`,{style:{color:`#f59e0b`,fontSize:`0.85rem`,display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,M.jsx)(`span`,{className:`dot`,style:{background:`#f59e0b`,animation:`pulse 1s infinite`}}),` Waiting for API Gateway...`]})]})]}),e===`search`?(0,M.jsx)(Et,{chatSessions:o,onSelectSession:e=>{l(e),t(`chat`)}}):e===`overview`?(0,M.jsx)(lt,{config:E,sessionsCount:o.length}):e===`portfolio`?(0,M.jsx)(Mt,{}):e===`skills`?(0,M.jsx)(xt,{}):e===`osskills`?(0,M.jsx)(Ct,{}):e===`settings`?(0,M.jsx)(vt,{config:E,onConfigChange:ne,autoLockTime:pe,setAutoLockTime:e=>{me(e),localStorage.setItem(`nyxora_auto_lock`,e.toString())}}):e===`rpcconfig`?(0,M.jsx)(Ot,{}):e===`defikeys`?(0,M.jsx)(Tt,{}):(0,M.jsx)(`div`,{className:`workspace-container`,children:(0,M.jsxs)(`div`,{className:`chat-wrapper`,style:{width:`100%`,margin:`0 auto`,maxWidth:`1000px`},children:[(0,M.jsxs)(`div`,{className:`chat-container`,children:[i.map((e,t)=>{let n=()=>{navigator.clipboard.writeText(e.content),oe(t),setTimeout(()=>oe(null),2e3)};return e.role===`user`?(0,M.jsxs)(`div`,{className:`message-wrapper user`,children:[(0,M.jsx)(`div`,{className:`message-bubble`,children:e.content}),(0,M.jsx)(`button`,{className:`copy-btn`,onClick:n,title:`Copy message`,children:ae===t?(0,M.jsx)(D,{size:14,color:`#a3be8c`}):(0,M.jsx)(le,{size:14})})]},t):e.role===`assistant`&&(e.content||e.tool_calls)?(0,M.jsxs)(`div`,{className:`message-wrapper agent`,children:[e.content&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`div`,{className:`message-bubble`,children:Ze(e.content)}),(0,M.jsx)(`button`,{className:`copy-btn`,onClick:n,title:`Copy message`,children:ae===t?(0,M.jsx)(D,{size:14,color:`#a3be8c`}):(0,M.jsx)(le,{size:14})})]}),e.tool_calls&&e.tool_calls.map((e,t)=>(0,M.jsxs)(`div`,{className:`tool-call`,children:[(0,M.jsx)(ee,{size:16,color:`#22c55e`}),`Executing: `,(0,M.jsx)(`code`,{children:e.function.name})]},`t-${t}`))]},t):null}),_&&(0,M.jsxs)(`div`,{className:`typing-indicator`,children:[(0,M.jsx)(`div`,{className:`dot`}),(0,M.jsx)(`div`,{className:`dot`}),(0,M.jsx)(`div`,{className:`dot`})]}),qe&&(0,M.jsx)(`div`,{className:`widget-container-live`,style:{marginTop:`16px`,marginBottom:`16px`},children:qe}),(0,M.jsx)(`div`,{ref:O})]}),(0,M.jsxs)(`div`,{className:`input-area`,children:[(0,M.jsxs)(`form`,{className:`input-form`,onSubmit:We,children:[(0,M.jsxs)(`div`,{className:`action-menu-container`,children:[(0,M.jsx)(`button`,{type:`button`,className:`voice-button plus-button`,disabled:_,title:`More Actions`,children:(0,M.jsx)(Fe,{size:20})}),(0,M.jsxs)(`div`,{className:`action-menu-items`,children:[(0,M.jsx)(`input`,{type:`file`,ref:se,style:{display:`none`},onChange:Se}),(0,M.jsx)(`button`,{type:`button`,className:`voice-button`,onClick:()=>se.current?.click(),disabled:_,title:`Upload Document`,style:{color:`var(--text-secondary)`},children:(0,M.jsx)(Ne,{size:18})}),(0,M.jsx)(`button`,{type:`button`,className:`voice-button ${S?`active pulse`:``}`,onClick:be,title:S?`Disable Voice Mode`:`Enable Voice Mode`,children:(0,M.jsx)(De,{size:18,color:S?`var(--accent)`:`currentColor`})})]})]}),(0,M.jsx)(`input`,{type:`text`,className:`chat-input`,placeholder:S?`Listening...`:`Message Nyxora Agent (Enter to send)...`,value:m,onChange:e=>h(e.target.value),disabled:_}),(0,M.jsx)(`button`,{type:`submit`,className:`send-button`,disabled:_||!m.trim(),children:(0,M.jsx)(Ve,{size:20})})]}),(0,M.jsxs)(`div`,{className:`trending-tokens`,children:[(0,M.jsx)(`span`,{children:`Trending Tokens:`}),n.map((e,t)=>(0,M.jsx)(`span`,{className:`token-tag`,onClick:()=>h(`Tolong berikan analisis pasar terbaru untuk ${e}`),title:`Click to analyze ${e}`,style:{cursor:`pointer`},children:e},t))]})]})]})}),(0,M.jsx)(Lt,{sessionId:c})]}),u&&(0,M.jsx)(`div`,{style:{position:`fixed`,top:0,left:0,right:0,bottom:0,backgroundColor:`rgba(0,0,0,0.6)`,backdropFilter:`blur(4px)`,display:`flex`,alignItems:`center`,justifyContent:`center`,zIndex:9999},children:(0,M.jsxs)(`div`,{style:{background:`#1e1e24`,borderRadius:`16px`,padding:`24px`,width:`400px`,boxShadow:`0 10px 25px rgba(0,0,0,0.5)`,border:`1px solid rgba(255,255,255,0.1)`},children:[(0,M.jsx)(`h3`,{style:{margin:`0 0 16px 0`,fontSize:`1.2rem`,color:`#e2e8f0`,fontWeight:500},children:`Rename this chat`}),(0,M.jsx)(`input`,{type:`text`,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&Ie(u,f),e.key===`Escape`&&d(null)},autoFocus:!0,style:{width:`100%`,background:`transparent`,color:`var(--text-primary)`,border:`1px solid #3f4451`,borderRadius:`8px`,padding:`14px 16px`,fontSize:`0.95rem`,outline:`none`,boxSizing:`border-box`},onFocus:e=>e.target.style.borderColor=`var(--accent)`,onBlur:e=>e.target.style.borderColor=`#3f4451`}),(0,M.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:`8px`,marginTop:`24px`},children:[(0,M.jsx)(`button`,{onClick:()=>d(null),style:{background:`transparent`,border:`none`,color:`#a0aec0`,cursor:`pointer`,padding:`10px 20px`,borderRadius:`24px`,fontWeight:500,fontSize:`0.9rem`},onMouseEnter:e=>e.currentTarget.style.background=`rgba(255,255,255,0.05)`,onMouseLeave:e=>e.currentTarget.style.background=`transparent`,children:`Cancel`}),(0,M.jsx)(`button`,{onClick:()=>Ie(u,f),style:{background:`var(--accent)`,border:`none`,color:`#13131a`,cursor:`pointer`,padding:`10px 20px`,borderRadius:`24px`,fontWeight:600,fontSize:`0.9rem`},onMouseEnter:e=>e.currentTarget.style.opacity=`0.9`,onMouseLeave:e=>e.currentTarget.style.opacity=`1`,children:`Rename`})]})]})})]})}(0,_.createRoot)(document.getElementById(`root`)).render((0,M.jsx)(g.StrictMode,{children:(0,M.jsx)(Ht,{})}));
|