PageSourceSearch

https://app.improvmx.com/assets/Validate-CmPK1gMc.js

js improvmx.com collected 2026-10-03 21:44:12 UTC 6,023 bytes, 1 lines download raw bytes

1import{g as k,u as _,a as b,r as o,j as e,E as y,h as A,b as C}from"./index-CucNpGkM.js";import{c as f}from"./countries-C3b-vYnn.js";import{L as S}from"./Logo-0lphPuPF.js";function E(){const l=navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language],i=r=>r&&f.some(n=>n.code===r.toUpperCase());for(const r of l)try{const n=new Intl.Locale(r).region;if(i(n))return n.toUpperCase()}catch{}for(const r of l)try{const n=new Intl.Locale(r).maximize().region;if(i(n))return n.toUpperCase()}catch{}return null}function U(){const{token:l}=k(),i=_(),r=b(),[n,c]=o.useState({company_name:null,timezone:null,country:null}),[d,x]=o.useState(!1),[s,p]=o.useState({accept:!1,newsletter:!1}),[h,g]=o.useState(null),[m]=o.useState({company_name:null,country:null}),v=t=>{const a={email:t.email,company_name:t.company_name,company_details:t.company_details,country:t.country};"company_vat"in t&&(a.company_vat=t.company_vat),"billing_email"in t&&(a.billing_email=t.billing_email),c(a)};o.useEffect(()=>{v(r)},[r]),o.useEffect(()=>{const t=document.createElement("script");if(t.setAttribute("src","https://challenges.cloudflare.com/turnstile/v0/api.js"),document.body.appendChild(t),!b.getState().country){const a=E();a&&c(u=>({...u,country:a}))}},[]);const j=()=>y.getEnv()===y.PROD,w=t=>{t.preventDefault(),x(!0),g(null),N()},N=()=>{const t={...s,turnstile_challenge:window.turnstile.getResponse(),company_name:n.company_name,country:n.country};A.post("account/validate/"+l,t).then(a=>{r.connect(a.body.token),i(C("dashboard",null,{emailValidated:1}))},a=>{let u="An error occured. Please contact us.";a.body.errors&&(u=a.body.errors[Object.keys(a.body.errors)[0]][0]),g(u),x(!1)})};return e.jsxs("div",{children:[e.jsx(S,{}),e.jsxs("div",{className:"relative mx-auto mt-12 mb-16 w-full max-w-lg px-16 pt-8 pb-16 bg-imx-white rounded-lg shadow-imx-box",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-center text-imx-black text-2xl font-medium mb-4 mt-8",children:"Account Information"}),e.jsxs("form",{className:"text-left mt-10",onSubmit:w,children:[e.jsx("label",{className:"block mb-[5px] text-[14px] tracking-[1px] font-semibold text-imx-grey-dark",children:"Full Name"}),e.jsx("input",{className:"w-full block mb-9 h-12 rounded border border-imx-grey-light px-4 outline-none text-imx-black bg-imx-white appearance-none transition-colors duration-300 hover:border-imx-grey-medium focus:border-imx-blue-light",value:n.company_name||"",onChange:t=>c({...n,company_name:t.target.value}),required:!0}),m.company_name&&e.jsx("p",{className:"text-imx-red text-sm -mt-6 mb-9",children:m.company_name[0]}),e.jsx("label",{className:"block mb-[5px] text-[14px] tracking-[1px] font-semibold text-imx-grey-dark",children:"Country"}),e.jsxs("div",{className:"relative mb-9",children:[e.jsxs("select",{value:n.country||"",onChange:t=>c({...n,country:t.target.value}),required:!0,className:"w-full block h-12 rounded border border-imx-grey-light px-4 outline-none text-imx-black bg-imx-white appearance-none transition-colors duration-300 hover:border-imx-grey-medium focus:border-imx-blue-light",children:[e.jsx("option",{disabled:!0,value:"",children:"Select your country"}),e.jsxs("optgroup",{label:"Most popular",children:[e.jsx("option",{value:"US",children:"United States"}),e.jsx("option",{value:"CA",children:"Canada"}),e.jsx("option",{value:"GB",children:"United Kingdom"}),e.jsx("option",{value:"FR",children:"France"}),e.jsx("option",{value:"DE",children:"Germany"}),e.jsx("option",{value:"IN",children:"India"})]}),e.jsx("optgroup",{label:"All countries",children:f.map(t=>e.jsx("option",{value:t.code,children:t.value},t.code))})]}),e.jsx("div",{className:"absolute right-4 top-3 pointer-events-none text-imx-black",children:"▾"})]}),m.country&&e.jsx("p",{className:"text-imx-red text-sm -mt-6 mb-9",children:m.country[0]}),e.jsx("div",{className:"mt-5",children:e.jsxs("label",{className:"flex items-start text-base font-normal cursor-pointer",children:[e.jsx("input",{type:"checkbox",name:"accept",value:"true",checked:s.accept,onChange:t=>p({...s,accept:t.target.checked}),required:!0,className:"mr-3 self-center"}),e.jsxs("span",{children:["I accept the"," ",e.jsx("a",{href:"https://improvmx.com/terms-of-service/",target:"_blank",className:"text-imx-blue-light hover:underline",children:"Terms"})," ","and"," ",e.jsx("a",{href:"https://improvmx.com/privacy-policy/",target:"_blank",className:"text-imx-blue-light hover:underline",children:"Privacy Policy"}),"."]})]})}),e.jsx("div",{className:"mt-5",children:e.jsxs("label",{className:"flex items-start text-base font-normal cursor-pointer",children:[e.jsx("input",{type:"checkbox",name:"newsletter",value:"true",checked:s.newsletter,onChange:t=>p({...s,newsletter:t.target.checked}),className:"mr-3 self-center"}),e.jsx("span",{children:"I want new feature updates by email"})]})}),e.jsx("div",{className:"cf-turnstile text-center mt-5","data-sitekey":j()?"0x4AAAAAAA9ANct9BHe6n3Zj":"1x00000000000000000000BB","data-appearance":"always"}),h&&e.jsx("p",{className:"text-imx-red text-sm mt-4",children:h}),n.company_name&&n.country&&s.accept?e.jsx("button",{type:"submit",disabled:d,className:`w-full mt-5 h-14 px-6 rounded border-none text-imx-white cursor-pointer outline-none transition-all duration-300 font-semibold ${d?"bg-imx-grey-light-medium cursor-wait":"bg-imx-green hover:bg-imx-green-darker"}`,children:"Continue"}):e.jsx("button",{className:"w-full mt-5 h-14 px-6 rounded border-none bg-imx-grey-light-medium text-imx-white cursor-pointer outline-none font-semibold",children:"Continue"})]})]}),e.jsxs("div",{className:"text-[14px] leading-[20px] w-full max-w-lg mx-auto mt-[30px] text-center text-imx-grey-medium",children:["Your privacy is important to us and we fully comply with GDPR."," ",e.jsx("a",{className:"text-imx-blue-light hover:underline",href:"https://improvmx.com/transparency/are-you-selling-my-information/",target:"_blank",children:"We do not sell your information."})]})]})]})}export{U 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.