diff --git a/README.md b/README.md index 9be9286..a353c6e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,43 @@ -# aether-core-memory +# Aether Core Memory -Project Ledger and persistent memory for Aether Collective \ No newline at end of file +## Mission Control +Autonomous orchestration system for the Aether Collective. + +## Components + +### 1. System Pulse +- **Schedule:** Every 20 minutes +- **Script:** `/aether_core/pulse.sh` +- **Log:** `/aether_core/memory/pulse_history.log` + +### 2. Mission Control Dashboard (AetherOS) +- **URL:** http://localhost:3001 +- **Features:** + - Collective Kanban - Task tracking for sub-agents + - ClawHub Marketplace - Skill management + - Session Tracker - Work session logging + - Agent Wiki - System documentation + +### 3. Infrastructure +| Service | Endpoint | Status | +|---------|----------|--------| +| Gitea | http://192.168.5.35:3000 | Online | +| Vaultwarden | http://localhost:8080 | Online | +| AetherOS | http://localhost:3001 | Online | + +## The Collective +| Agent | Role | Status | +|-------|------|--------| +| Architect | Project scoping | Ready | +| Researcher | Documentation | Ready | +| Engineer | Implementation | Ready | +| QA Auditor | Testing | Ready | +| Publisher | GitHub promotion | Ready | + +## SSH Key +``` +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPo9xg6+X0F+C5gWXOIoVUi6Ipsnf4JPK05hSLcT9n2 aether@openclaw +``` + +--- +*Last updated: 2026-02-23* diff --git a/mission-control/dist/assets/index-Bi1l6ELE.css b/mission-control/dist/assets/index-Bi1l6ELE.css new file mode 100644 index 0000000..87f4b1e --- /dev/null +++ b/mission-control/dist/assets/index-Bi1l6ELE.css @@ -0,0 +1 @@ +:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Segoe UI,system-ui,-apple-system,sans-serif;overflow:hidden;background:#0a0a0f;color:#e0e0ff}#root{width:100vw;height:100vh}.desktop{width:100%;height:100%;background:linear-gradient(135deg,#0a0a1a,#1a1a2e,#16213e);position:relative;overflow:hidden}.desktop:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 20% 80%,rgba(99,102,241,.1) 0%,transparent 50%),radial-gradient(circle at 80% 20%,rgba(139,92,246,.1) 0%,transparent 50%);pointer-events:none}.window{position:absolute;background:#141423f2;border:1px solid rgba(99,102,241,.3);border-radius:12px;box-shadow:0 25px 50px -12px #00000080;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);min-width:400px;min-height:300px;overflow:hidden}.window-header{background:linear-gradient(90deg,#6366f133,#8b5cf633);padding:12px 16px;display:flex;align-items:center;justify-content:space-between;cursor:move;border-bottom:1px solid rgba(99,102,241,.2)}.window-title{display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px;color:#e0e0ff}.window-controls{display:flex;gap:8px}.window-btn{width:12px;height:12px;border-radius:50%;border:none;cursor:pointer;transition:all .2s}.window-btn:hover{transform:scale(1.2)}.window-btn.close{background:#ef4444}.window-btn.minimize{background:#f59e0b}.window-btn.maximize{background:#10b981}.window-content{padding:20px;height:calc(100% - 48px);overflow:auto}.taskbar{position:fixed;bottom:0;left:0;right:0;height:48px;background:#0a0a14f2;border-top:1px solid rgba(99,102,241,.2);display:flex;align-items:center;padding:0 16px;gap:12px;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:1000}.start-btn{display:flex;align-items:center;gap:8px;padding:8px 16px;background:linear-gradient(135deg,#6366f1,#8b5cf6);border:none;border-radius:8px;color:#fff;font-weight:600;cursor:pointer;transition:all .2s}.start-btn:hover{transform:translateY(-2px);box-shadow:0 8px 25px #6366f166}.taskbar-icons{display:flex;gap:8px;flex:1}.taskbar-icon{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:all .2s;color:#a0a0c0}.taskbar-icon:hover,.taskbar-icon.active{background:#6366f133;color:#6366f1}.system-tray{display:flex;align-items:center;gap:12px;padding:0 12px;border-left:1px solid rgba(99,102,241,.2)}.tray-icon{width:20px;height:20px;color:#a0a0c0;cursor:pointer}.tray-icon:hover{color:#6366f1}.clock{font-size:13px;font-weight:500;color:#e0e0ff;min-width:60px;text-align:center}.start-menu{position:fixed;bottom:60px;left:16px;width:320px;background:#0f0f1efa;border:1px solid rgba(99,102,241,.3);border-radius:16px;padding:20px;box-shadow:0 25px 50px -12px #00000080;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);z-index:999}.start-menu h3{font-size:12px;text-transform:uppercase;letter-spacing:1px;color:#6366f1;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid rgba(99,102,241,.2)}.menu-items{display:flex;flex-direction:column;gap:4px}.menu-item{display:flex;align-items:center;gap:12px;padding:12px;border-radius:8px;cursor:pointer;transition:all .2s;color:#e0e0ff}.menu-item:hover{background:#6366f126}.menu-item svg{color:#6366f1}.desktop-icons{position:absolute;top:20px;left:20px;display:flex;flex-direction:column;gap:20px}.desktop-icon{display:flex;flex-direction:column;align-items:center;gap:8px;width:80px;padding:12px;border-radius:12px;cursor:pointer;transition:all .2s;color:#e0e0ff}.desktop-icon:hover{background:#6366f126}.desktop-icon svg{width:40px;height:40px;color:#6366f1}.desktop-icon span{font-size:12px;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.5)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#0003;border-radius:4px}::-webkit-scrollbar-thumb{background:#6366f180;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#6366f1b3} diff --git a/mission-control/dist/assets/index-D2vOcu2u.js b/mission-control/dist/assets/index-D2vOcu2u.js new file mode 100644 index 0000000..c86f3ca --- /dev/null +++ b/mission-control/dist/assets/index-D2vOcu2u.js @@ -0,0 +1,55 @@ +(function(){const U=document.createElement("link").relList;if(U&&U.supports&&U.supports("modulepreload"))return;for(const B of document.querySelectorAll('link[rel="modulepreload"]'))y(B);new MutationObserver(B=>{for(const D of B)if(D.type==="childList")for(const K of D.addedNodes)K.tagName==="LINK"&&K.rel==="modulepreload"&&y(K)}).observe(document,{childList:!0,subtree:!0});function O(B){const D={};return B.integrity&&(D.integrity=B.integrity),B.referrerPolicy&&(D.referrerPolicy=B.referrerPolicy),B.crossOrigin==="use-credentials"?D.credentials="include":B.crossOrigin==="anonymous"?D.credentials="omit":D.credentials="same-origin",D}function y(B){if(B.ep)return;B.ep=!0;const D=O(B);fetch(B.href,D)}})();var cf={exports:{}},pu={};var rd;function ah(){if(rd)return pu;rd=1;var T=Symbol.for("react.transitional.element"),U=Symbol.for("react.fragment");function O(y,B,D){var K=null;if(D!==void 0&&(K=""+D),B.key!==void 0&&(K=""+B.key),"key"in B){D={};for(var al in B)al!=="key"&&(D[al]=B[al])}else D=B;return B=D.ref,{$$typeof:T,type:y,key:K,ref:B!==void 0?B:null,props:D}}return pu.Fragment=U,pu.jsx=O,pu.jsxs=O,pu}var gd;function eh(){return gd||(gd=1,cf.exports=ah()),cf.exports}var g=eh(),ff={exports:{}},X={};var Sd;function uh(){if(Sd)return X;Sd=1;var T=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),K=Symbol.for("react.context"),al=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),A=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),ul=Symbol.iterator;function jl(o){return o===null||typeof o!="object"?null:(o=ul&&o[ul]||o["@@iterator"],typeof o=="function"?o:null)}var Ul={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sl=Object.assign,ql={};function Cl(o,E,M){this.props=o,this.context=E,this.refs=ql,this.updater=M||Ul}Cl.prototype.isReactComponent={},Cl.prototype.setState=function(o,E){if(typeof o!="object"&&typeof o!="function"&&o!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,o,E,"setState")},Cl.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function dt(){}dt.prototype=Cl.prototype;function J(o,E,M){this.props=o,this.context=E,this.refs=ql,this.updater=M||Ul}var vl=J.prototype=new dt;vl.constructor=J,Sl(vl,Cl.prototype),vl.isPureReactComponent=!0;var fl=Array.isArray;function Hl(){}var L={H:null,A:null,T:null,S:null},Jl=Object.prototype.hasOwnProperty;function _t(o,E,M){var C=M.ref;return{$$typeof:T,type:o,key:E,ref:C!==void 0?C:null,props:M}}function Za(o,E){return _t(o.type,E,o.props)}function Mt(o){return typeof o=="object"&&o!==null&&o.$$typeof===T}function wl(o){var E={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(M){return E[M]})}var Aa=/\/+/g;function jt(o,E){return typeof o=="object"&&o!==null&&o.key!=null?wl(""+o.key):E.toString(36)}function At(o){switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:switch(typeof o.status=="string"?o.then(Hl,Hl):(o.status="pending",o.then(function(E){o.status==="pending"&&(o.status="fulfilled",o.value=E)},function(E){o.status==="pending"&&(o.status="rejected",o.reason=E)})),o.status){case"fulfilled":return o.value;case"rejected":throw o.reason}}throw o}function b(o,E,M,C,Q){var w=typeof o;(w==="undefined"||w==="boolean")&&(o=null);var nl=!1;if(o===null)nl=!0;else switch(w){case"bigint":case"string":case"number":nl=!0;break;case"object":switch(o.$$typeof){case T:case U:nl=!0;break;case N:return nl=o._init,b(nl(o._payload),E,M,C,Q)}}if(nl)return Q=Q(o),nl=C===""?"."+jt(o,0):C,fl(Q)?(M="",nl!=null&&(M=nl.replace(Aa,"$&/")+"/"),b(Q,E,M,"",function(Me){return Me})):Q!=null&&(Mt(Q)&&(Q=Za(Q,M+(Q.key==null||o&&o.key===Q.key?"":(""+Q.key).replace(Aa,"$&/")+"/")+nl)),E.push(Q)),1;nl=0;var Ll=C===""?".":C+":";if(fl(o))for(var Tl=0;Tl>>1,hl=b[sl];if(0>>1;slB(M,G))CB(Q,M)?(b[sl]=Q,b[C]=G,sl=C):(b[sl]=M,b[E]=G,sl=E);else if(CB(Q,G))b[sl]=Q,b[C]=G,sl=C;else break l}}return _}function B(b,_){var G=b.sortIndex-_.sortIndex;return G!==0?G:b.id-_.id}if(T.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var D=performance;T.unstable_now=function(){return D.now()}}else{var K=Date,al=K.now();T.unstable_now=function(){return K.now()-al}}var x=[],A=[],N=1,R=null,ul=3,jl=!1,Ul=!1,Sl=!1,ql=!1,Cl=typeof setTimeout=="function"?setTimeout:null,dt=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;function vl(b){for(var _=O(A);_!==null;){if(_.callback===null)y(A);else if(_.startTime<=b)y(A),_.sortIndex=_.expirationTime,U(x,_);else break;_=O(A)}}function fl(b){if(Sl=!1,vl(b),!Ul)if(O(x)!==null)Ul=!0,Hl||(Hl=!0,wl());else{var _=O(A);_!==null&&At(fl,_.startTime-b)}}var Hl=!1,L=-1,Jl=5,_t=-1;function Za(){return ql?!0:!(T.unstable_now()-_tb&&Za());){var sl=R.callback;if(typeof sl=="function"){R.callback=null,ul=R.priorityLevel;var hl=sl(R.expirationTime<=b);if(b=T.unstable_now(),typeof hl=="function"){R.callback=hl,vl(b),_=!0;break t}R===O(x)&&y(x),vl(b)}else y(x);R=O(x)}if(R!==null)_=!0;else{var o=O(A);o!==null&&At(fl,o.startTime-b),_=!1}}break l}finally{R=null,ul=G,jl=!1}_=void 0}}finally{_?wl():Hl=!1}}}var wl;if(typeof J=="function")wl=function(){J(Mt)};else if(typeof MessageChannel<"u"){var Aa=new MessageChannel,jt=Aa.port2;Aa.port1.onmessage=Mt,wl=function(){jt.postMessage(null)}}else wl=function(){Cl(Mt,0)};function At(b,_){L=Cl(function(){b(T.unstable_now())},_)}T.unstable_IdlePriority=5,T.unstable_ImmediatePriority=1,T.unstable_LowPriority=4,T.unstable_NormalPriority=3,T.unstable_Profiling=null,T.unstable_UserBlockingPriority=2,T.unstable_cancelCallback=function(b){b.callback=null},T.unstable_forceFrameRate=function(b){0>b||125sl?(b.sortIndex=G,U(A,b),O(x)===null&&b===O(A)&&(Sl?(dt(L),L=-1):Sl=!0,At(fl,G-sl))):(b.sortIndex=hl,U(x,b),Ul||jl||(Ul=!0,Hl||(Hl=!0,wl()))),b},T.unstable_shouldYield=Za,T.unstable_wrapCallback=function(b){var _=ul;return function(){var G=ul;ul=_;try{return b.apply(this,arguments)}finally{ul=G}}}})(df)),df}var zd;function ih(){return zd||(zd=1,of.exports=nh()),of.exports}var yf={exports:{}},Vl={};var Ad;function ch(){if(Ad)return Vl;Ad=1;var T=hf();function U(x){var A="https://react.dev/errors/"+x;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(T)}catch(U){console.error(U)}}return T(),yf.exports=ch(),yf.exports}var Ed;function sh(){if(Ed)return zu;Ed=1;var T=ih(),U=hf(),O=fh();function y(l){var t="https://react.dev/errors/"+l;if(1hl||(l.current=sl[hl],sl[hl]=null,hl--)}function M(l,t){hl++,sl[hl]=l.current,l.current=t}var C=o(null),Q=o(null),w=o(null),nl=o(null);function Ll(l,t){switch(M(w,t),M(Q,l),M(C,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?G0(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=G0(t),l=X0(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}E(C),M(C,l)}function Tl(){E(C),E(Q),E(w)}function Me(l){l.memoizedState!==null&&M(nl,l);var t=C.current,a=X0(t,l.type);t!==a&&(M(Q,l),M(C,a))}function Au(l){Q.current===l&&(E(C),E(Q)),nl.current===l&&(E(nl),ru._currentValue=G)}var Zn,mf;function Ta(l){if(Zn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Zn=t&&t[1]||"",mf=-1)":-1u||f[e]!==m[u]){var S=` +`+f[e].replace(" at new "," at ");return l.displayName&&S.includes("")&&(S=S.replace("",l.displayName)),S}while(1<=e&&0<=u);break}}}finally{Vn=!1,Error.prepareStackTrace=a}return(a=l?l.displayName||l.name:"")?Ta(a):""}function Cd(l,t){switch(l.tag){case 26:case 27:case 5:return Ta(l.type);case 16:return Ta("Lazy");case 13:return l.child!==t&&t!==null?Ta("Suspense Fallback"):Ta("Suspense");case 19:return Ta("SuspenseList");case 0:case 15:return Ln(l.type,!1);case 11:return Ln(l.type.render,!1);case 1:return Ln(l.type,!0);case 31:return Ta("Activity");default:return""}}function vf(l){try{var t="",a=null;do t+=Cd(l,a),a=l,l=l.return;while(l);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Kn=Object.prototype.hasOwnProperty,Jn=T.unstable_scheduleCallback,wn=T.unstable_cancelCallback,Hd=T.unstable_shouldYield,Rd=T.unstable_requestPaint,tt=T.unstable_now,Bd=T.unstable_getCurrentPriorityLevel,rf=T.unstable_ImmediatePriority,gf=T.unstable_UserBlockingPriority,Tu=T.unstable_NormalPriority,qd=T.unstable_LowPriority,Sf=T.unstable_IdlePriority,Yd=T.log,Gd=T.unstable_setDisableYieldValue,Oe=null,at=null;function Ft(l){if(typeof Yd=="function"&&Gd(l),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(Oe,l)}catch{}}var et=Math.clz32?Math.clz32:Zd,Xd=Math.log,Qd=Math.LN2;function Zd(l){return l>>>=0,l===0?32:31-(Xd(l)/Qd|0)|0}var Eu=256,xu=262144,_u=4194304;function Ea(l){var t=l&42;if(t!==0)return t;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Mu(l,t,a){var e=l.pendingLanes;if(e===0)return 0;var u=0,n=l.suspendedLanes,i=l.pingedLanes;l=l.warmLanes;var c=e&134217727;return c!==0?(e=c&~n,e!==0?u=Ea(e):(i&=c,i!==0?u=Ea(i):a||(a=c&~l,a!==0&&(u=Ea(a))))):(c=e&~n,c!==0?u=Ea(c):i!==0?u=Ea(i):a||(a=e&~l,a!==0&&(u=Ea(a)))),u===0?0:t!==0&&t!==u&&(t&n)===0&&(n=u&-u,a=t&-t,n>=a||n===32&&(a&4194048)!==0)?t:u}function De(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function Vd(l,t){switch(l){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bf(){var l=_u;return _u<<=1,(_u&62914560)===0&&(_u=4194304),l}function kn(l){for(var t=[],a=0;31>a;a++)t.push(l);return t}function Ue(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Ld(l,t,a,e,u,n){var i=l.pendingLanes;l.pendingLanes=a,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=a,l.entangledLanes&=a,l.errorRecoveryDisabledLanes&=a,l.shellSuspendCounter=0;var c=l.entanglements,f=l.expirationTimes,m=l.hiddenUpdates;for(a=i&~a;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var $d=/[\n"\\]/g;function ht(l){return l.replace($d,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function li(l,t,a,e,u,n,i,c){l.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?l.type=i:l.removeAttribute("type"),t!=null?i==="number"?(t===0&&l.value===""||l.value!=t)&&(l.value=""+yt(t)):l.value!==""+yt(t)&&(l.value=""+yt(t)):i!=="submit"&&i!=="reset"||l.removeAttribute("value"),t!=null?ti(l,i,yt(t)):a!=null?ti(l,i,yt(a)):e!=null&&l.removeAttribute("value"),u==null&&n!=null&&(l.defaultChecked=!!n),u!=null&&(l.checked=u&&typeof u!="function"&&typeof u!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?l.name=""+yt(c):l.removeAttribute("name")}function jf(l,t,a,e,u,n,i,c){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(l.type=n),t!=null||a!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){Pn(l);return}a=a!=null?""+yt(a):"",t=t!=null?""+yt(t):a,c||t===l.value||(l.value=t),l.defaultValue=t}e=e??u,e=typeof e!="function"&&typeof e!="symbol"&&!!e,l.checked=c?l.checked:!!e,l.defaultChecked=!!e,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(l.name=i),Pn(l)}function ti(l,t,a){t==="number"&&Uu(l.ownerDocument)===l||l.defaultValue===""+a||(l.defaultValue=""+a)}function ka(l,t,a,e){if(l=l.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ii=!1;if(Rt)try{var He={};Object.defineProperty(He,"passive",{get:function(){ii=!0}}),window.addEventListener("test",He,He),window.removeEventListener("test",He,He)}catch{ii=!1}var Pt=null,ci=null,ju=null;function Gf(){if(ju)return ju;var l,t=ci,a=t.length,e,u="value"in Pt?Pt.value:Pt.textContent,n=u.length;for(l=0;l=qe),Kf=" ",Jf=!1;function wf(l,t){switch(l){case"keyup":return E1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kf(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Ia=!1;function _1(l,t){switch(l){case"compositionend":return kf(t);case"keypress":return t.which!==32?null:(Jf=!0,Kf);case"textInput":return l=t.data,l===Kf&&Jf?null:l;default:return null}}function M1(l,t){if(Ia)return l==="compositionend"||!yi&&wf(l,t)?(l=Gf(),ju=ci=Pt=null,Ia=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-l};l=e}l:{for(;a;){if(a.nextSibling){a=a.nextSibling;break l}a=a.parentNode}a=void 0}a=as(a)}}function us(l,t){return l&&t?l===t?!0:l&&l.nodeType===3?!1:t&&t.nodeType===3?us(l,t.parentNode):"contains"in l?l.contains(t):l.compareDocumentPosition?!!(l.compareDocumentPosition(t)&16):!1:!1}function ns(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var t=Uu(l.document);t instanceof l.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)l=t.contentWindow;else break;t=Uu(l.document)}return t}function vi(l){var t=l&&l.nodeName&&l.nodeName.toLowerCase();return t&&(t==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||t==="textarea"||l.contentEditable==="true")}var R1=Rt&&"documentMode"in document&&11>=document.documentMode,Pa=null,ri=null,Qe=null,gi=!1;function is(l,t,a){var e=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;gi||Pa==null||Pa!==Uu(e)||(e=Pa,"selectionStart"in e&&vi(e)?e={start:e.selectionStart,end:e.selectionEnd}:(e=(e.ownerDocument&&e.ownerDocument.defaultView||window).getSelection(),e={anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}),Qe&&Xe(Qe,e)||(Qe=e,e=_n(ri,"onSelect"),0>=i,u-=i,Ot=1<<32-et(t)+u|a<V?(F=H,H=null):F=H.sibling;var tl=v(d,H,h[V],p);if(tl===null){H===null&&(H=F);break}l&&H&&tl.alternate===null&&t(d,H),s=n(tl,s,V),ll===null?q=tl:ll.sibling=tl,ll=tl,H=F}if(V===h.length)return a(d,H),P&&qt(d,V),q;if(H===null){for(;VV?(F=H,H=null):F=H.sibling;var za=v(d,H,tl.value,p);if(za===null){H===null&&(H=F);break}l&&H&&za.alternate===null&&t(d,H),s=n(za,s,V),ll===null?q=za:ll.sibling=za,ll=za,H=F}if(tl.done)return a(d,H),P&&qt(d,V),q;if(H===null){for(;!tl.done;V++,tl=h.next())tl=z(d,tl.value,p),tl!==null&&(s=n(tl,s,V),ll===null?q=tl:ll.sibling=tl,ll=tl);return P&&qt(d,V),q}for(H=e(H);!tl.done;V++,tl=h.next())tl=r(H,d,V,tl.value,p),tl!==null&&(l&&tl.alternate!==null&&H.delete(tl.key===null?V:tl.key),s=n(tl,s,V),ll===null?q=tl:ll.sibling=tl,ll=tl);return l&&H.forEach(function(th){return t(d,th)}),P&&qt(d,V),q}function yl(d,s,h,p){if(typeof h=="object"&&h!==null&&h.type===Sl&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case jl:l:{for(var q=h.key;s!==null;){if(s.key===q){if(q=h.type,q===Sl){if(s.tag===7){a(d,s.sibling),p=u(s,h.props.children),p.return=d,d=p;break l}}else if(s.elementType===q||typeof q=="object"&&q!==null&&q.$$typeof===Jl&&Ra(q)===s.type){a(d,s.sibling),p=u(s,h.props),we(p,h),p.return=d,d=p;break l}a(d,s);break}else t(d,s);s=s.sibling}h.type===Sl?(p=Ua(h.props.children,d.mode,p,h.key),p.return=d,d=p):(p=Zu(h.type,h.key,h.props,null,d.mode,p),we(p,h),p.return=d,d=p)}return i(d);case Ul:l:{for(q=h.key;s!==null;){if(s.key===q)if(s.tag===4&&s.stateNode.containerInfo===h.containerInfo&&s.stateNode.implementation===h.implementation){a(d,s.sibling),p=u(s,h.children||[]),p.return=d,d=p;break l}else{a(d,s);break}else t(d,s);s=s.sibling}p=Ei(h,d.mode,p),p.return=d,d=p}return i(d);case Jl:return h=Ra(h),yl(d,s,h,p)}if(At(h))return j(d,s,h,p);if(wl(h)){if(q=wl(h),typeof q!="function")throw Error(y(150));return h=q.call(h),Y(d,s,h,p)}if(typeof h.then=="function")return yl(d,s,Wu(h),p);if(h.$$typeof===J)return yl(d,s,Ku(d,h),p);$u(d,h)}return typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint"?(h=""+h,s!==null&&s.tag===6?(a(d,s.sibling),p=u(s,h),p.return=d,d=p):(a(d,s),p=Ti(h,d.mode,p),p.return=d,d=p),i(d)):a(d,s)}return function(d,s,h,p){try{Je=0;var q=yl(d,s,h,p);return oe=null,q}catch(H){if(H===se||H===wu)throw H;var ll=nt(29,H,null,d.mode);return ll.lanes=p,ll.return=d,ll}}}var qa=Ds(!0),Us=Ds(!1),ua=!1;function Bi(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qi(l,t){l=l.updateQueue,t.updateQueue===l&&(t.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function na(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function ia(l,t,a){var e=l.updateQueue;if(e===null)return null;if(e=e.shared,(el&2)!==0){var u=e.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),e.pending=t,t=Qu(l),hs(l,null,a),t}return Xu(l,e,t,a),Qu(l)}function ke(l,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var e=t.lanes;e&=l.pendingLanes,a|=e,t.lanes=a,zf(l,a)}}function Yi(l,t){var a=l.updateQueue,e=l.alternate;if(e!==null&&(e=e.updateQueue,a===e)){var u=null,n=null;if(a=a.firstBaseUpdate,a!==null){do{var i={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};n===null?u=n=i:n=n.next=i,a=a.next}while(a!==null);n===null?u=n=t:n=n.next=t}else u=n=t;a={baseState:e.baseState,firstBaseUpdate:u,lastBaseUpdate:n,shared:e.shared,callbacks:e.callbacks},l.updateQueue=a;return}l=a.lastBaseUpdate,l===null?a.firstBaseUpdate=t:l.next=t,a.lastBaseUpdate=t}var Gi=!1;function We(){if(Gi){var l=fe;if(l!==null)throw l}}function $e(l,t,a,e){Gi=!1;var u=l.updateQueue;ua=!1;var n=u.firstBaseUpdate,i=u.lastBaseUpdate,c=u.shared.pending;if(c!==null){u.shared.pending=null;var f=c,m=f.next;f.next=null,i===null?n=m:i.next=m,i=f;var S=l.alternate;S!==null&&(S=S.updateQueue,c=S.lastBaseUpdate,c!==i&&(c===null?S.firstBaseUpdate=m:c.next=m,S.lastBaseUpdate=f))}if(n!==null){var z=u.baseState;i=0,S=m=f=null,c=n;do{var v=c.lane&-536870913,r=v!==c.lane;if(r?($&v)===v:(e&v)===v){v!==0&&v===ce&&(Gi=!0),S!==null&&(S=S.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});l:{var j=l,Y=c;v=t;var yl=a;switch(Y.tag){case 1:if(j=Y.payload,typeof j=="function"){z=j.call(yl,z,v);break l}z=j;break l;case 3:j.flags=j.flags&-65537|128;case 0:if(j=Y.payload,v=typeof j=="function"?j.call(yl,z,v):j,v==null)break l;z=R({},z,v);break l;case 2:ua=!0}}v=c.callback,v!==null&&(l.flags|=64,r&&(l.flags|=8192),r=u.callbacks,r===null?u.callbacks=[v]:r.push(v))}else r={lane:v,tag:c.tag,payload:c.payload,callback:c.callback,next:null},S===null?(m=S=r,f=z):S=S.next=r,i|=v;if(c=c.next,c===null){if(c=u.shared.pending,c===null)break;r=c,c=r.next,r.next=null,u.lastBaseUpdate=r,u.shared.pending=null}}while(!0);S===null&&(f=z),u.baseState=f,u.firstBaseUpdate=m,u.lastBaseUpdate=S,n===null&&(u.shared.lanes=0),da|=i,l.lanes=i,l.memoizedState=z}}function Ns(l,t){if(typeof l!="function")throw Error(y(191,l));l.call(t)}function js(l,t){var a=l.callbacks;if(a!==null)for(l.callbacks=null,l=0;ln?n:8;var i=b.T,c={};b.T=c,uc(l,!1,t,a);try{var f=u(),m=b.S;if(m!==null&&m(c,f),f!==null&&typeof f=="object"&&typeof f.then=="function"){var S=L1(f,e);Pe(l,t,S,ot(l))}else Pe(l,t,e,ot(l))}catch(z){Pe(l,t,{then:function(){},status:"rejected",reason:z},ot())}finally{_.p=n,i!==null&&c.types!==null&&(i.types=c.types),b.T=i}}function $1(){}function ac(l,t,a,e){if(l.tag!==5)throw Error(y(476));var u=oo(l).queue;so(l,u,t,G,a===null?$1:function(){return yo(l),a(e)})}function oo(l){var t=l.memoizedState;if(t!==null)return t;t={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:G},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:a},next:null},l.memoizedState=t,l=l.alternate,l!==null&&(l.memoizedState=t),t}function yo(l){var t=oo(l);t.next===null&&(t=l.alternate.memoizedState),Pe(l,t.next.queue,{},ot())}function ec(){return Xl(ru)}function ho(){return xl().memoizedState}function mo(){return xl().memoizedState}function F1(l){for(var t=l.return;t!==null;){switch(t.tag){case 24:case 3:var a=ot();l=na(a);var e=ia(t,l,a);e!==null&&(lt(e,t,a),ke(e,t,a)),t={cache:ji()},l.payload=t;return}t=t.return}}function I1(l,t,a){var e=ot();a={lane:e,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},cn(l)?ro(t,a):(a=zi(l,t,a,e),a!==null&&(lt(a,l,e),go(a,t,e)))}function vo(l,t,a){var e=ot();Pe(l,t,a,e)}function Pe(l,t,a,e){var u={lane:e,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(cn(l))ro(t,u);else{var n=l.alternate;if(l.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var i=t.lastRenderedState,c=n(i,a);if(u.hasEagerState=!0,u.eagerState=c,ut(c,i))return Xu(l,t,u,0),ml===null&&Gu(),!1}catch{}if(a=zi(l,t,u,e),a!==null)return lt(a,l,e),go(a,t,e),!0}return!1}function uc(l,t,a,e){if(e={lane:2,revertLane:Bc(),gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},cn(l)){if(t)throw Error(y(479))}else t=zi(l,a,e,2),t!==null&<(t,l,2)}function cn(l){var t=l.alternate;return l===Z||t!==null&&t===Z}function ro(l,t){ye=Pu=!0;var a=l.pending;a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t}function go(l,t,a){if((a&4194048)!==0){var e=t.lanes;e&=l.pendingLanes,a|=e,t.lanes=a,zf(l,a)}}var lu={readContext:Xl,use:an,useCallback:zl,useContext:zl,useEffect:zl,useImperativeHandle:zl,useLayoutEffect:zl,useInsertionEffect:zl,useMemo:zl,useReducer:zl,useRef:zl,useState:zl,useDebugValue:zl,useDeferredValue:zl,useTransition:zl,useSyncExternalStore:zl,useId:zl,useHostTransitionStatus:zl,useFormState:zl,useActionState:zl,useOptimistic:zl,useMemoCache:zl,useCacheRefresh:zl};lu.useEffectEvent=zl;var So={readContext:Xl,use:an,useCallback:function(l,t){return Kl().memoizedState=[l,t===void 0?null:t],l},useContext:Xl,useEffect:lo,useImperativeHandle:function(l,t,a){a=a!=null?a.concat([l]):null,un(4194308,4,uo.bind(null,t,l),a)},useLayoutEffect:function(l,t){return un(4194308,4,l,t)},useInsertionEffect:function(l,t){un(4,2,l,t)},useMemo:function(l,t){var a=Kl();t=t===void 0?null:t;var e=l();if(Ya){Ft(!0);try{l()}finally{Ft(!1)}}return a.memoizedState=[e,t],e},useReducer:function(l,t,a){var e=Kl();if(a!==void 0){var u=a(t);if(Ya){Ft(!0);try{a(t)}finally{Ft(!1)}}}else u=t;return e.memoizedState=e.baseState=u,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},e.queue=l,l=l.dispatch=I1.bind(null,Z,l),[e.memoizedState,l]},useRef:function(l){var t=Kl();return l={current:l},t.memoizedState=l},useState:function(l){l=Fi(l);var t=l.queue,a=vo.bind(null,Z,t);return t.dispatch=a,[l.memoizedState,a]},useDebugValue:lc,useDeferredValue:function(l,t){var a=Kl();return tc(a,l,t)},useTransition:function(){var l=Fi(!1);return l=so.bind(null,Z,l.queue,!0,!1),Kl().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,t,a){var e=Z,u=Kl();if(P){if(a===void 0)throw Error(y(407));a=a()}else{if(a=t(),ml===null)throw Error(y(349));($&127)!==0||Ys(e,t,a)}u.memoizedState=a;var n={value:a,getSnapshot:t};return u.queue=n,lo(Xs.bind(null,e,n,l),[l]),e.flags|=2048,me(9,{destroy:void 0},Gs.bind(null,e,n,a,t),null),a},useId:function(){var l=Kl(),t=ml.identifierPrefix;if(P){var a=Dt,e=Ot;a=(e&~(1<<32-et(e)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ln++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof e.is=="string"?i.createElement("select",{is:e.is}):i.createElement("select"),e.multiple?n.multiple=!0:e.size&&(n.size=e.size);break;default:n=typeof e.is=="string"?i.createElement(u,{is:e.is}):i.createElement(u)}}n[Yl]=t,n[kl]=e;l:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break l;for(;i.sibling===null;){if(i.return===null||i.return===t)break l;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=n;l:switch(Zl(n,u,e),u){case"button":case"input":case"select":case"textarea":e=!!e.autoFocus;break l;case"img":e=!0;break l;default:e=!1}e&&Vt(t)}}return gl(t),Sc(t,t.type,l===null?null:l.memoizedProps,t.pendingProps,a),null;case 6:if(l&&t.stateNode!=null)l.memoizedProps!==e&&Vt(t);else{if(typeof e!="string"&&t.stateNode===null)throw Error(y(166));if(l=w.current,ne(t)){if(l=t.stateNode,a=t.memoizedProps,e=null,u=Gl,u!==null)switch(u.tag){case 27:case 5:e=u.memoizedProps}l[Yl]=t,l=!!(l.nodeValue===a||e!==null&&e.suppressHydrationWarning===!0||q0(l.nodeValue,a)),l||aa(t,!0)}else l=Mn(l).createTextNode(e),l[Yl]=t,t.stateNode=l}return gl(t),null;case 31:if(a=t.memoizedState,l===null||l.memoizedState!==null){if(e=ne(t),a!==null){if(l===null){if(!e)throw Error(y(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(y(557));l[Yl]=t}else Na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gl(t),l=!1}else a=Oi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=a),l=!0;if(!l)return t.flags&256?(ct(t),t):(ct(t),null);if((t.flags&128)!==0)throw Error(y(558))}return gl(t),null;case 13:if(e=t.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(u=ne(t),e!==null&&e.dehydrated!==null){if(l===null){if(!u)throw Error(y(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(y(317));u[Yl]=t}else Na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;gl(t),u=!1}else u=Oi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(ct(t),t):(ct(t),null)}return ct(t),(t.flags&128)!==0?(t.lanes=a,t):(a=e!==null,l=l!==null&&l.memoizedState!==null,a&&(e=t.child,u=null,e.alternate!==null&&e.alternate.memoizedState!==null&&e.alternate.memoizedState.cachePool!==null&&(u=e.alternate.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==u&&(e.flags|=2048)),a!==l&&a&&(t.child.flags|=8192),yn(t,t.updateQueue),gl(t),null);case 4:return Tl(),l===null&&Xc(t.stateNode.containerInfo),gl(t),null;case 10:return Gt(t.type),gl(t),null;case 19:if(E(El),e=t.memoizedState,e===null)return gl(t),null;if(u=(t.flags&128)!==0,n=e.rendering,n===null)if(u)au(e,!1);else{if(Al!==0||l!==null&&(l.flags&128)!==0)for(l=t.child;l!==null;){if(n=Iu(l),n!==null){for(t.flags|=128,au(e,!1),l=n.updateQueue,t.updateQueue=l,yn(t,l),t.subtreeFlags=0,l=a,a=t.child;a!==null;)ms(a,l),a=a.sibling;return M(El,El.current&1|2),P&&qt(t,e.treeForkCount),t.child}l=l.sibling}e.tail!==null&&tt()>gn&&(t.flags|=128,u=!0,au(e,!1),t.lanes=4194304)}else{if(!u)if(l=Iu(n),l!==null){if(t.flags|=128,u=!0,l=l.updateQueue,t.updateQueue=l,yn(t,l),au(e,!0),e.tail===null&&e.tailMode==="hidden"&&!n.alternate&&!P)return gl(t),null}else 2*tt()-e.renderingStartTime>gn&&a!==536870912&&(t.flags|=128,u=!0,au(e,!1),t.lanes=4194304);e.isBackwards?(n.sibling=t.child,t.child=n):(l=e.last,l!==null?l.sibling=n:t.child=n,e.last=n)}return e.tail!==null?(l=e.tail,e.rendering=l,e.tail=l.sibling,e.renderingStartTime=tt(),l.sibling=null,a=El.current,M(El,u?a&1|2:a&1),P&&qt(t,e.treeForkCount),l):(gl(t),null);case 22:case 23:return ct(t),Qi(),e=t.memoizedState!==null,l!==null?l.memoizedState!==null!==e&&(t.flags|=8192):e&&(t.flags|=8192),e?(a&536870912)!==0&&(t.flags&128)===0&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),a=t.updateQueue,a!==null&&yn(t,a.retryQueue),a=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(t.flags|=2048),l!==null&&E(Ha),null;case 24:return a=null,l!==null&&(a=l.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Gt(_l),gl(t),null;case 25:return null;case 30:return null}throw Error(y(156,t.tag))}function ey(l,t){switch(_i(t),t.tag){case 1:return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 3:return Gt(_l),Tl(),l=t.flags,(l&65536)!==0&&(l&128)===0?(t.flags=l&-65537|128,t):null;case 26:case 27:case 5:return Au(t),null;case 31:if(t.memoizedState!==null){if(ct(t),t.alternate===null)throw Error(y(340));Na()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 13:if(ct(t),l=t.memoizedState,l!==null&&l.dehydrated!==null){if(t.alternate===null)throw Error(y(340));Na()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 19:return E(El),null;case 4:return Tl(),null;case 10:return Gt(t.type),null;case 22:case 23:return ct(t),Qi(),l!==null&&E(Ha),l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 24:return Gt(_l),null;case 25:return null;default:return null}}function Zo(l,t){switch(_i(t),t.tag){case 3:Gt(_l),Tl();break;case 26:case 27:case 5:Au(t);break;case 4:Tl();break;case 31:t.memoizedState!==null&&ct(t);break;case 13:ct(t);break;case 19:E(El);break;case 10:Gt(t.type);break;case 22:case 23:ct(t),Qi(),l!==null&&E(Ha);break;case 24:Gt(_l)}}function eu(l,t){try{var a=t.updateQueue,e=a!==null?a.lastEffect:null;if(e!==null){var u=e.next;a=u;do{if((a.tag&l)===l){e=void 0;var n=a.create,i=a.inst;e=n(),i.destroy=e}a=a.next}while(a!==u)}}catch(c){cl(t,t.return,c)}}function sa(l,t,a){try{var e=t.updateQueue,u=e!==null?e.lastEffect:null;if(u!==null){var n=u.next;e=n;do{if((e.tag&l)===l){var i=e.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,u=t;var f=a,m=c;try{m()}catch(S){cl(u,f,S)}}}e=e.next}while(e!==n)}}catch(S){cl(t,t.return,S)}}function Vo(l){var t=l.updateQueue;if(t!==null){var a=l.stateNode;try{js(t,a)}catch(e){cl(l,l.return,e)}}}function Lo(l,t,a){a.props=Ga(l.type,l.memoizedProps),a.state=l.memoizedState;try{a.componentWillUnmount()}catch(e){cl(l,t,e)}}function uu(l,t){try{var a=l.ref;if(a!==null){switch(l.tag){case 26:case 27:case 5:var e=l.stateNode;break;case 30:e=l.stateNode;break;default:e=l.stateNode}typeof a=="function"?l.refCleanup=a(e):a.current=e}}catch(u){cl(l,t,u)}}function Ut(l,t){var a=l.ref,e=l.refCleanup;if(a!==null)if(typeof e=="function")try{e()}catch(u){cl(l,t,u)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){cl(l,t,u)}else a.current=null}function Ko(l){var t=l.type,a=l.memoizedProps,e=l.stateNode;try{l:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&e.focus();break l;case"img":a.src?e.src=a.src:a.srcSet&&(e.srcset=a.srcSet)}}catch(u){cl(l,l.return,u)}}function bc(l,t,a){try{var e=l.stateNode;xy(e,l.type,a,t),e[kl]=t}catch(u){cl(l,l.return,u)}}function Jo(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&ra(l.type)||l.tag===4}function pc(l){l:for(;;){for(;l.sibling===null;){if(l.return===null||Jo(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&ra(l.type)||l.flags&2||l.child===null||l.tag===4)continue l;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function zc(l,t,a){var e=l.tag;if(e===5||e===6)l=l.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(l,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(l),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ht));else if(e!==4&&(e===27&&ra(l.type)&&(a=l.stateNode,t=null),l=l.child,l!==null))for(zc(l,t,a),l=l.sibling;l!==null;)zc(l,t,a),l=l.sibling}function hn(l,t,a){var e=l.tag;if(e===5||e===6)l=l.stateNode,t?a.insertBefore(l,t):a.appendChild(l);else if(e!==4&&(e===27&&ra(l.type)&&(a=l.stateNode),l=l.child,l!==null))for(hn(l,t,a),l=l.sibling;l!==null;)hn(l,t,a),l=l.sibling}function wo(l){var t=l.stateNode,a=l.memoizedProps;try{for(var e=l.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Zl(t,e,a),t[Yl]=l,t[kl]=a}catch(n){cl(l,l.return,n)}}var Lt=!1,Dl=!1,Ac=!1,ko=typeof WeakSet=="function"?WeakSet:Set,Bl=null;function uy(l,t){if(l=l.containerInfo,Vc=Hn,l=ns(l),vi(l)){if("selectionStart"in l)var a={start:l.selectionStart,end:l.selectionEnd};else l:{a=(a=l.ownerDocument)&&a.defaultView||window;var e=a.getSelection&&a.getSelection();if(e&&e.rangeCount!==0){a=e.anchorNode;var u=e.anchorOffset,n=e.focusNode;e=e.focusOffset;try{a.nodeType,n.nodeType}catch{a=null;break l}var i=0,c=-1,f=-1,m=0,S=0,z=l,v=null;t:for(;;){for(var r;z!==a||u!==0&&z.nodeType!==3||(c=i+u),z!==n||e!==0&&z.nodeType!==3||(f=i+e),z.nodeType===3&&(i+=z.nodeValue.length),(r=z.firstChild)!==null;)v=z,z=r;for(;;){if(z===l)break t;if(v===a&&++m===u&&(c=i),v===n&&++S===e&&(f=i),(r=z.nextSibling)!==null)break;z=v,v=z.parentNode}z=r}a=c===-1||f===-1?null:{start:c,end:f}}else a=null}a=a||{start:0,end:0}}else a=null;for(Lc={focusedElem:l,selectionRange:a},Hn=!1,Bl=t;Bl!==null;)if(t=Bl,l=t.child,(t.subtreeFlags&1028)!==0&&l!==null)l.return=t,Bl=l;else for(;Bl!==null;){switch(t=Bl,n=t.alternate,l=t.flags,t.tag){case 0:if((l&4)!==0&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(a=0;a title"))),Zl(n,e,a),n[Yl]=l,Rl(n),e=n;break l;case"link":var i=ld("link","href",u).get(e+(a.href||""));if(i){for(var c=0;cyl&&(i=yl,yl=Y,Y=i);var d=es(c,Y),s=es(c,yl);if(d&&s&&(r.rangeCount!==1||r.anchorNode!==d.node||r.anchorOffset!==d.offset||r.focusNode!==s.node||r.focusOffset!==s.offset)){var h=z.createRange();h.setStart(d.node,d.offset),r.removeAllRanges(),Y>yl?(r.addRange(h),r.extend(s.node,s.offset)):(h.setEnd(s.node,s.offset),r.addRange(h))}}}}for(z=[],r=c;r=r.parentNode;)r.nodeType===1&&z.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;ca?32:a,b.T=null,a=Dc,Dc=null;var n=ha,i=Wt;if(Nl=0,be=ha=null,Wt=0,(el&6)!==0)throw Error(y(331));var c=el;if(el|=4,n0(n.current),a0(n,n.current,i,a),el=c,ou(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Oe,n)}catch{}return!0}finally{_.p=u,b.T=e,T0(l,t)}}function x0(l,t,a){t=vt(a,t),t=fc(l.stateNode,t,2),l=ia(l,t,2),l!==null&&(Ue(l,2),Nt(l))}function cl(l,t,a){if(l.tag===3)x0(l,l,a);else for(;t!==null;){if(t.tag===3){x0(t,l,a);break}else if(t.tag===1){var e=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof e.componentDidCatch=="function"&&(ya===null||!ya.has(e))){l=vt(a,l),a=_o(2),e=ia(t,a,2),e!==null&&(Mo(a,e,t,l),Ue(e,2),Nt(e));break}}t=t.return}}function Cc(l,t,a){var e=l.pingCache;if(e===null){e=l.pingCache=new cy;var u=new Set;e.set(t,u)}else u=e.get(t),u===void 0&&(u=new Set,e.set(t,u));u.has(a)||(xc=!0,u.add(a),l=yy.bind(null,l,t,a),t.then(l,l))}function yy(l,t,a){var e=l.pingCache;e!==null&&e.delete(t),l.pingedLanes|=l.suspendedLanes&a,l.warmLanes&=~a,ml===l&&($&a)===a&&(Al===4||Al===3&&($&62914560)===$&&300>tt()-rn?(el&2)===0&&pe(l,0):_c|=a,Se===$&&(Se=0)),Nt(l)}function _0(l,t){t===0&&(t=bf()),l=Da(l,t),l!==null&&(Ue(l,t),Nt(l))}function hy(l){var t=l.memoizedState,a=0;t!==null&&(a=t.retryLane),_0(l,a)}function my(l,t){var a=0;switch(l.tag){case 31:case 13:var e=l.stateNode,u=l.memoizedState;u!==null&&(a=u.retryLane);break;case 19:e=l.stateNode;break;case 22:e=l.stateNode._retryCache;break;default:throw Error(y(314))}e!==null&&e.delete(t),_0(l,a)}function vy(l,t){return Jn(l,t)}var Tn=null,Ae=null,Hc=!1,En=!1,Rc=!1,va=0;function Nt(l){l!==Ae&&l.next===null&&(Ae===null?Tn=Ae=l:Ae=Ae.next=l),En=!0,Hc||(Hc=!0,gy())}function ou(l,t){if(!Rc&&En){Rc=!0;do for(var a=!1,e=Tn;e!==null;){if(l!==0){var u=e.pendingLanes;if(u===0)var n=0;else{var i=e.suspendedLanes,c=e.pingedLanes;n=(1<<31-et(42|l)+1)-1,n&=u&~(i&~c),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(a=!0,U0(e,n))}else n=$,n=Mu(e,e===ml?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),(n&3)===0||De(e,n)||(a=!0,U0(e,n));e=e.next}while(a);Rc=!1}}function ry(){M0()}function M0(){En=Hc=!1;var l=0;va!==0&&My()&&(l=va);for(var t=tt(),a=null,e=Tn;e!==null;){var u=e.next,n=O0(e,t);n===0?(e.next=null,a===null?Tn=u:a.next=u,u===null&&(Ae=a)):(a=e,(l!==0||(n&3)!==0)&&(En=!0)),e=u}Nl!==0&&Nl!==5||ou(l),va!==0&&(va=0)}function O0(l,t){for(var a=l.suspendedLanes,e=l.pingedLanes,u=l.expirationTimes,n=l.pendingLanes&-62914561;0c)break;var S=f.transferSize,z=f.initiatorType;S&&Y0(z)&&(f=f.responseEnd,i+=S*(f"u"?null:document;function $0(l,t,a){var e=Te;if(e&&typeof t=="string"&&t){var u=ht(t);u='link[rel="'+l+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),W0.has(u)||(W0.add(u),l={rel:l,crossOrigin:a,href:t},e.querySelector(u)===null&&(t=e.createElement("link"),Zl(t,"link",l),Rl(t),e.head.appendChild(t)))}}function By(l){$t.D(l),$0("dns-prefetch",l,null)}function qy(l,t){$t.C(l,t),$0("preconnect",l,t)}function Yy(l,t,a){$t.L(l,t,a);var e=Te;if(e&&l&&t){var u='link[rel="preload"][as="'+ht(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+ht(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+ht(a.imageSizes)+'"]')):u+='[href="'+ht(l)+'"]';var n=u;switch(t){case"style":n=Ee(l);break;case"script":n=xe(l)}zt.has(n)||(l=R({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:l,as:t},a),zt.set(n,l),e.querySelector(u)!==null||t==="style"&&e.querySelector(mu(n))||t==="script"&&e.querySelector(vu(n))||(t=e.createElement("link"),Zl(t,"link",l),Rl(t),e.head.appendChild(t)))}}function Gy(l,t){$t.m(l,t);var a=Te;if(a&&l){var e=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+ht(e)+'"][href="'+ht(l)+'"]',n=u;switch(e){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=xe(l)}if(!zt.has(n)&&(l=R({rel:"modulepreload",href:l},t),zt.set(n,l),a.querySelector(u)===null)){switch(e){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(vu(n)))return}e=a.createElement("link"),Zl(e,"link",l),Rl(e),a.head.appendChild(e)}}}function Xy(l,t,a){$t.S(l,t,a);var e=Te;if(e&&l){var u=Ja(e).hoistableStyles,n=Ee(l);t=t||"default";var i=u.get(n);if(!i){var c={loading:0,preload:null};if(i=e.querySelector(mu(n)))c.loading=5;else{l=R({rel:"stylesheet",href:l,"data-precedence":t},a),(a=zt.get(n))&&Fc(l,a);var f=i=e.createElement("link");Rl(f),Zl(f,"link",l),f._p=new Promise(function(m,S){f.onload=m,f.onerror=S}),f.addEventListener("load",function(){c.loading|=1}),f.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Dn(i,t,e)}i={type:"stylesheet",instance:i,count:1,state:c},u.set(n,i)}}}function Qy(l,t){$t.X(l,t);var a=Te;if(a&&l){var e=Ja(a).hoistableScripts,u=xe(l),n=e.get(u);n||(n=a.querySelector(vu(u)),n||(l=R({src:l,async:!0},t),(t=zt.get(u))&&Ic(l,t),n=a.createElement("script"),Rl(n),Zl(n,"link",l),a.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},e.set(u,n))}}function Zy(l,t){$t.M(l,t);var a=Te;if(a&&l){var e=Ja(a).hoistableScripts,u=xe(l),n=e.get(u);n||(n=a.querySelector(vu(u)),n||(l=R({src:l,async:!0,type:"module"},t),(t=zt.get(u))&&Ic(l,t),n=a.createElement("script"),Rl(n),Zl(n,"link",l),a.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},e.set(u,n))}}function F0(l,t,a,e){var u=(u=w.current)?On(u):null;if(!u)throw Error(y(446));switch(l){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ee(a.href),a=Ja(u).hoistableStyles,e=a.get(t),e||(e={type:"style",instance:null,count:0,state:null},a.set(t,e)),e):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){l=Ee(a.href);var n=Ja(u).hoistableStyles,i=n.get(l);if(i||(u=u.ownerDocument||u,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,i),(n=u.querySelector(mu(l)))&&!n._p&&(i.instance=n,i.state.loading=5),zt.has(l)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},zt.set(l,a),n||Vy(u,l,a,i.state))),t&&e===null)throw Error(y(528,""));return i}if(t&&e!==null)throw Error(y(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=xe(a),a=Ja(u).hoistableScripts,e=a.get(t),e||(e={type:"script",instance:null,count:0,state:null},a.set(t,e)),e):{type:"void",instance:null,count:0,state:null};default:throw Error(y(444,l))}}function Ee(l){return'href="'+ht(l)+'"'}function mu(l){return'link[rel="stylesheet"]['+l+"]"}function I0(l){return R({},l,{"data-precedence":l.precedence,precedence:null})}function Vy(l,t,a,e){l.querySelector('link[rel="preload"][as="style"]['+t+"]")?e.loading=1:(t=l.createElement("link"),e.preload=t,t.addEventListener("load",function(){return e.loading|=1}),t.addEventListener("error",function(){return e.loading|=2}),Zl(t,"link",a),Rl(t),l.head.appendChild(t))}function xe(l){return'[src="'+ht(l)+'"]'}function vu(l){return"script[async]"+l}function P0(l,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var e=l.querySelector('style[data-href~="'+ht(a.href)+'"]');if(e)return t.instance=e,Rl(e),e;var u=R({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return e=(l.ownerDocument||l).createElement("style"),Rl(e),Zl(e,"style",u),Dn(e,a.precedence,l),t.instance=e;case"stylesheet":u=Ee(a.href);var n=l.querySelector(mu(u));if(n)return t.state.loading|=4,t.instance=n,Rl(n),n;e=I0(a),(u=zt.get(u))&&Fc(e,u),n=(l.ownerDocument||l).createElement("link"),Rl(n);var i=n;return i._p=new Promise(function(c,f){i.onload=c,i.onerror=f}),Zl(n,"link",e),t.state.loading|=4,Dn(n,a.precedence,l),t.instance=n;case"script":return n=xe(a.src),(u=l.querySelector(vu(n)))?(t.instance=u,Rl(u),u):(e=a,(u=zt.get(n))&&(e=R({},a),Ic(e,u)),l=l.ownerDocument||l,u=l.createElement("script"),Rl(u),Zl(u,"link",e),l.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(y(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(e=t.instance,t.state.loading|=4,Dn(e,a.precedence,l));return t.instance}function Dn(l,t,a){for(var e=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=e.length?e[e.length-1]:null,n=u,i=0;i title"):null)}function Ly(l,t,a){if(a===1||t.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(l=t.disabled,typeof t.precedence=="string"&&l==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ad(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function Ky(l,t,a,e){if(a.type==="stylesheet"&&(typeof e.media!="string"||matchMedia(e.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Ee(e.href),n=t.querySelector(mu(u));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Nn.bind(l),t.then(l,l)),a.state.loading|=4,a.instance=n,Rl(n);return}n=t.ownerDocument||t,e=I0(e),(u=zt.get(u))&&Fc(e,u),n=n.createElement("link"),Rl(n);var i=n;i._p=new Promise(function(c,f){i.onload=c,i.onerror=f}),Zl(n,"link",e),a.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(l.count++,a=Nn.bind(l),t.addEventListener("load",a),t.addEventListener("error",a))}}var Pc=0;function Jy(l,t){return l.stylesheets&&l.count===0&&Cn(l,l.stylesheets),0Pc?50:800)+t);return l.unsuspend=a,function(){l.unsuspend=null,clearTimeout(e),clearTimeout(u)}}:null}function Nn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cn(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var jn=null;function Cn(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,jn=new Map,t.forEach(wy,l),jn=null,Nn.call(l))}function wy(l,t){if(!(t.state.loading&4)){var a=jn.get(l);if(a)var e=a.get(null);else{a=new Map,jn.set(l,a);for(var u=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(T)}catch(U){console.error(U)}}return T(),sf.exports=sh(),sf.exports}var dh=oh();const Od=I.createContext();function yh({children:T}){const[U,O]=I.useState([]),[y,B]=I.useState(null),[D,K]=I.useState(!1),[al,x]=I.useState(!1),[A,N]=I.useState(null),R=I.useCallback(J=>{const vl=Date.now(),fl={id:vl,app:J.id,title:J.title,icon:J.icon,x:100+U.length*30,y:50+U.length*30,width:J.defaultWidth||800,height:J.defaultHeight||600,minimized:!1,maximized:!1};O(Hl=>[...Hl,fl]),B(vl),K(!1)},[U.length]),ul=I.useCallback(J=>{O(vl=>vl.filter(fl=>fl.id!==J)),y===J&&B(null)},[y]),jl=I.useCallback(J=>{O(vl=>vl.map(fl=>fl.id===J?{...fl,minimized:!0}:fl)),B(null)},[]),Ul=I.useCallback(J=>{O(vl=>vl.map(fl=>fl.id===J?{...fl,minimized:!1}:fl)),B(J)},[]),Sl=I.useCallback(J=>{B(J),O(vl=>vl.map(fl=>fl.id===J?{...fl,minimized:!1}:fl))},[]),ql=I.useCallback((J,vl,fl)=>{O(Hl=>Hl.map(L=>L.id===J?{...L,x:vl,y:fl}:L))},[]),Cl=I.useCallback(()=>{x(!0),N(new Date)},[]),dt=I.useCallback(()=>{x(!1),N(null)},[]);return g.jsx(Od.Provider,{value:{windows:U,activeWindow:y,startMenuOpen:D,setStartMenuOpen:K,openWindow:R,closeWindow:ul,minimizeWindow:jl,restoreWindow:Ul,focusWindow:Sl,updateWindowPosition:ql,sessionActive:al,sessionStartTime:A,startSession:Cl,endSession:dt},children:T})}function Dd(){return I.useContext(Od)}const Ud=(...T)=>T.filter((U,O,y)=>!!U&&U.trim()!==""&&y.indexOf(U)===O).join(" ").trim();const hh=T=>T.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const mh=T=>T.replace(/^([A-Z])|[\s-_]+(\w)/g,(U,O,y)=>y?y.toUpperCase():O.toLowerCase());const _d=T=>{const U=mh(T);return U.charAt(0).toUpperCase()+U.slice(1)};var vh={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"};const rh=T=>{for(const U in T)if(U.startsWith("aria-")||U==="role"||U==="title")return!0;return!1};const gh=I.forwardRef(({color:T="currentColor",size:U=24,strokeWidth:O=2,absoluteStrokeWidth:y,className:B="",children:D,iconNode:K,...al},x)=>I.createElement("svg",{ref:x,...vh,width:U,height:U,stroke:T,strokeWidth:y?Number(O)*24/Number(U):O,className:Ud("lucide",B),...!D&&!rh(al)&&{"aria-hidden":"true"},...al},[...K.map(([A,N])=>I.createElement(A,N)),...Array.isArray(D)?D:[D]]));const pl=(T,U)=>{const O=I.forwardRef(({className:y,...B},D)=>I.createElement(gh,{ref:D,iconNode:U,className:Ud(`lucide-${hh(_d(T))}`,`lucide-${T}`,y),...B}));return O.displayName=_d(T),O};const Sh=[["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"}]],bh=pl("book-open",Sh);const ph=[["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"}]],zh=pl("calendar",ph);const Ah=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Th=pl("clock",Ah);const Eh=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],xh=pl("coffee",Eh);const _h=[["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"}]],Mh=pl("database",_h);const Oh=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Dh=pl("download",Oh);const Uh=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Nh=pl("ellipsis",Uh);const jh=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ch=pl("external-link",jh);const Hh=[["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"}]],Rh=pl("file-text",Hh);const Bh=[["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"}]],qh=pl("git-branch",Bh);const Yh=[["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"}]],Gh=pl("globe",Yh);const Xh=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Qh=pl("layout-grid",Xh);const Zh=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Vh=pl("menu",Zh);const Lh=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Kh=pl("play",Lh);const Jh=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wh=pl("plus",Jh);const kh=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Nd=pl("power",kh);const Wh=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$h=pl("search",Wh);const Fh=[["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"}]],Ih=pl("settings",Fh);const Ph=[["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"}]],jd=pl("shield",Ph);const lm=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],tm=pl("shopping-bag",lm);const am=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],em=pl("square",am);const um=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],nm=pl("terminal",um);const im=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],cm=pl("wifi",im);const fm=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sm=pl("x",fm),om=[{id:"backlog",title:"Backlog",color:"#6366f1",tasks:[{id:1,title:"Deploy Vaultwarden",priority:"high",assignee:"Aether",status:"done"}]},{id:"todo",title:"To Do",color:"#8b5cf6",tasks:[{id:3,title:"Complete AetherOS dashboard",priority:"high",assignee:"Engineer",status:"todo"}]},{id:"in-progress",title:"In Progress",color:"#f59e0b",tasks:[{id:5,title:"Build Session Tracker",priority:"high",assignee:"Engineer",status:"in-progress"}]},{id:"done",title:"Done",color:"#10b981",tasks:[{id:6,title:"Install Docker",priority:"high",assignee:"Aether",status:"done"}]}];function dm(){const[T]=I.useState(om);return g.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[g.jsx("div",{style:{marginBottom:"20px",paddingBottom:"15px",borderBottom:"1px solid rgba(99, 102, 241, 0.2)"},children:g.jsx("h2",{style:{fontSize:"20px",fontWeight:600},children:"Collective Kanban"})}),g.jsx("div",{style:{display:"flex",gap:"16px",overflowX:"auto",flex:1},children:T.map(U=>g.jsxs("div",{style:{minWidth:"280px",maxWidth:"280px",background:"rgba(0,0,0,0.2)",borderRadius:"12px",padding:"16px"},children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"12px"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[g.jsx("div",{style:{width:"12px",height:"12px",borderRadius:"50%",background:U.color}}),g.jsx("span",{style:{fontWeight:600,fontSize:"14px"},children:U.title}),g.jsx("span",{style:{fontSize:"12px",color:"#a0a0c0",background:"rgba(255,255,255,0.1)",padding:"2px 8px",borderRadius:"10px"},children:U.tasks.length})]}),g.jsx(Nh,{size:16,color:"#a0a0c0"})]}),g.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[U.tasks.map(O=>g.jsxs("div",{style:{background:"rgba(255,255,255,0.05)",borderRadius:"8px",padding:"12px"},children:[g.jsx("p",{style:{fontSize:"14px",marginBottom:"8px"},children:O.title}),g.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:g.jsx("div",{style:{width:"24px",height:"24px",borderRadius:"50%",background:"linear-gradient(135deg, #6366f1, #8b5cf6)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"10px",fontWeight:600},children:O.assignee.charAt(0)})})]},O.id)),g.jsxs("button",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"10px",background:"transparent",border:"1px dashed rgba(255,255,255,0.2)",borderRadius:"8px",color:"#a0a0c0",fontSize:"14px",cursor:"pointer",marginTop:"8px"},children:[g.jsx(wh,{size:16}),"Add task"]})]})]},U.id))})]})}const ym=[{id:1,name:"OpenClaw Core",description:"Multi-channel AI gateway",version:"2.1.0",icon:Gh,installed:!0,rating:5},{id:2,name:"Session Manager",description:"Advanced session tracking",version:"1.4.2",icon:nm,installed:!0,rating:4},{id:3,name:"Vaultwarden Sync",description:"Credential management",version:"1.32.0",icon:jd,installed:!1,rating:5},{id:4,name:"Git Integration",description:"Git operations bridge",version:"3.0.1",icon:qh,installed:!1,rating:4},{id:5,name:"ChromaDB Memory",description:"Vector database",version:"0.5.0",icon:Mh,installed:!1,rating:4}],hm=["All","Core","Security","Development","Memory"];function mm(){const[T,U]=I.useState("All"),[O,y]=I.useState(""),B=ym.filter(D=>{const K=T==="All"||D.category===T,al=D.name.toLowerCase().includes(O.toLowerCase());return K&&al});return g.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[g.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px",paddingBottom:"15px",borderBottom:"1px solid rgba(99, 102, 241, 0.2)"},children:[g.jsx("h2",{style:{fontSize:"20px",fontWeight:600},children:"ClawHub Marketplace"}),g.jsx("input",{type:"text",placeholder:"Search skills...",value:O,onChange:D=>y(D.target.value),style:{padding:"10px 16px",background:"rgba(255,255,255,0.05)",border:"1px solid rgba(99, 102, 241, 0.2)",borderRadius:"8px",color:"inherit",fontSize:"14px",width:"250px"}})]}),g.jsx("div",{style:{display:"flex",gap:"8px",marginBottom:"20px"},children:hm.map(D=>g.jsx("button",{onClick:()=>U(D),style:{padding:"8px 16px",background:T===D?"#6366f1":"rgba(255,255,255,0.05)",border:"none",borderRadius:"20px",color:"inherit",fontSize:"13px",cursor:"pointer"},children:D},D))}),g.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))",gap:"16px",overflowY:"auto",flex:1},children:B.map(D=>{const K=D.icon;return g.jsxs("div",{style:{background:"rgba(0,0,0,0.2)",borderRadius:"12px",padding:"20px",border:D.installed?"1px solid rgba(16, 185, 129, 0.3)":"1px solid rgba(255,255,255,0.05)"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"16px"},children:[g.jsx("div",{style:{width:"48px",height:"48px",borderRadius:"12px",background:"linear-gradient(135deg, #6366f1, #8b5cf6)",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(K,{size:24})}),D.installed&&g.jsx("span",{style:{fontSize:"11px",padding:"4px 10px",background:"rgba(16, 185, 129, 0.2)",color:"#10b981",borderRadius:"10px",fontWeight:600},children:"Installed"})]}),g.jsx("h3",{style:{fontSize:"16px",fontWeight:600,marginBottom:"8px"},children:D.name}),g.jsx("p",{style:{fontSize:"14px",color:"#a0a0c0",marginBottom:"16px"},children:D.description}),g.jsxs("button",{style:{width:"100%",padding:"10px",background:D.installed?"rgba(255,255,255,0.1)":"#6366f1",border:"none",borderRadius:"8px",color:"inherit",fontSize:"14px",cursor:D.installed?"default":"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},disabled:D.installed,children:[g.jsx(Dh,{size:16}),D.installed?"Installed":"Install"]})]},D.id)})})]})}function vm(){const[T,U]=I.useState(!1),[O,y]=I.useState(0),[B,D]=I.useState(null),[K]=I.useState([{id:1,date:"2026-02-23",duration:45,tasks:3},{id:2,date:"2026-02-23",duration:30,tasks:2}]);I.useEffect(()=>{let x;return T&&(x=setInterval(()=>y(A=>A+1),1e3)),()=>clearInterval(x)},[T]);const al=x=>{const A=Math.floor(x/3600),N=Math.floor(x%3600/60),R=x%60;return`${A.toString().padStart(2,"0")}:${N.toString().padStart(2,"0")}:${R.toString().padStart(2,"0")}`};return g.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column"},children:[g.jsx("div",{style:{marginBottom:"20px",paddingBottom:"15px",borderBottom:"1px solid rgba(99, 102, 241, 0.2)"},children:g.jsx("h2",{style:{fontSize:"20px",fontWeight:600},children:"Session Tracker"})}),g.jsxs("div",{style:{background:T?"linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05))":"rgba(0,0,0,0.2)",borderRadius:"12px",padding:"24px",marginBottom:"20px",border:T?"1px solid rgba(16, 185, 129, 0.3)":"1px solid rgba(255,255,255,0.05)",textAlign:"center"},children:[g.jsx("div",{style:{fontSize:"48px",fontWeight:700,fontFamily:"monospace",marginBottom:"24px",color:T?"#10b981":"inherit"},children:al(O)}),g.jsx("div",{style:{display:"flex",gap:"12px",justifyContent:"center"},children:T?g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>{},style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 20px",background:"rgba(245, 158, 11, 0.2)",border:"1px solid rgba(245, 158, 11, 0.3)",borderRadius:"8px",color:"#f59e0b",fontSize:"14px",cursor:"pointer"},children:[g.jsx(xh,{size:18}),"Break"]}),g.jsxs("button",{onClick:()=>U(!1),style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 20px",background:"#ef4444",border:"none",borderRadius:"8px",color:"white",fontSize:"14px",fontWeight:600,cursor:"pointer"},children:[g.jsx(em,{size:18,fill:"currentColor"}),"End"]})]}):g.jsxs("button",{onClick:()=>{U(!0),D(new Date)},style:{display:"flex",alignItems:"center",gap:"8px",padding:"12px 24px",background:"#10b981",border:"none",borderRadius:"8px",color:"white",fontSize:"14px",fontWeight:600,cursor:"pointer"},children:[g.jsx(Kh,{size:18}),"Start Session"]})})]}),g.jsxs("div",{style:{flex:1,overflow:"auto"},children:[g.jsx("h3",{style:{fontSize:"14px",textTransform:"uppercase",letterSpacing:"1px",color:"#6366f1",marginBottom:"12px"},children:"Recent Sessions"}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:K.map(x=>g.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px",background:"rgba(0,0,0,0.2)",borderRadius:"8px"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[g.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"10px",background:"rgba(99, 102, 241, 0.2)",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(zh,{size:18})}),g.jsxs("div",{children:[g.jsx("div",{style:{fontWeight:600},children:"Work Session"}),g.jsx("div",{style:{fontSize:"13px",color:"#a0a0c0"},children:x.date})]})]}),g.jsxs("div",{style:{textAlign:"right"},children:[g.jsx("div",{style:{fontSize:"13px",color:"#a0a0c0"},children:"Duration"}),g.jsxs("div",{style:{fontWeight:600},children:[x.duration," min"]})]})]},x.id))})]})]})}const Md=[{id:"overview",title:"System Overview",content:`Aether System Overview + +Identity +Name: Aether +Role: Autonomous Orchestrator +Initialized: 2026-02-23 + +Core Directive +Transform high-level visions into production-ready software. + +Infrastructure +- Gitea: http://192.168.5.35:3000 +- Vaultwarden: http://localhost:8080 +- AetherOS: http://localhost:3001 + +The Collective +- Architect: Project scoping +- Researcher: Documentation +- Engineer: Implementation +- QA Auditor: Testing +- Publisher: GitHub releases`},{id:"architecture",title:"Architecture",content:`Aether Architecture + +Component Flow +User Input -> Aether Orchestrator -> Sub-agents -> Output + +Data Flow +1. Planning: Architect scopes project +2. Implementation: Engineer writes code +3. Release: Publisher promotes to GitHub + +Memory Architecture +- Short-term: Session context +- Long-term: /aether_core/memory/`},{id:"security",title:"Security Policy",content:`Security Policy + +Credential Management +All credentials stored in Vaultwarden: +- SSH private keys +- API tokens +- Service passwords + +Access Control +- SSH key authentication only +- No password authentication + +Key Rotation +- SSH Keys: 90 days +- API Tokens: 60 days`}];function rm(){const[T,U]=I.useState("overview"),O=Md.find(y=>y.id===T)?.content||"";return g.jsxs("div",{style:{height:"100%",display:"flex",gap:"20px"},children:[g.jsxs("div",{style:{width:"240px",minWidth:"240px",borderRight:"1px solid rgba(99, 102, 241, 0.2)",paddingRight:"20px"},children:[g.jsx("div",{style:{marginBottom:"20px"},children:g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",padding:"10px 12px",background:"rgba(255,255,255,0.05)",borderRadius:"8px"},children:[g.jsx($h,{size:16,color:"#a0a0c0"}),g.jsx("input",{type:"text",placeholder:"Search wiki...",style:{background:"transparent",border:"none",color:"inherit",fontSize:"14px",outline:"none",width:"100%"}})]})}),g.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:Md.map(y=>g.jsxs("button",{onClick:()=>U(y.id),style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px 12px",background:T===y.id?"rgba(99, 102, 241, 0.2)":"transparent",border:"none",borderRadius:"8px",color:T===y.id?"#6366f1":"inherit",fontSize:"14px",cursor:"pointer",textAlign:"left"},children:[g.jsx(Rh,{size:16}),y.title]},y.id))})]}),g.jsxs("div",{style:{flex:1,overflow:"auto",whiteSpace:"pre-wrap",lineHeight:1.7},children:[O,g.jsxs("div",{style:{marginTop:"40px",paddingTop:"20px",borderTop:"1px solid rgba(99, 102, 241, 0.2)",display:"flex",alignItems:"center",gap:"8px",fontSize:"13px",color:"#a0a0c0"},children:[g.jsx(Ch,{size:14}),g.jsx("span",{children:"Last updated: 2026-02-23 by Aether"})]})]})]})}const gm={kanban:dm,clawhub:mm,session:vm,wiki:rm};function Sm({window:T,isActive:U,app:O}){const{closeWindow:y,minimizeWindow:B,focusWindow:D,updateWindowPosition:K}=Dd(),[al,x]=I.useState(!1),[A,N]=I.useState({x:0,y:0}),R=I.useRef(null),ul=Sl=>{if(Sl.target.closest(".window-controls"))return;D(T.id),x(!0);const ql=R.current.getBoundingClientRect();N({x:Sl.clientX-ql.left,y:Sl.clientY-ql.top})};I.useEffect(()=>{const Sl=Cl=>{if(!al)return;const dt=Cl.clientX-A.x,J=Cl.clientY-A.y;K(T.id,dt,J)},ql=()=>{x(!1)};return al&&(document.addEventListener("mousemove",Sl),document.addEventListener("mouseup",ql)),()=>{document.removeEventListener("mousemove",Sl),document.removeEventListener("mouseup",ql)}},[al,A,T.id,K]);const jl=gm[T.app],Ul=O?.icon;return g.jsxs("div",{ref:R,className:"window",style:{left:T.x,top:T.y,width:T.width,height:T.height,zIndex:U?100:1,opacity:al?.9:1},onMouseDown:()=>D(T.id),children:[g.jsxs("div",{className:"window-header",onMouseDown:ul,children:[g.jsxs("div",{className:"window-title",children:[Ul&&g.jsx(Ul,{size:16}),g.jsx("span",{children:T.title})]}),g.jsxs("div",{className:"window-controls",children:[g.jsx("button",{className:"window-btn minimize",onClick:()=>B(T.id),title:"Minimize"}),g.jsx("button",{className:"window-btn maximize",title:"Maximize"}),g.jsx("button",{className:"window-btn close",onClick:()=>y(T.id),title:"Close",children:g.jsx(sm,{size:10,color:"white"})})]})]}),g.jsx("div",{className:"window-content",children:jl&&g.jsx(jl,{})})]})}function bm({apps:T,onAppClick:U}){return g.jsxs("div",{className:"start-menu",onClick:O=>O.stopPropagation(),children:[g.jsx("h3",{children:"Applications"}),g.jsx("div",{className:"menu-items",children:T.map(O=>g.jsxs("div",{className:"menu-item",onClick:()=>U(O),children:[g.jsx(O.icon,{size:20}),g.jsx("span",{children:O.title})]},O.id))}),g.jsx("h3",{style:{marginTop:"20px"},children:"System"}),g.jsxs("div",{className:"menu-items",children:[g.jsxs("div",{className:"menu-item",children:[g.jsx(Ih,{size:20}),g.jsx("span",{children:"Settings"})]}),g.jsxs("div",{className:"menu-item",children:[g.jsx(Nd,{size:20}),g.jsx("span",{children:"Shutdown"})]})]})]})}const Qn=[{id:"kanban",title:"Collective Kanban",icon:Qh,defaultWidth:900,defaultHeight:600},{id:"clawhub",title:"ClawHub Marketplace",icon:tm,defaultWidth:1e3,defaultHeight:700},{id:"session",title:"Session Tracker",icon:Th,defaultWidth:500,defaultHeight:400},{id:"wiki",title:"Agent Wiki",icon:bh,defaultWidth:800,defaultHeight:600}];function pm(){const{windows:T,activeWindow:U,startMenuOpen:O,setStartMenuOpen:y,openWindow:B,restoreWindow:D,focusWindow:K,sessionActive:al}=Dd(),[x,A]=I.useState(new Date);return I.useEffect(()=>{const N=setInterval(()=>A(new Date),1e3);return()=>clearInterval(N)},[]),g.jsxs("div",{className:"desktop",onClick:()=>y(!1),children:[g.jsx("div",{className:"desktop-icons",onClick:N=>N.stopPropagation(),children:Qn.map(N=>g.jsxs("div",{className:"desktop-icon",onClick:()=>B(N),children:[g.jsx(N.icon,{}),g.jsx("span",{children:N.title})]},N.id))}),T.map(N=>!N.minimized&&g.jsx(Sm,{window:N,isActive:U===N.id,app:Qn.find(R=>R.id===N.app)},N.id)),O&&g.jsx(bm,{apps:Qn,onAppClick:B}),g.jsxs("div",{className:"taskbar",children:[g.jsxs("button",{className:"start-btn",onClick:N=>{N.stopPropagation(),y(!O)},children:[g.jsx(Vh,{size:20}),g.jsx("span",{children:"Start"})]}),g.jsx("div",{className:"taskbar-icons",children:T.map(N=>g.jsx("div",{className:`taskbar-icon ${U===N.id?"active":""}`,onClick:()=>{N.minimized||U!==N.id?D(N.id):K(N.id)},title:N.title,children:(()=>{const R=Qn.find(ul=>ul.id===N.app)?.icon;return R?g.jsx(R,{size:22}):null})()},N.id))}),g.jsxs("div",{className:"system-tray",children:[al&&g.jsx("div",{className:"tray-icon",title:"Session Active",style:{color:"#10b981"},children:g.jsx(jd,{size:18})}),g.jsx("div",{className:"tray-icon",title:"Network Connected",children:g.jsx(cm,{size:18})}),g.jsx("div",{className:"tray-icon",title:"Power",children:g.jsx(Nd,{size:18})}),g.jsx("div",{className:"clock",children:x.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})]})}function zm(){return g.jsx(yh,{children:g.jsx(pm,{})})}dh.createRoot(document.getElementById("root")).render(g.jsx(I.StrictMode,{children:g.jsx(zm,{})})); diff --git a/mission-control/dist/index.html b/mission-control/dist/index.html new file mode 100644 index 0000000..00160a4 --- /dev/null +++ b/mission-control/dist/index.html @@ -0,0 +1,14 @@ + + + + + + + aether-os + + + + +
+ + diff --git a/mission-control/dist/vite.svg b/mission-control/dist/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/mission-control/dist/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mission-control/src/App.css b/mission-control/src/App.css new file mode 100644 index 0000000..76e0e31 --- /dev/null +++ b/mission-control/src/App.css @@ -0,0 +1,290 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; + overflow: hidden; + background: #0a0a0f; + color: #e0e0ff; +} + +#root { + width: 100vw; + height: 100vh; +} + +.desktop { + width: 100%; + height: 100%; + background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%); + position: relative; + overflow: hidden; +} + +.desktop::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: + radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%), + radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%); + pointer-events: none; +} + +.window { + position: absolute; + background: rgba(20, 20, 35, 0.95); + border: 1px solid rgba(99, 102, 241, 0.3); + border-radius: 12px; + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); + backdrop-filter: blur(20px); + min-width: 400px; + min-height: 300px; + overflow: hidden; +} + +.window-header { + background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2)); + padding: 12px 16px; + display: flex; + align-items: center; + justify-content: space-between; + cursor: move; + border-bottom: 1px solid rgba(99, 102, 241, 0.2); +} + +.window-title { + display: flex; + align-items: center; + gap: 8px; + font-weight: 600; + font-size: 14px; + color: #e0e0ff; +} + +.window-controls { + display: flex; + gap: 8px; +} + +.window-btn { + width: 12px; + height: 12px; + border-radius: 50%; + border: none; + cursor: pointer; + transition: all 0.2s; +} + +.window-btn:hover { + transform: scale(1.2); +} + +.window-btn.close { background: #ef4444; } +.window-btn.minimize { background: #f59e0b; } +.window-btn.maximize { background: #10b981; } + +.window-content { + padding: 20px; + height: calc(100% - 48px); + overflow: auto; +} + +.taskbar { + position: fixed; + bottom: 0; + left: 0; + right: 0; + height: 48px; + background: rgba(10, 10, 20, 0.95); + border-top: 1px solid rgba(99, 102, 241, 0.2); + display: flex; + align-items: center; + padding: 0 16px; + gap: 12px; + backdrop-filter: blur(20px); + z-index: 1000; +} + +.start-btn { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 16px; + background: linear-gradient(135deg, #6366f1, #8b5cf6); + border: none; + border-radius: 8px; + color: white; + font-weight: 600; + cursor: pointer; + transition: all 0.2s; +} + +.start-btn:hover { + transform: translateY(-2px); + box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4); +} + +.taskbar-icons { + display: flex; + gap: 8px; + flex: 1; +} + +.taskbar-icon { + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 8px; + cursor: pointer; + transition: all 0.2s; + color: #a0a0c0; +} + +.taskbar-icon:hover, +.taskbar-icon.active { + background: rgba(99, 102, 241, 0.2); + color: #6366f1; +} + +.system-tray { + display: flex; + align-items: center; + gap: 12px; + padding: 0 12px; + border-left: 1px solid rgba(99, 102, 241, 0.2); +} + +.tray-icon { + width: 20px; + height: 20px; + color: #a0a0c0; + cursor: pointer; +} + +.tray-icon:hover { + color: #6366f1; +} + +.clock { + font-size: 13px; + font-weight: 500; + color: #e0e0ff; + min-width: 60px; + text-align: center; +} + +.start-menu { + position: fixed; + bottom: 60px; + left: 16px; + width: 320px; + background: rgba(15, 15, 30, 0.98); + border: 1px solid rgba(99, 102, 241, 0.3); + border-radius: 16px; + padding: 20px; + box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); + backdrop-filter: blur(20px); + z-index: 999; +} + +.start-menu h3 { + font-size: 12px; + text-transform: uppercase; + letter-spacing: 1px; + color: #6366f1; + margin-bottom: 12px; + padding-bottom: 8px; + border-bottom: 1px solid rgba(99, 102, 241, 0.2); +} + +.menu-items { + display: flex; + flex-direction: column; + gap: 4px; +} + +.menu-item { + display: flex; + align-items: center; + gap: 12px; + padding: 12px; + border-radius: 8px; + cursor: pointer; + transition: all 0.2s; + color: #e0e0ff; +} + +.menu-item:hover { + background: rgba(99, 102, 241, 0.15); +} + +.menu-item svg { + color: #6366f1; +} + +.desktop-icons { + position: absolute; + top: 20px; + left: 20px; + display: flex; + flex-direction: column; + gap: 20px; +} + +.desktop-icon { + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + width: 80px; + padding: 12px; + border-radius: 12px; + cursor: pointer; + transition: all 0.2s; + color: #e0e0ff; +} + +.desktop-icon:hover { + background: rgba(99, 102, 241, 0.15); +} + +.desktop-icon svg { + width: 40px; + height: 40px; + color: #6366f1; +} + +.desktop-icon span { + font-size: 12px; + text-align: center; + text-shadow: 0 1px 2px rgba(0,0,0,0.5); +} + +/* Scrollbar styling */ +::-webkit-scrollbar { + width: 8px; + height: 8px; +} + +::-webkit-scrollbar-track { + background: rgba(0,0,0,0.2); + border-radius: 4px; +} + +::-webkit-scrollbar-thumb { + background: rgba(99, 102, 241, 0.5); + border-radius: 4px; +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(99, 102, 241, 0.7); +} diff --git a/mission-control/src/App.jsx b/mission-control/src/App.jsx new file mode 100644 index 0000000..d222896 --- /dev/null +++ b/mission-control/src/App.jsx @@ -0,0 +1,14 @@ +import { useState, useEffect } from 'react' +import './App.css' +import Desktop from './components/Desktop' +import { AppProvider } from './context/AppContext' + +function App() { + return ( + + + + ) +} + +export default App diff --git a/mission-control/src/apps/ClawHub.jsx b/mission-control/src/apps/ClawHub.jsx new file mode 100644 index 0000000..f2716f8 --- /dev/null +++ b/mission-control/src/apps/ClawHub.jsx @@ -0,0 +1,76 @@ +import { useState } from 'react' +import { Download, Star, GitBranch, Shield, Terminal, Database, Globe } from 'lucide-react' + +const SKILLS = [ + { id: 1, name: 'OpenClaw Core', description: 'Multi-channel AI gateway', version: '2.1.0', icon: Globe, installed: true, rating: 5 }, + { id: 2, name: 'Session Manager', description: 'Advanced session tracking', version: '1.4.2', icon: Terminal, installed: true, rating: 4 }, + { id: 3, name: 'Vaultwarden Sync', description: 'Credential management', version: '1.32.0', icon: Shield, installed: false, rating: 5 }, + { id: 4, name: 'Git Integration', description: 'Git operations bridge', version: '3.0.1', icon: GitBranch, installed: false, rating: 4 }, + { id: 5, name: 'ChromaDB Memory', description: 'Vector database', version: '0.5.0', icon: Database, installed: false, rating: 4 } +] + +const CATEGORIES = ['All', 'Core', 'Security', 'Development', 'Memory'] + +function ClawHub() { + const [activeCategory, setActiveCategory] = useState('All') + const [searchQuery, setSearchQuery] = useState('') + + const filteredSkills = SKILLS.filter(skill => { + const matchesCategory = activeCategory === 'All' || skill.category === activeCategory + const matchesSearch = skill.name.toLowerCase().includes(searchQuery.toLowerCase()) + return matchesCategory && matchesSearch + }) + + return ( +
+
+

ClawHub Marketplace

+ setSearchQuery(e.target.value)} + style={{ padding: '10px 16px', background: 'rgba(255,255,255,0.05)', border: '1px solid rgba(99, 102, 241, 0.2)', borderRadius: '8px', color: 'inherit', fontSize: '14px', width: '250px' }} + /> +
+ +
+ {CATEGORIES.map(cat => ( + + ))} +
+ +
+ {filteredSkills.map(skill => { + const Icon = skill.icon + return ( +
+
+
+ +
+ {skill.installed && Installed} +
+ +

{skill.name}

+

{skill.description}

+ + +
+ ) + })} +
+
+ ) +} + +export default ClawHub diff --git a/mission-control/src/apps/EOF b/mission-control/src/apps/EOF new file mode 100644 index 0000000..e69de29 diff --git a/mission-control/src/apps/Kanban.jsx b/mission-control/src/apps/Kanban.jsx new file mode 100644 index 0000000..c5fe5cd --- /dev/null +++ b/mission-control/src/apps/Kanban.jsx @@ -0,0 +1,66 @@ +import { useState } from 'react' +import { Plus, MoreHorizontal, Clock, CheckCircle2, Circle, AlertCircle } from 'lucide-react' + +const INITIAL_COLUMNS = [ + { id: 'backlog', title: 'Backlog', color: '#6366f1', tasks: [ + { id: 1, title: 'Deploy Vaultwarden', priority: 'high', assignee: 'Aether', status: 'done' } + ]}, + { id: 'todo', title: 'To Do', color: '#8b5cf6', tasks: [ + { id: 3, title: 'Complete AetherOS dashboard', priority: 'high', assignee: 'Engineer', status: 'todo' } + ]}, + { id: 'in-progress', title: 'In Progress', color: '#f59e0b', tasks: [ + { id: 5, title: 'Build Session Tracker', priority: 'high', assignee: 'Engineer', status: 'in-progress' } + ]}, + { id: 'done', title: 'Done', color: '#10b981', tasks: [ + { id: 6, title: 'Install Docker', priority: 'high', assignee: 'Aether', status: 'done' } + ]} +] + +function Kanban() { + const [columns] = useState(INITIAL_COLUMNS) + + return ( +
+
+

Collective Kanban

+
+ +
+ {columns.map(column => ( +
+
+
+
+ {column.title} + + {column.tasks.length} + +
+ +
+ +
+ {column.tasks.map(task => ( +
+

{task.title}

+
+
+ {task.assignee.charAt(0)} +
+
+
+ ))} + + +
+
+ ))} +
+
+ ) +} + +export default Kanban diff --git a/mission-control/src/apps/SessionTracker.jsx b/mission-control/src/apps/SessionTracker.jsx new file mode 100644 index 0000000..1a860bc --- /dev/null +++ b/mission-control/src/apps/SessionTracker.jsx @@ -0,0 +1,86 @@ +import { useState, useEffect } from 'react' +import { Play, Square, Coffee, Clock, Calendar } from 'lucide-react' + +function SessionTracker() { + const [sessionActive, setSessionActive] = useState(false) + const [elapsed, setElapsed] = useState(0) + const [sessionStartTime, setSessionStartTime] = useState(null) + const [sessions] = useState([ + { id: 1, date: '2026-02-23', duration: 45, tasks: 3 }, + { id: 2, date: '2026-02-23', duration: 30, tasks: 2 } + ]) + + useEffect(() => { + let interval + if (sessionActive) { + interval = setInterval(() => setElapsed(e => e + 1), 1000) + } + return () => clearInterval(interval) + }, [sessionActive]) + + const formatTime = (seconds) => { + const hrs = Math.floor(seconds / 3600) + const mins = Math.floor((seconds % 3600) / 60) + const secs = seconds % 60 + return `${hrs.toString().padStart(2, '0')}:${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}` + } + + return ( +
+
+

Session Tracker

+
+ +
+
+ {formatTime(elapsed)} +
+ +
+ {!sessionActive ? ( + + ) : ( + <> + + + + )} +
+
+ +
+

Recent Sessions

+
+ {sessions.map(session => ( +
+
+
+ +
+
+
Work Session
+
{session.date}
+
+
+
+
Duration
+
{session.duration} min
+
+
+ ))} +
+
+
+ ) +} + +export default SessionTracker diff --git a/mission-control/src/apps/Wiki.jsx b/mission-control/src/apps/Wiki.jsx new file mode 100644 index 0000000..f9a1ff5 --- /dev/null +++ b/mission-control/src/apps/Wiki.jsx @@ -0,0 +1,104 @@ +import { useState } from 'react' +import { FileText, Folder, Search, ExternalLink } from 'lucide-react' + +const WIKI_PAGES = [ + { + id: 'overview', + title: 'System Overview', + content: `Aether System Overview + +Identity +Name: Aether +Role: Autonomous Orchestrator +Initialized: 2026-02-23 + +Core Directive +Transform high-level visions into production-ready software. + +Infrastructure +- Gitea: http://192.168.5.35:3000 +- Vaultwarden: http://localhost:8080 +- AetherOS: http://localhost:3001 + +The Collective +- Architect: Project scoping +- Researcher: Documentation +- Engineer: Implementation +- QA Auditor: Testing +- Publisher: GitHub releases` + }, + { + id: 'architecture', + title: 'Architecture', + content: `Aether Architecture + +Component Flow +User Input -> Aether Orchestrator -> Sub-agents -> Output + +Data Flow +1. Planning: Architect scopes project +2. Implementation: Engineer writes code +3. Release: Publisher promotes to GitHub + +Memory Architecture +- Short-term: Session context +- Long-term: /aether_core/memory/` + }, + { + id: 'security', + title: 'Security Policy', + content: `Security Policy + +Credential Management +All credentials stored in Vaultwarden: +- SSH private keys +- API tokens +- Service passwords + +Access Control +- SSH key authentication only +- No password authentication + +Key Rotation +- SSH Keys: 90 days +- API Tokens: 60 days` + } +] + +function Wiki() { + const [activePage, setActivePage] = useState('overview') + + const activeContent = WIKI_PAGES.find(p => p.id === activePage)?.content || '' + + return ( +
+
+
+
+ + +
+
+ +
+ {WIKI_PAGES.map(page => ( + + ))} +
+
+ +
+ {activeContent} +
+ + Last updated: 2026-02-23 by Aether +
+
+
+ ) +} + +export default Wiki diff --git a/mission-control/src/apps/fix_jsx.py b/mission-control/src/apps/fix_jsx.py new file mode 100644 index 0000000..9c5aa59 --- /dev/null +++ b/mission-control/src/apps/fix_jsx.py @@ -0,0 +1,37 @@ +import re +import os + +def fix_jsx_file(filepath): + with open(filepath, 'r') as f: + content = f.read() + + lines = content.split('\n') + fixed_lines = [] + + for line in lines: + # If line contains '}\u003e' and 'style={{' + if '}\u003e' in line and 'style={{' in line: + # Count braces before the }\u003e + open_count = line.count('{') + close_count = line.count('}') + + # If unbalanced, fix it + if open_count > close_count: + # Replace only the last occurrence of }\u003e + line = line.rsplit('}\u003e', 1)[0] + '}}\u003e' + + fixed_lines.append(line) + + fixed_content = '\n'.join(fixed_lines) + + with open(filepath, 'w') as f: + f.write(fixed_content) + + print(f"Fixed: {filepath}") + +# Fix all JSX files +for filename in os.listdir('.'): + if filename.endswith('.jsx'): + fix_jsx_file(filename) + +print("Done!") diff --git a/mission-control/src/assets/react.svg b/mission-control/src/assets/react.svg new file mode 100644 index 0000000..6c87de9 --- /dev/null +++ b/mission-control/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mission-control/src/components/Desktop.jsx b/mission-control/src/components/Desktop.jsx new file mode 100644 index 0000000..9e2a323 --- /dev/null +++ b/mission-control/src/components/Desktop.jsx @@ -0,0 +1,164 @@ +import { useState, useEffect } from 'react' +import { useApp } from '../context/AppContext' +import Window from './Window' +import StartMenu from './StartMenu' +import { + Menu, + LayoutGrid, + ShoppingBag, + Clock, + BookOpen, + Wifi, + Shield, + Power +} from 'lucide-react' + +const APPS = [ + { + id: 'kanban', + title: 'Collective Kanban', + icon: LayoutGrid, + defaultWidth: 900, + defaultHeight: 600 + }, + { + id: 'clawhub', + title: 'ClawHub Marketplace', + icon: ShoppingBag, + defaultWidth: 1000, + defaultHeight: 700 + }, + { + id: 'session', + title: 'Session Tracker', + icon: Clock, + defaultWidth: 500, + defaultHeight: 400 + }, + { + id: 'wiki', + title: 'Agent Wiki', + icon: BookOpen, + defaultWidth: 800, + defaultHeight: 600 + } +] + +function Desktop() { + const { + windows, + activeWindow, + startMenuOpen, + setStartMenuOpen, + openWindow, + restoreWindow, + focusWindow, + sessionActive + } = useApp() + + const [currentTime, setCurrentTime] = useState(new Date()) + + useEffect(() => { + const timer = setInterval(() => setCurrentTime(new Date()), 1000) + return () => clearInterval(timer) + }, []) + + return ( +
setStartMenuOpen(false)}> + {/* Desktop Icons */} +
e.stopPropagation()}> + {APPS.map(app => ( +
openWindow(app)} + > + + {app.title} +
+ ))} +
+ + {/* Windows */} + {windows.map(window => ( + !window.minimized && ( + a.id === window.app)} + /> + ) + ))} + + {/* Start Menu */} + {startMenuOpen && ( + + )} + + {/* Taskbar */} +
+ + +
+ {windows.map(window => ( +
{ + if (window.minimized || activeWindow !== window.id) { + restoreWindow(window.id) + } else { + focusWindow(window.id) + } + }} + title={window.title} + > + {(() => { + const Icon = APPS.find(a => a.id === window.app)?.icon + return Icon ? : null + })()} +
+ ))} +
+ +
+ {sessionActive && ( +
+ +
+ )} +
+ +
+ +
+ +
+ +
+ {currentTime.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })} +
+
+
+
+ ) +} + +export default Desktop diff --git a/mission-control/src/components/StartMenu.jsx b/mission-control/src/components/StartMenu.jsx new file mode 100644 index 0000000..e6c9836 --- /dev/null +++ b/mission-control/src/components/StartMenu.jsx @@ -0,0 +1,35 @@ +import { LayoutGrid, ShoppingBag, Clock, BookOpen, Settings, Power } from 'lucide-react' + +function StartMenu({ apps, onAppClick }) { + return ( +
e.stopPropagation()}> +

Applications

+
+ {apps.map(app => ( +
onAppClick(app)} + > + + {app.title} +
+ ))} +
+ +

System

+
+
+ + Settings +
+
+ + Shutdown +
+
+
+ ) +} + +export default StartMenu diff --git a/mission-control/src/components/Window.jsx b/mission-control/src/components/Window.jsx new file mode 100644 index 0000000..6fcbf6a --- /dev/null +++ b/mission-control/src/components/Window.jsx @@ -0,0 +1,114 @@ +import { useRef, useEffect, useState } from 'react' +import { useApp } from '../context/AppContext' +import Kanban from '../apps/Kanban' +import ClawHub from '../apps/ClawHub' +import SessionTracker from '../apps/SessionTracker' +import Wiki from '../apps/Wiki' +import { X, Minus, Square } from 'lucide-react' + +const APP_COMPONENTS = { + kanban: Kanban, + clawhub: ClawHub, + session: SessionTracker, + wiki: Wiki +} + +function Window({ window, isActive, app }) { + const { + closeWindow, + minimizeWindow, + focusWindow, + updateWindowPosition + } = useApp() + + const [isDragging, setIsDragging] = useState(false) + const [dragOffset, setDragOffset] = useState({ x: 0, y: 0 }) + const windowRef = useRef(null) + + const handleMouseDown = (e) => { + if (e.target.closest('.window-controls')) return + focusWindow(window.id) + setIsDragging(true) + const rect = windowRef.current.getBoundingClientRect() + setDragOffset({ + x: e.clientX - rect.left, + y: e.clientY - rect.top + }) + } + + useEffect(() => { + const handleMouseMove = (e) => { + if (!isDragging) return + const newX = e.clientX - dragOffset.x + const newY = e.clientY - dragOffset.y + updateWindowPosition(window.id, newX, newY) + } + + const handleMouseUp = () => { + setIsDragging(false) + } + + if (isDragging) { + document.addEventListener('mousemove', handleMouseMove) + document.addEventListener('mouseup', handleMouseUp) + } + + return () => { + document.removeEventListener('mousemove', handleMouseMove) + document.removeEventListener('mouseup', handleMouseUp) + } + }, [isDragging, dragOffset, window.id, updateWindowPosition]) + + const AppComponent = APP_COMPONENTS[window.app] + const Icon = app?.icon + + return ( +
focusWindow(window.id)} + > +
+
+ {Icon && } + {window.title} +
+
+ +
+
+ +
+ {AppComponent && } +
+
+ ) +} + +export default Window diff --git a/mission-control/src/context/AppContext.jsx b/mission-control/src/context/AppContext.jsx new file mode 100644 index 0000000..f91124d --- /dev/null +++ b/mission-control/src/context/AppContext.jsx @@ -0,0 +1,99 @@ +import { createContext, useContext, useState, useCallback } from 'react' + +const AppContext = createContext() + +export function AppProvider({ children }) { + const [windows, setWindows] = useState([]) + const [activeWindow, setActiveWindow] = useState(null) + const [startMenuOpen, setStartMenuOpen] = useState(false) + const [sessionActive, setSessionActive] = useState(false) + const [sessionStartTime, setSessionStartTime] = useState(null) + + const openWindow = useCallback((app) => { + const id = Date.now() + const newWindow = { + id, + app: app.id, + title: app.title, + icon: app.icon, + x: 100 + (windows.length * 30), + y: 50 + (windows.length * 30), + width: app.defaultWidth || 800, + height: app.defaultHeight || 600, + minimized: false, + maximized: false + } + setWindows(prev => [...prev, newWindow]) + setActiveWindow(id) + setStartMenuOpen(false) + }, [windows.length]) + + const closeWindow = useCallback((id) => { + setWindows(prev => prev.filter(w => w.id !== id)) + if (activeWindow === id) { + setActiveWindow(null) + } + }, [activeWindow]) + + const minimizeWindow = useCallback((id) => { + setWindows(prev => prev.map(w => + w.id === id ? { ...w, minimized: true } : w + )) + setActiveWindow(null) + }, []) + + const restoreWindow = useCallback((id) => { + setWindows(prev => prev.map(w => + w.id === id ? { ...w, minimized: false } : w + )) + setActiveWindow(id) + }, []) + + const focusWindow = useCallback((id) => { + setActiveWindow(id) + setWindows(prev => prev.map(w => + w.id === id ? { ...w, minimized: false } : w + )) + }, []) + + const updateWindowPosition = useCallback((id, x, y) => { + setWindows(prev => prev.map(w => + w.id === id ? { ...w, x, y } : w + )) + }, []) + + const startSession = useCallback(() => { + setSessionActive(true) + setSessionStartTime(new Date()) + }, []) + + const endSession = useCallback(() => { + setSessionActive(false) + setSessionStartTime(null) + }, []) + + return ( + + {children} + + ) +} + +export function useApp() { + return useContext(AppContext) +} diff --git a/mission-control/src/index.css b/mission-control/src/index.css new file mode 100644 index 0000000..08a3ac9 --- /dev/null +++ b/mission-control/src/index.css @@ -0,0 +1,68 @@ +:root { + font-family: system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/mission-control/src/main.jsx b/mission-control/src/main.jsx new file mode 100644 index 0000000..b9a1a6d --- /dev/null +++ b/mission-control/src/main.jsx @@ -0,0 +1,10 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import './index.css' +import App from './App.jsx' + +createRoot(document.getElementById('root')).render( + + + , +)