@tushar-br/desktop 1.0.247 → 1.0.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @tushar-br/desktop might be problematic. Click here for more details.
- package/package.json +1 -1
- package/staging_area/desktop/resume web/dist/assets/KaliLinux-B8gJf7kt.js +26 -0
- package/staging_area/desktop/resume web/dist/assets/MobileViewSimulator-aeGEZ5cs.js +5 -0
- package/staging_area/desktop/resume web/dist/assets/SecretNotes-oMDnic6h.js +16 -0
- package/staging_area/desktop/resume web/dist/assets/images/1769177455986_screenshot_2026_01_23_194039.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/1770625084592_screenshot_2026_02_09_134633.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/1770625157233_screenshot_2026_02_08_200105.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/1770625318954_screenshot_2026_02_09_135032.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/1771471211893_screenshot_2026_02_19_084940.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/1771471268955_screenshot_2026_02_19_085052.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/1771471360160_screenshot_2026_02_18_15_57_31_33_b783bf344239542886fee7b48fa4b892.jpg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/1771471388247_screenshot_2026_02_18_15_57_31_33_b783bf344239542886fee7b48fa4b892.jpg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/1771471567331_screenshot_2026_02_19_085459.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/Tushar/tushar (1).jpeg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/Tushar/tushar (2).jpeg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/Tushar/tushar (3).jpeg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/Tushar/tushar (4).jpeg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/Tushar/tushar (5).jpeg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/Tushar/tushar (6).jpeg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/Tushar/tushar (7).jpeg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/Tushar/tushar (8).jpeg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/apk-laptop-wp.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/apk-mobile-wp.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/avatar.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/blog-1.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/cover-tusharbr.jpg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/cursor.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/cursor.svg +3 -0
- package/staging_area/desktop/resume web/dist/assets/images/cyber-bg-smooth.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/features/desktop_file_explorer.jpg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/features/desktop_home.jpg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/features/desktop_os.jpg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/features/mobile_home.jpg +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/global-bg-v2.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/global-bg-v3.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/global-bg-v4.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/global-bg-v5.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/global-bg.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/1.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/10.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/11.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/12.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/13.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/14.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/15.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/16.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/2.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/3.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/4.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/5.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/6.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/7.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/8.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/grid/9.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/home-avatar.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/kali-icon.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/kali-logo.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/logo--.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/logo-icon.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/logo.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/logo.svg +23 -0
- package/staging_area/desktop/resume web/dist/assets/images/og-image.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/portfolio-bg-new.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/profilecard cover video.mp4 +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/project-1.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/project-2.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/promo-banner.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/resume-preview.svg +65 -0
- package/staging_area/desktop/resume web/dist/assets/images/simulator-bg.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/site-bg.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/smooth-bg.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/social-card.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/status-v1.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/status-v2.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/status-v3.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/timeline-code.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/timeline-edu.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/images/timeline-exp.png +0 -0
- package/staging_area/desktop/resume web/dist/assets/index-CBjHCN3v.css +1 -0
- package/staging_area/desktop/resume web/dist/assets/index-CRxB_GjQ.js +1 -0
- package/staging_area/desktop/resume web/dist/assets/js/script.js +184 -0
- package/staging_area/desktop/resume web/dist/assets/main-CgEgbzKB.css +1 -0
- package/staging_area/desktop/resume web/dist/assets/main-DoBlDLsb.js +366 -0
- package/staging_area/desktop/resume web/dist/assets/os-B_E4AY-V.css +1 -0
- package/staging_area/desktop/resume web/dist/assets/os-Bq4xD0id.js +46 -0
- package/staging_area/desktop/resume web/dist/assets/pdf-CxPl5vKc.js +211 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615435561_DSA_Handwritten_Notes_Zero_to_Hero.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615436069_linux-commands-handbook.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615436290_pamphlet__2_.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615451043_StudentLIST_SEM-3.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615458398_CLASS_COORDINATOR_W24-1-3-5-Revised.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615467705_LECP-IT-W24_3RD_SEMESTER_TENTATIVE_TIMETABLE.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615471212_MID-1time_table.jpg +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615493204_DS_unit1_by_PKChavda.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615493535_DS_unit2_OOP_by_PKC.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615493622_DS_unit3_by_pkc.pptx +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615519049_PRECTICAL-1.py +0 -92
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615519206_PRECTICAL-2.py +0 -17
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615519288_PRECTICAL-3.py +0 -36
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615519394_PRECTICAL-4.py +0 -4
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615519461_PRECTICAL-5.py +0 -7
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615519540_PRECTICAL-6.py +0 -6
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615542912_practical-1_-_9.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615543303_practical-14-18.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615543419_Data_Structure_with_Python___LAB_MANUAL_.pdf +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615547902_unit5_pk_chavda.pptx +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615562404_microproject-dswp.docx +0 -0
- package/staging_area/desktop/resume web/dist/assets/explorer/thispc/1771615598223_DM_GTU_Study_Material_e-Notes_Unit-3.pdf +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.os-context-menu{background:#0a0a0fbf;-webkit-backdrop-filter:blur(25px) saturate(200%);backdrop-filter:blur(25px) saturate(200%);border:1px solid rgba(0,229,255,.3);border-radius:4px;padding:4px 0;min-width:220px;box-shadow:0 20px 50px #000000e6,0 0 30px #00e5ff1a;animation:menuFadeIn .2s cubic-bezier(.2,.8,.2,1);color:#fff;font-family:Barlow,sans-serif;-webkit-user-select:none;user-select:none;clip-path:polygon(0 0,100% 0,100% 92%,92% 100%,0 100%)}@keyframes menuFadeIn{0%{opacity:0;transform:scale(.95) translateY(-5px)}to{opacity:1;transform:scale(1) translateY(0)}}.menu-item{padding:10px 16px;display:flex;align-items:center;gap:12px;font-size:.88rem;cursor:pointer;position:relative;transition:all .2s}.menu-item:hover{background:linear-gradient(90deg,rgba(0,229,255,.2) 0%,transparent 100%);color:#00e5ff;padding-left:20px}.menu-item.danger:hover{background:#ff444426;color:#f44}.menu-icon{font-size:1rem;width:18px;display:flex;justify-content:center}.menu-label{flex:1}.menu-shortcut{font-size:.75rem;color:#666;margin-left:10px}.menu-separator{height:1px;background:#ffffff14;margin:4px 0}.submenu-arrow{font-size:.7rem;opacity:.5}.submenu{position:absolute;top:-6px;left:100%;background:#0f0f14e6;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);border:1px solid rgba(0,229,255,.2);border-radius:8px;padding:6px 0;min-width:180px;box-shadow:0 5px 20px #0006;display:none}.menu-item.has-submenu:hover>.submenu{display:block}.menu-item.has-submenu:after{content:"";position:absolute;right:-10px;top:0;bottom:0;width:10px}:root{--os-primary: #00e5ff;--os-accent: #7c4dff;--os-bg: #0a0a12;--os-glass: rgba(10, 10, 20, .7);--os-border: rgba(0, 229, 255, .15);--os-glow: rgba(0, 229, 255, .3);--text-hack: #00ff88}.os-container{width:100vw;height:100vh;background:var(--os-bg);color:#fff;overflow:hidden;position:relative;font-family:Barlow,sans-serif;-webkit-user-select:none;user-select:none}.modern-loader{position:relative;width:100px;height:100px;filter:drop-shadow(0 0 10px rgba(0,229,255,.5))}.loader-inner-glow{position:absolute;inset:20%;background:radial-gradient(circle,rgba(0,229,255,.1) 0%,transparent 70%);animation:pulseGlow 2s infinite ease-in-out}@keyframes pulseGlow{0%,to{transform:scale(.8);opacity:.3}50%{transform:scale(1.2);opacity:.8}}.boot-screen{position:fixed;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--os-primary);background:transparent;z-index:1000}.boot-text{font-size:1.2rem;font-weight:800;margin-bottom:25px;letter-spacing:5px;text-shadow:0 0 15px var(--os-glow);font-family:Outfit,sans-serif}.boot-logs-container{width:500px;max-height:250px;background:#0006;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(0,229,255,.1);padding:15px;border-radius:8px;font-family:JetBrains Mono,Courier New,monospace;font-size:.7rem;overflow:hidden;margin-bottom:30px;display:flex;flex-direction:column;gap:4px;box-shadow:0 0 40px #00000080}.boot-log-line{color:#00e5ffcc;white-space:nowrap;animation:logFadeIn .1s ease-out forwards}@keyframes logFadeIn{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.loading-bar-container{width:300px;height:4px;background:#ffffff1a;border-radius:2px;overflow:hidden;position:relative}.loading-bar-fill{height:100%;background:#00e5ff;width:0%;transition:width .1s linear;box-shadow:0 0 10px #00e5ff}.hacker-bg{position:absolute;inset:0;background:transparent;overflow:hidden;z-index:1}.os-video-bg{position:fixed;inset:0;width:100vw;height:100vh;object-fit:cover;z-index:0}.hacker-text-scroller{font-family:Courier New,Courier,monospace;font-size:10px;color:var(--text-hack);opacity:.12;white-space:pre;line-height:1.2;animation:scroll-up 20s linear infinite;pointer-events:none;padding:20px}@keyframes scroll-up{0%{transform:translateY(0)}to{transform:translateY(-30%)}}.lock-screen{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:transparent;animation:fadeIn .8s ease;z-index:1000}.lock-box{background:transparent;border:none;box-shadow:none;padding:20px;display:flex;flex-direction:column;align-items:center;width:440px;min-height:400px;z-index:2;transition:all .5s cubic-bezier(.19,1,.22,1);transform:translate(-420px)}.profile-img{width:110px;height:110px;border-radius:50%;border:2px solid var(--os-primary);margin-bottom:20px;box-shadow:0 0 30px #00e5ff33}.username{font-size:1.5rem;font-weight:500;margin-bottom:30px;letter-spacing:2px}.password-input{background:#ffffffd9;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.3);color:#000;padding:18px 36px;border-radius:100px;font-size:1.1rem;text-align:left;width:100%;letter-spacing:3px;outline:none;transition:all .3s cubic-bezier(.19,1,.22,1);box-shadow:0 20px 50px #0006;font-weight:600}.password-input::placeholder{color:#0006}.password-input:focus{border-color:var(--os-primary);box-shadow:0 0 40px #00e5ff4d;background:#fff;transform:translateY(-2px)}.decryption-connector{position:absolute;left:40px;top:100%;width:2px;height:30px;background:linear-gradient(to bottom,var(--os-primary),transparent);z-index:5}.decryption-terminal{margin-top:30px;background:#00050ad9;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);border:1px solid rgba(0,229,255,.2);border-radius:12px;overflow:hidden;font-family:JetBrains Mono,monospace;box-shadow:0 15px 40px #000c;width:100%}.decryption-terminal.mini{width:280px;background:#000000b3;border:1px solid rgba(0,229,255,.15);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.decryption-terminal.mini .terminal-content{padding:8px 12px}.decryption-terminal.mini .terminal-log{font-size:.55rem;opacity:.4}.decryption-terminal.mini .terminal-typing-line{font-size:.6rem;color:var(--os-primary);font-weight:700;margin-top:5px;border-top:1px solid rgba(255,255,255,.05)}.terminal-header{background:#00e5ff1a;padding:6px 15px;font-size:.6rem;color:var(--os-primary);letter-spacing:2px;border-bottom:1px solid rgba(0,229,255,.1)}.terminal-content{padding:12px 15px;display:flex;flex-direction:column;gap:4px}.terminal-log{font-size:.65rem;color:#00e5ff;opacity:.6;white-space:nowrap}.terminal-typing-line{font-size:.65rem;color:#fff;margin-top:4px;border-top:1px solid rgba(255,255,255,.05);padding-top:4px}@media(max-width:600px){.lock-box{width:85%!important;padding:30px 20px!important}.profile-img{width:80px!important;height:80px!important}.username{font-size:1.2rem!important}.password-input{font-size:.9rem!important;padding:10px!important}}.window-frame{position:absolute;background:var(--os-glass);-webkit-backdrop-filter:blur(45px) saturate(210%);backdrop-filter:blur(45px) saturate(210%);border:1px solid var(--os-border);border-radius:12px;box-shadow:0 15px 50px #000c,inset 0 0 10px #ffffff05;display:flex;flex-direction:column;overflow:hidden;color:#fff;transition:transform .2s cubic-bezier(.175,.885,.32,1.275),opacity .2s}.window-header{height:36px;background:#ffffff0d;display:flex;align-items:center;justify-content:space-between;padding:0 12px;cursor:grab;-webkit-user-select:none;user-select:none}.window-header:active{cursor:grabbing}.window-title{font-size:.85rem;font-weight:500;letter-spacing:1px;color:#ffffffb3}.window-controls{display:flex;gap:8px}.win-btn{width:12px;height:12px;border-radius:50%;border:none;cursor:pointer;transition:opacity .2s}.win-btn:hover{opacity:.8}.win-close{background:#ff5f56}.win-min{background:#ffbd2e}.win-max{background:#27c93f}.window-content{flex:1;overflow:auto;position:relative;padding:0}.taskbar{position:absolute;bottom:0;left:0;width:100%;height:60px;background:transparent;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);border-top:none;display:flex;align-items:center;justify-content:space-between;padding:0 24px;z-index:10000}.start-btn{width:38px;height:38px;background:transparent;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1)}.start-btn:hover{background:transparent;transform:translateY(-2px)}.taskbar-items{position:absolute;left:50%;transform:translate(-50%);display:flex;gap:6px;align-items:center}.taskbar-item{width:40px;height:40px;border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;background:none;font-size:1.3rem;position:relative}.taskbar-item:hover{background:transparent;transform:translateY(-2px)}.taskbar-item:after{content:"";position:absolute;bottom:3px;left:50%;transform:translate(-50%);width:0;height:3px;background:#00e5ff;border-radius:4px;transition:width .3s cubic-bezier(.175,.885,.32,1.275)}.taskbar-item.active:after{width:16px}.taskbar-item.minimized{filter:opacity(.6) grayscale(.5)}.taskbar-item:not(.active):not(.minimized):after{width:6px;background:#ffffff4d}.taskbar-right{display:flex;align-items:center;gap:15px;color:#fff9;font-size:.8rem;padding-right:10px}.desktop-icons-grid{position:absolute;top:20px;left:20px;bottom:80px;display:grid;grid-template-rows:repeat(auto-fill,100px);grid-auto-flow:column;gap:15px;pointer-events:none}.desktop-icon{width:80px;height:90px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;border-radius:8px;transition:background .2s;pointer-events:auto}.desktop-icon:hover{background:#ffffff14}.desktop-icon.selected{background:transparent;border:1px solid rgba(0,229,255,.4)}.desktop-icon.selected .icon-visual{filter:drop-shadow(0 0 10px rgba(0,229,255,.5))}.icon-visual{font-size:2.2rem;margin-bottom:5px}.start-menu{position:absolute;bottom:65px;left:15px;width:320px;background:#0a0a1499;-webkit-backdrop-filter:blur(30px) saturate(180%);backdrop-filter:blur(30px) saturate(180%);border:1px solid rgba(255,255,255,.1);border-radius:12px;box-shadow:0 20px 60px #000c;z-index:11000;overflow:hidden;animation:menuSlideUp .3s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column}@keyframes menuSlideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.start-menu-footer{padding:12px;background:#ffffff0d;display:flex;justify-content:space-between;align-items:center;border-top:1px solid rgba(255,255,255,.1)}.power-btn-hover:hover{background:#ffffff1a;border-radius:6px}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes shake{0%,to{transform:translate(0)}25%{transform:translate(-10px)}75%{transform:translate(10px)}}.mobile-status-bar{height:44px;width:100%;display:flex;justify-content:space-between;align-items:center;padding:0 24px;font-size:.85rem;font-weight:700;z-index:10001;background:transparent;text-shadow:0 0 10px rgba(0,0,0,.5)}.mobile-home-screen{flex:1;width:100%;padding:20px;display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:min-content;gap:25px 5px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;z-index:1}.mobile-home-screen::-webkit-scrollbar{display:none}.mobile-icon{display:flex;flex-direction:column;align-items:center;gap:12px;animation:fadeIn .5s ease}.mobile-icon .icon-visual{width:70px;height:70px;background:var(--os-glass);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border:1px solid var(--os-border);border-radius:18px;display:flex;align-items:center;justify-content:center;font-size:2.22rem;box-shadow:0 8px 25px #00000080;transition:transform .2s}.mobile-icon:active .icon-visual{transform:scale(.9)}.mobile-icon .icon-label{font-size:.85rem;font-weight:500;color:#eee}.mobile-dock{height:75px;width:90%;max-width:400px;margin:0 auto 20px;background:#ffffff14;-webkit-backdrop-filter:blur(50px) saturate(180%);backdrop-filter:blur(50px) saturate(180%);border-radius:35px;display:flex;justify-content:space-around;align-items:center;padding:0 15px;border:1px solid rgba(255,255,255,.1);box-shadow:0 10px 40px #00000080;z-index:2}.mobile-os-area{position:relative;overflow:hidden;height:100vh;width:100vw}.mobile-dock div{font-size:2rem;transition:transform .1s}.mobile-dock div:active{transform:scale(1.2)}.mobile-window-full{position:fixed!important;inset:0!important;width:100%!important;height:100%!important;z-index:10002!important;border-radius:0!important;border:none!important;background:var(--os-bg)!important}.mobile-back-btn{position:absolute;top:40px;left:20px;z-index:10003;background:var(--os-glass);border:1px solid var(--os-border);padding:8px 15px;border-radius:20px;color:var(--os-primary);font-size:.8rem;font-weight:700;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.slide-up{animation:slideUp .3s cubic-bezier(.25,1,.5,1)}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@media(max-width:599px){.desktop-area{display:none!important}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import{a8 as Ne,a9 as ke,C as De,aa as Me,ab as Ee,ac as Re,ad as Se,ae as je,af as Ce,ag as Fe,ah as Ae,ai as Pe,aj as ye,ak as Oe,w as We,q as Ie,al as Be,am as $e,an as ze,ao as Ue,ap as _e,aq as Ye,h as He}from"./index-CRxB_GjQ.js";import{b as i,j as e,R as we,m as fe,A as ue}from"./vendor-DTZZIXzC.js";import{h as Ve}from"./three-C2Wyq5d1.js";import{F as Xe}from"./ui-lsJM0os1.js";const Ge=({title:x,icon:n,active:s,zIndex:a,initialX:h,initialY:c,initialWidth:y,initialHeight:p,onClose:k,onMinimize:v,onFocus:z,children:C})=>{const[D,L]=i.useState({x:h,y:c}),[M,u]=i.useState({width:y,height:p}),[l,g]=i.useState(!1),[b,N]=i.useState(!1),[I,Q]=i.useState({x:0,y:0}),B=i.useRef(null),Z=w=>{if(z(),w.target.classList.contains("window-header")||w.target.classList.contains("window-title")){if(l)return;N(!0),Q({x:w.clientX-D.x,y:w.clientY-D.y})}};i.useEffect(()=>{const w=U=>{if(b){let F=U.clientX-I.x,H=U.clientY-I.y;H<10&&(H=0),F<10&&(F=0),window.innerWidth-(F+M.width)<10&&(F=window.innerWidth-M.width),L({x:F,y:H})}},P=()=>{N(!1)};return b&&(window.addEventListener("mousemove",w),window.addEventListener("mouseup",P)),()=>{window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",P)}},[b,I,M.width]);const te=()=>{g(!l)},A=(w,P)=>{w.preventDefault(),w.stopPropagation(),z();const U=M.width,F=M.height,H=w.clientX,G=w.clientY,re=D.x,oe=D.y,K=V=>{let O=U,se=F,q=re,_=oe;if(P.includes("e")&&(O=Math.max(400,U+(V.clientX-H))),P.includes("s")&&(se=Math.max(300,F+(V.clientY-G))),P.includes("w")){const J=V.clientX-H;O=Math.max(400,U-J),O>400&&(q=re+J)}if(P.includes("n")){const J=V.clientY-G;se=Math.max(300,F-J),se>300&&(_=oe+J)}u({width:O,height:se}),L({x:q,y:_})},ee=()=>{window.removeEventListener("mousemove",K),window.removeEventListener("mouseup",ee)};window.addEventListener("mousemove",K),window.addEventListener("mouseup",ee)},ie=l?{top:0,left:0,width:"100vw",height:"calc(100vh - 48px)",zIndex:a,borderRadius:0}:{top:D.y,left:D.x,width:M.width,height:M.height,zIndex:a};return e.jsxs("div",{ref:B,className:`window-frame ${s?"active-window":""}`,style:{...ie,transition:b?"none":"box-shadow 0.3s, transform 0.2s",clipPath:l?"none":"polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%)"},onMouseDown:z,children:[e.jsxs("div",{className:"window-header",onMouseDown:Z,onDoubleClick:te,children:[e.jsxs("div",{className:"window-title",style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsx("span",{className:"window-icon",style:{display:"flex",alignItems:"center",justifyContent:"center",transform:"scale(0.8)"},children:n}),x]}),e.jsxs("div",{className:"window-controls",children:[e.jsx("button",{className:"win-btn win-min",onClick:w=>{w.stopPropagation(),v()}}),e.jsx("button",{className:"win-btn win-max",onClick:w=>{w.stopPropagation(),te()}}),e.jsx("button",{className:"win-btn win-close",onClick:w=>{w.stopPropagation(),k()}})]})]}),e.jsx("div",{className:"window-content",children:C}),!l&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"resize-handle n",onMouseDown:w=>A(w,"n")}),e.jsx("div",{className:"resize-handle s",onMouseDown:w=>A(w,"s")}),e.jsx("div",{className:"resize-handle e",onMouseDown:w=>A(w,"e")}),e.jsx("div",{className:"resize-handle w",onMouseDown:w=>A(w,"w")}),e.jsx("div",{className:"resize-handle ne",onMouseDown:w=>A(w,"ne")}),e.jsx("div",{className:"resize-handle nw",onMouseDown:w=>A(w,"nw")}),e.jsx("div",{className:"resize-handle se",onMouseDown:w=>A(w,"se")}),e.jsx("div",{className:"resize-handle sw",onMouseDown:w=>A(w,"sw")})]}),e.jsx("style",{children:`
|
|
2
|
+
.resize-handle { position: absolute; background: transparent; z-index: 100; }
|
|
3
|
+
.resize-handle.n { top: -4px; left: 0; right: 0; height: 8px; cursor: n-resize; }
|
|
4
|
+
.resize-handle.s { bottom: -4px; left: 0; right: 0; height: 8px; cursor: s-resize; }
|
|
5
|
+
.resize-handle.e { top: 0; bottom: 0; right: -4px; width: 8px; cursor: e-resize; }
|
|
6
|
+
.resize-handle.w { top: 0; bottom: 0; left: -4px; width: 8px; cursor: w-resize; }
|
|
7
|
+
.resize-handle.ne { top: -4px; right: -4px; width: 12px; height: 12px; cursor: ne-resize; }
|
|
8
|
+
.resize-handle.nw { top: -4px; left: -4px; width: 12px; height: 12px; cursor: nw-resize; }
|
|
9
|
+
.resize-handle.se { bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: se-resize; }
|
|
10
|
+
.resize-handle.sw { bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: sw-resize; }
|
|
11
|
+
|
|
12
|
+
.window-frame {
|
|
13
|
+
background: rgba(10, 10, 20, 0.4);
|
|
14
|
+
backdrop-filter: blur(25px) saturate(180%);
|
|
15
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
16
|
+
box-shadow: 0 10px 40px rgba(0,0,0,0.5);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.window-frame.active-window {
|
|
20
|
+
box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 229, 255, 0.1);
|
|
21
|
+
border: 1px solid rgba(0, 229, 255, 0.2);
|
|
22
|
+
}
|
|
23
|
+
`})]})},Te="http://localhost:3003";class Ke{token=null;onAuthFailure=null;setToken(n){this.token=n}getToken(){return this.token}setAuthFailureCallback(n){this.onAuthFailure=n}getAuthFailureCallback(){return this.onAuthFailure}async getFiles(n=""){const s=await this.request("/data",{method:"GET"});if(!n||n==="thispc")return s.root_items||[];const a=n.split("/");let h=s[a[0]]?s[a[0]].items:s.root_items;for(let c=1;c<a.length;c++){const y=h.find(p=>p.id===a[c]||p.name===a[c]);if(y&&y.items)h=y.items;else return[]}return h||[]}async uploadFile(n,s){return new Promise((a,h)=>{const c=new FileReader;c.onload=async()=>{try{const y=await this.request("/upload",{method:"POST",body:JSON.stringify({targetPath:n.includes("/")?n.split("/").slice(0,-1).join("/"):"thispc",fileName:n.split("/").pop(),fileBase64:c.result,mime:s.type,size:s.size})});a(y)}catch(y){h(y)}},c.onerror=h,c.readAsDataURL(s)})}async readFile(n){const s=await fetch(`${Te}${n.startsWith("/")?"":"/"}${n}`);if(!s.ok)throw new Error("File not accessible");return s.blob()}async saveFile(n,s){const a="data:text/plain;base64,"+btoa(s);return console.log("Using base64 content len:",a.length),this.uploadFile(n,new File([s],n.split("/").pop()||"file.txt",{type:"text/plain"}))}async deleteFile(n){return this.request("/delete",{method:"POST",body:JSON.stringify({targetPath:n})})}async mkdir(n){return this.request("/create-folder",{method:"POST",body:JSON.stringify({targetPath:n.includes("/")?n.split("/").slice(0,-1).join("/"):"thispc",name:n.split("/").pop()})})}async rename(n,s){return this.request("/rename",{method:"POST",body:JSON.stringify({targetPath:n,newName:s})})}async request(n,s={}){const a=new Headers(s.headers||{});!a.has("Content-Type")&&s.method==="POST"&&a.set("Content-Type","application/json");const h=await fetch(`${Te}${n}`,{...s,headers:a});if(!h.ok)throw new Error(`Request failed: ${h.status}`);const c=await h.text();try{return JSON.parse(c)}catch{return c}}}const T=new Ke,qe=({onShowContextMenu:x})=>{const[n,s]=i.useState(""),[a,h]=i.useState([]),[c,y]=i.useState("root"),p=i.useRef(null),k=i.useRef(null),v=i.useCallback(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)},[]);i.useEffect(()=>{v()},[a,v]);const z=async L=>{const M=L.trim().split(/\s+/),u=M[0].toLowerCase(),l=M.slice(1);let g="";const b=c==="root"?"":c.replace(/^root\/?/,"");try{switch(u){case"help":g=`Available commands:
|
|
24
|
+
- ls: List files in current directory
|
|
25
|
+
- cd [dir]: Change directory
|
|
26
|
+
- pwd: Print working directory
|
|
27
|
+
- mkdir [name]: Create directory
|
|
28
|
+
- rm [name]: Remove file or directory
|
|
29
|
+
- cat [file]: Show file contents
|
|
30
|
+
- touch [name]: Create empty file
|
|
31
|
+
- tree: Show directory structure
|
|
32
|
+
- clear: Clear terminal history
|
|
33
|
+
- whoami: Show current user
|
|
34
|
+
- version: Show OS version`;break;case"ls":g=(await T.getFiles(b)).map(I=>`${I.type==="folder"?"DIR ":"FILE"} ${I.name}`).join(`
|
|
35
|
+
`)||"Empty directory";break;case"cd":if(!l[0]||l[0]==="~")y("root");else if(l[0]===".."){if(c!=="root"){const I=c.split("/").slice(0,-1).join("/")||"root";y(I)}}else{const I=l[0];(await T.getFiles(b)).find(Z=>Z.name===I&&Z.type==="folder")?y(`${c}/${I}`):g=`cd: no such directory: ${I}`}break;case"pwd":g=`/${c}`;break;case"mkdir":l[0]?(await T.mkdir(b?`${b}/${l[0]}`:l[0]),g=`Created directory: ${l[0]}`):g="usage: mkdir [directory_name]";break;case"rm":l[0]?(await T.deleteFile(b?`${b}/${l[0]}`:l[0]),g=`Removed: ${l[0]}`):g="usage: rm [filename]";break;case"touch":l[0]?(await T.uploadFile(b?`${b}/${l[0]}`:l[0],new File([""],l[0])),g=`Created file: ${l[0]}`):g="usage: touch [filename]";break;case"cat":l[0]?g=await(await T.readFile(b?`${b}/${l[0]}`:l[0])).text():g="usage: cat [filename]";break;case"tree":g=`Tree view for ${c} (Mocked):
|
|
36
|
+
.
|
|
37
|
+
├── documents
|
|
38
|
+
│ ├── resume.pdf
|
|
39
|
+
│ └── notes.txt
|
|
40
|
+
├── projects
|
|
41
|
+
│ └── tusharos
|
|
42
|
+
└── startup.sh`;break;case"clear":h([]),s("");return;case"whoami":g="tusharbr (System Administrator)";break;case"version":g="TusharOS v1.0.0-pro (Edge Powered)";break;case"":break;default:g=`Command not found: ${u}. Type 'help' for commands.`}}catch(N){g=`Error: ${N.message}`}h(N=>[...N,{command:L,output:g,cwd:c}]),s("")},C=L=>{L.key==="Enter"&&z(n)},D=L=>{L.preventDefault(),L.stopPropagation(),x&&x(L.clientX,L.clientY,[{label:"Copy",shortcut:"Ctrl+Shift+C",action:()=>document.execCommand("copy")},{label:"Paste",shortcut:"Ctrl+Shift+V",action:()=>navigator.clipboard.readText().then(M=>s(u=>u+M))},{separator:!0},{label:"Clear Terminal",icon:"🧹",action:()=>h([])},{separator:!0},{label:"Split Terminal (Horizontal)",icon:"↔️",action:()=>console.log("Split H")},{label:"Split Terminal (Vertical)",icon:"↕️",action:()=>console.log("Split V")},{separator:!0},{label:"New Terminal",icon:"🐚",action:()=>console.log("New Term")},{label:"Default Shell (zsh)",action:()=>console.log("Shell info")}])};return e.jsxs("div",{style:{height:"100%",background:"#0a0a0d",color:"#00ffc2",fontFamily:'"Fira Code", "JetBrains Mono", monospace',padding:"12px",display:"flex",flexDirection:"column",fontSize:"0.85rem",overflow:"hidden"},onClick:()=>k.current?.focus(),onContextMenu:D,children:[e.jsxs("div",{ref:p,style:{flex:1,overflowY:"auto",marginBottom:"10px"},children:[e.jsxs("div",{style:{color:"#00e5ff",marginBottom:"15px",opacity:.7},children:["TusharOS Terminal Pro [Version 1.0.0]",e.jsx("br",{}),"Connected to Edge Infrastructure via Cloudflare Workers",e.jsx("br",{}),"Authenticated as tusharbr. Initializing shell..."]}),a.map((L,M)=>e.jsxs("div",{style:{marginBottom:"10px"},children:[e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[e.jsx("span",{style:{color:"#ff00ff",fontWeight:"bold"},children:"➜"}),e.jsx("span",{style:{color:"#00e5ff"},children:L.cwd}),e.jsx("span",{style:{color:"#fff"},children:L.command})]}),e.jsx("div",{style:{color:"#ccc",whiteSpace:"pre-wrap",marginTop:"4px",paddingLeft:"22px",lineHeight:"1.4"},children:L.output})]},M))]}),e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center",background:"rgba(255,255,255,0.03)",padding:"4px 8px",borderRadius:"4px"},children:[e.jsx("span",{style:{color:"#ff00ff",fontWeight:"bold"},children:"➜"}),e.jsx("span",{style:{color:"#00e5ff"},children:c}),e.jsx("input",{ref:k,type:"text",value:n,onChange:L=>s(L.target.value),onKeyDown:C,style:{background:"transparent",border:"none",color:"#fff",outline:"none",flex:1,fontFamily:"inherit",fontSize:"inherit"},autoFocus:!0})]})]})},Je=x=>{if(!x)return"0 B";const n=1024,s=["B","KB","MB","GB"],a=Math.floor(Math.log(x)/Math.log(n));return parseFloat((x/Math.pow(n,a)).toFixed(2))+" "+s[a]},Qe=({onOpenFile:x,onShowContextMenu:n})=>{const[s,a]=i.useState(""),[h,c]=i.useState([]),[y,p]=i.useState(!0),[k,v]=i.useState(null),[z,C]=i.useState(null),[D,L]=i.useState(null),[M,u]=i.useState(!1),[l,g]=i.useState(""),b=i.useRef(null),N=s.toLowerCase().includes("private"),I=i.useCallback(async()=>{p(!0);try{const o=await T.getFiles(s).catch(()=>[{name:"Documents",type:"folder"},{name:"Projects",type:"folder"},{name:"Media",type:"folder"},{name:"readme.txt",type:"file",size:1024}]);c(Array.isArray(o)?o:[])}catch(o){console.error("Fetch failed",o)}finally{p(!1)}},[s]);i.useEffect(()=>{I()},[I]);const Q=o=>{a(j=>j?`${j}/${o}`:o),v(null)},B=o=>{a(o),v(null)},Z=()=>{const o=s.split("/");o.pop(),a(o.join("/")),v(null)},te=async o=>{if(window.confirm(`Delete ${o.name}?`)){const j=s?`${s}/${o.name}`:o.name;await T.deleteFile(j).catch(S=>alert(S.message)),I()}},A=async o=>{const j=window.prompt("Enter new name:",o.name);if(j&&j!==o.name){const S=s?`${s}/${o.name}`:o.name;await T.rename(S,j).catch(E=>alert(E.message)),I()}},ie=async()=>{const o=window.prompt("New filename:","New.txt");if(o){const j=s?`${s}/${o}`:o;await T.saveFile(j,""),I()}},w=async()=>{const o=window.prompt("New folder name:","New Folder");if(o){const j=s?`${s}/${o}`:o;await T.mkdir(j),I()}},P=(o,j)=>{const S=o.touches[0].clientX,E=o.touches[0].clientY;b.current=setTimeout(()=>{F(S,E,j)},700)},U=()=>{b.current&&clearTimeout(b.current)},F=(o,j,S)=>{if(!n)return;let E=[];S?(E=[{label:"Open",icon:S.type==="folder"?e.jsx(Ie,{}):e.jsx(ye,{}),action:()=>S.type==="folder"?Q(S.name):x?.(s,S.name)},{label:"Quick Preview",icon:e.jsx(Be,{}),action:()=>pe(S)},{separator:!0},{label:"Rename",icon:e.jsx($e,{}),action:()=>A(S)},{label:"Copy",icon:e.jsx(ze,{}),shortcut:"Ctrl+C",action:()=>console.log("Copy",S.name)},{label:"Cut",icon:e.jsx(Ue,{}),shortcut:"Ctrl+X",action:()=>console.log("Cut",S.name)},{separator:!0},{label:"Delete",icon:e.jsx(_e,{}),danger:!0,shortcut:"Del",action:()=>te(S)},{separator:!0},{label:"Properties",icon:e.jsx(Ye,{}),action:()=>console.log("Properties",S.name)}],S.type==="folder"&&E.splice(3,0,{separator:!0},{label:"New File",action:()=>ie()},{label:"New Folder",action:()=>w()})):E=[{label:"New Folder",icon:e.jsx(Ie,{}),action:w},{label:"New Text File",icon:e.jsx(He,{}),action:ie},{separator:!0},{label:"Paste",icon:e.jsx(ze,{}),shortcut:"Ctrl+V",action:()=>console.log("Paste in folder")},{separator:!0},{label:"Refresh",icon:e.jsx(ke,{}),action:()=>I()}],n(o,j,E)},H=(o,j)=>{o.preventDefault(),o.stopPropagation(),F(o.clientX,o.clientY,j)},G=s.split("/").filter(Boolean),[re,oe]=i.useState(!1),K=i.useRef(0),ee=o=>{o.preventDefault(),o.stopPropagation(),K.current++,o.dataTransfer.items&&o.dataTransfer.items.length>0&&oe(!0)},V=o=>{o.preventDefault(),o.stopPropagation(),K.current--,K.current===0&&oe(!1)},O=o=>{o.preventDefault(),o.stopPropagation()},se=o=>{o.preventDefault(),o.stopPropagation(),oe(!1),K.current=0,o.dataTransfer.files&&o.dataTransfer.files.length>0&&J(o.dataTransfer.files)},[q,_]=i.useState([]),J=o=>{if(!o)return;const j=Array.from(o).map(S=>({file:S,newName:S.name,id:Math.random().toString(36).substr(2,9)}));_(S=>[...S,...j])},ae=o=>{J(o.target.files),o.target.value=""},ce=o=>{_(j=>j.filter(S=>S.id!==o))},$=(o,j)=>{_(S=>S.map(E=>E.id===o?{...E,newName:j}:E))},ge=async()=>{if(q.length===0)return;const o=[...q];_([]);for(const j of o){const S=j.newName.trim()||j.file.name,E=s?`${s}/${S}`:S;await T.uploadFile(E,j.file)}I()},pe=async o=>{C(o),L(null),u(!0);const j=o.name.split(".").pop()?.toLowerCase()||"";if(["txt","md","js","ts","json","css","scss","html","py","java","c","cpp","php","rb","go","sh","bat","cjs","mjs","env"].includes(j))try{const E=s?`${s}/${o.name}`:o.name,de=await(await T.readFile(E)).text();L(de)}catch{L("Error: Cloud connection timeout or access denied.")}u(!1)},xe=h.filter(o=>o.name.toLowerCase().includes(l.toLowerCase()));return e.jsxs("div",{className:"os-explorer-container",style:{display:"flex",flexDirection:"column",height:"100%",background:"#0a0a0a",color:"#ccc",fontFamily:"Inter, system-ui, sans-serif",position:"relative",overflow:"hidden"},onContextMenu:o=>H(o,null),onTouchStart:o=>P(o,null),onTouchEnd:U,onDragEnter:ee,onDragLeave:V,onDragOver:O,onDrop:se,children:[re&&e.jsx("div",{style:{position:"absolute",inset:0,zIndex:100,background:"rgba(0, 229, 255, 0.15)",border:"2px dashed #00e5ff",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:e.jsx("div",{style:{background:"#000",padding:"20px",borderRadius:"12px",border:"1px solid #00e5ff",color:"#00e5ff",fontWeight:"bold",boxShadow:"0 0 30px rgba(0,229,255,0.3)"},children:"DROP FILES TO UPLOAD"})}),e.jsxs("div",{style:{padding:"8px 16px",display:"flex",alignItems:"center",gap:"15px",borderBottom:"1px solid var(--os-border)",background:"rgba(0,0,0,0.2)"},children:[e.jsxs("div",{style:{display:"flex",gap:"6px"},children:[e.jsx("button",{onClick:Z,disabled:!s,className:"os-nav-btn",style:{opacity:s?1:.3},children:e.jsx(Ne,{size:18})}),e.jsx("button",{onClick:()=>I(),className:"os-nav-btn",children:e.jsx(ke,{size:18})})]}),e.jsx("div",{style:{flex:1,height:"32px",background:"rgba(255,255,255,0.05)",borderRadius:"6px",display:"flex",alignItems:"center",padding:"0 12px",fontSize:"0.85rem"},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",overflowX:"auto",whiteSpace:"nowrap"},children:[e.jsx("span",{style:{cursor:"pointer",opacity:.6},onClick:()=>B(""),children:"root"}),G.map((o,j)=>e.jsxs(we.Fragment,{children:[e.jsx(De,{size:12,style:{opacity:.3}}),e.jsx("span",{style:{cursor:"pointer",color:j===G.length-1?"var(--os-primary)":"inherit"},onClick:()=>B(G.slice(0,j+1).join("/")),children:o})]},j))]})}),e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[e.jsxs("div",{style:{position:"relative"},children:[e.jsx(Me,{style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",opacity:.4}}),e.jsx("input",{placeholder:"Search...",value:l,onChange:o=>g(o.target.value),style:{width:"150px",background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"6px",padding:"6px 10px 6px 30px",color:"#fff",fontSize:"0.75rem",outline:"none"}})]}),e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"6px",cursor:"pointer",opacity:.8},children:[e.jsx(Ee,{size:18,color:"var(--os-primary)"}),e.jsx("input",{type:"file",multiple:!0,onChange:ae,style:{display:"none"}})]})]})]}),e.jsxs("div",{style:{flex:1,display:"flex",overflow:"hidden"},children:[e.jsxs("div",{style:{width:"200px",background:"rgba(0,0,0,0.1)",borderRight:"1px solid var(--os-border)",padding:"10px 0"},children:[e.jsx(be,{icon:e.jsx(Re,{}),label:"All Files",active:s==="",onClick:()=>B("")}),e.jsx(be,{icon:e.jsx(Se,{}),label:"Public (P:)",active:s.startsWith("public"),onClick:()=>B("public")}),e.jsx(be,{icon:e.jsx(je,{}),label:"Private (S:)",active:s.startsWith("private"),onClick:()=>B("private"),isLocked:!0})]}),e.jsx("div",{style:{flex:1,overflowY:"auto",padding:"25px",position:"relative"},children:y?e.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"15px"},children:[e.jsx("div",{className:"spinner",style:{fontSize:"2rem",animation:"spin 2s linear infinite"},children:"⚙️"}),e.jsx("div",{style:{color:"var(--os-primary)",fontSize:"0.8rem",letterSpacing:"2px",fontWeight:"bold"},children:"ESTABLISHING SECURE TUNNEL..."})]}):e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(110px, 1fr))",gap:"20px"},children:[xe.length===0&&e.jsxs("div",{style:{gridColumn:"1/-1",textAlign:"center",color:"rgba(255,255,255,0.2)",marginTop:"60px",display:"flex",flexDirection:"column",alignItems:"center",gap:"10px"},children:[e.jsx(Ce,{size:48}),e.jsx("span",{style:{fontSize:"0.9rem"},children:"Sector is empty or encrypted"})]}),xe.map((o,j)=>{const S=o.name.split(".").pop()?.toLowerCase()||"",E=["js","ts","jsx","tsx","cjs","mjs"].includes(S),he=S==="py",de=S==="json";return e.jsxs("div",{onClick:le=>{le.stopPropagation(),v(o.name)},onDoubleClick:()=>o.type==="folder"?Q(o.name):x?.(s,o.name),onContextMenu:le=>H(le,o),onTouchStart:le=>P(le,o),onTouchEnd:U,className:"file-item-os",style:{display:"flex",flexDirection:"column",alignItems:"center",padding:"15px 10px",borderRadius:"12px",cursor:"pointer",background:k===o.name?"rgba(0, 229, 255, 0.1)":"transparent",border:k===o.name?"1px solid rgba(0, 229, 255, 0.2)":"1px solid transparent",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[e.jsx("div",{style:{fontSize:"3rem",marginBottom:"10px",display:"flex",alignItems:"center",justifyContent:"center"},children:o.type==="folder"?e.jsx(Ce,{color:"var(--os-primary)",style:{filter:"drop-shadow(0 0 10px rgba(0,229,255,0.2))"}}):E?e.jsx(Fe,{color:"#f7df1e"}):he?e.jsx(Ae,{color:"#3776ab"}):de?e.jsx(Pe,{color:"#00ff88"}):e.jsx(ye,{color:"#fff",style:{opacity:.8}})}),N&&o.type==="folder"&&e.jsx("div",{style:{position:"absolute",top:"15px",right:"15px",background:"#000",borderRadius:"50%",padding:"4px",border:"1px solid var(--os-primary)",boxShadow:"0 0 8px rgba(0,229,255,0.4)"},children:e.jsx(je,{size:10,color:"var(--os-primary)"})}),e.jsx("span",{style:{fontSize:"0.78rem",textAlign:"center",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:k===o.name?"#fff":"rgba(255,255,255,0.6)",fontWeight:k===o.name?600:400},children:o.name})]},j)})]})})]}),z&&e.jsx("div",{style:{position:"absolute",inset:0,zIndex:200,background:"rgba(0,0,0,0.85)",backdropFilter:"blur(15px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"40px"},children:e.jsxs("div",{style:{width:"100%",maxWidth:"900px",height:"100%",background:"#05050a",border:"1px solid var(--os-border)",borderRadius:"16px",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 30px 100px rgba(0,0,0,1)"},children:[e.jsxs("div",{style:{padding:"15px 25px",background:"rgba(255,255,255,0.03)",borderBottom:"1px solid var(--os-border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.jsx(ye,{color:"var(--os-primary)",size:20}),e.jsx("span",{style:{fontWeight:600,color:"#fff",fontSize:"0.9rem",letterSpacing:"0.5px"},children:z.name})]}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{style:{background:"transparent",border:"none",color:"#888",cursor:"pointer",padding:"5px"},children:e.jsx(Oe,{size:20})}),e.jsx("button",{onClick:()=>C(null),style:{background:"rgba(255, 77, 77, 0.1)",border:"none",color:"#ff4d4d",cursor:"pointer",width:"32px",height:"32px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(We,{size:22})})]})]}),e.jsx("div",{style:{flex:1,overflow:"auto",padding:"30px",background:"#020205"},children:M?e.jsx("div",{style:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--os-primary)",fontSize:"0.75rem",letterSpacing:"3px"},children:"DECRYPTING DATA STREAM..."}):D?e.jsx("pre",{style:{margin:0,color:"#00ff88",fontFamily:"'JetBrains Mono', monospace",fontSize:"0.9rem",lineHeight:"1.7",whiteSpace:"pre-wrap"},children:D}):e.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:.3,gap:"20px"},children:[e.jsx(Se,{size:64}),e.jsx("span",{children:"BINARY DATA DETECTED - VIEWING NOT SUPPORTED"})]})}),e.jsxs("div",{style:{padding:"12px 25px",background:"rgba(0, 229, 255, 0.05)",borderTop:"1px solid var(--os-border)",fontSize:"0.7rem",color:"rgba(0, 229, 255, 0.5)",display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{children:"ENCODING: UTF-8 (VIRTUAL)"}),e.jsx("span",{children:"STATUS: SECURE ACCESS GRANTED"})]})]})}),q.length>0&&e.jsx("div",{style:{position:"absolute",inset:0,zIndex:50,background:"rgba(0,0,0,0.8)",backdropFilter:"blur(5px)",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsxs("div",{style:{width:"90%",maxWidth:"500px",maxHeight:"80%",background:"#16161e",border:"1px solid #333",borderRadius:"12px",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 20px 50px rgba(0,0,0,0.8)"},children:[e.jsxs("div",{style:{padding:"15px 20px",background:"#1f1f2a",borderBottom:"1px solid #333",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("span",{style:{fontWeight:600,color:"#fff"},children:["Confirm Upload (",q.length,")"]}),e.jsx("button",{onClick:()=>_([]),style:{background:"none",border:"none",color:"#666",cursor:"pointer",fontSize:"1.2rem"},children:"×"})]}),e.jsx("div",{style:{flex:1,overflowY:"auto",padding:"15px",display:"flex",flexDirection:"column",gap:"10px"},children:q.map(o=>e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr auto auto",gap:"12px",alignItems:"center",background:"rgba(255,255,255,0.03)",padding:"10px",borderRadius:"8px"},children:[e.jsx("div",{style:{fontSize:"1.5rem"},children:"📄"}),e.jsxs("div",{style:{overflow:"hidden"},children:[e.jsx("input",{value:o.newName,onChange:j=>$(o.id,j.target.value),style:{background:"transparent",border:"none",borderBottom:"1px solid #444",color:"#fff",width:"100%",padding:"4px 0",outline:"none",fontSize:"0.9rem"}}),e.jsx("div",{style:{fontSize:"0.75rem",color:"#666",marginTop:"2px"},children:Je(o.file.size)})]}),e.jsx("button",{onClick:()=>ce(o.id),style:{background:"#330000",border:"1px solid #500",color:"#f55",borderRadius:"4px",padding:"6px",cursor:"pointer"},children:"🗑️"})]},o.id))}),e.jsxs("div",{style:{padding:"15px",borderTop:"1px solid #333",display:"flex",gap:"10px"},children:[e.jsx("button",{onClick:()=>_([]),style:{flex:1,padding:"10px",background:"transparent",border:"1px solid #333",color:"#aaa",borderRadius:"6px",cursor:"pointer"},children:"Cancel"}),e.jsx("button",{onClick:ge,style:{flex:1,padding:"10px",background:"#00e5ff",border:"none",color:"#000",borderRadius:"6px",fontWeight:"bold",cursor:"pointer"},children:"Upload All"})]})]})})]})},be=({icon:x,label:n,active:s,onClick:a,isLocked:h})=>e.jsxs("div",{onClick:a,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 25px",cursor:"pointer",background:s?"rgba(0, 229, 255, 0.1)":"transparent",borderLeft:`3px solid ${s?"var(--os-primary)":"transparent"}`,color:s?"var(--os-primary)":"rgba(255,255,255,0.6)",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[we.cloneElement(x,{size:16}),e.jsx("span",{style:{fontSize:"0.8rem",fontWeight:s?600:400,letterSpacing:"0.5px"},children:n})]}),h&&e.jsx(je,{size:12,style:{opacity:.5}})]}),Ze=i.forwardRef(({onShowContextMenu:x},n)=>{const[s,a]=i.useState([]),[h,c]=i.useState(null),[y,p]=i.useState(!1),k=s.find(u=>u.id===h);i.useImperativeHandle(n,()=>({openFile:(u,l)=>v(u,l)}));const v=async(u,l)=>{const g=u?`${u}/${l}`:l;if(s.find(b=>b.id===g)){c(g);return}p(!0);try{const N=await(await T.readFile(g)).text(),I={id:g,path:u,name:l,content:N,isDirty:!1};a(Q=>[...Q,I]),c(g)}catch(b){console.error("Failed to open file",b)}finally{p(!1)}},z=(u,l)=>{if(l?.stopPropagation(),!(s.find(b=>b.id===u)?.isDirty&&!window.confirm("Discard unsaved changes?"))&&(a(b=>b.filter(N=>N.id!==u)),h===u)){const b=s.findIndex(I=>I.id===u),N=s[b+1]||s[b-1];c(N?N.id:null)}},C=u=>{h&&u!==void 0&&a(l=>l.map(g=>g.id===h?{...g,content:u,isDirty:!0}:g))},D=async()=>{if(k){p(!0);try{await T.saveFile(k.id,k.content),a(u=>u.map(l=>l.id===k.id?{...l,isDirty:!1}:l))}catch(u){console.error("Save failed",u),alert("Failed to save file")}finally{p(!1)}}},L=(u,l)=>{u.preventDefault(),u.stopPropagation(),x&&x(u.clientX,u.clientY,[{label:"Close",icon:"×",action:()=>z(l.id)},{label:"Close Others",action:()=>a(g=>g.filter(b=>b.id===l.id))},{label:"Close All",action:()=>{s.some(b=>b.isDirty)&&!window.confirm("Discard all unsaved changes?")||(a([]),c(null))}},{separator:!0},{label:"Reveal in Explorer",icon:"📂",action:()=>console.log("Reveal",l.path)},{label:"Keep Open",action:()=>console.log("Keep Open")}])},M=u=>{u.preventDefault(),x&&x(u.clientX,u.clientY,[{label:"Command Palette",icon:"⌨️",shortcut:"F1",action:()=>console.log("F1")},{separator:!0},{label:"Go to Definition",shortcut:"F12",action:()=>console.log("F12")},{label:"Find References",shortcut:"Shift+F12",action:()=>console.log("Ref")},{label:"Rename Symbol",shortcut:"F2",action:()=>console.log("F2")},{separator:!0},{label:"Format Document",icon:"✨",shortcut:"Alt+Shift+F",action:()=>console.log("Format")},{separator:!0},{label:"Cut",shortcut:"Ctrl+X",action:()=>console.log("Cut")},{label:"Copy",shortcut:"Ctrl+C",action:()=>console.log("Copy")},{label:"Paste",shortcut:"Ctrl+V",action:()=>console.log("Paste")},{separator:!0},{label:"Toggle Line Comment",shortcut:"Ctrl+/",action:()=>console.log("Comment")}])};return i.useEffect(()=>{const u=l=>{(l.ctrlKey||l.metaKey)&&l.key==="s"&&(l.preventDefault(),D())};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[k]),e.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#1e1e1e",color:"#ccc"},children:[e.jsxs("div",{style:{display:"flex",background:"#252526",overflowX:"auto",borderBottom:"1px solid #111"},children:[s.map(u=>e.jsxs("div",{onClick:()=>c(u.id),onContextMenu:l=>L(l,u),onTouchStart:l=>{const g=l.touches[0].clientX,b=l.touches[0].clientY,N=setTimeout(()=>L({clientX:g,clientY:b,preventDefault:()=>{},stopPropagation:()=>{}},u),700);l.currentTarget._longPress=N},onTouchEnd:l=>clearTimeout(l.currentTarget._longPress),style:{padding:"8px 16px",background:h===u.id?"#1e1e1e":"#2d2d2d",borderRight:"1px solid #111",cursor:"pointer",display:"flex",alignItems:"center",gap:"10px",minWidth:"120px",fontSize:"0.8rem",borderTop:h===u.id?"2px solid #00e5ff":"2px solid transparent"},children:[e.jsxs("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:[u.name,u.isDirty?"*":""]}),e.jsx("span",{onClick:l=>z(u.id,l),style:{opacity:.6,fontSize:"1rem",cursor:"pointer"},children:"×"})]},u.id)),s.length>0&&e.jsx("div",{onClick:D,style:{padding:"0 15px",background:"#00e5ff",color:"#000",fontWeight:"bold",display:"flex",alignItems:"center",cursor:"pointer",fontSize:"0.7rem",marginLeft:"auto"},children:"SAVE"})]}),e.jsxs("div",{style:{flex:1,position:"relative"},onContextMenu:M,children:[k?e.jsx(Xe,{height:"100%",theme:"vs-dark",defaultLanguage:"javascript",value:k.content,onChange:C,options:{minimap:{enabled:!0},fontSize:14,automaticLayout:!0,padding:{top:10},contextmenu:!1}}):e.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:.2},children:[e.jsx("div",{style:{fontSize:"4rem"},children:"💻"}),e.jsx("div",{style:{marginTop:"20px"},children:"Open a file to start editing"}),e.jsx("div",{style:{marginTop:"10px",fontSize:"0.8rem"},children:"Ctrl + S to save"})]}),y&&e.jsx("div",{style:{position:"absolute",top:0,right:0,padding:"10px",color:"#00e5ff",fontSize:"0.7rem"},children:"SYNCING..."})]})]})}),et=({onOpenItem:x})=>{const[n,s]=i.useState(""),[a,h]=i.useState([]),[c,y]=i.useState(!1);return i.useEffect(()=>{const p=setTimeout(async()=>{if(n.length<2){h([]);return}y(!0);try{const v=(await T.getFiles("")).filter(z=>z.name.toLowerCase().includes(n.toLowerCase())).map(z=>({path:"",name:z.name,type:z.type,preview:z.type==="file"?"Match found in filename...":void 0}));h(v)}catch(k){console.error("Search failed",k)}finally{y(!1)}},300);return()=>clearTimeout(p)},[n]),e.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#111",color:"#ccc",padding:"20px"},children:[e.jsxs("div",{style:{position:"relative",marginBottom:"20px"},children:[e.jsx("input",{type:"text",placeholder:"Search files, content, or settings...",value:n,onChange:p=>s(p.target.value),style:{width:"100%",background:"#1a1a1a",border:"1px solid #333",color:"#fff",padding:"12px 15px",borderRadius:"8px",outline:"none",fontSize:"1rem",boxShadow:"inset 0 2px 4px rgba(0,0,0,0.5)"},autoFocus:!0}),c&&e.jsx("div",{style:{position:"absolute",right:"15px",top:"12px",color:"#00e5ff",fontSize:"0.8rem"},children:"SCANNING..."})]}),e.jsx("div",{style:{flex:1,overflowY:"auto"},children:a.length>0?a.map((p,k)=>e.jsxs("div",{onClick:()=>x?.(p.path,p.name),style:{padding:"12px",borderBottom:"1px solid #222",cursor:"pointer",display:"flex",alignItems:"center",gap:"15px",transition:"background 0.2s",borderRadius:"4px"},className:"search-result-item",children:[e.jsx("span",{style:{fontSize:"1.5rem",display:"flex",alignItems:"center"},children:p.type==="folder"?e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#00e5ff",strokeWidth:"2",children:e.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})}):e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#7c4dff",strokeWidth:"2",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"})]})}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{color:"#00e5ff",fontWeight:"bold"},children:p.name}),e.jsxs("div",{style:{fontSize:"0.7rem",color:"#666"},children:[p.path||"root","/",p.name]}),p.preview&&e.jsx("div",{style:{fontSize:"0.75rem",color:"#888",marginTop:"4px"},children:p.preview})]})]},k)):n.length>1&&!c?e.jsxs("div",{style:{textAlign:"center",color:"#444",marginTop:"40px"},children:['No results found for "',n,'"']}):e.jsxs("div",{style:{textAlign:"center",color:"#333",marginTop:"40px"},children:[e.jsx("div",{style:{fontSize:"3rem",marginBottom:"10px",display:"flex",justifyContent:"center"},children:e.jsxs("svg",{width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"#00e5ff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}),"Start typing to search TusharOS..."]})}),e.jsx("style",{children:`
|
|
43
|
+
.search-result-item:hover {
|
|
44
|
+
background: rgba(0, 229, 255, 0.05);
|
|
45
|
+
}
|
|
46
|
+
`})]})},tt=()=>{const[x,n]=i.useState([{id:"neon-theme",name:"Neon Glow Theme",description:"Vibrant neon colors for TusharOS UI.",author:"tusharbr",version:"1.2.0",icon:"🌈",installed:!0,type:"theme"},{id:"py-support",name:"Python Support",description:"Intellisense and formatting for Python files.",author:"Microsoft (Ported)",version:"2026.1.0",icon:"🐍",installed:!1,type:"language"},{id:"git-pro",name:"Git Graph Pro",description:"Visual git graph integrated into the editor.",author:"mhutchie",version:"1.14.0",icon:"🎋",installed:!1,type:"tool"},{id:"prettier",name:"Prettier Formatter",description:"Opinionated code formatter for all languages.",author:"Prettier.io",version:"3.0.0",icon:"✨",installed:!0,type:"tool"},{id:"cyberpunk",name:"Cyberpunk Mode",description:"High contrast black and gold theme.",author:"tusharbr",version:"0.9.0",icon:"🌃",installed:!1,type:"theme"}]),s=a=>{n(h=>h.map(c=>c.id===a?{...c,installed:!c.installed}:c))};return e.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#0a0a0a",color:"#ccc",fontFamily:"Inter, sans-serif"},children:[e.jsxs("div",{style:{padding:"20px",background:"#141414",borderBottom:"1px solid #222"},children:[e.jsx("div",{style:{fontSize:"1.2rem",fontWeight:"bold",color:"#fff"},children:"Marketplace"}),e.jsx("div",{style:{fontSize:"0.8rem",color:"#666"},children:"Discover and manage TusharOS extensions"})]}),e.jsx("div",{style:{flex:1,overflowY:"auto",padding:"15px"},children:x.map(a=>e.jsxs("div",{style:{padding:"15px",background:"#1a1a1a",borderRadius:"8px",marginBottom:"10px",display:"flex",gap:"15px",border:"1px solid #222",transition:"border 0.2s"},onMouseEnter:h=>h.currentTarget.style.borderColor="#00e5ff",onMouseLeave:h=>h.currentTarget.style.borderColor="#222",children:[e.jsx("div",{style:{fontSize:"2rem",background:"#222",width:"50px",height:"50px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"8px"},children:a.icon}),e.jsxs("div",{style:{flex:1},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx("div",{style:{color:"#00e5ff",fontWeight:"bold"},children:a.name}),e.jsxs("div",{style:{fontSize:"0.7rem",color:"#444"},children:["v",a.version]})]}),e.jsx("div",{style:{fontSize:"0.85rem",color:"#888",marginTop:"4px"},children:a.description}),e.jsxs("div",{style:{display:"flex",gap:"15px",marginTop:"10px",alignItems:"center"},children:[e.jsxs("span",{style:{fontSize:"0.75rem",color:"#555"},children:["by ",a.author]}),e.jsx("button",{onClick:()=>s(a.id),style:{background:a.installed?"#222":"#00e5ff",color:a.installed?"#888":"#000",border:"none",padding:"4px 12px",borderRadius:"4px",fontSize:"0.75rem",fontWeight:"bold",cursor:"pointer"},children:a.installed?"UNINSTALL":"INSTALL"})]})]})]},a.id))})]})},ot=({x,y:n,items:s,onClose:a})=>{const h=i.useRef(null);i.useEffect(()=>{const p=v=>{h.current&&!h.current.contains(v.target)&&a()},k=v=>{v.key==="Escape"&&a()};return document.addEventListener("mousedown",p),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",k)}},[a]);const c=Math.min(x,window.innerWidth-220),y=Math.min(n,window.innerHeight-s.length*35);return e.jsx("div",{ref:h,className:"os-context-menu",style:{position:"fixed",top:y,left:c,zIndex:99999},children:s.map((p,k)=>e.jsx("div",{children:p.separator?e.jsx("div",{className:"menu-separator"}):e.jsxs("div",{className:`menu-item ${p.danger?"danger":""} ${p.items?"has-submenu":""}`,onClick:v=>{p.items?v.stopPropagation():p.action&&(p.action(),a())},children:[p.icon&&e.jsx("span",{className:"menu-icon",children:p.icon}),e.jsx("span",{className:"menu-label",children:p.label}),p.shortcut&&e.jsx("span",{className:"menu-shortcut",children:p.shortcut}),p.items&&e.jsx("span",{className:"submenu-arrow",children:"▶"}),p.items&&e.jsx("div",{className:"submenu",children:p.items.map((v,z)=>e.jsx("div",{children:v.separator?e.jsx("div",{className:"menu-separator"}):e.jsxs("div",{className:`menu-item ${v.danger?"danger":""}`,onClick:C=>{C.stopPropagation(),v.action&&(v.action(),a())},children:[v.icon&&e.jsx("span",{className:"menu-icon",children:v.icon}),e.jsx("span",{className:"menu-label",children:v.label}),v.shortcut&&e.jsx("span",{className:"menu-shortcut",children:v.shortcut})]})},z))})]})},k))})},st=({initialUrl:x="https://www.google.com/search?igu=1"})=>{const[n,s]=i.useState(x),[a,h]=i.useState(x),[c,y]=i.useState(!0),p=i.useRef(null),k=z=>{z.preventDefault();let C=a;C.startsWith("http")||(C="https://"+C),s(C),y(!0)},v=()=>{p.current&&(p.current.src=n,y(!0))};return e.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#000"},children:[e.jsxs("div",{style:{height:"42px",background:"rgba(255, 255, 255, 0.03)",display:"flex",alignItems:"center",padding:"0 12px",gap:"12px",borderBottom:"1px solid var(--os-border)"},children:[e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:()=>window.history.back(),style:ve,children:"←"}),e.jsx("button",{onClick:()=>window.history.forward(),style:ve,children:"→"}),e.jsx("button",{onClick:v,style:ve,children:"↻"})]}),e.jsx("form",{onSubmit:k,style:{flex:1},children:e.jsx("input",{type:"text",value:a,onChange:z=>h(z.target.value),style:{width:"100%",background:"rgba(255, 255, 255, 0.05)",border:"1px solid var(--os-border)",borderRadius:"6px",color:"#fff",padding:"5px 15px",fontSize:"0.8rem",outline:"none",fontFamily:"inherit"},placeholder:"Bypass censorship, enter URL..."})}),e.jsx("div",{style:{color:"#888",fontSize:"0.7rem"},children:c?"⌛":"🔒"})]}),e.jsxs("div",{style:{flex:1,position:"relative",background:"#fff"},children:[c&&e.jsxs("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#1e1e1e",color:"#00e5ff",zIndex:10},children:[e.jsx("div",{className:"spinner",style:{marginBottom:"15px",fontSize:"2rem"},children:"🌐"}),e.jsx("div",{style:{fontSize:"0.8rem",letterSpacing:"2px"},children:"ESTABLISHING SECURE CONNECTION..."})]}),e.jsx("iframe",{ref:p,src:n,onLoad:()=>y(!1),style:{width:"100%",height:"100%",border:"none",background:"#fff"},title:"Browser Viewport",sandbox:"allow-scripts allow-forms allow-popups allow-same-origin"})]})]})},ve={background:"none",border:"none",color:"#ccc",fontSize:"1.1rem",cursor:"pointer",padding:"2px 8px",borderRadius:"4px"},nt=({tasks:x,onClose:n})=>x.length===0?null:e.jsxs("div",{style:{position:"absolute",bottom:"70px",right:"25px",width:"320px",background:"var(--os-glass)",backdropFilter:"blur(20px) saturate(180%)",border:"1px solid var(--os-border)",borderRadius:"12px",boxShadow:"0 15px 45px rgba(0,0,0,0.7)",zIndex:10001,color:"#fff",fontFamily:"Inter, system-ui, sans-serif",overflow:"hidden"},children:[e.jsxs("div",{style:{padding:"12px 15px",background:"rgba(255, 255, 255, 0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid rgba(255, 255, 255, 0.1)"},children:[e.jsx("span",{style:{fontSize:"0.85rem",fontWeight:"bold",letterSpacing:"1px"},children:"CORE DATA TRANSMISSION"}),e.jsx("button",{onClick:n,style:{background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"1rem"},children:"×"})]}),e.jsx("div",{style:{padding:"10px",maxHeight:"300px",overflowY:"auto"},children:x.map((s,a)=>e.jsxs("div",{style:{marginBottom:"15px"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.75rem",marginBottom:"5px"},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"180px"},children:s.name}),e.jsx("span",{style:{color:s.status==="completed"?"#00e5ff":"#aaa"},children:s.status==="completed"?"DONE":`${Math.round(s.progress)}%`})]}),e.jsx("div",{style:{height:"4px",background:"rgba(255,255,255,0.1)",borderRadius:"2px",overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:`${s.progress}%`,background:s.status==="completed"?"#00e5ff":"#444",transition:"width 0.3s ease"}})})]},a))})]}),it=({path:x,filename:n})=>{const[s,a]=i.useState(null),[h,c]=i.useState(!0),[y,p]=i.useState(!1);return i.useEffect(()=>((async()=>{c(!0);try{const v=x?`${x}/${n}`:n,z=await T.readFile(v),C=URL.createObjectURL(z);a(C)}catch(v){console.error("Failed to load image",v),p(!0)}finally{c(!1)}})(),()=>{s&&URL.revokeObjectURL(s)}),[x,n]),e.jsxs("div",{style:{height:"100%",background:"#0e0e12",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",overflow:"hidden"},children:[h&&e.jsx("div",{style:{color:"#00e5ff",fontSize:"0.8rem",letterSpacing:"2px"},children:"DEVELOPING..."}),y&&e.jsxs("div",{style:{color:"#ff2a5e",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"3rem"},children:"🖼️⚠️"}),e.jsx("div",{children:"FAILED TO LOAD IMAGE"})]}),s&&!h&&e.jsx("img",{src:s,alt:n,style:{maxWidth:"90%",maxHeight:"90%",objectFit:"contain",boxShadow:"0 20px 50px rgba(0,0,0,0.5)",border:"1px solid rgba(255,255,255,0.1)"}}),e.jsx("div",{style:{position:"absolute",bottom:"20px",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.6)",padding:"5px 15px",borderRadius:"20px",fontSize:"0.75rem",color:"#aaa",border:"1px solid rgba(255,255,255,0.1)"},children:n})]})},rt=({files:x,onCancel:n,onRename:s,onConfirm:a,onClose:h})=>x.length===0?null:e.jsxs(fe.div,{initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},style:{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"85%",maxWidth:"900px",height:"70vh",background:"rgba(10, 10, 20, 0.95)",backdropFilter:"blur(30px) saturate(180%)",border:"1.5px solid rgba(0, 229, 255, 0.3)",borderRadius:"16px",zIndex:2e4,display:"flex",boxShadow:"0 40px 100px rgba(0,0,0,0.9), 0 0 50px rgba(0, 229, 255, 0.1)",overflow:"hidden"},children:[e.jsxs("div",{style:{width:"320px",borderRight:"1px solid rgba(255,255,255,0.08)",padding:"30px",display:"flex",flexDirection:"column",background:"rgba(0,0,0,0.2)"},children:[e.jsxs("div",{style:{marginBottom:"40px"},children:[e.jsx("h2",{style:{fontSize:"1.5rem",fontWeight:"bold",color:"#00e5ff",marginBottom:"8px"},children:"UPLOAD STAGING"}),e.jsxs("p",{style:{fontSize:"0.8rem",opacity:.6,letterSpacing:"1px"},children:[x.length," ITEMS DETECTED IN STREAM"]})]}),e.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"15px"},children:e.jsxs("div",{style:{padding:"15px",background:"rgba(0, 229, 255, 0.05)",borderRadius:"10px",border:"1px solid rgba(0, 229, 255, 0.1)"},children:[e.jsx("div",{style:{fontSize:"0.7rem",opacity:.5,marginBottom:"5px"},children:"TOTAL PAYLOAD"}),e.jsxs("div",{style:{fontSize:"1.2rem",fontWeight:"bold"},children:[(x.reduce((c,y)=>c+y.file.size,0)/(1024*1024)).toFixed(2)," MB"]})]})}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[e.jsx("button",{onClick:a,style:{padding:"14px",background:"#00e5ff",color:"#000",border:"none",borderRadius:"8px",fontWeight:"bold",cursor:"pointer",fontSize:"0.9rem",letterSpacing:"1px"},children:"INITIALIZE UPLOAD"}),e.jsx("button",{onClick:h,style:{padding:"12px",background:"transparent",color:"#ff4444",border:"1px solid rgba(255, 68, 68, 0.3)",borderRadius:"8px",fontWeight:"500",cursor:"pointer",fontSize:"0.85rem"},children:"ABORT TASK"})]})]}),e.jsx("div",{style:{flex:1,padding:"30px",overflowY:"auto",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(180px, 1fr))",gap:"20px",alignContent:"start"},children:x.map(c=>e.jsxs("div",{style:{background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.08)",borderRadius:"12px",padding:"12px",display:"flex",flexDirection:"column",gap:"10px",position:"relative"},children:[e.jsx("button",{onClick:()=>n(c.id),style:{position:"absolute",top:"8px",right:"8px",background:"rgba(255,255,255,0.05)",border:"none",color:"#fff",width:"28px",height:"28px",borderRadius:"50%",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),e.jsx("div",{style:{height:"100px",background:"rgba(0,0,0,0.3)",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},children:c.preview?e.jsx("img",{src:c.preview,alt:"preview",style:{width:"100%",height:"100%",objectFit:"cover"}}):e.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.4)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"}),e.jsx("polyline",{points:"13 2 13 9 20 9"})]})}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"5px"},children:[e.jsx("input",{type:"text",value:c.name,onChange:y=>s(c.id,y.target.value),style:{background:"rgba(0,0,0,0.5)",border:"1px solid rgba(255,255,255,0.1)",color:"#fff",fontSize:"0.8rem",padding:"5px 8px",borderRadius:"4px",outline:"none",width:"100%"}}),e.jsxs("div",{style:{fontSize:"0.65rem",opacity:.5},children:[(c.file.size/1024).toFixed(1)," KB"]})]})]},c.id))})]}),at=({onSelectionChange:x})=>{const[n,s]=i.useState(null),[a,h]=i.useState(null),[c,y]=i.useState(!1);if(i.useEffect(()=>{const k=C=>{C.target.classList.contains("desktop-area")&&(s({x:C.clientX,y:C.clientY}),h({x:C.clientX,y:C.clientY}),y(!0))},v=C=>{if(c&&n&&(h({x:C.clientX,y:C.clientY}),x)){const D={x:Math.min(n.x,C.clientX),y:Math.min(n.y,C.clientY),width:Math.abs(n.x-C.clientX),height:Math.abs(n.y-C.clientY)};x(D)}},z=()=>{y(!1),s(null),h(null),x&&x({x:0,y:0,width:0,height:0})};return window.addEventListener("mousedown",k),window.addEventListener("mousemove",v),window.addEventListener("mouseup",z),()=>{window.removeEventListener("mousedown",k),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",z)}},[c,n,x]),!c||!n||!a)return null;const p={left:Math.min(n.x,a.x),top:Math.min(n.y,a.y),width:Math.abs(n.x-a.x),height:Math.abs(n.y-a.y)};return e.jsx("div",{style:{position:"fixed",left:p.left,top:p.top,width:p.width,height:p.height,backgroundColor:"transparent",border:"1px solid rgba(0, 229, 255, 0.4)",zIndex:9999,pointerEvents:"none",borderRadius:"0px"}})},f={explorer:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z",fill:"rgba(0, 229, 255, 0.2)",stroke:"#00e5ff"})}),editor:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"16 18 22 12 16 6",stroke:"#7c4dff"}),e.jsx("polyline",{points:"8 6 2 12 8 18",stroke:"#7c4dff"}),e.jsx("line",{x1:"14",y1:"4",x2:"10",y2:"20",stroke:"#fff"})]}),terminal:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"4 17 10 11 4 5",stroke:"#00ff88"}),e.jsx("line",{x1:"12",y1:"19",x2:"20",y2:"19",stroke:"#00ff88"}),e.jsx("rect",{x:"2",y:"3",width:"20",height:"18",rx:"2",ry:"2",stroke:"rgba(255,255,255,0.2)"})]}),search:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8",stroke:"#00e5ff"}),e.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65",stroke:"#00e5ff"})]}),extensions:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",fill:"rgba(124, 77, 255, 0.2)",stroke:"#7c4dff"}),e.jsx("polyline",{points:"7.5 4.21 12 6.81 16.5 4.21",stroke:"#7c4dff"}),e.jsx("polyline",{points:"7.5 19.79 7.5 14.63 3 12",stroke:"#7c4dff"}),e.jsx("polyline",{points:"21 12 16.5 14.63 16.5 19.79",stroke:"#7c4dff"}),e.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96",stroke:"#7c4dff"}),e.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12",stroke:"#7c4dff"})]}),browser:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"#00e5ff"}),e.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12",stroke:"#00e5ff"}),e.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z",stroke:"#00e5ff"})]}),image:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2",stroke:"#00ff88"}),e.jsx("circle",{cx:"8.5",cy:"8.5",r:"1.5",fill:"#00ff88",stroke:"none"}),e.jsx("polyline",{points:"21 15 16 10 5 21",stroke:"#00ff88"})]}),settings:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3",stroke:"#aaa"}),e.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z",stroke:"#aaa"})]}),battery:(x,n)=>e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"1",y:"6",width:"18",height:"12",rx:"2",ry:"2",stroke:"rgba(255,255,255,0.4)"}),e.jsx("line",{x1:"23",y1:"11",x2:"23",y2:"13",stroke:"rgba(255,255,255,0.4)"}),e.jsx("rect",{x:"3",y:"8",width:x/100*14,height:"8",fill:n?"#00ff88":x<20?"#ff4444":"#00e5ff",stroke:"none"}),n&&e.jsx("path",{d:"M11 7l-3 5h4l-3 5",stroke:"#fff",strokeWidth:"1.5",fill:"none"})]}),logout:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),e.jsx("polyline",{points:"16 17 21 12 16 7"}),e.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),restart:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M23 4v6h-6"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),shutdown:e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#ff4d4d",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0"}),e.jsx("line",{x1:"12",y1:"2",x2:"12",y2:"12"})]}),plus:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),refresh:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"23 4 23 10 17 10"}),e.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),info:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),file:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"}),e.jsx("polyline",{points:"13 2 13 9 20 9"})]}),bolt:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})}),shield:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),pin:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),e.jsx("path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6a3 3 0 0 0-3-3 3 3 0 0 0-3 3v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17z"})]}),properties:e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),e.jsx("polyline",{points:"14 2 14 8 20 8"}),e.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),e.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),e.jsx("polyline",{points:"10 9 9 9 8 9"})]}),github:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"})}),linkedin:e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"}),e.jsx("rect",{x:"2",y:"9",width:"4",height:"12"}),e.jsx("circle",{cx:"4",cy:"4",r:"2"})]}),twitter:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"})}),whatsapp:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"})})},lt=()=>{const[x,n]=i.useState("boot"),[s,a]=i.useState(0),[h,c]=i.useState("desktop");i.useEffect(()=>{const t=()=>{const r=window.innerWidth;r<=599?c("mobile"):r<=1023?c("tablet"):c("desktop")};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const[y,p]=i.useState(""),[k,v]=i.useState(!1),[z,C]=i.useState(0),[D,L]=i.useState(0),[M,u]=i.useState(!1),[l,g]=i.useState([]),[b,N]=i.useState(null),[I,Q]=i.useState(new Date),[B,Z]=i.useState(null),[te,A]=i.useState([]),ie=i.useRef({}),[w,P]=i.useState([]),[U,F]=i.useState([]),[H,G]=i.useState(!1),re=i.useRef(null),[oe,K]=i.useState(!1),[ee,V]=i.useState(!1),[O,se]=i.useState({level:100,charging:!1}),[q,_]=i.useState([]);i.useEffect(()=>{if(y.length>0){const t=Array(4).fill(0).map(()=>Math.random().toString(16).substr(2,4)).join(":").toUpperCase(),r=["ANALYZING_BITSTREAM","DECRYPTING_VFS","SYNCING_MD5","VERIFYING_RSA","EXTRACTING_SALT"],d=r[Math.floor(Math.random()*r.length)],m=`0x${t} -> ${d} [KEY_INDEX: ${y.length}]`;_(R=>[m,...R].slice(0,10))}else _([])},[y]),i.useEffect(()=>{"getBattery"in navigator&&navigator.getBattery().then(t=>{const r=()=>{se({level:Math.round(t.level*100),charging:t.charging})};r(),t.addEventListener("levelchange",r),t.addEventListener("chargingchange",r)})},[]),i.useEffect(()=>{(async()=>{try{const r=localStorage.getItem("tusharos_session"),d=localStorage.getItem("tusharos_session_time");if(r&&d){const R=parseInt(d);if(isNaN(R))localStorage.removeItem("tusharos_session_time");else{const W=Date.now()-R,Y=300*1e3;if(W<Y){T.setToken(r),n("desktop");return}else localStorage.removeItem("tusharos_session"),localStorage.removeItem("tusharos_session_time")}}T.setAuthFailureCallback(()=>{localStorage.removeItem("tusharos_session"),localStorage.removeItem("tusharos_session_time"),n("lock"),g([])});const m=await T.getSession();m&&m.valid&&n("desktop")}catch{console.log("No active session detected.")}})()},[]),i.useEffect(()=>{if(x==="boot"){const t=setInterval(()=>{a(r=>{const d=r+1;return d>=100?(clearInterval(t),setTimeout(()=>n("lock"),1200),100):d})},10);return()=>clearInterval(t)}},[x]),i.useEffect(()=>{const t=setInterval(()=>Q(new Date),1e3);return()=>clearInterval(t)},[]),i.useEffect(()=>{if(D>0){const t=setInterval(()=>L(r=>r-1),1e3);return()=>clearInterval(t)}},[D]);const J=async t=>{if(t.preventDefault(),D>0||M)return;const r=y.trim();u(!0);try{if(r==="4700")try{const m=await T.login(r);if(m.token){localStorage.setItem("tusharos_session",m.token),localStorage.setItem("tusharos_session_time",Date.now().toString()),n("desktop"),C(0),p("");return}}catch{console.log("Backend login failed, using local fallback for 4700");const R="local_session_token_4700";T.setToken(R),localStorage.setItem("tusharos_session",R),localStorage.setItem("tusharos_session_time",Date.now().toString()),n("desktop"),C(0),p("");return}const d=await T.login(r);if(d.token)localStorage.setItem("tusharos_session",d.token),localStorage.setItem("tusharos_session_time",Date.now().toString()),n("desktop"),C(0),p("");else throw new Error("Invalid password")}catch{v(!0);const m=z+1;C(m),m>=5&&L(30),setTimeout(()=>v(!1),500),p("")}finally{u(!1)}},ae=(t,r,d)=>{Z({x:t,y:r,items:d})},ce=(t,r)=>{const d=r.split(".").pop()?.toLowerCase(),m=t?`${t}/${r}`:r;d==="html"||d==="url"?$("browser",r,f.browser,{url:m}):["png","jpg","jpeg","gif","svg","webp"].includes(d||"")?$("image-viewer",r,f.image,{path:t,filename:r}):$("editor","Code Editor",f.editor,{path:t,file:r})},$=(t,r,d,m={})=>{if(l.find(Y=>Y.id===t)){g(Y=>Y.map(ne=>ne.id===t?{...ne,isMinimized:!1,zIndex:Math.max(...Y.map(X=>X.zIndex))+1}:ne)),N(t),t==="editor"&&m.file&&re.current?.openFile(m.path,m.file);return}const W={id:t,title:r,icon:d,content:ge(t,m),isOpen:!0,isMinimized:!1,isMaximized:!1,zIndex:l.length>0?Math.max(...l.map(Y=>Y.zIndex))+1:1,x:100+l.length*40,y:60+l.length*40,width:t==="search"||t==="extensions"?500:800,height:t==="search"||t==="extensions"?600:500};h!=="desktop"&&(W.width=window.innerWidth,W.height=window.innerHeight,W.x=0,W.y=0),g([...l,W]),N(t)},ge=(t,r={})=>{switch(t){case"terminal":return e.jsx(qe,{onShowContextMenu:ae});case"explorer":return e.jsx(Qe,{onOpenFile:(d,m)=>ce(d,m),onShowContextMenu:ae});case"editor":return e.jsx(Ze,{ref:d=>{re.current=d,r.file&&d?.openFile(r.path,r.file)},onShowContextMenu:ae});case"search":return e.jsx(et,{onOpenItem:(d,m)=>{pe("search"),ce(d,m)}});case"extensions":return e.jsx(tt,{});case"browser":return e.jsx(st,{initialUrl:r.url});case"image-viewer":return e.jsx(it,{path:r.path||"",filename:r.filename||""});default:return e.jsxs("div",{style:{padding:"20px"},children:["App ",t," is starting..."]})}},pe=t=>{g(r=>r.filter(d=>d.id!==t)),b===t&&N(null)},xe=t=>{g(r=>r.map(d=>d.id===t?{...d,zIndex:Math.max(...r.map(m=>m.zIndex))+1}:d)),N(t)},o=async t=>{t.preventDefault();const r=Array.from(t.dataTransfer.files);if(r.length===0)return;const d=r.map(m=>({file:m,id:Math.random().toString(36).substr(2,9),name:m.name,preview:m.type.startsWith("image/")?URL.createObjectURL(m):void 0}));F(m=>[...m,...d]),G(!0)},j=async()=>{const t=[...U];F([]),G(!1);const r=t.map(d=>({name:d.name,progress:0,status:"uploading"}));P(d=>[...d,...r]);for(const d of t){const{file:m,name:R}=d;let W=0;const Y=setInterval(()=>{W+=Math.random()*20,W>=95&&(W=95),P(ne=>ne.map(X=>X.name===R?{...X,progress:W}:X)),W>=95&&clearInterval(Y)},300);try{await T.uploadFile(R,m),clearInterval(Y),P(ne=>ne.map(X=>X.name===R?{...X,progress:100,status:"completed"}:X))}catch{clearInterval(Y),P(X=>X.map(me=>me.name===R?{...me,status:"error",progress:0}:me))}}},S=t=>{t.preventDefault()},E=()=>{localStorage.removeItem("tusharos_session"),localStorage.removeItem("tusharos_session_time"),T.setToken(null),n("boot"),a(0),g([]),V(!1)},he=()=>{localStorage.removeItem("tusharos_session"),localStorage.removeItem("tusharos_session_time"),T.setToken(null),n("lock"),g([]),V(!1)},de=()=>{K(!0),localStorage.removeItem("tusharos_session"),localStorage.removeItem("tusharos_session_time"),T.setToken(null),setTimeout(()=>{window.close(),n("lock"),K(!1),a(0)},2e3)},le=t=>{t.preventDefault(),t.target.classList.contains("desktop-area")&&A([]);const r=[{label:"New",icon:f.plus,items:[{label:"Folder",icon:f.explorer,action:()=>{const d=window.prompt("Folder name:","New Folder");d&&T.mkdir(d).then(()=>window.location.reload())}},{label:"Text File",icon:f.editor,action:()=>{const d=window.prompt("Filename:","note.txt");d&&T.saveFile(d,"").then(()=>window.location.reload())}}]},{label:"Refresh",icon:f.refresh,action:()=>window.location.reload()},{separator:!0},{label:"Sort By",items:[{label:"Name",action:()=>console.log("Sort by Name")},{label:"Date Modified",action:()=>console.log("Sort by Date")},{label:"Type",action:()=>console.log("Sort by Type")}]},{label:"View",items:[{label:"Icons (Large)",action:()=>console.log("Large Icons")},{label:"Icons (Medium)",action:()=>console.log("Medium Icons")},{label:"Icons (Small)",action:()=>console.log("Small Icons")},{separator:!0},{label:"Show Grid",action:()=>console.log("Show Grid")}]},{separator:!0},{label:"Settings",icon:f.settings,action:()=>console.log("Settings")},{label:"System Info",icon:f.info,action:()=>console.log("System Info")}];ae(t.clientX,t.clientY,r)},Le=t=>{if(t.width===0&&t.height===0)return;const r=[];Object.entries(ie.current).forEach(([d,m])=>{if(!m)return;const R=m.getBoundingClientRect();t.x<R.right&&t.x+t.width>R.left&&t.y<R.bottom&&t.y+t.height>R.top&&r.push(d)}),A(r)};return e.jsxs("div",{className:"os-container",style:{position:"relative",background:"transparent"},children:[e.jsxs("div",{style:{position:"fixed",top:2,left:2,fontSize:"8px",color:"rgba(0,229,255,0.4)",zIndex:1e5,pointerEvents:"none"},children:["TOS_MOUNTED_STAGE_",x.toUpperCase()]}),(x==="boot"||x==="lock"||x==="desktop")&&e.jsx("video",{autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"os-video-bg",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",zIndex:0,pointerEvents:"none"},children:e.jsx("source",{src:x==="desktop"?"/videos/os-wallpaper.mp4":"/videos/lockscreenwallpaper.mp4",type:"video/mp4"})},x==="desktop"?"desktop-bg":"lock-bg"),x==="boot"&&e.jsxs("div",{className:"boot-screen",children:[e.jsxs("div",{className:"modern-loader",children:[e.jsxs("svg",{width:"100",height:"100",viewBox:"0 0 100 100",children:[e.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"rgba(0,229,255,0.1)",strokeWidth:"2"}),e.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"none",stroke:"var(--os-primary)",strokeWidth:"2",strokeDasharray:"283",strokeDashoffset:283-283*s/100,style:{transition:"stroke-dashoffset 0.1s linear",transform:"rotate(-90deg)",transformOrigin:"50% 50%"}}),e.jsx("path",{d:"M30 50 L45 65 L70 35",fill:"none",stroke:"var(--os-primary)",strokeWidth:"3",style:{opacity:s===100?1:0,transition:"opacity 0.3s"}})]}),e.jsx("div",{className:"loader-inner-glow"})]}),e.jsx("div",{className:"loading-bar-container",style:{width:"200px",marginTop:"40px"},children:e.jsx("div",{className:"loading-bar-fill",style:{width:`${s}%`}})})]}),x==="lock"&&e.jsx("div",{className:"lock-screen",children:e.jsxs("div",{className:"lock-box",children:[D>0?e.jsxs("div",{style:{color:"#ff4444",marginBottom:"20px",fontFamily:"monospace"},children:["ACCESS DENIED. RETRY IN ",D,"s"]}):e.jsxs("div",{style:{position:"relative",width:"100%"},children:[e.jsx("form",{onSubmit:J,style:{width:"100%",position:"relative",zIndex:10},children:e.jsx("input",{type:"password",className:`password-input ${k?"shake":""}`,placeholder:M?"DECRYPTING...":"ACCESS KEY",value:y,onChange:t=>p(t.target.value),disabled:M,autoFocus:!0})}),y.length>0&&!k&&e.jsx("div",{className:"decryption-connector"}),e.jsx(ue,{children:y.length>0&&!k&&e.jsx(fe.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"decryption-terminal mini",style:{position:"absolute",top:"100%",left:"0",marginTop:"20px"},children:e.jsxs("div",{className:"terminal-content",children:[q.slice(0,4).map((t,r)=>e.jsx("div",{className:"terminal-log",children:t},r)),e.jsxs("div",{className:"terminal-typing-line",style:{display:"flex",justifyContent:"space-between"},children:[e.jsx("span",{children:"HASH_AUTO_GEN:"}),e.jsxs("span",{style:{fontFamily:"monospace",color:"#fff"},children:[Math.random().toString(36).substring(2,10).toUpperCase(),Math.random().toString(36).substring(2,6).toUpperCase()]})]})]})})}),e.jsx(ue,{children:k&&e.jsxs(fe.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:10},exit:{opacity:0,y:-10},style:{color:"#ff4444",fontSize:"0.7rem",textAlign:"left",marginLeft:"30px",fontFamily:"JetBrains Mono",fontWeight:"bold",letterSpacing:"2px",borderLeft:"2px solid #ff4444",paddingLeft:"10px"},children:[">"," ACCESS_DENIED: INVALID_ENCRYPTION_KEY"]})})]}),e.jsx("div",{style:{marginTop:"30px",fontSize:"0.6rem",color:"rgba(255,255,255,0.3)",letterSpacing:"2px"},children:"SECURE ACCESS PORTAL V1.0"})]})}),x==="desktop"&&h==="desktop"&&e.jsxs("div",{className:"desktop-area",style:{position:"absolute",inset:0,backgroundColor:"transparent",display:"flex",flexDirection:"column",overflow:"hidden",zIndex:1},onContextMenu:le,onDrop:o,onDragOver:S,onMouseDown:t=>{t.target.classList.contains("desktop-area")&&A([])},children:[e.jsx(at,{onSelectionChange:Le}),e.jsx("div",{className:"desktop-icons-grid",children:[{id:"explorer",name:"THIS PC",icon:f.explorer},{id:"settings",name:"SETTINGS",icon:f.settings}].map(t=>e.jsxs("div",{ref:r=>{ie.current[t.id]=r},className:`desktop-icon ${te.includes(t.id)?"selected":""}`,onDoubleClick:()=>$(t.id,t.name,t.icon),onMouseDown:r=>{r.stopPropagation(),!r.ctrlKey&&!te.includes(t.id)?A([t.id]):r.ctrlKey&&A(d=>d.includes(t.id)?d.filter(m=>m!==t.id):[...d,t.id])},onContextMenu:r=>{r.stopPropagation(),r.preventDefault(),te.includes(t.id)||A([t.id]),ae(r.clientX,r.clientY,[{label:"Open",icon:f.explorer,action:()=>$(t.id,t.name,t.icon)},{label:"Run as Administrator",icon:f.shield,action:()=>console.log("Admin Run")},{separator:!0},{label:"Pin to Taskbar",icon:f.pin,action:()=>console.log("Pin")},{label:"Open File Location",icon:f.explorer,action:()=>console.log("File Loc")},{separator:!0},{label:"Properties",icon:f.properties,action:()=>console.log("Properties")}])},children:[e.jsx("div",{className:"icon-visual",children:t.icon}),e.jsx("div",{className:"icon-label",children:t.name})]},t.id))}),l.map(t=>!t.isMinimized&&e.jsx(Ge,{id:t.id,title:t.title,icon:t.icon,active:b===t.id,zIndex:t.zIndex,initialX:t.x,initialY:t.y,initialWidth:t.width,initialHeight:t.height,onClose:()=>pe(t.id),onMinimize:()=>g(r=>r.map(d=>d.id===t.id?{...d,isMinimized:!0}:d)),onFocus:()=>xe(t.id),children:t.content},t.id)),e.jsxs("div",{className:"taskbar",children:[e.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:e.jsx("div",{className:`start-btn ${ee?"active":""}`,onClick:()=>V(!ee),style:{background:ee?"rgba(255,255,255,0.1)":"transparent",padding:"8px",borderRadius:"8px",cursor:"pointer",transition:"all 0.3s"},children:e.jsx("img",{src:"/assets/images/logo.png",alt:"Start",style:{width:"22px",filter:"drop-shadow(0 0 5px rgba(0,229,255,0.4))"}})})}),e.jsx(ue,{children:ee&&e.jsxs(fe.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},className:"start-menu",children:[e.jsxs("div",{style:{padding:"24px",display:"flex",alignItems:"center",gap:"15px",background:"rgba(255,255,255,0.03)"},children:[e.jsx("img",{src:"/assets/images/logo.png",style:{width:"40px",height:"40px",borderRadius:"50%",border:"1px solid var(--os-primary)"},alt:"User"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("span",{style:{fontSize:"0.9rem",fontWeight:"bold",color:"#fff"},children:"Tushar Rathod"}),e.jsx("span",{style:{fontSize:"0.65rem",color:"var(--os-primary)",letterSpacing:"1px"},children:"SYSTEM ADMINISTRATOR"})]})]}),e.jsx("div",{style:{flex:1,padding:"20px",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"15px"},children:[{id:"explorer",name:"Files",icon:f.explorer},{id:"browser",name:"Web",icon:f.browser},{id:"editor",name:"Code",icon:f.editor},{id:"terminal",name:"Shell",icon:f.terminal},{id:"search",name:"Find",icon:f.search},{id:"settings",name:"Config",icon:f.settings}].map(t=>e.jsxs("div",{className:"power-btn-hover",onClick:()=>{$(t.id,t.name,t.icon),V(!1)},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"12px",cursor:"pointer"},children:[e.jsx("div",{style:{transform:"scale(1.2)"},children:t.icon}),e.jsx("span",{style:{fontSize:"0.7rem",opacity:.7},children:t.name})]},t.id))}),e.jsxs("div",{className:"start-menu-footer",children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",opacity:.8,fontSize:"0.8rem"},children:[e.jsx("span",{children:"Session:"}),e.jsx("span",{style:{color:"var(--os-primary)"},children:"Active"})]}),e.jsxs("div",{style:{display:"flex",gap:"8px"},children:[e.jsx("button",{onClick:he,title:"Log Out",style:{background:"rgba(255,255,255,0.05)",border:"none",color:"#fff",padding:"10px",borderRadius:"6px",cursor:"pointer",display:"flex"},className:"power-btn-hover",children:f.logout}),e.jsx("button",{onClick:E,title:"Restart",style:{background:"rgba(255,255,255,0.05)",border:"none",color:"#fff",padding:"10px",borderRadius:"6px",cursor:"pointer",display:"flex"},className:"power-btn-hover",children:f.restart}),e.jsx("button",{onClick:de,title:"Power Off",style:{background:"rgba(255,77,77,0.15)",border:"none",color:"#ff4d4d",padding:"10px",borderRadius:"6px",cursor:"pointer",display:"flex"},className:"power-btn-hover",children:f.shutdown})]})]})]})}),e.jsx("div",{className:"taskbar-items",style:{left:"50%",transform:"translateX(-50%)",position:"absolute"},children:l.map(t=>e.jsx("div",{className:`taskbar-item ${b===t.id?"active":""} ${t.isMinimized?"minimized":""}`,onClick:()=>{t.isMinimized||b!==t.id?(g(r=>r.map(d=>d.id===t.id?{...d,isMinimized:!1,zIndex:Math.max(...r.map(m=>m.zIndex))+1}:d)),N(t.id)):g(r=>r.map(d=>d.id===t.id?{...d,isMinimized:!0}:d))},children:t.icon},t.id))}),e.jsxs("div",{className:"taskbar-right",style:{display:"flex",alignItems:"center",gap:"15px"},children:[e.jsxs("div",{className:"battery-status",style:{display:"flex",alignItems:"center",gap:"8px",cursor:"help"},title:`Battery: ${O.level}% ${O.charging?"(Charging)":""}`,children:[e.jsxs("span",{style:{fontSize:"0.75rem",opacity:.8,fontWeight:"500"},children:[O.level,"%"]}),f.battery(O.level,O.charging)]}),e.jsxs("div",{className:"clock",style:{textAlign:"right",fontSize:"0.75rem",lineHeight:"1.2"},children:[e.jsx("div",{style:{fontWeight:"bold"},children:I.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),e.jsx("div",{style:{fontSize:"0.65rem",opacity:.6},children:I.toLocaleDateString([],{day:"2-digit",month:"2-digit"})})]})]})]}),e.jsx(nt,{tasks:w,onClose:()=>P([])}),e.jsx(ue,{children:H&&e.jsx(rt,{files:U,onCancel:t=>F(r=>r.filter(d=>d.id!==t)),onRename:(t,r)=>F(d=>d.map(m=>m.id===t?{...m,name:r}:m)),onConfirm:j,onClose:()=>{G(!1),F([])}})}),oe&&e.jsxs("div",{style:{position:"fixed",inset:0,background:"#000",zIndex:99999,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"var(--os-primary)",fontFamily:"monospace",letterSpacing:"5px"},children:[e.jsx("div",{className:"spinner",style:{fontSize:"3rem",marginBottom:"25px",animation:"spin 2s linear infinite",color:"var(--os-primary)"},children:f.bolt}),e.jsx("div",{style:{fontSize:"1rem",fontWeight:"bold"},children:"SYSTEM SHUTTING DOWN..."})]})]}),x==="desktop"&&h!=="desktop"&&e.jsxs("div",{className:"mobile-os-area",style:{height:"100%",display:"flex",flexDirection:"column",background:"transparent"},children:[e.jsxs("div",{className:"mobile-status-bar",style:{display:"flex",justifyContent:"space-between",padding:"10px 24px",fontSize:"0.8rem",color:"#fff",alignItems:"center"},children:[e.jsx("span",{children:I.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center",marginRight:"5px",opacity:.8},children:[e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M5 12.55a11 11 0 0 1 14.08 0"}),e.jsx("path",{d:"M1.42 9a16 16 0 0 1 21.16 0"}),e.jsx("path",{d:"M8.53 16.11a6 6 0 0 1 6.95 0"}),e.jsx("line",{x1:"12",y1:"20",x2:"12.01",y2:"20"})]}),e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M2 20h.01"}),e.jsx("path",{d:"M7 20v-4"}),e.jsx("path",{d:"M12 20v-8"}),e.jsx("path",{d:"M17 20V8"}),e.jsx("path",{d:"M22 4v16"})]})]}),e.jsxs("span",{children:[O.level,"%"]}),e.jsx("div",{style:{transform:"scale(0.8)",display:"flex"},children:f.battery(O.level,O.charging)})]})]}),e.jsx("div",{className:"mobile-home-screen",children:[{id:"explorer",name:"Files",icon:f.explorer},{id:"editor",name:"Code",icon:f.editor},{id:"terminal",name:"Terminal",icon:f.terminal},{id:"browser",name:"Web",icon:f.browser},{id:"search",name:"Search",icon:f.search},{id:"settings",name:"Settings",icon:f.settings},{id:"github",name:"GitHub",icon:f.github},{id:"linkedin",name:"LinkedIn",icon:f.linkedin},{id:"twitter",name:"Twitter",icon:f.twitter},{id:"whatsapp",name:"WhatsApp",icon:f.whatsapp},{id:"mail",name:"Mail",icon:f.logout},{id:"music",name:"Music",icon:f.bolt},{id:"camera",name:"Camera",icon:f.shield},{id:"projects",name:"Projects",icon:f.plus},{id:"info",name:"About",icon:f.info},{id:"docs",name:"Docs",icon:f.file}].map(t=>e.jsxs("div",{className:"mobile-icon",onClick:()=>$(t.id,t.name,t.icon),children:[e.jsx("div",{className:"icon-visual",children:t.icon}),e.jsx("div",{className:"icon-label",children:t.name})]},t.id))}),l.length>0&&l.some(t=>!t.isMinimized)&&e.jsx("div",{className:"mobile-window-full slide-up",children:l.filter(t=>!t.isMinimized).map(t=>e.jsxs("div",{style:{height:"100%",display:t.id===b?"block":"none"},children:[e.jsx("button",{className:"mobile-back-btn",onClick:()=>g(r=>r.map(d=>d.id===t.id?{...d,isMinimized:!0}:d)),children:"← BACK"}),e.jsx("div",{style:{height:"100%",paddingTop:"80px"},children:t.content})]},t.id))}),e.jsxs("div",{className:"mobile-dock",children:[e.jsx("div",{onClick:()=>$("explorer","Files",f.explorer),children:f.explorer}),e.jsx("div",{onClick:()=>$("editor","Code",f.editor),children:f.editor}),e.jsx("div",{onClick:()=>$("terminal","Terminal",f.terminal),children:f.terminal}),e.jsx("div",{onClick:()=>$("browser","Web",f.browser),children:f.browser})]})]}),B&&e.jsx(ot,{x:B.x,y:B.y,items:B.items,onClose:()=>Z(null)})]})};Ve.createRoot(document.getElementById("os-root")).render(e.jsx(we.StrictMode,{children:e.jsx(lt,{})}));
|