PageSourceSearch

https://uttarakhandtourism.gov.in/build/assets/Login-B3Lv0C7d.js

js uttarakhandtourism.gov.in collected 2026-10-02 06:29:31 UTC 3,359 bytes, 1 lines download raw bytes

1import{G as N,r as l,j as e,S as C}from"./app-Ha4X7SlF.js";import{I as i}from"./InputError-Do4kQPnM.js";import{I as d}from"./InputLabel-D410np7F.js";import{P as y}from"./PrimaryButton-Bjn3n3t2.js";import{T as m}from"./TextInput-YH4SiJD7.js";import{G as k}from"./GuestLayout-hy9_L9an.js";function B({status:h,canResetPassword:S}){const{data:r,setData:o,post:f,processing:g,errors:p}=N({email:"",password:"",remember:!1,captcha:""}),[j,a]=l.useState(),[c,b]=l.useState(""),u=async()=>{const t="ABCDEFGHJKLMNPQRSTUVWXYZ23456789";let s="";const x=t.length;for(let n=0;n<6;n++)s+=t.charAt(Math.floor(Math.random()*x));b(s)};l.useEffect(()=>{u()},[]);const v=async t=>{if(t.preventDefault(),r.captcha)if(r.captcha!=c){a("Captcha did not match");return}else a("");else{a("Please enter captcha to proceed");return}try{f(route("login"),{})}catch(s){console.error("Login error:",s),a("An error occurred. Please try again.")}},w=t=>{const s=t.toUpperCase().slice(0,6);/\s/.test(s)||/[0O]/.test(s)||(a(s?"":"Please enter the captcha to proceed"),o("captcha",s))};return e.jsxs(k,{children:[e.jsx(C,{title:"Login"}),h&&e.jsx("div",{className:"mb-4 font-medium text-sm text-green-600",children:h}),e.jsxs("form",{onSubmit:v,children:[e.jsxs("div",{children:[e.jsx(d,{htmlFor:"email",value:"Email",className:"block text-xs mb-1"}),e.jsx(m,{id:"email",name:"email",value:r.email,className:"w-full border rounded p-2 outline-none focus:shadow-outline",type:"text",isFocused:!0,onChange:t=>o("email",t.target.value)}),e.jsx(i,{message:p.email,className:"mt-2"})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx(d,{htmlFor:"password",value:"Password",className:"block text-xs mb-1"}),e.jsx("div",{className:"relative",children:e.jsx(m,{id:"password",type:"text",style:{WebkitTextSecurity:"disc"},name:"password",value:r.password,className:"w-full border rounded p-2 outline-none focus:shadow-outline",autoComplete:"current-password",onChange:t=>o("password",t.target.value)})}),e.jsx(i,{message:p.password,className:"mt-2"})]}),e.jsxs("div",{className:"mt-4",children:[e.jsx(d,{htmlFor:"captcha",value:"Captcha",className:"block text-xs mb-1"}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(m,{id:"text",type:"text",name:"Captcha",value:r.captcha,className:"w-1/2 border rounded p-2 outline-none focus:shadow-outline",onChange:t=>w(t.target.value)}),e.jsxs("div",{className:"captch_box col-md-6",children:[e.jsx("input",{id:"generatedCaptcha",type:"text",className:"generatedCaptcha",name:"box",disabled:!0,value:c}),e.jsx("input",{type:"hidden",id:"storedData",name:"storedData",value:c})]}),e.jsx("span",{onClick:()=>u(),className:"p-2 bg-gray-800  transition cursor-pointer refreshBtn",style:{height:"42px",borderTopRightRadius:"4px",borderBottomRightRadius:"4px"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2",children:e.jsx("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 4v5h5M19 19v-5h-5M5 13a7 7 0 0 0 9.9 5M19 11a7 7 0 0 0-9.9-5"})})})]}),e.jsx(i,{message:j,className:"mt-2"})]}),e.jsx("div",{className:"flex items-center justify-start mt-4",children:e.jsx(y,{className:"bg-theme hover:bg-theme-dark text-white uppercase text-sm font-semibold px-4 py-2 rounded",disabled:g,children:"Login"})})]})]})}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.