PageSourceSearch

https://tg10x.com/_assets/admin-impersonate-Yd68mOto.js

js tg10x.com collected 2026-10-02 00:35:39 UTC 1,454 bytes, 1 lines download raw bytes

1import{c3 as d,e as p,r as o,n as f,j as e,m as h,L as g}from"./vendor-DCKdIk_f.js";import{p as x}from"./establish_session_POST.schema-CD5Ase_E.js";import{u as S,B as j}from"./index-BDzfgULb.js";import{S as _}from"./Spinner-CwCuwTV8.js";const E="_container_92t4f_1",N="_card_92t4f_9",v="_loadingState_92t4f_20",k="_errorState_92t4f_21",r={container:E,card:N,loadingState:v,errorState:k};function b(){const[l]=d(),t=l.get("token"),u=p(),{onLogin:m}=S(),a=o.useRef(!1),[i,n]=o.useState(null),{mutate:c}=f({mutationFn:x,onSuccess:s=>{if("error"in s){n(s.error);return}s.success&&s.user&&(sessionStorage.setItem("tg10x_impersonation",JSON.stringify({impersonating:!0,userName:s.user.displayName})),m(s.user),u("/dashboard",{replace:!0}))},onError:s=>{n(s instanceof Error?s.message:"An unknown error occurred")}});return o.useEffect(()=>{if(!t){n("No impersonation token provided in the URL.");return}a.current||(a.current=!0,c({tempToken:t}))},[t,c]),e.jsxs("div",{className:r.container,children:[e.jsx(h,{children:e.jsx("title",{children:"Impersonating User..."})}),e.jsx("div",{className:r.card,children:i?e.jsxs("div",{className:r.errorState,children:[e.jsx("h2",{children:"Impersonation Failed"}),e.jsx("p",{children:i}),e.jsx(j,{asChild:!0,children:e.jsx(g,{to:"/admin",children:"Return to Admin"})})]}):e.jsxs("div",{className:r.loadingState,children:[e.jsx(_,{size:"lg"}),e.jsx("p",{children:"Establishing session..."})]})})]})}export{b 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.