1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7568],{40373:(e,t,n)=>{n.d(t,{$:()=>c,i:()=>u});var r,a,l,s,i=n(87358);let o="true"===i.env.NEXT_PUBLIC_LOCAL||"1"===i.env.NEXT_PUBLIC_LOCAL,c={baseUrl:"https://dometrain.com",brandName:"Dometrain",companyName:"Elfoworks Ltd",email:{sales:"[email protected]",contact:"[email protected]"},isLocal:o,partnerPortalOrigins:o?["http://localhost:3001","https://partners.dometrain.com"]:["https://partners.dometrain.com"],apiBase:null!=(r=i.env.NEXT_PUBLIC_API_BASE)?r:o?"http://localhost:5148":"https://api.dometrain.com",apiBasePrivate:null!=(a=i.env.NEXT_PUBLIC_API_BASE_PRIVATE)?a:o?"http://localhost:5148/private":"https://api.dometrain.com/private",clerkPublishableKey:null!=(l=i.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY)?l:o?"pk_test_dG9wLWNpY2FkYS0xMS5jbGVyay5hY2NvdW50cy5kZXYk":"pk_live_Y2xlcmsuZG9tZXRyYWluLmNvbSQ",paddlePublishableKey:null!=(s=i.env.NEXT_PUBLIC_PADDLE_KEY)?s:"live_84ba487e2f8b72681d592dd5d62",turnstileSiteKey:"0x4AAAAAAB8HuNbtQuqvZHrw",muxDataEnvKey:"j429em5ihabf4d4ovep0b505e",trialChapterLimit:3,pricing:{yearly:"$499.99",b2bYearly:"$599.99",quarterly:"$164.99",yearlyByMonth:"$41.66",vssYearly:"$299.99",monthly:"$51.99",liteMonthly:"$14.99",liteYearly:"$143.99",liteYearlyByMonth:"$11.99"},productIds:{annualB2c:148305,annualB2b:1483051,monthly:1483050,quarterly:1483053,annualVss:1483055,standardTrial:0x1a8e3f7,standard:0x4948bc0,business:0x4763797,liteAnnual:0x11e1a301,liteMonthly:0x11e1a302,standardLite:0x11e1a303},interviewPacks:{productIds:{x1:0xbebc201,x10:0xbebc202,x25:0xbebc203}},interviewAllowance:{pro:5,lite:1},agentResetPacks:{productIds:{lite1:0x17d78401,lite3:0x17d78402,lite5:0x17d78403,pro1:0x17d78404,pro3:0x17d78405,pro5:0x17d78406},usdFallback:{lite:[{productId:0x17d78401,count:1,amount:"4.99"},{productId:0x17d78402,count:3,amount:"12.99"},{productId:0x17d78403,count:5,amount:"18.99"}],pro:[{productId:0x17d78404,count:1,amount:"9.99"},{productId:0x17d78405,count:3,amount:"25.99"},{productId:0x17d78406,count:5,amount:"37.99"}]}},featureFlags:{clerkAuthEnabled:!0,basketEnabled:!0,ascensionEnabled:!1}},u={engineerCount:75e3,engineerCountLong:"".concat(75e3.toLocaleString("en-US"),"+"),engineerCountShort:"".concat(Math.round(75),"K+"),companyCount:1e3,companyCountLong:"".concat(1e3.toLocaleString("en-US"),"+")}},97568:(e,t,n)=>{n.d(t,{default:()=>i});var r=n(22342),a=n(33670),l=n(40373);let s=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function i(){let[e,t]=(0,a.useState)(!1),[n,i]=(0,a.useState)(!1),[o,c]=(0,a.useState)(null),[u,d]=(0,a.useState)(""),[m,p]=(0,a.useState)(!1),h=(0,a.useRef)(null),w=(0,a.useRef)(!1),x=(0,a.useRef)(null),y=(0,a.useCallback)(()=>{null===x.current&&window.turnstile&&h.current&&(d(""),p(!0),x.current=window.turnstile.render(h.current,{sitekey:l.$.turnstileSiteKey,theme:"dark"}))},[]),v=(0,a.useCallback)(()=>{if(w.current)return;if(w.current=!0,d("Loading verification..."),window.turnstile)return void y();let e=document.createElement("script");e.src="https://challenges.cloudflare.com/turnstile/v0/api.js",e.async=!0,e.onload=y,document.head.appendChild(e)},[y]);(0,a.useEffect)(()=>()=>{if(null!==x.current&&window.turnstile){try{window.turnstile.remove(x.current)}catch(e){}x.current=null}},[]);let b=(0,a.useCallback)(async e=>{e.preventDefault(),c(null);let n=e.currentTarget,r=n.elements.namedItem("firstName").value.trim(),a=n.elements.namedItem("lastName").value.trim(),o=n.elements.namedItem("email").value.trim();if(!r||r.length<2)return void c("Please enter a valid first name");if(!a||a.length<2)return void c("Please enter a valid last name");if(!o||!s.test(o))return void c("Please enter a valid email address");let u=window.turnstile&&null!==x.current?window.turnstile.getResponse(x.current):null;if(!u)return void c("Please complete the verification");t(!0);try{let e=document.title.replace(" - Dometrain",""),t=await fetch("".concat(l.$.apiBasePrivate,"/api/marketing/newsletter"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({firstName:r,lastName:a,email:o,contentTitle:e,turnstileToken:u})}),n=await t.json();t.ok&&n.success?i(!0):(c(n.error||"Something went wrong. Please try again."),window.turnstile&&null!==x.current&&window.turnstile.reset(x.current))}catch(e){console.error("Newsletter signup error:",e),c("Something went wrong. Please try again."),window.turnstile&&null!==x.current&&window.turnstile.reset(x.current)}finally{t(!1)}},[]);return(0,r.jsx)("section",{id:"newsletter",className:"section",children:(0,r.jsx)("div",{className:"container",children:(0,r.jsx)("div",{className:"newsletter-col-parent",children:(0,r.jsxs)("div",{className:"newsletter-col",children:[(0,r.jsxs)("div",{className:"newsletter-content",children:[(0,r.jsx)("h2",{children:"Want to stay in the loop?"}),(0,r.jsx)("p",{children:"From time to time we might reach out to let you know about new courses or exclusive discounts. Sign up to our mailing list so you don't miss out!"}),(0,r.jsx)("p",{className:"newsletter-promise",children:"No spamming, pinky promise."})]}),(0,r.jsxs)("div",{className:"newsletter-form-wrapper",children:[!n&&(0,r.jsxs)("form",{className:"newsletter-form",onSubmit:b,children:[(0,r.jsxs)("div",{className:"newsletter-name-row",children:[(0,r.jsx)("input",{type:"text",placeholder:"First name",name:"firstName",onFocus:v,required:!0}),(0,r.jsx)("input",{type:"text",placeholder:"Last name",name:"lastName",onFocus:v,required:!0})]}),(0,r.jsx)("input",{type:"email",placeholder:"Email address",name:"email",className:"newsletter-email-input",onFocus:v,required:!0}),(0,r.jsxs)("div",{className:"newsletter-turnstile-container",style:{display:u||m?"flex":"none"},children:[!m&&(0,r.jsx)("div",{style:{minHeight:"65px",display:"flex",alignItems:"center",justifyContent:"center",color:"#888",fontSize:"14px"},children:u}),(0,r.jsx)("div",{ref:h,style:{display:m?"block":"none"}})]}),(0,r.jsx)("button",{type:"submit",className:"newsletter-submit-btn",disabled:e,children:e?(0,r.jsx)("span",{className:"newsletter-loading"}):"Subscribe"}),o&&(0,r.jsx)("div",{className:"newsletter-message newsletter-error",children:o})]}),n&&(0,r.jsx)("div",{className:"newsletter-message newsletter-success",children:(0,r.jsx)("p",{children:"Thank y
1ou for subscribing! You're now part of the Dometrain community."})})]})]})})})})}}}]);
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.