PageSourceSearch

https://www.geotab.com/static/js/components-TruckingDemoForm.401c989ea312ab522705.js

js geotab.com collected 2026-10-09 21:56:30 UTC 13,695 bytes, 2 lines download raw bytes

1"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([[748,7631],{81457(e,t,r){r.r(t),r.d(t,{default:()=>M});var o=r(45677),a=r(91872),n=r(31365),l=r(54097),i=r(8504),c=r(78390),s=r(32340),d=r(41118),m=r(46260),u=r(12530),h=r(60562),p=r(83814),g=r(62247),f=r(93410),b=r(18834),y=r(23585),_=r(90336),v=r(37644),A=r(42152),F=r(73296),C=r(21385),k=r(28908),P=r(23617),T=r(50972),Y=r(5624),w=r(39484),S=r(18673),x=r(67867),j=r(30474),$=r(69915),z=r(63312),L=r(5760),B=r(47208);const D=[z.m.Country];var q={name:"11g6mpt",styles:"justify-content:flex-start"},R={name:"11g6mpt",styles:"justify-content:flex-start"};function M({params:e,sectionSpacing:t}){const r={first_name:"",last_name:"",company:"",Title__c:"",Title:"",load:"",fleet_size:"",email:(0,L.XE)(e,"cta-email")||"",phone:"",country:"",state:"",city:"",opt_in:!1},[z]=(0,c.fp)(s.dz),[M,E]=(0,v.K)(r),N=(0,o.useContext)(h.V),{selectedLanguageTranslation:K}=(0,g.B)(),O=(0,L.XE)(e,"html-form-id")||"",{recaptchaSiteKey:I}=(0,_.a)(),{enableRecaptcha:V,getToken:U}=(0,b.V)(I),[W,G]=(0,o.useState)(!1),[H]=(0,y.b)(D),[J]=(0,c.fp)(s.A4),Q=(0,o.useMemo)(()=>(0,f.s)(K,"truckingDemoForm"),[K]),X=(0,o.useMemo)(()=>(0,f.s)(K,"formPlaceholders"),[K]),[Z,ee,te,re]=(0,w.Y)(M.country),[oe,ae,ne,le]=(0,x.x)(M.Title__c);function ie(e,t){const r=(0,S.kv)(e,t,[S.$y,S.$8]);E(e=>({...e,...r}))}return(0,B.Y)(B.FK,{children:(0,B.Y)(a.A,{css:i.s.bannerContainer(j),children:(0,B.FD)(l.E,{"data-testid":"TruckingDemoFormTestID",sectionSpacing:t,children:[(0,B.Y)(a.A,{css:i.s.headingMargin,size:{sm:12},children:(0,B.Y)(A.D,{variant:"h2",color:"inversePrimary",align:"center",children:Q.title})}),(0,B.Y)(a.A,{css:i.s.headingMargin,size:{sm:12},children:(0,B.Y)(F.E,{color:"inversePrimary",align:"center",children:Q.subTitle})}),(0,B.Y)("form",{method:"POST",id:O,onSubmit:t=>{(async function(t){t.preventDefault(),G(!0);try{const t=await U();if(!t)throw new Error("Recaptcha validation failed. Please try again.");const{formService:r,marketoFormId:o,marketoInstance:a}=(0,L.eG)(e,M,{allowAutoRoute:!0});await(0,u.j)(r,"generic-lead-form",M,t,o,a),(0,d.RS)("",z,"trucking_demo_form",M)}catch(r){const e=r instanceof Error?r.message:r;N.show(e,"error"),G(!1)}})(t).catch(e=>(0,$.vV)(e,"submitting trucking demo form"))},children:(0,B.FD)(l.s,{breakSpaceValue:2,css:q,children:[(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(C.p,{required:!0,name:"first_name",placeholder:X.firstNamePlaceholder,id:"first-name",value:M.first_name,onFocus:V,onChange:e=>ie("first_name",e.target.value),label:Q.formField.firstName,...T.P})}),(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(C.p,{required:!0,name:"last_name",placeholder:X.lastNamePlaceholder,id:"last-name",value:M.last_name,onFocus:V,onChange:e=>ie("last_name",e.target.value),label:Q.formField.lastName,...T.P})}),(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(C.p,{required:!0,name:"company",placeholder:X.companyPlaceholder,id:"company",value:M.company,onFocus:V,onChange:e=>ie("company",e.target.value),label:Q.formField.company,...T.P})}),(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(k.l,{required:!0,...ae,...T.P,native:J,options:le,value:M.Title__c,onChange:e=>ie("Title__c",e),onFocus:V})}),oe?(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(C.p,{required:!0,...ne,onFocus:V,onChange:e=>ie("Title",e.target.value),value:M.Title,...T.P})}):null,(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(C.p,{required:!0,name:"load",placeholder:X.cargoPlaceholder,id:"load",value:M.load,onFocus:V,onChange:e=>ie("load",e.target.value),label:Q.formField.load,...T.P})}),(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(k.l,{id:"fleet-size",label:Q.formField.selectFleetSize,...T.P,placeholder:X.fleetPlaceholder,name:"fleet_size",required:!0,native:J,options:(0,m.getFleetSizeOptions)(z),value:M.fleet_size,onChange:e=>ie("fleet_size",e),onFocus:V})}),(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(C.p,{required:!0,name:"email",type:"email",placeholder:X.emailPlaceholder,id:"email",value:M.email,onFocus:V,onChange:e=>ie("email",e.target.value),label:Q.formField.email,...T.P})}),(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(C.p,{required:!0,name:"phone",id:"phone",type:"tel",placeholder:X.phonePlaceholder,value:M.phone,onFocus:V,onChange:e=>ie("phone",e.target.value),label:Q.formField.phone,...T.P})}),(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(k.l,{id:"country",label:Q.formField.selectCountry,...T.P,placeholder:X.countryPlaceholder,name:"country",required:!0,native:J,options:H,value:M.country,onChange:e=>ie("country",e),onFocus:V})}),Z?(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(k.l,{id:"state_province",label:ee,name:"state",placeholder:te,required:!0,native:J,options:re,value:M.state,onChange:e=>ie("state",e),onFocus:V,...T.P})}):null,(0,B.Y)(a.A,{size:{sm:12,md:6,lg:4},children:(0,B.Y)(C.p,{required:!0,name:"city",placeholder:X.cityPlaceholder,id:"city",value:M.city,onFocus:V,onChange:e=>ie("city",e.target.value),label:Q.formField.city,...T.P})}),(0,B.Y)(a.A,{size:{sm:10},children:(0,B.Y)(P.S,{id:"formCheckbox",checked:M.opt_in,value:M.opt_in,onFocus:V,onChange:e=>ie("opt_in",e.target.checked),label:(0,B.FD)(F.E,{variant:"body1",css:i.s.label,children:[Q.formField.consentTextSentences[0],(0,B.Y)(p.A,{variant:"body1",href:Q.formField.consentLink,css:[i.s.whiteFont,i.s.linkStyles,"",""],children:Q.formField.consentLinkText})]}),checkedColor:Y.Tj.core.snow,uncheckedColor:Y.Tj.core.snow})}),(0,B.Y)(a.A,{container:!0,children:(0,B.Y)(a.A,{container:!0,css:R,children:(0,B.Y)(n.A,{css:i.s.submitButton,name:"submit",type:"submit",variant:"outlined",disabled:W,children:Q.formField.submit})})})]})})]})})})}},8504(e,t,r){r.d(t,{s:()=>l});var o=r(5624),a=r(69838),n=r(5677);const l={bannerContainer:e=>({background:e?`linear-gradient(180deg, ${o.Tj.core.geotab} 0%, rgba(0,128,178,0.85) 100%), url("${e}")  no-repeat padding-box`:`linear-gradient(180deg, ${o.Tj.core.geotab} 0%, #0080B2 100%) no-repeat padding-box`,backgroundAttachment:"fixed",width:"100%"}),label:{color:o.Tj.core.snow,"& a":{color:o.Tj.core.snow},"& a:hover":{backgroundColor:(0,n.MV)(o.Tj.core.snow,.02)},"& a:focus":{backgroundColor:`${(0,n.MV)(o.Tj.core.snow,.05)} !important`}},whiteFont:{color:`${o.Tj.core.snow} !important`},centerAlign:{textAlign:"center",margin:"0 auto"},marginTop20:{marginTop:"2rem"},headingMargin:{marginBottom:"3rem"},submitButtonContainer:{marginTop:"3rem",[`@media (max-width: ${a.f.md})`]:{flexDirection:"column-reverse"}},formContainer:{paddingRight:"20rem",paddingLeft:"20rem",[`@media (max-width: ${a.f.md})`]:{paddingRight:"3.6rem",paddingLeft:"3.6rem"}},submitButton:{minWidth:"12rem",[`@media (max-width: ${a.f.md}
1)`]:{height:"100%",width:"100%"}},subTitle:{width:"80%"},bottomMargin:{marginBottom:"1rem"},linkStyles:{textDecoration:"underline",color:o.Tj.core.innovation},gutterBottom:{marginBottom:"3rem"}}},50972(e,t,r){r.d(t,{P:()=>n});var o=r(5624),a=r(5677);const n={labelColor:o.Tj.core.snow,color:o.Tj.core.snow,borderColor:o.Tj.core.snow,backgroundColor:(0,a.MV)(o.Tj.core.geotab,.4),weight:"regular"}},18673(e,t,r){r.d(t,{$8:()=>a,$y:()=>o,JI:()=>n,kv:()=>l});const o={checkedFieldKey:"country",resetFieldKey:"state"},a={checkedFieldKey:"Title__c",resetFieldKey:"Title"},n={checkedFieldKey:"industry",resetFieldKey:"Sub_Industry__c"};function l(e,t,r){const o={[e]:t};function a(t){e===t.checkedFieldKey&&(o[t.resetFieldKey]="")}return Array.isArray(r)?r.forEach(e=>{a(e)}):a(r),o}},12785(e,t,r){function o(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)}r.d(t,{Q:()=>a,u:()=>o});const a=e=>(Object.keys(e).forEach(t=>{const r=e[t];"string"===typeof r?e[t]=r.trim():"object"===r&&(e[t]=null!==r&&void 0!==r?a(r):null)}),e)},46260(e,t,r){r.r(t),r.d(t,{fleetSizeOptions:()=>a,getFleetSizeOptions:()=>l});var o=r(43886);const a=["1-4","5-19","20-49","50-99","100-199","200-499","500-4999","5000-9999","10,000+"],n=new Set(["1-4","5-19"]);function l(e){return e===o.s.ptBr?a.filter(e=>!n.has(e)):a}},39484(e,t,r){r.d(t,{Y:()=>c});var o=r(45481),a=(r(45677),r(23585)),n=r(62247),l=r(93410),i=r(63312);function c(e){const t=(0,o.c)(13),r="US"===e,c="CA"===e,s="BR"===e,{selectedLanguageTranslation:d}=(0,n.B)();let m;t[0]!==d?(m=(0,l.s)(d,"formTranslations"),t[0]=d,t[1]=m):m=t[1];const u=m;let h;t[2]!==d?(h=(0,l.s)(d,"formPlaceholders"),t[2]=d,t[3]=h):h=t[3];const p=h;let g;t[4]!==e?(g=function(e){return"CA"===e?[i.m.CanadianProvince]:"US"===e?[i.m.AmericanState]:"BR"===e?[i.m.BrazilianState]:[]}(e),t[4]=e,t[5]=g):g=t[5];const f=g;let b="",y="",_=!1;(r||s)&&(b=u?.state||"State",y=p?.statePlaceholder||"Select a state",_=!0),c&&(b=u?.province||"Province",y=p?.provincePlaceholder||"Select a province",_=!0);const[v]=(0,a.b)(f);let A,F;return t[6]!==v?(A=v||[],t[6]=v,t[7]=A):A=t[7],t[8]!==b||t[9]!==y||t[10]!==_||t[11]!==A?(F=[_,b,y,A],t[8]=b,t[9]=y,t[10]=_,t[11]=A,t[12]=F):F=t[12],F}},37644(e,t,r){r.d(t,{K:()=>n});var o=r(45481),a=r(45677);const n=e=>{const t=(0,o.c)(3);let r,n;if(t[0]===Symbol.for("react.memo_cache_sentinel")){let l="",i="",c="",s="",d="",m="",u="",h="";function p(){if("undefined"!==typeof window){const e=new URLSearchParams(window.location.search);l=e.get("utm_source"),c=e.get("utm_campaign"),s=e.get("utm_content"),d=e.get("utm_medium"),i=e.get("utm_term"),m=e.get("utm_id"),u=e.get("gclid"),h=window.location.href}return{Lead_Source_URL__c:h,utm_source__c:l,utm_medium__c:d,utm_campaign__c:c,utm_content__c:s,utm_term__c:i,utm_id__c:m,GCLID__c:u}}r=p(),t[0]=r}else r=t[0];return t[1]!==e?(n={...e,...r},t[1]=e,t[2]=n):n=t[2],(0,a.useState)(n)}},12530(e,t,r){r.d(t,{j:()=>i});var o=r(12785),a=r(64181),n=r(10372),l=r(79791);async function i(e,t,r,i,c,s){const d={...(0,o.Q)(r)};if(d.recaptchaToken=i,"generic-lead-form-test"===t||"generic-lead-form"===t){const e=(0,a.N9)();d.Website_Cookie__c=e?Object.keys(e).map(t=>`${t}:${e[t]}`).join():""}e===l.ux.Marketo&&s&&(d.marketoInstance=s);let m=`/api/${e}/`;e===l.ux.Marketo?c&&(m+=`${c}/`):m+=`${t}/`,await(0,n.zA)(m,JSON.stringify(d))}},23617(e,t,r){r.d(t,{S:()=>c});var o=r(47208),a=r(28838),n=r(99269),l=r(5440),i=r(97787);const c=({label:e,id:t,name:r,disabled:c,hiddenLabel:s,onChange:d,onBlur:m,onFocus:u,checked:h,labelColor:p,checkedColor:g,uncheckedColor:f,value:b,defaultChecked:y,indeterminate:_,labelPlacement:v,className:A,ref:F})=>(0,o.Y)(l.Z2,{children:({css:l})=>(0,o.Y)(a.A,{disabled:c,ref:F,control:(0,o.Y)(n.A,{defaultChecked:y,checked:h,indeterminate:_,value:b,onFocus:u,onBlur:m,onChange:d,name:r,disabled:c,id:t,slotProps:{input:{ref:e=>{e&&(e.indeterminate=!!_)},"aria-label":s&&"string"===typeof e?e:void 0}},css:[i.e$.formControlLabelInput(v),i.e$.checkbox(f,g)]}),label:s?"":e,classes:{label:l(i.e$.formControlLabelText(p))},labelPlacement:v,css:i.e$.formControlLabelRoot(v),className:A})})}
1,30474(e,t,r){e.exports=r.p+"images/FormsBackground/[email protected]"},28838(e,t,r){r.d(t,{A:()=>v});var o=r(45677),a=r(34111),n=r(75402),l=r(16255),i=r(47683),c=r(40832),s=r(49388),d=r(88266),m=r(61497),u=r(97416),h=r(68644);function p(e){return(0,h.Ay)("MuiFormControlLabel",e)}const g=(0,u.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var f=r(45904),b=r(49913);const y=(0,i.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${g.label}`]:t.label},t.root,t[`labelPlacement${(0,m.A)(r.labelPlacement)}`]]}})((0,c.A)(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${g.disabled}`]:{cursor:"default"},[`& .${g.label}`]:{[`&.${g.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]}))),_=(0,i.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk"})((0,c.A)(({theme:e})=>({[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}}))),v=o.forwardRef(function(e,t){const r=(0,s.b)({props:e,name:"MuiFormControlLabel"}),{checked:i,className:c,control:u,disabled:h,disableTypography:g,inputRef:v,label:A,labelPlacement:F="end",name:C,onChange:k,required:P,slots:T={},slotProps:Y={},value:w,...S}=r,[x,j]=(0,l.W)({props:r,states:["error"]}),$=h??u.props.disabled??j?.disabled,z=P??u.props.required,L={disabled:$,required:z};["checked","name","onChange","value","inputRef"].forEach(e=>{"undefined"===typeof u.props[e]&&"undefined"!==typeof r[e]&&(L[e]=r[e])});const B={...r,disabled:$,labelPlacement:F,required:z,error:x.error},D=(e=>{const{classes:t,disabled:r,labelPlacement:o,error:a,required:l}=e,i={root:["root",r&&"disabled",`labelPlacement${(0,m.A)(o)}`,a&&"error",l&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",a&&"error"]};return(0,n.A)(i,p,t)})(B),q={slots:T,slotProps:Y},[R,M]=(0,f.A)("typography",{elementType:d.A,externalForwardedProps:q,ownerState:B});let E=A;return null==E||E.type===d.A||g||(E=(0,b.jsx)(R,{component:"span",...M,className:(0,a.A)(D.label,M?.className),children:E})),(0,b.jsxs)(y,{className:(0,a.A)(D.root,c),ownerState:B,ref:t,...S,children:[o.cloneElement(u,L),z?(0,b.jsxs)("div",{children:[E,(0,b.jsxs)(_,{ownerState:B,"aria-hidden":!0,className:D.asterisk,children:["\u2009","*"]})]}):E]})})}}]);
2//# sourceMappingURL=components-TruckingDemoForm.401c989ea312ab522705.js.map

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.