1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9101],{19101:function(e,t,n){n.r(t),n.d(t,{default:function(){return Z}});var a=n(85893),r=n(67294),i=n(5121),l=n(11163),s=n(16310),o=n(92806),c=n.n(o),u=n(58339),m=n.n(u),d=n(2545),h=n(31955),p=n(74902);function b(){return(0,a.jsx)(p.Wi,{type:"text",name:"firstName",label:"First name",placeholder:"First name",autoComplete:"First name"})}function x(){return(0,a.jsx)(p.Wi,{type:"text",name:"lastName",label:"Last name",placeholder:"Last name",autoComplete:"Last name"})}function f(){return(0,a.jsx)(p.Wi,{type:"email",name:"email",label:"Email",placeholder:"Email address",autoComplete:"email"})}function j(){return(0,a.jsx)(p.Wi,{type:"text",name:"jobTitle",label:"Job Title",placeholder:"Job title",autoComplete:"Job title"})}function y(){let e="Company website";return(0,a.jsx)(p.Wi,{type:"text",name:"domain",label:e,placeholder:e,autoComplete:"company",validate:function(t){if(!t)return e+" is required";let n="Please enter a valid "+e.toLowerCase();t.includes("://")||(t="https://"+t);try{let e=new URL(t);if(e&&!/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/gm.test(e.hostname))return n}catch(e){return n}}})}function v(){return(0,a.jsx)(p.Wi,{type:"tel",name:"phone",label:"Phone number",placeholder:"Phone number",autoComplete:"number"})}function w(){return(0,a.jsx)(p.Wi,{type:"tel",name:"phone",label:"Phone number (optional)",placeholder:"Phone number",autoComplete:"number"})}function g(){return(0,a.jsx)(p.Wi,{type:"textarea",name:"message",rows:"5",placeholder:"Your message here",label:"message"})}function q(){return(0,a.jsx)(p.Wi,{type:"checkbox",name:"confirm",label:"I agree to the <a tabIndex='0' target='_blank' rel='noopener noreferrer' href='/privacy-policy'>Privacy Policy</a>"})}function C(){return(0,a.jsx)("div",{id:"clientIDWrapper",className:"client-id-wrapper",tabIndex:"-1",children:(0,a.jsx)("input",{type:"text",id:"clientID",name:"clientID"})})}function Z(e){let{newBusinessTabText:t,generalTabText:n}=e,{contactFormSuccessTitle:o,contactFormSuccessText:u,contactFormFailureTitle:Z,contactFormFailureText:z,contactFormEmailTo:N,contactFormEmailFrom:_,contactFormEmailSubject:T,contactFormEmailText:A}=(0,d.O)(),[F,k]=(0,r.useState)(!1),[P,E]=(0,r.useState)(!1),[I,L]=(0,r.useState)(""),W=e=>{L(e)},S=(0,l.useRouter)(),J=()=>{k(!1),E(!1)};(0,r.useEffect)(()=>(S.events.on("routeChangeComplete",J),()=>S.events.off("routeChangeComplete",J)),[]);let $="^[0-9- -+]+$",D=(0,s.Ry)({firstName:(0,s.Z_)().required("First name is required"),lastName:(0,s.Z_)().required("Last name is required"),email:(0,s.Z_)().matches(/^[a-zA-Z0-9.!#$%&â*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$/,"Please enter a valid email").required("Email is required"),phone:(0,s.Z_)().matches($,"Please enter a valid phone number"),message:(0,s.Z_)().required("Message is required"),confirm:(0,s.O7)().oneOf([!0],"Field must be checked")});"newbiz"===I&&(D=D.shape({jobTitle:(0,s.Z_)().required("Job title is required"),domain:(0,s.Z_)().required("Company website is required"),phone:(0,s.Z_)().matches($,"Please enter a valid phone number").required("Phone number is required")}));let O=e=>{let t={text:"",html:""};return A&&(t.text+="".concat(A,"\n\n"),t.html+="<p>".concat(A,"</p>")),Object.entries(e).forEach(e=>{let[n,a]=e,r=m()(n);t.text+="".concat(r,"\n").concat(a,"\n\n"),t.html+="<p><strong>".concat(r,"</strong><br/>").concat(a,"</p>")}),t},R=()=>{document.querySelector(".contact").scrollIntoView(!0),window.scrollBy(0,-10)},V=async e=>{try{"general"===I&&(e.domain="",e.jobTitle=""),e.enquiryType=I;let{text:t,html:n}=O(c()(e,e=>"confirm"!==e)),{domain:a}=e;if(a){let t=a;t.includes("://")||(t="http://"+t);let n=new URL(t);n&&(e.domain=n.hostname)}await i.Z.post("https://twentysix-dev-hub-fa.azurewebsites.net/api/HubspotContactFunction?code=fckaQhm4wiVIvvv7NJ-rLMFXvqJG8CAXr07-fHLb6ftvAzFu-FTIVQ==",{enquiryType:I,subject:T,fields:e,emailText:t,emailHtml:n,hubSpotUserToken:h.Z.get("hubspotutk"),to:N,from:_}),R(),k(!0)}catch(e){console.log(e),R(),E(!0)}};return(0,r.useEffect)(()=>{F&&function(e){let{formID:t,formName:n}=e;dataLayer.push({event:"formSubmit",formID:t,formName:n})}({formID:"contact",formName:"Contact Form"})},[F]),(0,a.jsxs)("div",{className:"center-col",children:[F&&(0,a.jsxs)("div",{className:"contact-form__message",children:[(0,a.jsx)("h3",{className:"underline-white",children:o}),(0,a.jsx)(p.$E,{children:u})]}),P&&(0,a.jsxs)("div",{className:"contact-form__message",children:[(0,a.jsx)("h3",{className:"underline-white",children:Z}),(0,a.jsx)(p.$E,{children:z})]}),!F&&!P&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"radio-buttons col-sm-12 col-md-8",children:[(0,a.jsxs)("div",{className:"radio-button",children:[(0,a.jsx)("input",{type:"radio",id:"newbiz",name:"enquiryType",onClick:e=>W("newbiz")}),(0,a.jsx)("label",{"data-cursor-hover":!0,htmlFor:"newbiz",children:t})]}),(0,a.jsxs)("div",{className:"radio-button",children:[(0,a.jsx)("input",{type:"radio",id:"general",name:"enquiryType",onClick:e=>W("general")}),(0,a.jsx)("label",{"data-cursor-hover":!0,htmlFor:"general",children:n})]})]}),I&&(0,a.jsxs)(p.l0,{initialValues:{enquiryType:I,firstName:"",lastName:"",email:"",j
1obTitle:"",domain:"",phone:"",message:"",confirm:!1},validationSchema:D,onSubmit:V,name:"contact-us",buttonText:"Submit",id:"contact-us",children:[(0,a.jsx)(b,{}),(0,a.jsx)(x,{}),(0,a.jsx)(f,{}),"newbiz"===I?(0,a.jsx)(j,{}):null,"newbiz"===I?(0,a.jsx)(y,{}):null,"general"===I?(0,a.jsx)(w,{}):(0,a.jsx)(v,{}),(0,a.jsx)(g,{}),(0,a.jsx)(q,{}),(0,a.jsx)(C,{})]})]})]})}}}]);
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.