1import{N as F,aS as H,s as x,aC as P,t as y,aK as l,bH as c,J as d,w as t,v as n,u as i,bi as o,b9 as v,bM as h,I as g,at as p,F as A,aV as j}from"./runtime-dom.esm-bundler-DpfbrSka.js";import{_ as L}from"./Checkbox.vue_vue_type_script_setup_true_lang-B4uJzaxn.js";import{G as E}from"./GuestLayout-l4hfjIB-.js";import{_ as w,a as k,b as C}from"./TextInput.vue_vue_type_script_setup_true_lang-Bh0pCrIG.js";import{P as N}from"./PrimaryButton-C-sLvDxr.js";import{h as R,f as S,a as _,i as $,l as V}from"./useCurrency-Cr94BVzg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const D={key:0,class:"mb-4 text-sm font-medium text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/30 p-3 rounded-lg border border-green-200 dark:border-green-800"},G={class:"mt-4"},q={class:"mt-4 block"},U={class:"flex items-center"},I={class:"mt-4 flex items-center justify-between"},J={class:"flex items-center gap-4"},K={key:0,class:"relative my-6"},O=["href"],T=["href"],Q=["href"],W={key:2,class:"mt-6 bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 p-4 shadow-sm"},X={class:"grid grid-cols-2 gap-2 mb-3"},Y=["onClick"],Z={class:"flex items-center gap-1.5 truncate"},ee=["title"],ie=F({__name:"Login",props:{canResetPassword:{type:Boolean},status:{}},setup(f){const s=R({email:"",password:"",remember:!1}),B=()=>{s.post(route("login"),{onFinish:()=>{s.reset("password")}})},b=H([]),M=S(),u=x(()=>M.props.external_auth||{}),m=x(()=>{let a=0;return u.value.google_enabled&&a++,u.value.facebook_enabled&&a++,u.value.github_enabled&&a++,a}),z=a=>{s.email=a.username,s.password=a.password_plain};return P(async()=>{try{if(((await _.get("/api/v1/public/settings")).data?.data?.active_modules||[]).some(r=>r.toLowerCase().includes("demo"))){const r=await _.get("/api/v1/admin/demo-builder/public-accounts?role=customer");r.data?.success&&r.data?.data&&(b.value=r.data.data)}}catch{}}),(a,e)=>(l(),y(E,null,{default:c(()=>[d(o($),{title:"Log in"}),e[15]||(e[15]=t("div",{class:"mb-8 text-center"},[t("h2",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"Sign in to your account"),t("p",{class:"mt-2 text-sm text-gray-600 dark:text-gray-400"},"Enter your credentials to access your dashboard")],-1)),f.status?(l(),n("div",D,v(f.status),1)):i("",!0),t("form",{onSubmit:h(B,["prevent"])},[t("div",null,[d(w,{for:"email",value:"Email address *"}),d(k,{id:"email",type:"email",class:"mt-1 block w-full",modelValue:o(s).email,"onUpdate:modelValue":e[0]||(e[0]=r=>o(s).email=r),required:"",autofocus:"",autocomplete:"username",placeholder:"Email address"},null,8,["modelValue"]),d(C,{class:"mt-2",message:o(s).errors.email},null,8,["message"])]),t("div",G,[d(w,{for:"password",value:"Password *"}),d(k,{id:"password",type:"password",class:"mt-1 block w-full",modelValue:o(s).password,"onUpdate:modelValue":e[1]||(e[1]=r=>o(s).password=r),required:"",autocomplete:"current-password",placeholder:"Password"},null,8,["modelValue"]),d(C,{class:"mt-2",message:o(s).errors.password},null,8,["message"])]),t("div",q,[t("label",U,[d(L,{name:"remember",checked:o(s).remember,"onUpdate:checked":e[2]||(e[2]=r=>o(s).remember=r)},null,8,["checked"]),e[3]||(e[3]=t("span",{class:"ms-2 text-sm text-gray-600 dark:text-gray-400"},"Remember me",-1))])]),t("div",I,[d(o(V),{href:a.route("register"),class:"rounded-md text-sm text-gray-600 dark:text-gray-400 underline hover:text-gray-900 dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"},{default:c(()=>[...e[4]||(e[4]=[g(" Create an account ",-1)])]),_:1},8,["href"]),t("div",J,[f.canResetPassword?(l(),y(o(V),{key:0,href:a.route("password.request"),class:"rounded-md text-sm text-gray-600 dark:text-gray-400 underline hover:text-gray-900 dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"},{default:c(()=>[...e[5]||(e[5]=[g(" Forgot password? ",-1)])]),_:1},8,["href"])):i("",!0),d(N,{class:p({"opacity-25":o(s).processing}),disabled:o(s).processing},{default:c(()=>[...e[6]||(e[6]=[g(" Log in ",-1)])]),_:1},8,["class","disabled"])])]),m.value>0?(l(),n("div",K,[...e[7]||(e[7]=[t("div",{class:"absolute inset-0 flex items-center","aria-hidden":"true"},[t("div",{class:"w-full border-t border-gray-200 dark:border-gray-700"})],-1),t("div",{class:"relative flex justify-center text-xs"},[t("span",{class:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400"},"Or continue with")],-1)])])):i("",!0),m.value>0?(l(),n("div",{key:1,class:p(["grid gap-3 mb-6",m.value===3?"grid-cols-3":m.value===2?"grid-cols-2":"grid-cols-1"])},[u.value.google_enabled?(l(),n("a",{key:0,href:a.route("external-auth.redirect","google"),class:"flex items-center justify-center gap-2 px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-xl bg-white dark:bg-gray-800 text-xs font-semibold text-gray-900 dark:text-white hover:bg-gray-50 dark:hover:bg-gray-700/50 shadow-sm transition-all duration-200 cursor-pointer"},[...e[8]||(e[8]=[t("svg",{class:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),t("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),t("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z",fill:"#FBBC05"}),t("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})],-1),g(" Google ",-1)])],8,O)):i("",!0),u.value.facebook_enabled?(l(),n("a",{key:1,href:a.route("external-auth.redirect","facebook"),class:"flex items-center justify-center gap-2 px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-xl bg-white dark:bg-gray-800 text-xs font-semibold text-gray-900 dark:text-white hover:bg-gray-50 dark:hover:bg-gray-700/50 shadow-sm transition-all duration-200 cursor-pointer"},[...e[9]||(e[9]=[t("svg",{class:"w-4 h-4 text-[#1877F2]",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})],-1),g(" Facebook ",-1)])],8,T)):i("",!0),u.value.github_enabled?(l(),n("a",{key:2,href:a.route("external-auth.redirect","github"),class:"flex items-center justify-center gap-2 px-3 py-2 border border-gray-300 dark:border-gray-700 rounded-xl bg-white dark:bg-gray-800 text-xs font-semibold text-gray-900 dark:text-white hover:bg-gray-50 dark:hover:bg-gray-700/50 shadow-sm transition-all duration-200 cursor-pointer"}
1,[...e[10]||(e[10]=[t("svg",{class:"w-4 h-4 text-gray-850 dark:text-gray-200",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.603-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.464-1.11-1.464-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.831.092-.646.35-1.086.636-1.336-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.579.688.481C19.138 20.162 22 16.418 22 12c0-5.523-4.477-10-10-10z"})],-1),g(" GitHub ",-1)])],8,Q)):i("",!0)],2)):i("",!0),b.value.length>0?(l(),n("div",W,[e[13]||(e[13]=t("h3",{class:"text-sm font-semibold text-gray-900 dark:text-white text-center mb-4"},"Select Demo Account",-1)),t("div",X,[(l(!0),n(A,null,j(b.value,r=>(l(),n("button",{key:r.id,onClick:h(te=>z(r),["prevent"]),type:"button",class:p(["flex items-center justify-between gap-1 px-2 py-1.5 border rounded-lg transition-all focus:outline-none overflow-hidden cursor-pointer",o(s).email===r.username?"border-indigo-500 ring-1 ring-indigo-500 bg-indigo-50 dark:bg-indigo-900/30":"border-gray-200 dark:border-gray-600 hover:border-indigo-400 dark:hover:border-indigo-500 bg-gray-50 dark:bg-gray-900"])},[t("div",Z,[e[11]||(e[11]=t("svg",{class:"w-3.5 h-3.5 text-gray-700 dark:text-gray-300 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[t("path",{"fill-rule":"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z","clip-rule":"evenodd"})],-1)),t("span",{class:"text-[11px] font-medium text-gray-900 dark:text-white truncate",title:r.role_name},v(r.role_name),9,ee)]),e[12]||(e[12]=t("span",{class:"text-[9px] px-1.5 py-0.5 rounded flex-shrink-0 bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300"},"Customer",-1))],10,Y))),128))]),e[14]||(e[14]=t("p",{class:"text-[10px] text-center text-gray-500 dark:text-gray-400 mt-2 italic leading-tight"}," Customer accounts for testing front-end features and checkout flow. ",-1))])):i("",!0)],32)]),_:1}))}});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.