nyxora 26.7.3 → 26.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/README.md +2 -2
  3. package/dist/packages/core/src/agent/llmProvider.js +4 -1
  4. package/dist/packages/core/src/agent/nyxDaemon.js +1 -1
  5. package/dist/packages/core/src/agent/osAgent.js +149 -1
  6. package/dist/packages/core/src/agent/reasoning.js +1 -1
  7. package/dist/packages/core/src/agent/web3Agent.js +1 -1
  8. package/dist/packages/core/src/gateway/googleAuthModule.js +2 -0
  9. package/dist/packages/core/src/gateway/telegram.js +7 -7
  10. package/dist/packages/core/src/memory/episodic.js +16 -5
  11. package/dist/packages/core/src/system/plugins/GoogleWorkspacePlugin.js +9 -1
  12. package/dist/packages/core/src/system/skills/executeShell.js +31 -4
  13. package/dist/packages/core/src/system/skills/googleWorkspace.js +106 -1
  14. package/dist/packages/core/src/system/skills/searchWeb.js +13 -6
  15. package/dist/packages/core/src/web3/skills/getPrice.js +1 -1
  16. package/dist/packages/core/src/web3/skills/marketAnalysis.js +1 -1
  17. package/package.json +3 -2
  18. package/packages/core/package.json +1 -1
  19. package/packages/core/src/agent/llmProvider.ts +4 -2
  20. package/packages/core/src/agent/nyxDaemon.ts +1 -1
  21. package/packages/core/src/agent/osAgent.ts +152 -1
  22. package/packages/core/src/agent/reasoning.ts +1 -1
  23. package/packages/core/src/agent/web3Agent.ts +1 -1
  24. package/packages/core/src/gateway/googleAuthModule.ts +2 -0
  25. package/packages/core/src/gateway/telegram.ts +7 -7
  26. package/packages/core/src/memory/episodic.ts +21 -9
  27. package/packages/core/src/system/plugins/GoogleWorkspacePlugin.ts +14 -2
  28. package/packages/core/src/system/skills/executeShell.ts +38 -7
  29. package/packages/core/src/system/skills/googleWorkspace.ts +109 -0
  30. package/packages/core/src/system/skills/searchWeb.ts +12 -6
  31. package/packages/core/src/web3/skills/getPrice.ts +1 -1
  32. package/packages/core/src/web3/skills/marketAnalysis.ts +1 -1
  33. package/packages/dashboard/dist/assets/{index-BTfp141V.js → index-Czxksiao.js} +1 -1
  34. package/packages/dashboard/dist/index.html +1 -1
  35. package/packages/dashboard/package.json +1 -1
  36. package/packages/mcp-server/package.json +1 -1
  37. package/packages/ml-engine/__pycache__/config.cpython-313.pyc +0 -0
  38. package/packages/ml-engine/__pycache__/main.cpython-313.pyc +0 -0
  39. package/packages/ml-engine/config.py +59 -0
  40. package/packages/ml-engine/main.py +34 -0
  41. package/packages/ml-engine/requirements.txt +22 -0
  42. package/packages/ml-engine/routers/__init__.py +1 -0
  43. package/packages/ml-engine/routers/__pycache__/__init__.cpython-313.pyc +0 -0
  44. package/packages/ml-engine/routers/__pycache__/cognitive.cpython-313.pyc +0 -0
  45. package/packages/ml-engine/routers/__pycache__/critic.cpython-313.pyc +0 -0
  46. package/packages/ml-engine/routers/__pycache__/llm.cpython-313.pyc +0 -0
  47. package/packages/ml-engine/routers/__pycache__/market.cpython-313.pyc +0 -0
  48. package/packages/ml-engine/routers/__pycache__/memory.cpython-313.pyc +0 -0
  49. package/packages/ml-engine/routers/cognitive.py +98 -0
  50. package/packages/ml-engine/routers/critic.py +111 -0
  51. package/packages/ml-engine/routers/llm.py +38 -0
  52. package/packages/ml-engine/routers/market.py +332 -0
  53. package/packages/ml-engine/routers/memory.py +125 -0
  54. package/packages/policy/package.json +1 -1
  55. package/packages/signer/package.json +1 -1
@@ -5,7 +5,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
5
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{ce=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?se(e):``}function ue(e){switch(e.tag){case 5:return se(e.type);case 16:return se(`Lazy`);case 13:return se(`Suspense`);case 19:return se(`SuspenseList`);case 0:case 2:case 15:return e=le(e.type,!1),e;case 11:return e=le(e.type.render,!1),e;case 1:return e=le(e.type,!0),e;default:return``}}function de(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 T:return`Fragment`;case w:return`Portal`;case ne:return`Profiler`;case te:return`StrictMode`;case k:return`Suspense`;case A:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case D:return(e.displayName||`Context`)+`.Consumer`;case E:return(e._context.displayName||`Context`)+`.Provider`;case O:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case j:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case M:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}function fe(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 de(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 pe(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function me(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function he(e){var t=me(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 ge(e){e._valueTracker||=he(e)}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=me(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ve(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 ye(e,t){var n=t.checked;return N({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function be(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=pe(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 xe(e,t){t=t.checked,t!=null&&ee(e,`checked`,t,!1)}function Se(e,t){xe(e,t);var n=pe(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`)?we(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&we(e,t.type,pe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ce(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 we(e,t,n){(t!==`number`||ve(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Te=Array.isArray;function Ee(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=``+pe(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 De(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return N({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Oe(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(Te(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:pe(n)}}function ke(e,t){var n=pe(t.value),r=pe(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 Ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function je(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 Me(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?je(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Ne,Pe=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(Ne||=document.createElement(`div`),Ne.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Ne.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ie={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},Le=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ie).forEach(function(e){Le.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ie[t]=Ie[e]})});function Re(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ie.hasOwnProperty(e)&&Ie[e]?(``+t).trim():t+`px`}function ze(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Re(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Be=N({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 Ve(e,t){if(t){if(Be[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 He(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 Ue=null;function We(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ge=null,Ke=null,P=null;function qe(e){if(e=Wi(e)){if(typeof Ge!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Ki(t),Ge(e.stateNode,e.type,t))}}function Je(e){Ke?P?P.push(e):P=[e]:Ke=e}function Ye(){if(Ke){var e=Ke,t=P;if(P=Ke=null,qe(e),t)for(e=0;e<t.length;e++)qe(t[e])}}function Xe(e,t){return e(t)}function Ze(){}var Qe=!1;function $e(e,t,n){if(Qe)return e(t,n);Qe=!0;try{return Xe(e,t,n)}finally{Qe=!1,(Ke!==null||P!==null)&&(Ze(),Ye())}}function et(e,t){var n=e.stateNode;if(n===null)return null;var i=Ki(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 tt=!1;if(c)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){tt=!0}}),window.addEventListener(`test`,nt,nt),window.removeEventListener(`test`,nt,nt)}catch{tt=!1}function rt(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 it=!1,at=null,ot=!1,st=null,ct={onError:function(e){it=!0,at=e}};function lt(e,t,n,r,i,a,o,s,c){it=!1,at=null,rt.apply(ct,arguments)}function ut(e,t,n,i,a,o,s,c,l){if(lt.apply(this,arguments),it){if(it){var u=at;it=!1,at=null}else throw Error(r(198));ot||(ot=!0,st=u)}}function dt(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 ft(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 pt(e){if(dt(e)!==e)throw Error(r(188))}function mt(e){var t=e.alternate;if(!t){if(t=dt(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 pt(a),e;if(o===i)return pt(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 ht(e){return e=mt(e),e===null?null:gt(e)}function gt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gt(e);if(t!==null)return t;e=e.sibling}return null}var _t=n.unstable_scheduleCallback,F=n.unstable_cancelCallback,vt=n.unstable_shouldYield,yt=n.unstable_requestPaint,I=n.unstable_now,bt=n.unstable_getCurrentPriorityLevel,xt=n.unstable_ImmediatePriority,St=n.unstable_UserBlockingPriority,Ct=n.unstable_NormalPriority,wt=n.unstable_LowPriority,Tt=n.unstable_IdlePriority,Et=null,Dt=null;function Ot(e){if(Dt&&typeof Dt.onCommitFiberRoot==`function`)try{Dt.onCommitFiberRoot(Et,e,void 0,(e.current.flags&128)==128)}catch{}}var kt=Math.clz32?Math.clz32:Mt,At=Math.log,jt=Math.LN2;function Mt(e){return e>>>=0,e===0?32:31-(At(e)/jt|0)|0}var Nt=64,Pt=4194304;function Ft(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 It(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=Ft(a))):r=Ft(s)}else o=n&~i,o===0?a!==0&&(r=Ft(a)):r=Ft(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-kt(t),i=1<<n,r|=e[n],t&=~i;return r}function Lt(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 Rt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-kt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Lt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function zt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Bt(){var e=Nt;return Nt<<=1,!(Nt&4194240)&&(Nt=64),e}function Vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ht(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-kt(t),e[t]=n}function Ut(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-kt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Wt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var L=0;function Gt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Kt,qt,Jt,Yt,Xt,Zt=!1,Qt=[],$t=null,en=null,tn=null,nn=new Map,rn=new Map,an=[],on=`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 sn(e,t){switch(e){case`focusin`:case`focusout`:$t=null;break;case`dragenter`:case`dragleave`:en=null;break;case`mouseover`:case`mouseout`:tn=null;break;case`pointerover`:case`pointerout`:nn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:rn.delete(t.pointerId)}}function cn(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=Wi(t),t!==null&&qt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function ln(e,t,n,r,i){switch(t){case`focusin`:return $t=cn($t,e,t,n,r,i),!0;case`dragenter`:return en=cn(en,e,t,n,r,i),!0;case`mouseover`:return tn=cn(tn,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return nn.set(a,cn(nn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,rn.set(a,cn(rn.get(a)||null,e,t,n,r,i)),!0}return!1}function un(e){var t=Ui(e.target);if(t!==null){var n=dt(t);if(n!==null){if(t=n.tag,t===13){if(t=ft(n),t!==null){e.blockedOn=t,Xt(e.priority,function(){Jt(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 dn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ue=r,n.target.dispatchEvent(r),Ue=null}else return t=Wi(n),t!==null&&qt(t),e.blockedOn=n,!1;t.shift()}return!0}function fn(e,t,n){dn(e)&&n.delete(t)}function pn(){Zt=!1,$t!==null&&dn($t)&&($t=null),en!==null&&dn(en)&&(en=null),tn!==null&&dn(tn)&&(tn=null),nn.forEach(fn),rn.forEach(fn)}function mn(e,t){e.blockedOn===t&&(e.blockedOn=null,Zt||(Zt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,pn)))}function hn(e){function t(t){return mn(t,e)}if(0<Qt.length){mn(Qt[0],e);for(var n=1;n<Qt.length;n++){var r=Qt[n];r.blockedOn===e&&(r.blockedOn=null)}}for($t!==null&&mn($t,e),en!==null&&mn(en,e),tn!==null&&mn(tn,e),nn.forEach(t),rn.forEach(t),n=0;n<an.length;n++)r=an[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<an.length&&(n=an[0],n.blockedOn===null);)un(n),n.blockedOn===null&&an.shift()}var gn=S.ReactCurrentBatchConfig,_n=!0;function vn(e,t,n,r){var i=L,a=gn.transition;gn.transition=null;try{L=1,bn(e,t,n,r)}finally{L=i,gn.transition=a}}function yn(e,t,n,r){var i=L,a=gn.transition;gn.transition=null;try{L=4,bn(e,t,n,r)}finally{L=i,gn.transition=a}}function bn(e,t,n,r){if(_n){var i=Sn(e,t,n,r);if(i===null)hi(e,t,r,xn,n),sn(e,r);else if(ln(i,e,t,n,r))r.stopPropagation();else if(sn(e,r),t&4&&-1<on.indexOf(e)){for(;i!==null;){var a=Wi(i);if(a!==null&&Kt(a),a=Sn(e,t,n,r),a===null&&hi(e,t,r,xn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else hi(e,t,r,null,n)}}var xn=null;function Sn(e,t,n,r){if(xn=null,e=We(r),e=Ui(e),e!==null)if(t=dt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ft(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 xn=e,null}function Cn(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(bt()){case xt:return 1;case St:return 4;case Ct:case wt:return 16;case Tt:return 536870912;default:return 16}default:return 16}}var wn=null,Tn=null,En=null;function Dn(){if(En)return En;var e,t=Tn,n=t.length,r,i=`value`in wn?wn.value:wn.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 En=i.slice(e,1<r?1-r:void 0)}function On(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 kn(){return!0}function An(){return!1}function jn(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)?kn:An,this.isPropagationStopped=An,this}return N(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=kn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=kn)},persist:function(){},isPersistent:kn}),t}var Mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nn=jn(Mn),Pn=N({},Mn,{view:0,detail:0}),Fn=jn(Pn),In,Ln,Rn,zn=N({},Pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xn,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!==Rn&&(Rn&&e.type===`mousemove`?(In=e.screenX-Rn.screenX,Ln=e.screenY-Rn.screenY):Ln=In=0,Rn=e),In)},movementY:function(e){return`movementY`in e?e.movementY:Ln}}),Bn=jn(zn),Vn=jn(N({},zn,{dataTransfer:0})),Hn=jn(N({},Pn,{relatedTarget:0})),Un=jn(N({},Mn,{animationName:0,elapsedTime:0,pseudoElement:0})),Wn=jn(N({},Mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Gn=jn(N({},Mn,{data:0})),Kn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},qn={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`},Jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Yn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jn[e])?!!t[e]:!1}function Xn(){return Yn}var Zn=jn(N({},Pn,{key:function(e){if(e.key){var t=Kn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=On(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xn,charCode:function(e){return e.type===`keypress`?On(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?On(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Qn=jn(N({},zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),$n=jn(N({},Pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xn})),er=jn(N({},Mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),tr=jn(N({},zn,{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})),nr=[9,13,27,32],rr=c&&`CompositionEvent`in window,ir=null;c&&`documentMode`in document&&(ir=document.documentMode);var ar=c&&`TextEvent`in window&&!ir,or=c&&(!rr||ir&&8<ir&&11>=ir),sr=` `,cr=!1;function lr(e,t){switch(e){case`keyup`:return nr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ur(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var dr=!1;function fr(e,t){switch(e){case`compositionend`:return ur(t);case`keypress`:return t.which===32?(cr=!0,sr):null;case`textInput`:return e=t.data,e===sr&&cr?null:e;default:return null}}function pr(e,t){if(dr)return e===`compositionend`||!rr&&lr(e,t)?(e=Dn(),En=Tn=wn=null,dr=!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 or&&t.locale!==`ko`?null:t.data;default:return null}}var mr={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 hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!mr[e.type]:t===`textarea`}function gr(e,t,n,r){Je(r),t=_i(t,`onChange`),0<t.length&&(n=new Nn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var _r=null,vr=null;function yr(e){ui(e,0)}function br(e){if(_e(Gi(e)))return e}function xr(e,t){if(e===`change`)return t}var Sr=!1;if(c){var Cr;if(c){var wr=`oninput`in document;if(!wr){var Tr=document.createElement(`div`);Tr.setAttribute(`oninput`,`return;`),wr=typeof Tr.oninput==`function`}Cr=wr}else Cr=!1;Sr=Cr&&(!document.documentMode||9<document.documentMode)}function Er(){_r&&(_r.detachEvent(`onpropertychange`,Dr),vr=_r=null)}function Dr(e){if(e.propertyName===`value`&&br(vr)){var t=[];gr(t,vr,e,We(e)),$e(yr,t)}}function Or(e,t,n){e===`focusin`?(Er(),_r=t,vr=n,_r.attachEvent(`onpropertychange`,Dr)):e===`focusout`&&Er()}function kr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return br(vr)}function Ar(e,t){if(e===`click`)return br(t)}function jr(e,t){if(e===`input`||e===`change`)return br(t)}function Mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Nr=typeof Object.is==`function`?Object.is:Mr;function Pr(e,t){if(Nr(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)||!Nr(e[i],t[i]))return!1}return!0}function Fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ir(e,t){var n=Fr(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=Fr(n)}}function Lr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rr(){for(var e=window,t=ve();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ve(e.document)}return t}function zr(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 Br(e){var t=Rr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Lr(n.ownerDocument.documentElement,n)){if(r!==null&&zr(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=Ir(n,a);var o=Ir(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 Vr=c&&`documentMode`in document&&11>=document.documentMode,Hr=null,Ur=null,Wr=null,Gr=!1;function Kr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gr||Hr==null||Hr!==ve(r)||(r=Hr,`selectionStart`in r&&zr(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}),Wr&&Pr(Wr,r)||(Wr=r,r=_i(Ur,`onSelect`),0<r.length&&(t=new Nn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Hr)))}function qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Jr={animationend:qr(`Animation`,`AnimationEnd`),animationiteration:qr(`Animation`,`AnimationIteration`),animationstart:qr(`Animation`,`AnimationStart`),transitionend:qr(`Transition`,`TransitionEnd`)},Yr={},Xr={};c&&(Xr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),`TransitionEvent`in window||delete Jr.transitionend.transition);function Zr(e){if(Yr[e])return Yr[e];if(!Jr[e])return e;var t=Jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Xr)return Yr[e]=t[n];return e}var Qr=Zr(`animationend`),$r=Zr(`animationiteration`),ei=Zr(`animationstart`),ti=Zr(`transitionend`),ni=new Map,ri=`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 ii(e,t){ni.set(e,t),o(t,[e])}for(var ai=0;ai<ri.length;ai++){var oi=ri[ai];ii(oi.toLowerCase(),`on`+(oi[0].toUpperCase()+oi.slice(1)))}ii(Qr,`onAnimationEnd`),ii($r,`onAnimationIteration`),ii(ei,`onAnimationStart`),ii(`dblclick`,`onDoubleClick`),ii(`focusin`,`onFocus`),ii(`focusout`,`onBlur`),ii(ti,`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 si=`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(` `),ci=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(si));function li(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,ut(r,t,void 0,e),e.currentTarget=null}function ui(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;li(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;li(i,s,l),a=c}}}if(ot)throw e=st,ot=!1,st=null,e}function R(e,t){var n=t[Bi];n===void 0&&(n=t[Bi]=new Set);var r=e+`__bubble`;n.has(r)||(mi(t,e,2,!1),n.add(r))}function di(e,t,n){var r=0;t&&(r|=4),mi(n,e,r,t)}var fi=`_reactListening`+Math.random().toString(36).slice(2);function pi(e){if(!e[fi]){e[fi]=!0,i.forEach(function(t){t!==`selectionchange`&&(ci.has(t)||di(t,!1,e),di(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fi]||(t[fi]=!0,di(`selectionchange`,!1,t))}}function mi(e,t,n,r){switch(Cn(t)){case 1:var i=vn;break;case 4:i=yn;break;default:i=bn}n=i.bind(null,t,n,e),i=void 0,!tt||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 hi(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=Ui(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}$e(function(){var r=a,i=We(n),o=[];a:{var s=ni.get(e);if(s!==void 0){var c=Nn,l=e;switch(e){case`keypress`:if(On(n)===0)break a;case`keydown`:case`keyup`:c=Zn;break;case`focusin`:l=`focus`,c=Hn;break;case`focusout`:l=`blur`,c=Hn;break;case`beforeblur`:case`afterblur`:c=Hn;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=Bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Vn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=$n;break;case Qr:case $r:case ei:c=Un;break;case ti:c=er;break;case`scroll`:c=Fn;break;case`wheel`:c=tr;break;case`copy`:case`cut`:case`paste`:c=Wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Qn}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=et(p,f),h!=null&&u.push(gi(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!==Ue&&(l=n.relatedTarget||n.fromElement)&&(Ui(l)||l[zi]))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?Ui(l):null,l!==null&&(d=dt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Bn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=Qn,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Gi(c),m=l==null?s:Gi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ui(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=vi(m))p++;for(m=0,h=f;h;h=vi(h))m++;for(;0<p-m;)u=vi(u),p--;for(;0<m-p;)f=vi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=vi(u),f=vi(f)}u=null}else u=null;c!==null&&yi(o,s,c,u,!1),l!==null&&d!==null&&yi(o,d,l,u,!0)}}a:{if(s=r?Gi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=xr;else if(hr(s))if(Sr)g=jr;else{g=kr;var _=Or}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Ar);if(g&&=g(e,r)){gr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&we(s,`number`,s.value)}switch(_=r?Gi(r):window,e){case`focusin`:(hr(_)||_.contentEditable===`true`)&&(Hr=_,Ur=r,Wr=null);break;case`focusout`:Wr=Ur=Hr=null;break;case`mousedown`:Gr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Gr=!1,Kr(o,n,i);break;case`selectionchange`:if(Vr)break;case`keydown`:case`keyup`:Kr(o,n,i)}var v;if(rr)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 dr?lr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(or&&n.locale!==`ko`&&(dr||y!==`onCompositionStart`?y===`onCompositionEnd`&&dr&&(v=Dn()):(wn=i,Tn=`value`in wn?wn.value:wn.textContent,dr=!0)),_=_i(r,y),0<_.length&&(y=new Gn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=ur(n),v!==null&&(y.data=v)))),(v=ar?fr(e,n):pr(e,n))&&(r=_i(r,`onBeforeInput`),0<r.length&&(i=new Gn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}ui(o,t)})}function gi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _i(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=et(e,n),a!=null&&r.unshift(gi(e,a,i)),a=et(e,t),a!=null&&r.push(gi(e,a,i))),e=e.return}return r}function vi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function yi(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=et(n,a),c!=null&&o.unshift(gi(n,c,s))):i||(c=et(n,a),c!=null&&o.push(gi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var bi=/\r\n?/g,xi=/\u0000|\uFFFD/g;function Si(e){return(typeof e==`string`?e:``+e).replace(bi,`
6
6
  `).replace(xi,``)}function Ci(e,t,n){if(t=Si(t),Si(e)!==t&&n)throw Error(r(425))}function wi(){}var Ti=null,Ei=null;function Di(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 Oi=typeof setTimeout==`function`?setTimeout:void 0,ki=typeof clearTimeout==`function`?clearTimeout:void 0,Ai=typeof Promise==`function`?Promise:void 0,ji=typeof queueMicrotask==`function`?queueMicrotask:Ai===void 0?Oi:function(e){return Ai.resolve(null).then(e).catch(Mi)};function Mi(e){setTimeout(function(){throw e})}function Ni(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),hn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);hn(t)}function Pi(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 Fi(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 Ii=Math.random().toString(36).slice(2),Li=`__reactFiber$`+Ii,Ri=`__reactProps$`+Ii,zi=`__reactContainer$`+Ii,Bi=`__reactEvents$`+Ii,Vi=`__reactListeners$`+Ii,Hi=`__reactHandles$`+Ii;function Ui(e){var t=e[Li];if(t)return t;for(var n=e.parentNode;n;){if(t=n[zi]||n[Li]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Fi(e);e!==null;){if(n=e[Li])return n;e=Fi(e)}return t}e=n,n=e.parentNode}return null}function Wi(e){return e=e[Li]||e[zi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Ki(e){return e[Ri]||null}var qi=[],Ji=-1;function Yi(e){return{current:e}}function z(e){0>Ji||(e.current=qi[Ji],qi[Ji]=null,Ji--)}function B(e,t){Ji++,qi[Ji]=e.current,e.current=t}var Xi={},Zi=Yi(Xi),Qi=Yi(!1),$i=Xi;function ea(e,t){var n=e.type.contextTypes;if(!n)return Xi;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 ta(e){return e=e.childContextTypes,e!=null}function na(){z(Qi),z(Zi)}function ra(e,t,n){if(Zi.current!==Xi)throw Error(r(168));B(Zi,t),B(Qi,n)}function ia(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,fe(e)||`Unknown`,a));return N({},n,i)}function aa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xi,$i=Zi.current,B(Zi,e),B(Qi,Qi.current),!0}function oa(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=ia(e,t,$i),i.__reactInternalMemoizedMergedChildContext=e,z(Qi),z(Zi),B(Zi,e)):z(Qi),B(Qi,n)}var sa=null,ca=!1,la=!1;function ua(e){sa===null?sa=[e]:sa.push(e)}function da(e){ca=!0,ua(e)}function fa(){if(!la&&sa!==null){la=!0;var e=0,t=L;try{var n=sa;for(L=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}sa=null,ca=!1}catch(t){throw sa!==null&&(sa=sa.slice(e+1)),_t(xt,fa),t}finally{L=t,la=!1}}return null}var pa=[],ma=0,ha=null,ga=0,_a=[],va=0,ya=null,ba=1,xa=``;function Sa(e,t){pa[ma++]=ga,pa[ma++]=ha,ha=e,ga=t}function Ca(e,t,n){_a[va++]=ba,_a[va++]=xa,_a[va++]=ya,ya=e;var r=ba;e=xa;var i=32-kt(r)-1;r&=~(1<<i),n+=1;var a=32-kt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ba=1<<32-kt(t)+i|n<<i|r,xa=a+e}else ba=1<<a|n<<i|r,xa=e}function wa(e){e.return!==null&&(Sa(e,1),Ca(e,1,0))}function Ta(e){for(;e===ha;)ha=pa[--ma],pa[ma]=null,ga=pa[--ma],pa[ma]=null;for(;e===ya;)ya=_a[--va],_a[va]=null,xa=_a[--va],_a[va]=null,ba=_a[--va],_a[va]=null}var Ea=null,Da=null,V=!1,Oa=null;function ka(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 Aa(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,Ea=e,Da=Pi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,Ea=e,Da=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=ya===null?null:{id:ba,overflow:xa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Kl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ea=e,Da=null,!0);default:return!1}}function ja(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Ma(e){if(V){var t=Da;if(t){var n=t;if(!Aa(e,t)){if(ja(e))throw Error(r(418));t=Pi(n.nextSibling);var i=Ea;t&&Aa(e,t)?ka(i,n):(e.flags=e.flags&-4097|2,V=!1,Ea=e)}}else{if(ja(e))throw Error(r(418));e.flags=e.flags&-4097|2,V=!1,Ea=e}}}function Na(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ea=e}function Pa(e){if(e!==Ea)return!1;if(!V)return Na(e),V=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Di(e.type,e.memoizedProps)),t&&=Da){if(ja(e))throw Fa(),Error(r(418));for(;t;)ka(e,t),t=Pi(t.nextSibling)}if(Na(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){Da=Pi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Da=null}}else Da=Ea?Pi(e.stateNode.nextSibling):null;return!0}function Fa(){for(var e=Da;e;)e=Pi(e.nextSibling)}function Ia(){Da=Ea=null,V=!1}function La(e){Oa===null?Oa=[e]:Oa.push(e)}var Ra=S.ReactCurrentBatchConfig;function za(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 Ba(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Va(e){var t=e._init;return t(e._payload)}function Ha(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===T?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===M&&Va(i)===t.type)?(r=a(t,n.props),r.ref=za(e,t,n),r.return=e,r):(r=Xl(n.type,n.key,n.props,null,e.mode,r),r.ref=za(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 C:return n=Xl(t.type,t.key,t.props,null,e.mode,n),n.ref=za(e,null,t),n.return=e,n;case w:return t=eu(t,e.mode,n),t.return=e,t;case M:var r=t._init;return f(e,r(t._payload),n)}if(Te(t)||ae(t))return t=Zl(t,e.mode,n,null),t.return=e,t;Ba(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 C:return n.key===i?l(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case M:return i=n._init,p(e,t,i(n._payload),r)}if(Te(n)||ae(n))return i===null?d(e,t,n,r,null):null;Ba(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 C:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case w:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case M:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Te(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);Ba(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),V&&Sa(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 V&&Sa(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)}),V&&Sa(r,h),l}function g(a,s,c,l){var u=ae(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),V&&Sa(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 V&&Sa(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)}),V&&Sa(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===T&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case C:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===T){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===M&&Va(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=za(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===T?(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=za(e,r,i),o.return=e,e=o)}return s(e);case w: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 M:return l=i._init,_(e,r,l(i._payload),o)}if(Te(i))return h(e,r,i,o);if(ae(i))return g(e,r,i,o);Ba(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 Ua=Ha(!0),Wa=Ha(!1),Ga=Yi(null),Ka=null,qa=null,Ja=null;function Ya(){Ja=qa=Ka=null}function Xa(e){var t=Ga.current;z(Ga),e._currentValue=t}function Za(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 Qa(e,t){Ka=e,Ja=qa=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Rs=!0),e.firstContext=null)}function $a(e){var t=e._currentValue;if(Ja!==e)if(e={context:e,memoizedValue:t,next:null},qa===null){if(Ka===null)throw Error(r(308));qa=e,Ka.dependencies={lanes:0,firstContext:e}}else qa=qa.next=e;return t}var eo=null;function to(e){eo===null?eo=[e]:eo.push(e)}function no(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,to(t)):(n.next=i.next,i.next=n),t.interleaved=n,ro(e,r)}function ro(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 io=!1;function ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oo(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 so(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function co(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,ro(e,n)}return i=r.interleaved,i===null?(t.next=t,to(r)):(t.next=i.next,i.next=t),r.interleaved=t,ro(e,n)}function lo(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,Wt(e,n)}}function uo(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 fo(e,t,n,r){var i=e.updateQueue;io=!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=N({},d,f);break a;case 2:io=!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 po(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 mo={},ho=Yi(mo),go=Yi(mo),_o=Yi(mo);function vo(e){if(e===mo)throw Error(r(174));return e}function yo(e,t){switch(B(_o,t),B(go,e),B(ho,mo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Me(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Me(t,e)}z(ho),B(ho,t)}function bo(){z(ho),z(go),z(_o)}function xo(e){vo(_o.current);var t=vo(ho.current),n=Me(t,e.type);t!==n&&(B(go,e),B(ho,n))}function So(e){go.current===e&&(z(ho),z(go))}var H=Yi(0);function Co(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||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 wo=[];function To(){for(var e=0;e<wo.length;e++)wo[e]._workInProgressVersionPrimary=null;wo.length=0}var Eo=S.ReactCurrentDispatcher,Do=S.ReactCurrentBatchConfig,Oo=0,U=null,W=null,G=null,ko=!1,Ao=!1,jo=0,Mo=0;function No(){throw Error(r(321))}function Po(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nr(e[n],t[n]))return!1;return!0}function Fo(e,t,n,i,a,o){if(Oo=o,U=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Eo.current=e===null||e.memoizedState===null?vs:ys,e=n(i,a),Ao){o=0;do{if(Ao=!1,jo=0,25<=o)throw Error(r(301));o+=1,G=W=null,t.updateQueue=null,Eo.current=bs,e=n(i,a)}while(Ao)}if(Eo.current=_s,t=W!==null&&W.next!==null,Oo=0,G=W=U=null,ko=!1,t)throw Error(r(300));return e}function Io(){var e=jo!==0;return jo=0,e}function Lo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return G===null?U.memoizedState=G=e:G=G.next=e,G}function Ro(){if(W===null){var e=U.alternate;e=e===null?null:e.memoizedState}else e=W.next;var t=G===null?U.memoizedState:G.next;if(t!==null)G=t,W=e;else{if(e===null)throw Error(r(310));W=e,e={memoizedState:W.memoizedState,baseState:W.baseState,baseQueue:W.baseQueue,queue:W.queue,next:null},G===null?U.memoizedState=G=e:G=G.next=e}return G}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){var t=Ro(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=W,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((Oo&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,U.lanes|=d,Yc|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Nr(i,t.memoizedState)||(Rs=!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,U.lanes|=o,Yc|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Vo(e){var t=Ro(),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);Nr(o,t.memoizedState)||(Rs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Ho(){}function Uo(e,t){var n=U,i=Ro(),a=t(),o=!Nr(i.memoizedState,a);if(o&&(i.memoizedState=a,Rs=!0),i=i.queue,ts(Ko.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||G!==null&&G.memoizedState.tag&1){if(n.flags|=2048,Xo(9,Go.bind(null,n,i,a,t),void 0,null),Y===null)throw Error(r(349));Oo&30||Wo(n,t,a)}return a}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=U.updateQueue,t===null?(t={lastEffect:null,stores:null},U.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nr(e,n)}catch{return!0}}function Jo(e){var t=ro(e,1);t!==null&&hl(t,e,1,-1)}function Yo(e){var t=Lo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t.queue=e,e=e.dispatch=ps.bind(null,U,e),[t.memoizedState,e]}function Xo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=U.updateQueue,t===null?(t={lastEffect:null,stores:null},U.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 Zo(){return Ro().memoizedState}function Qo(e,t,n,r){var i=Lo();U.flags|=e,i.memoizedState=Xo(1|t,n,void 0,r===void 0?null:r)}function $o(e,t,n,r){var i=Ro();r=r===void 0?null:r;var a=void 0;if(W!==null){var o=W.memoizedState;if(a=o.destroy,r!==null&&Po(r,o.deps)){i.memoizedState=Xo(t,n,a,r);return}}U.flags|=e,i.memoizedState=Xo(1|t,n,a,r)}function es(e,t){return Qo(8390656,8,e,t)}function ts(e,t){return $o(2048,8,e,t)}function ns(e,t){return $o(4,2,e,t)}function rs(e,t){return $o(4,4,e,t)}function is(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 as(e,t,n){return n=n==null?null:n.concat([e]),$o(4,4,is.bind(null,t,e),n)}function os(){}function ss(e,t){var n=Ro();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Po(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function cs(e,t){var n=Ro();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Po(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ls(e,t,n){return Oo&21?(Nr(n,t)||(n=Bt(),U.lanes|=n,Yc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Rs=!0),e.memoizedState=n)}function us(e,t){var n=L;L=n!==0&&4>n?n:4,e(!0);var r=Do.transition;Do.transition={};try{e(!1),t()}finally{L=n,Do.transition=r}}function ds(){return Ro().memoizedState}function fs(e,t,n){var r=ml(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ms(e))hs(t,n);else if(n=no(e,t,n,r),n!==null){var i=pl();hl(n,e,r,i),gs(n,t,r)}}function ps(e,t,n){var r=ml(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ms(e))hs(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,Nr(s,o)){var c=t.interleaved;c===null?(i.next=i,to(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=no(e,t,i,r),n!==null&&(i=pl(),hl(n,e,r,i),gs(n,t,r))}}function ms(e){var t=e.alternate;return e===U||t!==null&&t===U}function hs(e,t){Ao=ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Wt(e,n)}}var _s={readContext:$a,useCallback:No,useContext:No,useEffect:No,useImperativeHandle:No,useInsertionEffect:No,useLayoutEffect:No,useMemo:No,useReducer:No,useRef:No,useState:No,useDebugValue:No,useDeferredValue:No,useTransition:No,useMutableSource:No,useSyncExternalStore:No,useId:No,unstable_isNewReconciler:!1},vs={readContext:$a,useCallback:function(e,t){return Lo().memoizedState=[e,t===void 0?null:t],e},useContext:$a,useEffect:es,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),Qo(4194308,4,is.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qo(4,2,e,t)},useMemo:function(e,t){var n=Lo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lo();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=fs.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var t=Lo();return e={current:e},t.memoizedState=e},useState:Yo,useDebugValue:os,useDeferredValue:function(e){return Lo().memoizedState=e},useTransition:function(){var e=Yo(!1),t=e[0];return e=us.bind(null,e[1]),Lo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=U,a=Lo();if(V){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Y===null)throw Error(r(349));Oo&30||Wo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,es(Ko.bind(null,i,o,e),[e]),i.flags|=2048,Xo(9,Go.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Lo(),t=Y.identifierPrefix;if(V){var n=xa,r=ba;n=(r&~(1<<32-kt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=jo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Mo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},ys={readContext:$a,useCallback:ss,useContext:$a,useEffect:ts,useImperativeHandle:as,useInsertionEffect:ns,useLayoutEffect:rs,useMemo:cs,useReducer:Bo,useRef:Zo,useState:function(){return Bo(zo)},useDebugValue:os,useDeferredValue:function(e){return ls(Ro(),W.memoizedState,e)},useTransition:function(){return[Bo(zo)[0],Ro().memoizedState]},useMutableSource:Ho,useSyncExternalStore:Uo,useId:ds,unstable_isNewReconciler:!1},bs={readContext:$a,useCallback:ss,useContext:$a,useEffect:ts,useImperativeHandle:as,useInsertionEffect:ns,useLayoutEffect:rs,useMemo:cs,useReducer:Vo,useRef:Zo,useState:function(){return Vo(zo)},useDebugValue:os,useDeferredValue:function(e){var t=Ro();return W===null?t.memoizedState=e:ls(t,W.memoizedState,e)},useTransition:function(){return[Vo(zo)[0],Ro().memoizedState]},useMutableSource:Ho,useSyncExternalStore:Uo,useId:ds,unstable_isNewReconciler:!1};function xs(e,t){if(e&&e.defaultProps){for(var n in t=N({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ss(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:N({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Cs={isMounted:function(e){return(e=e._reactInternals)?dt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pl(),i=ml(e),a=so(r,i);a.payload=t,n!=null&&(a.callback=n),t=co(e,a,i),t!==null&&(hl(t,e,i,r),lo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pl(),i=ml(e),a=so(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=co(e,a,i),t!==null&&(hl(t,e,i,r),lo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pl(),r=ml(e),i=so(n,r);i.tag=2,t!=null&&(i.callback=t),t=co(e,i,r),t!==null&&(hl(t,e,r,n),lo(t,e,r))}};function ws(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?!Pr(n,r)||!Pr(i,a):!0}function Ts(e,t,n){var r=!1,i=Xi,a=t.contextType;return typeof a==`object`&&a?a=$a(a):(i=ta(t)?$i:Zi.current,r=t.contextTypes,a=(r=r!=null)?ea(e,i):Xi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Cs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Es(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&&Cs.enqueueReplaceState(t,t.state,null)}function Ds(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},ao(e);var a=t.contextType;typeof a==`object`&&a?i.context=$a(a):(a=ta(t)?$i:Zi.current,i.context=ea(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(Ss(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&&Cs.enqueueReplaceState(i,i.state,null),fo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Os(e,t){try{var n=``,r=t;do n+=ue(r),r=r.return;while(r);var i=n}catch(e){i=`
7
7
  Error generating stack: `+e.message+`
8
- `+e.stack}return{value:e,source:t,stack:i,digest:null}}function ks(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function As(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var js=typeof WeakMap==`function`?WeakMap:Map;function Ms(e,t,n){n=so(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rl||(rl=!0,il=r),As(e,t)},n}function Ns(e,t,n){n=so(-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(){As(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){As(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 Ps(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new js;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 Fs(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 Is(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=so(-1,1),t.tag=2,co(n,t,1))),n.lanes|=1),e)}var Ls=S.ReactCurrentOwner,Rs=!1;function zs(e,t,n,r){t.child=e===null?Wa(t,null,n,r):Ua(t,e.child,n,r)}function Bs(e,t,n,r,i){n=n.render;var a=t.ref;return Qa(t,i),r=Fo(e,t,n,r,a,i),n=Io(),e!==null&&!Rs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oc(e,t,i)):(V&&n&&wa(t),t.flags|=1,zs(e,t,r,i),t.child)}function Vs(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,Hs(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?Pr:n,n(o,r)&&e.ref===t.ref)return oc(e,t,i)}return t.flags|=1,e=Yl(a,r),e.ref=t.ref,e.return=t,t.child=e}function Hs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Pr(a,r)&&e.ref===t.ref)if(Rs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Rs=!0);else return t.lanes=e.lanes,oc(e,t,i)}return Gs(e,t,n,r,i)}function Us(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},B(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,B(qc,Kc),Kc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,B(qc,Kc),Kc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),B(qc,Kc),Kc|=r;return zs(e,t,i,n),t.child}function Ws(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Gs(e,t,n,r,i){var a=ta(n)?$i:Zi.current;return a=ea(t,a),Qa(t,i),n=Fo(e,t,n,r,a,i),r=Io(),e!==null&&!Rs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oc(e,t,i)):(V&&r&&wa(t),t.flags|=1,zs(e,t,n,i),t.child)}function Ks(e,t,n,r,i){if(ta(n)){var a=!0;aa(t)}else a=!1;if(Qa(t,i),t.stateNode===null)ac(e,t),Ts(t,n,r),Ds(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=$a(l):(l=ta(n)?$i:Zi.current,l=ea(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)&&Es(t,o,r,l),io=!1;var f=t.memoizedState;o.state=f,fo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Qi.current||io?(typeof u==`function`&&(Ss(t,n,u,r),c=t.memoizedState),(s=io||ws(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,oo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:xs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=$a(c):(c=ta(n)?$i:Zi.current,c=ea(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)&&Es(t,o,r,c),io=!1,f=t.memoizedState,o.state=f,fo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Qi.current||io?(typeof p==`function`&&(Ss(t,n,p,r),m=t.memoizedState),(l=io||ws(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 qs(e,t,n,r,a,i)}function qs(e,t,n,r,i,a){Ws(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&oa(t,n,!1),oc(e,t,a);r=t.stateNode,Ls.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ua(t,e.child,null,a),t.child=Ua(t,null,s,a)):zs(e,t,s,a),t.memoizedState=r.state,i&&oa(t,n,!0),t.child}function Js(e){var t=e.stateNode;t.pendingContext?ra(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ra(e,t.context,!1),yo(e,t.containerInfo)}function Ys(e,t,n,r,i){return Ia(),La(i),t.flags|=256,zs(e,t,n,r),t.child}var Xs={dehydrated:null,treeContext:null,retryLane:0};function Zs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qs(e,t,n){var r=t.pendingProps,i=H.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),B(H,i&1),e===null)return Ma(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=Zs(n),t.memoizedState=Xs,e):$s(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return tc(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?Zs(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Xs,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 $s(e,t){return t=Ql({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function ec(e,t,n,r){return r!==null&&La(r),Ua(t,e.child,null,n),e=$s(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=ks(Error(r(422))),ec(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&&Ua(t,e.child,null,s),t.child.memoizedState=Zs(s),t.memoizedState=Xs,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return ec(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=ks(o,i,void 0),ec(e,t,s,i)}if(c=(s&e.childLanes)!==0,Rs||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,ro(e,a),hl(i,e,a,-1))}return kl(),i=ks(Error(r(421))),ec(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,Da=Pi(a.nextSibling),Ea=t,V=!0,Oa=null,e!==null&&(_a[va++]=ba,_a[va++]=xa,_a[va++]=ya,ba=e.id,xa=e.overflow,ya=t),t=$s(t,i.children),t.flags|=4096,t)}function nc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Za(e.return,t,n)}function rc(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 ic(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(zs(e,t,r.children,n),r=H.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&&nc(e,n,t);else if(e.tag===19)nc(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(B(H,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&&Co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rc(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&&Co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rc(t,!0,n,null,a);break;case`together`:rc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ac(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function oc(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 sc(e,t,n){switch(t.tag){case 3:Js(t),Ia();break;case 5:xo(t);break;case 1:ta(t.type)&&aa(t);break;case 4:yo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;B(Ga,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(B(H,H.current&1),e=oc(e,t,n),e===null?null:e.sibling):Qs(e,t,n):(B(H,H.current&1),t.flags|=128,null);B(H,H.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ic(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(H,H.current),r)break;return null;case 22:case 23:return t.lanes=0,Us(e,t,n)}return oc(e,t,n)}var cc=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}},lc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,vo(ho.current);var o=null;switch(n){case`input`:i=ye(e,i),r=ye(e,r),o=[];break;case`select`:i=N({},i,{value:void 0}),r=N({},r,{value:void 0}),o=[];break;case`textarea`:i=De(e,i),r=De(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=wi)}Ve(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`&&R(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},uc=function(e,t,n,r){n!==r&&(t.flags|=4)};function dc(e,t){if(!V)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 fc(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 pc(e,t,n){var i=t.pendingProps;switch(Ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fc(t),null;case 1:return ta(t.type)&&na(),fc(t),null;case 3:return i=t.stateNode,bo(),z(Qi),z(Zi),To(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Pa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Oa!==null&&(yl(Oa),Oa=null))),fc(t),null;case 5:So(t);var o=vo(_o.current);if(n=t.type,e!==null&&t.stateNode!=null)lc(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 fc(t),null}if(e=vo(ho.current),Pa(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Li]=t,i[Ri]=s,e=(t.mode&1)!=0,n){case`dialog`:R(`cancel`,i),R(`close`,i);break;case`iframe`:case`object`:case`embed`:R(`load`,i);break;case`video`:case`audio`:for(o=0;o<si.length;o++)R(si[o],i);break;case`source`:R(`error`,i);break;case`img`:case`image`:case`link`:R(`error`,i),R(`load`,i);break;case`details`:R(`toggle`,i);break;case`input`:be(i,s),R(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},R(`invalid`,i);break;case`textarea`:Oe(i,s),R(`invalid`,i)}for(var c in Ve(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ci(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ci(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&R(`scroll`,i)}switch(n){case`input`:ge(i),Ce(i,s,!0);break;case`textarea`:ge(i),Ae(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=wi)}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=je(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[Li]=t,e[Ri]=i,cc(e,t,!1,!1),t.stateNode=e;a:{switch(c=He(n,i),n){case`dialog`:R(`cancel`,e),R(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:R(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<si.length;o++)R(si[o],e);o=i;break;case`source`:R(`error`,e),o=i;break;case`img`:case`image`:case`link`:R(`error`,e),R(`load`,e),o=i;break;case`details`:R(`toggle`,e),o=i;break;case`input`:be(e,i),o=ye(e,i),R(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=N({},i,{value:void 0}),R(`invalid`,e);break;case`textarea`:Oe(e,i),o=De(e,i),R(`invalid`,e);break;default:o=i}for(s in Ve(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?ze(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Pe(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Fe(e,u):typeof u==`number`&&Fe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&R(`scroll`,e):u!=null&&ee(e,s,u,c))}switch(n){case`input`:ge(e),Ce(e,i,!1);break;case`textarea`:ge(e),Ae(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+pe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Ee(e,!!i.multiple,i.defaultValue,!0):Ee(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=wi)}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 fc(t),null;case 6:if(e&&t.stateNode!=null)uc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=vo(_o.current),vo(ho.current),Pa(t)){if(i=t.stateNode,n=t.memoizedProps,i[Li]=t,(s=i.nodeValue!==n)&&(e=Ea,e!==null))switch(e.tag){case 3:Ci(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ci(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Li]=t,t.stateNode=i}return fc(t),null;case 13:if(z(H),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(V&&Da!==null&&t.mode&1&&!(t.flags&128))Fa(),Ia(),t.flags|=98560,s=!1;else if(s=Pa(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[Li]=t}else Ia(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fc(t),s=!1}else Oa!==null&&(yl(Oa),Oa=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||H.current&1?Q===0&&(Q=3):kl())),t.updateQueue!==null&&(t.flags|=4),fc(t),null);case 4:return bo(),e===null&&pi(t.stateNode.containerInfo),fc(t),null;case 10:return Xa(t.type._context),fc(t),null;case 17:return ta(t.type)&&na(),fc(t),null;case 19:if(z(H),s=t.memoizedState,s===null)return fc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)dc(s,!1);else{if(Q!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Co(e),c!==null){for(t.flags|=128,dc(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 B(H,H.current&1|2),t.child}e=e.sibling}s.tail!==null&&I()>tl&&(t.flags|=128,i=!0,dc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Co(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),dc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!V)return fc(t),null}else 2*I()-s.renderingStartTime>tl&&n!==1073741824&&(t.flags|=128,i=!0,dc(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?(fc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=I(),t.sibling=null,n=H.current,B(H,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&&(fc(t),t.subtreeFlags&6&&(t.flags|=8192)):fc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function mc(e,t){switch(Ta(t),t.tag){case 1:return ta(t.type)&&na(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bo(),z(Qi),z(Zi),To(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return So(t),null;case 13:if(z(H),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(H),null;case 4:return bo(),null;case 10:return Xa(t.type._context),null;case 22:case 23:return Tl(),null;case 24:return null;default:return null}}var hc=!1,gc=!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(Ti=_n,e=Rr(),zr(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(Ei={focusedElem:e,selectionRange:n},_n=!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:xs(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[Li],delete t[Ri],delete t[Bi],delete t[Vi],delete t[Hi])),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=wi));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(Dt&&typeof Dt.onCommitFiberUnmount==`function`)try{Dt.onCommitFiberUnmount(Et,n)}catch{}switch(n.tag){case 5:gc||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?Ni(e.parentNode,n):e.nodeType===1&&Ni(e,n),hn(e)):Ni(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(!gc&&(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(!gc&&(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?(gc=(r=gc)||n.memoizedState!==null,jc(e,t,n),gc=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{Fe(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&&xe(a,o),He(c,s);var u=He(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?ze(a,f):d===`dangerouslySetInnerHTML`?Pe(a,f):d===`children`?Fe(a,f):ee(a,d,f,u)}switch(c){case`input`:Se(a,o);break;case`textarea`:ke(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?Ee(a,!!o.multiple,o.multiple?[]:``,!1):Ee(a,!!o.multiple,o.defaultValue,!0)):Ee(a,!!o.multiple,m,!1)}a[Ri]=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{hn(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=I())),i&4&&Nc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(gc=(u=gc)||d,Pc(t,e),gc=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=Re(`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&&(Fe(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||hc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||gc;s=hc;var l=gc;if(hc=o,(gc=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,hc=s,gc=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:gc||Cc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!gc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:xs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&po(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}po(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&&hn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}gc||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=S.ReactCurrentDispatcher,Wc=S.ReactCurrentOwner,Gc=S.ReactCurrentBatchConfig,J=0,Y=null,X=null,Z=0,Kc=0,qc=Yi(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?I():dl===-1?dl=I():dl}function ml(e){return e.mode&1?J&2&&Z!==0?Z&-Z:Ra.transition===null?(e=L,e===0?(e=window.event,e=e===void 0?16:Cn(e.type),e):e):(fl===0&&(fl=Bt()),fl):1}function hl(e,t,n,i){if(50<ll)throw ll=0,ul=null,Error(r(185));Ht(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=I()+500,ca&&fa()))}function gl(e,t){var n=e.callbackNode;Rt(e,t);var r=It(e,e===Y?Z:0);if(r===0)n!==null&&F(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&F(n),t===1)e.tag===0?da(Sl.bind(null,e)):ua(Sl.bind(null,e)),ji(function(){!(J&6)&&fa()}),n=null;else{switch(Gt(r)){case 1:n=xt;break;case 4:n=St;break;case 16:n=Ct;break;case 536870912:n=Tt;break;default:n=Ct}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=It(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=I()+500,El(e,t));do try{Ml();break}catch(t){Dl(e,t)}while(1);Ya(),Uc.current=o,J=a,X===null?(Y=null,Z=0,t=Q):t=0}if(t!==0){if(t===2&&(a=zt(e),a!==0&&(i=a,t=vl(e,a))),t===1)throw n=Jc,El(e,0),xl(e,i),gl(e,I()),n;if(t===6)xl(e,i);else{if(a=e.current.alternate,!(i&30)&&!bl(a)&&(t=Al(e,i),t===2&&(o=zt(e),o!==0&&(i=o,t=vl(e,o))),t===1))throw n=Jc,El(e,0),xl(e,i),gl(e,I()),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-I(),10<t)){if(It(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){pl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Oi(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-kt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=I()-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=Oi(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,I()),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(!Nr(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-kt(t),r=1<<n;e[n]=-1,t&=~r}}function Sl(e){if(J&6)throw Error(r(327));Ll();var t=It(e,0);if(!(t&1))return gl(e,I()),null;var n=Al(e,t);if(e.tag!==0&&n===2){var i=zt(e);i!==0&&(t=i,n=vl(e,i))}if(n===1)throw n=Jc,El(e,0),xl(e,t),gl(e,I()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fl(e,$c,nl),gl(e,I()),null}function Cl(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(tl=I()+500,ca&&fa())}}function wl(e){sl!==null&&sl.tag===0&&!(J&6)&&Ll();var t=J;J|=1;var n=Gc.transition,r=L;try{if(Gc.transition=null,L=1,e)return e()}finally{L=r,Gc.transition=n,J=t,!(J&6)&&fa()}}function Tl(){Kc=qc.current,z(qc)}function El(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,ki(n)),X!==null)for(n=X.return;n!==null;){var r=n;switch(Ta(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&na();break;case 3:bo(),z(Qi),z(Zi),To();break;case 5:So(r);break;case 4:bo();break;case 13:z(H);break;case 19:z(H);break;case 10:Xa(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,eo!==null){for(t=0;t<eo.length;t++)if(n=eo[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}eo=null}return e}function Dl(e,t){do{var n=X;try{if(Ya(),Eo.current=_s,ko){for(var i=U.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}ko=!1}if(Oo=0,G=W=U=null,Ao=!1,jo=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=Fs(s);if(m!==null){m.flags&=-257,Is(m,s,c,o,t),m.mode&1&&Ps(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)){Ps(o,u,t),kl();break a}l=Error(r(426))}}else if(V&&c.mode&1){var _=Fs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Is(_,s,c,o,t),La(Os(l,c));break a}}o=l=Os(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=Ms(o,l,t);uo(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=Ns(o,c,t);uo(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=_s,e===null?_s: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(Ya(),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&&!vt();)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=mc(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=pc(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=L,i=Gc.transition;try{Gc.transition=null,L=1,Il(e,t,n,r)}finally{Gc.transition=i,L=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(Ut(e,o),e===Y&&(X=Y=null,Z=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ol||(ol=!0,Wl(Ct,function(){return Ll(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Gc.transition,Gc.transition=null;var s=L;L=1;var c=J;J|=4,Wc.current=null,xc(e,n),Fc(n,e),Br(Ei),_n=!!Ti,Ei=Ti=null,e.current=n,Lc(n,e,a),yt(),J=c,L=s,Gc.transition=o}else e.current=n;if(ol&&(ol=!1,sl=e,cl=a),o=e.pendingLanes,o===0&&(al=null),Ot(n.stateNode,i),gl(e,I()),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,fa(),null}function Ll(){if(sl!==null){var e=Gt(cl),t=Gc.transition,n=L;try{if(Gc.transition=null,L=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,fa(),Dt&&typeof Dt.onPostCommitFiberRoot==`function`)try{Dt.onPostCommitFiberRoot(Et,e)}catch{}i=!0}return i}finally{L=n,Gc.transition=t}}return!1}function Rl(e,t,n){t=Os(n,t),t=Ms(e,t,1),e=co(e,t,1),t=pl(),e!==null&&(Ht(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=Os(n,e),e=Ns(t,e,1),t=co(t,e,1),e=pl(),t!==null&&(Ht(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>I()-el?El(e,0):Zc|=n),gl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Pt,Pt<<=1,!(Pt&130023424)&&(Pt=4194304)):t=1);var n=pl();e=ro(e,t),e!==null&&(Ht(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||Qi.current)Rs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Rs=!1,sc(e,t,n);Rs=!!(e.flags&131072)}else Rs=!1,V&&t.flags&1048576&&Ca(t,ga,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ac(e,t),e=t.pendingProps;var a=ea(t,Zi.current);Qa(t,n),a=Fo(null,t,i,e,a,n);var o=Io();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,ta(i)?(o=!0,aa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ao(t),a.updater=Cs,t.stateNode=a,a._reactInternals=t,Ds(t,i,e,n),t=qs(null,t,i,!0,o,n)):(t.tag=0,V&&o&&wa(t),zs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(ac(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=xs(i,e),a){case 0:t=Gs(null,t,i,e,n);break a;case 1:t=Ks(null,t,i,e,n);break a;case 11:t=Bs(null,t,i,e,n);break a;case 14:t=Vs(null,t,i,xs(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:xs(i,a),Gs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:xs(i,a),Ks(e,t,i,a,n);case 3:a:{if(Js(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,oo(e,t),fo(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=Os(Error(r(423)),t),t=Ys(e,t,i,n,a);break a}else if(i!==a){a=Os(Error(r(424)),t),t=Ys(e,t,i,n,a);break a}else for(Da=Pi(t.stateNode.containerInfo.firstChild),Ea=t,V=!0,Oa=null,n=Wa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ia(),i===a){t=oc(e,t,n);break a}zs(e,t,i,n)}t=t.child}return t;case 5:return xo(t),e===null&&Ma(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Di(i,a)?s=null:o!==null&&Di(i,o)&&(t.flags|=32),Ws(e,t),zs(e,t,s,n),t.child;case 6:return e===null&&Ma(t),null;case 13:return Qs(e,t,n);case 4:return yo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ua(t,null,i,n):zs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:xs(i,a),Bs(e,t,i,a,n);case 7:return zs(e,t,t.pendingProps,n),t.child;case 8:return zs(e,t,t.pendingProps.children,n),t.child;case 12:return zs(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,B(Ga,i._currentValue),i._currentValue=s,o!==null)if(Nr(o.value,s)){if(o.children===a.children&&!Qi.current){t=oc(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=so(-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),Za(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),Za(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}zs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Qa(t,n),a=$a(a),i=i(a),t.flags|=1,zs(e,t,i,n),t.child;case 14:return i=t.type,a=xs(i,t.pendingProps),a=xs(i.type,a),Vs(e,t,i,a,n);case 15:return Hs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:xs(i,a),ac(e,t),t.tag=1,ta(i)?(e=!0,aa(t)):e=!1,Qa(t,n),Ts(t,i,a),Ds(t,i,a,n),qs(null,t,i,!0,e,n);case 19:return ic(e,t,n);case 22:return Us(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return _t(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===O)return 11;if(e===j)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 T:return Zl(n.children,a,o,t);case te:s=8,a|=8;break;case ne:return e=Kl(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case k:return e=Kl(13,n,t,a),e.elementType=k,e.lanes=o,e;case A:return e=Kl(19,n,t,a),e.elementType=A,e.lanes=o,e;case re:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case E:s=10;break a;case D:s=9;break a;case O:s=11;break a;case j:s=14;break a;case M: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=re,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=Vt(0),this.expirationTimes=Vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vt(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},ao(a),e}function ru(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function iu(e){if(!e)return Xi;e=e._reactInternals;a:{if(dt(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(ta(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(ta(n))return ia(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=so(r,i),a.callback=t??null,co(n,a,i),e.current.lanes=i,Ht(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=so(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=co(i,t,o),e!==null&&(hl(e,i,o,a),lo(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[zi]=null}};function pu(e){this._internalRoot=e}pu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<an.length&&t!==0&&t<an[n].priority;n++);an.splice(n,0,e),n===0&&un(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[zi]=o.current,pi(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[zi]=c.current,pi(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)}Kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ft(t.pendingLanes);n!==0&&(Wt(t,n|1),gl(t,I()),!(J&6)&&(tl=I()+500,fa()))}break;case 13:wl(function(){var t=ro(e,1);t!==null&&hl(t,e,1,pl())}),lu(e,1)}},qt=function(e){if(e.tag===13){var t=ro(e,134217728);t!==null&&hl(t,e,134217728,pl()),lu(e,134217728)}},Jt=function(e){if(e.tag===13){var t=ml(e),n=ro(e,t);n!==null&&hl(n,e,t,pl()),lu(e,t)}},Yt=function(){return L},Xt=function(e,t){var n=L;try{return L=e,t()}finally{L=n}},Ge=function(e,t,n){switch(t){case`input`:if(Se(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=Ki(i);if(!a)throw Error(r(90));_e(i),Se(i,a)}}}break;case`textarea`:ke(e,n);break;case`select`:t=n.value,t!=null&&Ee(e,!!n.multiple,t,!1)}},Xe=Cl,Ze=wl;var yu={usingClientEntryPoint:!1,Events:[Wi,Gi,Ki,Je,Ye,Cl]},bu={findFiberByHostInstance:Ui,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:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ht(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{Et=Su.inject(xu),Dt=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[zi]=t.current,pi(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=ht(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[zi]=t.current,pi(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[zi]=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(e.status===401||e.status===403)&&window.dispatchEvent(new CustomEvent(`nyxora-auth-error`)),window.dispatchEvent(new CustomEvent(`nyxora-network-restored`)),e}catch(e){throw window.dispatchEvent(new CustomEvent(`nyxora-network-error`)),e}}var x=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ee=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),C=e=>{let t=S(e);return t.charAt(0).toUpperCase()+t.slice(1)},w={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`},T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},te=(0,g.createContext)({}),ne=()=>(0,g.useContext)(te),E=(0,g.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ne()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,g.createElement)(`svg`,{ref:c,...w,width:t??l??w.width,height:t??l??w.height,stroke:e??f,strokeWidth:m,className:x(`lucide`,p,i),...!a&&!T(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),D=(e,t)=>{let n=(0,g.forwardRef)(({className:n,...r},i)=>(0,g.createElement)(E,{ref:i,iconNode:t,className:x(`lucide-${ee(C(e))}`,`lucide-${e}`,n),...r}));return n.displayName=C(e),n},O=D(`chart-line`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),k=D(`chart-pie`,[[`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`}]]),A=D(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),j=D(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),M=D(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),re=D(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ie=D(`panel-left-close`,[[`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`}]]),ae=D(`panels-top-left`,[[`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`}]]),N=D(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),oe=D(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),se=D(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ce=D(`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`}]]),le=D(`arrow-down-up`,[[`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`}]]),ue=D(`arrow-right-left`,[[`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`}]]),de=D(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),fe=D(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),pe=D(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),me=D(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),he=D(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ge=D(`clipboard-list`,[[`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`}]]),_e=D(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`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`}]]),ve=D(`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`}]]),ye=D(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),be=D(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),xe=D(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),Se=D(`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`}]]),Ce=D(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),we=D(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Te=D(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),Ee=D(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),De=D(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Oe=D(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),ke=D(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Ae=D(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),je=D(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Me=D(`key-round`,[[`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`}]]),Ne=D(`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`}]]),Pe=D(`landmark`,[[`path`,{d:`M10 18v-7`,key:`wt116b`}],[`path`,{d:`M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z`,key:`yxxwt6`}],[`path`,{d:`M14 18v-7`,key:`vav6t3`}],[`path`,{d:`M18 18v-7`,key:`aexdmj`}],[`path`,{d:`M3 22h18`,key:`8prr45`}],[`path`,{d:`M6 18v-7`,key:`1ivflk`}]]),Fe=D(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Ie=D(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Le=D(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Re=D(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),ze=D(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Be=D(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),Ve=D(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),He=D(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Ue=D(`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`}]]),We=D(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Ge=D(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Ke=D(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),P=D(`refresh-ccw`,[[`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`}]]),qe=D(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Je=D(`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`}]]),Ye=D(`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`}]]),Xe=D(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ze=D(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Qe=D(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),$e=D(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),et=D(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),tt=D(`shield`,[[`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`}]]),nt=D(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),rt=D(`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`}]]),it=D(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),at=D(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ot=D(`trending-down`,[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]),st=D(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),ct=D(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),lt=D(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),ut=D(`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`}]]),dt=D(`wallet-cards`,[[`path`,{d:`M3 11h3.75a2 2 0 0 1 1.6.8l.45.6a4 4 0 0 0 6.4 0l.45-.6a2 2 0 0 1 1.6-.8H21`,key:`1vwh6y`}],[`path`,{d:`M3 7h18`,key:`1uiuf2`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),ft=D(`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`}]]),pt=D(`wifi-off`,[[`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`}]]),mt=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ht=D(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);function gt(e,t=5e3){let n=(0,g.useRef)(e);(0,g.useEffect)(()=>{n.current=e},[e]),(0,g.useEffect)(()=>{n.current();let e=setInterval(()=>{document.hidden||n.current()},t),r=()=>{document.hidden||n.current()};return document.addEventListener(`visibilitychange`,r),()=>{clearInterval(e),document.removeEventListener(`visibilitychange`,r)}},[t])}var _t=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})),F=o(((e,t)=>{t.exports=_t()}))(),vt=({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);gt(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`)}},5e3);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,F.jsxs)(`div`,{className:`overview-container`,children:[(0,F.jsxs)(`div`,{className:`overview-header`,children:[(0,F.jsx)(`h1`,{children:`Nyxora Status`}),(0,F.jsx)(`p`,{children:`System health, active configuration, and loaded Web3 skills.`})]}),(0,F.jsxs)(`div`,{className:`panel gateway-access`,children:[(0,F.jsxs)(`div`,{className:`panel-header`,children:[(0,F.jsx)(`h3`,{children:`System Configuration`}),(0,F.jsx)(`p`,{children:`Current runtime parameters for your Web3 Agent.`})]}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{children:`API Endpoint`}),(0,F.jsx)(`input`,{type:`text`,value:`/api/chat`,readOnly:!0})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{children:`Agent Name`}),(0,F.jsx)(`input`,{type:`text`,value:e.agent.name,readOnly:!0})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{children:`Memory Storage`}),(0,F.jsx)(`input`,{type:`text`,value:n.memoryPath||`./memory.json`,readOnly:!0})]})]})]}),(0,F.jsxs)(`div`,{className:`metrics-grid`,children:[(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`COST`}),(0,F.jsxs)(`div`,{className:`metric-val`,children:[`$`,n.cost.toFixed(4)]}),(0,F.jsxs)(`div`,{className:`metric-sub`,children:[n.tokens,` tokens - `,n.messages,` msgs`]})]}),(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`SESSIONS`}),(0,F.jsx)(`div`,{className:`metric-val`,children:t}),(0,F.jsxs)(`div`,{className:`metric-sub`,children:[t,` Local chat session`,t===1?``:`s`,` active`]})]}),(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`SKILLS`}),(0,F.jsxs)(`div`,{className:`metric-val`,children:[n.activeSkills===void 0?2:n.activeSkills,`/`,n.totalSkills===void 0?2:n.totalSkills]}),(0,F.jsxs)(`div`,{className:`metric-sub`,children:[n.totalSkills===void 0?2:n.totalSkills,` Web3 & OS skills loaded`]})]}),(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`CRON`}),(0,F.jsxs)(`div`,{className:`metric-val`,children:[u,` jobs`]}),(0,F.jsx)(`div`,{className:`metric-sub`,children:u===0?`No scheduled tasks`:`${u} active schedule(s)`})]}),(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`MODEL AUTH`}),(()=>{let t=e.llm.provider.toLowerCase(),n=t===`9router`||t===`ollama`,r=e.credentials?e.credentials[`${t}_key`]:void 0,i=r&&r.length>5||n;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`metric-val ${i?`text-green`:`text-red`}`,style:{color:i?`var(--success)`:`var(--danger)`},children:n?`Local Proxy`:i?`Configured`:`Missing Key`}),(0,F.jsx)(`div`,{className:`metric-sub`,children:n?`${e.llm.provider.toUpperCase()} running (no key needed)`:`${e.llm.provider.toUpperCase()} provider ${i?`connected`:`not configured`}`})]})})()]})]}),(0,F.jsxs)(`div`,{className:`logs-grid`,children:[(0,F.jsxs)(`div`,{className:`log-panel`,children:[(0,F.jsx)(`div`,{className:`log-header`,children:(0,F.jsxs)(`span`,{children:[`Event Log `,(0,F.jsx)(`span`,{className:`badge`,children:i.length})]})}),(0,F.jsxs)(`div`,{className:`log-content`,children:[i.map((e,t)=>(0,F.jsxs)(`div`,{className:`log-row`,style:{fontFamily:`monospace`},children:[(0,F.jsxs)(`span`,{className:`log-time`,style:{color:`var(--accent)`},children:[`[`,e.timestamp,`]`]}),(0,F.jsxs)(`span`,{className:`log-msg`,style:{color:`var(--text-secondary)`,marginLeft:`8px`},children:[e.event,` `,e.meta&&Object.keys(e.meta).length>0?(0,F.jsx)(`span`,{className:`log-meta`,style:{color:`var(--text-secondary)`},children:JSON.stringify(e.meta)}):null]})]},t)),(0,F.jsx)(`div`,{ref:f})]})]}),(0,F.jsxs)(`div`,{className:`log-panel`,children:[(0,F.jsx)(`div`,{className:`log-header`,children:(0,F.jsxs)(`span`,{children:[`Gateway Logs `,(0,F.jsx)(`span`,{className:`badge`,children:o.length})]})}),(0,F.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,F.jsxs)(`div`,{className:`log-row gateway-row`,style:{fontFamily:`monospace`},children:[(0,F.jsxs)(`span`,{className:`log-time`,style:{color:`var(--accent)`},children:[`[`,e.timestamp,`]`]}),(0,F.jsxs)(`span`,{className:`log-msg`,style:{color:`var(--text-secondary)`,marginLeft:`8px`},children:[n,` `,e.meta?JSON.stringify(e.meta):``]})]},t)}),(0,F.jsx)(`div`,{ref:p})]})]})]}),(0,F.jsxs)(`div`,{className:`panel gateway-access`,style:{marginTop:`24px`},children:[(0,F.jsxs)(`div`,{className:`panel-header`,children:[(0,F.jsx)(`h3`,{children:`Memory Log`}),(0,F.jsx)(`p`,{children:`AI's episodic memory and extracted habits. You can delete incorrect observations.`})]}),(0,F.jsx)(`div`,{className:`form-row memory-log-container`,style:{flexDirection:`column`,gap:`10px`,maxHeight:`300px`,overflowY:`auto`,paddingRight:`8px`},children:c.length===0?(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,background:`var(--bg-sidebar)`,padding:`10px 15px`,borderRadius:`6px`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[(0,F.jsx)(`div`,{style:{color:`var(--text-primary)`,fontWeight:`500`},children:e.fact}),(0,F.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,F.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,F.jsx)(`div`,{className:`overview-container`,children:`Loading...`})},yt=({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,F.jsxs)(`div`,{className:`custom-network-selector`,ref:s,style:{width:`100%`},children:[(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[c?.icon&&(0,F.jsx)(`div`,{children:c.icon}),(0,F.jsx)(`span`,{className:`network-label`,style:{fontWeight:600},children:c?.label})]}),(0,F.jsx)(he,{size:14,className:`network-chevron`})]}),a&&(0,F.jsx)(`ul`,{className:`network-dropdown-menu styled-scroll`,style:{width:`100%`,top:`calc(100% + 8px)`,padding:`8px`,zIndex:1e3,maxHeight:`250px`,overflowY:`auto`},children:t.map(t=>(0,F.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,F.jsx)(`div`,{children:t.icon}),t.label]},t.id))})]})},I=({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,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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`anthropic`:case`claude`:return(0,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.jsx)(`path`,{d:`M20.25 19.344a1.85 1.85 0 0 1-1.849 1.854 1.85 1.85 0 0 1-1.85-1.854V12.18l-8.608 5.762a1.847 1.847 0 0 1-1.523.275 1.85 1.85 0 0 1-1.018-1.025 1.847 1.847 0 0 1 .28-1.52l5.772-8.544H4.3A1.85 1.85 0 0 1 2.45 5.275 1.85 1.85 0 0 1 4.3 3.424h15.95a1.85 1.85 0 0 1 1.849 1.85v14.07z`})});case`openai`:return(0,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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`9router`:return(0,F.jsxs)(`svg`,{...i,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,viewBox:`0 0 24 24`,children:[(0,F.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`8`,rx:`2`,ry:`2`}),(0,F.jsx)(`rect`,{x:`2`,y:`14`,width:`20`,height:`8`,rx:`2`,ry:`2`}),(0,F.jsx)(`line`,{x1:`6`,y1:`6`,x2:`6.01`,y2:`6`}),(0,F.jsx)(`line`,{x1:`6`,y1:`18`,x2:`6.01`,y2:`18`})]});case`ollama`:return(0,F.jsxs)(`svg`,{...i,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.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,F.jsx)(`circle`,{cx:`8`,cy:`14`,r:`1`,fill:r,stroke:`none`}),(0,F.jsx)(`circle`,{cx:`12`,cy:`14`,r:`1`,fill:r,stroke:`none`})]});case`groq`:return(0,F.jsxs)(`svg`,{...i,viewBox:`0 0 24 24`,stroke:r,fill:`none`,strokeWidth:`2.5`,strokeLinecap:`square`,children:[(0,F.jsx)(`path`,{d:`M21 12A9 9 0 1112 3a9 9 0 010 18z`}),(0,F.jsx)(`path`,{d:`M15 12h-3v3`})]});case`mistral`:return(0,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.jsx)(`path`,{d:`M3 21V3h4l5 8 5-8h4v18h-3V8l-6 9-6-9v13H3z`})});case`xai`:case`grok`:return(0,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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,F.jsxs)(`svg`,{...i,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,ry:`2`}),(0,F.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`}),(0,F.jsx)(`line`,{x1:`9`,y1:`1`,x2:`9`,y2:`4`}),(0,F.jsx)(`line`,{x1:`15`,y1:`1`,x2:`15`,y2:`4`}),(0,F.jsx)(`line`,{x1:`9`,y1:`20`,x2:`9`,y2:`23`}),(0,F.jsx)(`line`,{x1:`15`,y1:`20`,x2:`15`,y2:`23`}),(0,F.jsx)(`line`,{x1:`20`,y1:`9`,x2:`23`,y2:`9`}),(0,F.jsx)(`line`,{x1:`20`,y1:`14`,x2:`23`,y2:`14`}),(0,F.jsx)(`line`,{x1:`1`,y1:`9`,x2:`4`,y2:`9`}),(0,F.jsx)(`line`,{x1:`1`,y1:`14`,x2:`4`,y2:`14`})]})}},bt=e=>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`:`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png`,xt=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}},St=(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/${xt(e)}/${t.toLowerCase()}.png`,Ct=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`:case`cmc_pro_key`:return`/routers/cmc.png`;case`coingecko_key`:case`coingecko_pro_key`:return`/routers/coingecko.png`;case`zerion_key`:return`/routers/zerion.png`;case`auto`:return``;default:return``}},wt=({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,F.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,F.jsxs)(`div`,{className:`panel`,style:{width:`600px`,maxWidth:`90%`,position:`relative`,overflow:`hidden`},children:[(0,F.jsx)(`button`,{onClick:e,style:{position:`absolute`,top:`16px`,right:`16px`,background:`none`,border:`none`,color:`var(--text-secondary)`,cursor:`pointer`},children:(0,F.jsx)(mt,{size:20})}),(0,F.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:`32px`},children:[(0,F.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,F.jsx)(tt,{size:24})}),(0,F.jsx)(`h2`,{style:{color:`var(--text-primary)`,margin:0},children:`Google Workspace Setup`}),(0,F.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,F.jsx)(`div`,{style:{display:`flex`,marginBottom:`24px`},children:[1,2,3].map(e=>(0,F.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,F.jsxs)(`div`,{className:`wizard-step`,children:[(0,F.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 1: Create a Google Cloud Project`}),(0,F.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:[(0,F.jsxs)(`li`,{children:[`Go to the `,(0,F.jsx)(`a`,{href:`https://console.cloud.google.com/`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`Google Cloud Console`}),`.`]}),(0,F.jsx)(`li`,{children:`Create a new project (e.g., "Nyxora Local Agent").`}),(0,F.jsxs)(`li`,{children:[`Navigate to `,(0,F.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` Library`]}),`.`]}),(0,F.jsxs)(`li`,{children:[`Search for and enable the following APIs:`,(0,F.jsxs)(`ul`,{style:{marginTop:`8px`,marginBottom:`8px`,color:`#a3be8c`},children:[(0,F.jsx)(`li`,{children:`Gmail API`}),(0,F.jsx)(`li`,{children:`Google Drive API`}),(0,F.jsx)(`li`,{children:`Google Sheets API`})]})]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:`32px`},children:(0,F.jsx)(`button`,{className:`nord-btn-primary`,onClick:()=>n(2),children:`Next Step`})})]}),t===2&&(0,F.jsxs)(`div`,{className:`wizard-step`,children:[(0,F.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 2: Configure OAuth Consent`}),(0,F.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:[(0,F.jsxs)(`li`,{children:[`Go to `,(0,F.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` OAuth consent screen`]}),`.`]}),(0,F.jsxs)(`li`,{children:[`Choose `,(0,F.jsx)(`strong`,{children:`External`}),` User Type.`]}),(0,F.jsx)(`li`,{children:`Fill in the App Information. Use the URLs provided below for the App Domain:`})]}),(0,F.jsxs)(`div`,{style:{background:`var(--bg-secondary)`,padding:`16px`,borderRadius:`8px`,marginTop:`16px`,marginBottom:`16px`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:`8px`},children:[(0,F.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`},children:`Privacy Policy URL:`}),(0,F.jsx)(`span`,{style:{color:`var(--text-primary)`,fontFamily:`monospace`,fontSize:`0.85rem`},children:`http://localhost:3001/privacy`})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,F.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`},children:`Terms of Service URL:`}),(0,F.jsx)(`span`,{style:{color:`var(--text-primary)`,fontFamily:`monospace`,fontSize:`0.85rem`},children:`http://localhost:3001/tos`})]})]}),(0,F.jsx)(`ol`,{start:4,style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:(0,F.jsxs)(`li`,{children:[`Add your personal email to the `,(0,F.jsx)(`strong`,{children:`Test Users`}),` list so you can bypass app verification.`]})}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginTop:`32px`},children:[(0,F.jsx)(`button`,{className:`nord-btn`,style:{background:`transparent`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`},onClick:()=>n(1),children:`Back`}),(0,F.jsx)(`button`,{className:`nord-btn-primary`,onClick:()=>n(3),children:`Next Step`})]})]}),t===3&&(0,F.jsxs)(`div`,{className:`wizard-step`,children:[(0,F.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 3: Upload Credentials`}),(0,F.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`,marginBottom:`24px`},children:[(0,F.jsxs)(`li`,{children:[`Go to `,(0,F.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` Credentials`]}),`.`]}),(0,F.jsxs)(`li`,{children:[`Click `,(0,F.jsxs)(`strong`,{children:[`Create Credentials `,`>`,` OAuth client ID`]}),`.`]}),(0,F.jsxs)(`li`,{children:[`Choose `,(0,F.jsx)(`strong`,{children:`Web application`}),` as the application type.`]}),(0,F.jsxs)(`li`,{children:[`Under `,(0,F.jsx)(`strong`,{children:`Authorized redirect URIs`}),`, add: `,(0,F.jsx)(`code`,{style:{color:`var(--accent)`,padding:`2px 4px`,background:`var(--bg-sidebar)`,borderRadius:`4px`},children:`http://localhost:3000/api/auth/google/callback`})]}),(0,F.jsx)(`li`,{children:`Click Download JSON and upload the file here:`})]}),a?(0,F.jsxs)(`div`,{style:{textAlign:`center`,padding:`32px`,border:`1px dashed #a3be8c`,borderRadius:`8px`,backgroundColor:`rgba(163, 190, 140, 0.05)`},children:[(0,F.jsx)(j,{size:32,color:`#a3be8c`,style:{marginBottom:`16px`}}),(0,F.jsx)(`h4`,{style:{color:`#a3be8c`,margin:0},children:`Credentials Saved!`}),(0,F.jsx)(`p`,{style:{color:`var(--text-secondary)`,fontSize:`0.9rem`,marginTop:`8px`},children:`You can now use Google Workspace skills.`})]}):(0,F.jsxs)(`div`,{style:{position:`relative`},children:[(0,F.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,F.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,F.jsx)(ct,{size:24,color:`var(--text-secondary)`,style:{marginBottom:`16px`}}),(0,F.jsx)(`h4`,{style:{color:`var(--text-primary)`,margin:0},children:r?`Uploading...`:`Click or Drag JSON File`}),(0,F.jsxs)(`p`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`,marginTop:`8px`},children:[`Requires `,(0,F.jsx)(`code`,{children:`client_id`}),` and `,(0,F.jsx)(`code`,{children:`client_secret`})]})]})]}),s&&(0,F.jsx)(`div`,{style:{color:`#bf616a`,fontSize:`0.85rem`,marginTop:`16px`,textAlign:`center`},children:s}),(0,F.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginTop:`32px`},children:(0,F.jsx)(`button`,{className:`nord-btn`,style:{background:`transparent`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`},onClick:()=>n(2),children:`Back`})})]})]})})},Tt=({value:e,onChange:t,options:n})=>{let[r,i]=(0,g.useState)(!1),[a,o]=(0,g.useState)(``),s=(0,g.useRef)(null);(0,g.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&i(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let c=n.filter(e=>e.toLowerCase().includes(a.toLowerCase()));return(0,F.jsxs)(`div`,{className:`custom-network-selector`,ref:s,style:{width:`100%`,position:`relative`},children:[(0,F.jsxs)(`button`,{className:`network-selector-pill`,style:{background:`var(--accent)`,color:`var(--bg-secondary)`,padding:`10px 20px`,fontSize:`0.9rem`,width:`100%`,justifyContent:`space-between`},onClick:()=>i(!r),"aria-expanded":r,children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,F.jsx)(xe,{size:16,color:`var(--bg-secondary)`}),(0,F.jsx)(`span`,{className:`network-label`,style:{fontWeight:600,textTransform:`uppercase`,color:`var(--bg-secondary)`},children:e||`USD`})]}),(0,F.jsx)(he,{size:14,className:`network-chevron`})]}),r&&(0,F.jsxs)(`div`,{className:`network-dropdown-menu`,style:{width:`100%`,top:`calc(100% + 8px)`,padding:`8px`,zIndex:1e3,boxSizing:`border-box`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,background:`rgba(0,0,0,0.2)`,padding:`6px 8px`,borderRadius:`6px`,marginBottom:`8px`},children:[(0,F.jsx)(Xe,{size:14,color:`var(--text-secondary)`,style:{marginRight:`8px`}}),(0,F.jsx)(`input`,{type:`text`,placeholder:`Search currency...`,value:a,onChange:e=>o(e.target.value),style:{background:`transparent`,border:`none`,color:`var(--text-primary)`,outline:`none`,width:`100%`,fontSize:`0.85rem`},autoFocus:!0})]}),(0,F.jsxs)(`ul`,{className:`styled-scroll`,style:{listStyle:`none`,padding:0,margin:0,maxHeight:`200px`,overflowY:`auto`},children:[c.map(n=>(0,F.jsx)(`li`,{className:`network-dropdown-item ${n===e?`active`:``}`,onClick:()=>{t(n),i(!1),o(``)},style:{display:`flex`,alignItems:`center`,padding:`10px 16px`,cursor:`pointer`,borderRadius:`8px`,textTransform:`uppercase`,fontSize:`0.9rem`,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:n},n)),c.length===0&&(0,F.jsx)(`li`,{style:{padding:`8px`,color:`var(--text-secondary)`,textAlign:`center`,fontSize:`0.85rem`},children:`No results`})]})]})]})},Et=e=>e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),Dt=(e,t)=>{let n=t===!1?`var(--tool-bg)`:`var(--accent)`;switch(Et(e).toLowerCase()){case`get balance`:return(0,F.jsx)(ft,{size:20,color:n});case`transfer token`:return(0,F.jsx)(Ze,{size:20,color:n});case`get price`:return(0,F.jsx)(ht,{size:20,color:n});case`swap token`:return(0,F.jsx)(ue,{size:20,color:n});case`bridge token`:return(0,F.jsx)(qe,{size:20,color:n});case`mint nft`:return(0,F.jsx)(je,{size:20,color:n});case`custom tx`:return(0,F.jsx)(it,{size:20,color:n});case`check address`:return(0,F.jsx)(Xe,{size:20,color:n});case`get my address`:return(0,F.jsx)(lt,{size:20,color:n});case`check token security`:return(0,F.jsx)(tt,{size:20,color:n});case`check portfolio`:return(0,F.jsx)(k,{size:20,color:n});case`analyze market`:return(0,F.jsx)(O,{size:20,color:n});case`get trending tokens`:return(0,F.jsx)(Oe,{size:20,color:n});case`create wallet`:return(0,F.jsx)(dt,{size:20,color:n});case`supply aave`:return(0,F.jsx)(Pe,{size:20,color:n});case`revoke approval`:return(0,F.jsx)(Ie,{size:20,color:n});case`deposit yield vault`:return(0,F.jsx)(ut,{size:20,color:n});case`provide liquidity v3`:return(0,F.jsx)(Se,{size:20,color:n});case`create limit order`:return(0,F.jsx)(rt,{size:20,color:n});default:return(0,F.jsx)(_e,{size:20,color:n})}},Ot=()=>{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,F.jsx)(`div`,{className:`settings-subpanel`,children:`Loading skills...`});let s=e.filter(e=>e.function.name.toLowerCase().includes(n.toLowerCase())||e.function.description.toLowerCase().includes(n.toLowerCase()));return(0,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`24px`},children:[(0,F.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`Skills`}),(0,F.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`Installed skills and their status.`})]}),(0,F.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,F.jsx)(Xe,{size:18,color:`#9ca3af`}),(0,F.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,F.jsxs)(`span`,{style:{color:`#6b7280`,fontSize:`0.85rem`},children:[s.length,` shown`]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:s.map((e,t)=>(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`16px`,flex:1},children:[(0,F.jsx)(`div`,{style:{marginTop:`2px`},children:Dt(e.function.name,e.isActive!==!1)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:`0 0 6px 0`,fontSize:`1rem`,color:e.isActive===!1?`var(--text-secondary)`:`var(--text-primary)`,fontWeight:600},children:Et(e.function.name)}),(0,F.jsx)(`p`,{style:{margin:0,color:`#9ca3af`,fontSize:`0.85rem`,lineHeight:`1.5`,maxWidth:`800px`},children:e.function.description})]})]}),(0,F.jsx)(`div`,{style:{marginLeft:`24px`},children:(0,F.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,F.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))})]})},kt=e=>{let t=e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `);return e===`run_terminal_command`&&(t+=` (UNSAFE)`),t},At=(e,t)=>{let n=t===!1?`var(--tool-bg)`:`var(--accent)`;switch(kt(e).toLowerCase()){case`run terminal command (unsafe)`:return(0,F.jsx)(it,{size:20,color:n});case`read local file`:return(0,F.jsx)(De,{size:20,color:n});case`write local file`:return(0,F.jsx)(M,{size:20,color:n});case`browse website`:return(0,F.jsx)(Ae,{size:20,color:n});case`update security policy`:return(0,F.jsx)(et,{size:20,color:n});case`analyze document`:return(0,F.jsx)(Te,{size:20,color:n});case`search web`:return(0,F.jsx)(Xe,{size:20,color:n});case`read gmail inbox`:return(0,F.jsx)(Le,{size:20,color:n});case`list calendar events`:return(0,F.jsx)(pe,{size:20,color:n});case`append row to sheets`:return(0,F.jsx)(Ee,{size:20,color:n});case`read google docs`:return(0,F.jsx)(fe,{size:20,color:n});case`read google form responses`:return(0,F.jsx)(ge,{size:20,color:n});case`edit local file`:return(0,F.jsx)(Ye,{size:20,color:n});case`execute git command`:return(0,F.jsx)(ke,{size:20,color:n});case`manage twitter`:return(0,F.jsx)(Re,{size:20,color:n});case`manage notion`:return(0,F.jsx)(ae,{size:20,color:n});case`transcribe audio`:return(0,F.jsx)(Be,{size:20,color:n});case`summarize text`:return(0,F.jsx)(oe,{size:20,color:n});default:return(0,F.jsx)(_e,{size:20,color:n})}},jt=()=>{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,F.jsx)(`div`,{className:`settings-subpanel`,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,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`24px`},children:[(0,F.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`OS Skills`}),(0,F.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`System-level capabilities for the agent OS.`})]}),(0,F.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,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:`0 0 8px 0`,color:`var(--text-primary)`,fontSize:`1.1rem`},children:`Account Linking`}),(0,F.jsx)(`p`,{style:{margin:0,color:`var(--text-secondary)`,fontSize:`0.9rem`},children:`Connect your Google Workspace to unlock Gmail and Calendar skills.`})]}),(0,F.jsx)(`div`,{children:c?(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,F.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,F.jsx)(`span`,{style:{width:`8px`,height:`8px`,background:`#a3be8c`,borderRadius:`50%`,display:`inline-block`}}),`Connected to Google`]}),(0,F.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,F.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,F.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.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,F.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,F.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,F.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,F.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,F.jsx)(Xe,{size:18,color:`#9ca3af`}),(0,F.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,F.jsxs)(`span`,{style:{color:`#6b7280`,fontSize:`0.85rem`},children:[f.length,` shown`]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:f.map((e,t)=>(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`16px`,flex:1},children:[(0,F.jsx)(`div`,{style:{marginTop:`2px`},children:At(e.function.name,e.isActive!==!1)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:`0 0 6px 0`,fontSize:`1rem`,color:e.isActive===!1?`var(--text-secondary)`:`var(--text-primary)`,fontWeight:600},children:kt(e.function.name)}),(0,F.jsx)(`p`,{style:{margin:0,color:`#9ca3af`,fontSize:`0.85rem`,lineHeight:`1.5`,maxWidth:`800px`},children:e.function.description})]})]}),(0,F.jsx)(`div`,{style:{marginLeft:`24px`},children:(0,F.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,F.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,F.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,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`16px`,marginBottom:`16px`},children:[(0,F.jsx)(`div`,{style:{background:`rgba(191, 97, 106, 0.1)`,padding:`12px`,borderRadius:`50%`},children:(0,F.jsx)(se,{size:32,color:`#bf616a`})}),(0,F.jsx)(`h2`,{style:{margin:0,color:`var(--text-primary)`,fontSize:`1.25rem`},children:`DANGER ZONE: System Access`})]}),(0,F.jsxs)(`p`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,marginBottom:`24px`},children:[`You are about to enable `,(0,F.jsx)(`strong`,{children:`Terminal Execution`}),`. This grants the AI agent`,(0,F.jsx)(`strong`,{children:` full, unrestrained access`}),` to execute arbitrary shell scripts on your host operating system.`]}),(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:`12px`},children:[(0,F.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,F.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`})]})]})})]})},Mt=e=>e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),Nt=(e,t)=>(0,F.jsx)(Ge,{size:20,color:t===!1?`var(--tool-bg)`:`var(--accent)`}),Pt=()=>{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/external`);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,F.jsx)(`div`,{className:`settings-subpanel`,children:`Loading skills...`});let s=e.filter(e=>e.function.name.toLowerCase().includes(n.toLowerCase())||e.function.description.toLowerCase().includes(n.toLowerCase()));return(0,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`24px`},children:[(0,F.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`External Skills`}),(0,F.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`User-installed third-party agent skills and custom integrations.`})]}),(0,F.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,F.jsx)(Xe,{size:18,color:`#9ca3af`}),(0,F.jsx)(`input`,{type:`text`,placeholder:`Filter installed external 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,F.jsxs)(`span`,{style:{color:`#6b7280`,fontSize:`0.85rem`},children:[s.length,` shown`]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:s.map((e,t)=>(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`16px`,flex:1},children:[(0,F.jsx)(`div`,{style:{marginTop:`2px`},children:Nt(e.function.name,e.isActive!==!1)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:`0 0 6px 0`,fontSize:`1rem`,color:e.isActive===!1?`var(--text-secondary)`:`var(--text-primary)`,fontWeight:600},children:Mt(e.function.name)}),(0,F.jsx)(`p`,{style:{margin:0,color:`#9ca3af`,fontSize:`0.85rem`,lineHeight:`1.5`,maxWidth:`800px`},children:e.function.description})]})]}),(0,F.jsx)(`div`,{style:{marginLeft:`24px`},children:(0,F.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,F.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))})]})},Ft=()=>{let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)({}),[i,a]=(0,g.useState)({}),[o,s]=(0,g.useState)(null);(0,g.useEffect)(()=>{(async()=>{try{let e=await(await b(`/api/defi-keys`)).json();e.requirements&&t(e.requirements)}catch{console.error(`Failed to fetch defi keys`)}})()},[]);let c=async e=>{try{let i=n[e];if(!i)return;(await b(`/api/defi-keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({[e]:i})})).ok&&(s(`Saved successfully!`),t(t=>t.map(t=>t.id===e?{...t,configured:!0}:t)),r(t=>{let n={...t};return delete n[e],n}),setTimeout(()=>s(null),3e3))}catch{s(`Failed to save key`)}},l=async e=>{try{(await b(`/api/defi-keys/${e}`,{method:`DELETE`})).ok&&(s(`Key deleted successfully!`),t(t=>t.map(t=>t.id===e?{...t,configured:!1}:t)),setTimeout(()=>s(null),3e3))}catch{s(`Failed to delete key`)}};return(0,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,F.jsx)(Me,{size:28,color:`var(--accent)`}),(0,F.jsx)(`h2`,{className:`settings-title`,style:{margin:0,color:`var(--text-primary)`},children:`DeFi Configuration`})]}),(0,F.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,F.jsx)(et,{size:24,color:`#ebcb8b`,style:{flexShrink:0,marginTop:`2px`}}),(0,F.jsxs)(`p`,{style:{margin:0,fontSize:`0.85rem`,color:`var(--text-secondary)`,lineHeight:1.6},children:[(0,F.jsx)(`strong`,{style:{color:`#ebcb8b`},children:`Security Notice:`}),` Your keys are stored in plain text locally inside `,(0,F.jsx)(`code`,{style:{background:`rgba(0,0,0,0.2)`,padding:`2px 4px`,borderRadius:`4px`},children:`~/.nyxora/config/defi_keys.yaml`}),`. They are highly isolated and never transmitted except directly to the respective provider's API.`]})]}),o&&(0,F.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,F.jsx)(A,{size:20}),` `,(0,F.jsx)(`strong`,{children:o})]}),(0,F.jsxs)(`div`,{className:`settings-section`,children:[(0,F.jsx)(`h3`,{className:`section-title`,style:{color:`var(--accent)`,marginBottom:`8px`,fontSize:`1.2rem`},children:`Dynamic Provider Integrations`}),(0,F.jsx)(`p`,{className:`section-description`,style:{marginBottom:`32px`,color:`var(--text-secondary)`,fontSize:`0.95rem`},children:`These fields are dynamically loaded from installed DeFi Aggregator Providers. Provide your API keys to bypass rate limits.`}),e.length===0&&(0,F.jsx)(`div`,{style:{textAlign:`center`,color:`var(--text-secondary)`,padding:`40px`},children:`No API Keys required by currently active providers.`}),(0,F.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`,gap:`16px`},children:e.map(e=>(0,F.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,F.jsxs)(`div`,{style:{width:`280px`,flexShrink:0,display:`flex`,gap:`12px`,alignItems:`flex-start`},children:[(0,F.jsx)(`img`,{src:Ct(e.id),alt:e.id,style:{width:32,height:32,borderRadius:`50%`,marginTop:`2px`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,F.jsxs)(`div`,{style:{flex:1},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`4px`},children:[(0,F.jsx)(`strong`,{style:{color:`var(--text-primary)`,fontSize:`1rem`,display:`block`},children:e.label}),e.configured&&(0,F.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,F.jsx)(A,{size:12}),` CONFIGURED`]})]}),(0,F.jsxs)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.8rem`,lineHeight:1.4,display:`block`},children:[e.required?`Required`:`Optional`,` API Key.`,e.docsUrl&&(0,F.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,style:{marginLeft:`4px`,color:`var(--accent)`},children:`Get Key`})]})]})]}),(0,F.jsxs)(`div`,{style:{flex:1,display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,F.jsxs)(`div`,{style:{position:`relative`,flex:1},children:[(0,F.jsx)(`input`,{type:i[e.id]?`text`:`password`,className:`nord-input`,style:{paddingRight:`40px`,borderColor:e.configured?`#a3be8c`:`var(--glass-border)`,width:`100%`},placeholder:e.configured?`••••••••••••••••`:`Paste API Key here...`,value:n[e.id]||``,onChange:t=>r({...n,[e.id]:t.target.value})}),(0,F.jsx)(`button`,{style:{position:`absolute`,right:`12px`,top:`50%`,transform:`translateY(-50%)`,background:`none`,border:`none`,color:`var(--tool-bg)`,cursor:`pointer`},onClick:()=>a({...i,[e.id]:!i[e.id]}),children:i[e.id]?(0,F.jsx)(Ce,{size:18}):(0,F.jsx)(we,{size:18})})]}),(0,F.jsxs)(`button`,{className:`nord-btn-primary`,onClick:()=>c(e.id),disabled:!n[e.id],style:{padding:`0 20px`,height:`40px`,gap:`8px`,flexShrink:0},children:[(0,F.jsx)(Je,{size:16}),` Save`]}),e.configured&&(0,F.jsx)(`button`,{onClick:()=>l(e.id),style:{height:`40px`,padding:`0 16px`,background:`transparent`,border:`1px solid var(--danger)`,color:`var(--danger)`,borderRadius:`8px`,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`8px`,flexShrink:0},children:`Delete`})]})]},e.id))})]})]})},It=()=>{let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)({}),[i,a]=(0,g.useState)({}),[o,s]=(0,g.useState)(null);(0,g.useEffect)(()=>{(async()=>{try{let e=await(await b(`/api/market-keys`)).json();e.requirements&&t(e.requirements)}catch{console.error(`Failed to fetch market keys`)}})()},[]);let c=async e=>{try{let i=n[e];if(!i)return;(await b(`/api/market-keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({[e]:i})})).ok&&(s(`Saved successfully!`),t(t=>t.map(t=>t.id===e?{...t,configured:!0}:t)),r(t=>{let n={...t};return delete n[e],n}),setTimeout(()=>s(null),3e3))}catch{s(`Failed to save key`)}},l=async e=>{try{(await b(`/api/market-keys/${e}`,{method:`DELETE`})).ok&&(s(`Key deleted successfully!`),t(t=>t.map(t=>t.id===e?{...t,configured:!1}:t)),setTimeout(()=>s(null),3e3))}catch{s(`Failed to delete key`)}};return(0,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,F.jsx)(Me,{size:28,color:`var(--accent)`}),(0,F.jsx)(`h2`,{className:`settings-title`,style:{margin:0,color:`var(--text-primary)`},children:`Market Oracles Configuration`})]}),(0,F.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,F.jsx)(et,{size:24,color:`#ebcb8b`,style:{flexShrink:0,marginTop:`2px`}}),(0,F.jsx)(`div`,{style:{fontSize:`0.9rem`,color:`var(--text-secondary)`,lineHeight:1.6},children:(0,F.jsxs)(`p`,{style:{margin:0,fontSize:`0.85rem`},children:[(0,F.jsx)(`strong`,{style:{color:`#ebcb8b`},children:`Security Notice:`}),` Your keys are stored in plain text locally inside `,(0,F.jsx)(`code`,{style:{background:`rgba(0,0,0,0.2)`,padding:`2px 4px`,borderRadius:`4px`},children:`~/.nyxora/config/market_keys.yaml`}),`. They are highly isolated and never transmitted except directly to the respective Oracle API.`]})})]}),o&&(0,F.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,F.jsx)(A,{size:20}),` `,(0,F.jsx)(`strong`,{children:o})]}),(0,F.jsxs)(`div`,{className:`settings-section`,children:[(0,F.jsx)(`h3`,{className:`section-title`,style:{color:`var(--accent)`,marginBottom:`8px`,fontSize:`1.2rem`},children:`Market Intelligence Providers`}),(0,F.jsx)(`p`,{className:`section-description`,style:{marginBottom:`32px`,color:`var(--text-secondary)`,fontSize:`0.95rem`},children:`These keys are used for market intelligence, price fetching, and portfolio analysis. If not provided, Nyxora will gracefully fallback to public APIs (CoinGecko Public / DexScreener).`}),e.length===0&&(0,F.jsx)(`div`,{style:{textAlign:`center`,color:`var(--text-secondary)`,padding:`40px`},children:`No API Keys required by currently active providers.`}),(0,F.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`,gap:`16px`},children:e.map(e=>(0,F.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,F.jsxs)(`div`,{style:{width:`280px`,flexShrink:0,display:`flex`,gap:`12px`,alignItems:`flex-start`},children:[(0,F.jsx)(`img`,{src:Ct(e.id),alt:e.id,style:{width:32,height:32,borderRadius:`50%`,marginTop:`2px`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,F.jsxs)(`div`,{style:{flex:1},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`4px`},children:[(0,F.jsx)(`strong`,{style:{color:`var(--text-primary)`,fontSize:`1rem`,display:`block`},children:e.label}),e.configured&&(0,F.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,F.jsx)(A,{size:12}),` CONFIGURED`]})]}),(0,F.jsxs)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.8rem`,lineHeight:1.4,display:`block`},children:[e.required?`Required`:`Optional`,` API Key.`,e.docsUrl&&(0,F.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,style:{marginLeft:`4px`,color:`var(--accent)`},children:`Get Key`})]})]})]}),(0,F.jsxs)(`div`,{style:{flex:1,display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,F.jsxs)(`div`,{style:{position:`relative`,flex:1},children:[(0,F.jsx)(`input`,{type:i[e.id]?`text`:`password`,className:`nord-input`,style:{paddingRight:`40px`,borderColor:e.configured?`#a3be8c`:`var(--glass-border)`,width:`100%`},placeholder:e.configured?`••••••••••••••••`:`Paste API Key here...`,value:n[e.id]||``,onChange:t=>r({...n,[e.id]:t.target.value})}),(0,F.jsx)(`button`,{style:{position:`absolute`,right:`12px`,top:`50%`,transform:`translateY(-50%)`,background:`none`,border:`none`,color:`var(--tool-bg)`,cursor:`pointer`},onClick:()=>a({...i,[e.id]:!i[e.id]}),children:i[e.id]?(0,F.jsx)(Ce,{size:18}):(0,F.jsx)(we,{size:18})})]}),(0,F.jsxs)(`button`,{className:`nord-btn-primary`,onClick:()=>c(e.id),disabled:!n[e.id],style:{padding:`0 20px`,height:`40px`,gap:`8px`,flexShrink:0},children:[(0,F.jsx)(Je,{size:16}),` Save`]}),e.configured&&(0,F.jsx)(`button`,{onClick:()=>l(e.id),style:{height:`40px`,padding:`0 16px`,background:`transparent`,border:`1px solid var(--danger)`,color:`var(--danger)`,borderRadius:`8px`,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`8px`,flexShrink:0},children:`Delete`})]})]},e.id))})]})]})},Lt=[{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)`}],Rt=()=>{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,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,F.jsx)(Qe,{size:28,color:`var(--accent)`}),(0,F.jsx)(`h2`,{className:`settings-title`,style:{margin:0,color:`var(--text-primary)`},children:`RPC Configuration`})]}),(0,F.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,F.jsx)(et,{size:24,color:`#ebcb8b`,style:{flexShrink:0,marginTop:`2px`}}),(0,F.jsxs)(`div`,{style:{fontSize:`0.9rem`,color:`var(--text-secondary)`,lineHeight:1.6},children:[(0,F.jsx)(`strong`,{style:{color:`#ebcb8b`},children:`Privacy & Security:`}),` Your RPC keys are saved in a highly isolated `,(0,F.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,F.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,F.jsx)(A,{size:20}),` `,(0,F.jsx)(`strong`,{children:n})]}),(0,F.jsxs)(`div`,{className:`settings-section`,children:[(0,F.jsx)(`h3`,{className:`section-title`,style:{color:`var(--accent)`,marginBottom:`8px`,fontSize:`1.2rem`},children:`Network Endpoints`}),(0,F.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,F.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,F.jsx)(se,{size:16}),` Leaving a field empty will trigger the Agent's automatic `,(0,F.jsx)(`strong`,{children:`Public Fallback Mechanism`}),`.`]}),(0,F.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`,gap:`16px`},children:Lt.map(n=>{let r=a(e[n.id]);return(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,alignItems:`center`,width:`240px`,flexShrink:0},children:[(0,F.jsx)(`img`,{src:bt(n.id),alt:n.id,style:{width:32,height:32,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{style:{color:`var(--text-primary)`,fontSize:`1rem`,display:`block`},children:n.name}),(0,F.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.8rem`,fontFamily:`monospace`},children:n.id})]})]}),(0,F.jsxs)(`div`,{style:{flex:1,display:`flex`,gap:`12px`},children:[(0,F.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,F.jsxs)(`button`,{className:`nord-btn-primary`,onClick:()=>i(n.id,r),style:{padding:`0 20px`,height:`40px`,gap:`8px`},children:[(0,F.jsx)(Je,{size:16}),` Save`]})]})]},n.id)})})]})]})},zt=({id:e})=>(0,F.jsx)(`div`,{style:{width:`14px`,height:`14px`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,F.jsx)(`img`,{src:bt(e),alt:e,style:{width:`14px`,height:`14px`,objectFit:`cover`,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}})}),Bt=({config:e,onConfigChange:t,autoLockTime:n,setAutoLockTime:r,onLogout:i})=>{let[a,o]=(0,g.useState)(`agent`),[s,c]=(0,g.useState)(null),[l,u]=(0,g.useState)({risk_level:`Moderate`,max_slippage:1,avoid_memecoins:!1}),[d,f]=(0,g.useState)({max_usd_per_tx:999999999,whitelist_only:!1,require_approval:!0,custom_llm_rules:[]}),[p,m]=(0,g.useState)(!1),[h,_]=(0,g.useState)(!1),[v,y]=(0,g.useState)(``),[x,ee]=(0,g.useState)(``),[S,C]=(0,g.useState)(``),[w,T]=(0,g.useState)(``),[te,ne]=(0,g.useState)(!1),[E,D]=(0,g.useState)([`usd`,`idr`,`eur`,`jpy`,`gbp`,`aud`]),[O,k]=(0,g.useState)(!1);(0,g.useEffect)(()=>{fetch(`https://api.coingecko.com/api/v3/simple/supported_vs_currencies`).then(e=>e.json()).then(e=>{Array.isArray(e)&&e.length>0&&D(e)}).catch(e=>console.error(`Failed to load supported fiats`,e))},[]);let A=async()=>{if(confirm(`DANGER: Are you sure you want to permanently wipe all episodic memory? This cannot be undone.`)){k(!0);try{(await b(`/api/memory/all`,{method:`DELETE`})).ok?alert(`Episodic memory wiped completely.`):alert(`Failed to wipe memory.`)}catch{alert(`Failed to wipe memory.`)}finally{k(!1)}}};if((0,g.useEffect)(()=>{b(`/api/profile`).then(e=>e.json()).then(e=>{e&&!e.error&&u({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&&f({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&&c({agent:{name:e.agent?.name||`Nyxora`,default_chain:e.agent?.default_chain||`base`,default_slippage:e.agent?.default_slippage||.5,log_level:e.agent?.log_level||`info`,base_fiat:e.agent?.base_fiat||`usd`},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]),!s)return(0,F.jsx)(`div`,{className:`overview-container`,children:`Loading settings...`});let j=(e,t,n)=>{c(r=>r&&{...r,[e]:{...r[e],[t]:t===`temperature`?Number(n):n}})};return(0,F.jsxs)(`div`,{className:`settings-layout`,style:{display:`flex`,height:`100%`,overflow:`hidden`},children:[(0,F.jsxs)(`div`,{className:`settings-sidebar-menu`,style:{width:`260px`,borderRight:`1px solid var(--glass-border)`,padding:`24px 16px`,overflowY:`auto`,flexShrink:0,display:`flex`,flexDirection:`column`,gap:`8px`},children:[(0,F.jsx)(`div`,{className:`settings-section-title`,style:{fontSize:`0.75rem`,fontWeight:600,color:`var(--text-secondary)`,letterSpacing:`0.05em`,marginBottom:`4px`,paddingLeft:`12px`},children:`GENERAL`}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`agent`?`active`:``}`,onClick:()=>o(`agent`),children:[(0,F.jsx)(lt,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Agent Profile`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`llm`?`active`:``}`,onClick:()=>o(`llm`),children:[(0,F.jsx)(ye,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`LLM Engine`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`appearance`?`active`:``}`,onClick:()=>o(`appearance`),children:[(0,F.jsx)(Ae,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Appearance`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`security`?`active`:``}`,onClick:()=>o(`security`),children:[(0,F.jsx)(tt,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Security & Privacy`})]}),(0,F.jsx)(`div`,{className:`settings-section-title`,style:{fontSize:`0.75rem`,fontWeight:600,color:`var(--text-secondary)`,letterSpacing:`0.05em`,marginTop:`16px`,marginBottom:`4px`,paddingLeft:`12px`},children:`AGENT CAPABILITIES`}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`web3skills`?`active`:``}`,onClick:()=>o(`web3skills`),children:[(0,F.jsx)(ht,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Web3 Skills`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`osskills`?`active`:``}`,onClick:()=>o(`osskills`),children:[(0,F.jsx)(it,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`OS Skills`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`externalskills`?`active`:``}`,onClick:()=>o(`externalskills`),children:[(0,F.jsx)(Ge,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`External Skills`})]}),(0,F.jsx)(`div`,{className:`settings-section-title`,style:{fontSize:`0.75rem`,fontWeight:600,color:`var(--text-secondary)`,letterSpacing:`0.05em`,marginTop:`16px`,marginBottom:`4px`,paddingLeft:`12px`},children:`ADVANCED`}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`risk`?`active`:``}`,onClick:()=>o(`risk`),children:[(0,F.jsx)(tt,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Risk & Policy`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`rpc`?`active`:``}`,onClick:()=>o(`rpc`),children:[(0,F.jsx)(Ue,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`RPC Config`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`defi`?`active`:``}`,onClick:()=>o(`defi`),children:[(0,F.jsx)(Ne,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`DeFi Config`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`oracles`?`active`:``}`,onClick:()=>o(`oracles`),children:[(0,F.jsx)(be,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Market Oracles`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`integrations`?`active`:``}`,onClick:()=>o(`integrations`),children:[(0,F.jsx)(Ne,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Integrations`})]})]}),(0,F.jsx)(`div`,{className:`settings-content-area styled-scroll`,style:{flex:1,padding:`32px 48px`,overflowY:`auto`},children:(0,F.jsxs)(`div`,{className:`settings-scroll-container`,style:{margin:`0`},children:[a===`agent`&&(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Agent Profile`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Agent Name`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,type:`text`,value:s.agent.name,onChange:e=>j(`agent`,`name`,e.target.value)})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Default Web3 Chain`}),(0,F.jsx)(yt,{value:s.agent.default_chain,onChange:e=>j(`agent`,`default_chain`,e),pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`ethereum`,label:`Ethereum Mainnet`,icon:(0,F.jsx)(zt,{id:`ethereum`})},{id:`bsc`,label:`BNB Chain`,icon:(0,F.jsx)(zt,{id:`bsc`})},{id:`base`,label:`Base`,icon:(0,F.jsx)(zt,{id:`base`})},{id:`arbitrum`,label:`Arbitrum One`,icon:(0,F.jsx)(zt,{id:`arbitrum`})},{id:`optimism`,label:`OP Mainnet`,icon:(0,F.jsx)(zt,{id:`optimism`})},{id:`polygon`,label:`Polygon (Matic)`,icon:(0,F.jsx)(zt,{id:`polygon`})},{id:`sepolia`,label:`Sepolia Testnet`,icon:(0,F.jsx)(zt,{id:`sepolia`})},{id:`base_sepolia`,label:`Base Sepolia Testnet`,icon:(0,F.jsx)(zt,{id:`base_sepolia`})},{id:`arbitrum_sepolia`,label:`Arbitrum Sepolia`,icon:(0,F.jsx)(zt,{id:`arbitrum_sepolia`})},{id:`optimism_sepolia`,label:`OP Sepolia`,icon:(0,F.jsx)(zt,{id:`optimism_sepolia`})}]})]})]}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Default Slippage (%)`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,type:`text`,placeholder:`e.g. 0.5 or auto`,value:s.agent.default_slippage??`auto`,onChange:e=>{let t=e.target.value;t.toLowerCase()===`auto`||t===``?j(`agent`,`default_slippage`,`auto`):j(`agent`,`default_slippage`,t)},onBlur:e=>{let t=String(e.target.value);if(t.toLowerCase()!==`auto`){let e=parseFloat(t);j(`agent`,`default_slippage`,isNaN(e)?`auto`:e)}}})]}),(0,F.jsx)(`div`,{className:`form-group flex-1`})]})]}),a===`llm`&&(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`LLM Engine`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Provider`}),(0,F.jsx)(yt,{value:s.llm.provider,onChange:e=>j(`llm`,`provider`,e),pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`gemini`,label:`Google Gemini`,icon:(0,F.jsx)(I,{provider:`gemini`,size:14})},{id:`anthropic`,label:`Anthropic (Claude)`,icon:(0,F.jsx)(I,{provider:`anthropic`,size:14})},{id:`openai`,label:`OpenAI`,icon:(0,F.jsx)(I,{provider:`openai`,size:14})},{id:`openrouter`,label:`OpenRouter`,icon:(0,F.jsx)(I,{provider:`openrouter`,size:14})},{id:`9router`,label:`9Router (Local Proxy)`,icon:(0,F.jsx)(I,{provider:`9router`,size:14})},{id:`ollama`,label:`Ollama (Local)`,icon:(0,F.jsx)(I,{provider:`ollama`,size:14})},{id:`groq`,label:`Groq`,icon:(0,F.jsx)(I,{provider:`groq`,size:14})},{id:`mistral`,label:`Mistral AI`,icon:(0,F.jsx)(I,{provider:`mistral`,size:14})},{id:`xai`,label:`xAI (Grok)`,icon:(0,F.jsx)(I,{provider:`xai`,size:14})},{id:`deepseek`,label:`DeepSeek`,icon:(0,F.jsx)(I,{provider:`deepseek`,size:14})}]})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Model Name`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,style:{color:`var(--text-secondary)`},type:`text`,value:s.llm.model,onChange:e=>j(`llm`,`model`,e.target.value)})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsxs)(`label`,{className:`nord-label`,children:[`Temperature (`,s.llm.temperature,`)`]}),(0,F.jsx)(`input`,{className:`nord-slider`,type:`range`,min:`0`,max:`1`,step:`0.1`,value:s.llm.temperature,onChange:e=>j(`llm`,`temperature`,e.target.value)})]})]}),s.llm.provider===`9router`&&(0,F.jsx)(`div`,{style:{background:`rgba(136, 192, 208, 0.1)`,border:`1px solid rgba(136, 192, 208, 0.3)`,padding:`14px`,borderRadius:`8px`,marginTop:`16px`},children:(0,F.jsxs)(`p`,{style:{margin:0,fontSize:`0.85rem`,color:`var(--text-secondary)`},children:[(0,F.jsx)(`strong`,{style:{color:`#88c0d0`},children:`ℹ️ Local Proxy Required:`}),` Ensure you have installed and started the 9Router proxy before saving.`,(0,F.jsx)(`br`,{}),(0,F.jsx)(`br`,{}),(0,F.jsx)(`code`,{style:{background:`rgba(0,0,0,0.2)`,padding:`2px 6px`,borderRadius:`4px`,fontSize:`0.8rem`,fontFamily:`monospace`},children:`npm install -g 9router`}),(0,F.jsx)(`br`,{}),(0,F.jsx)(`code`,{style:{background:`rgba(0,0,0,0.2)`,padding:`2px 6px`,borderRadius:`4px`,marginTop:`6px`,display:`inline-block`,fontSize:`0.8rem`,fontFamily:`monospace`},children:`9router`})]})})]}),a===`appearance`&&(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Appearance & UI Personalization`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Base Fiat Currency`}),(0,F.jsx)(Tt,{value:s.agent.base_fiat||`usd`,onChange:e=>j(`agent`,`base_fiat`,e),options:E}),(0,F.jsx)(`p`,{style:{fontSize:`0.8rem`,color:`var(--text-secondary)`,marginTop:`8px`},children:`Used across the dashboard for cosmetic fiat conversion. Core backend operations remain strictly in USD.`})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Dashboard Theme`}),(0,F.jsx)(yt,{value:localStorage.getItem(`nyxora_theme`)||`auto`,onChange:e=>{localStorage.setItem(`nyxora_theme`,e),window.location.reload()},pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`auto`,label:`System (Auto)`},{id:`dark`,label:`Dark Mode`},{id:`light`,label:`Light Mode`}]})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Backend Log Level`}),(0,F.jsx)(yt,{value:s.agent.log_level||`info`,onChange:e=>j(`agent`,`log_level`,e),pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`info`,label:`Info (Standard)`},{id:`debug`,label:`Debug (Verbose)`}]})]})]})]}),a===`security`&&(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Security & Privacy`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Auto-Lock Session (Idle Timeout)`}),(0,F.jsx)(yt,{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,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Memory & Operations`}),(0,F.jsx)(`button`,{onClick:A,disabled:O,style:{width:`100%`,background:`rgba(191, 97, 106, 0.1)`,color:`#BF616A`,border:`1px solid rgba(191, 97, 106, 0.5)`,padding:`12px 16px`,borderRadius:`8px`,cursor:O?`not-allowed`:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`8px`,fontWeight:`bold`,transition:`all 0.2s`},onMouseEnter:e=>!O&&(e.currentTarget.style.background=`rgba(191, 97, 106, 0.2)`),onMouseLeave:e=>!O&&(e.currentTarget.style.background=`rgba(191, 97, 106, 0.1)`),children:O?`Wiping...`:`Wipe All Episodic Memory (Panic Button)`})]})]}),(0,F.jsx)(`div`,{className:`nord-panel-header`,style:{marginTop:`24px`},children:(0,F.jsx)(`h3`,{children:`Dashboard Access`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Change Dashboard Password`}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,marginBottom:`8px`},children:[(0,F.jsx)(`input`,{type:`password`,placeholder:`Old Password`,className:`nord-input`,style:{flex:1},value:x,onChange:e=>ee(e.target.value)}),(0,F.jsx)(`input`,{type:`password`,placeholder:`New Password`,className:`nord-input`,style:{flex:1},value:S,onChange:e=>C(e.target.value)}),(0,F.jsx)(`button`,{className:`nord-btn-primary`,style:{padding:`0 16px`,borderRadius:`8px`},onClick:async()=>{try{T(`Saving...`);let e=await b(`/api/auth/update`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({oldPassword:x,newPassword:S})}),t=await e.json();e.ok&&t.success?(T(`Password updated successfully`),ee(``),C(``)):T(t.error||`Failed to update password`)}catch{T(`Connection failed`)}setTimeout(()=>T(``),4e3)},disabled:!x||!S,children:`Update`})]}),w&&(0,F.jsx)(`span`,{style:{fontSize:`0.85rem`,color:w.includes(`success`)?`var(--success)`:`var(--danger)`},children:w})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Manual Lock`}),(0,F.jsxs)(`button`,{onClick:i,style:{width:`100%`,background:`var(--danger)`,color:`#eceff4`,border:`none`,padding:`12px 16px`,borderRadius:`8px`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`8px`,fontWeight:600},children:[(0,F.jsx)(Ne,{size:16}),` Log Out (Lock Dashboard)`]})]})]})]}),a===`risk`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{style:{color:`var(--danger)`},children:`Personalized Risk Profile`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Risk Tolerance Level`}),(0,F.jsx)(yt,{value:l.risk_level,onChange:e=>u({...l,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,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Max Allowed Slippage (%)`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,type:`number`,step:`0.1`,value:l.max_slippage,onChange:e=>u({...l,max_slippage:parseFloat(e.target.value)||1})})]})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`,marginTop:`15px`,marginBottom:`5px`},children:[(0,F.jsx)(`input`,{type:`checkbox`,id:`avoid_memecoins`,checked:l.avoid_memecoins,onChange:e=>u({...l,avoid_memecoins:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--danger)`,width:`16px`,height:`16px`,margin:0,flexShrink:0}}),(0,F.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,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`40px`},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Policy Engine (Hard-coded Firewall)`})}),(0,F.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,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Max USD per Transaction`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,type:`number`,step:`1`,value:d.max_usd_per_tx,onChange:e=>f({...d,max_usd_per_tx:parseFloat(e.target.value)||0})})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,style:{marginBottom:`12px`,display:`block`},children:`Approval & Restrictions`}),(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,F.jsx)(`input`,{type:`checkbox`,id:`require_approval`,checked:d.require_approval,onChange:e=>f({...d,require_approval:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--accent)`,width:`16px`,height:`16px`,margin:0}}),(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,F.jsx)(`input`,{type:`checkbox`,id:`whitelist_only`,checked:d.whitelist_only,onChange:e=>f({...d,whitelist_only:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--accent)`,width:`16px`,height:`16px`,margin:0}}),(0,F.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,F.jsxs)(`div`,{className:`form-group`,style:{marginTop:`15px`},children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Custom LLM Rules (Natural Language)`}),(0,F.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
8
+ `+e.stack}return{value:e,source:t,stack:i,digest:null}}function ks(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function As(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var js=typeof WeakMap==`function`?WeakMap:Map;function Ms(e,t,n){n=so(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rl||(rl=!0,il=r),As(e,t)},n}function Ns(e,t,n){n=so(-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(){As(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){As(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 Ps(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new js;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 Fs(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 Is(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=so(-1,1),t.tag=2,co(n,t,1))),n.lanes|=1),e)}var Ls=S.ReactCurrentOwner,Rs=!1;function zs(e,t,n,r){t.child=e===null?Wa(t,null,n,r):Ua(t,e.child,n,r)}function Bs(e,t,n,r,i){n=n.render;var a=t.ref;return Qa(t,i),r=Fo(e,t,n,r,a,i),n=Io(),e!==null&&!Rs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oc(e,t,i)):(V&&n&&wa(t),t.flags|=1,zs(e,t,r,i),t.child)}function Vs(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,Hs(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?Pr:n,n(o,r)&&e.ref===t.ref)return oc(e,t,i)}return t.flags|=1,e=Yl(a,r),e.ref=t.ref,e.return=t,t.child=e}function Hs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Pr(a,r)&&e.ref===t.ref)if(Rs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Rs=!0);else return t.lanes=e.lanes,oc(e,t,i)}return Gs(e,t,n,r,i)}function Us(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},B(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,B(qc,Kc),Kc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,B(qc,Kc),Kc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),B(qc,Kc),Kc|=r;return zs(e,t,i,n),t.child}function Ws(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Gs(e,t,n,r,i){var a=ta(n)?$i:Zi.current;return a=ea(t,a),Qa(t,i),n=Fo(e,t,n,r,a,i),r=Io(),e!==null&&!Rs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,oc(e,t,i)):(V&&r&&wa(t),t.flags|=1,zs(e,t,n,i),t.child)}function Ks(e,t,n,r,i){if(ta(n)){var a=!0;aa(t)}else a=!1;if(Qa(t,i),t.stateNode===null)ac(e,t),Ts(t,n,r),Ds(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=$a(l):(l=ta(n)?$i:Zi.current,l=ea(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)&&Es(t,o,r,l),io=!1;var f=t.memoizedState;o.state=f,fo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Qi.current||io?(typeof u==`function`&&(Ss(t,n,u,r),c=t.memoizedState),(s=io||ws(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,oo(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:xs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=$a(c):(c=ta(n)?$i:Zi.current,c=ea(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)&&Es(t,o,r,c),io=!1,f=t.memoizedState,o.state=f,fo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Qi.current||io?(typeof p==`function`&&(Ss(t,n,p,r),m=t.memoizedState),(l=io||ws(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 qs(e,t,n,r,a,i)}function qs(e,t,n,r,i,a){Ws(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&oa(t,n,!1),oc(e,t,a);r=t.stateNode,Ls.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ua(t,e.child,null,a),t.child=Ua(t,null,s,a)):zs(e,t,s,a),t.memoizedState=r.state,i&&oa(t,n,!0),t.child}function Js(e){var t=e.stateNode;t.pendingContext?ra(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ra(e,t.context,!1),yo(e,t.containerInfo)}function Ys(e,t,n,r,i){return Ia(),La(i),t.flags|=256,zs(e,t,n,r),t.child}var Xs={dehydrated:null,treeContext:null,retryLane:0};function Zs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qs(e,t,n){var r=t.pendingProps,i=H.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),B(H,i&1),e===null)return Ma(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=Zs(n),t.memoizedState=Xs,e):$s(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return tc(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?Zs(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Xs,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 $s(e,t){return t=Ql({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function ec(e,t,n,r){return r!==null&&La(r),Ua(t,e.child,null,n),e=$s(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=ks(Error(r(422))),ec(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&&Ua(t,e.child,null,s),t.child.memoizedState=Zs(s),t.memoizedState=Xs,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return ec(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=ks(o,i,void 0),ec(e,t,s,i)}if(c=(s&e.childLanes)!==0,Rs||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,ro(e,a),hl(i,e,a,-1))}return kl(),i=ks(Error(r(421))),ec(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,Da=Pi(a.nextSibling),Ea=t,V=!0,Oa=null,e!==null&&(_a[va++]=ba,_a[va++]=xa,_a[va++]=ya,ba=e.id,xa=e.overflow,ya=t),t=$s(t,i.children),t.flags|=4096,t)}function nc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Za(e.return,t,n)}function rc(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 ic(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(zs(e,t,r.children,n),r=H.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&&nc(e,n,t);else if(e.tag===19)nc(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(B(H,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&&Co(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rc(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&&Co(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rc(t,!0,n,null,a);break;case`together`:rc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ac(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function oc(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 sc(e,t,n){switch(t.tag){case 3:Js(t),Ia();break;case 5:xo(t);break;case 1:ta(t.type)&&aa(t);break;case 4:yo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;B(Ga,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(B(H,H.current&1),e=oc(e,t,n),e===null?null:e.sibling):Qs(e,t,n):(B(H,H.current&1),t.flags|=128,null);B(H,H.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ic(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(H,H.current),r)break;return null;case 22:case 23:return t.lanes=0,Us(e,t,n)}return oc(e,t,n)}var cc=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}},lc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,vo(ho.current);var o=null;switch(n){case`input`:i=ye(e,i),r=ye(e,r),o=[];break;case`select`:i=N({},i,{value:void 0}),r=N({},r,{value:void 0}),o=[];break;case`textarea`:i=De(e,i),r=De(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=wi)}Ve(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`&&R(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},uc=function(e,t,n,r){n!==r&&(t.flags|=4)};function dc(e,t){if(!V)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 fc(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 pc(e,t,n){var i=t.pendingProps;switch(Ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fc(t),null;case 1:return ta(t.type)&&na(),fc(t),null;case 3:return i=t.stateNode,bo(),z(Qi),z(Zi),To(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Pa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Oa!==null&&(yl(Oa),Oa=null))),fc(t),null;case 5:So(t);var o=vo(_o.current);if(n=t.type,e!==null&&t.stateNode!=null)lc(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 fc(t),null}if(e=vo(ho.current),Pa(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Li]=t,i[Ri]=s,e=(t.mode&1)!=0,n){case`dialog`:R(`cancel`,i),R(`close`,i);break;case`iframe`:case`object`:case`embed`:R(`load`,i);break;case`video`:case`audio`:for(o=0;o<si.length;o++)R(si[o],i);break;case`source`:R(`error`,i);break;case`img`:case`image`:case`link`:R(`error`,i),R(`load`,i);break;case`details`:R(`toggle`,i);break;case`input`:be(i,s),R(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},R(`invalid`,i);break;case`textarea`:Oe(i,s),R(`invalid`,i)}for(var c in Ve(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ci(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ci(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&R(`scroll`,i)}switch(n){case`input`:ge(i),Ce(i,s,!0);break;case`textarea`:ge(i),Ae(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=wi)}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=je(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[Li]=t,e[Ri]=i,cc(e,t,!1,!1),t.stateNode=e;a:{switch(c=He(n,i),n){case`dialog`:R(`cancel`,e),R(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:R(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<si.length;o++)R(si[o],e);o=i;break;case`source`:R(`error`,e),o=i;break;case`img`:case`image`:case`link`:R(`error`,e),R(`load`,e),o=i;break;case`details`:R(`toggle`,e),o=i;break;case`input`:be(e,i),o=ye(e,i),R(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=N({},i,{value:void 0}),R(`invalid`,e);break;case`textarea`:Oe(e,i),o=De(e,i),R(`invalid`,e);break;default:o=i}for(s in Ve(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?ze(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Pe(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Fe(e,u):typeof u==`number`&&Fe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&R(`scroll`,e):u!=null&&ee(e,s,u,c))}switch(n){case`input`:ge(e),Ce(e,i,!1);break;case`textarea`:ge(e),Ae(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+pe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Ee(e,!!i.multiple,i.defaultValue,!0):Ee(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=wi)}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 fc(t),null;case 6:if(e&&t.stateNode!=null)uc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=vo(_o.current),vo(ho.current),Pa(t)){if(i=t.stateNode,n=t.memoizedProps,i[Li]=t,(s=i.nodeValue!==n)&&(e=Ea,e!==null))switch(e.tag){case 3:Ci(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ci(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Li]=t,t.stateNode=i}return fc(t),null;case 13:if(z(H),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(V&&Da!==null&&t.mode&1&&!(t.flags&128))Fa(),Ia(),t.flags|=98560,s=!1;else if(s=Pa(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[Li]=t}else Ia(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fc(t),s=!1}else Oa!==null&&(yl(Oa),Oa=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||H.current&1?Q===0&&(Q=3):kl())),t.updateQueue!==null&&(t.flags|=4),fc(t),null);case 4:return bo(),e===null&&pi(t.stateNode.containerInfo),fc(t),null;case 10:return Xa(t.type._context),fc(t),null;case 17:return ta(t.type)&&na(),fc(t),null;case 19:if(z(H),s=t.memoizedState,s===null)return fc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)dc(s,!1);else{if(Q!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Co(e),c!==null){for(t.flags|=128,dc(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 B(H,H.current&1|2),t.child}e=e.sibling}s.tail!==null&&I()>tl&&(t.flags|=128,i=!0,dc(s,!1),t.lanes=4194304)}else{if(!i)if(e=Co(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),dc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!V)return fc(t),null}else 2*I()-s.renderingStartTime>tl&&n!==1073741824&&(t.flags|=128,i=!0,dc(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?(fc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=I(),t.sibling=null,n=H.current,B(H,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&&(fc(t),t.subtreeFlags&6&&(t.flags|=8192)):fc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function mc(e,t){switch(Ta(t),t.tag){case 1:return ta(t.type)&&na(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bo(),z(Qi),z(Zi),To(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return So(t),null;case 13:if(z(H),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ia()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(H),null;case 4:return bo(),null;case 10:return Xa(t.type._context),null;case 22:case 23:return Tl(),null;case 24:return null;default:return null}}var hc=!1,gc=!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(Ti=_n,e=Rr(),zr(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(Ei={focusedElem:e,selectionRange:n},_n=!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:xs(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[Li],delete t[Ri],delete t[Bi],delete t[Vi],delete t[Hi])),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=wi));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(Dt&&typeof Dt.onCommitFiberUnmount==`function`)try{Dt.onCommitFiberUnmount(Et,n)}catch{}switch(n.tag){case 5:gc||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?Ni(e.parentNode,n):e.nodeType===1&&Ni(e,n),hn(e)):Ni(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(!gc&&(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(!gc&&(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?(gc=(r=gc)||n.memoizedState!==null,jc(e,t,n),gc=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{Fe(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&&xe(a,o),He(c,s);var u=He(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?ze(a,f):d===`dangerouslySetInnerHTML`?Pe(a,f):d===`children`?Fe(a,f):ee(a,d,f,u)}switch(c){case`input`:Se(a,o);break;case`textarea`:ke(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?Ee(a,!!o.multiple,o.multiple?[]:``,!1):Ee(a,!!o.multiple,o.defaultValue,!0)):Ee(a,!!o.multiple,m,!1)}a[Ri]=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{hn(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=I())),i&4&&Nc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(gc=(u=gc)||d,Pc(t,e),gc=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=Re(`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&&(Fe(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||hc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||gc;s=hc;var l=gc;if(hc=o,(gc=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,hc=s,gc=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:gc||Cc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!gc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:xs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&po(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}po(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&&hn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}gc||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=S.ReactCurrentDispatcher,Wc=S.ReactCurrentOwner,Gc=S.ReactCurrentBatchConfig,J=0,Y=null,X=null,Z=0,Kc=0,qc=Yi(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?I():dl===-1?dl=I():dl}function ml(e){return e.mode&1?J&2&&Z!==0?Z&-Z:Ra.transition===null?(e=L,e===0?(e=window.event,e=e===void 0?16:Cn(e.type),e):e):(fl===0&&(fl=Bt()),fl):1}function hl(e,t,n,i){if(50<ll)throw ll=0,ul=null,Error(r(185));Ht(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=I()+500,ca&&fa()))}function gl(e,t){var n=e.callbackNode;Rt(e,t);var r=It(e,e===Y?Z:0);if(r===0)n!==null&&F(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&F(n),t===1)e.tag===0?da(Sl.bind(null,e)):ua(Sl.bind(null,e)),ji(function(){!(J&6)&&fa()}),n=null;else{switch(Gt(r)){case 1:n=xt;break;case 4:n=St;break;case 16:n=Ct;break;case 536870912:n=Tt;break;default:n=Ct}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=It(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=I()+500,El(e,t));do try{Ml();break}catch(t){Dl(e,t)}while(1);Ya(),Uc.current=o,J=a,X===null?(Y=null,Z=0,t=Q):t=0}if(t!==0){if(t===2&&(a=zt(e),a!==0&&(i=a,t=vl(e,a))),t===1)throw n=Jc,El(e,0),xl(e,i),gl(e,I()),n;if(t===6)xl(e,i);else{if(a=e.current.alternate,!(i&30)&&!bl(a)&&(t=Al(e,i),t===2&&(o=zt(e),o!==0&&(i=o,t=vl(e,o))),t===1))throw n=Jc,El(e,0),xl(e,i),gl(e,I()),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-I(),10<t)){if(It(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){pl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Oi(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-kt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=I()-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=Oi(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,I()),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(!Nr(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-kt(t),r=1<<n;e[n]=-1,t&=~r}}function Sl(e){if(J&6)throw Error(r(327));Ll();var t=It(e,0);if(!(t&1))return gl(e,I()),null;var n=Al(e,t);if(e.tag!==0&&n===2){var i=zt(e);i!==0&&(t=i,n=vl(e,i))}if(n===1)throw n=Jc,El(e,0),xl(e,t),gl(e,I()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fl(e,$c,nl),gl(e,I()),null}function Cl(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(tl=I()+500,ca&&fa())}}function wl(e){sl!==null&&sl.tag===0&&!(J&6)&&Ll();var t=J;J|=1;var n=Gc.transition,r=L;try{if(Gc.transition=null,L=1,e)return e()}finally{L=r,Gc.transition=n,J=t,!(J&6)&&fa()}}function Tl(){Kc=qc.current,z(qc)}function El(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,ki(n)),X!==null)for(n=X.return;n!==null;){var r=n;switch(Ta(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&na();break;case 3:bo(),z(Qi),z(Zi),To();break;case 5:So(r);break;case 4:bo();break;case 13:z(H);break;case 19:z(H);break;case 10:Xa(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,eo!==null){for(t=0;t<eo.length;t++)if(n=eo[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}eo=null}return e}function Dl(e,t){do{var n=X;try{if(Ya(),Eo.current=_s,ko){for(var i=U.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}ko=!1}if(Oo=0,G=W=U=null,Ao=!1,jo=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=Fs(s);if(m!==null){m.flags&=-257,Is(m,s,c,o,t),m.mode&1&&Ps(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)){Ps(o,u,t),kl();break a}l=Error(r(426))}}else if(V&&c.mode&1){var _=Fs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Is(_,s,c,o,t),La(Os(l,c));break a}}o=l=Os(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=Ms(o,l,t);uo(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=Ns(o,c,t);uo(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=_s,e===null?_s: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(Ya(),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&&!vt();)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=mc(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=pc(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=L,i=Gc.transition;try{Gc.transition=null,L=1,Il(e,t,n,r)}finally{Gc.transition=i,L=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(Ut(e,o),e===Y&&(X=Y=null,Z=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ol||(ol=!0,Wl(Ct,function(){return Ll(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Gc.transition,Gc.transition=null;var s=L;L=1;var c=J;J|=4,Wc.current=null,xc(e,n),Fc(n,e),Br(Ei),_n=!!Ti,Ei=Ti=null,e.current=n,Lc(n,e,a),yt(),J=c,L=s,Gc.transition=o}else e.current=n;if(ol&&(ol=!1,sl=e,cl=a),o=e.pendingLanes,o===0&&(al=null),Ot(n.stateNode,i),gl(e,I()),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,fa(),null}function Ll(){if(sl!==null){var e=Gt(cl),t=Gc.transition,n=L;try{if(Gc.transition=null,L=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,fa(),Dt&&typeof Dt.onPostCommitFiberRoot==`function`)try{Dt.onPostCommitFiberRoot(Et,e)}catch{}i=!0}return i}finally{L=n,Gc.transition=t}}return!1}function Rl(e,t,n){t=Os(n,t),t=Ms(e,t,1),e=co(e,t,1),t=pl(),e!==null&&(Ht(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=Os(n,e),e=Ns(t,e,1),t=co(t,e,1),e=pl(),t!==null&&(Ht(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>I()-el?El(e,0):Zc|=n),gl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Pt,Pt<<=1,!(Pt&130023424)&&(Pt=4194304)):t=1);var n=pl();e=ro(e,t),e!==null&&(Ht(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||Qi.current)Rs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Rs=!1,sc(e,t,n);Rs=!!(e.flags&131072)}else Rs=!1,V&&t.flags&1048576&&Ca(t,ga,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ac(e,t),e=t.pendingProps;var a=ea(t,Zi.current);Qa(t,n),a=Fo(null,t,i,e,a,n);var o=Io();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,ta(i)?(o=!0,aa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,ao(t),a.updater=Cs,t.stateNode=a,a._reactInternals=t,Ds(t,i,e,n),t=qs(null,t,i,!0,o,n)):(t.tag=0,V&&o&&wa(t),zs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(ac(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=xs(i,e),a){case 0:t=Gs(null,t,i,e,n);break a;case 1:t=Ks(null,t,i,e,n);break a;case 11:t=Bs(null,t,i,e,n);break a;case 14:t=Vs(null,t,i,xs(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:xs(i,a),Gs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:xs(i,a),Ks(e,t,i,a,n);case 3:a:{if(Js(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,oo(e,t),fo(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=Os(Error(r(423)),t),t=Ys(e,t,i,n,a);break a}else if(i!==a){a=Os(Error(r(424)),t),t=Ys(e,t,i,n,a);break a}else for(Da=Pi(t.stateNode.containerInfo.firstChild),Ea=t,V=!0,Oa=null,n=Wa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ia(),i===a){t=oc(e,t,n);break a}zs(e,t,i,n)}t=t.child}return t;case 5:return xo(t),e===null&&Ma(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Di(i,a)?s=null:o!==null&&Di(i,o)&&(t.flags|=32),Ws(e,t),zs(e,t,s,n),t.child;case 6:return e===null&&Ma(t),null;case 13:return Qs(e,t,n);case 4:return yo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ua(t,null,i,n):zs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:xs(i,a),Bs(e,t,i,a,n);case 7:return zs(e,t,t.pendingProps,n),t.child;case 8:return zs(e,t,t.pendingProps.children,n),t.child;case 12:return zs(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,B(Ga,i._currentValue),i._currentValue=s,o!==null)if(Nr(o.value,s)){if(o.children===a.children&&!Qi.current){t=oc(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=so(-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),Za(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),Za(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}zs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Qa(t,n),a=$a(a),i=i(a),t.flags|=1,zs(e,t,i,n),t.child;case 14:return i=t.type,a=xs(i,t.pendingProps),a=xs(i.type,a),Vs(e,t,i,a,n);case 15:return Hs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:xs(i,a),ac(e,t),t.tag=1,ta(i)?(e=!0,aa(t)):e=!1,Qa(t,n),Ts(t,i,a),Ds(t,i,a,n),qs(null,t,i,!0,e,n);case 19:return ic(e,t,n);case 22:return Us(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return _t(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===O)return 11;if(e===j)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 T:return Zl(n.children,a,o,t);case te:s=8,a|=8;break;case ne:return e=Kl(12,n,t,a|2),e.elementType=ne,e.lanes=o,e;case k:return e=Kl(13,n,t,a),e.elementType=k,e.lanes=o,e;case A:return e=Kl(19,n,t,a),e.elementType=A,e.lanes=o,e;case re:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case E:s=10;break a;case D:s=9;break a;case O:s=11;break a;case j:s=14;break a;case M: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=re,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=Vt(0),this.expirationTimes=Vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vt(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},ao(a),e}function ru(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function iu(e){if(!e)return Xi;e=e._reactInternals;a:{if(dt(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(ta(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(ta(n))return ia(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=so(r,i),a.callback=t??null,co(n,a,i),e.current.lanes=i,Ht(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=so(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=co(i,t,o),e!==null&&(hl(e,i,o,a),lo(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[zi]=null}};function pu(e){this._internalRoot=e}pu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<an.length&&t!==0&&t<an[n].priority;n++);an.splice(n,0,e),n===0&&un(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[zi]=o.current,pi(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[zi]=c.current,pi(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)}Kt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ft(t.pendingLanes);n!==0&&(Wt(t,n|1),gl(t,I()),!(J&6)&&(tl=I()+500,fa()))}break;case 13:wl(function(){var t=ro(e,1);t!==null&&hl(t,e,1,pl())}),lu(e,1)}},qt=function(e){if(e.tag===13){var t=ro(e,134217728);t!==null&&hl(t,e,134217728,pl()),lu(e,134217728)}},Jt=function(e){if(e.tag===13){var t=ml(e),n=ro(e,t);n!==null&&hl(n,e,t,pl()),lu(e,t)}},Yt=function(){return L},Xt=function(e,t){var n=L;try{return L=e,t()}finally{L=n}},Ge=function(e,t,n){switch(t){case`input`:if(Se(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=Ki(i);if(!a)throw Error(r(90));_e(i),Se(i,a)}}}break;case`textarea`:ke(e,n);break;case`select`:t=n.value,t!=null&&Ee(e,!!n.multiple,t,!1)}},Xe=Cl,Ze=wl;var yu={usingClientEntryPoint:!1,Events:[Wi,Gi,Ki,Je,Ye,Cl]},bu={findFiberByHostInstance:Ui,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:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ht(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{Et=Su.inject(xu),Dt=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[zi]=t.current,pi(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=ht(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[zi]=t.current,pi(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[zi]=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(e.status===401||e.status===403)&&window.dispatchEvent(new CustomEvent(`nyxora-auth-error`)),window.dispatchEvent(new CustomEvent(`nyxora-network-restored`)),e}catch(e){throw window.dispatchEvent(new CustomEvent(`nyxora-network-error`)),e}}var x=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ee=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),C=e=>{let t=S(e);return t.charAt(0).toUpperCase()+t.slice(1)},w={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`},T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},te=(0,g.createContext)({}),ne=()=>(0,g.useContext)(te),E=(0,g.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=ne()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,g.createElement)(`svg`,{ref:c,...w,width:t??l??w.width,height:t??l??w.height,stroke:e??f,strokeWidth:m,className:x(`lucide`,p,i),...!a&&!T(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),D=(e,t)=>{let n=(0,g.forwardRef)(({className:n,...r},i)=>(0,g.createElement)(E,{ref:i,iconNode:t,className:x(`lucide-${ee(C(e))}`,`lucide-${e}`,n),...r}));return n.displayName=C(e),n},O=D(`chart-line`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]]),k=D(`chart-pie`,[[`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`}]]),A=D(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),j=D(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),M=D(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),re=D(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ie=D(`panel-left-close`,[[`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`}]]),ae=D(`panels-top-left`,[[`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`}]]),N=D(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),oe=D(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),se=D(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),ce=D(`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`}]]),le=D(`arrow-down-up`,[[`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`}]]),ue=D(`arrow-right-left`,[[`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`}]]),de=D(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),fe=D(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),pe=D(`calendar`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}]]),me=D(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),he=D(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ge=D(`clipboard-list`,[[`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`}]]),_e=D(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`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`}]]),ve=D(`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`}]]),ye=D(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),be=D(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),xe=D(`dollar-sign`,[[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,key:`7eqyqh`}],[`path`,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,key:`1b0p4s`}]]),Se=D(`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`}]]),Ce=D(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),we=D(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Te=D(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),Ee=D(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),De=D(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Oe=D(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),ke=D(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Ae=D(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),je=D(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Me=D(`key-round`,[[`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`}]]),Ne=D(`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`}]]),Pe=D(`landmark`,[[`path`,{d:`M10 18v-7`,key:`wt116b`}],[`path`,{d:`M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z`,key:`yxxwt6`}],[`path`,{d:`M14 18v-7`,key:`vav6t3`}],[`path`,{d:`M18 18v-7`,key:`aexdmj`}],[`path`,{d:`M3 22h18`,key:`8prr45`}],[`path`,{d:`M6 18v-7`,key:`1ivflk`}]]),Fe=D(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Ie=D(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),Le=D(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Re=D(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),ze=D(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Be=D(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),Ve=D(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),He=D(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Ue=D(`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`}]]),We=D(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Ge=D(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Ke=D(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),P=D(`refresh-ccw`,[[`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`}]]),qe=D(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Je=D(`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`}]]),Ye=D(`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`}]]),Xe=D(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ze=D(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Qe=D(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),$e=D(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),et=D(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),tt=D(`shield`,[[`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`}]]),nt=D(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),rt=D(`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`}]]),it=D(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),at=D(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),ot=D(`trending-down`,[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]),st=D(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),ct=D(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),lt=D(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),ut=D(`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`}]]),dt=D(`wallet-cards`,[[`path`,{d:`M3 11h3.75a2 2 0 0 1 1.6.8l.45.6a4 4 0 0 0 6.4 0l.45-.6a2 2 0 0 1 1.6-.8H21`,key:`1vwh6y`}],[`path`,{d:`M3 7h18`,key:`1uiuf2`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),ft=D(`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`}]]),pt=D(`wifi-off`,[[`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`}]]),mt=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ht=D(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);function gt(e,t=5e3){let n=(0,g.useRef)(e);(0,g.useEffect)(()=>{n.current=e},[e]),(0,g.useEffect)(()=>{n.current();let e=setInterval(()=>{document.hidden||n.current()},t),r=()=>{document.hidden||n.current()};return document.addEventListener(`visibilitychange`,r),()=>{clearInterval(e),document.removeEventListener(`visibilitychange`,r)}},[t])}var _t=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})),F=o(((e,t)=>{t.exports=_t()}))(),vt=({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);gt(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`)}},5e3);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,F.jsxs)(`div`,{className:`overview-container`,children:[(0,F.jsxs)(`div`,{className:`overview-header`,children:[(0,F.jsx)(`h1`,{children:`Nyxora Status`}),(0,F.jsx)(`p`,{children:`System health, active configuration, and loaded Web3 skills.`})]}),(0,F.jsxs)(`div`,{className:`panel gateway-access`,children:[(0,F.jsxs)(`div`,{className:`panel-header`,children:[(0,F.jsx)(`h3`,{children:`System Configuration`}),(0,F.jsx)(`p`,{children:`Current runtime parameters for your Web3 Agent.`})]}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{children:`API Endpoint`}),(0,F.jsx)(`input`,{type:`text`,value:`/api/chat`,readOnly:!0})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{children:`Agent Name`}),(0,F.jsx)(`input`,{type:`text`,value:e.agent.name,readOnly:!0})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{children:`Memory Storage`}),(0,F.jsx)(`input`,{type:`text`,value:n.memoryPath||`./memory.json`,readOnly:!0})]})]})]}),(0,F.jsxs)(`div`,{className:`metrics-grid`,children:[(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`COST`}),(0,F.jsxs)(`div`,{className:`metric-val`,children:[`$`,n.cost.toFixed(4)]}),(0,F.jsxs)(`div`,{className:`metric-sub`,children:[n.tokens,` tokens - `,n.messages,` msgs`]})]}),(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`SESSIONS`}),(0,F.jsx)(`div`,{className:`metric-val`,children:t}),(0,F.jsxs)(`div`,{className:`metric-sub`,children:[t,` Local chat session`,t===1?``:`s`,` active`]})]}),(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`SKILLS`}),(0,F.jsxs)(`div`,{className:`metric-val`,children:[n.activeSkills===void 0?2:n.activeSkills,`/`,n.totalSkills===void 0?2:n.totalSkills]}),(0,F.jsxs)(`div`,{className:`metric-sub`,children:[n.totalSkills===void 0?2:n.totalSkills,` Web3 & OS skills loaded`]})]}),(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`CRON`}),(0,F.jsxs)(`div`,{className:`metric-val`,children:[u,` jobs`]}),(0,F.jsx)(`div`,{className:`metric-sub`,children:u===0?`No scheduled tasks`:`${u} active schedule(s)`})]}),(0,F.jsxs)(`div`,{className:`metric-card`,children:[(0,F.jsx)(`label`,{children:`MODEL AUTH`}),(()=>{let t=e.llm.provider.toLowerCase(),n=t===`9router`||t===`ollama`,r=e.credentials?e.credentials[`${t}_key`]:void 0,i=r&&r.length>5||n;return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`metric-val ${i?`text-green`:`text-red`}`,style:{color:i?`var(--success)`:`var(--danger)`},children:n?`Local Proxy`:i?`Configured`:`Missing Key`}),(0,F.jsx)(`div`,{className:`metric-sub`,children:n?`${e.llm.provider.toUpperCase()} running (no key needed)`:`${e.llm.provider.toUpperCase()} provider ${i?`connected`:`not configured`}`})]})})()]})]}),(0,F.jsxs)(`div`,{className:`logs-grid`,children:[(0,F.jsxs)(`div`,{className:`log-panel`,children:[(0,F.jsx)(`div`,{className:`log-header`,children:(0,F.jsxs)(`span`,{children:[`Event Log `,(0,F.jsx)(`span`,{className:`badge`,children:i.length})]})}),(0,F.jsxs)(`div`,{className:`log-content`,children:[i.map((e,t)=>(0,F.jsxs)(`div`,{className:`log-row`,style:{fontFamily:`monospace`},children:[(0,F.jsxs)(`span`,{className:`log-time`,style:{color:`var(--accent)`},children:[`[`,e.timestamp,`]`]}),(0,F.jsxs)(`span`,{className:`log-msg`,style:{color:`var(--text-secondary)`,marginLeft:`8px`},children:[e.event,` `,e.meta&&Object.keys(e.meta).length>0?(0,F.jsx)(`span`,{className:`log-meta`,style:{color:`var(--text-secondary)`},children:JSON.stringify(e.meta)}):null]})]},t)),(0,F.jsx)(`div`,{ref:f})]})]}),(0,F.jsxs)(`div`,{className:`log-panel`,children:[(0,F.jsx)(`div`,{className:`log-header`,children:(0,F.jsxs)(`span`,{children:[`Gateway Logs `,(0,F.jsx)(`span`,{className:`badge`,children:o.length})]})}),(0,F.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,F.jsxs)(`div`,{className:`log-row gateway-row`,style:{fontFamily:`monospace`},children:[(0,F.jsxs)(`span`,{className:`log-time`,style:{color:`var(--accent)`},children:[`[`,e.timestamp,`]`]}),(0,F.jsxs)(`span`,{className:`log-msg`,style:{color:`var(--text-secondary)`,marginLeft:`8px`},children:[n,` `,e.meta?JSON.stringify(e.meta):``]})]},t)}),(0,F.jsx)(`div`,{ref:p})]})]})]}),(0,F.jsxs)(`div`,{className:`panel gateway-access`,style:{marginTop:`24px`},children:[(0,F.jsxs)(`div`,{className:`panel-header`,children:[(0,F.jsx)(`h3`,{children:`Memory Log`}),(0,F.jsx)(`p`,{children:`AI's episodic memory and extracted habits. You can delete incorrect observations.`})]}),(0,F.jsx)(`div`,{className:`form-row memory-log-container`,style:{flexDirection:`column`,gap:`10px`,maxHeight:`300px`,overflowY:`auto`,paddingRight:`8px`},children:c.length===0?(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,background:`var(--bg-sidebar)`,padding:`10px 15px`,borderRadius:`6px`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`},children:[(0,F.jsx)(`div`,{style:{color:`var(--text-primary)`,fontWeight:`500`},children:e.fact}),(0,F.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,F.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,F.jsx)(`div`,{className:`overview-container`,children:`Loading...`})},yt=({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,F.jsxs)(`div`,{className:`custom-network-selector`,ref:s,style:{width:`100%`},children:[(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[c?.icon&&(0,F.jsx)(`div`,{children:c.icon}),(0,F.jsx)(`span`,{className:`network-label`,style:{fontWeight:600},children:c?.label})]}),(0,F.jsx)(he,{size:14,className:`network-chevron`})]}),a&&(0,F.jsx)(`ul`,{className:`network-dropdown-menu styled-scroll`,style:{width:`100%`,top:`calc(100% + 8px)`,padding:`8px`,zIndex:1e3,maxHeight:`250px`,overflowY:`auto`},children:t.map(t=>(0,F.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,F.jsx)(`div`,{children:t.icon}),t.label]},t.id))})]})},I=({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,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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`anthropic`:case`claude`:return(0,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.jsx)(`path`,{d:`M20.25 19.344a1.85 1.85 0 0 1-1.849 1.854 1.85 1.85 0 0 1-1.85-1.854V12.18l-8.608 5.762a1.847 1.847 0 0 1-1.523.275 1.85 1.85 0 0 1-1.018-1.025 1.847 1.847 0 0 1 .28-1.52l5.772-8.544H4.3A1.85 1.85 0 0 1 2.45 5.275 1.85 1.85 0 0 1 4.3 3.424h15.95a1.85 1.85 0 0 1 1.849 1.85v14.07z`})});case`openai`:return(0,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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`9router`:return(0,F.jsxs)(`svg`,{...i,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,viewBox:`0 0 24 24`,children:[(0,F.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`8`,rx:`2`,ry:`2`}),(0,F.jsx)(`rect`,{x:`2`,y:`14`,width:`20`,height:`8`,rx:`2`,ry:`2`}),(0,F.jsx)(`line`,{x1:`6`,y1:`6`,x2:`6.01`,y2:`6`}),(0,F.jsx)(`line`,{x1:`6`,y1:`18`,x2:`6.01`,y2:`18`})]});case`ollama`:return(0,F.jsxs)(`svg`,{...i,viewBox:`0 0 24 24`,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.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,F.jsx)(`circle`,{cx:`8`,cy:`14`,r:`1`,fill:r,stroke:`none`}),(0,F.jsx)(`circle`,{cx:`12`,cy:`14`,r:`1`,fill:r,stroke:`none`})]});case`groq`:return(0,F.jsxs)(`svg`,{...i,viewBox:`0 0 24 24`,stroke:r,fill:`none`,strokeWidth:`2.5`,strokeLinecap:`square`,children:[(0,F.jsx)(`path`,{d:`M21 12A9 9 0 1112 3a9 9 0 010 18z`}),(0,F.jsx)(`path`,{d:`M15 12h-3v3`})]});case`mistral`:return(0,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.jsx)(`path`,{d:`M3 21V3h4l5 8 5-8h4v18h-3V8l-6 9-6-9v13H3z`})});case`xai`:case`grok`:return(0,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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,F.jsx)(`svg`,{...i,viewBox:`0 0 24 24`,children:(0,F.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,F.jsxs)(`svg`,{...i,fill:`none`,stroke:r,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.jsx)(`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,ry:`2`}),(0,F.jsx)(`rect`,{x:`9`,y:`9`,width:`6`,height:`6`}),(0,F.jsx)(`line`,{x1:`9`,y1:`1`,x2:`9`,y2:`4`}),(0,F.jsx)(`line`,{x1:`15`,y1:`1`,x2:`15`,y2:`4`}),(0,F.jsx)(`line`,{x1:`9`,y1:`20`,x2:`9`,y2:`23`}),(0,F.jsx)(`line`,{x1:`15`,y1:`20`,x2:`15`,y2:`23`}),(0,F.jsx)(`line`,{x1:`20`,y1:`9`,x2:`23`,y2:`9`}),(0,F.jsx)(`line`,{x1:`20`,y1:`14`,x2:`23`,y2:`14`}),(0,F.jsx)(`line`,{x1:`1`,y1:`9`,x2:`4`,y2:`9`}),(0,F.jsx)(`line`,{x1:`1`,y1:`14`,x2:`4`,y2:`14`})]})}},bt=e=>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`:`https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png`,xt=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}},St=(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/${xt(e)}/${t.toLowerCase()}.png`,Ct=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`:case`cmc_pro_key`:return`/routers/cmc.png`;case`coingecko_key`:case`coingecko_pro_key`:return`/routers/coingecko.png`;case`zerion_key`:return`/routers/zerion.png`;case`auto`:return``;default:return``}},wt=({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),l=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)}}},u=e=>{navigator.clipboard.writeText(e)};return(0,F.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,F.jsxs)(`div`,{className:`panel`,style:{width:`600px`,maxWidth:`90%`,position:`relative`,overflow:`hidden`},children:[(0,F.jsx)(`button`,{onClick:e,style:{position:`absolute`,top:`16px`,right:`16px`,background:`none`,border:`none`,color:`var(--text-secondary)`,cursor:`pointer`},children:(0,F.jsx)(mt,{size:20})}),(0,F.jsxs)(`div`,{style:{textAlign:`center`,marginBottom:`32px`},children:[(0,F.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,F.jsx)(tt,{size:24})}),(0,F.jsx)(`h2`,{style:{color:`var(--text-primary)`,margin:0},children:`Google Workspace Setup`}),(0,F.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,F.jsx)(`div`,{style:{display:`flex`,marginBottom:`24px`},children:[1,2,3].map(e=>(0,F.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,F.jsxs)(`div`,{className:`wizard-step`,children:[(0,F.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 1: Create a Google Cloud Project`}),(0,F.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:[(0,F.jsxs)(`li`,{children:[`Go to the `,(0,F.jsx)(`a`,{href:`https://console.cloud.google.com/`,target:`_blank`,rel:`noreferrer`,style:{color:`var(--accent)`},children:`Google Cloud Console`}),`.`]}),(0,F.jsx)(`li`,{children:`Create a new project (e.g., "Nyxora Local Agent").`}),(0,F.jsxs)(`li`,{children:[`Navigate to `,(0,F.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` Library`]}),`.`]}),(0,F.jsxs)(`li`,{children:[`Search for and enable the following APIs:`,(0,F.jsxs)(`ul`,{style:{marginTop:`8px`,marginBottom:`8px`,color:`#a3be8c`},children:[(0,F.jsx)(`li`,{children:`Gmail API`}),(0,F.jsx)(`li`,{children:`Google Calendar API`}),(0,F.jsx)(`li`,{children:`Google Drive API`}),(0,F.jsx)(`li`,{children:`Google Docs API`}),(0,F.jsx)(`li`,{children:`Google Sheets API`}),(0,F.jsx)(`li`,{children:`Google Forms API`})]})]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:`32px`},children:(0,F.jsx)(`button`,{className:`nord-btn-primary`,onClick:()=>n(2),children:`Next Step`})})]}),t===2&&(0,F.jsxs)(`div`,{className:`wizard-step`,children:[(0,F.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 2: Configure OAuth Consent`}),(0,F.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:[(0,F.jsxs)(`li`,{children:[`Go to `,(0,F.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` OAuth consent screen`]}),`.`]}),(0,F.jsxs)(`li`,{children:[`Choose `,(0,F.jsx)(`strong`,{children:`External`}),` User Type.`]}),(0,F.jsx)(`li`,{children:`Fill in the App Information. Use the URLs provided below for the App Domain:`})]}),(0,F.jsxs)(`div`,{style:{background:`var(--bg-secondary)`,padding:`16px`,borderRadius:`8px`,marginTop:`16px`,marginBottom:`16px`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`8px`},children:[(0,F.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`},children:`Privacy Policy URL:`}),(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,F.jsx)(`span`,{style:{color:`var(--text-primary)`,fontFamily:`monospace`,fontSize:`0.85rem`},children:`https://nyxoraai.github.io/privacy`}),(0,F.jsx)(`button`,{onClick:()=>u(`https://nyxoraai.github.io/privacy`),style:{background:`none`,border:`none`,cursor:`pointer`,color:`var(--text-secondary)`,padding:`2px`},children:(0,F.jsx)(ve,{size:13})})]})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,F.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`},children:`Terms of Service URL:`}),(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,F.jsx)(`span`,{style:{color:`var(--text-primary)`,fontFamily:`monospace`,fontSize:`0.85rem`},children:`https://nyxoraai.github.io/terms`}),(0,F.jsx)(`button`,{onClick:()=>u(`https://nyxoraai.github.io/terms`),style:{background:`none`,border:`none`,cursor:`pointer`,color:`var(--text-secondary)`,padding:`2px`},children:(0,F.jsx)(ve,{size:13})})]})]})]}),(0,F.jsx)(`ol`,{start:4,style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`},children:(0,F.jsxs)(`li`,{children:[`Add your personal email to the `,(0,F.jsx)(`strong`,{children:`Test Users`}),` list so you can bypass app verification.`]})}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginTop:`32px`},children:[(0,F.jsx)(`button`,{className:`nord-btn`,style:{background:`transparent`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`},onClick:()=>n(1),children:`Back`}),(0,F.jsx)(`button`,{className:`nord-btn-primary`,onClick:()=>n(3),children:`Next Step`})]})]}),t===3&&(0,F.jsxs)(`div`,{className:`wizard-step`,children:[(0,F.jsx)(`h3`,{style:{color:`var(--text-primary)`,marginBottom:`16px`},children:`Step 3: Upload Credentials`}),(0,F.jsxs)(`ol`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,paddingLeft:`20px`,marginBottom:`24px`},children:[(0,F.jsxs)(`li`,{children:[`Go to `,(0,F.jsxs)(`strong`,{children:[`APIs & Services `,`>`,` Credentials`]}),`.`]}),(0,F.jsxs)(`li`,{children:[`Click `,(0,F.jsxs)(`strong`,{children:[`Create Credentials `,`>`,` OAuth client ID`]}),`.`]}),(0,F.jsxs)(`li`,{children:[`Choose `,(0,F.jsx)(`strong`,{children:`Web application`}),` as the application type.`]}),(0,F.jsxs)(`li`,{children:[`Under `,(0,F.jsx)(`strong`,{children:`Authorized redirect URIs`}),`, add: `,(0,F.jsx)(`code`,{style:{color:`var(--accent)`,padding:`2px 4px`,background:`var(--bg-sidebar)`,borderRadius:`4px`},children:`http://localhost:3000/api/auth/google/callback`})]}),(0,F.jsx)(`li`,{children:`Click Download JSON and upload the file here:`})]}),a?(0,F.jsxs)(`div`,{style:{textAlign:`center`,padding:`32px`,border:`1px dashed #a3be8c`,borderRadius:`8px`,backgroundColor:`rgba(163, 190, 140, 0.05)`},children:[(0,F.jsx)(j,{size:32,color:`#a3be8c`,style:{marginBottom:`16px`}}),(0,F.jsx)(`h4`,{style:{color:`#a3be8c`,margin:0},children:`Credentials Saved!`}),(0,F.jsx)(`p`,{style:{color:`var(--text-secondary)`,fontSize:`0.9rem`,marginTop:`8px`},children:`You can now use Google Workspace skills.`})]}):(0,F.jsxs)(`div`,{style:{position:`relative`},children:[(0,F.jsx)(`input`,{type:`file`,accept:`.json`,onChange:l,disabled:r,style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,opacity:0,cursor:`pointer`}}),(0,F.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,F.jsx)(ct,{size:24,color:`var(--text-secondary)`,style:{marginBottom:`16px`}}),(0,F.jsx)(`h4`,{style:{color:`var(--text-primary)`,margin:0},children:r?`Uploading...`:`Click or Drag JSON File`}),(0,F.jsxs)(`p`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`,marginTop:`8px`},children:[`Requires `,(0,F.jsx)(`code`,{children:`client_id`}),` and `,(0,F.jsx)(`code`,{children:`client_secret`})]})]})]}),s&&(0,F.jsx)(`div`,{style:{color:`#bf616a`,fontSize:`0.85rem`,marginTop:`16px`,textAlign:`center`},children:s}),(0,F.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginTop:`32px`},children:(0,F.jsx)(`button`,{className:`nord-btn`,style:{background:`transparent`,border:`1px solid var(--glass-border)`,color:`var(--text-secondary)`},onClick:()=>n(2),children:`Back`})})]})]})})},Tt=({value:e,onChange:t,options:n})=>{let[r,i]=(0,g.useState)(!1),[a,o]=(0,g.useState)(``),s=(0,g.useRef)(null);(0,g.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&i(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let c=n.filter(e=>e.toLowerCase().includes(a.toLowerCase()));return(0,F.jsxs)(`div`,{className:`custom-network-selector`,ref:s,style:{width:`100%`,position:`relative`},children:[(0,F.jsxs)(`button`,{className:`network-selector-pill`,style:{background:`var(--accent)`,color:`var(--bg-secondary)`,padding:`10px 20px`,fontSize:`0.9rem`,width:`100%`,justifyContent:`space-between`},onClick:()=>i(!r),"aria-expanded":r,children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,F.jsx)(xe,{size:16,color:`var(--bg-secondary)`}),(0,F.jsx)(`span`,{className:`network-label`,style:{fontWeight:600,textTransform:`uppercase`,color:`var(--bg-secondary)`},children:e||`USD`})]}),(0,F.jsx)(he,{size:14,className:`network-chevron`})]}),r&&(0,F.jsxs)(`div`,{className:`network-dropdown-menu`,style:{width:`100%`,top:`calc(100% + 8px)`,padding:`8px`,zIndex:1e3,boxSizing:`border-box`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,background:`rgba(0,0,0,0.2)`,padding:`6px 8px`,borderRadius:`6px`,marginBottom:`8px`},children:[(0,F.jsx)(Xe,{size:14,color:`var(--text-secondary)`,style:{marginRight:`8px`}}),(0,F.jsx)(`input`,{type:`text`,placeholder:`Search currency...`,value:a,onChange:e=>o(e.target.value),style:{background:`transparent`,border:`none`,color:`var(--text-primary)`,outline:`none`,width:`100%`,fontSize:`0.85rem`},autoFocus:!0})]}),(0,F.jsxs)(`ul`,{className:`styled-scroll`,style:{listStyle:`none`,padding:0,margin:0,maxHeight:`200px`,overflowY:`auto`},children:[c.map(n=>(0,F.jsx)(`li`,{className:`network-dropdown-item ${n===e?`active`:``}`,onClick:()=>{t(n),i(!1),o(``)},style:{display:`flex`,alignItems:`center`,padding:`10px 16px`,cursor:`pointer`,borderRadius:`8px`,textTransform:`uppercase`,fontSize:`0.9rem`,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:n},n)),c.length===0&&(0,F.jsx)(`li`,{style:{padding:`8px`,color:`var(--text-secondary)`,textAlign:`center`,fontSize:`0.85rem`},children:`No results`})]})]})]})},Et=e=>e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),Dt=(e,t)=>{let n=t===!1?`var(--tool-bg)`:`var(--accent)`;switch(Et(e).toLowerCase()){case`get balance`:return(0,F.jsx)(ft,{size:20,color:n});case`transfer token`:return(0,F.jsx)(Ze,{size:20,color:n});case`get price`:return(0,F.jsx)(ht,{size:20,color:n});case`swap token`:return(0,F.jsx)(ue,{size:20,color:n});case`bridge token`:return(0,F.jsx)(qe,{size:20,color:n});case`mint nft`:return(0,F.jsx)(je,{size:20,color:n});case`custom tx`:return(0,F.jsx)(it,{size:20,color:n});case`check address`:return(0,F.jsx)(Xe,{size:20,color:n});case`get my address`:return(0,F.jsx)(lt,{size:20,color:n});case`check token security`:return(0,F.jsx)(tt,{size:20,color:n});case`check portfolio`:return(0,F.jsx)(k,{size:20,color:n});case`analyze market`:return(0,F.jsx)(O,{size:20,color:n});case`get trending tokens`:return(0,F.jsx)(Oe,{size:20,color:n});case`create wallet`:return(0,F.jsx)(dt,{size:20,color:n});case`supply aave`:return(0,F.jsx)(Pe,{size:20,color:n});case`revoke approval`:return(0,F.jsx)(Ie,{size:20,color:n});case`deposit yield vault`:return(0,F.jsx)(ut,{size:20,color:n});case`provide liquidity v3`:return(0,F.jsx)(Se,{size:20,color:n});case`create limit order`:return(0,F.jsx)(rt,{size:20,color:n});default:return(0,F.jsx)(_e,{size:20,color:n})}},Ot=()=>{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,F.jsx)(`div`,{className:`settings-subpanel`,children:`Loading skills...`});let s=e.filter(e=>e.function.name.toLowerCase().includes(n.toLowerCase())||e.function.description.toLowerCase().includes(n.toLowerCase()));return(0,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`24px`},children:[(0,F.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`Skills`}),(0,F.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`Installed skills and their status.`})]}),(0,F.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,F.jsx)(Xe,{size:18,color:`#9ca3af`}),(0,F.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,F.jsxs)(`span`,{style:{color:`#6b7280`,fontSize:`0.85rem`},children:[s.length,` shown`]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:s.map((e,t)=>(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`16px`,flex:1},children:[(0,F.jsx)(`div`,{style:{marginTop:`2px`},children:Dt(e.function.name,e.isActive!==!1)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:`0 0 6px 0`,fontSize:`1rem`,color:e.isActive===!1?`var(--text-secondary)`:`var(--text-primary)`,fontWeight:600},children:Et(e.function.name)}),(0,F.jsx)(`p`,{style:{margin:0,color:`#9ca3af`,fontSize:`0.85rem`,lineHeight:`1.5`,maxWidth:`800px`},children:e.function.description})]})]}),(0,F.jsx)(`div`,{style:{marginLeft:`24px`},children:(0,F.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,F.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))})]})},kt=e=>{let t=e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `);return e===`run_terminal_command`&&(t+=` (UNSAFE)`),t},At=(e,t)=>{let n=t===!1?`var(--tool-bg)`:`var(--accent)`;switch(kt(e).toLowerCase()){case`run terminal command (unsafe)`:return(0,F.jsx)(it,{size:20,color:n});case`read local file`:return(0,F.jsx)(De,{size:20,color:n});case`write local file`:return(0,F.jsx)(M,{size:20,color:n});case`browse website`:return(0,F.jsx)(Ae,{size:20,color:n});case`update security policy`:return(0,F.jsx)(et,{size:20,color:n});case`analyze document`:return(0,F.jsx)(Te,{size:20,color:n});case`search web`:return(0,F.jsx)(Xe,{size:20,color:n});case`read gmail inbox`:return(0,F.jsx)(Le,{size:20,color:n});case`list calendar events`:return(0,F.jsx)(pe,{size:20,color:n});case`append row to sheets`:return(0,F.jsx)(Ee,{size:20,color:n});case`read google docs`:return(0,F.jsx)(fe,{size:20,color:n});case`read google form responses`:return(0,F.jsx)(ge,{size:20,color:n});case`edit local file`:return(0,F.jsx)(Ye,{size:20,color:n});case`execute git command`:return(0,F.jsx)(ke,{size:20,color:n});case`manage twitter`:return(0,F.jsx)(Re,{size:20,color:n});case`manage notion`:return(0,F.jsx)(ae,{size:20,color:n});case`transcribe audio`:return(0,F.jsx)(Be,{size:20,color:n});case`summarize text`:return(0,F.jsx)(oe,{size:20,color:n});default:return(0,F.jsx)(_e,{size:20,color:n})}},jt=()=>{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,F.jsx)(`div`,{className:`settings-subpanel`,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,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`24px`},children:[(0,F.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`OS Skills`}),(0,F.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`System-level capabilities for the agent OS.`})]}),(0,F.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,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:`0 0 8px 0`,color:`var(--text-primary)`,fontSize:`1.1rem`},children:`Account Linking`}),(0,F.jsx)(`p`,{style:{margin:0,color:`var(--text-secondary)`,fontSize:`0.9rem`},children:`Connect your Google Workspace to unlock Gmail and Calendar skills.`})]}),(0,F.jsx)(`div`,{children:c?(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,F.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,F.jsx)(`span`,{style:{width:`8px`,height:`8px`,background:`#a3be8c`,borderRadius:`50%`,display:`inline-block`}}),`Connected to Google`]}),(0,F.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,F.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,F.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.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,F.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,F.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,F.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,F.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,F.jsx)(Xe,{size:18,color:`#9ca3af`}),(0,F.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,F.jsxs)(`span`,{style:{color:`#6b7280`,fontSize:`0.85rem`},children:[f.length,` shown`]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:f.map((e,t)=>(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`16px`,flex:1},children:[(0,F.jsx)(`div`,{style:{marginTop:`2px`},children:At(e.function.name,e.isActive!==!1)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:`0 0 6px 0`,fontSize:`1rem`,color:e.isActive===!1?`var(--text-secondary)`:`var(--text-primary)`,fontWeight:600},children:kt(e.function.name)}),(0,F.jsx)(`p`,{style:{margin:0,color:`#9ca3af`,fontSize:`0.85rem`,lineHeight:`1.5`,maxWidth:`800px`},children:e.function.description})]})]}),(0,F.jsx)(`div`,{style:{marginLeft:`24px`},children:(0,F.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,F.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,F.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,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`16px`,marginBottom:`16px`},children:[(0,F.jsx)(`div`,{style:{background:`rgba(191, 97, 106, 0.1)`,padding:`12px`,borderRadius:`50%`},children:(0,F.jsx)(se,{size:32,color:`#bf616a`})}),(0,F.jsx)(`h2`,{style:{margin:0,color:`var(--text-primary)`,fontSize:`1.25rem`},children:`DANGER ZONE: System Access`})]}),(0,F.jsxs)(`p`,{style:{color:`var(--text-secondary)`,lineHeight:`1.6`,marginBottom:`24px`},children:[`You are about to enable `,(0,F.jsx)(`strong`,{children:`Terminal Execution`}),`. This grants the AI agent`,(0,F.jsx)(`strong`,{children:` full, unrestrained access`}),` to execute arbitrary shell scripts on your host operating system.`]}),(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:`12px`},children:[(0,F.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,F.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`})]})]})})]})},Mt=e=>e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `),Nt=(e,t)=>(0,F.jsx)(Ge,{size:20,color:t===!1?`var(--tool-bg)`:`var(--accent)`}),Pt=()=>{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/external`);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,F.jsx)(`div`,{className:`settings-subpanel`,children:`Loading skills...`});let s=e.filter(e=>e.function.name.toLowerCase().includes(n.toLowerCase())||e.function.description.toLowerCase().includes(n.toLowerCase()));return(0,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`overview-header`,style:{marginBottom:`24px`},children:[(0,F.jsx)(`h1`,{style:{color:`var(--text-primary)`},children:`External Skills`}),(0,F.jsx)(`p`,{style:{color:`var(--text-secondary)`},children:`User-installed third-party agent skills and custom integrations.`})]}),(0,F.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,F.jsx)(Xe,{size:18,color:`#9ca3af`}),(0,F.jsx)(`input`,{type:`text`,placeholder:`Filter installed external 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,F.jsxs)(`span`,{style:{color:`#6b7280`,fontSize:`0.85rem`},children:[s.length,` shown`]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`8px`},children:s.map((e,t)=>(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`flex-start`,gap:`16px`,flex:1},children:[(0,F.jsx)(`div`,{style:{marginTop:`2px`},children:Nt(e.function.name,e.isActive!==!1)}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:`0 0 6px 0`,fontSize:`1rem`,color:e.isActive===!1?`var(--text-secondary)`:`var(--text-primary)`,fontWeight:600},children:Mt(e.function.name)}),(0,F.jsx)(`p`,{style:{margin:0,color:`#9ca3af`,fontSize:`0.85rem`,lineHeight:`1.5`,maxWidth:`800px`},children:e.function.description})]})]}),(0,F.jsx)(`div`,{style:{marginLeft:`24px`},children:(0,F.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,F.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))})]})},Ft=()=>{let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)({}),[i,a]=(0,g.useState)({}),[o,s]=(0,g.useState)(null);(0,g.useEffect)(()=>{(async()=>{try{let e=await(await b(`/api/defi-keys`)).json();e.requirements&&t(e.requirements)}catch{console.error(`Failed to fetch defi keys`)}})()},[]);let c=async e=>{try{let i=n[e];if(!i)return;(await b(`/api/defi-keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({[e]:i})})).ok&&(s(`Saved successfully!`),t(t=>t.map(t=>t.id===e?{...t,configured:!0}:t)),r(t=>{let n={...t};return delete n[e],n}),setTimeout(()=>s(null),3e3))}catch{s(`Failed to save key`)}},l=async e=>{try{(await b(`/api/defi-keys/${e}`,{method:`DELETE`})).ok&&(s(`Key deleted successfully!`),t(t=>t.map(t=>t.id===e?{...t,configured:!1}:t)),setTimeout(()=>s(null),3e3))}catch{s(`Failed to delete key`)}};return(0,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,F.jsx)(Me,{size:28,color:`var(--accent)`}),(0,F.jsx)(`h2`,{className:`settings-title`,style:{margin:0,color:`var(--text-primary)`},children:`DeFi Configuration`})]}),(0,F.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,F.jsx)(et,{size:24,color:`#ebcb8b`,style:{flexShrink:0,marginTop:`2px`}}),(0,F.jsxs)(`p`,{style:{margin:0,fontSize:`0.85rem`,color:`var(--text-secondary)`,lineHeight:1.6},children:[(0,F.jsx)(`strong`,{style:{color:`#ebcb8b`},children:`Security Notice:`}),` Your keys are stored in plain text locally inside `,(0,F.jsx)(`code`,{style:{background:`rgba(0,0,0,0.2)`,padding:`2px 4px`,borderRadius:`4px`},children:`~/.nyxora/config/defi_keys.yaml`}),`. They are highly isolated and never transmitted except directly to the respective provider's API.`]})]}),o&&(0,F.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,F.jsx)(A,{size:20}),` `,(0,F.jsx)(`strong`,{children:o})]}),(0,F.jsxs)(`div`,{className:`settings-section`,children:[(0,F.jsx)(`h3`,{className:`section-title`,style:{color:`var(--accent)`,marginBottom:`8px`,fontSize:`1.2rem`},children:`Dynamic Provider Integrations`}),(0,F.jsx)(`p`,{className:`section-description`,style:{marginBottom:`32px`,color:`var(--text-secondary)`,fontSize:`0.95rem`},children:`These fields are dynamically loaded from installed DeFi Aggregator Providers. Provide your API keys to bypass rate limits.`}),e.length===0&&(0,F.jsx)(`div`,{style:{textAlign:`center`,color:`var(--text-secondary)`,padding:`40px`},children:`No API Keys required by currently active providers.`}),(0,F.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`,gap:`16px`},children:e.map(e=>(0,F.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,F.jsxs)(`div`,{style:{width:`280px`,flexShrink:0,display:`flex`,gap:`12px`,alignItems:`flex-start`},children:[(0,F.jsx)(`img`,{src:Ct(e.id),alt:e.id,style:{width:32,height:32,borderRadius:`50%`,marginTop:`2px`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,F.jsxs)(`div`,{style:{flex:1},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`4px`},children:[(0,F.jsx)(`strong`,{style:{color:`var(--text-primary)`,fontSize:`1rem`,display:`block`},children:e.label}),e.configured&&(0,F.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,F.jsx)(A,{size:12}),` CONFIGURED`]})]}),(0,F.jsxs)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.8rem`,lineHeight:1.4,display:`block`},children:[e.required?`Required`:`Optional`,` API Key.`,e.docsUrl&&(0,F.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,style:{marginLeft:`4px`,color:`var(--accent)`},children:`Get Key`})]})]})]}),(0,F.jsxs)(`div`,{style:{flex:1,display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,F.jsxs)(`div`,{style:{position:`relative`,flex:1},children:[(0,F.jsx)(`input`,{type:i[e.id]?`text`:`password`,className:`nord-input`,style:{paddingRight:`40px`,borderColor:e.configured?`#a3be8c`:`var(--glass-border)`,width:`100%`},placeholder:e.configured?`••••••••••••••••`:`Paste API Key here...`,value:n[e.id]||``,onChange:t=>r({...n,[e.id]:t.target.value})}),(0,F.jsx)(`button`,{style:{position:`absolute`,right:`12px`,top:`50%`,transform:`translateY(-50%)`,background:`none`,border:`none`,color:`var(--tool-bg)`,cursor:`pointer`},onClick:()=>a({...i,[e.id]:!i[e.id]}),children:i[e.id]?(0,F.jsx)(Ce,{size:18}):(0,F.jsx)(we,{size:18})})]}),(0,F.jsxs)(`button`,{className:`nord-btn-primary`,onClick:()=>c(e.id),disabled:!n[e.id],style:{padding:`0 20px`,height:`40px`,gap:`8px`,flexShrink:0},children:[(0,F.jsx)(Je,{size:16}),` Save`]}),e.configured&&(0,F.jsx)(`button`,{onClick:()=>l(e.id),style:{height:`40px`,padding:`0 16px`,background:`transparent`,border:`1px solid var(--danger)`,color:`var(--danger)`,borderRadius:`8px`,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`8px`,flexShrink:0},children:`Delete`})]})]},e.id))})]})]})},It=()=>{let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)({}),[i,a]=(0,g.useState)({}),[o,s]=(0,g.useState)(null);(0,g.useEffect)(()=>{(async()=>{try{let e=await(await b(`/api/market-keys`)).json();e.requirements&&t(e.requirements)}catch{console.error(`Failed to fetch market keys`)}})()},[]);let c=async e=>{try{let i=n[e];if(!i)return;(await b(`/api/market-keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({[e]:i})})).ok&&(s(`Saved successfully!`),t(t=>t.map(t=>t.id===e?{...t,configured:!0}:t)),r(t=>{let n={...t};return delete n[e],n}),setTimeout(()=>s(null),3e3))}catch{s(`Failed to save key`)}},l=async e=>{try{(await b(`/api/market-keys/${e}`,{method:`DELETE`})).ok&&(s(`Key deleted successfully!`),t(t=>t.map(t=>t.id===e?{...t,configured:!1}:t)),setTimeout(()=>s(null),3e3))}catch{s(`Failed to delete key`)}};return(0,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,F.jsx)(Me,{size:28,color:`var(--accent)`}),(0,F.jsx)(`h2`,{className:`settings-title`,style:{margin:0,color:`var(--text-primary)`},children:`Market Oracles Configuration`})]}),(0,F.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,F.jsx)(et,{size:24,color:`#ebcb8b`,style:{flexShrink:0,marginTop:`2px`}}),(0,F.jsx)(`div`,{style:{fontSize:`0.9rem`,color:`var(--text-secondary)`,lineHeight:1.6},children:(0,F.jsxs)(`p`,{style:{margin:0,fontSize:`0.85rem`},children:[(0,F.jsx)(`strong`,{style:{color:`#ebcb8b`},children:`Security Notice:`}),` Your keys are stored in plain text locally inside `,(0,F.jsx)(`code`,{style:{background:`rgba(0,0,0,0.2)`,padding:`2px 4px`,borderRadius:`4px`},children:`~/.nyxora/config/market_keys.yaml`}),`. They are highly isolated and never transmitted except directly to the respective Oracle API.`]})})]}),o&&(0,F.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,F.jsx)(A,{size:20}),` `,(0,F.jsx)(`strong`,{children:o})]}),(0,F.jsxs)(`div`,{className:`settings-section`,children:[(0,F.jsx)(`h3`,{className:`section-title`,style:{color:`var(--accent)`,marginBottom:`8px`,fontSize:`1.2rem`},children:`Market Intelligence Providers`}),(0,F.jsx)(`p`,{className:`section-description`,style:{marginBottom:`32px`,color:`var(--text-secondary)`,fontSize:`0.95rem`},children:`These keys are used for market intelligence, price fetching, and portfolio analysis. If not provided, Nyxora will gracefully fallback to public APIs (CoinGecko Public / DexScreener).`}),e.length===0&&(0,F.jsx)(`div`,{style:{textAlign:`center`,color:`var(--text-secondary)`,padding:`40px`},children:`No API Keys required by currently active providers.`}),(0,F.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`,gap:`16px`},children:e.map(e=>(0,F.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,F.jsxs)(`div`,{style:{width:`280px`,flexShrink:0,display:`flex`,gap:`12px`,alignItems:`flex-start`},children:[(0,F.jsx)(`img`,{src:Ct(e.id),alt:e.id,style:{width:32,height:32,borderRadius:`50%`,marginTop:`2px`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,F.jsxs)(`div`,{style:{flex:1},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`4px`},children:[(0,F.jsx)(`strong`,{style:{color:`var(--text-primary)`,fontSize:`1rem`,display:`block`},children:e.label}),e.configured&&(0,F.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,F.jsx)(A,{size:12}),` CONFIGURED`]})]}),(0,F.jsxs)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.8rem`,lineHeight:1.4,display:`block`},children:[e.required?`Required`:`Optional`,` API Key.`,e.docsUrl&&(0,F.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,style:{marginLeft:`4px`,color:`var(--accent)`},children:`Get Key`})]})]})]}),(0,F.jsxs)(`div`,{style:{flex:1,display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,F.jsxs)(`div`,{style:{position:`relative`,flex:1},children:[(0,F.jsx)(`input`,{type:i[e.id]?`text`:`password`,className:`nord-input`,style:{paddingRight:`40px`,borderColor:e.configured?`#a3be8c`:`var(--glass-border)`,width:`100%`},placeholder:e.configured?`••••••••••••••••`:`Paste API Key here...`,value:n[e.id]||``,onChange:t=>r({...n,[e.id]:t.target.value})}),(0,F.jsx)(`button`,{style:{position:`absolute`,right:`12px`,top:`50%`,transform:`translateY(-50%)`,background:`none`,border:`none`,color:`var(--tool-bg)`,cursor:`pointer`},onClick:()=>a({...i,[e.id]:!i[e.id]}),children:i[e.id]?(0,F.jsx)(Ce,{size:18}):(0,F.jsx)(we,{size:18})})]}),(0,F.jsxs)(`button`,{className:`nord-btn-primary`,onClick:()=>c(e.id),disabled:!n[e.id],style:{padding:`0 20px`,height:`40px`,gap:`8px`,flexShrink:0},children:[(0,F.jsx)(Je,{size:16}),` Save`]}),e.configured&&(0,F.jsx)(`button`,{onClick:()=>l(e.id),style:{height:`40px`,padding:`0 16px`,background:`transparent`,border:`1px solid var(--danger)`,color:`var(--danger)`,borderRadius:`8px`,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:`8px`,flexShrink:0},children:`Delete`})]})]},e.id))})]})]})},Lt=[{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)`}],Rt=()=>{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,F.jsxs)(`div`,{className:`settings-subpanel`,children:[(0,F.jsxs)(`div`,{className:`nord-panel-header`,children:[(0,F.jsx)(Qe,{size:28,color:`var(--accent)`}),(0,F.jsx)(`h2`,{className:`settings-title`,style:{margin:0,color:`var(--text-primary)`},children:`RPC Configuration`})]}),(0,F.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,F.jsx)(et,{size:24,color:`#ebcb8b`,style:{flexShrink:0,marginTop:`2px`}}),(0,F.jsxs)(`div`,{style:{fontSize:`0.9rem`,color:`var(--text-secondary)`,lineHeight:1.6},children:[(0,F.jsx)(`strong`,{style:{color:`#ebcb8b`},children:`Privacy & Security:`}),` Your RPC keys are saved in a highly isolated `,(0,F.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,F.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,F.jsx)(A,{size:20}),` `,(0,F.jsx)(`strong`,{children:n})]}),(0,F.jsxs)(`div`,{className:`settings-section`,children:[(0,F.jsx)(`h3`,{className:`section-title`,style:{color:`var(--accent)`,marginBottom:`8px`,fontSize:`1.2rem`},children:`Network Endpoints`}),(0,F.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,F.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,F.jsx)(se,{size:16}),` Leaving a field empty will trigger the Agent's automatic `,(0,F.jsx)(`strong`,{children:`Public Fallback Mechanism`}),`.`]}),(0,F.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr`,gap:`16px`},children:Lt.map(n=>{let r=a(e[n.id]);return(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,alignItems:`center`,width:`240px`,flexShrink:0},children:[(0,F.jsx)(`img`,{src:bt(n.id),alt:n.id,style:{width:32,height:32,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`strong`,{style:{color:`var(--text-primary)`,fontSize:`1rem`,display:`block`},children:n.name}),(0,F.jsx)(`span`,{style:{color:`var(--text-secondary)`,fontSize:`0.8rem`,fontFamily:`monospace`},children:n.id})]})]}),(0,F.jsxs)(`div`,{style:{flex:1,display:`flex`,gap:`12px`},children:[(0,F.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,F.jsxs)(`button`,{className:`nord-btn-primary`,onClick:()=>i(n.id,r),style:{padding:`0 20px`,height:`40px`,gap:`8px`},children:[(0,F.jsx)(Je,{size:16}),` Save`]})]})]},n.id)})})]})]})},zt=({id:e})=>(0,F.jsx)(`div`,{style:{width:`14px`,height:`14px`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:(0,F.jsx)(`img`,{src:bt(e),alt:e,style:{width:`14px`,height:`14px`,objectFit:`cover`,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}})}),Bt=({config:e,onConfigChange:t,autoLockTime:n,setAutoLockTime:r,onLogout:i})=>{let[a,o]=(0,g.useState)(`agent`),[s,c]=(0,g.useState)(null),[l,u]=(0,g.useState)({risk_level:`Moderate`,max_slippage:1,avoid_memecoins:!1}),[d,f]=(0,g.useState)({max_usd_per_tx:999999999,whitelist_only:!1,require_approval:!0,custom_llm_rules:[]}),[p,m]=(0,g.useState)(!1),[h,_]=(0,g.useState)(!1),[v,y]=(0,g.useState)(``),[x,ee]=(0,g.useState)(``),[S,C]=(0,g.useState)(``),[w,T]=(0,g.useState)(``),[te,ne]=(0,g.useState)(!1),[E,D]=(0,g.useState)([`usd`,`idr`,`eur`,`jpy`,`gbp`,`aud`]),[O,k]=(0,g.useState)(!1);(0,g.useEffect)(()=>{fetch(`https://api.coingecko.com/api/v3/simple/supported_vs_currencies`).then(e=>e.json()).then(e=>{Array.isArray(e)&&e.length>0&&D(e)}).catch(e=>console.error(`Failed to load supported fiats`,e))},[]);let A=async()=>{if(confirm(`DANGER: Are you sure you want to permanently wipe all episodic memory? This cannot be undone.`)){k(!0);try{(await b(`/api/memory/all`,{method:`DELETE`})).ok?alert(`Episodic memory wiped completely.`):alert(`Failed to wipe memory.`)}catch{alert(`Failed to wipe memory.`)}finally{k(!1)}}};if((0,g.useEffect)(()=>{b(`/api/profile`).then(e=>e.json()).then(e=>{e&&!e.error&&u({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&&f({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&&c({agent:{name:e.agent?.name||`Nyxora`,default_chain:e.agent?.default_chain||`base`,default_slippage:e.agent?.default_slippage||.5,log_level:e.agent?.log_level||`info`,base_fiat:e.agent?.base_fiat||`usd`},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]),!s)return(0,F.jsx)(`div`,{className:`overview-container`,children:`Loading settings...`});let j=(e,t,n)=>{c(r=>r&&{...r,[e]:{...r[e],[t]:t===`temperature`?Number(n):n}})};return(0,F.jsxs)(`div`,{className:`settings-layout`,style:{display:`flex`,height:`100%`,overflow:`hidden`},children:[(0,F.jsxs)(`div`,{className:`settings-sidebar-menu`,style:{width:`260px`,borderRight:`1px solid var(--glass-border)`,padding:`24px 16px`,overflowY:`auto`,flexShrink:0,display:`flex`,flexDirection:`column`,gap:`8px`},children:[(0,F.jsx)(`div`,{className:`settings-section-title`,style:{fontSize:`0.75rem`,fontWeight:600,color:`var(--text-secondary)`,letterSpacing:`0.05em`,marginBottom:`4px`,paddingLeft:`12px`},children:`GENERAL`}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`agent`?`active`:``}`,onClick:()=>o(`agent`),children:[(0,F.jsx)(lt,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Agent Profile`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`llm`?`active`:``}`,onClick:()=>o(`llm`),children:[(0,F.jsx)(ye,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`LLM Engine`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`appearance`?`active`:``}`,onClick:()=>o(`appearance`),children:[(0,F.jsx)(Ae,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Appearance`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`security`?`active`:``}`,onClick:()=>o(`security`),children:[(0,F.jsx)(tt,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Security & Privacy`})]}),(0,F.jsx)(`div`,{className:`settings-section-title`,style:{fontSize:`0.75rem`,fontWeight:600,color:`var(--text-secondary)`,letterSpacing:`0.05em`,marginTop:`16px`,marginBottom:`4px`,paddingLeft:`12px`},children:`AGENT CAPABILITIES`}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`web3skills`?`active`:``}`,onClick:()=>o(`web3skills`),children:[(0,F.jsx)(ht,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Web3 Skills`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`osskills`?`active`:``}`,onClick:()=>o(`osskills`),children:[(0,F.jsx)(it,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`OS Skills`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`externalskills`?`active`:``}`,onClick:()=>o(`externalskills`),children:[(0,F.jsx)(Ge,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`External Skills`})]}),(0,F.jsx)(`div`,{className:`settings-section-title`,style:{fontSize:`0.75rem`,fontWeight:600,color:`var(--text-secondary)`,letterSpacing:`0.05em`,marginTop:`16px`,marginBottom:`4px`,paddingLeft:`12px`},children:`ADVANCED`}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`risk`?`active`:``}`,onClick:()=>o(`risk`),children:[(0,F.jsx)(tt,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Risk & Policy`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`rpc`?`active`:``}`,onClick:()=>o(`rpc`),children:[(0,F.jsx)(Ue,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`RPC Config`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`defi`?`active`:``}`,onClick:()=>o(`defi`),children:[(0,F.jsx)(Ne,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`DeFi Config`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`oracles`?`active`:``}`,onClick:()=>o(`oracles`),children:[(0,F.jsx)(be,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Market Oracles`})]}),(0,F.jsxs)(`div`,{className:`settings-menu-item ${a===`integrations`?`active`:``}`,onClick:()=>o(`integrations`),children:[(0,F.jsx)(Ne,{size:16}),` `,(0,F.jsx)(`span`,{className:`settings-menu-label`,children:`Integrations`})]})]}),(0,F.jsx)(`div`,{className:`settings-content-area styled-scroll`,style:{flex:1,padding:`32px 48px`,overflowY:`auto`},children:(0,F.jsxs)(`div`,{className:`settings-scroll-container`,style:{margin:`0`},children:[a===`agent`&&(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Agent Profile`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Agent Name`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,type:`text`,value:s.agent.name,onChange:e=>j(`agent`,`name`,e.target.value)})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Default Web3 Chain`}),(0,F.jsx)(yt,{value:s.agent.default_chain,onChange:e=>j(`agent`,`default_chain`,e),pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`ethereum`,label:`Ethereum Mainnet`,icon:(0,F.jsx)(zt,{id:`ethereum`})},{id:`bsc`,label:`BNB Chain`,icon:(0,F.jsx)(zt,{id:`bsc`})},{id:`base`,label:`Base`,icon:(0,F.jsx)(zt,{id:`base`})},{id:`arbitrum`,label:`Arbitrum One`,icon:(0,F.jsx)(zt,{id:`arbitrum`})},{id:`optimism`,label:`OP Mainnet`,icon:(0,F.jsx)(zt,{id:`optimism`})},{id:`polygon`,label:`Polygon (Matic)`,icon:(0,F.jsx)(zt,{id:`polygon`})},{id:`sepolia`,label:`Sepolia Testnet`,icon:(0,F.jsx)(zt,{id:`sepolia`})},{id:`base_sepolia`,label:`Base Sepolia Testnet`,icon:(0,F.jsx)(zt,{id:`base_sepolia`})},{id:`arbitrum_sepolia`,label:`Arbitrum Sepolia`,icon:(0,F.jsx)(zt,{id:`arbitrum_sepolia`})},{id:`optimism_sepolia`,label:`OP Sepolia`,icon:(0,F.jsx)(zt,{id:`optimism_sepolia`})}]})]})]}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Default Slippage (%)`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,type:`text`,placeholder:`e.g. 0.5 or auto`,value:s.agent.default_slippage??`auto`,onChange:e=>{let t=e.target.value;t.toLowerCase()===`auto`||t===``?j(`agent`,`default_slippage`,`auto`):j(`agent`,`default_slippage`,t)},onBlur:e=>{let t=String(e.target.value);if(t.toLowerCase()!==`auto`){let e=parseFloat(t);j(`agent`,`default_slippage`,isNaN(e)?`auto`:e)}}})]}),(0,F.jsx)(`div`,{className:`form-group flex-1`})]})]}),a===`llm`&&(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`LLM Engine`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Provider`}),(0,F.jsx)(yt,{value:s.llm.provider,onChange:e=>j(`llm`,`provider`,e),pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`gemini`,label:`Google Gemini`,icon:(0,F.jsx)(I,{provider:`gemini`,size:14})},{id:`anthropic`,label:`Anthropic (Claude)`,icon:(0,F.jsx)(I,{provider:`anthropic`,size:14})},{id:`openai`,label:`OpenAI`,icon:(0,F.jsx)(I,{provider:`openai`,size:14})},{id:`openrouter`,label:`OpenRouter`,icon:(0,F.jsx)(I,{provider:`openrouter`,size:14})},{id:`9router`,label:`9Router (Local Proxy)`,icon:(0,F.jsx)(I,{provider:`9router`,size:14})},{id:`ollama`,label:`Ollama (Local)`,icon:(0,F.jsx)(I,{provider:`ollama`,size:14})},{id:`groq`,label:`Groq`,icon:(0,F.jsx)(I,{provider:`groq`,size:14})},{id:`mistral`,label:`Mistral AI`,icon:(0,F.jsx)(I,{provider:`mistral`,size:14})},{id:`xai`,label:`xAI (Grok)`,icon:(0,F.jsx)(I,{provider:`xai`,size:14})},{id:`deepseek`,label:`DeepSeek`,icon:(0,F.jsx)(I,{provider:`deepseek`,size:14})}]})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Model Name`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,style:{color:`var(--text-secondary)`},type:`text`,value:s.llm.model,onChange:e=>j(`llm`,`model`,e.target.value)})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsxs)(`label`,{className:`nord-label`,children:[`Temperature (`,s.llm.temperature,`)`]}),(0,F.jsx)(`input`,{className:`nord-slider`,type:`range`,min:`0`,max:`1`,step:`0.1`,value:s.llm.temperature,onChange:e=>j(`llm`,`temperature`,e.target.value)})]})]}),s.llm.provider===`9router`&&(0,F.jsx)(`div`,{style:{background:`rgba(136, 192, 208, 0.1)`,border:`1px solid rgba(136, 192, 208, 0.3)`,padding:`14px`,borderRadius:`8px`,marginTop:`16px`},children:(0,F.jsxs)(`p`,{style:{margin:0,fontSize:`0.85rem`,color:`var(--text-secondary)`},children:[(0,F.jsx)(`strong`,{style:{color:`#88c0d0`},children:`ℹ️ Local Proxy Required:`}),` Ensure you have installed and started the 9Router proxy before saving.`,(0,F.jsx)(`br`,{}),(0,F.jsx)(`br`,{}),(0,F.jsx)(`code`,{style:{background:`rgba(0,0,0,0.2)`,padding:`2px 6px`,borderRadius:`4px`,fontSize:`0.8rem`,fontFamily:`monospace`},children:`npm install -g 9router`}),(0,F.jsx)(`br`,{}),(0,F.jsx)(`code`,{style:{background:`rgba(0,0,0,0.2)`,padding:`2px 6px`,borderRadius:`4px`,marginTop:`6px`,display:`inline-block`,fontSize:`0.8rem`,fontFamily:`monospace`},children:`9router`})]})})]}),a===`appearance`&&(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Appearance & UI Personalization`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Base Fiat Currency`}),(0,F.jsx)(Tt,{value:s.agent.base_fiat||`usd`,onChange:e=>j(`agent`,`base_fiat`,e),options:E}),(0,F.jsx)(`p`,{style:{fontSize:`0.8rem`,color:`var(--text-secondary)`,marginTop:`8px`},children:`Used across the dashboard for cosmetic fiat conversion. Core backend operations remain strictly in USD.`})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Dashboard Theme`}),(0,F.jsx)(yt,{value:localStorage.getItem(`nyxora_theme`)||`auto`,onChange:e=>{localStorage.setItem(`nyxora_theme`,e),window.location.reload()},pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`auto`,label:`System (Auto)`},{id:`dark`,label:`Dark Mode`},{id:`light`,label:`Light Mode`}]})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Backend Log Level`}),(0,F.jsx)(yt,{value:s.agent.log_level||`info`,onChange:e=>j(`agent`,`log_level`,e),pillColor:`var(--accent)`,textColor:`var(--bg-secondary)`,options:[{id:`info`,label:`Info (Standard)`},{id:`debug`,label:`Debug (Verbose)`}]})]})]})]}),a===`security`&&(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Security & Privacy`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Auto-Lock Session (Idle Timeout)`}),(0,F.jsx)(yt,{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,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Memory & Operations`}),(0,F.jsx)(`button`,{onClick:A,disabled:O,style:{width:`100%`,background:`rgba(191, 97, 106, 0.1)`,color:`#BF616A`,border:`1px solid rgba(191, 97, 106, 0.5)`,padding:`12px 16px`,borderRadius:`8px`,cursor:O?`not-allowed`:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`8px`,fontWeight:`bold`,transition:`all 0.2s`},onMouseEnter:e=>!O&&(e.currentTarget.style.background=`rgba(191, 97, 106, 0.2)`),onMouseLeave:e=>!O&&(e.currentTarget.style.background=`rgba(191, 97, 106, 0.1)`),children:O?`Wiping...`:`Wipe All Episodic Memory (Panic Button)`})]})]}),(0,F.jsx)(`div`,{className:`nord-panel-header`,style:{marginTop:`24px`},children:(0,F.jsx)(`h3`,{children:`Dashboard Access`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Change Dashboard Password`}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,marginBottom:`8px`},children:[(0,F.jsx)(`input`,{type:`password`,placeholder:`Old Password`,className:`nord-input`,style:{flex:1},value:x,onChange:e=>ee(e.target.value)}),(0,F.jsx)(`input`,{type:`password`,placeholder:`New Password`,className:`nord-input`,style:{flex:1},value:S,onChange:e=>C(e.target.value)}),(0,F.jsx)(`button`,{className:`nord-btn-primary`,style:{padding:`0 16px`,borderRadius:`8px`},onClick:async()=>{try{T(`Saving...`);let e=await b(`/api/auth/update`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({oldPassword:x,newPassword:S})}),t=await e.json();e.ok&&t.success?(T(`Password updated successfully`),ee(``),C(``)):T(t.error||`Failed to update password`)}catch{T(`Connection failed`)}setTimeout(()=>T(``),4e3)},disabled:!x||!S,children:`Update`})]}),w&&(0,F.jsx)(`span`,{style:{fontSize:`0.85rem`,color:w.includes(`success`)?`var(--success)`:`var(--danger)`},children:w})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Manual Lock`}),(0,F.jsxs)(`button`,{onClick:i,style:{width:`100%`,background:`var(--danger)`,color:`#eceff4`,border:`none`,padding:`12px 16px`,borderRadius:`8px`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:`8px`,fontWeight:600},children:[(0,F.jsx)(Ne,{size:16}),` Log Out (Lock Dashboard)`]})]})]})]}),a===`risk`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{style:{color:`var(--danger)`},children:`Personalized Risk Profile`})}),(0,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Risk Tolerance Level`}),(0,F.jsx)(yt,{value:l.risk_level,onChange:e=>u({...l,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,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Max Allowed Slippage (%)`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,type:`number`,step:`0.1`,value:l.max_slippage,onChange:e=>u({...l,max_slippage:parseFloat(e.target.value)||1})})]})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`,marginTop:`15px`,marginBottom:`5px`},children:[(0,F.jsx)(`input`,{type:`checkbox`,id:`avoid_memecoins`,checked:l.avoid_memecoins,onChange:e=>u({...l,avoid_memecoins:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--danger)`,width:`16px`,height:`16px`,margin:0,flexShrink:0}}),(0,F.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,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`40px`},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Policy Engine (Hard-coded Firewall)`})}),(0,F.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,F.jsxs)(`div`,{className:`form-row`,children:[(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Max USD per Transaction`}),(0,F.jsx)(`input`,{className:`nord-pill-input`,type:`number`,step:`1`,value:d.max_usd_per_tx,onChange:e=>f({...d,max_usd_per_tx:parseFloat(e.target.value)||0})})]}),(0,F.jsxs)(`div`,{className:`form-group flex-1`,children:[(0,F.jsx)(`label`,{className:`nord-label`,style:{marginBottom:`12px`,display:`block`},children:`Approval & Restrictions`}),(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,F.jsx)(`input`,{type:`checkbox`,id:`require_approval`,checked:d.require_approval,onChange:e=>f({...d,require_approval:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--accent)`,width:`16px`,height:`16px`,margin:0}}),(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,F.jsx)(`input`,{type:`checkbox`,id:`whitelist_only`,checked:d.whitelist_only,onChange:e=>f({...d,whitelist_only:e.target.checked}),style:{cursor:`pointer`,accentColor:`var(--accent)`,width:`16px`,height:`16px`,margin:0}}),(0,F.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,F.jsxs)(`div`,{className:`form-group`,style:{marginTop:`15px`},children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Custom LLM Rules (Natural Language)`}),(0,F.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
9
  Do not touch drive E`,value:d.custom_llm_rules.join(`
10
10
  `),onChange:e=>f({...d,custom_llm_rules:e.target.value.split(`
11
11
  `).filter(e=>e.trim().length>0)})})]})]})]}),a===`integrations`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Integrations`})}),(0,F.jsx)(`p`,{style:{fontSize:`0.85rem`,color:`var(--text-secondary)`,marginBottom:`20px`},children:`Connect Nyxora to external services to expand its capabilities.`}),(0,F.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,F.jsxs)(`div`,{children:[(0,F.jsx)(`h4`,{style:{color:`var(--text-primary)`,margin:`0 0 4px 0`},children:`Google Workspace`}),(0,F.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,F.jsx)(`button`,{className:`nord-btn-primary`,style:{background:`var(--success)`,color:`var(--bg-secondary)`,fontWeight:600},onClick:()=>ne(!0),children:`Setup OAuth`})]})]}),(0,F.jsxs)(`div`,{className:`panel`,style:{background:`transparent`,border:`none`,padding:0,marginTop:`40px`},children:[(0,F.jsx)(`div`,{className:`nord-panel-header`,children:(0,F.jsx)(`h3`,{children:`Web3 Explorer Settings`})}),(0,F.jsx)(`p`,{style:{fontSize:`0.85rem`,color:`var(--text-secondary)`,marginBottom:`20px`},children:`Configure blockchain explorer API keys to enable the agent to fetch transaction history.`}),(0,F.jsxs)(`div`,{style:{marginBottom:`24px`},className:`form-group`,children:[(0,F.jsx)(`label`,{className:`nord-label`,children:`Etherscan API V2 Key (Unified - All Networks)`}),(0,F.jsx)(`input`,{className:`nord-input`,type:`password`,placeholder:`Leaves empty to use free public endpoints`,value:s.web3?.explorer_api_key||``,onChange:e=>j(`web3`,`explorer_api_key`,e.target.value)})]})]})]}),a===`web3skills`&&(0,F.jsx)(`div`,{style:{margin:`-24px`},children:(0,F.jsx)(Ot,{})}),a===`osskills`&&(0,F.jsx)(`div`,{style:{margin:`-24px`},children:(0,F.jsx)(jt,{})}),a===`externalskills`&&(0,F.jsx)(`div`,{style:{margin:`-24px`},children:(0,F.jsx)(Pt,{})}),a===`rpc`&&(0,F.jsx)(`div`,{style:{margin:`-24px`},children:(0,F.jsx)(Rt,{})}),a===`defi`&&(0,F.jsx)(`div`,{style:{margin:`-24px`},children:(0,F.jsx)(Ft,{})}),a===`oracles`&&(0,F.jsx)(`div`,{style:{margin:`-24px`},children:(0,F.jsx)(It,{})}),[`agent`,`llm`,`appearance`,`security`,`risk`,`integrations`].includes(a)&&(0,F.jsx)(`div`,{className:`form-actions`,style:{justifyContent:`flex-end`,marginTop:`48px`,paddingTop:`24px`,borderTop:`1px solid rgba(216, 222, 233, 0.05)`},children:(0,F.jsxs)(`button`,{className:`nord-btn-primary`,style:{background:`var(--accent)`,color:`var(--bg-secondary)`,fontWeight:600},onClick:async()=>{m(!0);try{let e=await b(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(s)});if(l)try{await b(`/api/profile`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(l)})}catch(e){console.error(`Failed to save profile`,e)}if(d)try{await b(`/api/policy`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(d)})}catch(e){console.error(`Failed to save policy`,e)}if(e.ok)t(s),m(!1),setTimeout(()=>alert(`Settings saved successfully!`),50);else throw Error(`Failed to save main config`)}catch{y(`Error saving policy`),setTimeout(()=>y(``),3e3)}finally{m(!1),_(!1)}},disabled:p,children:[(0,F.jsx)(Je,{size:16,style:{marginRight:`8px`}}),p?`Saving...`:`Save Configuration`]})}),te&&(0,F.jsx)(wt,{onClose:()=>ne(!1)})]})})]})},Vt=({chatSessions:e,onSelectSession:t})=>{let[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(e);(0,g.useEffect)(()=>{if(!n.trim()){a(e);return}let t=setTimeout(async()=>{try{let e=await b(`/api/sessions/search?q=${encodeURIComponent(n)}`);e.ok&&a(await e.json())}catch(e){console.error(`Search failed`,e)}},300);return()=>clearTimeout(t)},[n,e]);let o=i;return(0,F.jsxs)(`div`,{className:`search-chat-container`,children:[(0,F.jsx)(`div`,{className:`search-chat-header`,children:(0,F.jsxs)(`div`,{className:`search-input-wrapper`,children:[(0,F.jsx)(Xe,{size:18,className:`search-icon`}),(0,F.jsx)(`input`,{type:`text`,className:`search-input`,placeholder:`Telusuri percakapan`,value:n,onChange:e=>r(e.target.value),autoFocus:!0})]})}),(0,F.jsx)(`div`,{className:`search-results-area`,children:o.length>0?(0,F.jsxs)(`div`,{className:`search-results-list`,children:[(0,F.jsx)(`h3`,{className:`search-results-title`,children:`Terbaru`}),o.map(e=>(0,F.jsx)(`div`,{className:`search-result-item`,onClick:()=>t(e.id),children:(0,F.jsxs)(`div`,{className:`result-title`,children:[(0,F.jsx)(ze,{size:16,className:`result-icon`}),(0,F.jsx)(`span`,{children:e.title})]})},e.id))]}):(0,F.jsxs)(`div`,{className:`search-no-results`,children:[`Tidak ada percakapan yang cocok dengan "`,n,`"`]})})]})};function Ht(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 Ut=[{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`}],Wt=({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`},...Ut]:Ut,s=o.find(t=>t.id===e)||o[0];return(0,F.jsxs)(`div`,{className:`custom-network-selector`,ref:a,children:[(0,F.jsxs)(`button`,{className:`network-selector-pill`,onClick:()=>i(!r),"aria-expanded":r,children:[(0,F.jsx)(`div`,{style:{width:`16px`,height:`16px`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:s.id===`all`?(0,F.jsx)(Ue,{size:16}):(0,F.jsx)(`img`,{src:bt(s.id),alt:s.id,style:{width:`16px`,height:`16px`,objectFit:`cover`,borderRadius:`50%`},onError:e=>{e.currentTarget.style.display=`none`}})}),(0,F.jsx)(`span`,{className:`network-label`,children:s.label}),(0,F.jsx)(he,{size:14,className:`network-chevron`})]}),r&&(0,F.jsx)(`ul`,{className:`network-dropdown-menu styled-scroll`,style:{maxHeight:`250px`,overflowY:`auto`},children:o.map(n=>(0,F.jsxs)(`li`,{className:`network-dropdown-item ${n.id===e?`active`:``}`,onClick:()=>{t(n.id),i(!1)},style:{display:`flex`,alignItems:`center`},children:[(0,F.jsx)(`div`,{style:{width:`14px`,height:`14px`,position:`relative`,display:`flex`,alignItems:`center`,justifyContent:`center`,marginRight:`8px`,flexShrink:0},children:n.id===`all`?(0,F.jsx)(Ue,{size:14}):(0,F.jsx)(`img`,{src:bt(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))})]})},L=({baseFiat:e=`usd`})=>{let[t,n]=(0,g.useState)(1);(0,g.useEffect)(()=>{if(e.toLowerCase()===`usd`){n(1);return}fetch(`https://api.coingecko.com/api/v3/simple/price?ids=tether&vs_currencies=${e.toLowerCase()}`).then(e=>e.json()).then(t=>{let r=t.tether?.[e.toLowerCase()];r&&n(r)}).catch(e=>console.error(`Failed to fetch exchange rate`,e))},[e]);let r=(0,g.useMemo)(()=>{let t=e.toLowerCase();return t===`idr`?`Rp `:t===`eur`?`€`:t===`jpy`?`¥`:t===`gbp`?`£`:t===`aud`?`A$`:t===`krw`?`₩`:t===`inr`?`₹`:t===`cny`?`¥`:`$`},[e]),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(`all`),[u,d]=(0,g.useState)(!0),[f,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(!1),[_,v]=(0,g.useState)([]),[y,x]=(0,g.useState)(!1),[ee,S]=(0,g.useState)(``),[C,w]=(0,g.useState)(`ethereum`),[T,te]=(0,g.useState)(``),[ne,E]=(0,g.useState)(``),[D,O]=(0,g.useState)(!1),[k,A]=(0,g.useState)(!1),j=async()=>{d(!0),p(``);try{let[e,t,n]=await Promise.all([b(`/api/portfolio`),b(`/api/wallet`),b(`/api/portfolio/whitelist`)]);e.ok?a(await e.json()):p(`Failed to fetch portfolio data from gateway.`);let r=``;if(t.ok&&(r=(await t.json()).address,s(r)),n.ok&&r){let e=await n.json();e[r.toLowerCase()]&&v(e[r.toLowerCase()])}}catch(e){p(e.message)}finally{d(!1)}};(0,g.useEffect)(()=>{j()},[]);let M=async e=>{let t=e.target.value;if(S(t),te(``),E(``),t.startsWith(`0x`)&&t.length===42){O(!0);try{let e=await b(`/api/portfolio/token-metadata?chain=${C}&address=${t}`);if(e.ok){let t=await e.json();te(t.symbol),E(t.decimals.toString())}}catch(e){console.error(`Failed to fetch metadata`,e)}finally{O(!1)}}},re=async()=>{if(!(!ee||!T)){A(!0);try{await b(`/api/portfolio/whitelist`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({walletAddress:o,chainName:C,tokenAddress:ee,symbol:T,decimals:parseInt(ne)||18})}),x(!1),S(``),te(``),E(``),j()}catch(e){console.error(e)}finally{A(!1)}}},ie=async(e,t)=>{try{await b(`/api/portfolio/whitelist`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify({walletAddress:o,chainName:e,tokenAddress:t})}),j()}catch(e){console.error(e)}},ae=e=>({ethereum:`#627EEA`,base:`#0052FF`,arbitrum:`#28A0F0`,optimism:`#FF0420`,bsc:`#F0B90B`,polygon:`#8247E5`})[e.toLowerCase()]||`var(--accent)`,N=(e,t)=>{t===-1&&(t=18);try{return parseFloat(Ht(BigInt(e),t))}catch{return 0}},oe=(e,t)=>N(e,t).toLocaleString(void 0,{maximumFractionDigits:4}),ce=()=>{o&&(navigator.clipboard.writeText(o),h(!0),setTimeout(()=>h(!1),2e3))},le=(0,g.useMemo)(()=>{if(!i)return[];let e=[];return Object.entries(i).forEach(([t,n])=>{n.forEach(n=>{e.push({...n,chain:t})})}),c!==`all`&&(e=e.filter(e=>e.chain.toLowerCase()===c.toLowerCase())),e.sort((e,t)=>{let n=(e.priceUsd||0)*N(e.balanceRaw,e.decimals);return(t.priceUsd||0)*N(t.balanceRaw,t.decimals)-n}),e},[i,c]),{totalUsd:ue,totalChange:de}=(0,g.useMemo)(()=>{let e=0,t=0;return le.forEach(n=>{let r=(n.priceUsd||0)*N(n.balanceRaw,n.decimals);e+=r,t+=r*(n.priceChange24h||0)}),{totalUsd:e,totalChange:e>0?t/e:0}},[le]);return(0,F.jsxs)(`div`,{className:`overview-container`,style:{paddingBottom:`40px`},children:[(0,F.jsxs)(`div`,{className:`overview-header`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:`32px`,flexWrap:`wrap`,gap:`24px`},children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{style:{display:`flex`,alignItems:`center`,gap:`10px`,marginBottom:`8px`},children:[(0,F.jsx)(ft,{color:`var(--accent)`}),` Portfolio Scanner`]}),o&&(0,F.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:[o.substring(0,6),`...`,o.substring(38),m?(0,F.jsx)(me,{size:14,color:`#A3BE8C`}):(0,F.jsx)(ve,{size:14})]}),(0,F.jsxs)(`div`,{style:{fontSize:`2.5rem`,fontWeight:`bold`,color:`var(--text-primary)`,marginTop:`24px`,display:`flex`,alignItems:`baseline`,gap:`12px`},children:[r,(ue*t).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}),(0,F.jsxs)(`span`,{style:{fontSize:`1rem`,color:de>=0?`#A3BE8C`:`#BF616A`,fontWeight:`500`},children:[de>=0?`+`:``,de.toFixed(2),`%`]})]})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,F.jsxs)(`button`,{onClick:()=>x(!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,F.jsx)(Ke,{size:16}),` Add Custom Crypto`]}),(0,F.jsx)(Wt,{value:c,onChange:e=>l(e),showAllOption:!0}),(0,F.jsxs)(`button`,{onClick:j,disabled:u,style:{background:`var(--accent)`,color:`var(--bg-secondary)`,border:`none`,padding:`10px 16px`,borderRadius:`8px`,cursor:u?`not-allowed`:`pointer`,display:`flex`,alignItems:`center`,gap:`8px`,fontWeight:`bold`,transition:`all 0.2s`},onMouseEnter:e=>!u&&(e.currentTarget.style.background=`#8FBCBB`),onMouseLeave:e=>!u&&(e.currentTarget.style.background=`var(--accent)`),children:[(0,F.jsx)(qe,{size:16,className:u?`spin`:``}),` `,u?`Scanning...`:`Refresh`]})]})]}),f&&(0,F.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,F.jsx)(se,{size:20}),` `,f]}),!i&&u&&(0,F.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px`,color:`var(--accent)`},children:[(0,F.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...`]}),i&&le.length>0&&(0,F.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,F.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,F.jsx)(`div`,{children:`TOKEN`}),(0,F.jsx)(`div`,{style:{textAlign:`right`},children:`PRICE`}),(0,F.jsx)(`div`,{style:{textAlign:`right`},children:`AMOUNT`}),(0,F.jsxs)(`div`,{style:{textAlign:`right`},children:[`VALUE (`,e.toUpperCase(),`)`]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`},children:le.map((e,n)=>{let i=(e.priceUsd||0)*N(e.balanceRaw,e.decimals);return(0,F.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`2fr 1fr 1fr 1fr`,gap:`16px`,padding:`16px 24px`,borderBottom:n===le.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,F.jsxs)(`div`,{style:{position:`relative`,width:`40px`,height:`40px`},children:[(0,F.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,F.jsx)(`span`,{style:{position:`absolute`,zIndex:1},children:e.symbol.substring(0,3)}),(0,F.jsx)(`img`,{src:St(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,F.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,F.jsx)(`div`,{style:{width:`100%`,height:`100%`,borderRadius:`50%`,background:ae(e.chain),overflow:`hidden`},children:(0,F.jsx)(`img`,{src:bt(e.chain),alt:e.chain,style:{width:`100%`,height:`100%`,objectFit:`cover`},onError:e=>{e.currentTarget.style.display=`none`}})})})]}),(0,F.jsx)(`span`,{style:{color:`var(--text-primary)`,fontWeight:`600`,fontSize:`1.1rem`},children:e.symbol})]}),(0,F.jsx)(`div`,{style:{textAlign:`right`,color:`var(--text-secondary)`,fontWeight:`500`},children:e.priceUsd?`${r}${(e.priceUsd*t).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:6})}`:`-`}),(0,F.jsxs)(`div`,{style:{textAlign:`right`,color:`var(--text-primary)`,fontWeight:`600`},children:[oe(e.balanceRaw,e.decimals),` `,(0,F.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`var(--text-secondary)`,fontWeight:`normal`},children:e.symbol})]}),(0,F.jsx)(`div`,{style:{textAlign:`right`,color:`#A3BE8C`,fontWeight:`600`,fontSize:`1.1rem`},children:i>0?`${r}${(i*t).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`:`${r}0.00`})]},`${e.chain}-${e.address}-${n}`)})})]}),_.length>0&&(0,F.jsxs)(`div`,{style:{marginTop:`24px`},children:[(0,F.jsx)(`h2`,{style:{color:`var(--text-primary)`,fontSize:`1.2rem`,marginBottom:`16px`},children:`Whitelisted Tokens`}),(0,F.jsx)(`div`,{style:{background:`var(--bg-secondary)`,borderRadius:`12px`,border:`1px solid var(--glass-border)`,overflow:`hidden`},children:_.map((e,t)=>(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,borderBottom:t===_.length-1?`none`:`1px solid var(--glass-border)`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`16px`},children:[(0,F.jsx)(`div`,{style:{width:`24px`,height:`24px`,borderRadius:`50%`,background:ae(e.chainName),overflow:`hidden`},children:(0,F.jsx)(`img`,{src:bt(e.chainName),style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:{color:`var(--text-primary)`,fontWeight:`bold`},children:e.symbol||`Unknown`}),(0,F.jsx)(`div`,{style:{color:`var(--text-secondary)`,fontSize:`0.85rem`,fontFamily:`monospace`},children:e.address})]})]}),(0,F.jsx)(`button`,{onClick:()=>ie(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,F.jsx)(at,{size:16})})]},`${e.chainName}-${e.address}`))})]}),y&&(0,F.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,F.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,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`24px`},children:[(0,F.jsx)(`button`,{onClick:()=>x(!1),style:{background:`transparent`,border:`none`,color:`var(--text-secondary)`,cursor:`pointer`},children:(0,F.jsx)(mt,{size:20})}),(0,F.jsx)(`h2`,{style:{color:`var(--text-primary)`,margin:0,fontSize:`1.2rem`,fontWeight:`bold`},children:`Custom crypto`}),(0,F.jsx)(`div`,{style:{width:`20px`}})]}),(0,F.jsxs)(`div`,{style:{marginBottom:`16px`},children:[(0,F.jsx)(`label`,{style:{display:`block`,color:`var(--text-primary)`,marginBottom:`8px`,fontSize:`0.9rem`,fontWeight:`bold`},children:`Network`}),(0,F.jsx)(Wt,{value:C,onChange:w,showAllOption:!1})]}),(0,F.jsxs)(`div`,{style:{marginBottom:`16px`},children:[(0,F.jsx)(`label`,{style:{display:`block`,color:`var(--text-primary)`,marginBottom:`8px`,fontSize:`0.9rem`,fontWeight:`bold`},children:`Contract address`}),(0,F.jsx)(`input`,{type:`text`,value:ee,onChange:M,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,F.jsxs)(`div`,{style:{marginBottom:`16px`},children:[(0,F.jsx)(`label`,{style:{display:`block`,color:`var(--text-primary)`,marginBottom:`8px`,fontSize:`0.9rem`,fontWeight:`bold`},children:`Symbol`}),(0,F.jsxs)(`div`,{style:{position:`relative`},children:[(0,F.jsx)(`input`,{type:`text`,value:T,readOnly:!0,placeholder:D?`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}}),D&&(0,F.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,F.jsxs)(`div`,{style:{marginBottom:`24px`},children:[(0,F.jsx)(`label`,{style:{display:`block`,color:`var(--text-primary)`,marginBottom:`8px`,fontSize:`0.9rem`,fontWeight:`bold`},children:`Decimal`}),(0,F.jsx)(`input`,{type:`text`,value:ne,readOnly:!0,placeholder:D?`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,F.jsx)(`button`,{onClick:re,disabled:!T||k,style:{width:`100%`,background:!T||k?`var(--tool-bg)`:`var(--text-primary)`,color:!T||k?`var(--text-secondary)`:`var(--bg-secondary)`,border:`none`,padding:`14px`,borderRadius:`24px`,fontWeight:`bold`,fontSize:`1rem`,cursor:!T||k?`not-allowed`:`pointer`,transition:`all 0.2s`},children:k?`Confirming...`:`Confirm`})]})})]})},Gt=({size:e=28,className:t=``,color:n=`var(--accent)`})=>(0,F.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,F.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,F.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,F.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,F.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,F.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,F.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,F.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,F.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`})]}),Kt=[{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`}],qt=({id:e,size:t=16,color:n})=>{if(e===`auto`)return(0,F.jsx)(Gt,{size:t,className:`network-icon`,color:n});let r=Ct(e);return r?(0,F.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,F.jsx)(Gt,{size:t,className:`network-icon`,color:n})},Jt=({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=Kt.find(t=>t.id===e)||Kt[0];return(0,F.jsxs)(`div`,{className:`custom-network-selector`,ref:i,style:{marginLeft:`10px`},children:[(0,F.jsxs)(`button`,{className:`network-selector-pill`,onClick:()=>r(!n),"aria-expanded":n,children:[(0,F.jsx)(qt,{id:a.id,size:16,color:`#000000`}),(0,F.jsx)(`span`,{className:`network-label`,children:a.label}),(0,F.jsx)(he,{size:14,className:`network-chevron`})]}),n&&(0,F.jsx)(`ul`,{className:`network-dropdown-menu`,children:Kt.map(e=>(0,F.jsx)(`li`,{className:`network-dropdown-item ${e.id===a.id?`active`:``}`,onClick:()=>{t(e.id),r(!1)},children:(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,F.jsx)(qt,{id:e.id,size:14}),(0,F.jsx)(`span`,{children:e.label})]})},e.id))})]})};function Yt({sessionId:e}){let[t,n]=(0,g.useState)([]),[r,i]=(0,g.useState)(new Set);return gt(async()=>{try{let e=await b(`/api/transactions`);e.ok&&n(await e.json())}catch(e){console.error(e)}},5e3),t.length,null}var Xt=({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,F.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,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`32px`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,F.jsx)(`div`,{style:{background:`rgba(59,130,246,0.2)`,padding:`10px`,borderRadius:`12px`},children:(0,F.jsx)(ft,{size:24,color:`#3b82f6`})}),(0,F.jsx)(`span`,{style:{color:`#94a3b8`,fontWeight:500,fontSize:`0.9rem`,letterSpacing:`1px`},children:`WALLET BALANCE`})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`,background:`rgba(34,197,94,0.1)`,padding:`6px 12px`,borderRadius:`20px`},children:[(0,F.jsx)(A,{size:14,color:`#4ade80`}),(0,F.jsx)(`span`,{style:{color:`#4ade80`,fontSize:`0.75rem`,fontWeight:600},children:`LIVE`})]})]}),(0,F.jsxs)(`div`,{style:{marginBottom:`12px`,display:`flex`,alignItems:`baseline`,flexWrap:`wrap`,overflow:`hidden`},children:[(0,F.jsx)(`span`,{style:{fontSize:`2.5rem`,fontWeight:800,color:`var(--text-primary)`,letterSpacing:`-1px`,wordBreak:`break-all`},children:t}),(0,F.jsx)(`span`,{style:{fontSize:`1.2rem`,color:`#94a3b8`,marginLeft:`8px`,fontWeight:500},children:`ETH`})]}),(0,F.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,F.jsx)(`span`,{style:{color:`#64748b`,fontSize:`0.85rem`},children:`Network`}),(0,F.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,F.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,F.jsx)(`p`,{style:{color:`#ef4444`},children:t.error})});let{coin:n,priceUsd:r,change24h:i}=t,a=i>=0;return(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:`24px`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`},children:[(0,F.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,F.jsx)(ce,{size:24,color:`#3b82f6`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{style:{margin:0,fontSize:`1.2rem`,color:`var(--text-primary)`,textTransform:`capitalize`},children:n}),(0,F.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`#94a3b8`},children:`Live Price (USD)`})]})]}),(0,F.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,F.jsx)(a?st:ot,{size:16}),a?`+`:``,i.toFixed(2),`%`]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:`8px`,overflow:`hidden`},children:(0,F.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})]})})]})},Qt=({data:e})=>{if(e.startsWith(`TRANSACTION_PENDING`))return null;let t=null;try{t=JSON.parse(e)}catch{return(0,F.jsxs)(`div`,{className:`widget-card error`,children:[(0,F.jsx)(`h3`,{className:`widget-title`,children:`Swap Error`}),(0,F.jsx)(`p`,{children:`Failed to parse swap data.`})]})}return t.error?(0,F.jsxs)(`div`,{className:`widget-card error`,children:[(0,F.jsx)(`h3`,{className:`widget-title`,children:`Transaction Failed`}),(0,F.jsx)(`p`,{children:t.error})]}):(0,F.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,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`24px`},children:[(0,F.jsxs)(`h3`,{style:{margin:0,fontSize:`1.1rem`,fontWeight:600,display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,F.jsx)(P,{size:18,color:`#a855f7`}),`DeFi Swap Execution`]}),(0,F.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,F.jsx)(A,{size:14}),` `,t.status]})]}),(0,F.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,F.jsx)(`div`,{style:{fontSize:`0.8rem`,color:`#94a3b8`,marginBottom:`8px`},children:`Pay`}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,F.jsx)(`span`,{style:{fontSize:`1.8rem`,fontWeight:700},children:t.fromAmount}),(0,F.jsx)(`span`,{style:{background:`rgba(255,255,255,0.1)`,padding:`6px 12px`,borderRadius:`12px`,fontWeight:600},children:t.fromToken})]})]}),(0,F.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,margin:`-20px 0`,position:`relative`,zIndex:10},children:(0,F.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,F.jsx)(le,{size:20,color:`#a855f7`})})}),(0,F.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,F.jsx)(`div`,{style:{fontSize:`0.8rem`,color:`#c084fc`,marginBottom:`8px`},children:`Receive`}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,F.jsx)(`span`,{style:{fontSize:`1.8rem`,fontWeight:700,color:`#e9d5ff`},children:t.toAmount}),(0,F.jsx)(`span`,{style:{background:`rgba(168, 85, 247, 0.2)`,color:`#e9d5ff`,padding:`6px 12px`,borderRadius:`12px`,fontWeight:600},children:t.toToken})]})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`12px`,fontSize:`0.85rem`,color:`#94a3b8`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,F.jsx)(`span`,{children:`Exchange Rate`}),(0,F.jsxs)(`span`,{style:{color:`var(--text-primary)`},children:[`1 `,t.fromToken,` = `,t.exchangeRate,` `,t.toToken]})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,F.jsx)(`span`,{children:`Network`}),(0,F.jsx)(`span`,{style:{color:`var(--text-primary)`,textTransform:`capitalize`},children:t.chain})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`},children:[(0,F.jsx)(`span`,{children:`Network Fee (Gas)`}),(0,F.jsx)(`span`,{style:{color:`#f59e0b`},children:t.gasFee})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginTop:`8px`,paddingTop:`12px`,borderTop:`1px dashed rgba(255,255,255,0.1)`},children:[(0,F.jsx)(`span`,{children:`Transaction Hash`}),(0,F.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,F.jsx)(`div`,{style:{marginTop:`24px`,width:`100%`,height:`4px`,background:`rgba(255,255,255,0.1)`,borderRadius:`2px`,overflow:`hidden`},children:(0,F.jsx)(`div`,{style:{height:`100%`,width:`100%`,background:`linear-gradient(90deg, #3b82f6, #a855f7)`,animation:`progress 2s ease-in-out`}})})]})};function $t(){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,F.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:`#ffffff`,fontFamily:`sans-serif`},children:[(0,F.jsx)(pt,{size:64,color:`#ef4444`,style:{marginBottom:`20px`,animation:`pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite`}}),(0,F.jsx)(`h1`,{style:{fontSize:`2rem`,marginBottom:`10px`},children:`Nyxora Daemon Offline`}),(0,F.jsx)(`p`,{style:{color:`#9ca3af`,fontSize:`1.2rem`},children:`Trying to reconnect...`}),(0,F.jsx)(`style`,{children:`