PageSourceSearch

https://slugish.ai/build/assets/MagicLink-CNUiEuw_.js

js slugish.ai collected 2026-10-05 12:39:40 UTC 5,838 bytes, 16 lines download raw bytes

1import{r as t,j as e,H as _,b as j}from"./app-DP13319Q.js";import{I as L,a as v}from"./input-Du_IreF9.js";import{T as S}from"./text-link-CaiCOl2M.js";import{B as I}from"./button-rFeFNNd5.js";import{L as k}from"./label-CjdjKtaD.js";import{A}from"./auth-layout-D4SvDWCh.js";import{T as R}from"./TermsAndConditionsContent-kgFjQnlB.js";import{P as z}from"./PrivacyPolicyContent-CkZQpeat.js";import{C as q}from"./checkbox-C4JdPzUx.js";import{M as F}from"./react-tooltip.min-DW3XhwOj.js";import{L as G}from"./loader-circle-C-YIUsb6.js";/* empty css            */import"./utils-SWYxlXfx.js";import"./clsx-B-dksMZM.js";import"./index-DGVtPzwd.js";import"./app-logo-icon-B_rIw4ab.js";import"./index-CtyZ6W6U.js";import"./index-cNDDvm9q.js";import"./check-BA5_s5ky.js";import"./createLucideIcon-BZKkeQZf.js";function ie({tooltips:i}){const[m,u]=t.useState(""),[n,p]=t.useState(!1),[l,c]=t.useState({}),[s,r]=t.useState(null),[x,h]=t.useState(!1),[w,g]=t.useState(!1),[C,y]=t.useState(!1),o=(i==null?void 0:i["auth-tooltip"])||["Enter your registered email address","Click to reset your password","Enter your account password","Keep me logged in on this device","Read the Terms and Conditions","Read the Privacy Policy","Access your account","Receive a login link in your email","Create a new account","Enter the email associated with your account","Request a password reset link","Go back to the login page","Enter your full name","Enter a valid email address","Choose a strong password","Re-enter your password to confirm","Complete registration and create your account","Go to the login page","Enter the email for your account","Request a one-time login link","Go back to log in with your password"],N=async d=>{var f,b;if(d.preventDefault(),!n){c({agree_to_terms:"You must agree to the Terms and Conditions and Privacy Policy"});return}h(!0),r(null),c({});try{(await j.post(route("magic-link.send"),{email:m,redirect_url:"https://ez.wiki/home"})).status===200&&(r({type:"success",message:"We've sent a magic link to your email address!"}),u(""),p(!1))}catch(a){j.isAxiosError(a)?((f=a.response)==null?void 0:f.status)===422?c(a.response.data.errors):r({type:"error",message:((b=a.response)==null?void 0:b.data.message)||"Failed to send magic link. Please try again."}):r({type:"error",message:"An unexpected error occurred. Please try again."})}finally{h(!1)}},P=()=>g(!0),T=()=>g(!1),E=()=>y(!0),M=()=>y(!1);return e.jsxs(A,{title:"Magic Link Login",description:"Enter your email address and we'll send you a magic link to login.",children:[e.jsx(_,{title:"Magic Link Login",children:e.jsx("style",{dangerouslySetInnerHTML:{__html:`
2                            .react-tooltip {
3                                z-index: 99999 !important;
4                                opacity: 1 !important;
5                                font-size: 12px;
6                                padding: 4px 8px;
7                            }
8                            .enhanced-checkbox {
9                                border: 2px solid rgb(156 163 175) !important;
10                                border-radius: 4px;
11                            }
12                            .enhanced-checkbox[data-state="checked"] {
13                                background-color: hsl(142.1 76.2% 36.3%);
14                                border-color: hsl(142.1 76.2% 36.3%) !important;
15                            }
16                        `}})}),e.jsx(F,{id:"auth-tooltip"}),w&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 backdrop-blur-sm",children:e.jsx("div",{className:"relative max-w-4xl max-h-[80vh] overflow-y-auto",children:e.jsx(R,{onClose:T})})}),C&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 backdrop-blur-sm",children:e.jsx("div",{className:"relative max-w-4xl max-h-[80vh] overflow-y-auto",children:e.jsx(z,{onClose:M})})}),s&&e.jsx("div",{className:`mb-4 rounded-md p-4 ${s.type==="success"?"bg-green-50":"bg-red-50"}`,children:e.jsx("p",{className:`text-center text-sm font-medium ${s.type==="success"?"text-green-800":"text-red-800"}`,children:s.message})}),e.jsxs("form",{onSubmit:N,className:"space-y-6",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"email",children:"Email address"}),e.jsx(L,{id:"email",type:"email",name:"email",required:!0,autoComplete:"email",value:m,onChange:d=>u(d.target.value),placeholder:"[email protected]",autoFocus:!0,className:l.email?"border-red-300":"","data-tooltip-id":"auth-tooltip","data-tooltip-content":o[18]}),e.jsx(v,{message:l.email})]}),e.jsxs("div",{className:"flex items-start space-x-3 py-2",children:[e.jsx(q,{id:"agree_to_terms",name:"agree_to_terms",className:"enhanced-checkbox",required:!0,checked:n,onClick:()=>p(!n),tabIndex:2}),e.jsxs(k,{htmlFor:"agree_to_terms",className:"text-sm leading-normal",children:["I agree to the"," ",e.jsx("button",{type:"button",onClick:P,className:"text-primary text-yellow-400  hover:underline focus:outline-none focus:underline",tabIndex:3,"data-tooltip-id":"auth-tooltip","data-tooltip-content":o[4],children:"Terms and Conditions"})," ","and"," ",e.jsx("button",{type:"button",onClick:E,className:"text-primary text-yellow-400  hover:underline focus:outline-none focus:underline",tabIndex:4,"data-tooltip-id":"auth-tooltip","data-tooltip-content":o[5],children:"Privacy Policy"})]})]}),e.jsx(v,{message:l.agree_to_terms}),e.jsxs(I,{className:"w-full",disabled:x,tabIndex:5,"data-tooltip-id":"auth-tooltip","data-tooltip-content":o[19],children:[x&&e.jsx(G,{className:"h-4 w-4 animate-spin"}),"Send Magic Link"]}),e.jsxs("div",{className:"text-muted-foreground text-center text-sm",children:["Or, ",e.jsx(S,{href:route("login"),tabIndex:6,"data-tooltip-id":"auth-tooltip","data-tooltip-content":o[20],children:"log in with password"})]})]})]})}export{ie 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.