PageSourceSearch

https://kerneltools.dev/assets/SplitRecover-InTJMOGb.js

js kerneltools.dev collected 2026-10-02 01:53:43 UTC 3,542 bytes, 1 lines download raw bytes

1import{u as v,a as x,d as b,r as m,j as e,L as N,P as j}from"./index-j7I9Tmll.js";import{a as w,r as f,o as S,k as R,s as K}from"./split-DJ2IuZ2a.js";/* empty css                    */function $(){var p;v({title:"Recover your Kernel Split link",description:"Opens a one-time link to get a new Kernel Split link.",noindex:!0});const{hash:h}=x(),k=b(),n=(p=/(?:^#|&)t=([A-Za-z0-9-]{20,200})/.exec(h||""))==null?void 0:p[1],[o,y]=m.useState(""),[t,i]=m.useState(()=>n?{status:"key"}:{status:"error",error:"This link is incomplete. Open it straight from the email."});async function g(r){var u;r.preventDefault(),i({status:"working"});try{const s=await f(n,o);let a="your group",l="";try{const d=await S(await R(`/groups/${s.groupId}`,{token:s.token}),s.key);a=d.group.name,l=((u=d.me)==null?void 0:u.name)||""}catch{}K({id:s.groupId,name:a,token:s.token,key:s.key,memberName:l,role:s.role||"member"}),i({status:"done",...s,groupName:a,memberName:l})}catch(s){const a=/expired|already used|incomplete/.test(s.message);i({status:a?"error":"key",error:s.message})}}const c=t.status==="done"?`/split/g/${t.groupId}${w(t.token,t.key)}`:"";return e.jsxs("div",{className:"calc-page split-page split-recover",children:[e.jsxs("header",{className:"calc-heading",children:[e.jsx("span",{className:"calc-eyebrow",children:"KERNEL SPLIT"}),e.jsx("h1",{children:"Recover your link"})]}),(t.status==="key"||t.status==="working")&&e.jsxs("section",{className:"split-card split-recover-state","aria-labelledby":"recover-key-title","aria-busy":t.status==="working",children:[e.jsx("h2",{id:"recover-key-title",children:"Enter your recovery key"}),e.jsx("p",{className:"calc-note",children:"It’s the key you saved when you set up recovery, like 7KQ2-…. Your group is end-to-end encrypted, so it can’t be opened without it."}),e.jsxs("form",{className:"split-open",onSubmit:g,children:[e.jsxs("label",{className:"calc-field",children:["Recovery key",e.jsx("input",{className:"calc-text split-recovery-code",value:o,onChange:r=>y(r.target.value),autoComplete:"off",autoCapitalize:"characters",spellCheck:!1})]}),e.jsx("button",{type:"submit",className:"btn btn-primary",disabled:t.status==="working"||!o.trim(),children:t.status==="working"?"Checking…":"Get my new link"})]}),t.error&&e.jsx("p",{className:"calc-error",role:"alert",children:t.error})]}),t.status==="error"&&e.jsxs("section",{className:"split-card split-recover-state is-error",children:[e.jsx("h2",{children:"This link can’t be used"}),e.jsx("p",{className:"calc-error",role:"alert",children:t.error}),e.jsx("p",{className:"calc-note",children:"A group admin can also give you a new link."}),e.jsx(N,{className:"btn btn-primary split-start",to:"/split",children:"Go to Kernel Split"})]}),t.status==="done"&&e.jsxs("section",{className:"split-card split-recover-state is-done","aria-labelledby":"recovered-title",children:[e.jsx(j,{kind:"splitRecover",className:"split-recover-sketch"}),e.jsxs("h2",{id:"recovered-title",children:["You’re back in “",t.groupName,"”",t.memberName?` as ${t.memberName}`:""]}),e.jsx("p",{className:"calc-note",children:"This is your new personal link. It’s saved on this device; keep a copy somewhere safe too. Your old link no longer works."}),e.jsx("input",{className:"calc-text split-link-url",readOnly:!0,"aria-label":"Your new link",value:`${window.location.origin}${c}`,onFocus:r=>r.target.select()}),e.jsx("button",{type:"button",className:"btn btn-primary split-start",onClick:()=>k(c),children:"Open the group"})]})]})}export{$ as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.