Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Login-e34ba178.js

import{r as M,T as $,q as H,R as j,G as B,c as n,a as e,e as d,f as u,u as o,t as i,k as _,g as F,n as b,b as h,K as g,o as c,l as y,j as z}from"./app-43851608.js";import{_ as k}from"./FormInput-4a309017.js";import{u as N,a as L}from"./ReCaptcha-55f58cbf.js";import{l as R}from"./index-99011d5f.js";const S={class:"flex h-screen justify-center"},q={class:"flex justify-center"},T={class:"w-[20em] mt-40"},U={class:"flex justify-center mb-5"},Z=["src","alt"],D={key:1,class:"text-2xl mb-2"},E={class:"text-2xl text-center"},K={class:"text-center text-sm text-slate-500"},P={class:"mt-5 space-y-4"},G={key:0,class:"form-error text-[#b91c1c] text-xs"},O={class:"flex items-center justify-between mt-5"},Q={class:"flex items-start"},I=e("div",{class:"flex items-center h-5"},[e("input",{id:"remember","aria-describedby":"remember",type:"checkbox",class:"w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-primary-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-primary-600 dark:ring-offset-gray-800"})],-1),J={class:"ml-3 text-sm"},W={for:"remember",class:"text-gray-500 dark:text-gray-300"},X={class:"mt-6"},Y={key:0,type:"submit",class:"rounded-md bg-primary px-3 py-3 text-sm text-white shadow-sm w-full"},ee={key:1,type:"button",class:"rounded-md bg-primary px-3 py-3 text-sm text-white shadow-sm w-full flex justify-center"},te=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"}),e("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[e("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})])],-1),ae=[te],se={key:0,class:"flex justify-center my-6"},oe={class:"text-sm text-gray-500 px-4 text-center"},re={class:"flex justify-center gap-4"},ne={key:0,href:"/social-login/facebook",class:"border rounded-full p-2 cursor-pointer"},ie=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 256 256"},[e("path",{fill:"#1877F2",d:"M256 128C256 57.308 198.692 0 128 0C57.308 0 0 57.307 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.347-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.958 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445"}),e("path",{fill:"#FFF",d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A128.959 128.959 0 0 0 128 256a128.9 128.9 0 0 0 20-1.555V165h29.825"})],-1),ce=[ie],le={key:1,href:"/social-login/google",class:"border rounded-full p-2 cursor-pointer"},de=z('<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 128 128"><path fill="#fff" d="M44.59 4.21a63.28 63.28 0 0 0 4.33 120.9a67.6 67.6 0 0 0 32.36.35a57.13 57.13 0 0 0 25.9-13.46a57.44 57.44 0 0 0 16-26.26a74.33 74.33 0 0 0 1.61-33.58H65.27v24.69h34.47a29.72 29.72 0 0 1-12.66 19.52a36.16 36.16 0 0 1-13.93 5.5a41.29 41.29 0 0 1-15.1 0A37.16 37.16 0 0 1 44 95.74a39.3 39.3 0 0 1-14.5-19.42a38.31 38.31 0 0 1 0-24.63a39.25 39.25 0 0 1 9.18-14.91A37.17 37.17 0 0 1 76.13 27a34.28 34.28 0 0 1 13.64 8q5.83-5.8 11.64-11.63c2-2.09 4.18-4.08 6.15-6.22A61.22 61.22 0 0 0 87.2 4.59a64 64 0 0 0-42.61-.38z"></path><path fill="#e33629" d="M44.59 4.21a64 64 0 0 1 42.61.37a61.22 61.22 0 0 1 20.35 12.62c-2 2.14-4.11 4.14-6.15 6.22Q95.58 29.23 89.77 35a34.28 34.28 0 0 0-13.64-8a37.17 37.17 0 0 0-37.46 9.74a39.25 39.25 0 0 0-9.18 14.91L8.76 35.6A63.53 63.53 0 0 1 44.59 4.21z"></path><path fill="#f8bd00" d="M3.26 51.5a62.93 62.93 0 0 1 5.5-15.9l20.73 16.09a38.31 38.31 0 0 0 0 24.63q-10.36 8-20.73 16.08a63.33 63.33 0 0 1-5.5-40.9z"></path><path fill="#587dbd" d="M65.27 52.15h59.52a74.33 74.33 0 0 1-1.61 33.58a57.44 57.44 0 0 1-16 26.26c-6.69-5.22-13.41-10.4-20.1-15.62a29.72 29.72 0 0 0 12.66-19.54H65.27c-.01-8.22 0-16.45 0-24.68z"></path><path fill="#319f43" d="M8.75 92.4q10.37-8 20.73-16.08A39.3 39.3 0 0 0 44 95.74a37.16 37.16 0 0 0 14.08 6.08a41.29 41.29 0 0 0 15.1 0a36.16 36.16 0 0 0 13.93-5.5c6.69 5.22 13.41 10.4 20.1 15.62a57.13 57.13 0 0 1-25.9 13.47a67.6 67.6 0 0 1-32.36-.35a63 63 0 0 1-23-11.59A63.73 63.73 0 0 1 8.75 92.4z"></path></svg>',1),me=[de],_e={__name:"Login",props:["flash","config","companyConfig"],setup(C){const r=C,f=M(!1),s=$({email:null,password:null,recaptcha_response:null}),l=t=>{const a=r.config.find(m=>m.key===t);return a?a.value:""},V=async t=>{if(f.value=!0,l("recaptcha_active")==="1"){const a=await A();s.recaptcha_response=a}s.post("/login",{onSuccess:()=>s.reset(),onFinish:()=>{f.value=!1}})},A=()=>new Promise(t=>{grecaptcha.ready(()=>{grecaptcha.execute(l("recaptcha_site_key"),{action:"submit"}).then(a=>{t(a)})})});return H(()=>{l("recaptcha_active")==="1"&&N(l("recaptcha_site_key"))}),j(()=>{L(l("recaptcha_site_key"))}),B(()=>[g().props.flash,{deep:!0}],()=>{g().props.flash.status!=null&&R(g().props.flash.status.message,{autoClose:3e3})}),(t,a)=>{var m,w,x,v;return c(),n("div",S,[e("div",q,[e("div",T,[e("div",U,[d(o(y),{href:"/"},{default:u(()=>[r.companyConfig.logo?(c(),n("img",{key:0,class:"max-w-[180px]",src:"/media/"+r.companyConfig.logo,alt:r.companyConfig.company_name},null,8,Z)):(c(),n("h4",D,i(r.companyConfig.company_name),1))]),_:1})]),e("h1",E,i(t.$t("Login to your account")),1),e("div",K,[_(i(t.$t("Don't have an account?"))+" ",1),d(o(y),{href:"signup",class:"text-sm text-primary-600 dark:text-primary-500 border-b hover:border-gray-500"},{default:u(()=>[_(i(t.$t("Create one here")),1)]),_:1})]),e("form",{onSubmit:a[2]||(a[2]=F(p=>V(),["prevent"])),class:"mt-5"},[e("div",P,[d(k,{modelValue:o(s).email,"onUpdate:modelValue":a[0]||(a[0]=p=>o(s).email=p),name:t.$t("Email"),error:o(s).errors.email,type:"email",class:b("col-span-3")},null,8,["modelValue","name","error"]),d(k,{modelValue:o(s).password,"onUpdate:modelValue":a[1]||(a[1]=p=>o(s).password=p),name:t.$t("Password"),error:o(s).errors.password,type:"password",class:b("col-span-3")},null,8,["modelValue","name","error"]),o(s).errors.recaptcha_response?(c(),n("div",G,i(o(s).errors.recaptcha_response),1)):h("",!0)]),e("div",O,[e("div",Q,[I,e("div",J,[e("label",W,i(t.$t("Remember me")),1)])]),d(o(y),{href:"/forgot-password",class:"text-sm text-primary-600 dark:text-primary-500 border-b hover:border-gray-500"},{default:u(()=>[_(i(t.$t("Forgot password?")),1)]),_:1})]),e("div",X,[f.value?(c(),n("button",ee,ae)):(c(),n("button",Y,i(t.$t("Login to your account")),1))])],32),((m=r.companyConfig)==null?void 0:m.allow_facebook_login)==="1"||((w=r.companyConfig)==null?void 0:w.allow_google_login)==="1"?(c(),n("div",se,[e("span",oe,i(t.$t("Or continue with")),1)])):h("",!0),e("div",re,[((x=r.companyConfig)==null?void 0:x.allow_facebook_login)==="1"?(c(),n("a",ne,ce)):h("",!0),((v=r.companyConfig)==null?void 0:v.allow_google_login)==="1"?(c(),n("a",le,me)):h("",!0)])])])])}}};export{_e as default};