1import{c as g,j as t,r as _,F as O,u as G,H as Q}from"./app-B14QOqWl.js";import{H as W,S as X}from"./layout-CUrYTRzq.js";import{b as $,a as A,d as B,B as F,S as J}from"./createLucideIcon-6PRwaVcB.js";import{r as U,c as Y,d as Z,e as ee,a as te}from"./index-aaJOUVkW.js";import{I as se}from"./input-error-BtyqOqu7.js";import{e as re,f as ae,g as oe,a as ne,D as le}from"./dialog-DU-a2gxf.js";import{I as ie,K as ce,O as q,a as de,b as ue,u as fe}from"./use-two-factor-auth-C3oAzNwv.js";import{S as I}from"./spinner-BOHNkHKz.js";import{C as me}from"./check-DVGIM6d6.js";import{A as pe}from"./app-layout-B7UZnuFd.js";/* empty css */import"./index-C9wbm8_4.js";import"./index-kUxn3dHO.js";import"./loader-circle-CCku0naz.js";import"./index-BEwO_J8E.js";import"./dropdown-menu-D_-tky0Y.js";const he=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],xe=$("CircleAlert",he);const ye=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ge=$("Copy",ye);const ve=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],be=$("EyeOff",ve);const je=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],we=$("Eye",je);const Ne=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],Se=$("LockKeyhole",Ne);const Ce=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],_e=$("RefreshCw",Ce);const ke=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]],Te=$("ScanLine",ke);const $e=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]],Ae=$("ShieldBan",$e);const Fe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],K=$("ShieldCheck",Fe);function Me(n){const e=g.c(8);let s,r;e[0]!==n?({className:s,...r}=n,e[0]=n,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let a;e[3]!==s?(a=A("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",s),e[3]=s,e[4]=a):a=e[4];let o;return e[5]!==r||e[6]!==a?(o=t.jsx("div",{"data-slot":"card",className:a,...r}),e[5]=r,e[6]=a,e[7]=o):o=e[7],o}function Ee(n){const e=g.c(8);let s,r;e[0]!==n?({className:s,...r}=n,e[0]=n,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let a;e[3]!==s?(a=A("flex flex-col gap-1.5 px-6",s),e[3]=s,e[4]=a):a=e[4];let o;return e[5]!==r||e[6]!==a?(o=t.jsx("div",{"data-slot":"card-header",className:a,...r}),e[5]=r,e[6]=a,e[7]=o):o=e[7],o}function Re(n){const e=g.c(8);let s,r;e[0]!==n?({className:s,...r}=n,e[0]=n,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let a;e[3]!==s?(a=A("leading-none font-semibold",s),e[3]=s,e[4]=a):a=e[4];let o;return e[5]!==r||e[6]!==a?(o=t.jsx("div",{"data-slot":"card-title",className:a,...r}),e[5]=r,e[6]=a,e[7]=o):o=e[7],o}function Ve(n){const e=g.c(8);let s,r;e[0]!==n?({className:s,...r}=n,e[0]=n,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let a;e[3]!==s?(a=A("text-muted-foreground text-sm",s),e[3]=s,e[4]=a):a=e[4];let o;return e[5]!==r||e[6]!==a?(o=t.jsx("div",{"data-slot":"card-description",className:a,...r}),e[5]=r,e[6]=a,e[7]=o):o=e[7],o}function De(n){const e=g.c(8);let s,r;e[0]!==n?({className:s,...r}=n,e[0]=n,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let a;e[3]!==s?(a=A("px-6",s),e[3]=s,e[4]=a):a=e[4];let o;return e[5]!==r||e[6]!==a?(o=t.jsx("div",{"data-slot":"card-content",className:a,...r}),e[5]=r,e[6]=a,e[7]=o):o=e[7],o}const ze=B("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-background text-foreground",destructive:"text-destructive-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-destructive-foreground
1/80"}},defaultVariants:{variant:"default"}});function Le(n){const e=g.c(10);let s,r,a;e[0]!==n?({className:s,variant:a,...r}=n,e[0]=n,e[1]=s,e[2]=r,e[3]=a):(s=e[1],r=e[2],a=e[3]);let o;e[4]!==s||e[5]!==a?(o=A(ze({variant:a}),s),e[4]=s,e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{"data-slot":"alert",role:"alert",className:o,...r}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function Oe(n){const e=g.c(8);let s,r;e[0]!==n?({className:s,...r}=n,e[0]=n,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let a;e[3]!==s?(a=A("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",s),e[3]=s,e[4]=a):a=e[4];let o;return e[5]!==r||e[6]!==a?(o=t.jsx("div",{"data-slot":"alert-title",className:a,...r}),e[5]=r,e[6]=a,e[7]=o):o=e[7],o}function qe(n){const e=g.c(8);let s,r;e[0]!==n?({className:s,...r}=n,e[0]=n,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let a;e[3]!==s?(a=A("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",s),e[3]=s,e[4]=a):a=e[4];let o;return e[5]!==r||e[6]!==a?(o=t.jsx("div",{"data-slot":"alert-description",className:a,...r}),e[5]=r,e[6]=a,e[7]=o):o=e[7],o}function P(n){const e=g.c(8),{errors:s,title:r}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(xe,{}),e[0]=a):a=e[0];const o=r||"Something went wrong.";let l;e[1]!==o?(l=t.jsx(Oe,{children:o}),e[1]=o,e[2]=l):l=e[2];let c;e[3]!==s?(c=t.jsx(qe,{children:t.jsx("ul",{className:"list-inside list-disc text-sm",children:Array.from(new Set(s)).map(Ie)})}),e[3]=s,e[4]=c):c=e[4];let i;return e[5]!==l||e[6]!==c?(i=t.jsxs(Le,{variant:"destructive",children:[a,l,c]}),e[5]=l,e[6]=c,e[7]=i):i=e[7],i}function Ie(n,e){return t.jsx("li",{children:n},e)}function He(n){const e=g.c(32),{recoveryCodesList:s,fetchRecoveryCodes:r,errors:a}=n,[o,l]=_.useState(!1),c=_.useRef(null),i=s.length>0&&o;let d;e[0]!==o||e[1]!==r||e[2]!==s.length?(d=async()=>{!o&&!s.length&&await r(),l(!o),o||setTimeout(()=>{c.current?.scrollIntoView({behavior:"smooth",block:"nearest"})})},e[0]=o,e[1]=r,e[2]=s.length,e[3]=d):d=e[3];const f=d;let u,h;e[4]!==r||e[5]!==s.length?(u=()=>{s.length||r()},h=[s.length,r],e[4]=r,e[5]=s.length,e[6]=u,e[7]=h):(u=e[6],h=e[7]),_.useEffect(u,h);const x=o?be:we;let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs(Ee,{children:[t.jsxs(Re,{className:"flex gap-3",children:[t.jsx(Se,{className:"size-4","aria-hidden":"true"}),"2FA Recovery Codes"]}),t.jsx(Ve,{children:"Recovery codes let you regain access if you lose your 2FA device. Store them in a secure password manager."})]}),e[8]=m):m=e[8];let y;e[9]!==x?(y=t.jsx(x,{className:"size-4","aria-hidden":"true"}),e[9]=x,e[10]=y):y=e[10];const C=o?"Hide":"View";let v;e[11]!==o||e[12]!==y||e[13]!==C||e[14]!==f?(v=t.jsxs(F,{onClick:f,className:"w-fit","aria-expanded":o,"aria-controls":"recovery-codes-section",children:[y,C," Recovery Codes"]}),e[11]=o,e[12]=y,e[13]=C,e[14]=f,e[15]=v):v=e[15];let b;e[16]!==i||e[17]!==r?(b=i&&t.jsx(O,{...U.form(),options:{preserveScroll:!0},onSuccess:r,children:Pe}),e[16]=i,e[17]=r,e[18]=b):b=e[18];let p;e[19]!==v||e[20]!==b?(p=t.jsxs("div",{className:"flex flex-col gap-3 select-none sm:flex-row sm:items-center sm:justify-between",children:[v,b]}),e[19]=v,e[20]=b,e[21]=p):p=e[21];const N=`relative overflow-hidden transition-all duration-300 ${o?"h-auto opacity-100":"h-0 opacity-0"}`,j=!o;let w;e[22]!==a||e[23]!==s?(w=t.jsx("div",{className:"mt-3 space-y-3",children:a?.length?t.jsx(P,{errors:a}):t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:c,className:"grid gap-1 rounded-lg bg-muted p-4 font-mono text-sm",role:"list","aria-label":"Recovery codes",children:s.length?s.map(Ke):t.jsx("div",{className:"space-y-2","aria-label":"Loading recovery codes",children:Array.from({length:8},Be)})}),t.jsx("div",{className:"text-xs text-muted-foreground select-none",children:t.jsxs("p",{id:"regenerate-warning",children:["Each recovery code can be used once to access your account and will be removed after use. If you need more, click"," ",t.jsx("span",{className:"font-bold",children:"Regenerate Codes"})," ","above."]})})]})}),e[22]=a,e[23]=s,e[24]=w):w=e[24];let S;e[25]!==N||e[26]!==j||e[27]!==w?(S=t.jsx("div",{id:"recovery-codes-section",className:N,"aria-hidden":j,children:w}),e[25]=N,e[26]=j,e[27]=w,e[28]=S):S=e[28];let k;return e[29]!==S||e[30]!==p?(k=t.jsxs(Me,{children:[m,t.jsxs(De,{children:[p,S]})]}),e[29]=S,e[30]=p,e[31]=k):k=e[31],k}function Be(n,e){return t.jsx("div",{className:"h-4 animate-pulse rounded bg-muted-foreground
1/20","aria-hidden":"true"},e)}function Ke(n,e){return t.jsx("div",{role:"listitem",className:"select-text",children:n},e)}function Pe(n){const{processing:e}=n;return t.jsxs(F,{variant:"secondary",type:"submit",disabled:e,"aria-describedby":"regenerate-warning",children:[t.jsx(_e,{})," Regenerate Codes"]})}function Ge(){const n=g.c(3),[e,s]=_.useState(null);let r;n[0]===Symbol.for("react.memo_cache_sentinel")?(r=async l=>{if(!navigator?.clipboard)return console.warn("Clipboard not supported"),!1;try{return await navigator.clipboard.writeText(l),s(l),!0}catch(c){return console.warn("Copy failed",c),s(null),!1}},n[0]=r):r=n[0];const a=r;let o;return n[1]!==e?(o=[e,a],n[1]=e,n[2]=o):o=n[2],o}function Qe(){const n=g.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"absolute inset-0 grid grid-cols-5 opacity-50",children:Array.from({length:5},Xe)}),n[0]=e):e=n[0];let s;return n[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"mb-3 rounded-full border border-border bg-card p-0.5 shadow-sm",children:t.jsxs("div",{className:"relative overflow-hidden rounded-full border border-border bg-muted p-2.5",children:[e,t.jsx("div",{className:"absolute inset-0 grid grid-rows-5 opacity-50",children:Array.from({length:5},We)}),t.jsx(Te,{className:"relative z-20 size-6 text-foreground"})]})}),n[1]=s):s=n[1],s}function We(n,e){return t.jsx("div",{className:"border-b border-border last:border-b-0"},`row-${e+1}`)}function Xe(n,e){return t.jsx("div",{className:"border-r border-border last:border-r-0"},`col-${e+1}`)}function Je(n){const e=g.c(9),{qrCodeSvg:s,manualSetupKey:r,buttonText:a,onNextStep:o,errors:l}=n,{resolvedAppearance:c}=G(),[i,d]=Ge(),f=i===r?me:ge;let u;return e[0]!==f||e[1]!==a||e[2]!==d||e[3]!==l||e[4]!==r||e[5]!==o||e[6]!==s||e[7]!==c?(u=t.jsx(t.Fragment,{children:l?.length?t.jsx(P,{errors:l}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mx-auto flex max-w-md overflow-hidden",children:t.jsx("div",{className:"mx-auto aspect-square w-64 rounded-lg border border-border",children:t.jsx("div",{className:"z-10 flex h-full w-full items-center justify-center p-5",children:s?t.jsx("div",{className:"aspect-square w-full rounded-lg bg-white p-2 [&_svg]:size-full",dangerouslySetInnerHTML:{__html:s},style:{filter:c==="dark"?"invert(1) brightness(1.5)":void 0}}):t.jsx(I,{})})})}),t.jsx("div",{className:"flex w-full space-x-5",children:t.jsx(F,{className:"w-full",onClick:o,children:a})}),t.jsxs("div",{className:"relative flex w-full items-center justify-center",children:[t.jsx("div",{className:"absolute inset-0 top-1/2 h-px w-full bg-border"}),t.jsx("span",{className:"relative bg-card px-2 py-1",children:"or, enter the code manually"})]}),t.jsx("div",{className:"flex w-full space-x-2",children:t.jsx("div",{className:"flex w-full items-stretch overflow-hidden rounded-xl border border-border",children:r?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",readOnly:!0,value:r,className:"h-full w-full bg-background p-3 text-foreground outline-none"}),t.jsx("button",{onClick:()=>d(r),className:"border-l border-border px-3 hover:bg-muted",children:t.jsx(f,{className:"w-4"})})]}):t.jsx("div",{className:"flex h-full w-full items-center justify-center bg-muted p-3",children:t.jsx(I,{})})})})]})}),e[0]=f,e[1]=a,e[2]=d,e[3]=l,e[4]=r,e[5]=o,e[6]=s,e[7]=c,e[8]=u):u=e[8],u}function Ue(n){const e=g.c(11),{onClose:s,onBack:r}=n,[a,o]=_.useState(""),l=_.useRef(null);let c,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{setTimeout(()=>{l.current?.querySelector("input")?.focus()},0)},i=[],e[0]=c,e[1]=i):(c=e[0],i=e[1]),_.useEffect(c,i);let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=Y.form(),e[2]=d):d=e[2];let f;e[3]!==s?(f=()=>s(),e[3]=s,e[4]=f):f=e[4];let u;e[5]!==a||e[6]!==r?(u=x=>{const{processing:m,errors:y}=x;return t.jsx(t.Fragment,{children:t.jsxs("div",{ref:l,className:"relative w-full space-y-3",children:[t.jsxs("div",{className:"flex w-full flex-col items-center space-y-3 py-2",children:[t.jsx(ie,{id:"otp",name:"code",maxLength:q,onChange:o,disabled:m,pattern:ce,children:t.jsx(de,{children:Array.from({length:q},Ye)})}),t.jsx(se,{message:y?.confirmTwoFactorAuthentication?.code})]}),t.jsxs("div",{className:"flex w-full space-x-5",children:[t.jsx(F,{type:"button",variant:"outline",className:"flex-1",onClick:r,disabled:m,children:"Back"}),t.jsx(F,{type:"submit",className:"flex-1",disabled:m||a.length<q,children:"Confirm"})]})]})})},e[5]=a,e[6]=r,e[7]=u):u=e[7];let h;return e[8]!==f||e[9]!==u?(h=t.jsx(O,{...d,onSuccess:f,resetOnError:!0,resetOnSuccess:!0,children:u}),e[8]=f,e[9]=u,e[10]=h):h=e[10],h}function Ye(n,e){return t.jsx(ue,{index:e},e)}function Ze(n){const e=g.c(43),{isOpen:s,onClose:r,requiresConfirmation:a,twoFactorEnabled:o,qrCodeSvg:l,manualSetupKey:c,clearSetupData:i,fetchSetupData:d,errors:f}=n,[u,h]=_.useState(!1);let x;e:{if(o){let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T={title:"Two-Factor Authentication
1Enabled",description:"Two-factor authentication is now enabled. Scan the QR code or enter the setup key in your authenticator app.",buttonText:"Close"},e[0]=T):T=e[0],x=T;break e}if(u){let T;e[1]===Symbol.for("react.memo_cache_sentinel")?(T={title:"Verify Authentication Code",description:"Enter the 6-digit code from your authenticator app",buttonText:"Continue"},e[1]=T):T=e[1],x=T;break e}let z;e[2]===Symbol.for("react.memo_cache_sentinel")?(z={title:"Enable Two-Factor Authentication",description:"To finish enabling two-factor authentication, scan the QR code or enter the setup key in your authenticator app",buttonText:"Continue"},e[2]=z):z=e[2],x=z}const m=x;let y;e[3]!==i||e[4]!==r||e[5]!==a?(y=()=>{if(a){h(!0);return}i(),r()},e[3]=i,e[4]=r,e[5]=a,e[6]=y):y=e[6];const C=y;let v;e[7]!==i||e[8]!==o?(v=()=>{h(!1),o&&i()},e[7]=i,e[8]=o,e[9]=v):v=e[9];const b=v;let p,N;e[10]!==d||e[11]!==s||e[12]!==l?(p=()=>{s&&!l&&d()},N=[s,l,d],e[10]=d,e[11]=s,e[12]=l,e[13]=p,e[14]=N):(p=e[13],N=e[14]),_.useEffect(p,N);let j;e[15]!==r||e[16]!==b?(j=()=>{b(),r()},e[15]=r,e[16]=b,e[17]=j):j=e[17];const w=j;let S;e[18]!==w?(S=z=>!z&&w(),e[18]=w,e[19]=S):S=e[19];let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Qe,{}),e[20]=k):k=e[20];let M;e[21]!==m.title?(M=t.jsx(re,{children:m.title}),e[21]=m.title,e[22]=M):M=e[22];let E;e[23]!==m.description?(E=t.jsx(ae,{className:"text-center",children:m.description}),e[23]=m.description,e[24]=E):E=e[24];let R;e[25]!==E||e[26]!==M?(R=t.jsxs(oe,{className:"flex items-center justify-center",children:[k,M,E]}),e[25]=E,e[26]=M,e[27]=R):R=e[27];let V;e[28]!==f||e[29]!==C||e[30]!==c||e[31]!==m.buttonText||e[32]!==r||e[33]!==l||e[34]!==u?(V=t.jsx("div",{className:"flex flex-col items-center space-y-5",children:u?t.jsx(Ue,{onClose:r,onBack:()=>h(!1)}):t.jsx(Je,{qrCodeSvg:l,manualSetupKey:c,buttonText:m.buttonText,onNextStep:C,errors:f})}),e[28]=f,e[29]=C,e[30]=c,e[31]=m.buttonText,e[32]=r,e[33]=l,e[34]=u,e[35]=V):V=e[35];let D;e[36]!==R||e[37]!==V?(D=t.jsxs(ne,{className:"sm:max-w-md",children:[R,V]}),e[36]=R,e[37]=V,e[38]=D):D=e[38];let L;return e[39]!==s||e[40]!==D||e[41]!==S?(L=t.jsx(le,{open:s,onOpenChange:S,children:D}),e[39]=s,e[40]=D,e[41]=S,e[42]=L):L=e[42],L}const et=B("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function H(n){const e=g.c(12);let s,r,a,o;e[0]!==n?({className:s,variant:o,asChild:a,...r}=n,e[0]=n,e[1]=s,e[2]=r,e[3]=a,e[4]=o):(s=e[1],r=e[2],a=e[3],o=e[4]);const c=(a===void 0?!1:a)?J:"span";let i;e[5]!==s||e[6]!==o?(i=A(et({variant:o}),s),e[5]=s,e[6]=o,e[7]=i):i=e[7];let d;return e[8]!==c||e[9]!==r||e[10]!==i?(d=t.jsx(c,{"data-slot":"badge",className:i,...r}),e[8]=c,e[9]=r,e[10]=i,e[11]=d):d=e[11],d}const tt=[{title:"Two-Factor Authentication",href:te.url()}];function bt(n){const e=g.c(22),{requiresConfirmation:s,twoFactorEnabled:r}=n,a=s===void 0?!1:s,o=r===void 0?!1:r,{qrCodeSvg:l,hasSetupData:c,manualSetupKey:i,clearSetupData:d,fetchSetupData:f,recoveryCodesList:u,fetchRecoveryCodes:h,errors:x}=fe(),[m,y]=_.useState(!1);let C,v;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Q,{title:"Two-Factor Authentication"}),v=t.jsx("h1",{className:"sr-only",children:"Two-Factor Authentication Settings"}),e[0]=C,e[1]=v):(C=e[0],v=e[1]);let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(W,{title:"Two-Factor Authentication",description:"Manage your two-factor authentication settings"}),e[2]=b):b=e[2];let p;e[3]!==x||e[4]!==h||e[5]!==c||e[6]!==u||e[7]!==o?(p=o?t.jsxs("div",{className:"flex flex-col items-start justify-start space-y-4",children:[t.jsx(H,{variant:"default",children:"Enabled"}),t.jsx("p",{className:"text-muted-foreground",children:"With two-factor authentication enabled, you will be prompted for a secure, random pin during login, which you can retrieve from the TOTP-supported application on your phone."}),t.jsx(He,{recoveryCodesList:u,fetchRecoveryCodes:h,errors:x}),t.jsx("div",{className:"relative inline",children:t.jsx(O,{...Z.form(),children:rt})})]}):t.jsxs("div",{className:"flex flex-col items-start justify-start space-y-4",children:[t.jsx(H,{variant:"destructive",children:"Disabled"}),t.jsx("p",{className:"text-muted-foreground",children:"When you enable two-factor authentication, you will be prompted for a secure pin during login. This pin can be retrieved from a TOTP-supported application on your phone."}),t.jsx("div",{children:c?t.jsxs(F,{onClick:()=>y(!0),children:[t.jsx(K,{}),"Continue Setup"]}):t.jsx(O,{...ee.form(),onSuccess:()=>y(!0),children:st})})]}),e[3]=x,e[4]=h,e[5]=c,e[6]=u,e[7]=o,e[8]=p):p=e[8];let N;e[9]===Symbol.for("react.memo_cache_sentinel")?(N=()=>y(!1),e[9]=N):N=e[9];let j;e[10]!==d||e[11]!==x||e[12]!==f||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==m||e[17]!==o?(j=t.jsx(Ze,{isOpen:m,onClose:N,requiresConfirmation:a,twoFactorEnabled:o,qrCodeSvg:l,manualSetupKey:i,clearSetupData:d,fetchSetupData:f,errors:x}),e[10]=d,e[11]=x,e[12]=f,e[13]=i,e[14]=l,e[15]=a,e[16]=m,e[17]=o,e[18]=j):j=e[18];let w;return e[19]!==p||e[20]!==j?(w=t.jsxs(pe,{breadcrumbs:tt,children:[C,v,t.jsx(X,{children:t.jsxs("div",{className:"space-y-6",children:[b,p,j]})})]}),e[19]=p,e[20]=j,e[21]=w):w=e[21],w}function st(n){const{processing:e}=n;return t.jsxs(F,{type:"submit",disabled:e,children:[t.jsx(K,{}),"Enable 2FA"]})}function rt(n){const{processing:e}=n;return t.jsxs(F,{variant:"destructive",type:"submit",disabled:e,children:[t.jsx(Ae,{})," Disable 2FA"]})}export{bt 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.