1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7322],{84941:(e,t,a)=>{a.r(t),a.d(t,{default:()=>d});var r=a(95155),s=a(81334),n=a(95055),i=a(12115),l=a(87177),o=a(25663),u=a(81319),c=a(45352);let d=e=>{let{config:t,partnerType:a,formState:d,setFormState:p,handleStepChange:m,handleSubmit:y,submitLoading:f,hasSubmitError:h,submitTriggered:k,setSubmitTriggered:x,translations:b,renderedMarketingConsent:g}=e,[v,_]=(0,i.useState)([]),[C,N]=(0,i.useState)(!1),j=t?.find(e=>e?.key==="companyDetails")?.fields?.find(e=>e?.key==="industryGroup")?.options;(0,i.useEffect)(()=>{if(!d.industry)return;let e=j;_((e=e?.filter(e=>e.startsWith(d?.industry?.key)))||[]),p({...d,industryGroup:""})},[d?.industry]);let S=e=>{for(let t of e)if(t.required){if("industryGroup"===t.key&&v?.length===0)return!0;let e=d[t.key];if(!e||t?.multiple&&Array.isArray(e)&&0===e.length)return!1}return!0};return(0,r.jsx)("div",{children:t.map((e,_)=>{let j=d?.activeStep!==_,$=e?.key;return"confirmation"===$?(0,r.jsx)(i.Fragment,{},_):(0,r.jsxs)("form",{noValidate:!0,onSubmit:async a=>{if(a.preventDefault(),d?.activeStep!==_)return;let r=e?.fields;x(!k);let s=a.target.checkValidity(),n=S(r);if(!s||!n){N(!0);return}e?.key==="contactInfo"?await y():(N(!1),m(d.activeStep+1));let i={...d,countryOfRegistration:d?.countryOfRegistration?.code};delete i?.email,delete i?.phoneNumber,delete i?.firstName,delete i?.lastName,delete i?.hasErrors,delete i?.amount,delete i?.activeStep,(0,o.BI)("LeadCaptureFormProgress",{partnerType:"remittanceProviderBusiness",stepKey:t?.[d.activeStep].key,...i})},className:(0,l.c)("h-full flex flex-col gap-[12px]",{hidden:j}),children:[e?.fields?.map((t,s)=>{let n=t?.key==="annualRevenue"||e?.key==="paymentDetails"?"leadCapture":"general",o=t,u="contactInfo"===$?t?.key==="marketingConsent"?g:b?.[`common.${t.key}FieldLabel`]:b?.[`partnerAttributeLabels.${a}.${n}.${t.key}`];if(t?.key==="regularCurrencies"&&(u=b?.["leadCapture.stepBusiness_paymentDetails_regularCurrencies_label"]),t?.key==="acceptsInternationalPayments"&&(u=b?.["leadCapture.stepBusiness_paymentDetails_acceptsInternationalPayments_label"]),t?.key==="industryGroup"){if(!(v?.length>0))return r.jsx(i.Fragment,{},$);o=t?.key==="industryGroup"?{...o,options:v}:o}let m=`partnerAttributeValues.${a}.${n}.${t.key}`,y=".",h=b?.[`leadCapture.step_${e.key}_${t?.key}_otherLabel`],x=b?.[`leadCapture.step_${e.key}_${t?.key}_otherPlaceholder`];return t?.key==="individualsPosition"?(m="common.individualsPositionFieldValue",y="_",h=b?.["common.individualsPositionOtherFieldLabel"]):t?.key==="planToUseFx"?h=b?.["leadCapture.stepBusiness_paymentDetails_planToUseFx_otherLabel"]:t?.key==="businessType"&&(h=b?.["leadCapture.stepBusiness_companyDetails_businessType_otherLabel"]),r.jsx(c.A,{label:u,translations:b,requiredTrigger:k,required:t?.required||!1,valueTranslationPrefix:m,valueTranslationSeparator:y,value:d[t.key],disabled:f,config:o,className:l.c({"mt-1 mb-[2px]":t?.key==="marketingConsent"}),onChange:e=>{p({...d,[t.key]:e})},showErrors:C,setHasErrors:e=>{p({...d,hasErrors:e})},otherInputLabel:h,otherInputPlaceholder:x,zIndex:e?.fields?.length?e?.fields?.length-s:1},s)}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:["contactInfo"===$&&h&&(0,r.jsx)("div",{className:"w-full text-center text-xs text-rating-poor -mb-1 mt-[2px]",children:b?.["leadCapture.submitErrorMessage"]}),(0,r.jsx)(u.default,{type:"submit",color:"cta",size:"md",disabled:f,className:(0,l.c)("w-full mt-1 h-[65px]"),children:(0,r.jsx)("span",{className:"text-sm",children:t?.[d.activeStep].key==="contactInfo"?(0,r.jsx)(r.Fragment,{children:f?(0,r.jsx)(s.g,{icon:n.OtC,className:"animate-spin text-md"}):b?.["leadCapture.submitQuoteRequest"]}):b?.["common.next"]})}),d?.activeStep!==0&&(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)("div",{onClick:()=>{f||m(d.activeStep-1)},className:(0,l.c)("pb-1 md:pb-0 w-fit mt-1 cursor-pointer text-primary underline mx-auto hover:opacity-90",{"opacity-40 hover:opacity-40 hover:cursor-default":f}),children:(0,r.jsxs)("span",{className:"font-body-medium flex items-center",children:[(0,r.jsx)(s.g,{icon:n.Wzs,className:"mr-1 text-sm"}),b?.["common.back"]]})})})]})]},_)})})}}}]);
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.