1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2011],{72011:(e,t,a)=>{a.r(t),a.d(t,{default:()=>L});var n,r,o=a(37876),i=a(98481),s=a(47006),c=a(89099),l=a(14232),d=a(24502),p=a(40089),m=a(75230),u=a(86829),_=a(74401);let y=({text:e,sx:t})=>(0,o.jsx)(m.A,{as:"p",variant:_.YV.h3,sx:{px:u.v.mainX,pt:["m_73_84",null,"t_84_92",null,"d_38_73"],pb:["m_16_18",null,"t_18_20",null,"d_14_24"],borderTop:"1px solid",borderColor:"border",...t},children:e});var b=a(61080),f=a(76898),h=a(14344),x=a(24735),g=a(76320),v=a(35110),A=a(88230),C=a(53782),S=a(40606),j=a(97727),B=a(52521),w=a(10483),q=a(35554),T=a(8516),U=a(90925),k=a(31499),I=a(52083),F=a(848),N=((n={}).USA="USA",n.GERMANY="Germany",n.UK="UK",n.CANADA="Canada (Quebec excluded)",n),E=((r={}).business_state="business_company_state",r.state="company_state",r.city="company_city",r.address2="company_address2",r.street="company_street",r.zip="company_zip",r.founded_date="company_founded_date",r.incorporation="company_incorporation",r.reg_number="company_reg_number",r.employees="company_employees",r.ein="company_ein",r.vat_number="company_vat_number",r.file="contact_file_v2",r.additional_contact_file="additional_contact_file",r.fedaral_number="company_federal_tax",r.corp_number="company_corporation_number",r.hst_number="company_hst_number",r);let M={USA:{business_company_state:"State/district*",company_street:"Street address*",company_address2:"Address line 2*",company_city:"City*",company_state:"State/district*",company_zip:"Zip/postal code*",company_founded_date:"Founded date*",company_incorporation:"Place of incorporation*",company_employees:"Number of employees*",company_reg_number:"Company registration number*",company_federal_tax:"Company federal tax ID (EIN)*",company_ein:"",company_vat_number:"",company_corporation_number:"",company_hst_number:"",contact_file_v2:"Upload business plan*",additional_contact_file:"Upload W-9 Form*"},UK:{business_company_state:"Country/region*",company_street:"Street address*",company_address2:"Address line 2*",company_city:"City*",company_state:"County/region*",company_zip:"Zip/postal code*",company_founded_date:"Founded date*",company_incorporation:"Place of incorporation (jurisdiction)*",company_employees:"Number of employees*",company_reg_number:"Company number*",company_vat_number:"VAT registration number*",company_federal_tax:"",company_ein:"",company_corporation_number:"",company_hst_number:"",contact_file_v2:"Upload business plan*",additional_contact_file:"Upload verification document (Certificate of Incorporation)*"},Germany:{business_company_state:"Federal state (Bundesland)*",company_street:"Street address*",company_address2:"Address line 2*",company_city:"City*",company_state:"Federal state (Bundesland)*",company_zip:"Zip/postal code*",company_founded_date:"Founded date*",company_incorporation:"Place of incorporation*",company_employees:"Number of employees*",company_reg_number:"Commercial register number*",company_vat_number:"VAT number*",company_ein:"Tax number (Steuernummer)*",company_federal_tax:"",company_corporation_number:"",company_hst_number:"",contact_file_v2:"Upload business plan*",additional_contact_file:"Upload verification document (commercial register extract/ Handelsregisterauszug â HRB/HRA)*"},"Canada (Quebec excluded)":{business_company_state:"Province/territory*",company_street:"Street address*",company_address2:"Address line 2*",company_city:"City*",company_state:"Province/territory*",company_zip:"Zip/postal code*",company_founded_date:"Founded date*",company_incorporation:"Place of incorporation*",company_employees:"Number of employees*",company_reg_number:"Business number*",company_corporation_number:"Corporation number*",company_hst_number:"GST/HST number*",company_ein:"",company_vat_number:"",company_federal_tax:"",contact_file_v2:"Upload business plan*",additional_contact_file:"Upload verification document (Certificate or Articles of Incorporation)*"}},z=/^.{0,8}$/,G=/^.{0,11}$/,R=/^.{0,12}$/,V={company_reg_number:{required:!1},company_vat_number:{required:!1},company_ein:{required:!1},company_federal_tax:{required:!1},company_corporation_number:{required:!1},company_hst_number:{required:!1}},P=new Map([["company_reg_number",new Map([[N.USA,{pattern:R,message:"Input must not exceed 12 characters",required:!1}],[N.CANADA,{pattern:/^.{0,9}$/,message:"Input must not exceed 9 characters",required:!0}],[N.UK,{pattern:z,message:"Input must not exceed 8 characters",required:!0}],[N.GERMANY,{pattern:/^.{0,10}$/,message:"Input must not exceed 10 characters",required:!0}]])],["company_federal_tax",new Map([[N.USA,{pattern:R,message:"Input must not exceed 12 characters",required:!0}]])],["company_corporation_number",new Map([[N.CANADA,{pattern:z,message:"Input must not exceed 8 characters",required:!0}]])],["company_hst_number",new Map([[N.CANADA,{pattern:/^.{0,18}$/,message:"Input must not exceed 18 characters",required:!0}]])],["company_vat_number",new Map([[N.UK,{pattern:G,message:"Input must not exceed 11 characters",required:!0}],[N.GERMANY,{pattern:G,message:"Input must not exceed 11 characters",required:!1}]])],["company_ein",new Map([[N.GERMANY,{pattern:/^.{0,13}$/,message:"Input must not exceed 13 characters",required:!1}
1]])]]),$=new Set(P.keys()),D=new Set(["company_street","company_address2","company_city","company_state","company_zip","company_founded_date","company_incorporation","company_employees","contact_file_v2","additional_contact_file"]),W=new Set(Object.values(E)),H=Object.values(E),L=({value:e,page:t})=>{let{contact_form:a,color:n}=e,{contact_fields:r,id:m,button_text:_,form_html_id:E="",title:z}=a,[G,R]=(0,l.useState)(r),[L,Y]=(0,l.useState)(!1),[K,O]=(0,l.useState)(""),[Z,Q]=(0,l.useState)(!1),[X,J]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(!1),[ea,en]=(0,l.useState)(),er=(0,c.useRouter)(),eo=(0,q.Y)(),ei=(0,l.useMemo)(()=>{let e={};for(let t of G)e[t.value.name]=t.type===T.BB.CheckboxGroup||t.type===T.BB.Switcher?[]:"";return e},[G]),es=(0,l.useMemo)(()=>G.filter(e=>e.type===T.BB.Checkbox),[G]),{register:ec,setValue:el,getValues:ed,resetField:ep,handleSubmit:em,watch:eu,control:e_,formState:{errors:ey},reset:eb,setError:ef,clearErrors:eh,unregister:ex}=(0,d.mN)({mode:"onChange",defaultValues:{...ei,page:t,contact_form:m,company_country:"USA"}}),eg=(0,B.T)();(0,w.z)(eg),(0,k.pj)(eu);let ev=async e=>{if(eh(),et(!1),Q(!0),J(!0),eg.analyzeBehavior().isLikelyBot){Q(!1),J(!1);return}try{await (0,h.Ph)(e,eo);let t=G.find(e=>e.type===T.BB.CheckboxGroup)?.value;(0,k.h7)({event:(0,h.Ou)(e,t),...e}),await (0,x.i)(e,eo),J(!1),void 0!==e.subscribe&&!0!==e.subscribe?setTimeout(async()=>await er.push({pathname:"/thank-you-stay-updated"}),200):setTimeout(async()=>await er.push({pathname:"/international-invention-day/thank-you"}),200),eb()}
1catch(e){i.A.isAxiosError(e)&&(e.response?.status===413?en({title:"File size limit exceeded",text:"Files must not be larger than 10 MB."}):e.response?.status===500?en({title:"Server error",text:"Please try again later."}):(0,h.ug)(e,ef)),Q(!1),J(!1),et(!0)}},eA=(0,d.FH)({name:"company_country",control:e_}),eC=(0,l.useRef)(new Map),eS=(0,l.useMemo)(()=>({checkFileSize:I.QT.checkFileSize({locale:eo})}),[eo]);return(0,l.useEffect)(()=>{let e=eC.current;e.clear(),G.forEach(t=>{let a=t.value.name;if(!W.has(a))return;(t.type===T.o4||t.type===T.BB.UploadInput)&&(t.value.placeholder_text=M[N.USA][a]);let n=document.querySelector(`[name=${a}]`),r=n?.closest(".input-view");r&&e.set(a,r)})},[G]),(0,l.useEffect)(()=>{eC.current.forEach((e,t)=>{W.has(t)&&(L?e.classList.remove("hideBlock"):e.classList.add("hideBlock"))})},[G,L]),(0,l.useEffect)(()=>{eA&&eA.length>0&&(Y(!0),O(eA),G.forEach(e=>{let t=e.value.name;W.has(t)&&(e.type===T.o4||e.type===T.BB.UploadInput)&&(e.value.placeholder_text=M[eA][t])}),H.forEach(e=>{ep(e)}))},[eA,G,ep,ex]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("form",{id:E,onSubmit:e=>{e.preventDefault(),em(ev)(e).finally(()=>{})},"action-xhr":"#",target:"_top",method:"post",children:[(0,o.jsx)("input",{...ec("form_website_honeytrap"),type:"text",autoComplete:"off",style:{display:"none"},tabIndex:-1,"aria-hidden":"true"}),(0,o.jsx)("input",{type:"hidden",id:"form_visitor_id",value:(0,s.getCookie)(j.wy)||"",...ec("form_visitor_id")}),(0,o.jsx)(f.A,{title:z,register:ec,setValue:el,getValues:ed}),(0,o.jsx)(U.A,{register:ec}),(0,o.jsxs)(A.A,{sx:{gridGap:0,gridTemplateColumns:["1fr",null,null,null,"6fr 6fr"],alignItems:"start"},children:[(0,o.jsx)(b.A,{value:e}),(0,o.jsxs)(C.A,{sx:{borderLeftWidth:[0,null,null,null,1],borderLeftStyle:"solid",borderColor:"border",overflow:"hidden","& > div":{"&:before":{right:0}}},children:[(0,o.jsx)(A.A,{sx:{gridGap:0,gridTemplateColumns:["1fr",null,"1fr 1fr"],".form-textarea, .form-checkbox-group":{gridColumn:"1/-1"},".form-input, .form-upload":{borderBottomWidth:[0,null,1],borderBottomStyle:"solid",borderColor:"border",marginBottom:-1,borderRightWidth:[0,null,1],borderRightStyle:"solid"},".input-view.hidden":{display:"none",visibility:"hidden"},".input-view.hideBlock":{opacity:.5,pointerEvents:"none"},".form-textarea":{minHeight:["179px",null,null,null,"auto"],height:"100%"}},children:G.map((e,t)=>{if(e.type===T.BB.Checkbox)return null;if(e.value.name in V){let t=$.has(e.value.name)&&P.get(e.value.name),a=t?t.get(K):void 0,n=!a,r=!n&&a&&a.required?{...e,value:{...e.value,required:!0}}:{...e,value:{...e.value,required:!1}};return(0,o.jsxs)(l.Fragment,{children:[e.value.heading_line_text&&(0,o.jsx)(y,{text:e.value.heading_line_text,sx:{gridColumn:"1/-1"}}),(0,o.jsx)(p.A,{className:n?"hidden":void 0,options:!n&&a?.pattern&&a.message?{pattern:{value:a.pattern,message:a.message}}:void 0,field:r,register:ec,watch:eu,errors:ey})]},e.id)}if(e.type===T.BB.Textarea||e.type===T.BB.Comment)return(0,o.jsxs)(l.Fragment,{children:[e.value.heading_line_text&&(0,o.jsx)(y,{text:e.value.heading_line_text,sx:{gridColumn:"1/-1",...0===t&&{borderTopStyle:"solid",borderTopWidth:[1,null,null,null,0],borderTopColor:"border"}}}),(0,o.jsx)(p.A,{field:e,register:ec,watch:eu,errors:ey,setValue:el,control:e_})]},e.id);let a=D.has(e.value.name)?{...e,value:{...e.value,required:!0}}:e,n="contact_file_v2"===e.value.name||"additional_contact_file"===e.value.name;return(0,o.jsxs)(l.Fragment,{children:[e.value.heading_line_text&&(0,o.jsx)(y,{text:e.value.heading_line_text,sx:{gridColumn:"1/-1",...0===t&&{borderTopStyle:"solid",borderTopWidth:[1,null,null,null,0],borderTopColor:"border"}}}),(0,o.jsx)(p.A,{field:a,register:ec,watch:eu,errors:ey,fileValidate:n?eS:void 0})]},e.id)})}),(0,o.jsxs)(C.A,{children:[(0,o.jsx)(S.A,{sx:{flexDirection:"column",px:u.v.mainX,py:["m_16_18",null,"t_18_20",null,"d_14_24"],gap:["m_6_7",null,"t_7_8",null,"d_5_10"],borderTopWidth:1,borderTopStyle:"solid",borderColor:"border",".form-checkbox":{borderTop:"none",p:0}},children:es.map(e=>(0,o.jsx)(l.Fragment,{children:(0,o.jsx)(p.A,{field:e,register:ec,watch:eu,errors:ey,setValue:el})},e.id))}),(0,o.jsx)(C.A,{sx:{px:u.v.mainX,pb:["m_38_43",null,"t_43_47",null,"d_20_38"]},children:(0,o.jsx)(g.q,{isLoading:X,disabled:Z,type:"submit",color:n,children:_})})]})]})]})]}),(0,o.jsx)(v.A,{children:(0,o.jsx)(F.A,{isOpen:ee,setIsOpen:et,message:ea})})]})}}}]);
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.