9remote 3.0.6 → 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +43 -43
- package/dist/server.cjs +228 -209
- package/dist/ui/assets/index-D68zm5P3.js +8 -0
- package/dist/ui/index.html +1 -1
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +2 -2
- package/dist/web/__next._full.txt +3 -3
- package/dist/web/__next._head.txt +1 -1
- package/dist/web/__next._index.txt +2 -2
- package/dist/web/__next._tree.txt +2 -2
- package/dist/web/_next/static/chunks/1750.0aa6aeecbaace8cb.js +1 -0
- package/dist/web/_next/static/chunks/5018-0af0eec430de34c7.js +86 -0
- package/dist/web/_next/static/chunks/6552-26435ba7e21d8241.js +1 -0
- package/dist/web/_next/static/chunks/774-72d0e3531439cf1c.js +1 -0
- package/dist/web/_next/static/chunks/8439-43c6c0f6514a09d9.js +1 -0
- package/dist/web/_next/static/chunks/9958-448e936357b2d620.js +1 -0
- package/dist/web/_next/static/chunks/app/admin/admins/{page-4dd3a5a797a983ab.js → page-55a5b7d9e2cce009.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/login/{page-854bcdcb805c63c8.js → page-0ee5816b25a58124.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/modes/{page-b0675a3cdae87688.js → page-4a42062c1aa3bdfe.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/ota/{page-6de419e03b4822ef.js → page-f933a80b41b1fa71.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/{page-ae83026dc795c35b.js → page-9af75732b2cda9b6.js} +1 -1
- package/dist/web/_next/static/chunks/app/admin/turn/{page-8eb4a8792fca9bd9.js → page-fbb8e50d077e6051.js} +1 -1
- package/dist/web/_next/static/chunks/app/dev/question/page-c28a92f80ec9e5a7.js +1 -0
- package/dist/web/_next/static/chunks/app/login/page-0808c3505c028b76.js +1 -0
- package/dist/web/_next/static/chunks/app/page-713809a139d63806.js +22 -0
- package/dist/web/_next/static/chunks/app/workspace/layout-a0c555254829e1bf.js +14 -0
- package/dist/web/_next/static/chunks/{webpack-210219beafaa52a1.js → webpack-d869f11e68050bab.js} +1 -1
- package/dist/web/_next/static/css/98e745d5833fdea2.css +1 -0
- package/dist/web/_not-found/__next._full.txt +2 -2
- package/dist/web/_not-found/__next._head.txt +1 -1
- package/dist/web/_not-found/__next._index.txt +2 -2
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/web/_not-found/__next._not-found.txt +1 -1
- package/dist/web/_not-found/__next._tree.txt +2 -2
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +2 -2
- package/dist/web/admin/__next._full.txt +3 -3
- package/dist/web/admin/__next._head.txt +1 -1
- package/dist/web/admin/__next._index.txt +2 -2
- package/dist/web/admin/__next._tree.txt +2 -2
- package/dist/web/admin/__next.admin.__PAGE__.txt +2 -2
- package/dist/web/admin/__next.admin.txt +1 -1
- package/dist/web/admin/admins/__next._full.txt +3 -3
- package/dist/web/admin/admins/__next._head.txt +1 -1
- package/dist/web/admin/admins/__next._index.txt +2 -2
- package/dist/web/admin/admins/__next._tree.txt +2 -2
- package/dist/web/admin/admins/__next.admin.admins.__PAGE__.txt +2 -2
- package/dist/web/admin/admins/__next.admin.admins.txt +1 -1
- package/dist/web/admin/admins/__next.admin.txt +1 -1
- package/dist/web/admin/admins.html +1 -1
- package/dist/web/admin/admins.txt +3 -3
- package/dist/web/admin/login/__next._full.txt +3 -3
- package/dist/web/admin/login/__next._head.txt +1 -1
- package/dist/web/admin/login/__next._index.txt +2 -2
- package/dist/web/admin/login/__next._tree.txt +2 -2
- package/dist/web/admin/login/__next.admin.login.__PAGE__.txt +2 -2
- package/dist/web/admin/login/__next.admin.login.txt +1 -1
- package/dist/web/admin/login/__next.admin.txt +1 -1
- package/dist/web/admin/login.html +1 -1
- package/dist/web/admin/login.txt +3 -3
- package/dist/web/admin/modes/__next._full.txt +3 -3
- package/dist/web/admin/modes/__next._head.txt +1 -1
- package/dist/web/admin/modes/__next._index.txt +2 -2
- package/dist/web/admin/modes/__next._tree.txt +2 -2
- package/dist/web/admin/modes/__next.admin.modes.__PAGE__.txt +2 -2
- package/dist/web/admin/modes/__next.admin.modes.txt +1 -1
- package/dist/web/admin/modes/__next.admin.txt +1 -1
- package/dist/web/admin/modes.html +1 -1
- package/dist/web/admin/modes.txt +3 -3
- package/dist/web/admin/ota/__next._full.txt +3 -3
- package/dist/web/admin/ota/__next._head.txt +1 -1
- package/dist/web/admin/ota/__next._index.txt +2 -2
- package/dist/web/admin/ota/__next._tree.txt +2 -2
- package/dist/web/admin/ota/__next.admin.ota.__PAGE__.txt +2 -2
- package/dist/web/admin/ota/__next.admin.ota.txt +1 -1
- package/dist/web/admin/ota/__next.admin.txt +1 -1
- package/dist/web/admin/ota.html +1 -1
- package/dist/web/admin/ota.txt +3 -3
- package/dist/web/admin/turn/__next._full.txt +3 -3
- package/dist/web/admin/turn/__next._head.txt +1 -1
- package/dist/web/admin/turn/__next._index.txt +2 -2
- package/dist/web/admin/turn/__next._tree.txt +2 -2
- package/dist/web/admin/turn/__next.admin.turn.__PAGE__.txt +2 -2
- package/dist/web/admin/turn/__next.admin.turn.txt +1 -1
- package/dist/web/admin/turn/__next.admin.txt +1 -1
- package/dist/web/admin/turn.html +1 -1
- package/dist/web/admin/turn.txt +3 -3
- package/dist/web/admin.html +1 -1
- package/dist/web/admin.txt +3 -3
- package/dist/web/agent-icons/claude.png +0 -0
- package/dist/web/agent-icons/hermes-ui.png +0 -0
- package/dist/web/dev/question/__next._full.txt +3 -3
- package/dist/web/dev/question/__next._head.txt +1 -1
- package/dist/web/dev/question/__next._index.txt +2 -2
- package/dist/web/dev/question/__next._tree.txt +2 -2
- package/dist/web/dev/question/__next.dev.question.__PAGE__.txt +2 -2
- package/dist/web/dev/question/__next.dev.question.txt +1 -1
- package/dist/web/dev/question/__next.dev.txt +1 -1
- package/dist/web/dev/question.html +1 -1
- package/dist/web/dev/question.txt +3 -3
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +3 -3
- package/dist/web/login/__next._full.txt +3 -3
- package/dist/web/login/__next._head.txt +1 -1
- package/dist/web/login/__next._index.txt +2 -2
- package/dist/web/login/__next._tree.txt +2 -2
- package/dist/web/login/__next.login.__PAGE__.txt +2 -2
- package/dist/web/login/__next.login.txt +1 -1
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +3 -3
- package/dist/web/workspace/__next._full.txt +3 -3
- package/dist/web/workspace/__next._head.txt +1 -1
- package/dist/web/workspace/__next._index.txt +2 -2
- package/dist/web/workspace/__next._tree.txt +2 -2
- package/dist/web/workspace/__next.workspace.__PAGE__.txt +1 -1
- package/dist/web/workspace/__next.workspace.txt +2 -2
- package/dist/web/workspace/browse/__next._full.txt +3 -3
- package/dist/web/workspace/browse/__next._head.txt +1 -1
- package/dist/web/workspace/browse/__next._index.txt +2 -2
- package/dist/web/workspace/browse/__next._tree.txt +2 -2
- package/dist/web/workspace/browse/__next.workspace.browse.__PAGE__.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.browse.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.txt +2 -2
- package/dist/web/workspace/browse.html +1 -1
- package/dist/web/workspace/browse.txt +3 -3
- package/dist/web/workspace/editor/__next._full.txt +3 -3
- package/dist/web/workspace/editor/__next._head.txt +1 -1
- package/dist/web/workspace/editor/__next._index.txt +2 -2
- package/dist/web/workspace/editor/__next._tree.txt +2 -2
- package/dist/web/workspace/editor/__next.workspace.editor.__PAGE__.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.editor.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.txt +2 -2
- package/dist/web/workspace/editor.html +1 -1
- package/dist/web/workspace/editor.txt +3 -3
- package/dist/web/workspace/files/__next._full.txt +3 -3
- package/dist/web/workspace/files/__next._head.txt +1 -1
- package/dist/web/workspace/files/__next._index.txt +2 -2
- package/dist/web/workspace/files/__next._tree.txt +2 -2
- package/dist/web/workspace/files/__next.workspace.files.__PAGE__.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.files.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.txt +2 -2
- package/dist/web/workspace/files.html +1 -1
- package/dist/web/workspace/files.txt +3 -3
- package/dist/web/workspace/git/__next._full.txt +3 -3
- package/dist/web/workspace/git/__next._head.txt +1 -1
- package/dist/web/workspace/git/__next._index.txt +2 -2
- package/dist/web/workspace/git/__next._tree.txt +2 -2
- package/dist/web/workspace/git/__next.workspace.git.__PAGE__.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.git.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.txt +2 -2
- package/dist/web/workspace/git.html +1 -1
- package/dist/web/workspace/git.txt +3 -3
- package/dist/web/workspace/mobile/__next._full.txt +3 -3
- package/dist/web/workspace/mobile/__next._head.txt +1 -1
- package/dist/web/workspace/mobile/__next._index.txt +2 -2
- package/dist/web/workspace/mobile/__next._tree.txt +2 -2
- package/dist/web/workspace/mobile/__next.workspace.mobile.__PAGE__.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.mobile.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.txt +2 -2
- package/dist/web/workspace/mobile.html +1 -1
- package/dist/web/workspace/mobile.txt +3 -3
- package/dist/web/workspace/remote/__next._full.txt +3 -3
- package/dist/web/workspace/remote/__next._head.txt +1 -1
- package/dist/web/workspace/remote/__next._index.txt +2 -2
- package/dist/web/workspace/remote/__next._tree.txt +2 -2
- package/dist/web/workspace/remote/__next.workspace.remote.__PAGE__.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.remote.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.txt +2 -2
- package/dist/web/workspace/remote.html +1 -1
- package/dist/web/workspace/remote.txt +3 -3
- package/dist/web/workspace/terminal/default/__next._full.txt +3 -3
- package/dist/web/workspace/terminal/default/__next._head.txt +1 -1
- package/dist/web/workspace/terminal/default/__next._index.txt +2 -2
- package/dist/web/workspace/terminal/default/__next._tree.txt +2 -2
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.__PAGE__.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.txt +2 -2
- package/dist/web/workspace/terminal/default.html +1 -1
- package/dist/web/workspace/terminal/default.txt +3 -3
- package/dist/web/workspace/workspaces/__next._full.txt +3 -3
- package/dist/web/workspace/workspaces/__next._head.txt +1 -1
- package/dist/web/workspace/workspaces/__next._index.txt +2 -2
- package/dist/web/workspace/workspaces/__next._tree.txt +2 -2
- package/dist/web/workspace/workspaces/__next.workspace.txt +2 -2
- package/dist/web/workspace/workspaces/__next.workspace.workspaces.__PAGE__.txt +1 -1
- package/dist/web/workspace/workspaces/__next.workspace.workspaces.txt +1 -1
- package/dist/web/workspace/workspaces.html +1 -1
- package/dist/web/workspace/workspaces.txt +3 -3
- package/dist/web/workspace.html +1 -1
- package/dist/web/workspace.txt +3 -3
- package/package.json +1 -1
- package/dist/ui/assets/index-CMq_mLzM.js +0 -8
- package/dist/web/_next/static/chunks/1750.a35b00a05b21d196.js +0 -1
- package/dist/web/_next/static/chunks/3973-919fa2e493564fcf.js +0 -1
- package/dist/web/_next/static/chunks/6552-5bb346448e83e0a2.js +0 -1
- package/dist/web/_next/static/chunks/7738-2439d4a20b745ce1.js +0 -1
- package/dist/web/_next/static/chunks/8516-b3694c9156666b12.js +0 -152
- package/dist/web/_next/static/chunks/9958-9952a61eb6e17812.js +0 -1
- package/dist/web/_next/static/chunks/app/dev/question/page-a58ae088ccc40553.js +0 -1
- package/dist/web/_next/static/chunks/app/login/page-d42b178c6f11f6d3.js +0 -1
- package/dist/web/_next/static/chunks/app/page-10772fa3d9560889.js +0 -22
- package/dist/web/_next/static/chunks/app/workspace/layout-475b254e83019cb1.js +0 -14
- package/dist/web/_next/static/css/48ee7d57614b1421.css +0 -1
- package/dist/web/agent-icons/claude.svg +0 -1
- /package/dist/web/_next/static/{1Tr76v17cPEsysWpe5buJ → WHp5d7WTHBHyfu2RWtrXR}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{1Tr76v17cPEsysWpe5buJ → WHp5d7WTHBHyfu2RWtrXR}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{16064:(e,s,t)=>{Promise.resolve().then(t.bind(t,91758))},80186:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(73365);function r({children:e,variant:s="primary",size:t="md",disabled:n=!1,loading:i=!1,onClick:d,className:l="",...c}){let x=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[s]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[t]} ${n||i?"cursor-not-allowed":""} ${l}`;return(0,a.jsx)("button",{onClick:d,disabled:n||i,className:x,...c,children:i?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},91758:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>p});var a=t(73365),r=t(1521),n=t(38334),i=t(80186),d=t(96042),l=t(64683),c=t(39457),x=t(24945),o=t(57042);let m={id:"",name:"",permissions:[]};function p(){let{can:e}=(0,x.b)(),{get:s,post:t,patch:p,del:u}=(0,c.Z)(),[b,h]=(0,r.useState)([]),[g,f]=(0,r.useState)(m),[j,N]=(0,r.useState)(null),[y,v]=(0,r.useState)(""),w=e(o.Jj.modeManage),k=(0,r.useCallback)(async()=>{h((await s(o.lb.modes)).items||[])},[s]);(0,r.useEffect)(()=>{k()},[k]);let C=()=>{N(null),f(m),v("")},$=async()=>{v("");try{if(j)await p(`${o.lb.modes}/${j}`,{name:g.name,permissions:g.permissions});else{if(!g.id||!g.name)return void v("ID and name are required");await t(o.lb.modes,g)}C(),k()}catch(e){v(e.message)}},_=async e=>{if(confirm(`Delete mode ${e}?`))try{await u(`${o.lb.modes}/${e}`),k()}catch(e){alert(e.message)}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(l.ek,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Modes & Permissions"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Configure security roles and granular permission sets"})]})}),w&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4 relative overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2",children:j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Edit role:"}),(0,a.jsx)("span",{className:"font-mono text-brand-500 font-bold",children:j})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Create New Security Mode"})]})}),j&&(0,a.jsxs)("button",{onClick:C,className:"text-xs text-text-muted hover:text-text flex items-center gap-1",children:[(0,a.jsx)(l.X,{size:14})," Cancel"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsx)(d.A,{label:"Mode ID",value:g.id,onChange:e=>f({...g,id:e.target.value}),disabled:!!j,placeholder:"e.g. support-lead"}),(0,a.jsx)(d.A,{label:"Display Name",value:g.name,onChange:e=>f({...g,name:e.target.value}),placeholder:"e.g. Support Team Lead"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-2.5",children:"Permissions Granted"}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:o.r6.map(e=>{let s=g.permissions.includes(e);return(0,a.jsxs)("button",{type:"button",onClick:()=>{f(s=>({...s,permissions:s.permissions.includes(e)?s.permissions.filter(s=>s!==e):[...s.permissions,e]}))},className:`flex items-center justify-between px-3 py-2 rounded-xl text-xs font-mono border transition-all text-left ${s?"bg-brand-500/12 text-brand-500 border-brand-500/30 shadow-[0_2px_8px_-2px_rgba(255,87,10,0.2)]":"bg-surface-2/60 text-text-muted border-border-subtle hover:bg-surface-2 hover:text-text"}`,children:[(0,a.jsx)("span",{className:"truncate",children:e}),s?(0,a.jsx)(l.aJ,{size:13,className:"text-brand-500 shrink-0 ml-1.5"}):null]},e)})})]}),y&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-2.5 rounded-lg border border-red-500/20",children:y}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsx)(i.A,{variant:"primary",onClick:$,className:"rounded-xl px-4 py-2",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold",children:[(0,a.jsx)(l.eM,{size:14}),(0,a.jsx)("span",{children:j?"Save Changes":"Create Mode"})]})}),j&&(0,a.jsx)(i.A,{variant:"secondary",onClick:C,className:"rounded-xl px-4 py-2 text-xs",children:"Cancel"})]})]}),(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"ID"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Role Name"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Assigned Permissions"}),w&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:b.map(e=>{let s=[];try{s="string"==typeof e.permissions?JSON.parse(e.permissions):e.permissions}catch{s=[]}return(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-3.5 font-mono text-xs font-semibold text-text",children:e.id}),(0,a.jsx)("td",{className:"px-4 py-3.5 font-medium text-text",children:e.name}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1 max-w-md",children:s.map(e=>(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-md bg-surface-2 border border-border-subtle text-[10px] font-mono text-text-muted",children:e},e))})}),w&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>(e=>{let s=[];try{s="string"==typeof e.permissions?JSON.parse(e.permissions):e.permissions}catch{s=[]}N(e.id),f({id:e.id,name:e.name,permissions:s})})(e),className:"text-xs text-brand-500 hover:text-brand-400 font-medium px-2 py-1 rounded hover:bg-brand-500/10 transition-colors",children:"Edit"}),(0,a.jsx)("button",{onClick:()=>_(e.id),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete mode",children:(0,a.jsx)(l.TB,{size:15})})]})})]},e.id)})})]})})]})})}},96042:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(73365);function r({label:e,type:s="text",value:t,onChange:n,onKeyDown:i,placeholder:d,disabled:l=!1,error:c,className:x="",...o}){let m=c?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",p=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${m} ${l?"opacity-50 cursor-not-allowed":""} ${x}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:s,value:t,onChange:n,onKeyDown:i,placeholder:d,disabled:l,className:p,...o}),c&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:c})]})}}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[589],{16064:(e,s,t)=>{Promise.resolve().then(t.bind(t,91758))},80186:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(73365);function r({children:e,variant:s="primary",size:t="md",disabled:n=!1,loading:i=!1,onClick:d,className:l="",...c}){let x=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[s]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[t]} ${n||i?"cursor-not-allowed":""} ${l}`;return(0,a.jsx)("button",{onClick:d,disabled:n||i,className:x,...c,children:i?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},91758:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>p});var a=t(73365),r=t(1521),n=t(38334),i=t(80186),d=t(96042),l=t(64683),c=t(39457),x=t(24945),o=t(57042);let m={id:"",name:"",permissions:[]};function p(){let{can:e}=(0,x.b)(),{get:s,post:t,patch:p,del:u}=(0,c.Z)(),[b,h]=(0,r.useState)([]),[g,f]=(0,r.useState)(m),[j,N]=(0,r.useState)(null),[y,v]=(0,r.useState)(""),w=e(o.Jj.modeManage),k=(0,r.useCallback)(async()=>{h((await s(o.lb.modes)).items||[])},[s]);(0,r.useEffect)(()=>{k()},[k]);let C=()=>{N(null),f(m),v("")},$=async()=>{v("");try{if(j)await p(`${o.lb.modes}/${j}`,{name:g.name,permissions:g.permissions});else{if(!g.id||!g.name)return void v("ID and name are required");await t(o.lb.modes,g)}C(),k()}catch(e){v(e.message)}},_=async e=>{if(confirm(`Delete mode ${e}?`))try{await u(`${o.lb.modes}/${e}`),k()}catch(e){alert(e.message)}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(l.ek,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Modes & Permissions"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Configure security roles and granular permission sets"})]})}),w&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4 relative overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2",children:j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Edit role:"}),(0,a.jsx)("span",{className:"font-mono text-brand-500 font-bold",children:j})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Create New Security Mode"})]})}),j&&(0,a.jsxs)("button",{onClick:C,className:"text-xs text-text-muted hover:text-text flex items-center gap-1",children:[(0,a.jsx)(l.X,{size:14})," Cancel"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsx)(d.A,{label:"Mode ID",value:g.id,onChange:e=>f({...g,id:e.target.value}),disabled:!!j,placeholder:"e.g. support-lead"}),(0,a.jsx)(d.A,{label:"Display Name",value:g.name,onChange:e=>f({...g,name:e.target.value}),placeholder:"e.g. Support Team Lead"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-2.5",children:"Permissions Granted"}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:o.r6.map(e=>{let s=g.permissions.includes(e);return(0,a.jsxs)("button",{type:"button",onClick:()=>{f(s=>({...s,permissions:s.permissions.includes(e)?s.permissions.filter(s=>s!==e):[...s.permissions,e]}))},className:`flex items-center justify-between px-3 py-2 rounded-xl text-xs font-mono border transition-all text-left ${s?"bg-brand-500/12 text-brand-500 border-brand-500/30 shadow-[0_2px_8px_-2px_rgba(255,87,10,0.2)]":"bg-surface-2/60 text-text-muted border-border-subtle hover:bg-surface-2 hover:text-text"}`,children:[(0,a.jsx)("span",{className:"truncate",children:e}),s?(0,a.jsx)(l.aJ,{size:13,className:"text-brand-500 shrink-0 ml-1.5"}):null]},e)})})]}),y&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-2.5 rounded-lg border border-red-500/20",children:y}),(0,a.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,a.jsx)(i.A,{variant:"primary",onClick:$,className:"rounded-xl px-4 py-2",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs font-semibold",children:[(0,a.jsx)(l.eM,{size:14}),(0,a.jsx)("span",{children:j?"Save Changes":"Create Mode"})]})}),j&&(0,a.jsx)(i.A,{variant:"secondary",onClick:C,className:"rounded-xl px-4 py-2 text-xs",children:"Cancel"})]})]}),(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"ID"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Role Name"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Assigned Permissions"}),w&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:b.map(e=>{let s=[];try{s="string"==typeof e.permissions?JSON.parse(e.permissions):e.permissions}catch{s=[]}return(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-3.5 font-mono text-xs font-semibold text-text",children:e.id}),(0,a.jsx)("td",{className:"px-4 py-3.5 font-medium text-text",children:e.name}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1 max-w-md",children:s.map(e=>(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-md bg-surface-2 border border-border-subtle text-[10px] font-mono text-text-muted",children:e},e))})}),w&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>(e=>{let s=[];try{s="string"==typeof e.permissions?JSON.parse(e.permissions):e.permissions}catch{s=[]}N(e.id),f({id:e.id,name:e.name,permissions:s})})(e),className:"text-xs text-brand-500 hover:text-brand-400 font-medium px-2 py-1 rounded hover:bg-brand-500/10 transition-colors",children:"Edit"}),(0,a.jsx)("button",{onClick:()=>_(e.id),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete mode",children:(0,a.jsx)(l.TB,{size:15})})]})})]},e.id)})})]})})]})})}},96042:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var a=t(73365);function r({label:e,type:s="text",value:t,onChange:n,onKeyDown:i,placeholder:d,disabled:l=!1,error:c,className:x="",...o}){let m=c?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",p=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${m} ${l?"opacity-50 cursor-not-allowed":""} ${x}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:s,value:t,onChange:n,onKeyDown:i,placeholder:d,disabled:l,className:p,...o}),c&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:c})]})}}},e=>{e.O(0,[774,9568,9958,8334,2347,5158,7358],()=>e(e.s=16064)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8535],{52840:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var a=s(73365),r=s(1521),n=s(38334),l=s(39457),d=s(24945),i=s(57042),o=s(64683);let x=["","ios","android"];function c(){let{can:e}=(0,d.b)(),{get:t,post:s}=(0,l.Z)(),[c,m]=(0,r.useState)([]),[u,p]=(0,r.useState)(!0),[h,b]=(0,r.useState)(""),[f,g]=(0,r.useState)({runtimeVersion:"",platform:"",channel:""}),[j,N]=(0,r.useState)(null),y=e(i.Jj.otaManage),v=(0,r.useCallback)(async()=>{p(!0),b("");try{let e=new URLSearchParams;f.runtimeVersion&&e.set("runtimeVersion",f.runtimeVersion),f.platform&&e.set("platform",f.platform),f.channel&&e.set("channel",f.channel);let s=await t(`${i.lb.ota}?${e}`);m(s.items||[])}catch(e){b(e.message)}finally{p(!1)}},[t,f.runtimeVersion,f.platform,f.channel]);(0,r.useEffect)(()=>{v()},[]);let w=async e=>{if(confirm(`Promote #${e.buildNumber} to serving for channel "${e.channel}" (${e.platform}, ${e.runtimeVersion})?`)){N(e.id);try{await s(`${i.lb.ota}/${e.id}/promote`),await v()}catch(e){b(e.message)}finally{N(null)}}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(o.lP,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"OTA Updates"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Publish, promote and rollback mobile application bundles"})]}),(0,a.jsxs)("button",{onClick:v,disabled:u,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,a.jsx)(o.e9,{size:13,className:u?"animate-spin text-brand-500":""}),(0,a.jsx)("span",{children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"card-glass p-4 grid grid-cols-1 sm:grid-cols-4 gap-3",children:[(0,a.jsx)("input",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 font-mono",placeholder:"Runtime (e.g. 0.1.7)",value:f.runtimeVersion,onChange:e=>g({...f,runtimeVersion:e.target.value})}),(0,a.jsx)("select",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text focus:outline-none focus:ring-2 focus:ring-brand-500/30",value:f.platform,onChange:e=>g({...f,platform:e.target.value}),children:x.map(e=>(0,a.jsx)("option",{value:e,children:e?e.toUpperCase():"All platforms"},e))}),(0,a.jsx)("input",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 font-mono",placeholder:"Channel (e.g. production)",value:f.channel,onChange:e=>g({...f,channel:e.target.value})}),(0,a.jsx)("button",{onClick:v,className:"px-4 py-2 text-xs font-semibold bg-brand-500 text-white rounded-xl hover:bg-brand-600 shadow-[0_4px_12px_-4px_rgba(255,87,10,0.5)] transition-all",children:"Filter Bundles"})]}),h&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-3 rounded-xl border border-red-500/20",children:h}),u?(0,a.jsxs)("div",{className:"card-glass p-12 text-center text-text-muted text-xs",children:[(0,a.jsx)(o.e9,{size:20,className:"mx-auto mb-2 animate-spin text-brand-500"}),"Loading updates catalog..."]}):0===c.length?(0,a.jsxs)("div",{className:"card-glass p-12 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-surface-2 flex items-center justify-center mx-auto mb-3 text-text-subtle",children:(0,a.jsx)(o.lP,{size:24})}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text",children:"No updates published"}),(0,a.jsxs)("p",{className:"text-text-muted text-xs mt-1",children:["Publish an OTA update package with ",(0,a.jsx)("code",{className:"text-brand-500 font-mono px-1.5 py-0.5 rounded bg-surface-2",children:"npm run update"})]})]}):(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Build"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Runtime"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Platform"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Channel"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Published"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),y&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:c.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsxs)("td",{className:"px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"font-medium text-text",children:[(0,a.jsxs)("span",{className:"text-brand-500 font-mono font-bold mr-2",children:["#",e.buildNumber]}),(0,a.jsx)("span",{children:e.message||"(no message)"})]}),(0,a.jsx)("div",{className:"text-[10px] text-text-subtle font-mono mt-0.5",children:e.id.slice(0,8)})]}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs font-mono text-text-muted",children:e.runtimeVersion}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:`px-2 py-0.5 rounded-md text-[10px] font-mono font-bold uppercase tracking-wider border ${"ios"===e.platform?"bg-sky-500/10 text-sky-500 border-sky-500/20":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:e.platform})}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-surface-2 border border-border-subtle text-text",children:e.channel})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted font-mono",children:(e=>{if(!e)return"-";try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}})(e.publishedAt||e.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:e.isServing?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:[(0,a.jsx)(o.Jl,{size:13}),(0,a.jsx)("span",{children:"Serving"})]}):(0,a.jsx)("span",{className:"text-xs font-mono text-text-subtle px-2 py-0.5 rounded bg-surface-2",children:e.status})}),y&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:!e.isServing&&(0,a.jsxs)("button",{onClick:()=>w(e),disabled:j===e.id,className:"inline-flex items-center gap-1 text-xs font-semibold text-brand-500 hover:text-brand-400 px-2.5 py-1 rounded-lg hover:bg-brand-500/10 transition-colors disabled:opacity-50",children:[(0,a.jsx)("span",{children:j===e.id?"Promoting...":"Promote"}),(0,a.jsx)(o.F1,{size:13})]})})]},e.id))})]})})]})})}},62554:(e,t,s)=>{Promise.resolve().then(s.bind(s,52840))}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8535],{52840:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var a=s(73365),r=s(1521),n=s(38334),l=s(39457),d=s(24945),i=s(57042),o=s(64683);let x=["","ios","android"];function c(){let{can:e}=(0,d.b)(),{get:t,post:s}=(0,l.Z)(),[c,m]=(0,r.useState)([]),[u,p]=(0,r.useState)(!0),[h,b]=(0,r.useState)(""),[f,g]=(0,r.useState)({runtimeVersion:"",platform:"",channel:""}),[j,N]=(0,r.useState)(null),y=e(i.Jj.otaManage),v=(0,r.useCallback)(async()=>{p(!0),b("");try{let e=new URLSearchParams;f.runtimeVersion&&e.set("runtimeVersion",f.runtimeVersion),f.platform&&e.set("platform",f.platform),f.channel&&e.set("channel",f.channel);let s=await t(`${i.lb.ota}?${e}`);m(s.items||[])}catch(e){b(e.message)}finally{p(!1)}},[t,f.runtimeVersion,f.platform,f.channel]);(0,r.useEffect)(()=>{v()},[]);let w=async e=>{if(confirm(`Promote #${e.buildNumber} to serving for channel "${e.channel}" (${e.platform}, ${e.runtimeVersion})?`)){N(e.id);try{await s(`${i.lb.ota}/${e.id}/promote`),await v()}catch(e){b(e.message)}finally{N(null)}}};return(0,a.jsx)(n.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(o.lP,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"OTA Updates"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Publish, promote and rollback mobile application bundles"})]}),(0,a.jsxs)("button",{onClick:v,disabled:u,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,a.jsx)(o.e9,{size:13,className:u?"animate-spin text-brand-500":""}),(0,a.jsx)("span",{children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"card-glass p-4 grid grid-cols-1 sm:grid-cols-4 gap-3",children:[(0,a.jsx)("input",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 font-mono",placeholder:"Runtime (e.g. 0.1.7)",value:f.runtimeVersion,onChange:e=>g({...f,runtimeVersion:e.target.value})}),(0,a.jsx)("select",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text focus:outline-none focus:ring-2 focus:ring-brand-500/30",value:f.platform,onChange:e=>g({...f,platform:e.target.value}),children:x.map(e=>(0,a.jsx)("option",{value:e,children:e?e.toUpperCase():"All platforms"},e))}),(0,a.jsx)("input",{className:"px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 font-mono",placeholder:"Channel (e.g. production)",value:f.channel,onChange:e=>g({...f,channel:e.target.value})}),(0,a.jsx)("button",{onClick:v,className:"px-4 py-2 text-xs font-semibold bg-brand-500 text-white rounded-xl hover:bg-brand-600 shadow-[0_4px_12px_-4px_rgba(255,87,10,0.5)] transition-all",children:"Filter Bundles"})]}),h&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-3 rounded-xl border border-red-500/20",children:h}),u?(0,a.jsxs)("div",{className:"card-glass p-12 text-center text-text-muted text-xs",children:[(0,a.jsx)(o.e9,{size:20,className:"mx-auto mb-2 animate-spin text-brand-500"}),"Loading updates catalog..."]}):0===c.length?(0,a.jsxs)("div",{className:"card-glass p-12 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-surface-2 flex items-center justify-center mx-auto mb-3 text-text-subtle",children:(0,a.jsx)(o.lP,{size:24})}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text",children:"No updates published"}),(0,a.jsxs)("p",{className:"text-text-muted text-xs mt-1",children:["Publish an OTA update package with ",(0,a.jsx)("code",{className:"text-brand-500 font-mono px-1.5 py-0.5 rounded bg-surface-2",children:"npm run update"})]})]}):(0,a.jsx)("div",{className:"card-glass overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Build"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Runtime"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Platform"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Channel"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Published"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),y&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:c.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsxs)("td",{className:"px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"font-medium text-text",children:[(0,a.jsxs)("span",{className:"text-brand-500 font-mono font-bold mr-2",children:["#",e.buildNumber]}),(0,a.jsx)("span",{children:e.message||"(no message)"})]}),(0,a.jsx)("div",{className:"text-[10px] text-text-subtle font-mono mt-0.5",children:e.id.slice(0,8)})]}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs font-mono text-text-muted",children:e.runtimeVersion}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:`px-2 py-0.5 rounded-md text-[10px] font-mono font-bold uppercase tracking-wider border ${"ios"===e.platform?"bg-sky-500/10 text-sky-500 border-sky-500/20":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:e.platform})}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-surface-2 border border-border-subtle text-text",children:e.channel})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted font-mono",children:(e=>{if(!e)return"-";try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}})(e.publishedAt||e.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:e.isServing?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:[(0,a.jsx)(o.Jl,{size:13}),(0,a.jsx)("span",{children:"Serving"})]}):(0,a.jsx)("span",{className:"text-xs font-mono text-text-subtle px-2 py-0.5 rounded bg-surface-2",children:e.status})}),y&&(0,a.jsx)("td",{className:"px-4 py-3.5 text-right",children:!e.isServing&&(0,a.jsxs)("button",{onClick:()=>w(e),disabled:j===e.id,className:"inline-flex items-center gap-1 text-xs font-semibold text-brand-500 hover:text-brand-400 px-2.5 py-1 rounded-lg hover:bg-brand-500/10 transition-colors disabled:opacity-50",children:[(0,a.jsx)("span",{children:j===e.id?"Promoting...":"Promote"}),(0,a.jsx)(o.F1,{size:13})]})})]},e.id))})]})})]})})}},62554:(e,t,s)=>{Promise.resolve().then(s.bind(s,52840))}},e=>{e.O(0,[774,9568,9958,8334,2347,5158,7358],()=>e(e.s=62554)),_N_E=e.O()}]);
|
package/dist/web/_next/static/chunks/app/admin/{page-ae83026dc795c35b.js → page-9af75732b2cda9b6.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3698],{42761:(e,t,s)=>{Promise.resolve().then(s.bind(s,68577))},68577:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var l=s(73365),a=s(1521),r=s(38334),n=s(64683);let i=[{key:"total",label:"Total",icon:n.BK,color:"text-text",iconColor:"text-text-muted bg-surface-2"},{key:"online",label:"Online (30m)",icon:n.Kq,color:"text-success",iconColor:"text-success bg-emerald-500/10",pulse:!0},{key:"newToday",label:"New (24h)",icon:n.sU,color:"text-brand-500",iconColor:"text-brand-500 bg-brand-500/10"},{key:"retention7d",label:"Retention 7d",icon:n.BZ,color:"text-text",iconColor:"text-text-muted bg-surface-2",suffix:"%"},{key:"stickiness",label:"Stickiness",icon:n.FE,color:"text-amber-500",iconColor:"text-amber-500 bg-amber-500/10",suffix:"%"},{key:"avgLifespanDays",label:"Avg Lifespan",icon:n.kt,color:"text-text",iconColor:"text-text-muted bg-surface-2",suffix:"d"}];function c({stats:e}){return(0,l.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 sm:gap-4",children:i.map(t=>{let s=t.icon,a=e?.[t.key];return(0,l.jsxs)("div",{className:"card-glass p-4 relative overflow-hidden transition-all duration-200 hover:-translate-y-0.5 group",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-[11px] font-mono tracking-wider uppercase text-text-muted truncate",children:t.label}),(0,l.jsx)("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center ${t.iconColor} transition-transform group-hover:scale-110`,children:(0,l.jsx)(s,{size:14})})]}),(0,l.jsxs)("div",{className:"flex items-baseline gap-1.5 mt-1",children:[(0,l.jsx)("div",{className:`text-2xl sm:text-3xl font-bold tracking-tight font-mono ${t.color}`,children:a??"-"}),null!=a&&t.suffix&&(0,l.jsx)("span",{className:"text-xs font-mono text-text-subtle font-semibold",children:t.suffix})]}),t.pulse&&(0,l.jsxs)("div",{className:"absolute bottom-2 right-2 flex items-center gap-1.5",children:[(0,l.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),(0,l.jsx)("span",{className:"text-[10px] font-mono text-emerald-500 font-medium",children:"live"})]})]},t.key)})})}var d=s(57042);let o=[{key:"machineId",label:"Machine ID",sortable:!0},{key:"publicIp",label:"Public IP",sortable:!1},{key:"localIp",label:"Local IP",sortable:!1},{key:"createdAt",label:"Created",sortable:!0},{key:"lastAccessAt",label:"Last Access",sortable:!0},{key:"expiresAt",label:"Expires",sortable:!0}],x=o.filter(e=>e.sortable);function m(e){let t=e?.lastAccessAt||e?.createdAt;return!!t&&Date.now()-new Date(t+"Z").getTime()<d.Qh}function u(e){if(!e)return"-";try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function p({session:e}){let{tier:t,ageMs:s}=function(e){let t={tier:d.rK[d.rK.length-1],ageMs:null};if(!e?.createdAt||!e?.lastAccessAt)return t;let s=new Date(e.lastAccessAt+"Z").getTime()-new Date(e.createdAt+"Z").getTime();return{tier:d.rK.find(e=>s>=e.minMs)||t.tier,ageMs:s}}(e),a="loyal"===t.key?"bg-emerald-500/10 text-emerald-500 border-emerald-500/20":"returning"===t.key?"bg-brand-500/10 text-brand-500 border-brand-500/20":"active"===t.key?"bg-amber-500/10 text-amber-500 border-amber-500/20":"bg-surface-2 text-text-muted border-border-subtle";return(0,l.jsxs)("div",{className:"inline-flex items-center gap-1.5",children:[(0,l.jsx)("span",{className:`px-2 py-0.5 rounded-full text-[11px] font-medium border ${a}`,children:t.label}),null!=s&&(0,l.jsx)("span",{className:"text-text-subtle text-[11px] font-mono",children:function(e){if(null==e||e<0)return"-";let t=Math.floor(e/6e4);if(t<1)return"<1m";let s=Math.floor(t/1440),l=Math.floor(t%1440/60),a=t%60;return s>0?`${s}d ${l}h`:l>0?`${l}h ${a}m`:`${a}m`}(s)})]})}function b({items:e,sortBy:t,order:s,onSortChange:a,onDelete:r,canDelete:i}){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"md:hidden flex items-center justify-between mb-3 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-text-muted",children:"Sort by:"}),(0,l.jsx)("select",{value:t,onChange:e=>a(e.target.value,s),className:"bg-surface-2 border border-border-subtle rounded-lg px-2.5 py-1.5 text-text focus:outline-none",children:x.map(e=>(0,l.jsx)("option",{value:e.key,children:e.label},e.key))})]}),(0,l.jsxs)("button",{onClick:()=>a(t,"asc"===s?"desc":"asc"),className:"flex items-center gap-1 bg-surface-2 hover:bg-surface-3 border border-border-subtle rounded-lg px-2.5 py-1.5 text-text transition-colors","aria-label":"Toggle order",children:[(0,l.jsx)("span",{className:"font-mono uppercase",children:s}),"asc"===s?(0,l.jsx)(n.Do,{size:13}):(0,l.jsx)(n.yd,{size:13})]})]}),(0,l.jsxs)("div",{className:"md:hidden space-y-3",children:[0===e.length&&(0,l.jsxs)("div",{className:"card-glass p-8 text-center text-text-muted flex flex-col items-center justify-center",children:[(0,l.jsx)(n.BK,{size:24,className:"mb-2 text-text-subtle"}),(0,l.jsx)("p",{className:"text-sm",children:"No active sessions found"})]}),e.map(e=>{let t=m(e);return(0,l.jsxs)("div",{className:"card-glass overflow-hidden text-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2.5 bg-surface-2/60 border-b border-border-subtle",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,l.jsx)("span",{className:"relative flex h-2 w-2",children:t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}):(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-neutral-500/40"})}),(0,l.jsx)("span",{className:"font-mono text-xs font-semibold tracking-tight text-text truncate",children:e.machineId})]}),i&&(0,l.jsx)("button",{onClick:()=>r(e.machineId),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete session",children:(0,l.jsx)(n.TB,{size:15})})]}),(0,l.jsxs)("div",{className:"p-3.5 space-y-2 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{className:"text-text-muted",children:"Loyalty"}),(0,l.jsx)(p,{session:e})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1 border-t border-border-subtle/40",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-[10px] uppercase font-mono text-text-subtle block",children:"Public IP"}),(0,l.jsx)("span",{className:"font-mono text-text truncate block",children:e.publicIp||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-[10px] uppercase font-mono text-text-subtle block",children:"Local IP"}),(0,l.jsx)("span",{className:"font-mono text-text truncate block",children:e.localIp||"-"})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1 border-t border-border-subtle/40 text-[11px] text-text-muted",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-text-subtle block",children:"Created"}),(0,l.jsx)("span",{children:u(e.createdAt)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-text-subtle block",children:"Last Access"}),(0,l.jsx)("span",{className:"text-text",children:u(e.lastAccessAt)})]})]})]})]},e.machineId)})]}),(0,l.jsx)("div",{className:"hidden md:block card-glass overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,l.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-4 py-3 w-12 text-center",children:"Live"}),(0,l.jsx)("th",{className:"px-4 py-3",children:"Loyalty"}),o.map(e=>(0,l.jsx)("th",{onClick:()=>{var l;return e.sortable&&(l=e.key,void(d.GS.includes(l)&&(t===l?a(l,"asc"===s?"desc":"asc"):a(l,"desc"))))},className:`px-4 py-3 ${e.sortable?"cursor-pointer hover:text-text select-none group":""}`,children:(0,l.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[e.label,e.sortable&&(0,l.jsx)("span",{className:t===e.key?"text-brand-500":"text-text-subtle opacity-40 group-hover:opacity-100",children:t===e.key&&"asc"===s?(0,l.jsx)(n.Do,{size:12}):(0,l.jsx)(n.yd,{size:12})})]})},e.key)),i&&(0,l.jsx)("th",{className:"px-4 py-3 text-right",children:"Action"})]})}),(0,l.jsxs)("tbody",{className:"divide-y divide-border-subtle/50",children:[0===e.length&&(0,l.jsx)("tr",{children:(0,l.jsxs)("td",{colSpan:o.length+3,className:"px-4 py-12 text-center text-text-muted",children:[(0,l.jsx)(n.BK,{size:28,className:"mx-auto mb-2 text-text-subtle"}),(0,l.jsx)("p",{children:"No active sessions found"})]})}),e.map(e=>{let t=m(e);return(0,l.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-3 text-center",children:(0,l.jsx)("span",{className:"relative inline-flex h-2 w-2",children:t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}):(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-neutral-500/40"})})}),(0,l.jsx)("td",{className:"px-4 py-3",children:(0,l.jsx)(p,{session:e})}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs font-medium text-text",children:e.machineId}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted",children:e.publicIp||"-"}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted",children:e.localIp||"-"}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text-muted",children:u(e.createdAt)}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text font-medium",children:u(e.lastAccessAt)}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text-muted",children:u(e.expiresAt)}),i&&(0,l.jsx)("td",{className:"px-4 py-3 text-right",children:(0,l.jsx)("button",{onClick:()=>r(e.machineId),className:"text-text-muted hover:text-danger p-1.5 rounded-lg hover:bg-red-500/10 transition-colors",title:"Delete session",children:(0,l.jsx)(n.TB,{size:15})})})]},e.machineId)})]})]})})]})}function h({page:e,pageSize:t,total:s,onPageChange:a,onPageSizeChange:r}){let i=Math.max(1,Math.ceil(s/t));return(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 mt-4 text-xs text-text-muted",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 font-mono",children:[(0,l.jsx)("span",{children:"Total:"}),(0,l.jsx)("span",{className:"text-text font-semibold px-1.5 py-0.5 rounded bg-surface-2 border border-border-subtle",children:s})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,l.jsx)("select",{value:t,onChange:e=>r(parseInt(e.target.value,10)),className:"bg-surface-2 border border-border-subtle rounded-lg px-2.5 py-1 text-text text-xs focus:outline-none",children:d.xp.map(e=>(0,l.jsxs)("option",{value:e,children:[e," / page"]},e))}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)("button",{onClick:()=>a(Math.max(1,e-1)),disabled:e<=1,className:"p-1.5 rounded-lg bg-surface-2 hover:bg-surface-3 border border-border-subtle text-text disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Previous page",children:(0,l.jsx)(n.JG,{size:14})}),(0,l.jsxs)("span",{className:"px-2.5 py-1 font-mono text-xs text-text",children:[e," / ",i]}),(0,l.jsx)("button",{onClick:()=>a(Math.min(i,e+1)),disabled:e>=i,className:"p-1.5 rounded-lg bg-surface-2 hover:bg-surface-3 border border-border-subtle text-text disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Next page",children:(0,l.jsx)(n.c_,{size:14})})]})]})]})}let f={ok:"Success",badPassword:"Wrong password",unknownUser:"Unknown user",turnstile:"Captcha failed",locked:"Locked out"};function j({items:e}){return(0,l.jsxs)("section",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(n.ek,{size:16,className:"text-brand-500"}),(0,l.jsx)("h2",{className:"text-base font-semibold tracking-tight text-text",children:"Login Activity"}),(0,l.jsxs)("span",{className:"text-xs text-text-subtle font-mono",children:["last ",e.length]})]}),(0,l.jsx)("div",{className:"card-glass overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,l.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-4 py-2.5",children:"Time"}),(0,l.jsx)("th",{className:"px-4 py-2.5",children:"User"}),(0,l.jsx)("th",{className:"px-4 py-2.5",children:"IP"}),(0,l.jsx)("th",{className:"px-4 py-2.5 text-right",children:"Result"})]})}),(0,l.jsxs)("tbody",{className:"divide-y divide-border-subtle/50",children:[0===e.length&&(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:4,className:"px-4 py-8 text-center text-text-muted",children:"No login attempts recorded yet"})}),e.map((e,t)=>(0,l.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-2.5 text-xs text-text-muted whitespace-nowrap",children:function(e){try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}(e.createdAt)}),(0,l.jsx)("td",{className:"px-4 py-2.5 font-mono text-xs text-text",children:e.username}),(0,l.jsx)("td",{className:"px-4 py-2.5 font-mono text-xs text-text-muted",children:e.ip}),(0,l.jsx)("td",{className:"px-4 py-2.5 text-right",children:e.ok?(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium border bg-emerald-500/10 text-emerald-500 border-emerald-500/20",children:[(0,l.jsx)(n.ek,{size:11})," OK"]}):(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium border bg-red-500/10 text-danger border-red-500/20",children:[(0,l.jsx)(n.RI,{size:11})," ",f[e.reason]||e.reason]})})]},t))]})]})})]})}var g=s(39457),N=s(24945);function y(){let{can:e}=(0,N.b)(),{get:t,del:s}=(0,g.Z)(),[i,o]=(0,a.useState)(null),[x,m]=(0,a.useState)([]),[u,p]=(0,a.useState)([]),[f,y]=(0,a.useState)(0),[v,k]=(0,a.useState)(""),[w,A]=(0,a.useState)("lastAccessAt"),[S,C]=(0,a.useState)("desc"),[I,z]=(0,a.useState)(1),[D,P]=(0,a.useState)(d.Wm),[L,$]=(0,a.useState)(!1),M=(0,a.useCallback)(async()=>{$(!0);try{let s=new URLSearchParams({search:v,sortBy:w,order:S,page:String(I),pageSize:String(D)}),l=[t(`${d.lb.sessions}?${s.toString()}`),t(d.lb.stats)];e(d.Jj.logView)&&l.push(t(d.lb.logins));let[a,r,n]=await Promise.all(l);p(a.items||[]),y(a.total||0),o(r),n&&m(n.items||[])}catch(e){console.error(e)}finally{$(!1)}},[e,t,v,w,S,I,D]);(0,a.useEffect)(()=>{M()},[M]);let T=async e=>{confirm(`Delete session ${e}?`)&&(await s(`${d.lb.sessions}/${e}`),M())};return(0,l.jsx)(r.A,{children:(0,l.jsxs)("div",{className:"space-y-8",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad",children:"System Overview"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Real-time telemetry and active host instances"})]}),(0,l.jsxs)("button",{onClick:M,disabled:L,className:"self-start sm:self-auto inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,l.jsx)(n.e9,{size:13,className:L?"animate-spin text-brand-500":""}),(0,l.jsx)("span",{children:"Refresh"})]})]}),(0,l.jsx)("section",{children:(0,l.jsx)(c,{stats:i})}),e(d.Jj.logView)&&(0,l.jsx)(j,{items:x}),(0,l.jsxs)("section",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-bold tracking-tight text-text",children:"Active Sessions"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Connected and registered client sessions"})]}),(0,l.jsxs)("div",{className:"relative w-full sm:w-80",children:[(0,l.jsx)(n.vj,{size:15,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-muted"}),(0,l.jsx)("input",{value:v,onChange:e=>{k(e.target.value),z(1)},placeholder:"Search machineId, IP address...",className:"w-full pl-9 pr-3.5 py-2 bg-surface-2/80 border border-border-subtle rounded-xl text-text text-xs placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40 transition-all font-mono"})]})]}),(0,l.jsx)(b,{items:u,sortBy:w,order:S,onSortChange:(e,t)=>{A(e),C(t),z(1)},onDelete:T,canDelete:e(d.Jj.sessionDelete)}),(0,l.jsx)(h,{page:I,pageSize:D,total:f,onPageChange:z,onPageSizeChange:e=>{P(e),z(1)}})]})]})})}}},e=>{e.O(0,[7738,9568,9958,8334,2347,5158,7358],()=>e(e.s=42761)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3698],{42761:(e,t,s)=>{Promise.resolve().then(s.bind(s,68577))},68577:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var l=s(73365),a=s(1521),r=s(38334),n=s(64683);let i=[{key:"total",label:"Total",icon:n.BK,color:"text-text",iconColor:"text-text-muted bg-surface-2"},{key:"online",label:"Online (30m)",icon:n.Kq,color:"text-success",iconColor:"text-success bg-emerald-500/10",pulse:!0},{key:"newToday",label:"New (24h)",icon:n.sU,color:"text-brand-500",iconColor:"text-brand-500 bg-brand-500/10"},{key:"retention7d",label:"Retention 7d",icon:n.BZ,color:"text-text",iconColor:"text-text-muted bg-surface-2",suffix:"%"},{key:"stickiness",label:"Stickiness",icon:n.FE,color:"text-amber-500",iconColor:"text-amber-500 bg-amber-500/10",suffix:"%"},{key:"avgLifespanDays",label:"Avg Lifespan",icon:n.kt,color:"text-text",iconColor:"text-text-muted bg-surface-2",suffix:"d"}];function c({stats:e}){return(0,l.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 sm:gap-4",children:i.map(t=>{let s=t.icon,a=e?.[t.key];return(0,l.jsxs)("div",{className:"card-glass p-4 relative overflow-hidden transition-all duration-200 hover:-translate-y-0.5 group",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-[11px] font-mono tracking-wider uppercase text-text-muted truncate",children:t.label}),(0,l.jsx)("div",{className:`w-7 h-7 rounded-lg flex items-center justify-center ${t.iconColor} transition-transform group-hover:scale-110`,children:(0,l.jsx)(s,{size:14})})]}),(0,l.jsxs)("div",{className:"flex items-baseline gap-1.5 mt-1",children:[(0,l.jsx)("div",{className:`text-2xl sm:text-3xl font-bold tracking-tight font-mono ${t.color}`,children:a??"-"}),null!=a&&t.suffix&&(0,l.jsx)("span",{className:"text-xs font-mono text-text-subtle font-semibold",children:t.suffix})]}),t.pulse&&(0,l.jsxs)("div",{className:"absolute bottom-2 right-2 flex items-center gap-1.5",children:[(0,l.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}),(0,l.jsx)("span",{className:"text-[10px] font-mono text-emerald-500 font-medium",children:"live"})]})]},t.key)})})}var d=s(57042);let o=[{key:"machineId",label:"Machine ID",sortable:!0},{key:"publicIp",label:"Public IP",sortable:!1},{key:"localIp",label:"Local IP",sortable:!1},{key:"createdAt",label:"Created",sortable:!0},{key:"lastAccessAt",label:"Last Access",sortable:!0},{key:"expiresAt",label:"Expires",sortable:!0}],x=o.filter(e=>e.sortable);function m(e){let t=e?.lastAccessAt||e?.createdAt;return!!t&&Date.now()-new Date(t+"Z").getTime()<d.Qh}function u(e){if(!e)return"-";try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function p({session:e}){let{tier:t,ageMs:s}=function(e){let t={tier:d.rK[d.rK.length-1],ageMs:null};if(!e?.createdAt||!e?.lastAccessAt)return t;let s=new Date(e.lastAccessAt+"Z").getTime()-new Date(e.createdAt+"Z").getTime();return{tier:d.rK.find(e=>s>=e.minMs)||t.tier,ageMs:s}}(e),a="loyal"===t.key?"bg-emerald-500/10 text-emerald-500 border-emerald-500/20":"returning"===t.key?"bg-brand-500/10 text-brand-500 border-brand-500/20":"active"===t.key?"bg-amber-500/10 text-amber-500 border-amber-500/20":"bg-surface-2 text-text-muted border-border-subtle";return(0,l.jsxs)("div",{className:"inline-flex items-center gap-1.5",children:[(0,l.jsx)("span",{className:`px-2 py-0.5 rounded-full text-[11px] font-medium border ${a}`,children:t.label}),null!=s&&(0,l.jsx)("span",{className:"text-text-subtle text-[11px] font-mono",children:function(e){if(null==e||e<0)return"-";let t=Math.floor(e/6e4);if(t<1)return"<1m";let s=Math.floor(t/1440),l=Math.floor(t%1440/60),a=t%60;return s>0?`${s}d ${l}h`:l>0?`${l}h ${a}m`:`${a}m`}(s)})]})}function b({items:e,sortBy:t,order:s,onSortChange:a,onDelete:r,canDelete:i}){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"md:hidden flex items-center justify-between mb-3 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-text-muted",children:"Sort by:"}),(0,l.jsx)("select",{value:t,onChange:e=>a(e.target.value,s),className:"bg-surface-2 border border-border-subtle rounded-lg px-2.5 py-1.5 text-text focus:outline-none",children:x.map(e=>(0,l.jsx)("option",{value:e.key,children:e.label},e.key))})]}),(0,l.jsxs)("button",{onClick:()=>a(t,"asc"===s?"desc":"asc"),className:"flex items-center gap-1 bg-surface-2 hover:bg-surface-3 border border-border-subtle rounded-lg px-2.5 py-1.5 text-text transition-colors","aria-label":"Toggle order",children:[(0,l.jsx)("span",{className:"font-mono uppercase",children:s}),"asc"===s?(0,l.jsx)(n.Do,{size:13}):(0,l.jsx)(n.yd,{size:13})]})]}),(0,l.jsxs)("div",{className:"md:hidden space-y-3",children:[0===e.length&&(0,l.jsxs)("div",{className:"card-glass p-8 text-center text-text-muted flex flex-col items-center justify-center",children:[(0,l.jsx)(n.BK,{size:24,className:"mb-2 text-text-subtle"}),(0,l.jsx)("p",{className:"text-sm",children:"No active sessions found"})]}),e.map(e=>{let t=m(e);return(0,l.jsxs)("div",{className:"card-glass overflow-hidden text-sm",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2.5 bg-surface-2/60 border-b border-border-subtle",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,l.jsx)("span",{className:"relative flex h-2 w-2",children:t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}):(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-neutral-500/40"})}),(0,l.jsx)("span",{className:"font-mono text-xs font-semibold tracking-tight text-text truncate",children:e.machineId})]}),i&&(0,l.jsx)("button",{onClick:()=>r(e.machineId),className:"text-text-muted hover:text-danger p-1 rounded hover:bg-red-500/10 transition-colors",title:"Delete session",children:(0,l.jsx)(n.TB,{size:15})})]}),(0,l.jsxs)("div",{className:"p-3.5 space-y-2 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{className:"text-text-muted",children:"Loyalty"}),(0,l.jsx)(p,{session:e})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1 border-t border-border-subtle/40",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-[10px] uppercase font-mono text-text-subtle block",children:"Public IP"}),(0,l.jsx)("span",{className:"font-mono text-text truncate block",children:e.publicIp||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-[10px] uppercase font-mono text-text-subtle block",children:"Local IP"}),(0,l.jsx)("span",{className:"font-mono text-text truncate block",children:e.localIp||"-"})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1 border-t border-border-subtle/40 text-[11px] text-text-muted",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-text-subtle block",children:"Created"}),(0,l.jsx)("span",{children:u(e.createdAt)})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"text-text-subtle block",children:"Last Access"}),(0,l.jsx)("span",{className:"text-text",children:u(e.lastAccessAt)})]})]})]})]},e.machineId)})]}),(0,l.jsx)("div",{className:"hidden md:block card-glass overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,l.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-4 py-3 w-12 text-center",children:"Live"}),(0,l.jsx)("th",{className:"px-4 py-3",children:"Loyalty"}),o.map(e=>(0,l.jsx)("th",{onClick:()=>{var l;return e.sortable&&(l=e.key,void(d.GS.includes(l)&&(t===l?a(l,"asc"===s?"desc":"asc"):a(l,"desc"))))},className:`px-4 py-3 ${e.sortable?"cursor-pointer hover:text-text select-none group":""}`,children:(0,l.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[e.label,e.sortable&&(0,l.jsx)("span",{className:t===e.key?"text-brand-500":"text-text-subtle opacity-40 group-hover:opacity-100",children:t===e.key&&"asc"===s?(0,l.jsx)(n.Do,{size:12}):(0,l.jsx)(n.yd,{size:12})})]})},e.key)),i&&(0,l.jsx)("th",{className:"px-4 py-3 text-right",children:"Action"})]})}),(0,l.jsxs)("tbody",{className:"divide-y divide-border-subtle/50",children:[0===e.length&&(0,l.jsx)("tr",{children:(0,l.jsxs)("td",{colSpan:o.length+3,className:"px-4 py-12 text-center text-text-muted",children:[(0,l.jsx)(n.BK,{size:28,className:"mx-auto mb-2 text-text-subtle"}),(0,l.jsx)("p",{children:"No active sessions found"})]})}),e.map(e=>{let t=m(e);return(0,l.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-3 text-center",children:(0,l.jsx)("span",{className:"relative inline-flex h-2 w-2",children:t?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),(0,l.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]}):(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-neutral-500/40"})})}),(0,l.jsx)("td",{className:"px-4 py-3",children:(0,l.jsx)(p,{session:e})}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs font-medium text-text",children:e.machineId}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted",children:e.publicIp||"-"}),(0,l.jsx)("td",{className:"px-4 py-3 font-mono text-xs text-text-muted",children:e.localIp||"-"}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text-muted",children:u(e.createdAt)}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text font-medium",children:u(e.lastAccessAt)}),(0,l.jsx)("td",{className:"px-4 py-3 text-xs text-text-muted",children:u(e.expiresAt)}),i&&(0,l.jsx)("td",{className:"px-4 py-3 text-right",children:(0,l.jsx)("button",{onClick:()=>r(e.machineId),className:"text-text-muted hover:text-danger p-1.5 rounded-lg hover:bg-red-500/10 transition-colors",title:"Delete session",children:(0,l.jsx)(n.TB,{size:15})})})]},e.machineId)})]})]})})]})}function h({page:e,pageSize:t,total:s,onPageChange:a,onPageSizeChange:r}){let i=Math.max(1,Math.ceil(s/t));return(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 mt-4 text-xs text-text-muted",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 font-mono",children:[(0,l.jsx)("span",{children:"Total:"}),(0,l.jsx)("span",{className:"text-text font-semibold px-1.5 py-0.5 rounded bg-surface-2 border border-border-subtle",children:s})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,l.jsx)("select",{value:t,onChange:e=>r(parseInt(e.target.value,10)),className:"bg-surface-2 border border-border-subtle rounded-lg px-2.5 py-1 text-text text-xs focus:outline-none",children:d.xp.map(e=>(0,l.jsxs)("option",{value:e,children:[e," / page"]},e))}),(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,l.jsx)("button",{onClick:()=>a(Math.max(1,e-1)),disabled:e<=1,className:"p-1.5 rounded-lg bg-surface-2 hover:bg-surface-3 border border-border-subtle text-text disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Previous page",children:(0,l.jsx)(n.JG,{size:14})}),(0,l.jsxs)("span",{className:"px-2.5 py-1 font-mono text-xs text-text",children:[e," / ",i]}),(0,l.jsx)("button",{onClick:()=>a(Math.min(i,e+1)),disabled:e>=i,className:"p-1.5 rounded-lg bg-surface-2 hover:bg-surface-3 border border-border-subtle text-text disabled:opacity-30 disabled:cursor-not-allowed transition-colors","aria-label":"Next page",children:(0,l.jsx)(n.c_,{size:14})})]})]})]})}let f={ok:"Success",badPassword:"Wrong password",unknownUser:"Unknown user",turnstile:"Captcha failed",locked:"Locked out"};function j({items:e}){return(0,l.jsxs)("section",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)(n.ek,{size:16,className:"text-brand-500"}),(0,l.jsx)("h2",{className:"text-base font-semibold tracking-tight text-text",children:"Login Activity"}),(0,l.jsxs)("span",{className:"text-xs text-text-subtle font-mono",children:["last ",e.length]})]}),(0,l.jsx)("div",{className:"card-glass overflow-hidden",children:(0,l.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,l.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"px-4 py-2.5",children:"Time"}),(0,l.jsx)("th",{className:"px-4 py-2.5",children:"User"}),(0,l.jsx)("th",{className:"px-4 py-2.5",children:"IP"}),(0,l.jsx)("th",{className:"px-4 py-2.5 text-right",children:"Result"})]})}),(0,l.jsxs)("tbody",{className:"divide-y divide-border-subtle/50",children:[0===e.length&&(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:4,className:"px-4 py-8 text-center text-text-muted",children:"No login attempts recorded yet"})}),e.map((e,t)=>(0,l.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-2.5 text-xs text-text-muted whitespace-nowrap",children:function(e){try{return new Date(e+"Z").toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}(e.createdAt)}),(0,l.jsx)("td",{className:"px-4 py-2.5 font-mono text-xs text-text",children:e.username}),(0,l.jsx)("td",{className:"px-4 py-2.5 font-mono text-xs text-text-muted",children:e.ip}),(0,l.jsx)("td",{className:"px-4 py-2.5 text-right",children:e.ok?(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium border bg-emerald-500/10 text-emerald-500 border-emerald-500/20",children:[(0,l.jsx)(n.ek,{size:11})," OK"]}):(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[11px] font-medium border bg-red-500/10 text-danger border-red-500/20",children:[(0,l.jsx)(n.RI,{size:11})," ",f[e.reason]||e.reason]})})]},t))]})]})})]})}var g=s(39457),N=s(24945);function y(){let{can:e}=(0,N.b)(),{get:t,del:s}=(0,g.Z)(),[i,o]=(0,a.useState)(null),[x,m]=(0,a.useState)([]),[u,p]=(0,a.useState)([]),[f,y]=(0,a.useState)(0),[v,k]=(0,a.useState)(""),[w,A]=(0,a.useState)("lastAccessAt"),[S,C]=(0,a.useState)("desc"),[I,z]=(0,a.useState)(1),[D,P]=(0,a.useState)(d.Wm),[L,$]=(0,a.useState)(!1),M=(0,a.useCallback)(async()=>{$(!0);try{let s=new URLSearchParams({search:v,sortBy:w,order:S,page:String(I),pageSize:String(D)}),l=[t(`${d.lb.sessions}?${s.toString()}`),t(d.lb.stats)];e(d.Jj.logView)&&l.push(t(d.lb.logins));let[a,r,n]=await Promise.all(l);p(a.items||[]),y(a.total||0),o(r),n&&m(n.items||[])}catch(e){console.error(e)}finally{$(!1)}},[e,t,v,w,S,I,D]);(0,a.useEffect)(()=>{M()},[M]);let T=async e=>{confirm(`Delete session ${e}?`)&&(await s(`${d.lb.sessions}/${e}`),M())};return(0,l.jsx)(r.A,{children:(0,l.jsxs)("div",{className:"space-y-8",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad",children:"System Overview"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Real-time telemetry and active host instances"})]}),(0,l.jsxs)("button",{onClick:M,disabled:L,className:"self-start sm:self-auto inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,l.jsx)(n.e9,{size:13,className:L?"animate-spin text-brand-500":""}),(0,l.jsx)("span",{children:"Refresh"})]})]}),(0,l.jsx)("section",{children:(0,l.jsx)(c,{stats:i})}),e(d.Jj.logView)&&(0,l.jsx)(j,{items:x}),(0,l.jsxs)("section",{className:"space-y-4",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-bold tracking-tight text-text",children:"Active Sessions"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Connected and registered client sessions"})]}),(0,l.jsxs)("div",{className:"relative w-full sm:w-80",children:[(0,l.jsx)(n.vj,{size:15,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-text-muted"}),(0,l.jsx)("input",{value:v,onChange:e=>{k(e.target.value),z(1)},placeholder:"Search machineId, IP address...",className:"w-full pl-9 pr-3.5 py-2 bg-surface-2/80 border border-border-subtle rounded-xl text-text text-xs placeholder:text-text-subtle focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500/40 transition-all font-mono"})]})]}),(0,l.jsx)(b,{items:u,sortBy:w,order:S,onSortChange:(e,t)=>{A(e),C(t),z(1)},onDelete:T,canDelete:e(d.Jj.sessionDelete)}),(0,l.jsx)(h,{page:I,pageSize:D,total:f,onPageChange:z,onPageSizeChange:e=>{P(e),z(1)}})]})]})})}}},e=>{e.O(0,[774,9568,9958,8334,2347,5158,7358],()=>e(e.s=42761)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[540],{7116:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var a=s(73365),r=s(1521),l=s(38334),d=s(80186),n=s(96042),c=s(64683),o=s(39457),i=s(24945),x=s(57042);let u={keyId:"",secret:"",label:"",scope:"both"},b=["both","dev","prod"];function m(){let{can:e}=(0,i.b)(),{get:t,post:s,patch:m,del:h}=(0,o.Z)(),[p,g]=(0,r.useState)([]),[f,j]=(0,r.useState)(u),[y,N]=(0,r.useState)(!0),[v,w]=(0,r.useState)(!1),[k,C]=(0,r.useState)(""),[S,A]=(0,r.useState)(null),T=e(x.Jj.turnManage),$=(0,r.useCallback)(async()=>{N(!0);try{let e=await t(x.lb.turn);g(e.items||[])}catch(e){C(e.message)}finally{N(!1)}},[t]);(0,r.useEffect)(()=>{$()},[$]);let _=async()=>{C(""),w(!0),A(null);try{await s(x.lb.turn,f),A(f.secret),j(u),await $()}catch(e){C(e.message)}finally{w(!1)}},U=async e=>{try{await m(`${x.lb.turn}/${e.id}`,{enabled:!e.enabled}),$()}catch(e){C(e.message)}},z=async(e,t)=>{try{await m(`${x.lb.turn}/${e.id}`,{scope:t}),$()}catch(e){C(e.message)}},R=async e=>{if(confirm("Delete this TURN key? Clients using it fall back to STUN-only."))try{await h(`${x.lb.turn}/${e}`),$()}catch(e){C(e.message)}};return(0,a.jsx)(l.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(c.kV,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"TURN Keys"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Rotate Cloudflare TURN credentials for cross-network WebRTC relay"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("a",{href:"https://dash.cloudflare.com/?to=/:account/realtime/turn",target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-brand-500 hover:bg-brand-600 text-white text-xs font-semibold transition-colors shadow-[0_4px_12px_-4px_rgba(255,87,10,0.5)]",children:[(0,a.jsx)(c.Gr,{size:13}),(0,a.jsx)("span",{children:"Create on Cloudflare"})]}),(0,a.jsxs)("button",{onClick:$,disabled:y,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,a.jsx)(c.e9,{size:13,className:y?"animate-spin text-brand-500":""}),(0,a.jsx)("span",{children:"Refresh"})]})]})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted bg-surface-2/60 border border-border-subtle rounded-xl p-3",children:"Up to 1,000 keys. 1,000 GB/month free per Cloudflare account (shared with SFU) — more keys do not add quota."}),k&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-3 rounded-xl border border-red-500/20",children:k}),S&&(0,a.jsxs)("div",{className:"card-glass p-4 space-y-2 border border-brand-500/30",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text",children:"Key added — secret stored. Copy it if you need it elsewhere:"}),(0,a.jsx)("button",{onClick:()=>A(null),className:"text-text-muted hover:text-text",children:(0,a.jsx)(c.X,{size:14})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 text-[11px] font-mono text-text-muted bg-surface-2 rounded-lg px-3 py-2 break-all",children:S}),(0,a.jsx)("button",{onClick:()=>navigator.clipboard?.writeText(S),className:"p-2 rounded-lg bg-surface-2 hover:bg-surface-3 text-text-muted hover:text-text transition-colors","aria-label":"Copy secret",children:(0,a.jsx)(c.QR,{size:14})})]})]}),T&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4",children:[(0,a.jsxs)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2 border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)(c.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Add TURN Key"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsx)(n.A,{label:"Key ID",value:f.keyId,onChange:e=>j({...f,keyId:e.target.value.trim()}),placeholder:"32-char hex from Cloudflare dashboard"}),(0,a.jsx)(n.A,{label:"API Token / Secret",type:"password",value:f.secret,onChange:e=>j({...f,secret:e.target.value.trim()}),placeholder:"Bearer secret"}),(0,a.jsx)(n.A,{label:"Label",value:f.label,onChange:e=>j({...f,label:e.target.value}),placeholder:"e.g. acc-1 (which Cloudflare account)"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-1.5",children:"Scope"}),(0,a.jsx)("select",{className:"w-full px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text focus:outline-none focus:ring-2 focus:ring-brand-500/30",value:f.scope,onChange:e=>j({...f,scope:e.target.value}),children:b.map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(d.A,{onClick:_,disabled:v||!f.keyId||!f.secret,children:v?"Validating with Cloudflare...":"Add Key"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Scope ",(0,a.jsx)("span",{className:"font-mono",children:"dev"})," = credentials for pages on dev.9remote.cc only."]})]})]}),y?(0,a.jsxs)("div",{className:"card-glass p-12 text-center text-text-muted text-xs",children:[(0,a.jsx)(c.e9,{size:20,className:"mx-auto mb-2 animate-spin text-brand-500"}),"Loading keys..."]}):0===p.length?(0,a.jsxs)("div",{className:"card-glass p-12 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-surface-2 flex items-center justify-center mx-auto mb-3 text-text-subtle",children:(0,a.jsx)(c.kV,{size:24})}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text",children:"No TURN keys configured"}),(0,a.jsxs)("p",{className:"text-text-muted text-xs mt-1",children:["Clients fall back to the deployed ",(0,a.jsx)("code",{className:"font-mono text-brand-500",children:"TURN_KEY_ID"})," secret, or STUN-only if that is gone."]})]}):(0,a.jsx)("div",{className:"card-glass overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Key"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Scope"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Last Used"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),T&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:p.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsxs)("td",{className:"px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"font-mono text-xs text-text",children:[e.keyId.slice(0,12),"…"]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-subtle font-mono mt-0.5",children:[e.label||"(no label)"," \xb7 secret ",e.secretTail]})]}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:T?(0,a.jsx)("select",{className:"px-2 py-1 text-[11px] font-mono border border-border-subtle rounded-lg bg-surface-2/80 text-text focus:outline-none",value:e.scope,onChange:t=>z(e,t.target.value),children:b.map(e=>(0,a.jsx)("option",{value:e,children:e},e))}):(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-surface-2 border border-border-subtle text-text",children:e.scope})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted font-mono",children:(e=>{if(!e)return"never";try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}})(e.lastUsedAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:e.enabled?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:[(0,a.jsx)(c.aJ,{size:13}),(0,a.jsx)("span",{children:"Active"})]}):(0,a.jsx)("span",{className:"text-xs font-mono text-text-subtle px-2 py-0.5 rounded bg-surface-2",children:"Disabled"})}),T&&(0,a.jsxs)("td",{className:"px-4 py-3.5 text-right whitespace-nowrap",children:[(0,a.jsx)("button",{onClick:()=>U(e),className:"text-xs font-semibold text-brand-500 hover:text-brand-400 px-2.5 py-1 rounded-lg hover:bg-brand-500/10 transition-colors",children:e.enabled?"Disable":"Enable"}),(0,a.jsx)("button",{onClick:()=>R(e.id),className:"ml-1 p-1.5 rounded-lg text-text-muted hover:text-danger hover:bg-red-500/10 transition-colors","aria-label":"Delete key",children:(0,a.jsx)(c.TB,{size:14})})]})]},e.id))})]})})]})})}},56631:(e,t,s)=>{Promise.resolve().then(s.bind(s,7116))},80186:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({children:e,variant:t="primary",size:s="md",disabled:l=!1,loading:d=!1,onClick:n,className:c="",...o}){let i=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[s]} ${l||d?"cursor-not-allowed":""} ${c}`;return(0,a.jsx)("button",{onClick:n,disabled:l||d,className:i,...o,children:d?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},96042:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({label:e,type:t="text",value:s,onChange:l,onKeyDown:d,placeholder:n,disabled:c=!1,error:o,className:i="",...x}){let u=o?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",b=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${u} ${c?"opacity-50 cursor-not-allowed":""} ${i}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:t,value:s,onChange:l,onKeyDown:d,placeholder:n,disabled:c,className:b,...x}),o&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:o})]})}}},e=>{e.O(0,[7738,9568,9958,8334,2347,5158,7358],()=>e(e.s=56631)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[540],{7116:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>m});var a=s(73365),r=s(1521),l=s(38334),d=s(80186),n=s(96042),c=s(64683),o=s(39457),i=s(24945),x=s(57042);let u={keyId:"",secret:"",label:"",scope:"both"},b=["both","dev","prod"];function m(){let{can:e}=(0,i.b)(),{get:t,post:s,patch:m,del:h}=(0,o.Z)(),[p,g]=(0,r.useState)([]),[f,j]=(0,r.useState)(u),[y,N]=(0,r.useState)(!0),[v,w]=(0,r.useState)(!1),[k,C]=(0,r.useState)(""),[S,A]=(0,r.useState)(null),T=e(x.Jj.turnManage),$=(0,r.useCallback)(async()=>{N(!0);try{let e=await t(x.lb.turn);g(e.items||[])}catch(e){C(e.message)}finally{N(!1)}},[t]);(0,r.useEffect)(()=>{$()},[$]);let _=async()=>{C(""),w(!0),A(null);try{await s(x.lb.turn,f),A(f.secret),j(u),await $()}catch(e){C(e.message)}finally{w(!1)}},U=async e=>{try{await m(`${x.lb.turn}/${e.id}`,{enabled:!e.enabled}),$()}catch(e){C(e.message)}},z=async(e,t)=>{try{await m(`${x.lb.turn}/${e.id}`,{scope:t}),$()}catch(e){C(e.message)}},R=async e=>{if(confirm("Delete this TURN key? Clients using it fall back to STUN-only."))try{await h(`${x.lb.turn}/${e}`),$()}catch(e){C(e.message)}};return(0,a.jsx)(l.A,{children:(0,a.jsxs)("div",{className:"space-y-8 max-w-5xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold tracking-tight text-text login-hero-grad flex items-center gap-2.5",children:[(0,a.jsx)(c.kV,{size:24,className:"text-brand-500"}),(0,a.jsx)("span",{children:"TURN Keys"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Rotate Cloudflare TURN credentials for cross-network WebRTC relay"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("a",{href:"https://dash.cloudflare.com/?to=/:account/realtime/turn",target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-brand-500 hover:bg-brand-600 text-white text-xs font-semibold transition-colors shadow-[0_4px_12px_-4px_rgba(255,87,10,0.5)]",children:[(0,a.jsx)(c.Gr,{size:13}),(0,a.jsx)("span",{children:"Create on Cloudflare"})]}),(0,a.jsxs)("button",{onClick:$,disabled:y,className:"inline-flex items-center gap-2 px-3.5 py-1.5 rounded-xl bg-surface-2 hover:bg-surface-3 border border-border-subtle text-xs font-medium text-text transition-colors disabled:opacity-50",children:[(0,a.jsx)(c.e9,{size:13,className:y?"animate-spin text-brand-500":""}),(0,a.jsx)("span",{children:"Refresh"})]})]})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted bg-surface-2/60 border border-border-subtle rounded-xl p-3",children:"Up to 1,000 keys. 1,000 GB/month free per Cloudflare account (shared with SFU) — more keys do not add quota."}),k&&(0,a.jsx)("p",{className:"text-xs text-danger bg-red-500/10 p-3 rounded-xl border border-red-500/20",children:k}),S&&(0,a.jsxs)("div",{className:"card-glass p-4 space-y-2 border border-brand-500/30",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text",children:"Key added — secret stored. Copy it if you need it elsewhere:"}),(0,a.jsx)("button",{onClick:()=>A(null),className:"text-text-muted hover:text-text",children:(0,a.jsx)(c.X,{size:14})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 text-[11px] font-mono text-text-muted bg-surface-2 rounded-lg px-3 py-2 break-all",children:S}),(0,a.jsx)("button",{onClick:()=>navigator.clipboard?.writeText(S),className:"p-2 rounded-lg bg-surface-2 hover:bg-surface-3 text-text-muted hover:text-text transition-colors","aria-label":"Copy secret",children:(0,a.jsx)(c.QR,{size:14})})]})]}),T&&(0,a.jsxs)("div",{className:"card-glass p-5 sm:p-6 space-y-4",children:[(0,a.jsxs)("h2",{className:"text-sm font-semibold tracking-tight text-text flex items-center gap-2 border-b border-border-subtle/60 pb-3",children:[(0,a.jsx)(c.FW,{size:16,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Add TURN Key"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsx)(n.A,{label:"Key ID",value:f.keyId,onChange:e=>j({...f,keyId:e.target.value.trim()}),placeholder:"32-char hex from Cloudflare dashboard"}),(0,a.jsx)(n.A,{label:"API Token / Secret",type:"password",value:f.secret,onChange:e=>j({...f,secret:e.target.value.trim()}),placeholder:"Bearer secret"}),(0,a.jsx)(n.A,{label:"Label",value:f.label,onChange:e=>j({...f,label:e.target.value}),placeholder:"e.g. acc-1 (which Cloudflare account)"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-mono uppercase tracking-wider text-text-muted mb-1.5",children:"Scope"}),(0,a.jsx)("select",{className:"w-full px-3 py-2 text-xs border border-border-subtle rounded-xl bg-surface-2/80 text-text focus:outline-none focus:ring-2 focus:ring-brand-500/30",value:f.scope,onChange:e=>j({...f,scope:e.target.value}),children:b.map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(d.A,{onClick:_,disabled:v||!f.keyId||!f.secret,children:v?"Validating with Cloudflare...":"Add Key"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Scope ",(0,a.jsx)("span",{className:"font-mono",children:"dev"})," = credentials for pages on dev.9remote.cc only."]})]})]}),y?(0,a.jsxs)("div",{className:"card-glass p-12 text-center text-text-muted text-xs",children:[(0,a.jsx)(c.e9,{size:20,className:"mx-auto mb-2 animate-spin text-brand-500"}),"Loading keys..."]}):0===p.length?(0,a.jsxs)("div",{className:"card-glass p-12 text-center",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-2xl bg-surface-2 flex items-center justify-center mx-auto mb-3 text-text-subtle",children:(0,a.jsx)(c.kV,{size:24})}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text",children:"No TURN keys configured"}),(0,a.jsxs)("p",{className:"text-text-muted text-xs mt-1",children:["Clients fall back to the deployed ",(0,a.jsx)("code",{className:"font-mono text-brand-500",children:"TURN_KEY_ID"})," secret, or STUN-only if that is gone."]})]}):(0,a.jsx)("div",{className:"card-glass overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,a.jsx)("thead",{className:"bg-surface-2/60 border-b border-border-subtle text-[11px] font-mono uppercase tracking-wider text-text-muted",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Key"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Scope"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Last Used"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),T&&(0,a.jsx)("th",{className:"px-4 py-3 text-right",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle/50",children:p.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-surface-2/40 transition-colors",children:[(0,a.jsxs)("td",{className:"px-4 py-3.5",children:[(0,a.jsxs)("div",{className:"font-mono text-xs text-text",children:[e.keyId.slice(0,12),"…"]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-subtle font-mono mt-0.5",children:[e.label||"(no label)"," \xb7 secret ",e.secretTail]})]}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:T?(0,a.jsx)("select",{className:"px-2 py-1 text-[11px] font-mono border border-border-subtle rounded-lg bg-surface-2/80 text-text focus:outline-none",value:e.scope,onChange:t=>z(e,t.target.value),children:b.map(e=>(0,a.jsx)("option",{value:e,children:e},e))}):(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-mono bg-surface-2 border border-border-subtle text-text",children:e.scope})}),(0,a.jsx)("td",{className:"px-4 py-3.5 text-xs text-text-muted font-mono",children:(e=>{if(!e)return"never";try{return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}})(e.lastUsedAt)}),(0,a.jsx)("td",{className:"px-4 py-3.5",children:e.enabled?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-emerald-500/10 text-emerald-500 border border-emerald-500/20",children:[(0,a.jsx)(c.aJ,{size:13}),(0,a.jsx)("span",{children:"Active"})]}):(0,a.jsx)("span",{className:"text-xs font-mono text-text-subtle px-2 py-0.5 rounded bg-surface-2",children:"Disabled"})}),T&&(0,a.jsxs)("td",{className:"px-4 py-3.5 text-right whitespace-nowrap",children:[(0,a.jsx)("button",{onClick:()=>U(e),className:"text-xs font-semibold text-brand-500 hover:text-brand-400 px-2.5 py-1 rounded-lg hover:bg-brand-500/10 transition-colors",children:e.enabled?"Disable":"Enable"}),(0,a.jsx)("button",{onClick:()=>R(e.id),className:"ml-1 p-1.5 rounded-lg text-text-muted hover:text-danger hover:bg-red-500/10 transition-colors","aria-label":"Delete key",children:(0,a.jsx)(c.TB,{size:14})})]})]},e.id))})]})})]})})}},56631:(e,t,s)=>{Promise.resolve().then(s.bind(s,7116))},80186:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({children:e,variant:t="primary",size:s="md",disabled:l=!1,loading:d=!1,onClick:n,className:c="",...o}){let i=`font-semibold rounded-brand transition-all duration-150 ease-out transform active:scale-[0.97] ${{primary:"bg-brand-500 hover:bg-brand-600 disabled:bg-surface-3 disabled:text-text-muted text-white shadow-sm",secondary:"bg-surface-2 hover:bg-surface-3 disabled:bg-surface disabled:text-text-muted text-text",danger:"bg-red-500 hover:bg-red-600 disabled:bg-surface-3 disabled:text-text-muted text-white",success:"bg-green-600 hover:bg-green-700 disabled:bg-surface-3 disabled:text-text-muted text-white"}[t]} ${{sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg"}[s]} ${l||d?"cursor-not-allowed":""} ${c}`;return(0,a.jsx)("button",{onClick:n,disabled:l||d,className:i,...o,children:d?(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),e]}):e})}},96042:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(73365);function r({label:e,type:t="text",value:s,onChange:l,onKeyDown:d,placeholder:n,disabled:c=!1,error:o,className:i="",...x}){let u=o?"ring-1 ring-red-500 focus:ring-2 focus:ring-red-500":"focus:ring-2 focus:ring-brand-500/40",b=`w-full px-4 py-3 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none transition-all duration-150 ease-out ${u} ${c?"opacity-50 cursor-not-allowed":""} ${i}`;return(0,a.jsxs)("div",{className:"w-full",children:[e&&(0,a.jsx)("label",{className:"block text-sm font-medium text-text mb-2",children:e}),(0,a.jsx)("input",{type:t,value:s,onChange:l,onKeyDown:d,placeholder:n,disabled:c,className:b,...x}),o&&(0,a.jsx)("p",{className:"mt-1 text-sm text-red-400",children:o})]})}}},e=>{e.O(0,[774,9568,9958,8334,2347,5158,7358],()=>e(e.s=56631)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[967],{8910:(e,A,o)=>{"use strict";function t(e=10){if(navigator.vibrate)return void navigator.vibrate(e);if("u">typeof document){let e=document.createElement("div"),A=Math.random().toString(36).slice(2);e.innerHTML=`<input type="checkbox" id="${A}" switch /><label for="${A}"></label>`,e.setAttribute("style","display:none !important;opacity:0 !important;visibility:hidden !important;"),document.body.appendChild(e),e.querySelector("label").click(),setTimeout(()=>e.remove(),100)}}o.d(A,{e:()=>t})},58506:(e,A,o)=>{"use strict";o.r(A),o.d(A,{default:()=>l});var t=o(73365),n=o(6552);let i=[{question:"Which background should the pane use?",multiSelect:!1,options:[{label:"Keep the global pool",description:"Every pane follows the workspace setting."},{label:"Pin a wallpaper",description:"Only this session gets its own image."},{label:"Solid colour",description:"No image, just the theme surface."}]}],r=[{question:"Which panes should the new layout open?",multiSelect:!0,options:[{label:"Terminal",description:"A shell in the workspace root."},{label:"AI chat",description:"The agent pane for the active engine."},{label:"Files",description:"The explorer panel on the right."}]},{question:"Anything else to note?",options:[{label:"No",description:"Just open them."}]}];function l(){return(0,t.jsxs)("div",{className:"min-h-screen bg-bg p-6 flex flex-col gap-6 max-w-md",children:[(0,t.jsx)(n.J,{questions:i,onResolve:()=>{}}),(0,t.jsx)(n.J,{questions:r,onResolve:()=>{}}),(0,t.jsx)(n.J,{questions:i,answers:'User has answered your questions: "Which background should the pane use?"="Pin a wallpaper".'})]})}},61436:(e,A,o)=>{Promise.resolve().then(o.bind(o,58506))},64683:(e,A,o)=>{"use strict";o.d(A,{$o:()=>eT.A,AX:()=>eb.A,Ay:()=>Ai,BK:()=>e8.A,BZ:()=>Q.A,Bm:()=>D.A,Cp:()=>z.A,Do:()=>l.A,F1:()=>a.A,FE:()=>e$.A,FW:()=>eR.A,GD:()=>j.A,GO:()=>eu.A,Gr:()=>F.A,Gv:()=>ev.A,Hx:()=>en.A,Ir:()=>s.A,J4:()=>eQ.A,JG:()=>m.A,JU:()=>_.A,Jl:()=>h.A,Kq:()=>At.A,LM:()=>ea.A,Lt:()=>S.A,M6:()=>eK.A,Mr:()=>ej.A,P6:()=>ee.A,QR:()=>P.A,Qp:()=>r.A,RI:()=>n.A,TB:()=>e6.A,Ud:()=>X.A,VA:()=>ef.A,Vn:()=>eB.A,W1:()=>eh.A,WE:()=>g.A,We:()=>e3.A,Wn:()=>k.A,X:()=>Ao.A,X_:()=>O.A,ZH:()=>R.A,ZU:()=>e7.A,Ze:()=>eO.A,Zr:()=>B.A,_O:()=>e9.A,_V:()=>Y.A,a4:()=>eg.A,aJ:()=>d.A,ak:()=>Z.A,bE:()=>e0.A,bd:()=>e1.A,cC:()=>c.A,c_:()=>f.A,dJ:()=>H.A,de:()=>AA.A,dx:()=>N.A,e6:()=>ek.A,e9:()=>eE.A,eM:()=>eJ.A,ek:()=>eI.A,es:()=>eC.A,f2:()=>I.A,f5:()=>M.A,gH:()=>eF.A,h1:()=>ep.A,iU:()=>E.A,jG:()=>eq.A,jj:()=>em.A,jl:()=>v.A,jz:()=>ex.A,kU:()=>U.A,kV:()=>eA.A,kr:()=>el.A,kt:()=>eH.A,lM:()=>e5.A,lP:()=>ey.A,m0:()=>w.A,mN:()=>K.A,nU:()=>ec.A,qz:()=>V.A,rX:()=>b.A,rb:()=>et.A,s3:()=>eo.A,sU:()=>eZ.A,sv:()=>G.A,ue:()=>eP.A,vR:()=>eM.A,vW:()=>eW.A,vd:()=>J.A,vj:()=>e_.A,vv:()=>ei.A,wB:()=>ez.A,wO:()=>eX.A,ww:()=>$.A,xq:()=>ed.A,xv:()=>eL.A,y8:()=>er.A,yQ:()=>u.A,yU:()=>eU.A,yd:()=>i.A,zW:()=>e4.A});var t=o(73365),n=o(87821),i=o(21878),r=o(79376),l=o(61659),a=o(6504),s=o(74739),c=o(29967),p=o(17836),d=o(67494),h=o(66687),u=o(95188),m=o(54453),f=o(34582),b=o(70453),g=o(10949),v=o(64570),w=o(31258),y=o(59907),C=o(13374),k=o(17406),P=o(46431),S=o(29260),x=o(88433),L=o(49553),M=o(20478),F=o(17568),U=o(87831),O=o(1916),q=o(29418),R=o(18272),j=o(10550),T=o(9271),W=o(14251),E=o(50068),G=o(98173),H=o(10194),J=o(70362),D=o(17909),_=o(59437),B=o(33109),N=o(48433),z=o(86877),V=o(34271),I=o(60919),X=o(35723),Z=o(41046),K=o(64629),Q=o(6534),$=o(5370),Y=o(59711),ee=o(39831),eA=o(9560),eo=o(44159),et=o(41098),en=o(20021),ei=o(14797),er=o(15504),el=o(93292),ea=o(92165),es=o(94304),ec=o(40789),ep=o(64871),ed=o(31805),eh=o(19621),eu=o(40081),em=o(38781),ef=o(88768),eb=o(68395),eg=o(88793),ev=o(25406),ew=o(10998),ey=o(64446),eC=o(12925),ek=o(93354),eP=o(73243),eS=o(89317),ex=o(12283),eL=o(1578),eM=o(90612),eF=o(43959),eU=o(76621),eO=o(59833),eq=o(67236),eR=o(97038),ej=o(72147),eT=o(68859),eW=o(93285),eE=o(20178),eG=o(65062),eH=o(87030),eJ=o(67519),eD=o(457),e_=o(58450),eB=o(48088),eN=o(56023),ez=o(59311),eV=o(38177),eI=o(60659),eX=o(1838),eZ=o(34969),eK=o(42685),eQ=o(99707),e$=o(6830),eY=o(20248),e1=o(11384),e3=o(50211),e8=o(64342),e6=o(60151),e5=o(81610),e7=o(11990),e0=o(52715),e9=o(49387),e4=o(894),e2=o(2031),Ae=o(58573),AA=o(51328),Ao=o(3382),At=o(57717);let An={AlertCircle:n.A,ArrowDown:i.A,ArrowRight:r.A,ArrowUp:l.A,ArrowUpRight:a.A,Bell:s.A,Bot:c.A,Bug:p.A,Check:d.A,CheckCircle2:h.A,ChevronDown:u.A,ChevronLeft:m.A,ChevronRight:f.A,ChevronUp:b.A,ChevronsDownUp:g.A,Circle:v.A,ClipboardPaste:w.A,Command:y.A,Compass:C.A,Columns2:k.A,Copy:P.A,CornerDownLeft:S.A,Crown:x.A,Delete:L.A,Download:M.A,ExternalLink:F.A,Eye:U.A,EyeOff:O.A,Facebook:q.A,File:R.A,FileCode:j.A,FileJson:T.A,FilePlus:W.A,FileText:E.A,Files:G.A,Filter:H.A,Folder:J.A,FolderOpen:D.A,FolderPlus:_.A,GitBranch:B.A,GitFork:N.A,Github:z.A,Globe:V.A,GripVertical:I.A,Hand:X.A,HardDrive:Z.A,HelpCircle:K.A,History:Q.A,Home:$.A,Image:Y.A,ImageOff:ee.A,KeyRound:eA.A,Keyboard:eo.A,Laptop:et.A,LayoutDashboard:en.A,Link2:ei.A,ListChecks:er.A,Loader2:el.A,Lock:ea.A,LogIn:es.A,LogOut:ec.A,Maximize2:ep.A,Minimize2:ed.A,Menu:eh.A,Mic:eu.A,MicOff:em.A,Monitor:ef.A,Moon:eb.A,MoreHorizontal:eg.A,MoreVertical:ev.A,MousePointer2:ew.A,Package:ey.A,Palette:eC.A,PanelLeft:ek.A,PanelLeftClose:eP.A,PanelLeftOpen:eS.A,PanelRight:ex.A,Paperclip:eL.A,Pause:eM.A,Pencil:eF.A,Pin:eU.A,PinOff:eO.A,Play:eq.A,Plus:eR.A,Power:ej.A,PowerOff:eT.A,QrCode:eW.A,RefreshCw:eE.A,Replace:eG.A,RotateCw:eH.A,Save:eJ.A,Scissors:eD.A,Search:e_.A,Send:eB.A,SendHorizontal:eN.A,Settings:ez.A,Share:eV.A,Shield:eI.A,Smartphone:eX.A,Sparkles:eZ.A,Square:eK.A,SquarePen:eQ.A,Star:e$.A,StickyNote:eY.A,Sun:e1.A,Target:e3.A,Terminal:e8.A,Trash2:e6.A,Triangle:e5.A,Type:e7.A,Undo2:e0.A,Upload:e9.A,Users:e4.A,Volume2:e2.A,VolumeX:Ae.A,Wallpaper:AA.A,X:Ao.A,Zap:At.A};function Ai({name:e,size:A=20,className:o="",...n}){let i=An[e];return i?(0,t.jsx)(i,{size:A,className:o,strokeWidth:2,...n}):(console.warn(`Icon "${e}" not found in the icon registry`),null)}}},e=>{e.O(0,[774,6552,2347,5158,7358],()=>e(e.s=61436)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{45136:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>W});var a=s(73365),n=s(1521),r=s(29717),l=s(20464),i=s(4018),o=s(2163),c=s(59893),d=s(64683),x=s(80186),m=s(78762);function u({isOpen:e,onClose:t,onScan:r}){let{t:l}=(0,m.s)(),i=(0,n.useRef)(null),o=(0,n.useRef)(null),c=(0,n.useRef)(null),p=(0,n.useRef)(null),h=(0,n.useRef)(null),[g,b]=(0,n.useState)(""),[f,j]=(0,n.useState)(""),y=(0,n.useCallback)(async e=>{if(o.current)try{await o.current.stop()}catch(e){}j("detected"),await new Promise(e=>setTimeout(e,300)),j("authenticating"),await r(e)||(j(""),h.current?.())},[r]),v=(0,n.useCallback)(async()=>{if(!c.current){let e=await Promise.all([s.e(3446),s.e(6075)]).then(s.bind(s,16075)).catch(()=>null);if(!e)return void b(l("login.qrLibFail"));c.current=e.Html5Qrcode}let e=document.getElementById("qr-reader");if(!e)return void b(l("login.qrInitFail"));try{e.innerHTML="";let t=new c.current("qr-reader");o.current=t,await t.start({facingMode:"environment"},{fps:10,qrbox:{width:250,height:250}},e=>{p.current?.(e)},()=>{})}catch(t){let e=t.toString();e.includes("NotAllowedError")?b(l("login.qrCamDenied")):e.includes("NotFoundError")?b(l("login.qrNoCamera")):e.includes("NotReadableError")?b(l("login.qrCamBusy")):b(l("login.qrCamError"))}},[l]),w=(0,n.useCallback)(async()=>{if(o.current){try{await o.current.stop()}catch(e){}o.current=null}b(""),j(""),t()},[t]);return((0,n.useEffect)(()=>{p.current=y},[y]),(0,n.useEffect)(()=>{if(!e)return;let t=!1;h.current=async()=>{o.current=null,await new Promise(e=>setTimeout(e,400)),t||v()};let s=setTimeout(()=>{t||v()},200);return()=>{if(t=!0,clearTimeout(s),h.current=null,o.current){try{o.current.stop()}catch(e){}o.current=null}}},[e,v]),e)?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"relative card-elev max-w-md w-full mx-4 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-text",children:l("login.qrScanTitle")}),(0,a.jsx)("button",{onClick:w,className:"text-text-muted hover:text-text transition-colors p-1",children:(0,a.jsx)(d.X,{size:24})})]}),(0,a.jsx)("div",{className:"relative bg-black",children:(0,a.jsx)("div",{id:"qr-reader",ref:i,className:"w-full",style:{minHeight:"300px"}})}),(0,a.jsxs)("div",{className:"p-4",children:[g?(0,a.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-red-500/10 rounded-brand text-red-400",children:[(0,a.jsx)(d.RI,{size:20,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("p",{className:"text-sm",children:g})]}):"detected"===f?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 p-3 bg-green-500/10 rounded-brand text-green-400",children:[(0,a.jsx)(d.vW,{size:22}),(0,a.jsx)("p",{className:"text-sm font-medium",children:l("login.qrDetected")})]}):"authenticating"===f?(0,a.jsx)("div",{className:"flex items-center justify-center gap-2 p-3 bg-brand-500/10 rounded-brand text-brand-400",children:(0,a.jsx)("p",{className:"text-sm font-medium",children:l("login.qrAuthenticating")})}):(0,a.jsx)("p",{className:"text-sm text-text-muted text-center",children:l("login.qrHint")}),(0,a.jsx)(x.A,{variant:"secondary",onClick:w,disabled:"authenticating"===f,className:"w-full mt-4",children:"authenticating"===f?l("login.qrPleaseWait"):l("common.cancel")})]})]})}):null}var p=s(45111),h=s(42174),g=s(30240),b=s(8910),f=s(52345),j=s(18057);function y({className:e="",showLabel:t=!0}){let{locale:s}=(0,m.s)(),[r,l]=(0,n.useState)(!1),i=f.dI.find(e=>e.code===s)||f.dI[0];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{onClick:()=>{(0,b.e)(),l(!0)},className:`flex items-center gap-1.5 bg-surface-2 hover:bg-surface-3 rounded-brand text-text text-sm px-2 py-1 transition-all duration-150 ease-out active:scale-[0.96] ${e}`,title:i.label,children:[(0,a.jsx)("img",{src:`https://flagcdn.com/w40/${i.country}.png`,alt:i.label,className:"w-[17px] h-[12px] object-cover rounded-[2px]",loading:"lazy"}),t&&(0,a.jsx)("span",{className:"hidden sm:inline",children:i.code.toUpperCase()})]}),(0,a.jsx)(j.A,{isOpen:r,onClose:()=>l(!1)})]})}var v=s(90753),w=s(38415),N=s(23346);let k=null;async function C(){k||(k=N.Ay.ready),await k}async function S(e,t){await C();let s=N.Ay.from_base64(e,N.Ay.base64_variants.ORIGINAL),a=N.Ay.from_string(t),n=N.Ay.crypto_box_seal(a,s);return N.Ay.to_base64(n,N.Ay.base64_variants.ORIGINAL)}function A(e=24){let t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}let _="9remote_github_token",L="9remote:githubTokenChange";async function z(e,t,s={}){let a=await fetch(`${w.pe}${t}`,{...s,headers:{...{Authorization:`Bearer ${e}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"},...s.headers||{}}});if(!a.ok){let e=await a.text().catch(()=>"");throw Error(`GitHub ${a.status}: ${e||a.statusText}`)}return 204===a.status?null:a.json()}function I(){let[e,t]=(0,n.useState)(()=>localStorage.getItem(_)||""),[s,a]=(0,n.useState)(!1),[r,l]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=()=>{t(localStorage.getItem(_)||"")};return window.addEventListener(L,e),window.addEventListener("storage",e),()=>{window.removeEventListener(L,e),window.removeEventListener("storage",e)}},[!0]);let i=(0,n.useCallback)(e=>{t(e),e?localStorage.setItem(_,e):localStorage.removeItem(_),window.dispatchEvent(new Event(L))},[!0]),o=(0,n.useCallback)(()=>{i("")},[i]),c=(0,n.useCallback)(async(t=e)=>z(t,w.no.user),[e]),d=(0,n.useCallback)(async()=>{a(!0),l(null);try{return(await z(e,w.no.codespaces)).codespaces||[]}catch(e){return l(e.message),[]}finally{a(!1)}},[e]),x=(0,n.useCallback)(async t=>z(e,w.no.codespaceByName(t)),[e]),m=(0,n.useCallback)(async t=>z(e,w.no.startCodespace(t),{method:"POST"}),[e]),u=(0,n.useCallback)(async()=>z(e,w.no.userReposList),[e]),p=(0,n.useCallback)(async(t,s)=>z(e,w.no.createCodespaceForRepo(t,s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),[e]),h=(0,n.useCallback)(async(t,s)=>{let a=await z(e,w.no.codespaceSecretsPublicKey),n=await S(a.key,s);await z(e,w.no.codespaceSecret(w.Gf),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({encrypted_value:n,key_id:a.key_id,selected_repository_ids:[t]})})},[e]),g=(0,n.useCallback)(async(t,s)=>{let a=w.no.repoContents(t,s,w.Hu),n=!1;try{await z(e,a),n=!0}catch{}if(n)return{existed:!0};let r=JSON.stringify(w.cu,null,2);return await z(e,a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:"Add 9remote devcontainer",content:btoa(unescape(encodeURIComponent(r)))})}),{existed:!1}},[e]),b=(0,n.useCallback)(async(e,t)=>{for(let s=0;s<w.ij;s++){let s=await x(e);if(t?.(s.state),s.state===w.Gi.available)return s;await new Promise(e=>setTimeout(e,w.Nn))}throw Error("Codespace start timeout")},[x]);return{token:e,setToken:i,clearToken:o,loading:s,error:r,getUser:c,listCodespaces:d,getCodespace:x,startCodespace:m,waitUntilAvailable:b,listRepos:u,createCodespace:p,ensureDevcontainer:g,setApiKeySecret:h,generateApiKey:A}}function E({isOpen:e,onClose:t,onCreated:s}){let{listRepos:r,createCodespace:l,ensureDevcontainer:i,setApiKeySecret:o,generateApiKey:c,error:m}=I(),[u,h]=(0,n.useState)([]),[g,b]=(0,n.useState)(!1),[f,j]=(0,n.useState)(null),[y,v]=(0,n.useState)(""),[w,N]=(0,n.useState)(null),[k,C]=(0,n.useState)("");(0,n.useEffect)(()=>{e&&(N(null),b(!0),r().then(e=>h(Array.isArray(e)?e:[])).catch(e=>N(e.message)).finally(()=>b(!1)))},[e,r]),(0,n.useEffect)(()=>{if(!e||f)return;let s=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),t?.())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[e,f,t]);let S=(0,n.useMemo)(()=>{let e=y.trim().toLowerCase();return e?u.filter(t=>t.full_name.toLowerCase().includes(e)):u},[u,y]),A=async e=>{j(e.full_name),N(null),C("Generating API key...");try{let t=c();C("Setting codespace secret..."),await o(e.id,t),C("Setting up devcontainer..."),await i(e.owner.login,e.name),C("Creating codespace...");let a=await l(e.owner.login,e.name);s({codespace:a,apiKey:t})}catch(e){N(e.message)}finally{j(null),C("")}};return e?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",onClick:t,children:(0,a.jsxs)("div",{className:"card-elev p-6 max-w-md w-full max-h-[80dvh] flex flex-col border border-border",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h3",{className:"text-lg font-bold text-text",children:"Select repository"}),(0,a.jsx)("button",{onClick:t,className:"p-1 text-text-muted hover:text-text",children:(0,a.jsx)(d.X,{size:20})})]}),(0,a.jsxs)("div",{className:"relative mb-3",children:[(0,a.jsx)(d.vj,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-muted"}),(0,a.jsx)("input",{type:"text",value:y,onChange:e=>v(e.target.value),placeholder:"Search repos...",className:"w-full pl-9 pr-3 py-2 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-brand-500/40 text-sm"})]}),(w||m)&&(0,a.jsxs)("div",{className:"flex items-start gap-2 mb-3 p-2 bg-danger/10 rounded-brand text-xs text-danger",children:[(0,a.jsx)(d.RI,{size:14,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("span",{className:"break-words",children:w||m})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto space-y-1",children:g?(0,a.jsx)(p.A,{text:"Loading repos..."}):0===S.length?(0,a.jsx)("div",{className:"text-center py-6 text-text-muted text-sm",children:"No repos"}):S.map(e=>{let t=f===e.full_name;return(0,a.jsxs)("div",{className:"p-2 bg-surface-2 hover:bg-surface-3 rounded-brand transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm text-text font-medium truncate",title:e.full_name,children:e.full_name}),e.private&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"private"})]}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>A(e),disabled:!!f,loading:t,className:"!py-1 !px-2 text-xs",children:[(0,a.jsx)(d.FW,{size:12}),"Create"]})]}),t&&k&&(0,a.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:k})]},e.id)})})]})}):null}let K="9remote_codespace_keys";function R(){try{return JSON.parse(localStorage.getItem(K)||"{}")}catch{return{}}}function T({onConnect:e,onLogout:t}){let{listCodespaces:s,startCodespace:r,waitUntilAvailable:l,loading:i,error:o,getUser:c}=I(),[m,u]=(0,n.useState)([]),[h,g]=(0,n.useState)(null),[b,f]=(0,n.useState)(null),[j,y]=(0,n.useState)(""),[v,N]=(0,n.useState)(!1),k=(0,n.useCallback)(async()=>{try{let e=await c();g(e)}catch{}u(await s())},[c,s]);(0,n.useEffect)(()=>{k()},[k]);let C=async t=>{var s;let a=(s=t.name,R()[s]||null);if(!a){y("No saved key for this codespace. Recreate it from web to enable auto-connect."),f(t.name),setTimeout(()=>{f(null),y("")},4e3);return}f(t.name),y("");try{let s=t;t.state!==w.Gi.available&&(y("Starting codespace..."),await r(t.name),s=await l(t.name,e=>{y(`State: ${e}`)})),e(s,a)}catch(e){y(`Error: ${e.message}`)}finally{f(null)}};return(0,a.jsxs)("div",{className:"card-elev p-8 max-w-md w-full border border-border",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,a.jsx)("div",{className:"p-2 bg-brand-500/10 rounded-brand",children:(0,a.jsx)(d.Cp,{className:"text-brand-500",size:24})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-text",children:"Codespaces"}),h&&(0,a.jsxs)("p",{className:"text-sm text-text-muted truncate",children:["@",h.login]})]}),(0,a.jsx)("button",{onClick:()=>N(!0),className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"New codespace",children:(0,a.jsx)(d.FW,{size:18})}),(0,a.jsx)("button",{onClick:k,disabled:i,className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"Refresh",children:(0,a.jsx)(d.e9,{size:18,className:i?"animate-spin":""})}),(0,a.jsx)("button",{onClick:t,className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"Logout",children:(0,a.jsx)(d.nU,{size:18})})]}),o&&(0,a.jsxs)("div",{className:"flex items-start gap-2 mb-4 p-3 bg-danger/10 rounded-brand text-sm text-danger",children:[(0,a.jsx)(d.RI,{size:16,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("span",{className:"break-words",children:o})]}),i&&0===m.length?(0,a.jsx)(p.A,{text:"Loading codespaces..."}):0===m.length?(0,a.jsxs)("div",{className:"text-center py-8",children:[(0,a.jsx)("p",{className:"text-text-muted text-sm mb-4",children:"No codespaces yet."}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>N(!0),children:[(0,a.jsx)(d.FW,{size:16}),"Create new codespace"]})]}):(0,a.jsx)("div",{className:"space-y-2",children:m.map(e=>{let t=b===e.name,s=e.state===w.Gi.available;return(0,a.jsxs)("div",{className:"bg-surface-2 rounded-brand p-3 hover:bg-surface-3 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-text font-medium truncate",title:e.display_name||e.name,children:e.display_name||e.name}),(0,a.jsxs)("div",{className:"text-xs text-text-muted truncate",title:`${e.repository?.full_name} \xb7 ${e.state}`,children:[e.repository?.full_name," \xb7 ",e.state]})]}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>C(e),disabled:t,loading:t,className:"!py-1.5 !px-3 text-sm",children:[(0,a.jsx)(d.jG,{size:14}),s?"Connect":"Start"]})]}),t&&j&&(0,a.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:j})]},e.name)})}),(0,a.jsx)(E,{isOpen:v,onClose:()=>N(!1),onCreated:({codespace:e,apiKey:t})=>{var s;let a;s=e.name,(a=R())[s]=t,localStorage.setItem(K,JSON.stringify(a)),N(!1),k()}})]})}var M=s(97711),P=s(90084),F=s(86129),O=s(11155),q=s(2805),$=s(75687),D=s(90076);function G(){let{t:e}=(0,m.s)(),[t,s]=(0,n.useState)(""),[b,f]=(0,n.useState)(!0),[j,N]=(0,n.useState)([]),[k,C]=(0,n.useState)(!1),[S,A]=(0,n.useState)(!1),[_,L]=(0,n.useState)("local"),[z,E]=(0,n.useState)(null),[K,R]=(0,n.useState)(""),[G,U]=(0,n.useState)(null),[W,B]=(0,n.useState)(null),[H,J]=(0,n.useState)(null),Q="3.0.10",{token:X,clearToken:V}=I(),{setAuth:Y}=(0,M.F)(),Z=(0,r.useSearchParams)(),ee=(0,r.useRouter)(),{loading:et,error:es,authenticateWithToken:ea,authenticateWithApiKey:en}=(0,l.As)(),[er,el]=(0,n.useState)(!1),{loadKeys:ei,saveKey:eo,removeKey:ec,renameKey:ed,hasStoredKeys:ex,updateLastLogin:em}=(0,i.u)(),eu=(0,n.useMemo)(()=>j.some(e=>(0,O.PF)(e.key)),[j]),ep=(0,n.useMemo)(()=>Z.get("t"),[Z]),[eh]=(0,n.useState)(()=>{try{let e=sessionStorage.getItem("9remote_url_pairing");if(e)return e;let t=(0,$.k)(window.location.hash)||(0,$.k)(window.location.search);if(t?.tempKey)return sessionStorage.setItem("9remote_url_pairing",t.tempKey+(t.tail||"")),t.tempKey+(t.tail||"")}catch{}return null}),eg=!!ep||!!eh;(0,n.useEffect)(()=>{if(window.location.hash||window.location.search){let e=(0,$.k)(window.location.hash)||(0,$.k)(window.location.search);e?.tempKey&&window.history.replaceState(null,"",window.location.pathname)}f("false"!==localStorage.getItem("9remote_remember_key_preference")),N(ei()),C(!0),sessionStorage.getItem(F.Jd)&&(sessionStorage.removeItem(F.Jd),el(!0)),X&&L("github"),(0,q._r)()&&window.location.port===String(D._8)&&fetch("/api/ui/state").then(e=>e.ok?e.json():null).then(e=>{if(e?.permanentKey){J(e.permanentKey);let t="remote"===Z.get("mode");if(t)try{sessionStorage.setItem("9remote_manual_disconnect","1")}catch{}if(!(t||"1"===sessionStorage.getItem("9remote_manual_disconnect"))){let t=e.permanentKey,s=(0,O.Uo)(t),a=(0,O.Cj)(t);(0,P.LG)(s,{tail:a}),Y({apiKey:s,tunnelUrl:window.location.origin,mode:"local",tempKey:null,localIp:null}),ee.push("/workspace/")}}}).catch(()=>{})},[ei,X,ee,Y,Z]);let eb=(0,n.useCallback)(async e=>{let t=(0,$.k)(e),s=await ea(t?.tempKey||e,!0,t?.tail);try{sessionStorage.removeItem("9remote_url_pairing")}catch{}s.success&&(t?.tail&&(0,P.LG)(t.tempKey,{tail:t.tail}),"false"!==localStorage.getItem("9remote_remember_key_preference")&&sessionStorage.setItem(F.aS,"1"),ee.push("/workspace/"))},[ea,ee]),ef=(0,n.useRef)(!1);(0,n.useEffect)(()=>{(ep||eh)&&(ef.current||(ef.current=!0,ep?ea(ep):eb(eh)))},[ep,eh,ea,eb]);let ej=async()=>{let s=t.trim();if(!s)return;if((0,O.PF)(s))return void setError(e("login.legacyKeyError"));let a=(0,$.k)(s),n=!!a?.tempKey,r=n?a.tempKey:(0,O.Uo)(s),l=n?a.tail:(0,O.Cj)(s),i=n?await ea(a.tempKey,!0,a.tail):await en(s);if(!i.success)return;let o=n?i.apiKey:r,c=n?a.tempKey:o;l&&c&&(0,P.LG)(c,{tail:l}),b&&o&&(n?sessionStorage.setItem(F.aS,"1"):sessionStorage.setItem(F.El,s)),ee.push("/workspace/")},ey=async t=>{let s;if(!t)return;if((0,O.PF)(t))return void setError(e("login.legacyKeyError"));let a=(0,O.Cj)(t);a&&(0,P.LG)((0,O.Uo)(t),{tail:a});let n=a?t:(0,P.$4)(t);B(t);try{s=await en(n)}finally{B(null)}s?.success&&(n!==t&&eo(n),em(t),ee.push("/workspace/"))},ev=e=>{ed(e,K.trim()),N(ei()),E(null)},ew=()=>{E(null)},eN=async e=>{let t=(0,$.k)(e);return!!t?.tempKey&&!!(await ea(t.tempKey,!0,t.tail)).success&&(t.tail&&(0,P.LG)(t.tempKey,{tail:t.tail}),"false"!==localStorage.getItem("9remote_remember_key_preference")&&sessionStorage.setItem(F.aS,"1"),ee.push("/workspace/"),!0)};return eg&&et?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsx)("div",{className:"card-elev p-8 max-w-md w-full border border-border",children:(0,a.jsx)(p.A,{size:"lg",text:e("login.authenticating")})})})]}):"github"===_&&X?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsx)(T,{onConnect:(e,t)=>{let s=(0,w.xO)(e.name);Y({apiKey:(0,O.Uo)(t),tunnelUrl:s,mode:"remote"}),ee.push("/workspace/")},onLogout:()=>{V()}})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),k&&(0,q._r)()&&(0,a.jsxs)("a",{href:"/",className:"fixed top-4 left-4 z-50 inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium text-text hover:text-white bg-surface-2/90 hover:bg-surface-3 border border-border-subtle rounded-brand-lg backdrop-blur-md transition-all shadow-sm active:scale-[0.97]",title:"Back to Host QR",children:[(0,a.jsx)(d.Ay,{name:"ChevronLeft",size:15,className:"opacity-70"}),(0,a.jsx)(d.Ay,{name:"QrCode",size:15,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Host QR"})]}),(0,a.jsxs)("div",{className:"min-h-screen grid lg:grid-cols-2",children:[(0,a.jsxs)("section",{className:"hidden lg:flex flex-col justify-between px-12 xl:px-20 py-12 relative overflow-hidden",children:[(0,a.jsx)("div",{className:"login-hero-glow","aria-hidden":!0}),(0,a.jsxs)("div",{className:"my-auto max-w-xl relative z-10",children:[(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-surface-2/60 border border-border-subtle font-mono text-[11px] text-text-muted mb-7",children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-brand-500 animate-pulse-glow"}),e("login.termConnected")," \xb7 ",e("login.termTunnel")]}),(0,a.jsxs)("h1",{className:"text-6xl xl:text-7xl font-extrabold tracking-tight leading-[0.98] mb-6 text-text",children:[e("login.heroLine1"),(0,a.jsx)("br",{}),e("login.heroLine2"),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"login-hero-grad",children:e("login.heroLine3")})]}),(0,a.jsx)("p",{className:"text-text-muted text-base lg:text-lg leading-relaxed max-w-md mb-8",children:e("login.tagline")}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mb-9",children:["Terminal","Desktop","Files","WebRTC low-latency","iOS \xb7 Android \xb7 Web"].map(e=>(0,a.jsx)("span",{className:"font-mono text-xs text-text-muted px-3 py-1.5 rounded-full border border-border-subtle",children:e},e))}),(0,a.jsxs)("div",{className:"rounded-xl border border-border-subtle bg-surface-2/60 overflow-hidden max-w-md shadow-lg",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-2 border-b border-border-subtle",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#ff5f57]"}),(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#febc2e]"}),(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#28c840]"}),(0,a.jsx)("span",{className:"ml-2 font-mono text-[10px] text-text-subtle",children:"dev@mac — zsh"})]}),(0,a.jsxs)("div",{className:"p-3.5 font-mono text-[12px] leading-relaxed",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-subtle",children:"➜"})," 9remote start"]}),(0,a.jsx)("div",{className:"text-text-subtle",children:"↳ tunnel up \xb7 pairing open"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-brand-500",children:"[ok]"})," ",(0,a.jsx)("span",{className:"text-text",children:"machine"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"macbook-pro-m3"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-brand-500",children:"[ok]"})," ",(0,a.jsx)("span",{className:"text-text",children:"pty"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"daemon v3.1 \xb7 12 warm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[#6aab6a]",children:"●"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"waiting for phone…"})," ",(0,a.jsx)("span",{className:"inline-block w-[7px] h-[13px] bg-brand-500 align-middle animate-cursor-blink"})]})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-1 font-mono text-[11px] text-text-subtle pt-8 relative z-10",children:[(0,a.jsx)("span",{children:"› PTY persistent"}),(0,a.jsx)("span",{children:"› end-to-end encrypted"}),(0,a.jsx)("span",{children:"› open source"})]})]}),(0,a.jsxs)("section",{className:"flex items-center justify-center p-6 sm:p-10 lg:border-l lg:border-border-subtle lg:bg-surface-1 relative",children:[(0,a.jsx)("div",{className:"login-mobile-glow lg:hidden","aria-hidden":!0}),(0,a.jsxs)("div",{className:"relative z-10 w-full max-w-sm space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,a.jsx)("img",{src:"/icon-192.png",alt:"9Remote Logo",className:"w-10 h-10 rounded-[11px] object-contain shadow-lg shadow-brand-500/20"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h1",{className:"text-[22px] font-bold tracking-tight text-text leading-none",children:"9Remote"}),Q&&(0,a.jsxs)("p",{className:"font-mono text-[11px] text-text-subtle mt-1",children:["v",Q]})]}),(0,a.jsx)(y,{}),(0,a.jsx)(v.A,{})]}),(0,a.jsx)("p",{className:"text-text-muted text-lg font-medium leading-snug pr-4 mb-6 lg:hidden",children:e("login.tagline")}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2.5",children:[(0,a.jsx)(d.Ay,{name:"KeyRound",className:"text-text-muted opacity-70",size:14}),(0,a.jsx)("span",{className:"text-[13px] font-semibold text-text",children:e("login.accessKey")})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{id:"accessKeyInput",type:"text",value:t,onChange:e=>{let t=e.target.value;s(t.length<=F.qM?t.toUpperCase():t.toLowerCase())},onKeyDown:e=>"Enter"===e.key&&t&&ej(),placeholder:e("login.placeholder"),className:"w-full pl-3.5 pr-20 py-3 bg-surface-2 border border-border-subtle rounded-[10px] font-mono text-sm text-text placeholder-text-subtle focus:outline-none focus:border-brand-500 focus:ring-2 focus:ring-brand-500/20 transition-all duration-150"}),(0,a.jsxs)("div",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 flex items-center gap-1",children:[t&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>{s("")},className:"w-7 h-7 grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-text transition-colors",type:"button",children:(0,a.jsx)(d.X,{size:16})})}),(0,a.jsx)("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>A(!0),className:"w-7 h-7 grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-brand-500 transition-colors",type:"button","aria-label":e("login.scanQr"),children:(0,a.jsx)(d.Ay,{name:"QrCode",size:16})})]})]}),(es||er)&&(0,a.jsx)("p",{className:"mt-2 text-xs font-mono text-danger",children:"agent-offline"===es?e("login.agentOffline"):es&&"wrong-key-tail"!==es?es:e("login.invalidKeyTail")}),(0,a.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer mt-4 select-none",children:[(0,a.jsx)("input",{type:"checkbox",checked:b,onChange:e=>{var t;f(t=e.target.checked),localStorage.setItem("9remote_remember_key_preference",t)},className:"w-[15px] h-[15px] accent-brand-500"}),(0,a.jsx)("span",{className:"text-[13px] text-text-muted",children:e("login.rememberKey")})]}),(0,a.jsx)(x.A,{variant:"primary",onClick:ej,loading:et,className:"btn-cta w-full mt-4",children:(0,a.jsxs)("span",{className:"inline-flex items-center justify-center gap-2",children:[e("login.connect"),(0,a.jsx)(d.Ay,{name:"ArrowRight",size:16})]})}),k&&j.length>0&&(0,a.jsxs)("div",{className:"mt-5 pt-5 border-t border-border-subtle",children:[(0,a.jsx)("div",{className:"font-mono text-[11px] uppercase tracking-wider text-text-subtle mb-1 px-1",children:e("login.savedKeys")}),eu&&(0,a.jsxs)("div",{className:"my-2.5 px-3 py-2.5 bg-amber-500/10 border border-amber-500/30 rounded-brand-lg flex items-start gap-2.5",children:[(0,a.jsx)(d.Ay,{name:"AlertCircle",size:16,className:"text-amber-500 shrink-0 mt-0.5"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-text",children:e("login.legacyKeyUpdateRequired")}),(0,a.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("login.legacyKeyUpdateHint")}),(0,a.jsx)("code",{className:"inline-block mt-1.5 px-2 py-0.5 bg-surface-2 border border-border text-text text-xs rounded font-mono select-all",children:"npm i -g 9remote@latest"})]})]}),j.map(t=>{let s=z===t.id,n=W===t.key,r=(0,O.PF)(t.key);return(0,a.jsxs)("div",{className:`flex items-center gap-3 px-1 py-2 rounded-[10px] hover:bg-surface-2 transition-colors cursor-pointer ${r?"opacity-85":""}`,onClick:()=>!s&&!n&&ey(t.key),role:"button",tabIndex:0,children:[(0,a.jsx)("div",{className:`w-12 h-12 rounded-[12px] bg-surface-2 border ${r?"border-amber-500/40 text-amber-500":"border-border-subtle text-text-muted"} grid place-items-center flex-shrink-0`,children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:"w-[26px] h-[26px]",children:[(0,a.jsx)("rect",{x:"2",y:"4",width:"20",height:"13",rx:"2"}),(0,a.jsx)("line",{x1:"2",y1:"20",x2:"22",y2:"20"})]})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:s?(0,a.jsxs)("div",{className:"flex items-center gap-1",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("input",{autoFocus:!0,value:K,onChange:e=>R(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ev(t.id),"Escape"===e.key&&ew()},placeholder:e("login.namePlaceholder"),className:"flex-1 min-w-0 bg-surface-2 border border-brand-500 rounded-md text-text text-[13px] px-2 py-1 outline-none"}),(0,a.jsx)("button",{onClick:()=>ev(t.id),className:"w-6 h-6 grid place-items-center rounded-md bg-brand-500 text-white","aria-label":e("common.done"),children:(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3 h-3",children:(0,a.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,a.jsx)("button",{onClick:ew,className:"w-6 h-6 grid place-items-center rounded-md bg-surface-2 text-text-muted","aria-label":e("common.cancel"),children:(0,a.jsx)(d.X,{size:13})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[13px] font-medium text-text truncate",title:t.label||e("agentSwitcher.unnamed"),children:t.label||e("agentSwitcher.unnamed")}),r&&(0,a.jsx)("span",{className:"shrink-0 px-1.5 py-0.5 text-[9px] font-semibold font-mono uppercase rounded bg-amber-500/15 text-amber-500 border border-amber-500/30",children:e("login.updateRequired")})]}),(0,a.jsx)("div",{className:"font-mono text-[11px] text-text-subtle mt-0.5 truncate",children:(0,o.o)(t.key)})]})}),!s&&(0,a.jsx)("span",{className:"font-mono text-[11px] text-text-subtle whitespace-nowrap",children:n?e("agentSwitcher.connecting"):(t=>{if(!t)return"";try{let s=new Date(t),a=new Date-s,n=Math.floor(a/6e4),r=Math.floor(a/36e5),l=Math.floor(a/864e5);if(n<1)return e("login.justNow");if(n<60)return e("login.minutesAgo",{n:n});if(r<24)return e("login.hoursAgo",{n:r});if(l<7)return e("login.daysAgo",{n:l});return s.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}catch{return""}})(t.lastLoginDate)}),!s&&(0,a.jsxs)("div",{className:"flex gap-0.5",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("button",{onClick:()=>{E(t.id),R(t.label||"")},title:e("common.edit"),className:"w-[26px] h-[26px] grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-text transition-colors",children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:[(0,a.jsx)("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),(0,a.jsx)("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4z"})]})}),(0,a.jsx)("button",{onClick:()=>U(t),title:e("common.delete"),className:"w-[26px] h-[26px] grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-danger transition-colors",children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:[(0,a.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,a.jsx)("path",{d:"M19 6l-2 14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L5 6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})]},t.id)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-1 text-text-subtle",children:[(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:(0,a.jsx)("path",{d:"M12 2l9 4v6c0 5-3.8 9.7-9 11-5.2-1.3-9-6-9-11V6l9-4z"})}),(0,a.jsx)("span",{className:"font-mono text-[11px]",children:e("login.secureTitle")})]})]})]})]}),(0,a.jsx)(u,{isOpen:S,onClose:()=>A(!1),onScan:eN}),(0,a.jsx)(h.A,{isOpen:!!G,onClose:()=>U(null),onConfirm:()=>{G&&(ec(G.id),N(ei()))},title:e("login.deleteKeyTitle"),message:e("login.deleteKeyConfirm",{name:G?.label}),confirmText:e("common.delete")})]})}function U(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,a.jsx)(p.A,{text:"Loading..."}),(0,a.jsx)("a",{href:"/login",className:"text-sm text-text-muted hover:text-brand-500 underline underline-offset-4 transition-colors",children:"Reload"})]})})]})}function W(){return(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)(U,{}),children:(0,a.jsx)(G,{})})}},59893:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(73365);function n({children:e,centered:t=!0,className:s=""}){return(0,a.jsx)("div",{className:`min-h-screen ${t?"flex items-center justify-center p-4":""} ${s}`,children:e})}},66859:(e,t,s)=>{Promise.resolve().then(s.bind(s,45136))},90753:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var a=s(73365),n=s(44976),r=s(8910);let l=({size:e=18})=>(0,a.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,a.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),i=({size:e=18})=>(0,a.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function o({className:e="",size:t=18}){let{theme:s,toggleTheme:c}=(0,n.D)(),d="dark"===s;return(0,a.jsx)("button",{type:"button",onClick:()=>{(0,r.e)(),c()},"aria-label":d?"Switch to light theme":"Switch to dark theme",title:d?"Light mode":"Dark mode",className:`p-1.5 rounded-brand transition-colors text-[var(--color-text-muted)] hover:text-[var(--color-text)] hover:bg-[var(--color-surface-2)] ${e}`,children:d?(0,a.jsx)(l,{size:t}):(0,a.jsx)(i,{size:t})})}}},e=>{e.O(0,[1236,774,635,9958,8439,2347,5158,7358],()=>e(e.s=66859)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{1988:(e,t,s)=>{"use strict";var r=s(70636);s(67497);var o=s(1521),a=o&&"object"==typeof o&&"default"in o?o:{default:o},n=void 0!==r&&r.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},i=function(){function e(e){var t=void 0===e?{}:e,s=t.name,r=void 0===s?"stylesheet":s,o=t.optimizeForSpeed,a=void 0===o?n:o;c(l(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",c("boolean"==typeof a,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=a,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var i=document.querySelector('meta[property="csp-nonce"]');this._nonce=i?i.getAttribute("content"):null}var t,s=e.prototype;return s.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},s.isOptimizeForSpeed=function(){return this._optimizeForSpeed},s.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(n||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,s){return"number"==typeof s?e._serverSheet.cssRules[s]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),s},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},s.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},s.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},s.insertRule=function(e,t){if(c(l(e),"`insertRule` accepts only strings"),this._optimizeForSpeed){var s=this.getSheet();"number"!=typeof t&&(t=s.cssRules.length);try{s.insertRule(e,t)}catch(t){return n||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},s.replaceRule=function(e,t){if(this._optimizeForSpeed){var s=this.getSheet();if(t.trim()||(t=this._deletedRulePlaceholder),!s.cssRules[e])return e;s.deleteRule(e);try{s.insertRule(t,e)}catch(r){n||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),s.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];c(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},s.deleteRule=function(e){if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},s.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]},s.cssRules=function(){var e=this;return this._tags.reduce(function(t,s){return s?t=t.concat(Array.prototype.map.call(e.getSheetForTag(s).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},s.makeStyleTag=function(e,t,s){t&&c(l(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var o=document.head||document.getElementsByTagName("head")[0];return s?o.insertBefore(r,s):o.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,s=e.length;s;)t=33*t^e.charCodeAt(--s);return t>>>0},m={};function h(e,t){if(!t)return"jsx-"+e;var s=String(t),r=e+s;return m[r]||(m[r]="jsx-"+d(e+"-"+s)),m[r]}function x(e,t){var s=e+t;return m[s]||(m[s]=t.replace(/__jsx-style-dynamic-selector/g,e)),m[s]}var u=function(){function e(e){var t=void 0===e?{}:e,s=t.styleSheet,r=void 0===s?null:s,o=t.optimizeForSpeed,a=void 0!==o&&o;this._sheet=r||new i({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),r&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var s=this.getIdAndRules(e),r=s.styleId,o=s.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var a=o.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=a,this._instancesCounts[r]=1},t.remove=function(e){var t=this,s=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(s in this._instancesCounts,"styleId: `"+s+"` not found"),this._instancesCounts[s]-=1,this._instancesCounts[s]<1){var r=this._fromServer&&this._fromServer[s];r?(r.parentNode.removeChild(r),delete this._fromServer[s]):(this._indices[s].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[s]),delete this._instancesCounts[s]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],s=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return s[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,s;return t=this.cssRules(),void 0===(s=e)&&(s={}),t.map(function(e){var t=e[0],r=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:s.nonce?s.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,s=e.dynamic,r=e.id;if(s){var o=h(r,s);return{styleId:o,rules:Array.isArray(t)?t.map(function(e){return x(o,e)}):[x(o,t)]}}return{styleId:h(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),p=o.createContext(null);p.displayName="StyleSheetContext";var f=a.default.useInsertionEffect||a.default.useLayoutEffect,b=new u;function y(e){var t=b||o.useContext(p);return t&&f(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}y.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},t.style=y},27493:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>J});var r=s(73365),o=s(99568),a=s(30240),n=s(1521);let l="var(--color-bg)",i="var(--color-surface)",c="var(--color-surface-2)",d="var(--color-border)",m="var(--color-text)",h="var(--color-text-muted)",x="var(--color-text-subtle)",u="var(--color-accent)",p="color-mix(in srgb, var(--color-accent) 12%, transparent)",f="https://github.com/decolua/9remote/releases/latest/download",b="https://apps.apple.com/us/app/9remote/id6796664210",y="https://play.google.com/store/apps/details?id=cc.remote9.app&pli=1",g=[{role:"Host",title:"On your machine",desc:"Serves your terminals, screen and files."},{role:"Client",title:"With you anywhere",desc:"Same session on any screen — nothing to sync."}];var v=s(90753),j=s(48310);let w=[{href:"#features",label:"Features"},{href:"#security",label:"Security"},{href:"#how-it-works",label:"How It Works"},{href:"https://docs.9remote.cc/",label:"Docs",external:!0},{href:"https://github.com/decolua/9remote",label:"GitHub",external:!0}];function k(){let[e,t]=(0,n.useState)(!1),[s,a]=(0,n.useState)(!1),{formattedStars:l}=(0,j.w)(),i="3.0.10";return(0,n.useEffect)(()=>{let e=()=>t(window.scrollY>20);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,r.jsxs)("nav",{className:"fixed top-0 left-0 right-0 z-50 transition-all duration-300",style:{background:e?"color-mix(in srgb, var(--color-bg) 75%, transparent)":"transparent",backdropFilter:e?"blur(16px)":"none",borderBottom:e?`1px solid ${d}`:"1px solid transparent"},children:[(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[(0,r.jsxs)(o,{href:"/",className:"flex items-center gap-3 group",children:[(0,r.jsx)("img",{src:"/icon-192.png",alt:"9Remote Logo",className:"w-8 h-8 rounded-lg object-contain shadow-md shadow-brand-500/20"}),(0,r.jsx)("span",{className:"text-xl font-bold tracking-tight",style:{color:m},children:"9Remote"}),i&&(0,r.jsxs)("span",{className:"px-2 py-0.5 text-xs font-mono font-medium rounded-full bg-brand-500/10 text-brand-400 border border-brand-500/20",children:["v",i]})]}),(0,r.jsx)("div",{className:"hidden md:flex items-center gap-7",children:w.map(e=>(0,r.jsxs)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,className:"text-sm transition-colors flex items-center gap-1.5",style:{color:h},onMouseEnter:e=>e.currentTarget.style.color=m,onMouseLeave:e=>e.currentTarget.style.color=h,children:[(0,r.jsx)("span",{children:e.label}),"GitHub"===e.label&&l&&(0,r.jsxs)("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded-full border border-border-subtle bg-surface-2/80 text-text",children:["★ ",l]})]},e.label))}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-3",children:[(0,r.jsx)(v.A,{}),(0,r.jsx)("a",{href:"#how-it-works",className:"px-4 py-2 rounded-lg font-semibold text-sm border transition-transform hover:scale-[1.03]",style:{background:c,borderColor:d,color:m},children:(0,r.jsx)("span",{children:"Download Host"})}),(0,r.jsx)(o,{href:"/login",className:"btn-cta px-5 py-2 rounded-lg font-semibold text-sm transition-transform hover:scale-[1.03]",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:(0,r.jsx)("span",{children:"Remote"})})]}),(0,r.jsxs)("div",{className:"md:hidden flex items-center gap-1.5",children:[(0,r.jsx)(v.A,{}),(0,r.jsx)("button",{onClick:()=>a(!s),className:"p-2",style:{color:m},children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s?(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),s&&(0,r.jsx)("div",{className:"md:hidden",style:{background:"color-mix(in srgb, var(--color-bg) 95%, transparent)",backdropFilter:"blur(16px)",borderTop:`1px solid ${d}`},children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[w.map(e=>(0,r.jsxs)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,onClick:()=>a(!1),className:"text-sm flex items-center justify-between",style:{color:h},children:[(0,r.jsx)("span",{children:e.label}),"GitHub"===e.label&&l&&(0,r.jsxs)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full border border-border-subtle bg-surface-2 text-text",children:["★ ",l]})]},e.label)),(0,r.jsx)("a",{href:"#how-it-works",onClick:()=>a(!1),className:"px-6 py-2 rounded-lg font-semibold text-sm text-center border",style:{background:c,borderColor:d,color:m},children:"Download Host"}),(0,r.jsx)(o,{href:"/login",className:"px-6 py-2 rounded-lg font-semibold text-sm text-center",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:"Remote"})]})})]})}var N=s(28913);let S=[{name:"Remote IDE",path:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},{name:"Remote Vibe Coding",path:"M13 10V3L4 14h7v7l9-11h-7z"},{name:"Remote Desktop",path:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},{name:"Remote Files",path:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{name:"Remote Emulator",path:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"},{name:"Remote Localhost",path:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{name:"PC \xb7 Web \xb7 iPad \xb7 Mobile",path:"M12 18h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"}],_=[{src:"/screenshots/mobile-1.webp",alt:"Claude Code running in 9Remote on a phone"},{src:"/screenshots/mobile-2.webp",alt:"File explorer in 9Remote on a phone"},{src:"/screenshots/mobile-3.webp",alt:"System dashboard in 9Remote on a phone"}];function C(){return(0,r.jsxs)("section",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative min-h-screen flex items-center px-4 sm:px-6 lg:px-8 pt-24 pb-16 overflow-hidden",children:[(0,r.jsx)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" max-w-7xl mx-auto relative z-10 w-full min-w-0",children:(0,r.jsxs)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" grid lg:grid-cols-2 gap-12 items-center min-w-0",children:[(0,r.jsxs)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" text-center lg:text-left",children:[(0,r.jsxs)("h1",{style:{fontWeight:900,lineHeight:1.1},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" mb-5 animate-fade-in-delay-1",children:[(0,r.jsx)("span",{style:{color:m},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" block text-2xl sm:text-3xl lg:text-4xl xl:text-5xl mb-2",children:"Remote Everything,"}),(0,r.jsx)("span",{style:{background:`linear-gradient(to right, ${m}, ${h})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" block text-2xl sm:text-3xl lg:text-4xl xl:text-5xl mb-3",children:"Vibecode Everywhere"})]}),(0,r.jsx)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" flex flex-wrap gap-2 mb-6 justify-center lg:justify-start animate-fade-in-delay-2",children:S.map(e=>(0,r.jsxs)("span",{style:{borderColor:d,background:c,color:m},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-mono font-medium border transition-colors hover:border-text-subtle",children:[(0,r.jsx)("svg",{style:{color:u},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-3.5 h-3.5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:e.path,className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])})}),(0,r.jsx)("span",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]]),children:e.name})]},e.name))}),(0,r.jsx)("p",{"data-text":"Leave your laptop behind. Your entire dev workstation goes wherever you go — remote IDE, 60fps desktop, visual file explorer, live mobile emulator, and remote vibe coding with 30+ AI agents on PC, Web, iPad, or phone.",className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" hero-gloss text-sm sm:text-base mb-8 max-w-xl mx-auto lg:mx-0",children:"Leave your laptop behind. Your entire dev workstation goes wherever you go — remote IDE, 60fps desktop, visual file explorer, live mobile emulator, and remote vibe coding with 30+ AI agents on PC, Web, iPad, or phone."}),(0,r.jsx)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" grid grid-cols-2 sm:grid-cols-4 gap-4 sm:gap-6 max-w-lg mx-auto lg:mx-0 mt-7 animate-fade-in-delay-6",children:[{val:"Direct P2P",label:"WebRTC DataChannel"},{val:"<20ms",label:"Ultra-Low Latency"},{val:"30+ AI Agents",label:"Vibe Coding Ready"},{val:"Persistent",label:"PTY Daemon Sessions"}].map(e=>(0,r.jsxs)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" text-center lg:text-left",children:[(0,r.jsx)("div",{style:{color:m},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" text-base sm:text-lg font-bold mb-0.5",children:e.val}),(0,r.jsx)("div",{style:{color:h},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" text-xs font-mono",children:e.label})]},e.label))})]}),(0,r.jsx)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative w-full flex justify-center items-center lg:justify-end animate-fade-in-delay-2 min-w-0 mt-4 lg:mt-0",children:(0,r.jsxs)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative w-full max-w-full sm:max-w-[620px] -translate-y-2 sm:-translate-y-5",children:[(0,r.jsx)("div",{style:{background:"radial-gradient(ellipse at center, rgba(255,255,255,0.10) 0%, transparent 70%)"},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" absolute -inset-8 opacity-50 blur-3xl pointer-events-none"}),(0,r.jsxs)("div",{style:{background:i,borderColor:d},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative rounded-xl overflow-hidden border shadow-2xl",children:[(0,r.jsxs)("div",{style:{background:c,borderColor:d},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" flex items-center gap-2 px-3 sm:px-4 py-2.5 sm:py-3 border-b",children:[(0,r.jsxs)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" flex gap-1.5 sm:gap-2 flex-shrink-0",children:[(0,r.jsx)("div",{style:{background:"#FF5F57"},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full"}),(0,r.jsx)("div",{style:{background:"#FEBC2E"},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full"}),(0,r.jsx)("div",{style:{background:"#28C840"},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full"})]}),(0,r.jsxs)("span",{style:{color:h},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" ml-2 sm:ml-3 text-[10px] sm:text-xs font-mono truncate min-w-0",children:["9remote",(0,r.jsx)("span",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" hidden sm:inline",children:" — desktop"})]})]}),(0,r.jsx)("img",{src:"/screenshots/desktop-ide.webp",alt:"9Remote desktop workspace: terminal, editor and AI agent panes side by side",className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-full block"})]}),(0,r.jsx)("div",{className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" mt-5 flex w-max mx-auto items-end gap-2 sm:absolute sm:mt-0 sm:mx-0 sm:-bottom-[134px] sm:-right-8 sm:gap-3 sm:origin-bottom-right sm:scale-[0.66]",children:_.map((e,t)=>(0,r.jsx)("div",{style:{background:l,border:"1px solid var(--color-border)",animationDelay:`${.9*t}s`},className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative w-[100px] sm:w-[180px] rounded-[1.1rem] p-0.5 shadow-2xl animate-float-phone",children:(0,r.jsx)("img",{src:e.src,alt:e.alt,loading:"lazy",className:N.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-full block rounded-[0.95rem]"})},e.src))})]})})]})}),(0,r.jsx)(N,{id:"5086f7aaaeb15b68",dynamic:[h,h],children:`@keyframes fadeIn{from{opacity:0;transform:translatey(20px)}to{opacity:1;transform:translatey(0)}}.animate-fade-in-delay-1.__jsx-style-dynamic-selector{opacity:0;animation:fadeIn.8s ease-out.1s forwards}.hero-gloss.__jsx-style-dynamic-selector{position:relative;color:${h}}.hero-gloss.__jsx-style-dynamic-selector::after{content:attr(data-text);position:absolute;top:100%;left:0;right:0;white-space:pre-wrap;transform:scaley(-1);transform-origin:top;background:linear-gradient(to bottom,${h},transparent 40%);-webkit-background-clip:text;background-clip:text;color:transparent;opacity:.35;pointer-events:none;-webkit-user-select:none;user-select:none}.animate-fade-in-delay-4.__jsx-style-dynamic-selector{opacity:0;animation:fadeIn.8s ease-out.4s forwards}.animate-fade-in-delay-5.__jsx-style-dynamic-selector{opacity:0;animation:fadeIn.8s ease-out.5s forwards}.animate-fade-in-delay-6.__jsx-style-dynamic-selector{opacity:0;animation:fadeIn.8s ease-out.6s forwards}`})]})}function R(){if("u"<typeof navigator)return"other";let e=navigator.userAgent;return/iPhone|iPad|iPod/.test(e)?"other":/Mac/.test(e)?"macos":/Win/.test(e)?"windows":"other"}let A={Host:[{id:"app",label:"App"},{id:"npm",label:"npm"}],Client:[{id:"browser",label:"Browser"},{id:"desktop",label:"Desktop"},{id:"mobile",label:"Mobile"}]},M={macos:"macOS",windows:"Windows"},z={macos:"9remote.dmg",windows:"9remote.exe"};function L(){let e="3.0.10",t=(0,n.useSyncExternalStore)(()=>()=>{},R,()=>"other"),[s,a]=(0,n.useState)(!1),[l,p]=(0,n.useState)({}),v=()=>{navigator.clipboard?.writeText("npm i -g 9remote").catch(()=>{}),a(!0),setTimeout(()=>a(!1),2e3)};return(0,r.jsx)("section",{id:"how-it-works",className:"relative py-24 px-4 sm:px-6 lg:px-8",children:(0,r.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,r.jsxs)("div",{className:"text-center mb-14",children:[(0,r.jsx)("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold mb-3",style:{color:m},children:"Two halves. One session."}),(0,r.jsx)("p",{className:"text-base sm:text-lg max-w-xl mx-auto",style:{color:h},children:"One command on your machine — then any browser joins it. Direct connection, no relay."})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 md:gap-6 items-stretch",children:g.map((a,g)=>{let j=A[a.role],w=l[a.role]||("Client"===a.role?"browser":"app");return(0,r.jsxs)(n.Fragment,{children:[1===g&&(0,r.jsxs)("div",{className:"flex md:flex-col items-center justify-center gap-2 py-2 md:py-0",children:[(0,r.jsx)("span",{className:"text-[11px] font-mono px-2 py-0.5 rounded border whitespace-nowrap",style:{borderColor:d,background:c,color:u},children:"WebRTC"}),(0,r.jsx)("svg",{className:"w-6 h-6 rotate-90 md:rotate-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:x},children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:"M4 12h16m0 0l-6-6m6 6l-6 6"})})]}),(0,r.jsxs)("div",{className:"p-6 sm:p-7 rounded-2xl border flex flex-col transition-all duration-300 hover:-translate-y-1",style:{background:i,borderColor:d},children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("span",{className:"text-[11px] font-mono font-bold px-2 py-0.5 rounded border uppercase tracking-wider",style:{borderColor:d,background:c,color:u},children:a.role}),e&&(0,r.jsxs)("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded border",style:{borderColor:d,background:c,color:h},children:["v",e]})]}),(0,r.jsx)("h3",{className:"text-xl font-bold mb-1.5",style:{color:m},children:a.title}),(0,r.jsx)("p",{className:"text-sm mb-5",style:{color:h},children:a.desc}),(0,r.jsxs)("div",{className:"mt-auto flex flex-col items-center",children:[(0,r.jsx)("div",{className:"flex gap-0.5 p-1 rounded-lg border mb-6 w-full",style:{background:c,borderColor:d},children:j.map(e=>(0,r.jsx)("button",{onClick:()=>{let t;return t=e.id,p(e=>({...e,[a.role]:t}))},className:`flex-1 px-2.5 py-1.5 rounded-md text-xs font-medium transition-colors ${w===e.id?"":"hover:text-text"}`,style:w===e.id?{background:i,color:m,boxShadow:"0 1px 2px rgba(0,0,0,0.2)"}:{color:x},children:e.label},e.id))}),(0,r.jsx)("div",{className:"inline-block rounded-lg border overflow-hidden",style:{borderColor:d},children:"npm"===w?(0,r.jsxs)("button",{onClick:v,title:s?"Copied":"Copy",className:"w-full flex items-center gap-2 px-3 py-1.5 font-mono text-[13px] text-left transition-colors hover:bg-surface-2",style:{background:c},children:[(0,r.jsx)("span",{style:{color:x},children:"$"}),(0,r.jsx)("code",{className:"font-bold",style:{color:m},children:"npm i -g 9remote"}),(0,r.jsx)("span",{className:"ml-auto text-xs font-sans",style:{color:s?"var(--color-success)":x},children:s?"Copied":"Copy"})]}):"mobile"===w?(0,r.jsxs)("div",{className:"flex gap-2 w-full",children:[(0,r.jsxs)("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-[13px] font-semibold transition-opacity hover:opacity-90 whitespace-nowrap",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M15.97 6.38c.62-.75 1.04-1.8 0.92-2.85-.9.04-2 .6-2.65 1.35-.58.66-1.09 1.73-.95 2.76.99.08 2.03-.51 2.68-1.26z"})}),"App Store"]}),(0,r.jsxs)("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-[13px] font-semibold transition-opacity hover:opacity-90 whitespace-nowrap",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M3.609 1.814L13.793 12 3.61 22.186a2.128 2.128 0 0 1-.22-.964V2.778c0-.36.08-.694.22-.964zm11.233 11.234l2.584 2.584-11.834 6.83 9.25-9.414zm0-2.096L5.592 1.538l11.834 6.83-2.584 2.584zm1.485 1.048l3.633 2.098a1.328 1.328 0 0 0 0-2.296l-3.633-2.098-1.048 1.048 1.048 1.048z"})}),"Google Play"]})]}):(0,r.jsx)(o,{href:"browser"===w?"/login":"macos"===t?`${f}/9Remote-macos-universal.dmg`:"windows"===t?`${f}/9Remote-windows-x64-setup.exe`:"https://github.com/decolua/9remote/releases/latest",target:"browser"===w?void 0:"_blank",rel:"browser"===w?void 0:"noopener noreferrer",className:"w-full flex items-center justify-center gap-2 px-4 py-1.5 text-[13px] font-semibold transition-opacity hover:opacity-90",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:"browser"===w?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-9-9m9 9H3m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9"})}),"Open in Browser",(0,r.jsx)("span",{className:"ml-auto text-xs font-mono opacity-70",children:"→"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v12m0 0l-4-4m4 4l4-4M4 21h16"})}),"desktop"===w||"other"===t?e?`Download v${e}`:"Download":e?`Download v${e} for ${M[t]}`:`Download for ${M[t]}`,z[t]&&(0,r.jsx)("span",{className:"ml-auto text-xs font-mono opacity-70",children:z[t]})]})})})]})]})]},a.role)})})]})})}let P=[{title:"Remote Vibe Coding",tag:"AI-Ready",desc:"Run Claude Code, Cursor & 30+ AI agents on the go with live artifact previews.",path:"M13 10V3L4 14h7v7l9-11h-7z"},{title:"Every Screen, Everywhere",tag:"Any Device",desc:"Seamless across PC, Web, iPad keyboard shortcuts, and mobile dev keys.",path:"M12 18h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"},{title:"60fps Remote Desktop",tag:"Encrypted P2P",desc:"Ultra-smooth PC & Mac control over encrypted WebRTC with host approval.",path:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},{title:"Full Remote IDE",tag:"All-in-One",desc:"Multi-pane terminal, code editor, and Git diffs in your pocket.",path:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},{title:"Live Mobile Emulator",tag:"Mobile Dev",desc:"Test and interact with Android & iOS emulators directly from your phone.",path:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"},{title:"Zero-Config Localhost",tag:"Zero-Exposure",desc:"Preview localhost without opening ports, ngrok, or exposing to the public internet.",path:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{title:"Visual File Explorer",tag:"Path-Jailed",desc:"Fuzzy search files (⌘⇧P) and edit code inside a secure, jailed workspace.",path:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{title:"Zero-Trust & 100% Private",tag:"Self-Hosted",desc:"Physical host approval, direct P2P, zero cloud storage. Your code never leaves your machine.",path:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"}],E=[{name:"Zero Config",nine:!0,claude:!0,teamviewer:!0,chrome:!0,termius:!1},{name:"Remote IDE",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"30+ AI Agents & Vibe Coding",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!1},{name:"Terminal Access",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!0},{name:"Persistent Daemon",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!0},{name:"Remote Localhost Preview",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"Touch File Explorer & Editor",nine:!0,claude:!1,teamviewer:!0,chrome:!1,termius:!0},{name:"Remote Desktop",nine:!0,claude:!1,teamviewer:!0,chrome:!0,termius:!1},{name:"Remote Emulator",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"AI Agent Artifacts",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!1},{name:"Physical Host Approval",nine:!0,claude:!1,teamviewer:!0,chrome:!1,termius:!1},{name:"Git Integration",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"Mobile & iPad Optimized",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!0},{name:"Browser-Based",nine:!0,claude:!0,teamviewer:!1,chrome:!0,termius:!1},{name:"QR Login",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!1},{name:"Auto Tunnel",nine:!0,claude:!0,teamviewer:!0,chrome:!0,termius:!1},{name:"No Port Forwarding",nine:!0,claude:!0,teamviewer:!0,chrome:!0,termius:!1},{name:"No Account Required",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"Free & Open Source",nine:!0,claude:!1,teamviewer:!1,chrome:!0,termius:!1}],F=[{key:"nine",name:"9Remote",highlight:!0},{key:"claude",name:"Claude Remote"},{key:"teamviewer",name:"TeamViewer"},{key:"chrome",name:"Chrome Remote"},{key:"termius",name:"Termius"}];function T({ok:e}){return e?(0,r.jsxs)("svg",{className:"w-4 h-4 sm:w-[18px] sm:h-[18px] mx-auto",viewBox:"0 0 20 20",style:{color:m},children:[(0,r.jsx)("circle",{cx:"10",cy:"10",r:"9",fill:"currentColor"}),(0,r.jsx)("path",{d:"M6.5 10.5l2.5 2.5 4.5-5.5",fill:"none",stroke:"var(--color-bg)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}):(0,r.jsx)("svg",{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 mx-auto opacity-50",viewBox:"0 0 20 20",style:{color:x},children:(0,r.jsx)("path",{d:"M6 6l8 8m0-8l-8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})})}function H(){return(0,r.jsxs)("section",{id:"features",className:"jsx-469167ead414021 relative py-24 px-4 sm:px-6 lg:px-8",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021 max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021 text-center mb-16",children:[(0,r.jsx)("div",{style:{borderColor:d,background:c,color:u},className:"jsx-469167ead414021 inline-flex items-center gap-2 px-3 py-1 mb-4 rounded-full border text-xs font-mono",children:"Remote Everything \xb7 Everywhere"}),(0,r.jsxs)("h2",{style:{color:m},className:"jsx-469167ead414021 text-3xl sm:text-4xl lg:text-5xl font-bold mb-4",children:["Why Choose ",(0,r.jsx)("span",{style:{color:m},className:"jsx-469167ead414021",children:"9Remote?"})]}),(0,r.jsx)("p",{style:{color:h},className:"jsx-469167ead414021 text-base sm:text-lg max-w-2xl mx-auto",children:"All your dev superpowers on any screen — zero config, zero lag, zero trust."})]}),(0,r.jsx)("div",{className:"jsx-469167ead414021 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-20",children:P.map((e,t)=>(0,r.jsxs)("div",{style:{background:i,borderColor:d,animation:`fadeInUp 0.4s ease-out ${.04*t}s both`},className:"jsx-469167ead414021 group relative p-6 rounded-xl border flex flex-col justify-between",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021 flex items-center justify-between mb-4",children:[(0,r.jsx)("div",{style:{background:c,color:m},className:"jsx-469167ead414021 w-10 h-10 rounded-lg flex items-center justify-center",children:(0,r.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"jsx-469167ead414021 w-5 h-5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:e.path,className:"jsx-469167ead414021"})})}),(0,r.jsx)("span",{style:{borderColor:d,background:c,color:h},className:"jsx-469167ead414021 text-[11px] font-mono px-2 py-0.5 rounded border",children:e.tag})]}),(0,r.jsx)("h3",{style:{color:m},className:"jsx-469167ead414021 text-lg font-bold mb-2",children:e.title})]}),(0,r.jsx)("p",{style:{color:h},className:"jsx-469167ead414021 text-sm leading-relaxed",children:e.desc})]},e.title))}),(0,r.jsxs)("div",{className:"jsx-469167ead414021 pt-8",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021 text-center mb-10",children:[(0,r.jsx)("h3",{style:{color:m},className:"jsx-469167ead414021 text-2xl sm:text-3xl font-bold mb-2",children:"How 9Remote Compares"}),(0,r.jsx)("p",{style:{color:h},className:"jsx-469167ead414021 text-sm sm:text-base max-w-xl mx-auto",children:"Built from scratch for modern developers who need both power and mobility."})]}),(0,r.jsx)("div",{style:{background:i,borderColor:d},className:"jsx-469167ead414021 overflow-x-auto rounded-2xl border",children:(0,r.jsxs)("table",{className:"jsx-469167ead414021 min-w-full",children:[(0,r.jsx)("thead",{className:"jsx-469167ead414021",children:(0,r.jsxs)("tr",{style:{borderBottom:`1px solid ${d}`},className:"jsx-469167ead414021",children:[(0,r.jsx)("th",{style:{color:m,background:i},className:"jsx-469167ead414021 px-3 sm:px-4 py-3 sm:py-4 text-left text-xs sm:text-sm font-semibold sticky left-0 z-10 min-w-[140px] sm:min-w-[200px]",children:"Feature"}),F.map(e=>(0,r.jsx)("th",{style:{color:e.highlight?u:m,background:e.highlight?p:"transparent"},className:"jsx-469167ead414021 px-2 sm:px-4 py-3 sm:py-4 text-center text-xs sm:text-sm font-semibold min-w-[80px] sm:min-w-[110px]",children:e.name},e.key))]})}),(0,r.jsx)("tbody",{className:"jsx-469167ead414021",children:E.map((e,t)=>(0,r.jsxs)("tr",{style:{borderBottom:t<E.length-1?`1px solid ${d}`:"none"},onMouseEnter:e=>e.currentTarget.style.background=c,onMouseLeave:e=>e.currentTarget.style.background="transparent",className:"jsx-469167ead414021 transition-colors",children:[(0,r.jsx)("td",{style:{color:m,background:i},className:"jsx-469167ead414021 px-3 sm:px-4 py-2.5 sm:py-3 text-xs sm:text-sm font-medium sticky left-0 z-10",children:e.name}),F.map(t=>(0,r.jsx)("td",{style:{background:t.highlight?p:"transparent"},className:"jsx-469167ead414021 px-2 sm:px-4 py-2.5 sm:py-3 text-center",children:(0,r.jsx)(T,{ok:e[t.key]})},t.key))]},e.name))})]})}),(0,r.jsx)("div",{className:"jsx-469167ead414021 mt-8 text-center",children:(0,r.jsxs)("div",{style:{background:c,borderColor:d},className:"jsx-469167ead414021 inline-flex items-center gap-2 px-4 py-2 rounded-full border text-xs sm:text-sm",children:[(0,r.jsxs)("svg",{viewBox:"0 0 20 20",style:{color:m},className:"jsx-469167ead414021 w-4 h-4 flex-shrink-0",children:[(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8",fill:"currentColor",className:"jsx-469167ead414021"}),(0,r.jsx)("path",{d:"M6.5 10.5l2.5 2.5 4.5-5.5",fill:"none",stroke:"var(--color-bg)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-469167ead414021"})]}),(0,r.jsx)("span",{style:{color:m},className:"jsx-469167ead414021 font-semibold",children:"9Remote: Complete 19/19 capabilities \xb7 100% self-hosted & private"})]})})]})]}),(0,r.jsx)(N,{id:"469167ead414021",children:"@keyframes fadeInUp{from{opacity:0;transform:translatey(30px)}to{opacity:1;transform:translatey(0)}}"})]})}var I=s(44976);let D=null,W=`
|
|
2
|
+
sequenceDiagram
|
|
3
|
+
autonumber
|
|
4
|
+
participant Client as Mobile / Web Client
|
|
5
|
+
participant Server as 9Remote Signaling Relay
|
|
6
|
+
participant Host as Host Machine (Agent)
|
|
7
|
+
|
|
8
|
+
Host->>Server: 1. Register HEAD (TAIL stays private on Host)
|
|
9
|
+
Client->>Server: 2. Request Host lookup with HEAD
|
|
10
|
+
Server-->>Client: 3. Return Host Public Key (Relay steps aside)
|
|
11
|
+
Note over Client,Host: Direct P2P Connection (WebRTC DataChannel)
|
|
12
|
+
Client->>Host: 4. Send encrypted TAIL (X25519 + AES-GCM)
|
|
13
|
+
Note over Host: Host verifies TAIL secret
|
|
14
|
+
Host-->>Host: 5. Physical Security Prompt: "Approve Device?"
|
|
15
|
+
Note over Host: You click Approve on host screen
|
|
16
|
+
Host-->>Client: 6. Secure P2P Session Established (<20ms latency)
|
|
17
|
+
`,O=[{step:"01",title:"Split-Key Zero-Trust",desc:"The pairing key is split into HEAD and TAIL. The relay server only sees HEAD to broker the WebRTC handshake and never receives or knows your secret TAIL.",iconPath:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},{step:"02",title:"Direct P2P Verification",desc:"Clients connect directly to your machine via WebRTC. Your secret TAIL is sealed with the host's public key (X25519 + AES-256-GCM) — unreadable to any intermediate relay.",iconPath:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"},{step:"03",title:"Physical Host Approval",desc:"Even if someone knows your key, new devices cannot access your machine until you physically click 'Approve' on your computer screen.",iconPath:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"}];function $(){let{theme:e}=(0,I.D)(),[t,o]=(0,n.useState)(""),a=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=!1;return(!D&&(D=Promise.all([s.e(3755),s.e(7162),s.e(3606)]).then(s.bind(s,86492)).then(e=>e.default)),D).then(async s=>{if(!t){s.initialize({startOnLoad:!1,theme:"dark"===e?"dark":"neutral",securityLevel:"loose",sequence:{useMaxWidth:!0,showSequenceNumbers:!0,actorFontSize:13,messageFontSize:12,noteFontSize:12}});try{let e=`security-flow-${Date.now()}`,{svg:r}=await s.render(e,W);if(t)return;o(r)}catch{}}}).catch(()=>{}),()=>{t=!0}},[e]),(0,n.useEffect)(()=>{t&&a.current&&a.current.querySelectorAll("text").forEach(e=>{let t=e.textContent?.trim()||"",s=null;if(t.includes("Mobile / Web Client")?s='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#38bdf8" stroke-width="2.2"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/></svg>':t.includes("9Remote Signaling Relay")?s='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#a855f7" stroke-width="2.2"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/></svg>':t.includes("Host Machine (Agent)")&&(s='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2.2"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>'),!s)return;let r=e.parentElement,o=r?.querySelector("rect")||e.previousElementSibling;if(!o||"rect"!==o.tagName||r.querySelector("foreignObject"))return;let a=o.getAttribute("x"),n=o.getAttribute("y"),l=o.getAttribute("width"),i=o.getAttribute("height");if(!a||!n||!l||!i)return;let c=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");c.setAttribute("x",a),c.setAttribute("y",n),c.setAttribute("width",l),c.setAttribute("height",i),c.style.pointerEvents="none",c.innerHTML=`
|
|
18
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="display:flex;align-items:center;justify-content:center;width:100%;height:100%;gap:6px;font-family:ui-monospace,monospace;font-size:12px;font-weight:600;color:currentColor;">
|
|
19
|
+
<span style="display:flex;align-items:center;opacity:0.9;">${s}</span>
|
|
20
|
+
<span>${t}</span>
|
|
21
|
+
</div>
|
|
22
|
+
`,e.style.display="none",r.appendChild(c)})},[t]),(0,r.jsx)("section",{id:"security",className:"relative py-24 px-4 sm:px-6 lg:px-8",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"text-center mb-16",children:[(0,r.jsx)("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full border mb-4 text-xs font-mono",style:{borderColor:d,background:c,color:h},children:"Zero-Trust Architecture"}),(0,r.jsxs)("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold mb-4",style:{color:m},children:["3-Layer Security & ",(0,r.jsx)("span",{style:{color:m},children:"Zero-Trust Verification"})]}),(0,r.jsx)("p",{className:"text-base sm:text-lg max-w-2xl mx-auto",style:{color:h},children:"Split-Key pairing, direct WebRTC encryption, and physical host approval — your machine stays completely protected."})]}),(0,r.jsx)("div",{className:"p-4 sm:p-8 rounded-xl border mb-12 overflow-x-auto flex justify-center",style:{background:i,borderColor:d},children:t?(0,r.jsx)("div",{ref:a,className:"w-full max-w-4xl min-w-[320px] [&_svg]:w-full [&_svg]:h-auto",dangerouslySetInnerHTML:{__html:t}}):(0,r.jsx)("div",{className:"py-20 text-sm font-mono",style:{color:h},children:"Loading security flow diagram..."})}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:O.map(e=>(0,r.jsxs)("div",{className:"p-6 rounded-xl border flex flex-col justify-between",style:{background:i,borderColor:d},children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center border",style:{borderColor:d,background:c,color:u},children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:e.iconPath})})}),(0,r.jsxs)("span",{className:"text-xs font-mono",style:{color:u},children:["STEP ",e.step]})]}),(0,r.jsx)("h3",{className:"text-lg font-bold mb-2",style:{color:m},children:e.title})]}),(0,r.jsx)("p",{className:"text-sm leading-relaxed",style:{color:h},children:e.desc})]},e.step))})]})})}function B(){let{formattedStars:e}=(0,j.w)();return(0,r.jsx)("section",{className:"relative py-24 px-4 sm:px-6 lg:px-8",children:(0,r.jsx)("div",{className:"max-w-4xl mx-auto text-center",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 blur-3xl pointer-events-none animate-pulse-glow",style:{background:"rgba(255,255,255,0.05)"}}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold mb-5",style:{color:m},children:["Remote everything.",(0,r.jsx)("br",{}),"On any screen, ",(0,r.jsx)("span",{style:{color:m},children:"everywhere"}),"."]}),(0,r.jsx)("p",{className:"text-base sm:text-lg mb-8 max-w-2xl mx-auto",style:{color:h},children:"IDE, 60fps desktop, files, emulator & 30+ AI vibe coding agents on PC, Web, iPad, and mobile. Ready in 30 seconds."}),(0,r.jsxs)("div",{className:"flex flex-row gap-2.5 sm:gap-3 justify-center items-center flex-wrap",children:[(0,r.jsx)(o,{href:"/login",className:"btn-cta group px-5 sm:px-8 py-3 sm:py-4 rounded-lg font-semibold text-sm sm:text-base transition-transform duration-300 hover:scale-[1.03]",style:{background:u,color:"#FFF"},children:(0,r.jsxs)("span",{className:"flex items-center justify-center gap-2",children:["Get Remote",(0,r.jsx)("svg",{className:"w-5 h-5 group-hover:translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})})]})}),(0,r.jsxs)("a",{href:"https://github.com/decolua/9remote",target:"_blank",rel:"noopener noreferrer",className:"px-5 sm:px-8 py-3 sm:py-4 rounded-lg font-semibold text-sm sm:text-base transition-all duration-300 hover:scale-[1.03] flex items-center justify-center gap-2 border",style:{background:c,color:m,borderColor:d},children:[(0,r.jsx)("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})}),(0,r.jsx)("span",{children:"Star on GitHub"}),e&&(0,r.jsxs)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full border border-border-subtle bg-surface-2 text-text",children:["★ ",e]})]})]}),(0,r.jsx)("p",{className:"mt-8 text-xs sm:text-sm font-mono",style:{color:x},children:"✓ 100% Free \xb7 Open source MIT \xb7 Zero tracking or telemetry"})]})]})})})}let V=[{href:"/login",label:"Remote",internal:!0},{href:"/workspace",label:"Terminal",internal:!0},{href:"/remote",label:"Remote Desktop",internal:!0},{href:"https://apps.apple.com/us/app/9remote/id6796664210",label:"iOS (App Store)"},{href:"https://play.google.com/store/apps/details?id=cc.remote9.app&pli=1",label:"Android (Google Play)"}],G=[{href:"https://github.com/decolua/9remote",label:"GitHub"},{href:"https://www.npmjs.com/package/9remote",label:"NPM"},{href:"https://docs.9remote.cc/",label:"Documentation"},{href:"https://www.facebook.com/groups/9teamvn",label:"Community"}];function q({href:e,label:t,internal:s}){let a=s?o:"a";return(0,r.jsx)(a,{href:e,...s?{}:{target:"_blank",rel:"noopener noreferrer"},className:"text-sm transition-colors",style:{color:h},onMouseEnter:e=>e.currentTarget.style.color=u,onMouseLeave:e=>e.currentTarget.style.color=h,children:t})}function Y(){let e="3.0.10";return(0,r.jsx)("footer",{className:"relative py-14 px-4 sm:px-6 lg:px-8 border-t",style:{background:l,borderColor:d},children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8 mb-8",children:[(0,r.jsxs)("div",{className:"col-span-1 md:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,r.jsx)("img",{src:"/icon-192.png",alt:"9Remote Logo",className:"w-9 h-9 rounded-lg object-contain shadow-md shadow-brand-500/20"}),(0,r.jsx)("h3",{className:"text-xl font-bold",style:{color:m},children:"9Remote"})]}),(0,r.jsx)("p",{className:"text-sm max-w-md mb-4",style:{color:h},children:"Remote everything, everywhere. Remote IDE, 60fps desktop, files, emulator & vibe coding on any screen."}),(0,r.jsxs)("p",{className:"text-xs",style:{color:x},children:["\xa9 ",new Date().getFullYear()," 9Remote. All rights reserved.",e&&(0,r.jsxs)("span",{className:"ml-2",children:["v",e]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold mb-4 text-sm",style:{color:m},children:"Product"}),(0,r.jsx)("ul",{className:"space-y-2",children:V.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(q,{...e})},e.label))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold mb-4 text-sm",style:{color:m},children:"Resources"}),(0,r.jsx)("ul",{className:"space-y-2",children:G.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(q,{...e})},e.label))})]})]}),(0,r.jsxs)("div",{className:"pt-8 flex flex-col sm:flex-row justify-between items-center gap-4 border-t",style:{borderColor:d},children:[(0,r.jsx)("p",{className:"text-xs",style:{color:x},children:"Built with Next.js, Socket.io, and Cloudflare Workers"}),(0,r.jsx)("div",{className:"flex gap-6",children:G.slice(0,3).map(e=>(0,r.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-xs transition-colors",style:{color:x},onMouseEnter:e=>e.currentTarget.style.color=u,onMouseLeave:e=>e.currentTarget.style.color=x,children:e.label},e.label))})]})]})})}var Z=s(64683);function K(){let[e,t]=(0,n.useState)(null),[s,o]=(0,n.useState)(!0);return((0,n.useEffect)(()=>{try{if("1"===sessionStorage.getItem("9remote_dismiss_store_banner"))return}catch{}let e=navigator.userAgent||"";/iPhone|iPad|iPod/i.test(e)?(t({storeName:"Apple App Store",url:b,btnLabel:"Get"}),o(!1)):/Android/i.test(e)&&(t({storeName:"Google Play",url:y,btnLabel:"Install"}),o(!1))},[]),s||!e)?null:(0,r.jsxs)("div",{className:"fixed bottom-0 inset-x-0 z-40 sm:hidden px-4 py-2.5 bg-surface/90 backdrop-blur-lg border-t border-border-subtle shadow-2xl flex items-center justify-between gap-3 pb-[max(0.65rem,env(safe-area-inset-bottom))]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,r.jsx)("img",{src:"/icon-192.png",alt:"9Remote",className:"w-9 h-9 rounded-xl object-contain shadow-md shrink-0 border border-border-subtle/50"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-semibold text-text truncate leading-tight",children:"9Remote"}),(0,r.jsx)("p",{className:"text-[11px] text-text-muted truncate leading-tight mt-0.5",children:e.storeName})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,r.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"px-3.5 py-1.5 bg-brand-500 hover:bg-brand-600 active:scale-95 text-white text-xs font-semibold rounded-full shadow-md shadow-brand-500/20 transition-all duration-150",children:e.btnLabel}),(0,r.jsx)("button",{onClick:()=>{o(!0);try{sessionStorage.setItem("9remote_dismiss_store_banner","1")}catch{}},className:"p-1 text-text-muted hover:text-text active:scale-90 transition-colors","aria-label":"Close",children:(0,r.jsx)(Z.X,{size:16})})]})]})}function U(){return(0,r.jsxs)("div",{className:"min-h-screen overflow-x-hidden safe-area-insets",style:{color:m},children:[(0,r.jsx)(a.A,{}),(0,r.jsx)("div",{className:"landing-light","aria-hidden":!0}),(0,r.jsx)(k,{}),(0,r.jsxs)("main",{className:"relative z-10",children:[(0,r.jsx)(C,{}),(0,r.jsx)(L,{}),(0,r.jsx)(H,{}),(0,r.jsx)($,{}),(0,r.jsx)(B,{})]}),(0,r.jsx)(Y,{}),(0,r.jsx)(K,{})]})}function J(){return(0,r.jsx)(U,{})}},28913:(e,t,s)=>{"use strict";e.exports=s(1988).style},38415:(e,t,s)=>{"use strict";s.d(t,{Gf:()=>i,Gi:()=>h,Hu:()=>l,Nn:()=>d,O8:()=>a,cu:()=>c,ij:()=>m,l7:()=>n,no:()=>x,pe:()=>r,rl:()=>o,xO:()=>u});let r="https://api.github.com",o="https://github.com/decolua/9remote",a=`${r}/repos/decolua/9remote`,n=!1,l=".devcontainer/devcontainer.json",i="NREMOTE_API_KEY",c={name:"9Remote",image:"mcr.microsoft.com/devcontainers/universal:latest",postCreateCommand:"npm install -g 9remote@latest",postAttachCommand:"nohup 9remote start > /tmp/9remote.log 2>&1 &",forwardPorts:[2208],portsAttributes:{2208:{label:"9Remote Server",onAutoForward:"silent",visibility:"public"}}},d=3e3,m=60,h={available:"Available",starting:"Starting",shutdown:"Shutdown",unknown:"Unknown"},x={user:"/user",codespaces:"/user/codespaces",codespaceByName:e=>`/user/codespaces/${e}`,startCodespace:e=>`/user/codespaces/${e}/start`,userReposList:"/user/repos?per_page=100&sort=updated&affiliation=owner,collaborator",repoContents:(e,t,s)=>`/repos/${e}/${t}/contents/${s}`,createCodespaceForRepo:(e,t)=>`/repos/${e}/${t}/codespaces`,codespaceSecretsPublicKey:"/user/codespaces/secrets/public-key",codespaceSecret:e=>`/user/codespaces/secrets/${e}`,codespaceSecretRepos:(e,t)=>`/user/codespaces/secrets/${e}/repositories/${t}`};function u(e){return`https://${e}-2208.app.github.dev`}},48310:(e,t,s)=>{"use strict";s.d(t,{w:()=>n});var r=s(1521),o=s(38415);let a="9remote_github_stars";function n(){let[e,t]=(0,r.useState)(null);return(0,r.useEffect)(()=>{try{let e=localStorage.getItem(a);if(e){let{count:s,timestamp:r}=JSON.parse(e);if("number"==typeof s&&t(s),Date.now()-r<36e5)return}}catch{}let e=!0;return fetch(o.O8).then(e=>e.ok?e.json():null).then(s=>{if(!e||"number"!=typeof s?.stargazers_count)return;let r=s.stargazers_count;t(r);try{localStorage.setItem(a,JSON.stringify({count:r,timestamp:Date.now()}))}catch{}}).catch(()=>{}),()=>{e=!1}},[]),{stars:e,formattedStars:null==e?"":e>=1e3?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":String(e)}}},58751:(e,t,s)=>{Promise.resolve().then(s.bind(s,27493))},67497:()=>{},90753:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var r=s(73365),o=s(44976),a=s(8910);let n=({size:e=18})=>(0,r.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,r.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),l=({size:e=18})=>(0,r.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function i({className:e="",size:t=18}){let{theme:s,toggleTheme:c}=(0,o.D)(),d="dark"===s;return(0,r.jsx)("button",{type:"button",onClick:()=>{(0,a.e)(),c()},"aria-label":d?"Switch to light theme":"Switch to dark theme",title:d?"Light mode":"Dark mode",className:`p-1.5 rounded-brand transition-colors text-[var(--color-text-muted)] hover:text-[var(--color-text)] hover:bg-[var(--color-surface-2)] ${e}`,children:d?(0,r.jsx)(n,{size:t}):(0,r.jsx)(l,{size:t})})}}},e=>{e.O(0,[774,9568,9958,2347,5158,7358],()=>e(e.s=58751)),_N_E=e.O()}]);
|